Browse Source

“我的”页面弹框

newCard
HolyKnightIX 2 years ago
parent
commit
2fe88db406
3 changed files with 275 additions and 244 deletions
  1. +25
    -1
      index/user.js
  2. +11
    -3
      pages/getphoneInfo/index.js
  3. +239
    -240
      pages/getuserinfo/index.js

+ 25
- 1
index/user.js View File

@@ -109,6 +109,7 @@ Page({
}).then(res => { }).then(res => {
return return
}).catch(err => { }).catch(err => {
wx.setStorageSync('ifSetUserInfo', 1)
wx.navigateTo({ wx.navigateTo({
url: `/pages/getphoneInfo/index?mineFlag=mine`, url: `/pages/getphoneInfo/index?mineFlag=mine`,
}) })
@@ -167,7 +168,7 @@ Page({
url: '/pages3/setUserInfo/index' url: '/pages3/setUserInfo/index'
}) })
}, },
onLoad() {
onLoad(options) {
// this.getLocation(); // this.getLocation();
this.updateScene(); this.updateScene();
// this.getRoomId(); // this.getRoomId();
@@ -241,7 +242,30 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
const ifSetUserInfo = wx.getStorageSync('ifSetUserInfo') || 0
if (ifSetUserInfo) {
wx.showModal({
title: '完善个人信息',
content: '完善个人信息后可获得积分哦',
showCancel: true,
cancelText: "以后再说",
cancelColor: '',
confirmText: "去完善",
confirmColor: '#FD832D',
complete: (res) => {
if (res.cancel) {
console.log('cancel');
}


if (res.confirm) {
wx.setStorageSync('ifSetUserInfo', 0)
wx.navigateTo({
url: '/pages3/setUserInfo/index',
})
}
}
})
}
if (businessSwitch) { if (businessSwitch) {
let openId = wx.getStorageSync("openId") let openId = wx.getStorageSync("openId")
this.setData({ this.setData({


+ 11
- 3
pages/getphoneInfo/index.js View File

@@ -170,6 +170,7 @@ Page({
* 来自我的 * 来自我的
*/ */
if (that.data.path == 'main') { if (that.data.path == 'main') {

wx.switchTab({ wx.switchTab({
url: `/index/user` url: `/index/user`
}) })
@@ -219,6 +220,7 @@ Page({
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}`
}) })
} else if (that.data.mineFlag == 'mine') { } else if (that.data.mineFlag == 'mine') {

wx.switchTab({ wx.switchTab({
url: '/index/user' url: '/index/user'
}); });
@@ -245,9 +247,15 @@ Page({
url: '/pages3/setUserInfo/index', url: '/pages3/setUserInfo/index',
}) })
} else { } else {
wx.switchTab({
url: '/index/passCar',
})
if (options.mineFlag == "mine") {
wx.switchTab({
url: '/index/user'
});
} else {
wx.switchTab({
url: '/index/passCar',
})
}
} }
} }
} }


+ 239
- 240
pages/getuserinfo/index.js View File

@@ -17,8 +17,8 @@ Page({
wjId: "", wjId: "",
composeOrderType: "", composeOrderType: "",
fillIndentId: "", fillIndentId: "",
url:null,//游戏路径
id:null,//游戏id,
url: null,//游戏路径
id: null,//游戏id,
gameId: null,//游戏gameId gameId: null,//游戏gameId
}, },
//是否授权手机号 //是否授权手机号
@@ -45,21 +45,20 @@ Page({
url: app.globalData.skipUrl, url: app.globalData.skipUrl,
}) })
} }

}).catch(err => { }).catch(err => {
wx.redirectTo({ wx.redirectTo({
url: `/pages/getphoneInfo/index?skipUrl=1` url: `/pages/getphoneInfo/index?skipUrl=1`
}); });
})
})
}, },
onLoad: function(options) {
onLoad: function (options) {


console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址")
var that = this; var that = this;
// options.fromflag == 'coupondetail'; // options.fromflag == 'coupondetail';


// 游戏页面 // 游戏页面
if (options && options.url && options.id && options.gameId){
if (options && options.url && options.id && options.gameId) {
that.setData({ that.setData({
url: options.url,//游戏路径 url: options.url,//游戏路径
id: options.id,//游戏id, id: options.id,//游戏id,
@@ -144,18 +143,18 @@ Page({
}) })
} }
Http.get({ Http.get({
url: config.api.marketicon,
data: {
appId: config.weapp.AppId
}
}).then(res => {
that.setData({
mallImgUrl: res.data.mallImgUrl
});
wx.setNavigationBarTitle({
title: res.data.mallName
})
url: config.api.marketicon,
data: {
appId: config.weapp.AppId
}
}).then(res => {
that.setData({
mallImgUrl: res.data.mallImgUrl
});
wx.setNavigationBarTitle({
title: res.data.mallName
}) })
})
.catch(err => { .catch(err => {
wx.showToast({ wx.showToast({
title: err.errMsg, title: err.errMsg,
@@ -165,7 +164,7 @@ Page({
}); });
}) })
}, },
onShow: function() {
onShow: function () {
wx.checkSession({ wx.checkSession({
success() { success() {
//session_key 未过期,并且在本生命周期一直有效 //session_key 未过期,并且在本生命周期一直有效
@@ -193,7 +192,7 @@ Page({
} }
}) })
}, },
backHome: function() {
backHome: function () {


wx.switchTab({ wx.switchTab({
url: app.globalData.goHomeUrl, url: app.globalData.goHomeUrl,
@@ -210,238 +209,238 @@ Page({
var iv = res.iv; var iv = res.iv;
var encryptedData = res.encryptedData; var encryptedData = res.encryptedData;
wx.getUserInfo({ wx.getUserInfo({
success: function(res) {
success: function (res) {
Http.post({ Http.post({
url: config.api.getUserInfo,
data: {
encryptedData: encryptedData,
iv: iv
url: config.api.getUserInfo,
data: {
encryptedData: encryptedData,
iv: iv
}
}).then(
function (res) {
// wx.showToast({
// title: "授权个人信息成功11",
// icon: "none"
// });
if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url) {//游戏页面
app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
return;
}
if (that.data.wjId) {
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
return;
} }
}).then(
function(res) {
// wx.showToast({
// title: "授权个人信息成功11",
// icon: "none"
// });
if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url){//游戏页面
app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId,
if (that.data.fromflag == 'poster') {
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
return;
}
//

if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") {
app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}`
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
return;
}
if (that.data.path == 'index') {
app.globalData.skipUrl = "/pages/game/index"
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
} else {
//返回主页
// if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') {
if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') {
// 跳转普通券/消费卡/限时秒杀/砍价详情
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'navigateTo'
that.judgePhonelngo()
} else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') {
// 来自转赠
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}`
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
} else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) {
// 拼团详情页
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
return;
}
if (that.data.wjId) {
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}`
} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') {
// 游戏页面
that.getGameOne(app.globalData.token, that.data.optionData.id)

} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') {
app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}`
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
return;
} }
if (that.data.fromflag == 'poster') {
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo'
// 报名活动
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') {
app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
return;
} }
//

if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") {
app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}`
app.globalData.skip = 'reLaunch'
// 报名签到
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') {
app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
return;
} }
if (that.data.path == 'index') {
app.globalData.skipUrl = "/pages/game/index"
app.globalData.skip = 'reLaunch'
// 门店详情
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') {
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
} else {
//返回主页
// if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') {
if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') {
// 跳转普通券/消费卡/限时秒杀/砍价详情
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'navigateTo'
that.judgePhonelngo()
} else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') {
// 来自转赠
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}`
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
} else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) {
// 拼团详情页
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') {
// 游戏页面
that.getGameOne(app.globalData.token, that.data.optionData.id)

} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'td') {
app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}`
}
// 通过分享进入的门店详情页面
else if (that.data.id && that.data.frommd == 'md') {
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`,
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
}
// 报名活动
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'ra') {
app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
}
// 报名签到
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'si') {
app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`,
that.judgePhonelngo()
} else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') {
// 宣传页详情
if (that.data.optionData != null && that.data.optionData.bt == '2') {
// 自由图文
app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
}
// 门店详情
else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'md') {
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`,
} else {
// 标准格式
app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo() that.judgePhonelngo()
} }
// 通过分享进入的门店详情页面
else if (that.data.id && that.data.frommd == 'md') {
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.optionData != null && that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') {
// 宣传页详情
if (that.data.optionData != null && that.data.optionData.bt == '2') {
// 自由图文
app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else {
// 标准格式
app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
}
} else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') {
// 参与砍价
app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`,
app.globalData.skip = 'navigateTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'uc') {
// 我的
app.globalData.skipUrl = '/index/user',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == 'in') {
// 首页
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == "qd") {
//每日签到
app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar"
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
} else if (app.globalData.type == "hdrl") {
//活动日历
app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}`
} else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') {
// 参与砍价
app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}&composeOrderType=${that.composeOrderType}`,
app.globalData.skip = 'navigateTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'uc') {
// 我的
app.globalData.skipUrl = '/index/user',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == 'in') {
// 首页
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == "qd") {
//每日签到
app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar"
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
} else if (app.globalData.type == "hdrl") {
//活动日历
app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
}
// 积分
else if (app.globalData.type == 'jf') {
app.globalData.skipUrl = '/pages/integralmall/index',
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
}
// 积分
else if (app.globalData.type == 'jf') {
app.globalData.skipUrl = '/pages/integralmall/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'pc') {
// 停车
app.globalData.skipUrl = '/index/passCar',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == 'mc') {
// 我的券包
app.globalData.skipUrl = '/pages/couponorder/index/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'mo') {
// 我的订单
app.globalData.skipUrl = '/pages/order/index/index?id=all',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ca') {
// 我的卡包
app.globalData.skipUrl = '/pages/cardorder/index/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'sc') {
// 特享礼遇
app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'rb') {
// 限时秒杀
app.globalData.skipUrl = '/pages/rushToBuy/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'bl') {
// 砍价专场
app.globalData.skipUrl = '/pages/bargain/bargain',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'mb') {
// 我的砍价
app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'sl') {
// 拼团专场
app.globalData.skipUrl = '/pages/spellGroup/spellGroup',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ms') {
// 我的拼团
app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'dc') {
// 消费卡
app.globalData.skipUrl = '/pages/discountCardList/discountCardList',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'td') {
// 专题活动页
app.globalData.skipUrl = '/pages/topicDetail/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ml') {
// 门店
app.globalData.skipUrl = '/index/searchbar',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) {
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) {
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) {
//线上配送 填写订单
app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else {
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
}
that.judgePhonelngo()
} else if (app.globalData.type == 'pc') {
// 停车
app.globalData.skipUrl = '/index/passCar',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (app.globalData.type == 'mc') {
// 我的券包
app.globalData.skipUrl = '/pages/couponorder/index/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'mo') {
// 我的订单
app.globalData.skipUrl = '/pages/order/index/index?id=all',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ca') {
// 我的卡包
app.globalData.skipUrl = '/pages/cardorder/index/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'sc') {
// 特享礼遇
app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'rb') {
// 限时秒杀
app.globalData.skipUrl = '/pages/rushToBuy/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'bl') {
// 砍价专场
app.globalData.skipUrl = '/pages/bargain/bargain',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'mb') {
// 我的砍价
app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'sl') {
// 拼团专场
app.globalData.skipUrl = '/pages/spellGroup/spellGroup',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ms') {
// 我的拼团
app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'dc') {
// 消费卡
app.globalData.skipUrl = '/pages/discountCardList/discountCardList',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'td') {
// 专题活动页
app.globalData.skipUrl = '/pages/topicDetail/index',
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'ml') {
// 门店
app.globalData.skipUrl = '/index/searchbar',
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) {
app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) {
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) {
//线上配送 填写订单
app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`,
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
} else {
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'switchTab'
that.judgePhonelngo()
} }

},
function(error) {
console.log(error)
wx.showToast({
title: "请授权个人信息",
icon: "none"
});
} }


)
},
function (error) {
console.log(error)
wx.showToast({
title: "请授权个人信息",
icon: "none"
});
}

)
.catch(err => { .catch(err => {
wx.showToast({ wx.showToast({
title: err.code, title: err.code,
@@ -458,25 +457,25 @@ Page({
}) })
}) })
}, },
getGameOne: function(token, id) {
getGameOne: function (token, id) {
let _this = this; let _this = this;
Http.get({ Http.get({
url: config.api.getOneGame,
data: {
token: token,
id: id
}
}).then(res => {
wx.redirectTo({
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId,
})
url: config.api.getOneGame,
data: {
token: token,
id: id
}
}).then(res => {
wx.redirectTo({
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId,
}) })
})
.catch(err => { .catch(err => {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: err.message, content: err.message,
showCancel: false, showCancel: false,
success: function(res) {
success: function (res) {
// 如果游戏下架或者找不到,重启首页 // 如果游戏下架或者找不到,重启首页
if (res.confirm) { if (res.confirm) {
wx.reLaunch({ wx.reLaunch({


Loading…
Cancel
Save