| @@ -2,7 +2,7 @@ | |||
| "pages": [ | |||
| "pages/index/index", | |||
| "pages/complete/index", | |||
| "pages/login/index", | |||
| "pages/main/index", | |||
| "pages/bargain/bargainDatail/bargainDatail", | |||
| "pages/bargain/bargain", | |||
| "pages/cardorder/index/index", | |||
| @@ -37,7 +37,7 @@ | |||
| "pages/payrule/payrule", | |||
| "pages/grade/grade", | |||
| "pages/game/index", | |||
| "pages/login/gameentry/gentry", | |||
| "pages/main/gameentry/gentry", | |||
| "pages/index/gameentry/gentry", | |||
| "pages/specialcourtesy/specialcourtesy", | |||
| "pages/discountCardList/discountCardList", | |||
| @@ -63,7 +63,7 @@ | |||
| "selectedColor": "#00C0FF", | |||
| "list": [ | |||
| { | |||
| "pagePath": "pages/login/index", | |||
| "pagePath": "pages/main/index", | |||
| "iconPath": "assets/images/home-n.png", | |||
| "selectedIconPath": "assets/images/home-y.png", | |||
| "text": "首页" | |||
| @@ -5,42 +5,11 @@ | |||
| "weappId": "wxea71200db93d756b", | |||
| "name": "富茂客官开发", | |||
| "attr": { | |||
| "appFlag":"0", | |||
| "ifHaveCarModular":"1", | |||
| "configUrl":[ | |||
| { | |||
| "url01":"https://ciformall.youlane.cn/C/api" | |||
| }, | |||
| { | |||
| "url02": "https://ctest.malls.iformall.com/C/api" | |||
| }, | |||
| { | |||
| "url03": "https://c.malls.iformall.com/C/api" | |||
| } | |||
| ], | |||
| "passCarAppId": [ | |||
| {"releaseAppId":"wxc07f9d67923d676d"}, | |||
| {"developAppId":"wx192b7d2e8dcbefd0"} | |||
| ], | |||
| "passCarPath": [ | |||
| { | |||
| "haveCarModular": "pages/passCar/passCar" | |||
| }, | |||
| { | |||
| "nothaveCarModular": "pages/cartest/cartest" | |||
| } | |||
| ], | |||
| "passCarreturnUrl":[ | |||
| { | |||
| "returnUrl1": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback" | |||
| }, | |||
| { | |||
| "returnUrl2": "https://c.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||
| }, | |||
| { | |||
| "returnUrl3": "https://ctest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||
| } | |||
| ] | |||
| "configUrl":"https://ciformall.youlane.cn/C/api", | |||
| "passCarAppId":"wx192b7d2e8dcbefd0", | |||
| "passCarPath":"pages/passCar/passCar", | |||
| "passCarreturnUrl":"https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback" | |||
| } | |||
| }, | |||
| "directCommit": false, | |||
| @@ -49,7 +18,7 @@ | |||
| "selectedColor": "#00C0FF", | |||
| "list": [ | |||
| { | |||
| "pagePath": "pages/login/index", | |||
| "pagePath": "pages/main/index", | |||
| "iconPath": "assets/images/home-n.png", | |||
| "selectedIconPath": "assets/images/home-y.png", | |||
| "text": "首页" | |||
| @@ -53,7 +53,7 @@ Page({ | |||
| }, | |||
| goback:function(){ | |||
| wx.switchTab({ | |||
| url: '/pages/login/index', | |||
| url: '/pages/main/index', | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -8,7 +8,7 @@ | |||
| <image src="{{couponUrl}}" mode="widthFix" /> | |||
| <text class="txt001">请您敬请期待</text> | |||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | |||
| <navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <button hover-class='active'>前往首页看看</button> | |||
| </navigator> | |||
| </view> | |||
| @@ -1,3 +1,4 @@ | |||
| { | |||
| "usingComponents": {} | |||
| "usingComponents": {}, | |||
| "navigationBarTitleText": "领取成功" | |||
| } | |||
| @@ -21,7 +21,6 @@ Page({ | |||
| questions2: null, | |||
| carList: [], | |||
| couponChannelId: null, | |||
| couponId: null, | |||
| orderId: "", | |||
| hour: null, | |||
| minute: "", | |||
| @@ -83,7 +82,6 @@ Page({ | |||
| //获取卡转赠状态 | |||
| getQueryCardStatus(){ | |||
| let that = this; | |||
| // console.log(util.formatTime(Number(that.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss"),44444444444) | |||
| let param={ | |||
| id: this.data.cardData.couponOrderId, | |||
| cUserId: this.data.cardData.cuserId, | |||
| @@ -119,7 +117,6 @@ Page({ | |||
| data: param | |||
| }) | |||
| .then(res => { | |||
| console.log(res, 333333333333) | |||
| wx.showToast({ | |||
| title: '领取成功!', | |||
| icon: 'none', | |||
| @@ -149,7 +146,7 @@ Page({ | |||
| }, | |||
| goback: function () { | |||
| wx.switchTab({ | |||
| url: '/pages/login/index', | |||
| url: '/pages/main/index', | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -328,12 +325,10 @@ Page({ | |||
| showCardOffer:true, | |||
| cardData:options | |||
| }) | |||
| console.log(options,22222222222) | |||
| this.getUserInfo() | |||
| } | |||
| that.setData({ | |||
| couponChannelId: options.couponChannelId, | |||
| couponId: options.couponId, | |||
| title: that.data.data.title ? that.data.data.title : '', | |||
| }); | |||
| if (options.cardType) { | |||
| @@ -349,6 +344,9 @@ Page({ | |||
| }; | |||
| Http.get(parmer) | |||
| .then(res => { | |||
| that.setData({ | |||
| couponId: res.data.couponId | |||
| }) | |||
| if (res.code == 200) { | |||
| that.setData({ | |||
| showPage: true | |||
| @@ -470,12 +468,12 @@ Page({ | |||
| * | |||
| */ | |||
| wx.redirectTo({ | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, | |||
| url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, | |||
| }); | |||
| } else if (err.code == 11006) { | |||
| // 用户手机已加密 | |||
| wx.redirectTo({ | |||
| url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, | |||
| url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate, | |||
| }); | |||
| } else { | |||
| wx.showToast({ | |||
| @@ -597,17 +595,13 @@ Page({ | |||
| */ | |||
| wx.redirectTo({ | |||
| url: "/pages/getphoneInfo/index?couponChannelId=" + | |||
| that.data.couponChannelId + | |||
| "&couponId=" + | |||
| that.data.couponId | |||
| that.data.couponChannelId | |||
| }); | |||
| } else if (err.code == 11006) { | |||
| // 用户手机已加密 | |||
| wx.redirectTo({ | |||
| url: "/pages/phoneinput/phoneinput?couponChannelId=" + | |||
| that.data.couponChannelId + | |||
| "&couponId=" + | |||
| that.data.couponId | |||
| that.data.couponChannelId | |||
| }); | |||
| } else { | |||
| wx.showToast({ | |||
| @@ -731,7 +725,7 @@ Page({ | |||
| var that = this; | |||
| var shareObj = { | |||
| title: that.data.data.title, | |||
| path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`, | |||
| path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}`, | |||
| success: function (res) { | |||
| if (res.errMsg == 'shareAppMessage:ok') {} | |||
| }, | |||
| @@ -742,82 +736,9 @@ Page({ | |||
| // 来自页面内的按钮的转发 | |||
| if (options.from == 'button') { | |||
| var eData = options.target.dataset.id; | |||
| var couponId = options.target.dataset.couponid; | |||
| shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${couponId}`; | |||
| shareObj.path = `/pages/index/index?couponChannelId=${eData}`; | |||
| } | |||
| // 返回shareObj | |||
| return shareObj; | |||
| }, | |||
| /** | |||
| * 用户登录 | |||
| */ | |||
| userLogin: function (couponChannelId, couponId, orderId) { | |||
| var that = this; | |||
| // 登录 | |||
| wx.login({ | |||
| success: ({ | |||
| code | |||
| }) => { | |||
| wx.getSystemInfo({ | |||
| success: function (res) { | |||
| that.setData({ | |||
| systemInfo: JSON.stringify(res) | |||
| }) | |||
| } | |||
| }) | |||
| var usrdata = { | |||
| appId: config.weapp.AppId, | |||
| code: code, | |||
| sceneAddress: app.globalData.sceneAddress, | |||
| scene: that.data.scene, | |||
| systemInfo: that.data.systemInfo | |||
| }; | |||
| if (app.globalData.locationInfo) { | |||
| usrdata = { | |||
| appId: config.weapp.AppId, | |||
| code: code, | |||
| sceneAddress: app.globalData.sceneAddress, | |||
| latitude: "" + app.globalData.locationInfo.latitude, | |||
| longitude: "" + app.globalData.locationInfo.longitude, | |||
| scene: that.data.scene, | |||
| systemInfo: that.data.systemInfo | |||
| }; | |||
| } | |||
| Http.post({ | |||
| url: config.api.login, | |||
| data: usrdata | |||
| }) | |||
| .then(res => { | |||
| that.setData({ | |||
| showPages: true | |||
| }) | |||
| app.globalData.token = res.data.token; | |||
| Http.setToken(res.data.token); | |||
| if (couponChannelId && couponId || orderId) { | |||
| that.checkuerstatus(couponChannelId, couponId, orderId); | |||
| } else { | |||
| that.checkuerstatus(); | |||
| } | |||
| }) | |||
| .catch(err => { | |||
| wx.showModal({ | |||
| title: '提示', | |||
| showCancel: false, | |||
| content: '登录失败,请重新尝试', | |||
| success: function (res) { | |||
| if (res.cancel) { | |||
| //点击取消,默认隐藏弹框 | |||
| } else { | |||
| //点击确定 | |||
| wx.reLaunch({ | |||
| url: '/pages/index/index', | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| }); | |||
| } | |||
| }); | |||
| }, | |||
| }); | |||
| @@ -8,7 +8,7 @@ | |||
| <image src="{{couponUrl}}" mode="widthFix" /> | |||
| <text class="txt001">请您敬请期待</text> | |||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | |||
| <navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <button hover-class='active'>前往首页看看</button> | |||
| </navigator> | |||
| </view> | |||
| @@ -9,7 +9,7 @@ | |||
| <image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" /> | |||
| <text class="txt001">请您敬请期待</text> | |||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | |||
| <navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <button hover-class='active'>前往首页看看</button> | |||
| </navigator> | |||
| </view> | |||
| @@ -5,7 +5,6 @@ Page({ | |||
| data: { | |||
| canIUse: wx.canIUse("button.open-type.getPhoneNumber"), | |||
| couponChannelId: "", | |||
| couponId: "", | |||
| path:null, | |||
| paramData:null | |||
| }, | |||
| @@ -17,10 +16,9 @@ Page({ | |||
| paramData: options | |||
| }) | |||
| var that = this; | |||
| if (options.couponChannelId && options.couponId) { | |||
| if (options.couponChannelId) { | |||
| that.setData({ | |||
| couponChannelId: options.couponChannelId, | |||
| couponId: options.couponId | |||
| couponChannelId: options.couponChannelId | |||
| }); | |||
| } | |||
| @@ -70,20 +68,16 @@ Page({ | |||
| }) | |||
| } else if (that.path == 'index' && that.data.paramData.cuserId){ | |||
| wx.reLaunch({ | |||
| url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate | |||
| url: "/pages/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 { | |||
| wx.showToast({ | |||
| title: res.data.msg, | |||
| icon: "success", | |||
| success: function (res) { | |||
| if (that.data.couponChannelId && that.data.couponId) { | |||
| if (that.data.couponChannelId) { | |||
| wx.redirectTo({ | |||
| url: "/pages/coupon/detail/index?couponChannelId=" + | |||
| that.data.couponChannelId + | |||
| "&couponId=" + | |||
| that.data.couponId + | |||
| "&flag=pay" | |||
| url: "/pages/coupon/detail/index?couponChannelId=" +that.data.couponChannelId +"&flag=pay" | |||
| }) | |||
| } else { | |||
| wx.switchTab({ | |||
| @@ -6,17 +6,15 @@ Page({ | |||
| canIUse: wx.canIUse("button.open-type.getUserInfo"), | |||
| path:null, | |||
| couponChannelId: null, | |||
| couponId:null, | |||
| cuserId:null, | |||
| coverImg:null, | |||
| couponOrderId:null | |||
| }, | |||
| onLoad: function(options) { | |||
| var that = this; | |||
| if (options.couponChannelId && options.couponId && !options.cuserId||options.orderId) { | |||
| if (options.couponChannelId && !options.cuserId||options.orderId) { | |||
| that.setData({ | |||
| couponChannelId: options.couponChannelId, | |||
| couponId: options.couponId, | |||
| orderId:options.orderId | |||
| }) | |||
| } | |||
| @@ -27,7 +25,6 @@ Page({ | |||
| console.log(1231231231,options) | |||
| that.setData({ | |||
| couponChannelId: options.couponChannelId, | |||
| couponId: options.couponId, | |||
| cuserId: options.cuserId, | |||
| coverImg: options.coverImg, | |||
| userName: options.userName, | |||
| @@ -81,16 +78,16 @@ Page({ | |||
| }); | |||
| } else { | |||
| //返回主页 | |||
| if (that.data.couponChannelId && that.data.couponId && !that.data.cuserId) { | |||
| if (that.data.couponChannelId && !that.data.cuserId) { | |||
| wx.navigateTo({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}` | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}}` | |||
| }); | |||
| } else if (that.data.couponChannelId && that.data.couponId && that.data.cuserId) { | |||
| } else if (that.data.couponChannelId && that.data.cuserId) { | |||
| /** | |||
| * 来自转赠 | |||
| */ | |||
| wx.reLaunch({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}` | |||
| url: `/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}` | |||
| }); | |||
| } else if (that.data.orderId) { | |||
| wx.navigateTo({ | |||
| @@ -98,7 +95,7 @@ Page({ | |||
| }); | |||
| } else { | |||
| wx.switchTab({ | |||
| url: "/pages/login/index" | |||
| url: "/pages/main/index" | |||
| }); | |||
| } | |||
| } | |||
| @@ -13,15 +13,7 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function(options) { | |||
| console.log(options) | |||
| let that = this; | |||
| wx.showToast({ | |||
| title: '加载中', | |||
| icon: "loading", | |||
| duration: 2000 | |||
| }) | |||
| wx.setStorageSync('options', JSON.stringify(options)) | |||
| wx.setStorageSync('imgurl', imgurl) | |||
| if (decodeURIComponent(options.scene) == "undefined") { | |||
| that.setData({ | |||
| scene: 0 | |||
| @@ -30,38 +22,53 @@ Page({ | |||
| that.setData({ | |||
| scene: decodeURIComponent(options.scene) | |||
| }); | |||
| that.setData({ | |||
| newArr: this.data.scene.split(':') | |||
| }) | |||
| console.log(this.data.newArr) | |||
| if (this.data.newArr[0]=='JC'){ | |||
| options.couponChannelId = this.data.newArr[1]; | |||
| } | |||
| } | |||
| console.log(options.couponChannelId) | |||
| wx.showToast({ | |||
| title: '加载中', | |||
| icon: "loading", | |||
| duration: 2000 | |||
| }) | |||
| wx.setStorageSync('options', JSON.stringify(options)) | |||
| wx.setStorageSync('imgurl', imgurl) | |||
| app.getLocation(); | |||
| if (options.couponChannelId && options.couponId || options.orderId) { | |||
| if (options.couponChannelId || options.orderId) { | |||
| if (options.cuserId){ | |||
| /** | |||
| * 转赠判断 | |||
| */ | |||
| that.userLogin(options.couponChannelId, options.couponId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId, options.updateDate); | |||
| that.userLogin(options.couponChannelId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId, options.updateDate); | |||
| }else{ | |||
| that.userLogin(options.couponChannelId, options.couponId, options.orderId); | |||
| that.userLogin(options.couponChannelId, options.orderId); | |||
| } | |||
| } else { | |||
| that.userLogin() | |||
| } | |||
| }, | |||
| checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| checkuerstatus(couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| let that = this; | |||
| Http.post({ | |||
| url: config.api.checkUserStatus, | |||
| data: {} | |||
| }) | |||
| .then(res => { | |||
| if (couponChannelId && couponId && !cuserId) { | |||
| if (couponChannelId && !cuserId) { | |||
| wx.redirectTo({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}`, | |||
| }) | |||
| } else if (couponChannelId && couponId && cuserId){ | |||
| } else if (couponChannelId && cuserId){ | |||
| /** | |||
| * 转赠判断 | |||
| */ | |||
| wx.redirectTo({ | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`, | |||
| url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`, | |||
| }) | |||
| } else if (orderId) { | |||
| wx.redirectTo({ | |||
| @@ -69,23 +76,23 @@ Page({ | |||
| }) | |||
| }else{ | |||
| wx.switchTab({ | |||
| url: '/pages/login/index' | |||
| url: '/pages/main/index' | |||
| }); | |||
| } | |||
| }) | |||
| .catch(err => { | |||
| if (err.code == 11004) { | |||
| // 用户昵称未授权 | |||
| if (couponChannelId && couponId && !cuserId) { | |||
| if (couponChannelId && !cuserId) { | |||
| wx.redirectTo({ | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}` | |||
| }); | |||
| } else if (couponChannelId && couponId && cuserId){ | |||
| } else if (couponChannelId && cuserId){ | |||
| /** | |||
| * 转赠判断 | |||
| */ | |||
| wx.redirectTo({ | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}` | |||
| url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}` | |||
| }); | |||
| } else if (orderId) { | |||
| wx.redirectTo({ | |||
| @@ -102,7 +109,7 @@ Page({ | |||
| /** | |||
| * 用户登录 | |||
| */ | |||
| userLogin: function (couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| userLogin: function (couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) { | |||
| var that = this; | |||
| // 登录 | |||
| wx.login({ | |||
| @@ -144,8 +151,8 @@ Page({ | |||
| }) | |||
| app.globalData.token = res.data.token; | |||
| Http.setToken(res.data.token); | |||
| if (couponChannelId&&couponId || orderId){ | |||
| that.checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate); | |||
| if (couponChannelId || orderId){ | |||
| that.checkuerstatus(couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate); | |||
| }else{ | |||
| that.checkuerstatus(); | |||
| } | |||
| @@ -160,11 +160,11 @@ Page({ | |||
| played: true | |||
| }) | |||
| } | |||
| // if (optionss.couponChannelId && optionss.couponId || optionss.orderId) { | |||
| // that.userLogin(optionss.couponChannelId, optionss.couponId, optionss.orderId); | |||
| // } else { | |||
| // that.userLogin() | |||
| // } | |||
| if (optionss.couponChannelId|| optionss.orderId) { | |||
| that.userLogin(optionss.couponChannelId, optionss.orderId); | |||
| } else { | |||
| that.userLogin() | |||
| } | |||
| }, | |||
| onShow: function() { | |||
| this.setData({ | |||
| @@ -4,7 +4,7 @@ | |||
| <image src="{{couponUrl}}" mode="widthFix" /> | |||
| <text class="txt001">请您敬请期待</text> | |||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | |||
| <navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <button hover-class='active'>前往首页看看</button> | |||
| </navigator> | |||
| </view> | |||
| @@ -5,7 +5,6 @@ const Http = require("../../../utils/HttpBasics"); | |||
| //券详情页面 | |||
| Page({ | |||
| data: { | |||
| code: "", | |||
| data: {}, | |||
| createDate: "", | |||
| expiredTime: "", | |||
| @@ -24,10 +23,7 @@ Page({ | |||
| }, | |||
| onLoad: function (options) { | |||
| let that = this; | |||
| that.setData({ | |||
| code: options.quancode | |||
| }); | |||
| console.log(options.quancode) | |||
| Http.get({ | |||
| url: config.api.couponOrderDetail, | |||
| data: { | |||
| @@ -8,7 +8,7 @@ | |||
| <image src="{{couponUrl}}" mode="widthFix" /> | |||
| <text class="txt001">请您敬请期待</text> | |||
| <text class='txt002'>我们正在筹备一大波优惠活动</text> | |||
| <navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover"> | |||
| <button hover-class='active'>前往首页看看</button> | |||
| </navigator> | |||
| </view> | |||
| @@ -73,7 +73,7 @@ Page({ | |||
| // }, | |||
| navigateTo() { | |||
| wx.navigateTo({ | |||
| url: `/pages/login/index` | |||
| url: `/pages/main/index` | |||
| }); | |||
| }, | |||
| showVersion: function() { | |||
| @@ -75,7 +75,7 @@ | |||
| </view> | |||
| <view class="margin"></view> | |||
| <view bindlongtap='showVersion' class='version'> | |||
| <view wx:if="{{flag=='show'}}">版本�:3.4.1</view> | |||
| <view wx:if="{{flag=='show'}}">版本�:C.3.4.7</view> | |||
| <view wx:if="{{flag=='hidden'}}"></view> | |||
| </view> | |||
| </view> | |||
| @@ -86,6 +86,6 @@ | |||
| <view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}"> | |||
| <view class="canvas-box"> | |||
| <canvas hidden="{{canvasHidden}}" style="height:500rpx;background:0 0 0 .6;margin-top:10rpx;" canvas-id="mycanvas1" /> | |||
| <text class='memberIds'>会员�:{{memberId}}</text> | |||
| <text class='memberIds'>会员å�{{memberId}}</text> | |||
| </view> | |||
| </view> | |||
| @@ -4,7 +4,7 @@ | |||
| "ignore": [] | |||
| }, | |||
| "setting": { | |||
| "urlCheck": false, | |||
| "urlCheck": true, | |||
| "es6": true, | |||
| "postcss": true, | |||
| "minified": true, | |||