c_setting.js
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var util = require('../../utils/util.js')
var uri=require('../../utils/uri.js')
import App from '../../utils/api.js'
Page({
data:{
openid:'',
num:0
},
onLoad:function(){
this.setData({
openid:util.cache('openid'),
})
console.log('frtyu',this.data.openid)
util.setBarTitle('通用设置');
this.getsellerlist();
},
onShow:function(){
},
exit:function(){
wx.removeStorage({key:'sellerid'})
wx.removeStorage({key:'idenity'})
wx.removeStorage({key:'role_name'})
wx.reLaunch({
url:'../login/l_login'
})
},
//通过openid识别当前用户身份、打开的商户信息
netchange() {
this.getsellerlist();
},
getsellerlist(){
App.Seller.GetSystemByOpenid({openid:this.data.openid}).then((json)=>{
console.log(json)
if(json.ret==200){
if(json.ret==200 && json.data[0].length>1){
this.setData({
num:json.data[0].length
})
}
}
})
},
})