|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
globalData: {
|
|
|
|
// url: 'http://192.168.3.4:9301/crest',
|
|
|
|
// brestUrl: 'http://192.168.3.4:9302/brest',
|
|
|
|
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
|
|
|
|
//正式
|
|
|
|
// url: 'https://hsg.dctpay.com/crest',
|
|
|
|
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
|
|
|
|
// brestUrl: 'https://hsg.dctpay.com/brest',
|
|
|
|
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
|
|
|
|
//测试
|
|
|
|
url: 'https://hsgcs.dctpay.com/crest',
|
|
|
|
brestUrl: 'https://hsgcs.dctpay.com/brest',
|
|
|
|
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
|
|
|
|
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
|
|
|
|
userInfo: "",
|
|
|
|
brestUserInfo: '',
|
|
|
|
bresthighAgent: '',
|
|
|
|
openId: '',
|
|
|
|
code: '',
|
|
|
|
token: '',
|
|
|
|
brestToken: '',
|
|
|
|
cityId: '',
|
|
|
|
cityName: '',
|
|
|
|
longitude: '',
|
|
|
|
latitude: '',
|
|
|
|
balancePrice: '',
|
|
|
|
balanceCardNo: '',
|
|
|
|
identificationCode: '',
|
|
|
|
//公司id
|
|
|
|
companyId: '',
|
|
|
|
// h5获取信息
|
|
|
|
h5code: '',
|
|
|
|
//门店ID
|
|
|
|
storeid: '',
|
|
|
|
//门店名字
|
|
|
|
storename: '',
|
|
|
|
//公众号进入值
|
|
|
|
accountId: '',
|
|
|
|
//个人码key
|
|
|
|
gasKey: '',
|
|
|
|
//个人码code
|
|
|
|
staffCode: '',
|
|
|
|
//公众号菜单区分
|
|
|
|
accountType: '',
|
|
|
|
//区分肯德基 星巴克
|
|
|
|
distinguishid: '',
|
|
|
|
//千猪下单数据
|
|
|
|
qianzhulist: '',
|
|
|
|
//星巴克价格
|
|
|
|
salesTallPrice: '',
|
|
|
|
//第三方嵌入id
|
|
|
|
mchId: '',
|
|
|
|
//千猪名称
|
|
|
|
qianzhuCityName: '重庆市',
|
|
|
|
//团油数据
|
|
|
|
pelletoilList: ''
|
|
|
|
|
|
|
|
},
|
|
|
|
onLaunch: function() {},
|
|
|
|
onShow: function() {
|
|
|
|
// #ifdef H5
|
|
|
|
let that = this;
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'openId',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.openId = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'user',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.userInfo = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'token',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.token = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'accountId',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.accountId = e.data;
|
|
|
|
that.globalData.accountType = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'gasKey',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.gasKey = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'staffCode',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
if (that.globalData.accountId == '000001&key' || that.globalData.accountId ==
|
|
|
|
'000000&gasKey' || that.globalData.accountId == '000009&key' || that.globalData
|
|
|
|
.accountId == '0000010&key') {
|
|
|
|
that.globalData.staffCode = e.data;
|
|
|
|
} else {
|
|
|
|
that.globalData.mchId = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'cityId',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.cityId = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'cityName',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.cityName = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'qianzhuCityName',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.qianzhuCityName = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'companyId',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.companyId = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'latitude',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.latitude = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
uni.getStorage({
|
|
|
|
key: 'longitude',
|
|
|
|
success(e) {
|
|
|
|
if (e.data) {
|
|
|
|
that.globalData.longitude = e.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
// #endif
|
|
|
|
},
|
|
|
|
onHide: function() {}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
/*每个页面公共css */
|
|
|
|
@import "/static/iconfont/font.scss";
|
|
|
|
</style>
|