| @@ -9,6 +9,7 @@ | |||||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"), | url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"), | ||||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg"); | url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg"); | ||||
| } | } | ||||
| .iconfont { | .iconfont { | ||||
| font-family: "iconfont" !important; | font-family: "iconfont" !important; | ||||
| font-size: 36rpx; | font-size: 36rpx; | ||||
| @@ -14,9 +14,13 @@ Component({ | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| gotoGg: function (e) { | gotoGg: function (e) { | ||||
| console.log(this.data.ggdata) | |||||
| let that = this; | let that = this; | ||||
| wx.navigateTo({ | |||||
| /* wx.navigateTo({ | |||||
| url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId+'&g=1', | url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId+'&g=1', | ||||
| }) */ | |||||
| wx.navigateTo({ | |||||
| url: `/${that.data.ggdata.pagePath}&g=1`, | |||||
| }) | }) | ||||
| }, | }, | ||||
| a: function () { | a: function () { | ||||
| @@ -30,7 +30,8 @@ Component({ | |||||
| let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf); | let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf); | ||||
| let type = (e.currentTarget.dataset.data.pagePath).substr(23,2) | let type = (e.currentTarget.dataset.data.pagePath).substr(23,2) | ||||
| console.log(indexOf, id, type); | console.log(indexOf, id, type); | ||||
| if(type == 'cd'){ | |||||
| console.log(e.currentTarget.dataset.data.pagePath) | |||||
| if(type == 'cd' || type == 'sd'){ | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/${e.currentTarget.dataset.data.pagePath}`, | url: `/${e.currentTarget.dataset.data.pagePath}`, | ||||
| }) | }) | ||||
| @@ -30,11 +30,42 @@ Component({ | |||||
| /** | /** | ||||
| * 显示分享海报 | * 显示分享海报 | ||||
| */ | */ | ||||
| showPoster: function() { | |||||
| /* showPoster: function() { | |||||
| //跳转到海报生成页 | //跳转到海报生成页 | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/canvas/index?merchantId=${this.data.id}` | url: `/pages/canvas/index?merchantId=${this.data.id}` | ||||
| }) | }) | ||||
| }, */ | |||||
| showPoster: function() { | |||||
| //跳转到海报生成页 | |||||
| console.log(this.data.fromflag) | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| wx.navigateTo({ | |||||
| url: `/pages/canvas/index?couponChannelId=${that.data.id}` | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| // 用户昵称未授权 | |||||
| wx.redirectTo({ | |||||
| url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster` | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -1,24 +1,38 @@ | |||||
| { | { | ||||
| "ext": { | "ext": { | ||||
| "attr": { | "attr": { | ||||
| "car": { | |||||
| "etcp": { | |||||
| "etcpAppId": "wxc07f9d67923d676d", | |||||
| "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||||
| "payPath": "pages/pay/order-pay-open/main" | |||||
| }, | |||||
| "tjd": { | |||||
| "tjdAppId": "wx6945d1bda68d7993", | |||||
| "payPath": "" | |||||
| }, | |||||
| "bolink": { | |||||
| "bolinkAppId": "wxbd08b4baa10fcc1d", | |||||
| "payPath": "pages/park/park" | |||||
| }, | |||||
| "version": "release" | |||||
| }, | |||||
| "imgProxy": [ | "imgProxy": [ | ||||
| { | { | ||||
| "newUrl": "https://ctest.malls.iformall.com/img", | |||||
| "newUrl": "https://c.malls.iformall.com/img", | |||||
| "orgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn" | "orgUrl": "https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn" | ||||
| }, | }, | ||||
| { | { | ||||
| "newUrl": "https://ctest.malls.iformall.com/img1", | |||||
| "newUrl": "https://c.malls.iformall.com/img1", | |||||
| "orgUrl": "https://s3.cn-northwest-1.amazonaws.com.cn" | "orgUrl": "https://s3.cn-northwest-1.amazonaws.com.cn" | ||||
| }, | }, | ||||
| { | { | ||||
| "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", | |||||
| "etcpAppId": "wx192b7d2e8dcbefd0", | |||||
| "etcpVersion": "release", | |||||
| "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||||
| "configUrl": "https://c.malls.iformall.com/C/api", | |||||
| "ifStoreApp": "0", | |||||
| "ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
| "ifHaveCarModular": "1" | "ifHaveCarModular": "1" | ||||
| }, | }, | ||||
| @@ -10,7 +10,7 @@ const bgColor = require("../utils/bgColor.js") | |||||
| let app = getApp(); | let app = getApp(); | ||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| showLocationIf:true, | |||||
| showLocationIf: true, | |||||
| ifStoreApp: ifStoreApp, | ifStoreApp: ifStoreApp, | ||||
| navigationBarTitle: '首页', | navigationBarTitle: '首页', | ||||
| navigationBarHeight, | navigationBarHeight, | ||||
| @@ -19,7 +19,7 @@ Page({ | |||||
| qg: bgColor.colorFirst.main.qg, | qg: bgColor.colorFirst.main.qg, | ||||
| newUrl: "", | newUrl: "", | ||||
| cover: "", | cover: "", | ||||
| kanjia:imgurl.kanjia.url, | |||||
| kanjia: imgurl.kanjia.url, | |||||
| pintuan: imgurl.pintuan.url, | pintuan: imgurl.pintuan.url, | ||||
| xiaofeika: imgurl.xiaofeika.url, | xiaofeika: imgurl.xiaofeika.url, | ||||
| xingyun: imgurl.xingyun.url, | xingyun: imgurl.xingyun.url, | ||||
| @@ -51,7 +51,7 @@ Page({ | |||||
| duihuan: imgurl.duihuan.url, | duihuan: imgurl.duihuan.url, | ||||
| market: app.globalData.market, | market: app.globalData.market, | ||||
| list: [], | list: [], | ||||
| xslist:[], | |||||
| xslist: [], | |||||
| loading: true, | loading: true, | ||||
| fistLogin: null, | fistLogin: null, | ||||
| alphaData: null, | alphaData: null, | ||||
| @@ -64,24 +64,24 @@ Page({ | |||||
| scrollTop: 0, | scrollTop: 0, | ||||
| showGame: false, | showGame: false, | ||||
| showTopic: false, | showTopic: false, | ||||
| showQg:false, | |||||
| showQg: false, | |||||
| gamedata: {}, | gamedata: {}, | ||||
| couponId: '', //游戏返回时传回的字段 | couponId: '', //游戏返回时传回的字段 | ||||
| played: false, //从游戏页面跳回首页返回true | played: false, //从游戏页面跳回首页返回true | ||||
| havePlayEd: app.globalData.havePlayEd, | havePlayEd: app.globalData.havePlayEd, | ||||
| havePlayEd1:app.globalData.havePlayEd1, | |||||
| havePlayEd1: app.globalData.havePlayEd1, | |||||
| staticGamedata: {}, | staticGamedata: {}, | ||||
| showIf: false, | showIf: false, | ||||
| showPages: false, | showPages: false, | ||||
| display: 'none', | display: 'none', | ||||
| display1: 'none', | display1: 'none', | ||||
| optionsData: null, | optionsData: null, | ||||
| page: 1 ,// 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | |||||
| openId:'', | |||||
| page: 1, // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | |||||
| openId: '', | |||||
| showGg: false, | showGg: false, | ||||
| ggdata:{} | |||||
| ggdata: {} | |||||
| }, | }, | ||||
| 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 | ||||
| @@ -138,17 +138,17 @@ Page({ | |||||
| }, | }, | ||||
| gotogame: function() { | gotogame: function() { | ||||
| let that = this; | let that = this; | ||||
| if (!that.data.showIf){ | |||||
| if (!that.data.showIf) { | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: '暂无游戏频道', | title: '暂无游戏频道', | ||||
| icon:"none", | |||||
| duration:3000 | |||||
| icon: "none", | |||||
| duration: 3000 | |||||
| }) | }) | ||||
| }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, | ||||
| @@ -188,7 +188,7 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| mySpecial: function() { | mySpecial: function() { | ||||
| console.log("special"); | console.log("special"); | ||||
| @@ -204,12 +204,12 @@ Page({ | |||||
| let that = this; | let that = this; | ||||
| let optionss; | let optionss; | ||||
| let openId = wx.getStorageSync('openId') | let openId = wx.getStorageSync('openId') | ||||
| if(openId){ | |||||
| if (openId) { | |||||
| that.setData({ | that.setData({ | ||||
| openId:openId | |||||
| openId: openId | |||||
| }) | }) | ||||
| } | } | ||||
| if (wx.getStorageSync('options')){ | |||||
| if (wx.getStorageSync('options')) { | |||||
| optionss = JSON.parse(wx.getStorageSync('options')); | optionss = JSON.parse(wx.getStorageSync('options')); | ||||
| } | } | ||||
| if (options.played == "true") { | if (options.played == "true") { | ||||
| @@ -235,7 +235,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({ | ||||
| @@ -245,7 +245,7 @@ Page({ | |||||
| longitude: res.longitude | longitude: res.longitude | ||||
| } | } | ||||
| }).then(res => { | }).then(res => { | ||||
| console.log(res,9999) | |||||
| console.log(res, 9999) | |||||
| }) | }) | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -264,7 +264,7 @@ Page({ | |||||
| let that = this; | let that = this; | ||||
| that.setData({ | that.setData({ | ||||
| havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false, | havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false, | ||||
| havePlayEd1:app.globalData.havePlayEd1?app.globalData.havePlayEd1 : false | |||||
| havePlayEd1: app.globalData.havePlayEd1 ? app.globalData.havePlayEd1 : false | |||||
| }) | }) | ||||
| /** | /** | ||||
| @@ -294,14 +294,14 @@ Page({ | |||||
| 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; | |||||
| Http.get({ | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.getScore, | url: config.api.getScore, | ||||
| data: { | data: { | ||||
| token: token | token: token | ||||
| @@ -327,17 +327,17 @@ Page({ | |||||
| 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', | ||||
| }) | }) | ||||
| @@ -347,12 +347,12 @@ 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', | ||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| * | * | ||||
| * @param {code,page} | * @param {code,page} | ||||
| @@ -374,7 +374,7 @@ Page({ | |||||
| that.topicShow(); | that.topicShow(); | ||||
| that.getxsList(); | that.getxsList(); | ||||
| that.getMallInfo(app.globalData.token); | that.getMallInfo(app.globalData.token); | ||||
| if (app.couponChannelListCallback) { | if (app.couponChannelListCallback) { | ||||
| app.couponChannelListCallback(app.globalData.token); | app.couponChannelListCallback(app.globalData.token); | ||||
| } | } | ||||
| @@ -493,36 +493,36 @@ 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 | |||||
| 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({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | }); | ||||
| }else{ | |||||
| that.setData({ | |||||
| showQg:false | |||||
| }) | |||||
| } | |||||
| }) | |||||
| .catch(err => { | |||||
| console.log(err) | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * banner | * banner | ||||
| @@ -641,48 +641,48 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| //限时抢购的详情页面 | //限时抢购的详情页面 | ||||
| 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 | ||||
| }&couponId=${e.currentTarget.dataset.couponid}` | }&couponId=${e.currentTarget.dataset.couponid}` | ||||
| }); | }); | ||||
| }, | }, | ||||
| //浮层广告 | |||||
| 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: that.data.openId | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res) | |||||
| if (res.data.id) { | |||||
| url: config.api.getGg, | |||||
| data: { | |||||
| token: token, | |||||
| appId: config.weapp.AppId, | |||||
| openId: that.data.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({ | that.setData({ | ||||
| showGg: true, | |||||
| ggdata: res.data | |||||
| }) | }) | ||||
| console.log(that.data.showGg,1111111111111) | |||||
| } else { | |||||
| that.setData({ | |||||
| }) | |||||
| .catch(err => { | |||||
| this.setData({ | |||||
| showGg: false | showGg: false | ||||
| }) | }) | ||||
| that.getGameOne(app.globalData.token) | that.getGameOne(app.globalData.token) | ||||
| console.log(that.data.showGg,222222222222222222) | |||||
| } | |||||
| that.setData({ | |||||
| ggdata: res.data | |||||
| that.alphaClick1(); | |||||
| }) | }) | ||||
| }) | |||||
| .catch(err => { | |||||
| this.setData({ | |||||
| showGg: false | |||||
| }) | |||||
| that.getGameOne(app.globalData.token) | |||||
| that.alphaClick1(); | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 刷新 | * 刷新 | ||||
| @@ -104,11 +104,38 @@ Page({ | |||||
| /** | /** | ||||
| * 显示分享海报 | * 显示分享海报 | ||||
| */ | */ | ||||
| showPoster: function() { | |||||
| /* showPoster: function() { | |||||
| //跳转到海报生成页 | //跳转到海报生成页 | ||||
| console.log(this.data.canIUse) | |||||
| // return; | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/canvas/index?couponChannelId=${this.data.data.id}` | url: `/pages/canvas/index?couponChannelId=${this.data.data.id}` | ||||
| }) | }) | ||||
| }, */ | |||||
| showPoster: function() { | |||||
| //跳转到海报生成页 | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| wx.navigateTo({ | |||||
| url: `/pages/canvas/index?couponChannelId=${that.data.data.id}` | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| // 用户昵称未授权 | |||||
| wx.redirectTo({ | |||||
| url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster` | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| swiperChange: function (e) { | swiperChange: function (e) { | ||||
| this.setData({ | this.setData({ | ||||
| @@ -117,6 +117,14 @@ Page({ | |||||
| }) | }) | ||||
| .then( | .then( | ||||
| function (res) { | function (res) { | ||||
| // debugger; | |||||
| if (that.data.fromflag == 'poster') { | |||||
| wx.redirectTo({ | |||||
| url: `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
| }) | |||||
| return; | |||||
| } | |||||
| // | |||||
| if (that.data.optionData.orderGroupId){ | if (that.data.optionData.orderGroupId){ | ||||
| wx.reLaunch({ | wx.reLaunch({ | ||||
| url: `/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}` | url: `/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}` | ||||
| @@ -129,7 +137,8 @@ Page({ | |||||
| }); | }); | ||||
| } else { | } 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||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
| if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
| // 跳转普通券/消费卡/限时秒杀/砍价详情 | // 跳转普通券/消费卡/限时秒杀/砍价详情 | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | ||||
| @@ -130,6 +130,7 @@ Page({ | |||||
| }, | }, | ||||
| checkuserstatus(options) { | checkuserstatus(options) { | ||||
| let that = this; | let that = this; | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
| data: { | data: { | ||||
| @@ -137,6 +138,8 @@ Page({ | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||||
| //参与拼团 | //参与拼团 | ||||
| if (options && options.orderGroupId) { | if (options && options.orderGroupId) { | ||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| @@ -160,7 +163,7 @@ Page({ | |||||
| }) | }) | ||||
| }) | }) | ||||
| } else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') { | } else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') { | ||||
| console.log(3333333333333333) | |||||
| // 转赠判断 | // 转赠判断 | ||||
| if (options.cuserId) { | if (options.cuserId) { | ||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| @@ -94,11 +94,35 @@ Page({ | |||||
| /** | /** | ||||
| * 显示分享海报 | * 显示分享海报 | ||||
| */ | */ | ||||
| showPoster: function() { | |||||
| /* showPoster: function() { | |||||
| //跳转到海报生成页 | //跳转到海报生成页 | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/canvas/index?merchantId=${this.data.id}` | url: `/pages/canvas/index?merchantId=${this.data.id}` | ||||
| }) | }) | ||||
| }, */ | |||||
| showPoster: function() { | |||||
| //跳转到海报生成页 | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| wx.navigateTo({ | |||||
| url: `/pages/canvas/index?couponChannelId=${that.data.id}` | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| // 用户昵称未授权 | |||||
| wx.redirectTo({ | |||||
| url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster` | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }, | }, | ||||
| //点击切换 | //点击切换 | ||||
| clickTab: function(e) { | clickTab: function(e) { | ||||
| @@ -17,7 +17,7 @@ Page({ | |||||
| cardList: [], | cardList: [], | ||||
| arrays: [], | arrays: [], | ||||
| showModel: false, | showModel: false, | ||||
| showInput:false, | |||||
| showInput: false, | |||||
| ids: "", | ids: "", | ||||
| wmyes: imgurl.wmyes.url, | wmyes: imgurl.wmyes.url, | ||||
| wmclose: imgurl.wmclose.url | wmclose: imgurl.wmclose.url | ||||
| @@ -79,7 +79,7 @@ Page({ | |||||
| ids: "", | ids: "", | ||||
| remainingAmount: that.data.remainingAmounts | remainingAmount: that.data.remainingAmounts | ||||
| }) | }) | ||||
| if(err.errCode==90008||err.errCode == 90009){ | |||||
| if (err.errCode == 90008 || err.errCode == 90009) { | |||||
| // 90009 指纹验证失败 | // 90009 指纹验证失败 | ||||
| // 90008 用户已取消 | // 90008 用户已取消 | ||||
| wx.showModal({ | wx.showModal({ | ||||
| @@ -87,7 +87,7 @@ Page({ | |||||
| showCancel: false, | showCancel: false, | ||||
| content: '指纹验证后才能支付' | content: '指纹验证后才能支付' | ||||
| }) | }) | ||||
| }else{ | |||||
| } else { | |||||
| that.gotoPay(); | that.gotoPay(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -193,7 +193,7 @@ Page({ | |||||
| } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | ||||
| that.setData({ | that.setData({ | ||||
| showModel: true, | showModel: true, | ||||
| showInput:'disabled' | |||||
| showInput: 'disabled' | |||||
| }) | }) | ||||
| that.getList(); | that.getList(); | ||||
| console.log("1111") | console.log("1111") | ||||
| @@ -68,11 +68,37 @@ Page({ | |||||
| /** | /** | ||||
| * 显示分享海报 | * 显示分享海报 | ||||
| */ | */ | ||||
| showPoster: function() { | |||||
| /* showPoster: function() { | |||||
| //跳转到海报生成页 | //跳转到海报生成页 | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/canvas/index?couponChannelId=${this.data.data.id}` | url: `/pages/canvas/index?couponChannelId=${this.data.data.id}` | ||||
| }) | }) | ||||
| }, */ | |||||
| showPoster: function() { | |||||
| console.log(this.data.data) | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.checkUserStatus, | |||||
| data: { | |||||
| token: app.globalData.token | |||||
| } | |||||
| }).then(res => { | |||||
| wx.navigateTo({ | |||||
| url: `/pages/canvas/index?couponChannelId=${that.data.data.id}` | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| if (err.code == 11004) { | |||||
| // 用户昵称未授权 | |||||
| wx.redirectTo({ | |||||
| url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster` | |||||
| }) | |||||
| } | |||||
| }) | |||||
| //跳转到海报生成页 | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 显示分享弹框 | * 显示分享弹框 | ||||