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