diy_service.js
1.5 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Component({
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
object:{
type: Object,
value:null
},
},
data: {
iurl:getApp().globalData.setting.imghost
},
lifetimes: {
attached: function() {
var th=this;
//----获取系统参数-----
getApp().getConfig2(function(e) {
var json_d = JSON.parse(e.switch_list);
th.setData({ sys_switch:json_d, })
})
}
},
methods: {
berror:function(e){
var iurl=getApp().globalData.setting.imghost;
var ob={};
var txt="object.title_img";
ob[txt] = iurl +'/miniapp/images/logo.png';
this.setData(ob);
},
//-- 跳到绑定注册会员 --
go_user:function(){
getApp().goto('/pages/togoin/togoin');
return false;
},
//---------联系客服------------
contactService: function() {
getApp().getConfig(function(t) {
if (t.store_tel == undefined) {
getApp().request.get("/api/weshop/store/get/" + os.stoid, {
isShowLoading: 1,
data: {},
success: function(rs) {
getApp().globalData.config = rs.data.data;
if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
getApp().my_warnning("商家未设置电话", 0, th);
return false;
}
wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, })
}
})
} else {
wx.makePhoneCall({ phoneNumber: t.store_tel, })
}
});
},
}
})