@@ -2,35 +2,44 @@ | |||||
"ext": { | "ext": { | ||||
"attr": { | "attr": { | ||||
"car": { | "car": { | ||||
"tjd": { | |||||
"payPath": "", | |||||
"tjdAppId": "wx6945d1bda68d7993" | |||||
}, | |||||
"etcp": { | "etcp": { | ||||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||||
"etcpVersion": "release", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
} | |||||
"payPath": "pages/pay/order-pay-open/main", | |||||
"etcpAppId": "wxc07f9d67923d676d", | |||||
"etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
}, | |||||
"bolink": { | |||||
"payPath": "pages/park/park", | |||||
"bolinkAppId": "wxbd08b4baa10fcc1d" | |||||
}, | |||||
"version": "release" | |||||
}, | }, | ||||
"mchId": "1604439800", | |||||
"mchId": "", | |||||
"imgProxy": [ | "imgProxy": [ | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img", | |||||
"newUrl": "https://c.malls.iformall.com/img", | |||||
"orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img1", | |||||
"newUrl": "https://c.malls.iformall.com/img1", | |||||
"orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img2", | |||||
"newUrl": "https://c.malls.iformall.com/img2", | |||||
"orgUrl": "https://wx.qlogo.cn" | "orgUrl": "https://wx.qlogo.cn" | ||||
} | } | ||||
], | ], | ||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
"businessSwitch": "1", | |||||
"configUrl": "https://c.malls.iformall.com/C/api", | |||||
"ifStoreApp": "0", | |||||
"ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
"ifHaveCarModular": "1" | |||||
"ifHaveCarModular": "0" | |||||
}, | }, | ||||
"name": "金泸商务", | |||||
"weappId": "wx649b3be73c1afe47", | |||||
"appVersion": "C.test.5.2.0" | |||||
"name": "泊悦茂邻荟", | |||||
"weappId": "wx34aa0a9a9a55b810", | |||||
"appVersion": "C.5.1.1" | |||||
}, | }, | ||||
"debug": false, | "debug": false, | ||||
"tabBar": { | "tabBar": { | ||||
@@ -60,8 +69,7 @@ | |||||
"selectedIconPath": "assets/images/user-a.png" | "selectedIconPath": "assets/images/user-a.png" | ||||
} | } | ||||
], | ], | ||||
"color": "#abb1be", | |||||
"selectedColor": "#b2743d" | |||||
"custom": true | |||||
}, | }, | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "dark", | "backgroundTextStyle": "dark", | ||||
@@ -70,16 +78,9 @@ | |||||
"navigationBarBackgroundColor": "#FFFFFF" | "navigationBarBackgroundColor": "#FFFFFF" | ||||
}, | }, | ||||
"plugins": { | "plugins": { | ||||
"auto-points-plugin": { | |||||
"version": "1.3.0", | |||||
"provider": "wxfab2bf944bfc4da6" | |||||
}, | |||||
"live-player-plugin": { | |||||
"version": "1.2.5", | |||||
"provider": "wx2b03c6e691cd7370" | |||||
} | |||||
}, | }, | ||||
"extAppid": "wx649b3be73c1afe47", | |||||
"extAppid": "wx34aa0a9a9a55b810", | |||||
"extEnable": true, | "extEnable": true, | ||||
"permission": { | "permission": { | ||||
"scope.userLocation": { | "scope.userLocation": { | ||||
@@ -2,7 +2,7 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||||
let ifStoreApp = extConfig.attr.ifStoreApp; | let ifStoreApp = extConfig.attr.ifStoreApp; | ||||
let businessSwitch = extConfig.attr.businessSwitch | let businessSwitch = extConfig.attr.businessSwitch | ||||
let mch_id = extConfig.attr.mchId | let mch_id = extConfig.attr.mchId | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
@@ -13,10 +13,10 @@ let app = getApp(); | |||||
Page({ | Page({ | ||||
data: { | data: { | ||||
mch_id: mch_id, | mch_id: mch_id, | ||||
goUrl:"",//商圈跳转链接 | |||||
accreditFlag:1,//1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 | |||||
goUrl: "",//商圈跳转链接 | |||||
accreditFlag: 1,//1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 | |||||
businessSwitch: businessSwitch, | businessSwitch: businessSwitch, | ||||
typeLsit:{}, | |||||
typeLsit: {}, | |||||
showLocationIf: true, | showLocationIf: true, | ||||
ifStoreApp: ifStoreApp, | ifStoreApp: ifStoreApp, | ||||
navigationBarTitle: '首页', | navigationBarTitle: '首页', | ||||
@@ -94,58 +94,58 @@ Page({ | |||||
}, | }, | ||||
//判断用户是否授权 | //判断用户是否授权 | ||||
uesrInfo(){ | |||||
uesrInfo() { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
data: { | data: { | ||||
token: app.globalData.token | token: app.globalData.token | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
Http.get({ | |||||
url: config.api.checkPhoneStatus | |||||
}).then(res=>{//全部授权 | |||||
this.setData({ | |||||
accreditFlag: 3 | |||||
}) | |||||
}).catch(err => { | |||||
if(err.code==11005){//未授权手机号 | |||||
this.setData({ | |||||
accreditFlag: 2 | |||||
}) | |||||
}else{ | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
}).catch (err => { | |||||
if(err.code==11004){//未授权微信 | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus | |||||
}).then(res => {//全部授权 | |||||
this.setData({ | this.setData({ | ||||
accreditFlag:1 | |||||
accreditFlag: 3 | |||||
}) | }) | ||||
}else{ | |||||
}).catch(err => { | |||||
if (err.code == 11005) {//未授权手机号 | |||||
this.setData({ | |||||
accreditFlag: 2 | |||||
}) | |||||
} else { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.errMsg, | title: err.errMsg, | ||||
icon: 'none', | icon: 'none', | ||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
}); | }); | ||||
} | |||||
} | |||||
}) | |||||
}).catch(err => { | |||||
if (err.code == 11004) {//未授权微信 | |||||
this.setData({ | |||||
accreditFlag: 1 | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | }) | ||||
}, | }, | ||||
//获取当前广场名 | //获取当前广场名 | ||||
//跳转到每日签到 | //跳转到每日签到 | ||||
goSign(){ | |||||
goSign() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/activityCalendar/activityCalendar', | url: '/pages/activityCalendar/activityCalendar', | ||||
}) | }) | ||||
}, | }, | ||||
//活动日历 | //活动日历 | ||||
goCalendar(){ | |||||
goCalendar() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/dateLsit/dateLsit', | url: '/pages/dateLsit/dateLsit', | ||||
}) | }) | ||||
@@ -161,7 +161,7 @@ Page({ | |||||
url: '/pages2/live/livelist/index', | url: '/pages2/live/livelist/index', | ||||
}) | }) | ||||
}, | }, | ||||
alphaClick1: function(even) { | |||||
alphaClick1: function (even) { | |||||
var animation = wx.createAnimation({}) | var animation = wx.createAnimation({}) | ||||
animation.opacity(0).step({ | animation.opacity(0).step({ | ||||
duration: 2000 | duration: 2000 | ||||
@@ -170,7 +170,7 @@ Page({ | |||||
alphaData: animation.export() | alphaData: animation.export() | ||||
}) | }) | ||||
}, | }, | ||||
alphaClick: function(even) { | |||||
alphaClick: function (even) { | |||||
var animation = wx.createAnimation({}) | var animation = wx.createAnimation({}) | ||||
animation.opacity(0).step({ | animation.opacity(0).step({ | ||||
duration: 2000 | duration: 2000 | ||||
@@ -180,23 +180,23 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
// 我的卡包 | // 我的卡包 | ||||
mycard: function() { | |||||
mycard: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/cardorder/index/index', | url: '/pages/cardorder/index/index', | ||||
}) | }) | ||||
}, | }, | ||||
//我的券包 | //我的券包 | ||||
mycoupon: function() { | |||||
mycoupon: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/couponorder/index/index', | url: '/pages/couponorder/index/index', | ||||
}) | }) | ||||
}, | }, | ||||
gotoSpellGroup: function() { | |||||
gotoSpellGroup: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/spellGroup/spellGroup', | url: '/pages/spellGroup/spellGroup', | ||||
}) | }) | ||||
}, | }, | ||||
qrcode: function() { | |||||
qrcode: function () { | |||||
var that = this; | var that = this; | ||||
let memberId = that.data.memberId; | let memberId = that.data.memberId; | ||||
if (memberId) { | if (memberId) { | ||||
@@ -206,17 +206,17 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
//跳往限时秒杀 | //跳往限时秒杀 | ||||
gotoRushBuy: function() { | |||||
gotoRushBuy: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/rushToBuy/index', | url: '/pages/rushToBuy/index', | ||||
}) | }) | ||||
}, | }, | ||||
swiperChange: function(e) { | |||||
swiperChange: function (e) { | |||||
this.setData({ | this.setData({ | ||||
swiperCurrent: e.detail.current | swiperCurrent: e.detail.current | ||||
}); | }); | ||||
}, | }, | ||||
gotogame: function() { | |||||
gotogame: function () { | |||||
let that = this; | let that = this; | ||||
if (!that.data.showIf) { | if (!that.data.showIf) { | ||||
wx.showToast({ | wx.showToast({ | ||||
@@ -226,9 +226,9 @@ Page({ | |||||
}) | }) | ||||
} else { | } else { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}) | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
@@ -270,7 +270,7 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
mySpecial: function() { | |||||
mySpecial: function () { | |||||
console.log("special"); | console.log("special"); | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/specialcourtesy/specialcourtesy', | url: '/pages/specialcourtesy/specialcourtesy', | ||||
@@ -294,11 +294,11 @@ Page({ | |||||
getType() { | getType() { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.setType, | url: config.api.setType, | ||||
data:{} | |||||
}).then(res=>{ | |||||
const{code ,data}=res | |||||
if(code==200){ | |||||
app.globalData.typeLsit=data | |||||
data: {} | |||||
}).then(res => { | |||||
const { code, data } = res | |||||
if (code == 200) { | |||||
app.globalData.typeLsit = data | |||||
this.setData({ | this.setData({ | ||||
typeLsit: data, | typeLsit: data, | ||||
}) | }) | ||||
@@ -308,9 +308,9 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
onLoad: function(options) { | |||||
onLoad: function (options) { | |||||
let that = this; | let that = this; | ||||
let optionss; | let optionss; | ||||
@@ -334,7 +334,7 @@ Page({ | |||||
//获取条形码 | //获取条形码 | ||||
// util.barcode("barcode", optionss.quancode, 510, 100); | // util.barcode("barcode", optionss.quancode, 510, 100); | ||||
// console.log(Http.headers.token, "?") | // console.log(Http.headers.token, "?") | ||||
}, | }, | ||||
/** | /** | ||||
* 获得经纬度 | * 获得经纬度 | ||||
@@ -343,7 +343,7 @@ Page({ | |||||
let that = this; | let that = this; | ||||
wx.getLocation({ | wx.getLocation({ | ||||
type: "wgs84", | type: "wgs84", | ||||
success: function(res) { | |||||
success: function (res) { | |||||
console.log(res, 9999) | console.log(res, 9999) | ||||
if (res && res.longitude && res.latitude) { | if (res && res.longitude && res.latitude) { | ||||
Http.post({ | Http.post({ | ||||
@@ -397,7 +397,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onShow: function() { | |||||
onShow: function () { | |||||
this.uesrInfo() | this.uesrInfo() | ||||
if (businessSwitch) { | if (businessSwitch) { | ||||
let openId = wx.getStorageSync("openId") | let openId = wx.getStorageSync("openId") | ||||
@@ -405,11 +405,11 @@ Page({ | |||||
goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | ||||
}) | }) | ||||
} | } | ||||
if(JSON.stringify(app.globalData.styleLsit)!="{}"){ | |||||
if (JSON.stringify(app.globalData.styleLsit) != "{}") { | |||||
this.setTabStyle() | this.setTabStyle() | ||||
} | } | ||||
this.ifShowSqare(); | this.ifShowSqare(); | ||||
if (wx.getStorageSync("squareList")) { | if (wx.getStorageSync("squareList")) { | ||||
var temp = wx.getStorageSync("squareList").filter(item => item.tenantId == wx.getStorageSync("selectedMall"))[0].name | var temp = wx.getStorageSync("squareList").filter(item => item.tenantId == wx.getStorageSync("selectedMall"))[0].name | ||||
@@ -452,30 +452,30 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
// 如果有游戏 | // 如果有游戏 | ||||
setTimeout(function() { | |||||
setTimeout(function () { | |||||
that.alphaClick(); | that.alphaClick(); | ||||
}, 8000) | }, 8000) | ||||
// 如果有广告 | // 如果有广告 | ||||
setTimeout(function() { | |||||
setTimeout(function () { | |||||
// debugger | // debugger | ||||
that.alphaClick1(); | that.alphaClick1(); | ||||
}, 8000) | }, 8000) | ||||
}, | }, | ||||
getmemberId: function(token) { | |||||
getmemberId: function (token) { | |||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getScore, | |||||
data: { | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
levelName: res.data.levelName, | |||||
upgradePercent: res.data.upgradePercent, | |||||
upgradeScore: res.data.upgradeScore, | |||||
memberId: res.data.id, | |||||
}) | |||||
url: config.api.getScore, | |||||
data: { | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
levelName: res.data.levelName, | |||||
upgradePercent: res.data.upgradePercent, | |||||
upgradeScore: res.data.upgradeScore, | |||||
memberId: res.data.id, | |||||
}) | }) | ||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
wx.showModal({ | wx.showModal({ | ||||
title: '提示', | title: '提示', | ||||
@@ -484,22 +484,22 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
gotoChengzhangzhi: function() { | |||||
gotoChengzhangzhi: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/czdetail/czdetail', | url: '/pages/czdetail/czdetail', | ||||
}) | }) | ||||
}, | }, | ||||
gotoBargain: function() { | |||||
gotoBargain: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/bargain/bargain', | url: '/pages/bargain/bargain', | ||||
}) | }) | ||||
}, | }, | ||||
gotoSpellGroup: function() { | |||||
gotoSpellGroup: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/spellGroup/spellGroup', | url: '/pages/spellGroup/spellGroup', | ||||
}) | }) | ||||
}, | }, | ||||
gotoCard: function() { | |||||
gotoCard: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/discountCardList/discountCardList', | url: '/pages/discountCardList/discountCardList', | ||||
}) | }) | ||||
@@ -509,7 +509,7 @@ Page({ | |||||
// url: '/pages/game/index', | // url: '/pages/game/index', | ||||
// }) | // }) | ||||
// }, | // }, | ||||
gotoJfsc: function() { | |||||
gotoJfsc: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/integralmall/index', | url: '/pages/integralmall/index', | ||||
}) | }) | ||||
@@ -520,7 +520,7 @@ Page({ | |||||
* @param {code,page} | * @param {code,page} | ||||
* 子组件向父组件传值 | * 子组件向父组件传值 | ||||
*/ | */ | ||||
onGetCode: function(e) { | |||||
onGetCode: function (e) { | |||||
this.setData({ | this.setData({ | ||||
code: e.detail.val, | code: e.detail.val, | ||||
page: e.detail.pageNum, | page: e.detail.pageNum, | ||||
@@ -528,7 +528,7 @@ Page({ | |||||
console.log(e.detail.val) | console.log(e.detail.val) | ||||
console.log(e.detail.pageNum) | console.log(e.detail.pageNum) | ||||
}, | }, | ||||
getWeapNote: function(couponChannelId, couponId, orderId) { | |||||
getWeapNote: function (couponChannelId, couponId, orderId) { | |||||
var that = this; | var that = this; | ||||
if (app.globalData.token) { | if (app.globalData.token) { | ||||
@@ -553,11 +553,11 @@ Page({ | |||||
app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
} | } | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
console.log(33333333333) | console.log(33333333333) | ||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
@@ -606,11 +606,11 @@ Page({ | |||||
app.businessListCallback(app.globalData.token); | app.businessListCallback(app.globalData.token); | ||||
} | } | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
console.log(33333333333) | console.log(33333333333) | ||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
@@ -643,26 +643,26 @@ Page({ | |||||
getStaticGame(token) { | getStaticGame(token) { | ||||
let _this = this; | let _this = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getGame, | |||||
data: { | |||||
triggleAction: 2, // 固定入口 | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
if (res.data.id) { | |||||
_this.setData({ | |||||
showIf: true, | |||||
newUrl: res.data.imgUrl | |||||
}) | |||||
} else { | |||||
_this.setData({ | |||||
showIf: false | |||||
}) | |||||
} | |||||
url: config.api.getGame, | |||||
data: { | |||||
triggleAction: 2, // 固定入口 | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
if (res.data.id) { | |||||
_this.setData({ | _this.setData({ | ||||
staticGamedata: res.data | |||||
showIf: true, | |||||
newUrl: res.data.imgUrl | |||||
}) | }) | ||||
} else { | |||||
_this.setData({ | |||||
showIf: false | |||||
}) | |||||
} | |||||
_this.setData({ | |||||
staticGamedata: res.data | |||||
}) | }) | ||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
_this.setData({ | _this.setData({ | ||||
showIf: false | showIf: false | ||||
@@ -670,28 +670,28 @@ Page({ | |||||
console.log(err) | console.log(err) | ||||
}) | }) | ||||
}, | }, | ||||
getGameOne: function(token) { | |||||
getGameOne: function (token) { | |||||
let _this = this; | let _this = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getGame, | |||||
data: { | |||||
triggleAction: 1, // 登录触发 | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
if (res.data.id) { | |||||
_this.setData({ | |||||
showGame: true, | |||||
}) | |||||
} else { | |||||
_this.setData({ | |||||
showGame: false | |||||
}) | |||||
} | |||||
url: config.api.getGame, | |||||
data: { | |||||
triggleAction: 1, // 登录触发 | |||||
token: token | |||||
} | |||||
}).then(res => { | |||||
if (res.data.id) { | |||||
_this.setData({ | |||||
showGame: true, | |||||
}) | |||||
} else { | |||||
_this.setData({ | _this.setData({ | ||||
gamedata: res.data | |||||
showGame: false | |||||
}) | }) | ||||
} | |||||
_this.setData({ | |||||
gamedata: res.data | |||||
}) | }) | ||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
_this.setData({ | _this.setData({ | ||||
showGame: false | showGame: false | ||||
@@ -702,21 +702,21 @@ Page({ | |||||
/** | /** | ||||
* mallinfo | * mallinfo | ||||
*/ | */ | ||||
getMallInfo: function(token) { | |||||
getMallInfo: function (token) { | |||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getMallInfo, | |||||
data: { | |||||
token: token, | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
liveFlag: res.data.liveSupport, | |||||
weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, | |||||
weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, | |||||
}); | |||||
console.log(that.data.liveFlag, "||||") | |||||
}) | |||||
url: config.api.getMallInfo, | |||||
data: { | |||||
token: token, | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
liveFlag: res.data.liveSupport, | |||||
weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, | |||||
weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, | |||||
}); | |||||
console.log(that.data.liveFlag, "||||") | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
// 不需要错误提示 | // 不需要错误提示 | ||||
}); | }); | ||||
@@ -725,24 +725,24 @@ Page({ | |||||
getxsList() { | getxsList() { | ||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.couponChannelList, | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 3, | |||||
targetAd: 2 | |||||
} | |||||
}).then(res => { | |||||
if (res && res.data.total > 0) { | |||||
that.setData({ | |||||
xslist: res.data.list, | |||||
showQg: true | |||||
}); | |||||
} else { | |||||
that.setData({ | |||||
showQg: false | |||||
}) | |||||
} | |||||
}) | |||||
url: config.api.couponChannelList, | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 3, | |||||
targetAd: 2 | |||||
} | |||||
}).then(res => { | |||||
if (res && res.data.total > 0) { | |||||
that.setData({ | |||||
xslist: res.data.list, | |||||
showQg: true | |||||
}); | |||||
} else { | |||||
that.setData({ | |||||
showQg: false | |||||
}) | |||||
} | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
console.log(err) | console.log(err) | ||||
wx.showToast({ | wx.showToast({ | ||||
@@ -756,48 +756,48 @@ Page({ | |||||
/** | /** | ||||
* banner | * banner | ||||
*/ | */ | ||||
getBannerlist: function() { | |||||
getBannerlist: function () { | |||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.bannerlist, | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 7 | |||||
} | |||||
}).then(res => { | |||||
that.getmemberId(app.globalData.token); | |||||
// that.checkUserCarStatus(); | |||||
that.setData({ | |||||
list: res.data.list | |||||
}); | |||||
}) | |||||
url: config.api.bannerlist, | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 7 | |||||
} | |||||
}).then(res => { | |||||
that.getmemberId(app.globalData.token); | |||||
// that.checkUserCarStatus(); | |||||
that.setData({ | |||||
list: res.data.list | |||||
}); | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
// that.checkUserCarStatus(); | // that.checkUserCarStatus(); | ||||
}); | }); | ||||
}, | }, | ||||
// 专题显示 | // 专题显示 | ||||
topicShow: function() { | |||||
topicShow: function () { | |||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.topicShow, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res => { | |||||
if (res && res.data) { | |||||
that.setData({ | |||||
name: res.data.name, | |||||
cover: res.data.cover, | |||||
id: res.data.id, | |||||
showTopic: true | |||||
}) | |||||
} else { | |||||
that.setData({ | |||||
showTopic: false | |||||
}) | |||||
} | |||||
}) | |||||
url: config.api.topicShow, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res => { | |||||
if (res && res.data) { | |||||
that.setData({ | |||||
name: res.data.name, | |||||
cover: res.data.cover, | |||||
id: res.data.id, | |||||
showTopic: true | |||||
}) | |||||
} else { | |||||
that.setData({ | |||||
showTopic: false | |||||
}) | |||||
} | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
console.log(err); | console.log(err); | ||||
}) | }) | ||||
@@ -864,13 +864,13 @@ Page({ | |||||
// } | // } | ||||
// }); | // }); | ||||
// }, | // }, | ||||
gotoBargain: function() { | |||||
gotoBargain: function () { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/bargain/bargain' | url: '/pages/bargain/bargain' | ||||
}) | }) | ||||
}, | }, | ||||
//限时抢购的详情页面 | //限时抢购的详情页面 | ||||
gotodetail: function(e) { | |||||
gotodetail: function (e) { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/coupon/detail/index?couponChannelId=${ | url: `/pages/coupon/detail/index?couponChannelId=${ | ||||
e.currentTarget.dataset.couponchannelid | e.currentTarget.dataset.couponchannelid | ||||
@@ -878,34 +878,34 @@ Page({ | |||||
}); | }); | ||||
}, | }, | ||||
//浮层广告 | //浮层广告 | ||||
getGg: function(token) { | |||||
getGg: function (token) { | |||||
let that = this | let that = this | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getGg, | |||||
data: { | |||||
token: token, | |||||
appId: config.weapp.AppId, | |||||
openId: "" // wx.getStorageSync('openId') | |||||
} | |||||
}).then(res => { | |||||
console.log(res) | |||||
if (res.data.id) { | |||||
that.setData({ | |||||
showGg: true, | |||||
}) | |||||
console.log(that.data.showGg, 1111111111111) | |||||
} else { | |||||
that.setData({ | |||||
showGg: false | |||||
}) | |||||
that.getGameOne(app.globalData.token) | |||||
console.log(that.data.showGg, 222222222222222222) | |||||
} | |||||
url: config.api.getGg, | |||||
data: { | |||||
token: token, | |||||
appId: config.weapp.AppId, | |||||
openId: "" // wx.getStorageSync('openId') | |||||
} | |||||
}).then(res => { | |||||
console.log(res) | |||||
if (res.data.id) { | |||||
that.setData({ | |||||
showGg: true, | |||||
}) | |||||
console.log(that.data.showGg, 1111111111111) | |||||
} else { | |||||
that.setData({ | that.setData({ | ||||
ggdata: res.data | |||||
showGg: false | |||||
}) | }) | ||||
that.getGameOne(app.globalData.token) | |||||
console.log(that.data.showGg, 222222222222222222) | |||||
} | |||||
that.setData({ | |||||
ggdata: res.data | |||||
}) | }) | ||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
this.setData({ | this.setData({ | ||||
showGg: false | showGg: false | ||||
@@ -917,7 +917,7 @@ Page({ | |||||
/** | /** | ||||
* 刷新 | * 刷新 | ||||
*/ | */ | ||||
onPullDownRefresh: function(e) { | |||||
onPullDownRefresh: function (e) { | |||||
let that = this; | let that = this; | ||||
that.getWeapNote(); | that.getWeapNote(); | ||||
that.setData({ | that.setData({ | ||||
@@ -946,7 +946,7 @@ Page({ | |||||
that.topicShow(); | that.topicShow(); | ||||
}, | }, | ||||
//加载更多 | //加载更多 | ||||
onReachBottom: function() { | |||||
onReachBottom: function () { | |||||
let that = this; | let that = this; | ||||
that.data.page++; | that.data.page++; | ||||
that.setData({ | that.setData({ | ||||
@@ -963,13 +963,13 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
// 用户点击右上角分享 | // 用户点击右上角分享 | ||||
onShareAppMessage: function() { | |||||
onShareAppMessage: function () { | |||||
app.globalData.previewFlag = true | app.globalData.previewFlag = true | ||||
return { | return { | ||||
title: this.data.weappShareTitle, | title: this.data.weappShareTitle, | ||||
imageUrl: this.data.weappShareCoverImg, | imageUrl: this.data.weappShareCoverImg, | ||||
// desc: this.data.desc, | // desc: this.data.desc, | ||||
success: function(res) { | |||||
success: function (res) { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: "分享成功", | title: "分享成功", | ||||
duration: 1000, | duration: 1000, | ||||
@@ -14,8 +14,8 @@ Page({ | |||||
skipUrl: 0, | skipUrl: 0, | ||||
// skip: app.globalData.skip | // skip: app.globalData.skip | ||||
}, | }, | ||||
onLoad: function(options) { | |||||
onLoad: function (options) { | |||||
var that = this; | var that = this; | ||||
console.log(options.skipUrl, "options.skipUrl") | console.log(options.skipUrl, "options.skipUrl") | ||||
that.setData({ | that.setData({ | ||||
@@ -45,18 +45,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, | ||||
@@ -66,134 +66,134 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
backHome: function() { | |||||
backHome: function () { | |||||
wx.switchTab({ | wx.switchTab({ | ||||
url: '/index/index', | url: '/index/index', | ||||
}) | }) | ||||
}, | }, | ||||
getPhoneNumber: function(e) { | |||||
getPhoneNumber: function (e) { | |||||
var that = this; | var that = this; | ||||
var iv = e.detail.iv; | var iv = e.detail.iv; | ||||
var encryptedData = e.detail.encryptedData; | var encryptedData = e.detail.encryptedData; | ||||
Http.post({ | Http.post({ | ||||
url: config.api.getUserPhone, | |||||
data: { | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | |||||
}).then(res => { | |||||
app.globalData.phone = res.data.phone; | |||||
if (that.data.skipUrl == '1') { | |||||
console.log(app.globalData.skip,app.globalData.skipUrl,"跳转地址" ) | |||||
if (app.globalData.skip == 'redirectTo') { | |||||
wx.redirectTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'navigateTo') { | |||||
wx.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'reLaunch') { | |||||
wx.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'switchTab') { | |||||
wx.switchTab({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} | |||||
} | |||||
// 来着问卷 | |||||
if (that.data.path =="wj"){ | |||||
url: config.api.getUserPhone, | |||||
data: { | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | |||||
}).then(res => { | |||||
app.globalData.phone = res.data.phone; | |||||
if (that.data.skipUrl == '1') { | |||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||||
if (app.globalData.skip == 'redirectTo') { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/**a | |||||
* 来自我的 | |||||
*/ | |||||
if (that.data.path == 'main') { | |||||
wx.switchTab({ | |||||
url: `/index/user` | |||||
} else if (app.globalData.skip == 'navigateTo') { | |||||
wx.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/** | |||||
* 来自积分兑换 | |||||
*/ | |||||
if (that.data.path == 'jifen') { | |||||
wx.redirectTo({ | |||||
url: `/pages/integralmall/payIntegcoupondetail/index?couponChannelId=${that.data.paramData.couponChannelId}&couponId=${that.data.paramData.couponId}` | |||||
} else if (app.globalData.skip == 'reLaunch') { | |||||
wx.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/** | |||||
* 来自拼团详情 | |||||
*/ | |||||
if (that.data.path == 'spell') { | |||||
if (that.data.paramData.avatarUrl) { | |||||
wx.redirectTo({ | |||||
url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}` | |||||
}) | |||||
} else { | |||||
wx.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}` | |||||
}) | |||||
} | |||||
} else if (app.globalData.skip == 'switchTab') { | |||||
wx.switchTab({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | return; | ||||
} | } | ||||
/** | |||||
* fromId若存在来自卡转赠 | |||||
*/ | |||||
if (that.data.path == 'index' && !that.data.paramData.cuserId) { | |||||
} | |||||
// 来着问卷 | |||||
if (that.data.path == "wj") { | |||||
wx.redirectTo({ | |||||
url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
}) | |||||
return; | |||||
} | |||||
/**a | |||||
* 来自我的 | |||||
*/ | |||||
if (that.data.path == 'main') { | |||||
wx.switchTab({ | |||||
url: `/index/user` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自积分兑换 | |||||
*/ | |||||
if (that.data.path == 'jifen') { | |||||
wx.redirectTo({ | |||||
url: `/pages/integralmall/payIntegcoupondetail/index?couponChannelId=${that.data.paramData.couponChannelId}&couponId=${that.data.paramData.couponId}` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自拼团详情 | |||||
*/ | |||||
if (that.data.path == 'spell') { | |||||
if (that.data.paramData.avatarUrl) { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, | |||||
url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}` | |||||
}) | }) | ||||
} else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||||
} else { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}` | |||||
}) | }) | ||||
} | } | ||||
/** | |||||
* 活动报名 | |||||
*/ | |||||
else if (that.data.signActivity) { | |||||
wx.redirectTo({ | |||||
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | |||||
}) | |||||
} else if (that.data.mineFlag == 'mine') { | |||||
wx.switchTab({ | |||||
url: '/index/user' | |||||
}); | |||||
} else if (that.data.mineFlag == 'index'){ | |||||
wx.switchTab({ | |||||
url: '/index/index' | |||||
}); | |||||
}else { | |||||
wx.showToast({ | |||||
title: res.data.msg, | |||||
icon: "success", | |||||
success: function(res) { | |||||
if (that.data.couponChannelId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||||
}) | |||||
} else { | |||||
wx.switchTab({ | |||||
url: '/index/passCar', | |||||
}) | |||||
} | |||||
return; | |||||
} | |||||
/** | |||||
* fromId若存在来自卡转赠 | |||||
*/ | |||||
if (that.data.path == 'index' && !that.data.paramData.cuserId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, | |||||
}) | |||||
} else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||||
}) | |||||
} | |||||
/** | |||||
* 活动报名 | |||||
*/ | |||||
else if (that.data.signActivity) { | |||||
wx.redirectTo({ | |||||
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | |||||
}) | |||||
} else if (that.data.mineFlag == 'mine') { | |||||
wx.switchTab({ | |||||
url: '/index/user' | |||||
}); | |||||
} else if (that.data.mineFlag == 'index') { | |||||
wx.switchTab({ | |||||
url: '/index/index' | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: res.data.msg, | |||||
icon: "success", | |||||
success: function (res) { | |||||
if (that.data.couponChannelId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||||
}) | |||||
} else { | |||||
wx.switchTab({ | |||||
url: '/index/passCar', | |||||
}) | |||||
} | } | ||||
}); | |||||
} | |||||
}) | |||||
} | |||||
}); | |||||
} | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | title: err.message, | ||||
@@ -47,7 +47,7 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
onLoad: function(options) { | |||||
onLoad: function (options) { | |||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | ||||
var that = this; | var that = this; | ||||
// options.fromflag == 'coupondetail'; | // options.fromflag == 'coupondetail'; | ||||
@@ -117,18 +117,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, | ||||
@@ -138,7 +138,7 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
backHome: function() { | |||||
backHome: function () { | |||||
wx.switchTab({ | wx.switchTab({ | ||||
url: '/index/index', | url: '/index/index', | ||||
@@ -386,222 +386,222 @@ 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) { | |||||
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; | |||||
} | } | ||||
}).then( | |||||
function(res) { | |||||
if (that.data.wjId) { | |||||
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
// | |||||
if (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.fromflag == 'poster') { | |||||
app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
} else if (that.data.optionData.id && app.globalData.type == 'gm') { | |||||
// 游戏页面 | |||||
that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
} else if (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.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.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.path == 'index') { | |||||
app.globalData.skipUrl = "/pages/game/index" | |||||
app.globalData.skip = 'reLaunch' | |||||
// 报名签到 | |||||
else if (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() | ||||
} 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}` | |||||
} | |||||
// 门店详情 | |||||
else if (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' | app.globalData.skip = 'redirectTo' | ||||
that.judgePhonelngo() | |||||
} else if (that.data.optionData.id && app.globalData.type == 'gm') { | |||||
// 游戏页面 | |||||
that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
} else if (that.data.optionData.id && app.globalData.type == 'td') { | |||||
app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
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' | app.globalData.skip = 'redirectTo' | ||||
that.judgePhonelngo() | |||||
} | |||||
// 报名活动 | |||||
else if (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.id && app.globalData.type == 'si') { | |||||
app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
that.judgePhonelngo() | |||||
} else if (that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
// 宣传页详情 | |||||
if (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.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.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
// 宣传页详情 | |||||
if (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}`, | |||||
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 = '/index/index', | |||||
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}`, | |||||
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 = '/index/index', | |||||
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 { | |||||
app.globalData.skipUrl = "/index/index", | |||||
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 { | |||||
app.globalData.skipUrl = "/index/index", | |||||
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.errMsg, | title: err.errMsg, | ||||
@@ -616,25 +616,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({ | ||||
@@ -31,8 +31,8 @@ | |||||
"userConfirmedUseCompilerModuleSwitch": false | "userConfirmedUseCompilerModuleSwitch": false | ||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.16.0", | |||||
"appid": "wxfa336cad86ed598d", | |||||
"libVersion": "2.15.0", | |||||
"appid": "wx453ae0d37f3550d0", | |||||
"projectname": "oldC", | "projectname": "oldC", | ||||
"isGameTourist": false, | "isGameTourist": false, | ||||
"simulatorType": "wechat", | "simulatorType": "wechat", | ||||