Explorar el Código

upload

soldDate
HolyKnightIX hace 1 año
padre
commit
c2b172f411
Se han modificado 1 ficheros con 6 adiciones y 68 borrados
  1. +6
    -68
      pages/coupon/detail/index.js

+ 6
- 68
pages/coupon/detail/index.js Ver fichero

@@ -484,7 +484,7 @@ Page({
* 获取用户信息
*/
onLoad(options) {
if (app.globalData.token) {
const dealData = options => {
console.log(options, 'options');
if (options.mallTenantId || options.tenantId) {
tt.setStorageSync('locationSwitch', 0);
@@ -552,75 +552,13 @@ Page({
cardType: options.cardType
})
}
}

if (app.globalData.token) {
dealData(options)
} else {
app.tokenCallback = token => {
console.log(options, 'options');
if (options.mallTenantId || options.tenantId) {
tt.setStorageSync('locationSwitch', 0);
this.setData({
mallTenantId: options.mallTenantId || options.tenantId,
})
}

Http.get({
url: '/mall/subMall?isAll=1',
}).then(res => {
console.log(res.data, 'subMall');
const mallList = res.data
mallList.forEach((item, index) => {
if (item.tenantId == (options.mallTenantId || options.tenantId)) {
tt.setStorageSync('mallTenantId', options.mallTenantId || options.tenantId)
tt.setStorageSync('mallIndex', index)
}
})
}).catch(err => {})

this.setData({
mouldType: app.globalData.mouldType,
})
let that = this;
if (options.g) {
app.globalData.havePlayEd1 = true;
}
tt.showLoading({
title: "加载中..."
});
that.setData({
onshow: false
})
if (options && (options.couponChannelId || options.couponIds)) {

if (options.couponIds) {
this.setData({
couponIds: options.couponIds
})
that.getDetail(options.couponIds, 'notendclock');
} else {
that.getDetail(options.couponChannelId, 'notendclock');
that.getSupId(options.couponChannelId)
}


}
/**
* 转赠判断
*/
if (options.cuserId) {
this.setData({
showCardOffer: true,
cardData: options
})
this.getUserInfo()
}
that.setData({
couponChannelId: options.couponChannelId,
title: that.data.data.title ? that.data.data.title : '',
});
if (options.cardType) {
that.setData({
cardType: options.cardType
})
}
dealData(options)
}

}


Cargando…
Cancelar
Guardar