system-phone 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-phone",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -80,14 +80,7 @@
80
80
  }
81
81
  },
82
82
  ready () {
83
- // this.getModelSum()
84
- if(Vue.config.telephone&&Vue.config.telephone.TipConfig&&Vue.config.telephone.TipConfig.data){
85
- this.isshowTag = true
86
- this.getTabs()
87
- }else{
88
- this.getNoTagTabs()
89
- }
90
-
83
+ this.getNoTagTabs()
91
84
  },
92
85
 
93
86
  methods: {
@@ -236,56 +229,41 @@
236
229
  this.$set('tabs',Vue.functions[funs].children)
237
230
  }
238
231
  }
232
+ this.getTabs()
239
233
  },
240
- async getTabs(){
241
- const config = Vue.config.telephone.TipConfig.data
242
- const user = Vue.user
243
- console.log("Vue.android"+Vue.android)
244
- if(Vue.android){
245
- const result = this.$androidUtil.syncBzLogic("TipConfig",{data:{config,user}})
246
- if(result.code === 200){
247
- for(let funs in Vue.functions){
248
- if(Vue.functions[funs].link == 'attend-manage'){
249
- Vue.functions[funs].children.forEach(res=>{
250
- console.log(res)
251
- result.result.forEach(ress=>{
252
- if(res.link === ress.link){
253
- res.num=ress.num
254
- }
255
- })
234
+ getTabs(){
235
+ if (Vue.android) {
236
+ if(Vue.config.telephone&&Vue.config.telephone.TipConfig&&Vue.config.telephone.TipConfig.data) {
237
+ this.isshowTag = true
238
+ const config = Vue.config.telephone.TipConfig.data
239
+ const user = Vue.user
240
+ console.log("Vue.android" + Vue.android)
241
+ const result = this.$androidUtil.syncBzLogic("TipConfig", {data: {config, user}})
242
+ if (result.code === 200) {
243
+ for (var i = 0; i < this.tabs.length; i++) {
244
+ result.result.forEach(ress => {
245
+ if (this.tabs[i].link === ress.link) {
246
+ this.$set('tabs[' + i + '].num', ress.num)
247
+ }
256
248
  })
257
- this.$set('tabs',Vue.functions[funs].children)
258
- }
259
- }
260
- }else{
261
- for(let funs in Vue.functions){
262
- if(Vue.functions[funs].link == 'attend-manage'){
263
- this.$set('tabs',Vue.functions[funs].children)
264
249
  }
265
250
  }
266
251
  }
267
- }else{
268
- const result = {"code":200,"result":[{"link":"repair-first","num":50},{"link":"current-create","num":30}]}
269
- if(result.code === 200){
270
- for(let funs in Vue.functions){
271
- if(Vue.functions[funs].link == 'attend-manage'){
272
- Vue.functions[funs].children.forEach(res=>{
273
- console.log(res)
274
- result.result.forEach(ress=>{
275
- if(res.link === ress.link){
276
- res.num=ress.num
277
- }
278
- })
279
- })
280
- this.$set('tabs',Vue.functions[funs].children)
281
- }
252
+ } else {
253
+ const result = {
254
+ "code": 200,
255
+ "result": [{"link": "repair-first", "num": 50}, {"link": "current-create", "num": 30}]
256
+ }
257
+ if (result.code === 200) {
258
+ for (var i = 0; i < this.tabs.length; i++) {
259
+ result.result.forEach(ress => {
260
+ if (this.tabs[i].link === ress.link) {
261
+ this.$set('tabs[' + i + '].num', ress.num)
262
+ }
263
+ })
282
264
  }
283
- }else{
284
-
285
265
  }
286
-
287
266
  }
288
-
289
267
  },
290
268
  imgback(val){
291
269
  return require('../assets/'+val+'.png')
@@ -307,7 +285,7 @@
307
285
  safe:false
308
286
  }
309
287
  this.$dispatch('gotoson',prpdata)
310
- this.$goto(param,{sourcet:'竖屏',tabname:title})
288
+ this.$goto(param,{sourcet:'竖屏',tabname:title},'self',this.getTabs)
311
289
  }
312
290
  },
313
291
  mute () {