| @@ -9,6 +9,7 @@ | |||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"), | |||
| url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg"); | |||
| } | |||
| .iconfont { | |||
| font-family: "iconfont" !important; | |||
| font-size: 36rpx; | |||
| @@ -14,9 +14,13 @@ Component({ | |||
| }, | |||
| methods: { | |||
| gotoGg: function (e) { | |||
| console.log(this.data.ggdata) | |||
| let that = this; | |||
| wx.navigateTo({ | |||
| /* wx.navigateTo({ | |||
| url: '/pages/coupon/detail/index?couponChannelId=' + e.currentTarget.dataset.data.produceId+'&g=1', | |||
| }) */ | |||
| wx.navigateTo({ | |||
| url: `/${that.data.ggdata.pagePath}&g=1`, | |||
| }) | |||
| }, | |||
| a: function () { | |||
| @@ -30,7 +30,8 @@ Component({ | |||
| let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf); | |||
| let type = (e.currentTarget.dataset.data.pagePath).substr(23,2) | |||
| console.log(indexOf, id, type); | |||
| if(type == 'cd'){ | |||
| console.log(e.currentTarget.dataset.data.pagePath) | |||
| if(type == 'cd' || type == 'sd'){ | |||
| wx.navigateTo({ | |||
| url: `/${e.currentTarget.dataset.data.pagePath}`, | |||
| }) | |||
| @@ -30,11 +30,42 @@ Component({ | |||
| /** | |||
| * 显示分享海报 | |||
| */ | |||
| showPoster: function() { | |||
| /* showPoster: function() { | |||
| //跳转到海报生成页 | |||
| wx.navigateTo({ | |||
| 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": { | |||
| "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": [ | |||
| { | |||
| "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" | |||
| }, | |||
| { | |||
| "newUrl": "https://ctest.malls.iformall.com/img1", | |||
| "newUrl": "https://c.malls.iformall.com/img1", | |||
| "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" | |||
| } | |||
| ], | |||
| "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", | |||
| "ifHaveCarModular": "1" | |||
| }, | |||
| @@ -10,7 +10,7 @@ const bgColor = require("../utils/bgColor.js") | |||
| let app = getApp(); | |||
| Page({ | |||
| data: { | |||
| showLocationIf:true, | |||
| showLocationIf: true, | |||
| ifStoreApp: ifStoreApp, | |||
| navigationBarTitle: '首页', | |||
| navigationBarHeight, | |||
| @@ -19,7 +19,7 @@ Page({ | |||
| qg: bgColor.colorFirst.main.qg, | |||
| newUrl: "", | |||
| cover: "", | |||
| kanjia:imgurl.kanjia.url, | |||
| kanjia: imgurl.kanjia.url, | |||
| pintuan: imgurl.pintuan.url, | |||
| xiaofeika: imgurl.xiaofeika.url, | |||
| xingyun: imgurl.xingyun.url, | |||
| @@ -51,7 +51,7 @@ Page({ | |||
| duihuan: imgurl.duihuan.url, | |||
| market: app.globalData.market, | |||
| list: [], | |||
| xslist:[], | |||
| xslist: [], | |||
| loading: true, | |||
| fistLogin: null, | |||
| alphaData: null, | |||
| @@ -64,24 +64,24 @@ Page({ | |||
| scrollTop: 0, | |||
| showGame: false, | |||
| showTopic: false, | |||
| showQg:false, | |||
| showQg: false, | |||
| gamedata: {}, | |||
| couponId: '', //游戏返回时传回的字段 | |||
| played: false, //从游戏页面跳回首页返回true | |||
| havePlayEd: app.globalData.havePlayEd, | |||
| havePlayEd1:app.globalData.havePlayEd1, | |||
| havePlayEd1: app.globalData.havePlayEd1, | |||
| staticGamedata: {}, | |||
| showIf: false, | |||
| showPages: false, | |||
| display: 'none', | |||
| display1: 'none', | |||
| optionsData: null, | |||
| page: 1 ,// 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | |||
| openId:'', | |||
| page: 1, // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 | |||
| openId: '', | |||
| showGg: false, | |||
| ggdata:{} | |||
| ggdata: {} | |||
| }, | |||
| alphaClick1: function (even) { | |||
| alphaClick1: function(even) { | |||
| var animation = wx.createAnimation({}) | |||
| animation.opacity(0).step({ | |||
| duration: 2000 | |||
| @@ -138,17 +138,17 @@ Page({ | |||
| }, | |||
| gotogame: function() { | |||
| let that = this; | |||
| if (!that.data.showIf){ | |||
| if (!that.data.showIf) { | |||
| wx.showToast({ | |||
| title: '暂无游戏频道', | |||
| icon:"none", | |||
| duration:3000 | |||
| icon: "none", | |||
| duration: 3000 | |||
| }) | |||
| }else{ | |||
| } else { | |||
| Http.get({ | |||
| url: config.api.checkPhoneStatus, | |||
| data: {} | |||
| }) | |||
| url: config.api.checkPhoneStatus, | |||
| data: {} | |||
| }) | |||
| .then(res => { | |||
| var data = { | |||
| couponChannelId: "" + that.data.couponChannelId, | |||
| @@ -188,7 +188,7 @@ Page({ | |||
| } | |||
| }) | |||
| } | |||
| }, | |||
| mySpecial: function() { | |||
| console.log("special"); | |||
| @@ -204,12 +204,12 @@ Page({ | |||
| let that = this; | |||
| let optionss; | |||
| let openId = wx.getStorageSync('openId') | |||
| if(openId){ | |||
| if (openId) { | |||
| that.setData({ | |||
| openId:openId | |||
| openId: openId | |||
| }) | |||
| } | |||
| if (wx.getStorageSync('options')){ | |||
| if (wx.getStorageSync('options')) { | |||
| optionss = JSON.parse(wx.getStorageSync('options')); | |||
| } | |||
| if (options.played == "true") { | |||
| @@ -235,7 +235,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({ | |||
| @@ -245,7 +245,7 @@ Page({ | |||
| longitude: res.longitude | |||
| } | |||
| }).then(res => { | |||
| console.log(res,9999) | |||
| console.log(res, 9999) | |||
| }) | |||
| } | |||
| }, | |||
| @@ -264,7 +264,7 @@ Page({ | |||
| let that = this; | |||
| that.setData({ | |||
| 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(); | |||
| }, 8000) | |||
| // 如果有广告 | |||
| setTimeout(function () { | |||
| setTimeout(function() { | |||
| // debugger | |||
| that.alphaClick1(); | |||
| }, 8000) | |||
| }, | |||
| getmemberId: function(token) { | |||
| let that = this; | |||
| Http.get({ | |||
| let that = this; | |||
| Http.get({ | |||
| url: config.api.getScore, | |||
| data: { | |||
| token: token | |||
| @@ -327,17 +327,17 @@ Page({ | |||
| 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', | |||
| }) | |||
| @@ -347,12 +347,12 @@ Page({ | |||
| // url: '/pages/game/index', | |||
| // }) | |||
| // }, | |||
| gotoJfsc: function () { | |||
| gotoJfsc: function() { | |||
| wx.navigateTo({ | |||
| url: '/pages/integralmall/index', | |||
| }) | |||
| }, | |||
| /** | |||
| * | |||
| * @param {code,page} | |||
| @@ -374,7 +374,7 @@ Page({ | |||
| that.topicShow(); | |||
| that.getxsList(); | |||
| that.getMallInfo(app.globalData.token); | |||
| if (app.couponChannelListCallback) { | |||
| app.couponChannelListCallback(app.globalData.token); | |||
| } | |||
| @@ -493,36 +493,36 @@ Page({ | |||
| }); | |||
| }, | |||
| //获取限时抢购列表 | |||
| getxsList(){ | |||
| 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 | |||
| 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 | |||
| @@ -641,48 +641,48 @@ Page({ | |||
| }) | |||
| }, | |||
| //限时抢购的详情页面 | |||
| gotodetail: function (e) { | |||
| gotodetail: function(e) { | |||
| wx.navigateTo({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${ | |||
| e.currentTarget.dataset.couponchannelid | |||
| }&couponId=${e.currentTarget.dataset.couponid}` | |||
| }); | |||
| }, | |||
| //浮层广告 | |||
| getGg: function (token) { | |||
| //浮层广告 | |||
| getGg: function(token) { | |||
| let that = this | |||
| 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({ | |||
| showGg: true, | |||
| ggdata: res.data | |||
| }) | |||
| console.log(that.data.showGg,1111111111111) | |||
| } else { | |||
| that.setData({ | |||
| }) | |||
| .catch(err => { | |||
| this.setData({ | |||
| showGg: false | |||
| }) | |||
| 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({ | |||
| 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) { | |||
| this.setData({ | |||
| @@ -117,6 +117,14 @@ Page({ | |||
| }) | |||
| .then( | |||
| function (res) { | |||
| // debugger; | |||
| if (that.data.fromflag == 'poster') { | |||
| wx.redirectTo({ | |||
| url: `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||
| }) | |||
| return; | |||
| } | |||
| // | |||
| if (that.data.optionData.orderGroupId){ | |||
| 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}` | |||
| @@ -129,7 +137,8 @@ Page({ | |||
| }); | |||
| } 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({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||
| @@ -130,6 +130,7 @@ Page({ | |||
| }, | |||
| checkuserstatus(options) { | |||
| let that = this; | |||
| Http.get({ | |||
| url: config.api.checkUserStatus, | |||
| data: { | |||
| @@ -137,6 +138,8 @@ Page({ | |||
| } | |||
| }) | |||
| .then(res => { | |||
| // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') | |||
| //参与拼团 | |||
| if (options && options.orderGroupId) { | |||
| wx.redirectTo({ | |||
| @@ -160,7 +163,7 @@ Page({ | |||
| }) | |||
| }) | |||
| } else if (options && options.couponChannelId && !options.spellGroup && app.globalData.type != 'sd') { | |||
| console.log(3333333333333333) | |||
| // 转赠判断 | |||
| if (options.cuserId) { | |||
| wx.redirectTo({ | |||
| @@ -94,11 +94,35 @@ Page({ | |||
| /** | |||
| * 显示分享海报 | |||
| */ | |||
| showPoster: function() { | |||
| /* showPoster: function() { | |||
| //跳转到海报生成页 | |||
| wx.navigateTo({ | |||
| 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) { | |||
| @@ -17,7 +17,7 @@ Page({ | |||
| cardList: [], | |||
| arrays: [], | |||
| showModel: false, | |||
| showInput:false, | |||
| showInput: false, | |||
| ids: "", | |||
| wmyes: imgurl.wmyes.url, | |||
| wmclose: imgurl.wmclose.url | |||
| @@ -79,7 +79,7 @@ Page({ | |||
| ids: "", | |||
| remainingAmount: that.data.remainingAmounts | |||
| }) | |||
| if(err.errCode==90008||err.errCode == 90009){ | |||
| if (err.errCode == 90008 || err.errCode == 90009) { | |||
| // 90009 指纹验证失败 | |||
| // 90008 用户已取消 | |||
| wx.showModal({ | |||
| @@ -87,7 +87,7 @@ Page({ | |||
| showCancel: false, | |||
| content: '指纹验证后才能支付' | |||
| }) | |||
| }else{ | |||
| } else { | |||
| that.gotoPay(); | |||
| } | |||
| } | |||
| @@ -193,7 +193,7 @@ Page({ | |||
| } else if (that.data.inputValue != "" && Number(that.data.remainingAmount) < Number(that.data.inputValue)) { | |||
| that.setData({ | |||
| showModel: true, | |||
| showInput:'disabled' | |||
| showInput: 'disabled' | |||
| }) | |||
| that.getList(); | |||
| console.log("1111") | |||
| @@ -68,11 +68,37 @@ Page({ | |||
| /** | |||
| * 显示分享海报 | |||
| */ | |||
| showPoster: function() { | |||
| /* showPoster: function() { | |||
| //跳转到海报生成页 | |||
| wx.navigateTo({ | |||
| 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` | |||
| }) | |||
| } | |||
| }) | |||
| //跳转到海报生成页 | |||
| }, | |||
| /** | |||
| * 显示分享弹框 | |||