瀏覽代碼

点击头像授权

dev
HolyKnightIX 2 年之前
父節點
當前提交
a1ada3dd91
共有 7 個文件被更改,包括 357 次插入369 次删除
  1. +0
    -3
      .vscode/settings.json
  2. +3
    -3
      ext.json
  3. +27
    -23
      index/user.js
  4. +31
    -22
      index/user.ttml
  5. +11
    -11
      pages/getPhone/getPhone.js
  6. +263
    -249
      pages/getuserinfo/getuserinfo.js
  7. +22
    -58
      project.config.json

+ 0
- 3
.vscode/settings.json 查看文件

@@ -1,3 +0,0 @@
{
"bytedanceMiniappIDE.previewScene": "default"
}

+ 3
- 3
ext.json 查看文件

@@ -3,15 +3,15 @@
"attr": {
"configUrl": "https://c.malls.iformall.com/C/api"
},
"name": "沧州吾悦广场",
"weappId": "tt9f35e988000a035401"
"name": "创美优团",
"weappId": "tt15d463698aebb83b01"
},
"window": {
"backgroundTextStyle": "light",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fff"
},
"extAppid": "tt9f35e988000a035401",
"extAppid": "tt15d463698aebb83b01",
"extEnable": true,
"directCommit": false,
"networkTimeout": {


+ 27
- 23
index/user.js 查看文件

@@ -10,7 +10,7 @@ Page({
text: "授权手机号",
avatarUrl: "",
nickName: "",
mouldType:1,
mouldType: 1,
},
showPhoemBtn() {

@@ -23,7 +23,7 @@ Page({
let url = e.currentTarget.dataset.url
console.log(url);
if (url == '/pages/order/index/index?id=all') {
app.globalData.ifshowtab=false
app.globalData.ifshowtab = false
tt.navigateTo({
url: url,
success: (res) => {
@@ -92,29 +92,36 @@ Page({
})
tt.reLaunch({
url: "/index/index",
success(res) {
console.log(`${res}`);
app.globalData.selected = 0
},
fail(err) {
console.log(`navigateTo调用失败`,err);
},
success(res) {
console.log(`${res}`);
app.globalData.selected = 0
},
fail(err) {
console.log(`navigateTo调用失败`, err);
},
});
// tt.showToast({
// title: '取消授权', // 内容
// icon: 'none', // 图标
// success: (res) => {
// },
// fail: (res) => {

// },
// });
},

goSetUserInfo() {
tt.navigateTo({
url: '/pages/getuserinfo/getuserinfo?mineFlag=mine',
});
},

onShow: function (options) {
this.setData({
mouldType:app.globalData.mouldType
mouldType: app.globalData.mouldType
})
this.getmemberId()
Http.get({
@@ -127,30 +134,27 @@ Page({
url: config.api.checkPhoneStatus,
}).then(res => {
this.setData({
text:res.data.phone
text: res.data.phone
})
}).catch(err => {
if(app.globalData.ifCongPh==1){
if (app.globalData.ifCongPh == 1) {
tt.navigateTo({
url: '/pages/getPhone/getPhone?mineFlag=mine',
});
}else{
} else {
this.setData({
showPhoem:true
showPhoem: true
})
}
})
}).catch(err => {

if (err.code == 11004) {//未授权抖音
if (err.code == 11004) { //未授权抖音
app.globalData.type = 'uc'
tt.navigateTo({
url: '/pages/getuserinfo/getuserinfo',

url: '/pages/getuserinfo/getuserinfo?mineFlag=mine',
});

}
})
}

+ 31
- 22
index/user.ttml 查看文件

@@ -4,29 +4,36 @@
<navbar tt:if="{{mouldType!=1}}" text="我的" background='#FD832D' color="#fff"></navbar> -->
<!-- <view style="height:{{navigationBarHeight}} "></view> -->
<view class="{{mouldType==1?'userBg1':'userBg'}}">
<view class="userLogo" style="{{mouldType==1?'':'background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);'}}">
<image style="width: 100%;height:100%;border-radius: 50%;" src="{{avatarUrl}}" />
<view class="userLogo"
style="{{mouldType==1?'':'background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);'}}">
<image style="width: 100%;height:100%;border-radius: 50%;" src="{{avatarUrl}}" bindtap="goSetUserInfo" />
<!-- <open-data class="open" type="userAvatarUrl"></open-data> -->
</view>
<view class="userData" style="{{mouldType==1?'#000':'#ffffff'}}">
<view class="noInfo" >{{nickName}}</view>
<view class="noInfo">{{nickName}}</view>
<!-- <open-data class="noInfo" type="userNickName"></open-data> -->
<view class="{{mouldType==1?'infoX':'info'}}" bindtap="showPhoemBtn">{{text}}</view>
<view class="{{mouldType==1?'infoX':'info'}}" bindtap="showPhoemBtn">{{text}}</view>
</view>
</view>
<view class="tempBpx">
<view class="functionBox">

<view class="itemBox" bindtap="go" data-url="/pages/edit/edit">
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userInfo.png" /></view>
<view class="itemBox" bindtap="go" data-url="/pages/edit/edit">
<view class="itemLogoBox">
<image class="itemLogo" src="../assets/images/userInfo.png" />
</view>
<view class="itemNAme">个人信息</view>
</view>
<view class="itemBox" bindtap="go" data-url="/pages/order/index/index?id=all">
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userDd.png" /></view>
<view class="itemLogoBox">
<image class="itemLogo" src="../assets/images/userDd.png" />
</view>
<view class="itemNAme">我的订单</view>
</view>
<view class="itemBox" bindtap="go" data-url="/pages/couponorder/index/index">
<view class="itemLogoBox"><image class="itemLogo" src="../assets/images/userQuan.png" /></view>
<view class="itemLogoBox">
<image class="itemLogo" src="../assets/images/userQuan.png" />
</view>
<view class="itemNAme">我的券包</view>
</view>
<!-- <view class="itemBox" bindtap="go" data-url="/pages/integralmall/index">
@@ -35,9 +42,9 @@
</view> -->
</view>
</view>
<view class="moreBox">
<view class="fuwu">更多服务</view>
<view class="fuwu">更多服务</view>
<view class="fuwuItemBox">
<!-- <view class="fuwuItem">
<navigator class="fuwuLogoBox" url="/pages/complaint/complaint" hover-class="navigator-hover" open-type="navigate">
@@ -45,36 +52,38 @@
</navigator>
<view class="fuwuName">投诉建议</view>
</view> -->
<!-- <navigator class="fuwuItem" url="/pages/questionnaire/questionnaireLsit/questionnaireLsit" hover-class="navigator-hover" open-type="navigate">
<view class="fuwuLogoBox f" >
<image class="itemLogo" src="../assets/images/wenquan.png" />
</view>
<view class="fuwuName f">问卷调查</view>
</navigator> -->
<navigator class="fuwuItem" url="/pages/mallInfo/mallInfo" hover-class="navigator-hover" open-type="navigate">
<view class="fuwuLogoBox f" >
<image class="itemLogo" src="../assets/images/mian1.png" />
<navigator class="fuwuItem" url="/pages/mallInfo/mallInfo" hover-class="navigator-hover"
open-type="navigate">
<view class="fuwuLogoBox f">
<image class="itemLogo" src="../assets/images/mian1.png" />
</view>
<view class="fuwuName f">关于我们</view>
</navigator>

<button class="fuwuItem" open-type="contact">
<view class="fuwuLogoBox f" >
<image class="itemLogo" src="../assets/images/service1.png" />
<view class="fuwuLogoBox f">
<image class="itemLogo" src="../assets/images/service1.png" />
</view>
<view class="fuwuName f">在线客服</view>
</button>

<navigator class="fuwuItem" url="/pages/certification/certification" hover-class="navigator-hover" open-type="navigate">
<view class="fuwuLogoBox f" >
<image class="itemLogo" src="../assets/images/aptitude1.png" />
<navigator class="fuwuItem" url="/pages/certification/certification" hover-class="navigator-hover"
open-type="navigate">
<view class="fuwuLogoBox f">
<image class="itemLogo" src="../assets/images/aptitude1.png" />
</view>
<view class="fuwuName f">服务资质</view>
</navigator>
</view>
</view>
<phoem showBox="{{showPhoem}}" bind:hiePhoen="setPhone" bind:heiBox="setBox"></phoem>
</view>
<tabbar/>
</view>
<tabbar />

+ 11
- 11
pages/getPhone/getPhone.js 查看文件

@@ -16,7 +16,7 @@ Page({
couponId: "",
// skip: app.globalData.skip
},
onLoad: function(options) {
onLoad: function (options) {

var that = this;
console.log(options.skipUrl, "options.skipUrl")
@@ -44,7 +44,7 @@ Page({
});
}

if (options && options.mineFlag) {
if (options && options.mineFlag) {
that.setData({
mineFlag: options.mineFlag
})
@@ -77,7 +77,7 @@ Page({
});
})
},
onShow: function() {
onShow: function () {
tt.checkSession({
success() {
//session_key 未过期,并且在本生命周期一直有效
@@ -105,15 +105,15 @@ Page({
}
})
},
backHome(){
backHome() {
console.log("我调用的返回");
tt.navigateBack({
delta: 1,
success: (res) => {
},
fail: (res) => {
},
});

@@ -122,11 +122,11 @@ Page({
// success: (res) => {
// },
// fail: (res) => {
// },
// });
},
getPhoneNumber: function(e) {
getPhoneNumber: function (e) {
var that = this;
var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData;
@@ -137,7 +137,7 @@ Page({
iv: iv
}
}).then(res => {
app.globalData.phone = res.data.phone;
if (that.data.skipUrl == '1') {
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址")
@@ -161,7 +161,7 @@ Page({
url: app.globalData.skipUrl,
})
return;
}else if (app.globalData.skip == 'navigateBack') {
} else if (app.globalData.skip == 'navigateBack') {
tt.navigateBack({
delta: 1,
})
@@ -251,7 +251,7 @@ Page({
tt.showToast({
title: res.data.msg,
icon: "success",
success: function(res) {
success: function (res) {
if (that.data.couponChannelId) {
tt.redirectTo({
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay"


+ 263
- 249
pages/getuserinfo/getuserinfo.js 查看文件

@@ -13,13 +13,13 @@ Page({
optionData: null,
fromflag: '',
couponChannelIdflag: '',
confirmationFlag:'',
confirmationFlag: '',
wjId: "",
composeOrderType: "",
fillIndentId: "",
url: null,//游戏路径
id: null,//游戏id,
gameId: null,//游戏gameId
url: null, //游戏路径
id: null, //游戏id,
gameId: null, //游戏gameId
},

backHome() {
@@ -32,10 +32,10 @@ Page({
tt.reLaunch({
url: "/index/index",
success: (res) => {
},
fail: (res) => {
},
});
},
@@ -75,29 +75,29 @@ Page({
}

}).catch(err => {
if(app.globalData.ifCongPh==1){
if (app.globalData.ifCongPh == 1) {
tt.redirectTo({
url: `/pages/getPhone/getPhone?skipUrl=1`
});
}else{
} else {
tt.navigateBack({
delta: 1,
})
}
})
},
onLoad: function (options) {
console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址")
var that = this;
// options.fromflag == 'coupondetail';
// 游戏页面
if (options && options.url && options.id && options.gameId) {
that.setData({
url: options.url,//游戏路径
id: options.id,//游戏id,
gameId: options.gameId,//游戏gameId
url: options.url, //游戏路径
id: options.id, //游戏id,
gameId: options.gameId, //游戏gameId
})
}
// 来自优惠券详情页面
@@ -136,6 +136,13 @@ Page({
wjId: options.wjId
})
}
// 我的
if (options && options.mineFlag) {
console.log(11111);
that.setData({
mineFlag: options.mineFlag
})
}
if (options && options.spellGroup) {
that.setData({
spellGroup: options.spellGroup
@@ -184,18 +191,18 @@ Page({
})
}
Http.get({
url: config.api.marketicon,
data: {
appId: app.globalData.appId
}
}).then(res => {
that.setData({
mallImgUrl: res.data.mallImgUrl
});
tt.setNavigationBarTitle({
title: res.data.mallName
url: config.api.marketicon,
data: {
appId: app.globalData.appId
}
}).then(res => {
that.setData({
mallImgUrl: res.data.mallImgUrl
});
tt.setNavigationBarTitle({
title: res.data.mallName
})
})
})
.catch(err => {
tt.showToast({
title: err.errMsg,
@@ -246,241 +253,248 @@ Page({
// console.log(res,"数据");
// return
tt.login({
success:(res=>{
let {code} = res
console.log(code,"code");
success: (res => {
let {
code
} = res
console.log(code, "code");
Http.post({
url:config.api.login,
data:{
code:code,
appId:app.globalData.appId,
systemInfo:JSON.stringify(app.globalData.systemInfo)
url: config.api.login,
data: {
code: code,
appId: app.globalData.appId,
systemInfo: JSON.stringify(app.globalData.systemInfo)
}
}).then(res=>{
}).then(res => {
Http.setToken(res.data.token);
app.globalData.token = res.data.token
Http.post({
url: config.api.getUserInfo,
data: {
encryptedData: encryptedData,
iv: iv
}
}).then(res => {
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;
}
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'
url: config.api.getUserInfo,
data: {
encryptedData: encryptedData,
iv: iv
}
}).then(res => {
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()
} 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}`
return;
}
if (that.data.wjId) {
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}`
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}`
return;
}
if (that.data.mineFlag) {
app.globalData.skipUrl = `/index/user`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
return;
}
// 报名活动
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'
if (that.data.fromflag == 'poster') {
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}`
app.globalData.skip = 'redirectTo'
that.judgePhonelngo()
return;
}
// 报名签到
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'
//

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;
}
// 门店详情
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'
if (that.data.path == 'index') {
app.globalData.skipUrl = "/pages/game/index"
app.globalData.skip = 'reLaunch'
that.judgePhonelngo()
}
// 通过分享进入的门店详情页面
else if (that.data.id && that.data.frommd == 'md') {
app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`,
} 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.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}`,
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}`
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 {
// 标准格式
app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`,
}
// 报名签到
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()
}
} 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 = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'in') {
// 首页
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'redirectTo'
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'
that.judgePhonelngo()
} else if (app.globalData.type == 'pc') {
// 停车
app.globalData.skipUrl = '/index/passCar',
app.globalData.skip = 'redirectTo'
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 = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'confirmation' && that.data.confirmationFlag) {
//订单确认 confirmation
app.globalData.skipUrl = `/pages/coupon/confirmation/confirmation?couponChannelId=${that.data.confirmationFlag}`,
app.globalData.skip = 'redirectTo'
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,
// 门店详情
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()
}
// 通过分享进入的门店详情页面
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 = 'redirectTo'
that.judgePhonelngo()
} else if (app.globalData.type == 'in') {
// 首页
app.globalData.skipUrl = app.globalData.goHomeUrl,
app.globalData.skip = 'redirectTo'
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()
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 = 'redirectTo'
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 = 'redirectTo'
that.judgePhonelngo()
} else if (that.data.fromflag == 'confirmation' && that.data.confirmationFlag) {
//订单确认 confirmation
app.globalData.skipUrl = `/pages/coupon/confirmation/confirmation?couponChannelId=${that.data.confirmationFlag}`,
app.globalData.skip = 'redirectTo'
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 = 'redirectTo'
that.judgePhonelngo()
}
}
}
})
})
.catch(err => {
tt.showToast({
title: err.code,
@@ -489,8 +503,8 @@ Page({
mask: false
});
})
}).catch(err=>{
}).catch(err => {
console.log(err);
tt.showModal({
title: '提示',
@@ -508,11 +522,11 @@ Page({
}
});
})
}),
});


},
@@ -524,16 +538,16 @@ Page({
getGameOne: function (token, id) {
let _this = this;
Http.get({
url: config.api.getOneGame,
data: {
token: token,
id: id
}
}).then(res => {
tt.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 => {
tt.redirectTo({
url: '/pages/game/index?url=' + res.data.url + "&id=" + res.data.id + "&gameId=" + res.data.gameId,
})
})
})
.catch(err => {
tt.showModal({
title: '提示',


+ 22
- 58
project.config.json 查看文件

@@ -1,60 +1,24 @@
{
"setting": {
"urlCheck": true,
"es6": true,
"newFeature": false,
"postcss": false,
"mockUpdate": true,
"minified": false,
"autoPush": false,
"scripts": false,
"mockLogin": false,
"autoCompile": true,
"localPlugins": false,
"IDEPreviewHotRestartCache": false
},
"appid": "ttde7ca8c141425a2301",
"projectname": "tt富茂C",
"condition": {
"miniprogram": {
"current": -1,
"list": [{
"id": 1650610427387,
"name": "华莱士",
"pathName": "pages/main/index?type=cd&couponChannelId=123467",
"query": "couponChannelId=676951389111508992",
"scene": "990001",
"launchFrom": "scan",
"location": "qr_code"
},
{
"id": 1649905362371,
"name": "add",
"pathName": "pages/main/index",
"query": "couponChannelId=702061614111186944&type=orderAffirm",
"scene": "990001",
"launchFrom": "scan",
"location": "qr_code"
},
{
"id": 1657681080086,
"name": "手机号授权",
"pathName": "pages/main/index",
"query": "couponChannelId=710372266050117632&type=cd",
"scene": "990001",
"launchFrom": "scan",
"location": "qr_code"
},
{
"id": 1665480010958,
"name": "pages/coupon/detail/index",
"pathName": "pages/coupon/detail/index",
"query": "",
"scene": "",
"launchFrom": "",
"location": ""
}
]
}
"setting": {
"urlCheck": false,
"es6": true,
"newFeature": false,
"postcss": false,
"mockUpdate": true,
"minified": false,
"autoPush": false,
"scripts": false,
"mockLogin": false,
"autoCompile": true,
"localPlugins": false,
"IDEPreviewHotRestartCache": false
},
"appid": "ttde7ca8c141425a2301",
"projectname": "tt富茂C",
"condition": {
"miniprogram": {
"current": -1,
"list": []
}
}
}
}

Loading…
取消
儲存