You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-mini/App.vue

187 lines
3.7 KiB

<script>
export default {
globalData: {
2 years ago
// 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/',
2 years ago
//测试
// 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/',
2 years ago
userInfo: "",
brestUserInfo: '',
bresthighAgent: '',
openId: '',
code: '',
2 years ago
token: '',
brestToken: '',
4 years ago
cityId: '',
2 years ago
cityName: '',
longitude: '',
latitude: '',
balancePrice: '',
balanceCardNo: '',
identificationCode: '',
//公司id
companyId: '',
2 years ago
// 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
},
2 years ago
onHide: function() {}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "/static/iconfont/font.scss";
</style>