55 lines
1021 B
JavaScript
55 lines
1021 B
JavaScript
import _ from '../../commons/js/commons';
|
|
Page({
|
|
data: {
|
|
imgUrl: _.config.imgUrl,//静态图片路径
|
|
isShowKefu:false,
|
|
},
|
|
|
|
onLoad: function (options) {
|
|
for (let key in options) {
|
|
this.setData({
|
|
[key]: options[key]
|
|
})
|
|
}
|
|
|
|
//获取用户信息
|
|
_.apiQuery.getUserInfo().then(res => {
|
|
this.setData({
|
|
userInfo: res
|
|
})
|
|
})
|
|
|
|
wx.getSystemInfo({
|
|
success (res) {
|
|
if(res.system.indexOf('Android')>-1){
|
|
wx.setBackgroundColor({
|
|
backgroundColor: '#fb3939',
|
|
})
|
|
}
|
|
}
|
|
})
|
|
|
|
//this.getDistributionHome()
|
|
},
|
|
|
|
//推送链接
|
|
pushLink(e) {
|
|
if(e.currentTarget.dataset.url){
|
|
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
|
}
|
|
},
|
|
|
|
//联系客服
|
|
optShowKefu(e) {
|
|
this.setData({
|
|
isShowKefu:!this.data.isShowKefu,
|
|
})
|
|
},
|
|
|
|
|
|
//页面相关事件处理函数--监听用户下拉动作
|
|
onPullDownRefresh: function () {
|
|
//this.getDistributionHome()
|
|
},
|
|
|
|
}) |