| @@ -2,35 +2,47 @@ | |||
| "ext": { | |||
| "attr": { | |||
| "car": { | |||
| "tjd": { | |||
| "payPath": "", | |||
| "tjdAppId": "wx6945d1bda68d7993" | |||
| }, | |||
| "etcp": { | |||
| "etcpAppId": "wx192b7d2e8dcbefd0", | |||
| "etcpVersion": "release", | |||
| "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||
| } | |||
| "payPath": "pages/pay/order-pay-open/main", | |||
| "etcpAppId": "wxc07f9d67923d676d", | |||
| "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||
| }, | |||
| "bolink": { | |||
| "payPath": "pages/park/park", | |||
| "bolinkAppId": "wxbd08b4baa10fcc1d" | |||
| }, | |||
| "version": "release" | |||
| }, | |||
| "mchId": "1604439800", | |||
| "mchId": "1630349477", | |||
| "imgProxy": [ | |||
| { | |||
| "newUrl": "https://ctest.malls.iformall.com/img", | |||
| "newUrl": "https://c.malls.iformall.com/img", | |||
| "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | |||
| }, | |||
| { | |||
| "newUrl": "https://ctest.malls.iformall.com/img1", | |||
| "newUrl": "https://c.malls.iformall.com/img1", | |||
| "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | |||
| }, | |||
| { | |||
| "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", | |||
| "mchIdOld": "1604439800", | |||
| "configUrl": "https://c.malls.iformall.com/C/api", | |||
| "ifStoreApp": "0", | |||
| "businessSwitch": "1", | |||
| "businessVersion": "1", | |||
| "ifHaveWebSocket": "0", | |||
| "ifHaveCarModular": "1" | |||
| "ifHaveCarModular": "0" | |||
| }, | |||
| "name": "金泸商务", | |||
| "weappId": "wx649b3be73c1afe47", | |||
| "appVersion": "C.test.5.2.0" | |||
| "name": "琅琊金鹏玖玖广场", | |||
| "weappId": "wx6af487474e8b7fb3", | |||
| "appVersion": "C.5.1.1" | |||
| }, | |||
| "debug": false, | |||
| "tabBar": { | |||
| @@ -66,8 +78,7 @@ | |||
| "selectedIconPath": "assets/images/user-a.png" | |||
| } | |||
| ], | |||
| "color": "#abb1be", | |||
| "selectedColor": "#b2743d" | |||
| "custom": true | |||
| }, | |||
| "window": { | |||
| "backgroundTextStyle": "dark", | |||
| @@ -77,15 +88,15 @@ | |||
| }, | |||
| "plugins": { | |||
| "auto-points-plugin": { | |||
| "version": "1.3.0", | |||
| "version": "2.4.0", | |||
| "provider": "wxfab2bf944bfc4da6" | |||
| }, | |||
| "live-player-plugin": { | |||
| "version": "1.3.4", | |||
| "version": "1.2.5", | |||
| "provider": "wx2b03c6e691cd7370" | |||
| } | |||
| }, | |||
| "extAppid": "wx649b3be73c1afe47", | |||
| "extAppid": "wx6af487474e8b7fb3", | |||
| "extEnable": true, | |||
| "permission": { | |||
| "scope.userLocation": { | |||
| @@ -98,7 +109,6 @@ | |||
| "downloadFile": 10000 | |||
| }, | |||
| "requiredPrivateInfos": [ | |||
| "chooseLocation", | |||
| "getLocation" | |||
| "chooseLocation" | |||
| ] | |||
| } | |||
| @@ -188,17 +188,6 @@ Page({ | |||
| } | |||
| }, | |||
| gotointegralmall: function () { | |||
| if (this.data.ifSetUserInfo) { | |||
| wx.navigateTo({ | |||
| url: '/pages/integralmall/integraHistory/index', | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| }) | |||
| } | |||
| }, | |||
| goToOrder() { | |||
| if (this.data.ifSetUserInfo) { | |||
| @@ -243,8 +232,11 @@ Page({ | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| url: '/pages/integralmall/index', | |||
| }) | |||
| // wx.navigateTo({ | |||
| // url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| // }) | |||
| } | |||
| }, | |||
| @@ -309,15 +301,18 @@ Page({ | |||
| }, | |||
| goToExchangeCard() { | |||
| if (this.data.ifSetUserInfo) { | |||
| wx.navigateTo({ | |||
| url: '/pages/exchangeCard/exchangeCard', | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| }) | |||
| } | |||
| wx.navigateTo({ | |||
| url: '/pages/exchangeCard/exchangeCard', | |||
| }) | |||
| // if (this.data.ifSetUserInfo) { | |||
| // wx.navigateTo({ | |||
| // url: '/pages/exchangeCard/exchangeCard', | |||
| // }) | |||
| // } else { | |||
| // wx.navigateTo({ | |||
| // url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| // }) | |||
| // } | |||
| }, | |||
| goToQuestionnaire() { | |||
| @@ -327,8 +322,11 @@ Page({ | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit', | |||
| }) | |||
| // wx.navigateTo({ | |||
| // url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| // }) | |||
| } | |||
| }, | |||
| @@ -339,20 +337,11 @@ Page({ | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| }) | |||
| } | |||
| }, | |||
| goToQuestionnaire() { | |||
| if (this.data.ifSetUserInfo) { | |||
| wx.navigateTo({ | |||
| url: '/pages/questionnaire/questionnaireLsit/questionnaireLsit', | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| url: '/pages/complaint/complaint', | |||
| }) | |||
| // wx.navigateTo({ | |||
| // url: `/pages/getphoneInfo/index?mineFlag=mine`, | |||
| // }) | |||
| } | |||
| }, | |||
| @@ -178,7 +178,7 @@ | |||
| <view bindtap="goToQuestionnaire"> | |||
| <view class="particulars_list"> | |||
| <view class="particulars_name">问券调查</view> | |||
| <view class="particulars_name">问卷调查</view> | |||
| <view class="particulars_go">></view> | |||
| </view> | |||
| </view> | |||
| @@ -16,6 +16,7 @@ Page({ | |||
| signInDay: 1, //0能签到 1是不能签到 | |||
| rules: [], //积分规则 | |||
| rewardPoints: "", //记录签到后的奖励积分 | |||
| isPhone: false | |||
| }, | |||
| getSignRule() { //查询签到规则 | |||
| Http.get({ | |||
| @@ -52,16 +53,17 @@ Page({ | |||
| rules: tempArr | |||
| }) | |||
| } | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| }, | |||
| setContinuousDye() { //获取连续签到天数 | |||
| const that = this | |||
| Http.get({ | |||
| url: config.api.continuousDye | |||
| }).then(res => { | |||
| @@ -77,11 +79,16 @@ Page({ | |||
| } | |||
| }).catch(err => { | |||
| if (err.code == 1989) { | |||
| app.globalData.type = "qd" | |||
| wx.navigateTo({ | |||
| url: '/pages/getuserinfo/index', | |||
| that.setData({ | |||
| continueSign: 0, | |||
| signInDay: 2, | |||
| isPhone: false | |||
| }) | |||
| }else{ | |||
| // app.globalData.type = "qd" | |||
| // wx.navigateTo({ | |||
| // url: '/pages/getuserinfo/index', | |||
| // }) | |||
| } else { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| @@ -90,20 +97,28 @@ Page({ | |||
| }); | |||
| } | |||
| }) | |||
| // .catch(err => { | |||
| // wx.showToast({ | |||
| // title: err.errMsg, | |||
| // icon: 'none', | |||
| // duration: 2000, | |||
| // mask: false | |||
| // }); | |||
| // }) | |||
| // .catch(err => { | |||
| // wx.showToast({ | |||
| // title: err.errMsg, | |||
| // icon: 'none', | |||
| // duration: 2000, | |||
| // mask: false | |||
| // }); | |||
| // }) | |||
| }, | |||
| setHide() { //设置遮罩成 | |||
| this.setData({ | |||
| hideFlag: !this.data.hideFlag | |||
| }) | |||
| }, | |||
| goSetPhone() { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?path=activityCalendar`, | |||
| }) | |||
| }, | |||
| setSign() { //点击签到 | |||
| Http.post({ | |||
| url: config.api.userSign, | |||
| @@ -122,21 +137,21 @@ Page({ | |||
| this.getSignRule() | |||
| this.setHide() | |||
| } | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| }).catch(err => { | |||
| wx.showToast({ | |||
| title: err.errMsg, | |||
| icon: 'none', | |||
| duration: 2000, | |||
| mask: false | |||
| }); | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function(options) { | |||
| onLoad: function (options) { | |||
| this.setContinuousDye() | |||
| this.getSignRule() | |||
| }, | |||
| @@ -144,42 +159,43 @@ Page({ | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function() { | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function() { | |||
| onShow: function () { | |||
| this.setContinuousDye() | |||
| this.getSignRule() | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function() { | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function() { | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function() { | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function() { | |||
| onReachBottom: function () { | |||
| }, | |||
| @@ -3,20 +3,21 @@ | |||
| <view class="signDyeBox"> | |||
| <view class="signDye">您已连续签到:{{continueSign}}天 </view> | |||
| </view> | |||
| <detelsit allFlag="{{false}}" childUrl="{{childUrl}}" activityStyle=" color:#ff6600"></detelsit> | |||
| <detelsit allFlag="{{false}}" childUrl="{{childUrl}}" activityStyle=" color:#ff6600"></detelsit> | |||
| <view class="singBtn" bindtap="setSign" wx:if="{{signInDay==0}}">签到领取积分</view> | |||
| <view class="guanSingBtn" wx:if="{{signInDay==1}}">签到领取积分</view> | |||
| <view class="singvAwardBox" wx:for="{{rules}}" wx:key="index" wx:if="{{item.score!=0}}"> | |||
| <view class="singBtn" wx:if="{{signInDay==2}}" bindtap="goSetPhone">成为会员签到领取积分</view> | |||
| <view class="singvAwardBox" wx:for="{{rules}}" wx:key="index" wx:if="{{item.score!=0}}"> | |||
| <view class="singvLsit"> | |||
| <view class="singvLsit_item_l"> {{item.desc}}</view> | |||
| <view class="singvLsit_item_r"> {{item.score+''}} 积分</view> | |||
| <view class="getBtn" wx:if="{{(index==0&&signInDay==1) || item.activity==1}}">已领取</view> | |||
| </view> | |||
| </view> | |||
| <view class="shadeBox" catchtouchmove="true" wx:if="{{hideFlag}}"> | |||
| <view class="shadeBox" catchtouchmove="true" wx:if="{{hideFlag}}"> | |||
| <view class="shade"> | |||
| <view class="shadeTitle">签到成功</view> | |||
| <view class="shadeNum">恭喜您已领取{{rewardPoints}}积分</view> | |||
| <view class="shadeBtn" bindtap="setHide">开心收下</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -21,11 +21,18 @@ Page({ | |||
| phone: "", | |||
| tempPhone: "", | |||
| password: "", | |||
| supportTransfer: "" | |||
| supportTransfer: "", | |||
| isPhone: "" | |||
| }, | |||
| // 查询 | |||
| searchCard(e) { | |||
| if (!this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages/getphoneInfo/index?path=exchangeCard', | |||
| }) | |||
| return | |||
| } | |||
| let code = e.detail.value.code; | |||
| this.setData({ | |||
| code: code | |||
| @@ -220,6 +227,12 @@ Page({ | |||
| }, | |||
| submit() { | |||
| if (!this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages/getphoneInfo/index?path=exchangeCard', | |||
| }) | |||
| return | |||
| } | |||
| if (this.data.pdwSwitch) { | |||
| const password = this.data.password | |||
| const numReg = /^\d+$/ | |||
| @@ -248,31 +261,31 @@ Page({ | |||
| }, | |||
| goGive() { | |||
| if (!this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages/getphoneInfo/index?path=exchangeCard', | |||
| }) | |||
| return | |||
| } | |||
| this.getCardDetailOrGoGive(this.data.code, true) | |||
| }, | |||
| // 检查用户登录状态 | |||
| checkPhoneStatus() { | |||
| let that = this; | |||
| checkUserPhone() { | |||
| const that = this | |||
| Http.get({ | |||
| url: config.api.checkPhoneStatus, | |||
| }) | |||
| .then(res => { | |||
| url: config.api.checkPhoneStatus | |||
| }).then(res => { | |||
| that.setData({ | |||
| isPhone: true | |||
| }) | |||
| .catch(err => { | |||
| if (err.code == 11005) { | |||
| // 手机号没有授权,将值传到用户手机号授权的页面 | |||
| wx.redirectTo({ | |||
| url: "/pages/getphoneInfo/index?path=exchangeCard", | |||
| }) | |||
| } else { | |||
| wx.showToast({ | |||
| title: err.message, | |||
| icon: 'none', | |||
| duration: 2500 | |||
| }) | |||
| } | |||
| console.log(this.data.isPhone, 'isPhone'); | |||
| }).catch(err => { | |||
| that.setData({ | |||
| isPhone: false | |||
| }) | |||
| console.log(this.data.isPhone, 'isPhone'); | |||
| }) | |||
| }, | |||
| Toast(message, icon) { | |||
| @@ -281,9 +294,12 @@ Page({ | |||
| icon: icon | |||
| }) | |||
| }, | |||
| onLoad() { | |||
| setTimeout(() => { | |||
| this.checkPhoneStatus() | |||
| }, 500); | |||
| this.checkUserPhone() | |||
| }, | |||
| onShow() { | |||
| this.checkUserPhone() | |||
| } | |||
| }) | |||
| @@ -15,9 +15,11 @@ Page({ | |||
| fillIndentId: "", | |||
| couponId: "", | |||
| go: '', | |||
| id: '' | |||
| id: '', | |||
| isPhone: false | |||
| // skip: app.globalData.skip | |||
| }, | |||
| onLoad: function (options) { | |||
| console.log(options, 'options'); | |||
| var that = this; | |||
| @@ -119,12 +121,27 @@ Page({ | |||
| } | |||
| }) | |||
| }, | |||
| changePhoneStatus() { | |||
| const isPhone = this.data.isPhone | |||
| this.setData({ | |||
| isPhone: !isPhone | |||
| }) | |||
| }, | |||
| backHome: function () { | |||
| wx.switchTab({ | |||
| url: app.globalData.goHomeUrl, | |||
| }) | |||
| }, | |||
| getPhoneNumber: function (e) { | |||
| if (!this.data.isPhone) { | |||
| wx.showToast({ | |||
| title: '请您阅读并勾选用户协议哦', | |||
| icon: "none" | |||
| }) | |||
| return | |||
| } | |||
| var that = this; | |||
| var iv = e.detail.iv; | |||
| var encryptedData = e.detail.encryptedData; | |||
| @@ -246,9 +263,17 @@ Page({ | |||
| wx.navigateTo({ | |||
| url: `/pages/index/searchbar/detail/index?id=${that.data.id}` | |||
| }) | |||
| } else if (that.data.path == 'passCarList') { | |||
| } else if (that.data.path == 'activityCalendar') { | |||
| wx.navigateTo({ | |||
| url: `/pages/activityCalendar/activityCalendar` | |||
| }) | |||
| } else if (that.data.path == 'integralmall') { | |||
| wx.navigateTo({ | |||
| url: `/pages/integralmall/index` | |||
| }) | |||
| } else if (that.data.path == 'questionnaire') { | |||
| wx.navigateTo({ | |||
| url: `/pages/passCar/showList/showList` | |||
| url: `/pages/questionnaire/questionnaire` | |||
| }) | |||
| } else { | |||
| wx.showToast({ | |||
| @@ -8,10 +8,16 @@ | |||
| <text>登录后可以更好的体验我们哦~</text> | |||
| </view> | |||
| <view class="login-btn"> | |||
| <button open-type="getPhoneNumber" hover-class='active' wx:if="{{canIUse}}" class="login-btn-login" bindgetphonenumber="getPhoneNumber">微信手机号一键登录</button> | |||
| <view wx:else>请升级微信版本</view> | |||
| <button open-type="getPhoneNumber" hover-class='active' wx:if="{{canIUse && isPhone}}" class="login-btn-login" bindgetphonenumber="getPhoneNumber">微信手机号一键登录</button> | |||
| <button hover-class='active' wx:if="{{canIUse && !isPhone}}" class="login-btn-login" bindtap="getPhoneNumber">微信手机号一键登录</button> | |||
| <view wx:if="{{!canIUse}}">请升级微信版本</view> | |||
| <button hover-class='active' class="login-btn-login backHome" bindtap="backHome">取消</button> | |||
| </view> | |||
| <view class="protocol" bindtap="goCheckProtocol">登录/注册即代表同意用户协议与隐私政策</view> | |||
| <view class="protocol"> | |||
| <image wx:if="{{isPhone}}" src="../../assets/images/confirm.png" bindtap="changePhoneStatus" /> | |||
| <image wx:if="{{!isPhone}}" src="../../assets/images/waitingConfirm.png" bindtap="changePhoneStatus" /> | |||
| 我已阅读并同意<text class="text" bindtap="goCheckProtocol">《用户协议与隐私政策》</text> | |||
| </view> | |||
| </view> | |||
| @@ -71,5 +71,17 @@ page { | |||
| position: fixed; | |||
| bottom: 50rpx; | |||
| font-size: 25rpx; | |||
| } | |||
| .protocol image { | |||
| position: absolute; | |||
| left: -50rpx; | |||
| top: 50%; | |||
| transform: translateY(-50%); | |||
| width: 40rpx; | |||
| height: 40rpx; | |||
| } | |||
| .protocol .text { | |||
| color: #00c0ff; | |||
| } | |||
| @@ -19,7 +19,7 @@ Page({ | |||
| barcode: imgurl.barcode.url, | |||
| list: [], | |||
| lists: [], | |||
| arrays:[], | |||
| arrays: [], | |||
| myLists: [], | |||
| page: 1, // 设置加载的第几次,默认是第一次 | |||
| pageSize: 10, //返回数据的个数 | |||
| @@ -32,22 +32,42 @@ Page({ | |||
| reloadIf: false, | |||
| creditAmount: '', | |||
| score: '0', | |||
| sort:'', | |||
| hidden:false, | |||
| userCredit:'', | |||
| sortColumn:'', | |||
| sortOrder:'', | |||
| goHomeUrl:"", | |||
| userAvatarUrl:'',// | |||
| userName:'', | |||
| sort: '', | |||
| hidden: false, | |||
| userCredit: '', | |||
| sortColumn: '', | |||
| sortOrder: '', | |||
| goHomeUrl: "", | |||
| userAvatarUrl: '',// | |||
| userName: '', | |||
| isPhone: false | |||
| }, | |||
| qrcodeH: function () { | |||
| gotograde() { | |||
| if (this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages3/setUserInfo/index', | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?path=integralmall`, | |||
| }) | |||
| } | |||
| }, | |||
| qrcodeH() { | |||
| var that = this; | |||
| let memberId = that.data.memberId; | |||
| if (memberId) { | |||
| wx.navigateTo({ | |||
| url: '/pages/specialcourtesy/specialcourtesy' | |||
| }) | |||
| if (this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages/specialcourtesy/specialcourtesy' | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?path=integralmall`, | |||
| }) | |||
| } | |||
| } | |||
| }, | |||
| goback: function () { | |||
| @@ -57,7 +77,7 @@ Page({ | |||
| }) | |||
| }, | |||
| onLoad: function (options) { | |||
| console.log(app.globalData.userName, app.globalData.userAvatarUrl,9999) | |||
| console.log(app.globalData.userName, app.globalData.userAvatarUrl, 9999) | |||
| let that = this; | |||
| that.setData({ | |||
| goHomeUrl: app.globalData.goHomeUrl, | |||
| @@ -121,6 +141,9 @@ Page({ | |||
| showCancel: false | |||
| }) | |||
| }) | |||
| this.checkUserPhone() | |||
| }, | |||
| //适配不同屏幕大小的canvas | |||
| setCanvasSize: function () { | |||
| @@ -170,7 +193,7 @@ Page({ | |||
| }, 1000) | |||
| }, | |||
| // 获得积分,渲染页面 | |||
| getPoints(){ | |||
| getPoints() { | |||
| let that = this; | |||
| Http.get({ | |||
| url: config.api.integralList, | |||
| @@ -194,23 +217,30 @@ Page({ | |||
| }); | |||
| }) | |||
| }, | |||
| gotojifen(){ | |||
| wx.navigateTo({ | |||
| url: '/pages/integralmall/integraHistory/index', | |||
| }) | |||
| gotojifen() { | |||
| if (this.data.isPhone) { | |||
| wx.navigateTo({ | |||
| url: '/pages/integralmall/integraHistory/index', | |||
| }) | |||
| } else { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?path=integralmall`, | |||
| }) | |||
| } | |||
| }, | |||
| //我可换购 | |||
| canSort(){ | |||
| canSort() { | |||
| let that = this; | |||
| if (that.data.creditAmount !== 0){ | |||
| if (that.data.creditAmount !== 0) { | |||
| that.setData({ | |||
| allow_load:true, | |||
| allow_load: true, | |||
| userCredit: that.data.creditAmount, | |||
| page:1 | |||
| page: 1 | |||
| }) | |||
| that.getList(1) | |||
| } | |||
| if (that.data.creditAmount == 0){ | |||
| if (that.data.creditAmount == 0) { | |||
| wx.showToast({ | |||
| title: '快去补充积分吧!', | |||
| icon: 'none', | |||
| @@ -226,8 +256,8 @@ Page({ | |||
| if (hid == true) { | |||
| hid = false; | |||
| that.setData({ | |||
| allow_load:true, | |||
| sort :imgurl.up.url, | |||
| allow_load: true, | |||
| sort: imgurl.up.url, | |||
| sortOrder: 'desc', | |||
| sortColumn: 'creditPrice', | |||
| page: 1 | |||
| @@ -241,7 +271,7 @@ Page({ | |||
| sortOrder: 'asc', | |||
| sortColumn: 'creditPrice', | |||
| allow_load: true, | |||
| page:1 | |||
| page: 1 | |||
| }) | |||
| that.getList(1) | |||
| } | |||
| @@ -328,6 +358,24 @@ Page({ | |||
| }, 1400) | |||
| } | |||
| }, | |||
| checkUserPhone() { | |||
| const that = this | |||
| Http.get({ | |||
| url: config.api.checkPhoneStatus | |||
| }).then(res => { | |||
| that.setData({ | |||
| isPhone: true | |||
| }) | |||
| console.log(this.data.isPhone, 'isPhone'); | |||
| }).catch(err => { | |||
| that.setData({ | |||
| isPhone: false | |||
| }) | |||
| console.log(this.data.isPhone, 'isPhone'); | |||
| }) | |||
| }, | |||
| /** | |||
| * | |||
| * @param goto拼团券详情 | |||
| @@ -360,7 +408,7 @@ Page({ | |||
| sortColumn: '', | |||
| sortOrder: '', | |||
| userCredit: '', | |||
| page:1, | |||
| page: 1, | |||
| allow_load: true, | |||
| }) | |||
| that.getList(1); | |||
| @@ -1,10 +1,10 @@ | |||
| <!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | |||
| <navbar back home text="积分商城" background='#FD832D' color="#FFF"></navbar> | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <view class='content-box' > | |||
| <view class='content-box'> | |||
| <view class='topbg'> | |||
| <view class='topbg-top'> | |||
| <view class="user-avatar" bindtap='gotograde'> | |||
| <view class='topbg-top' bindtap='gotograde'> | |||
| <view class="user-avatar"> | |||
| <view class='user-box'> | |||
| <!-- <open-data class="open" type="userAvatarUrl"></open-data> --> | |||
| <image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" src="{{userAvatarUrl}}"></image> | |||
| @@ -16,17 +16,17 @@ | |||
| <!-- <open-data class="name" type="userNickName"></open-data> --> | |||
| <p class="name">{{userName}}</p> | |||
| <view class=' usre_level'> | |||
| <text class='chengzhang '>{{levelName}}</text> | |||
| <text class='chengzhang '>{{isPhone ? levelName : "成为会员,享受更多权益"}}</text> | |||
| </view> | |||
| </view> | |||
| <view class="view"> | |||
| <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="#FFB287" /> | |||
| <view class="view" wx:if="{{isPhone}}"> | |||
| <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="#FFB287" /> | |||
| <view class='msg'>还需{{upgradeScore}}成长值升级</view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class='topbg-btom' mode='widthFix'> | |||
| <view class='btoml'bindtap='gotojifen'> | |||
| <view class='btoml' bindtap='gotojifen'> | |||
| <view class='score'>{{creditAmount}}</view> | |||
| <view class='jifen'> | |||
| <text>积分详情</text> | |||
| @@ -34,7 +34,7 @@ | |||
| </view> | |||
| </view> | |||
| <!-- 二维码 --> | |||
| <view class='qrcode' > | |||
| <view class='qrcode'> | |||
| <image src="{{erweima}}" class='qrcodeimg' mode='widthFix' bindtap='qrcodeH'></image> | |||
| </view> | |||
| </view> | |||
| @@ -43,14 +43,14 @@ | |||
| <view bindtap='canSort' hover-class="btn-hover">我可换购</view> | |||
| <view class='need' bindtap='need' hover-class="btn-hover"> | |||
| <text>所需积分</text> | |||
| <image wx:if="{{sort }}" src='{{sort}}' moda="aspectFill" ></image> | |||
| <image wx:if="{{sort}}" src='{{sort}}' moda="aspectFill"></image> | |||
| </view> | |||
| </view> | |||
| <view class='no-data01' wx:if='{{lists.length==0}}'> | |||
| <image src='{{nodata}}'></image> | |||
| <view class='no-data-text'>暂无数据</view> | |||
| </view> | |||
| <view class='content' wx:if='{{lists.length>0}}' > | |||
| <view class='content' wx:if='{{lists.length>0}}'> | |||
| <view class='sepll-list' wx:for="{{lists}}" wx:key="index" data-couponId='{{item.couponId}}' data-id='{{item.id}}' bindtap='invite'> | |||
| <view class='spell-left'> | |||
| <image src='{{item.coverImg}}' mode="aspectFill"></image> | |||
| @@ -70,9 +70,9 @@ | |||
| </view> | |||
| </view> | |||
| <view class='spell-right'> | |||
| <view class='right-button' wx:if="{{item.salePrice!=0}}">立即购买</view> | |||
| <view class='right-button' wx:if="{{item.salePrice!=0}}">立即购买</view> | |||
| <view class='right-button' wx:if="{{item.salePrice==0&&item.remainInventory!=0}}">立即换购</view> | |||
| <view class='right-button remainInventory' wx:if="{{item.remainInventory==0}}">立即换购</view> | |||
| <view class='right-button remainInventory' wx:if="{{item.remainInventory==0}}">查看</view> | |||
| <!-- <view class='right-text'>剩余{{item.remainInventory}}</view> --> | |||
| </view> | |||
| <view class='line'></view> | |||
| @@ -3,7 +3,7 @@ const Http = require("../../utils/HttpBasics"); | |||
| var config = require("../../config/config.js"); | |||
| const util = require("../../utils/util.js"); | |||
| var app = getApp(); | |||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||
| const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||
| Page({ | |||
| /** | |||
| @@ -16,8 +16,9 @@ Page({ | |||
| userDetails: "", | |||
| thenDate: "", | |||
| mouldType: 0, | |||
| mouldConfig:{}, | |||
| goHomeUrl:"", | |||
| mouldConfig: {}, | |||
| goHomeUrl: "", | |||
| isPhone: false | |||
| }, | |||
| //设置选中项 | |||
| setLsit(e) { | |||
| @@ -98,7 +99,7 @@ Page({ | |||
| icon: 'none', | |||
| duration: 2000, | |||
| success: () => { | |||
| setTimeout(() => { | |||
| setTimeout(() => { | |||
| wx.switchTab({ | |||
| url: this_.data.goHomeUrl | |||
| }) | |||
| @@ -116,6 +117,13 @@ Page({ | |||
| }); | |||
| }) | |||
| }, | |||
| goToLogin() { | |||
| wx.navigateTo({ | |||
| url: `/pages/getphoneInfo/index?path=questionnaire`, | |||
| }) | |||
| }, | |||
| //是否授权手机号 | |||
| ifPhoneInfo() { | |||
| let that = this; | |||
| @@ -133,17 +141,24 @@ Page({ | |||
| /* 判断是否授权*/ | |||
| userAuthorization() { | |||
| const that = this | |||
| Http.get({ | |||
| url: config.api.checkUserStatus, | |||
| url: config.api.checkPhoneStatus, | |||
| data: { | |||
| token: app.globalData.token | |||
| } | |||
| }).then(res => { | |||
| this.ifPhoneInfo() | |||
| that.setData({ | |||
| isPhone: true | |||
| }) | |||
| // this.ifPhoneInfo() | |||
| }).catch(err => { | |||
| wx.navigateTo({ | |||
| url: `/pages/getuserinfo/index?fromflag=wj&wjId=${this.data.id}`, | |||
| that.setData({ | |||
| isPhone: false | |||
| }) | |||
| // wx.navigateTo({ | |||
| // url: `/pages/getuserinfo/index?fromflag=wj&wjId=${this.data.id}`, | |||
| // }) | |||
| }) | |||
| }, | |||
| @@ -156,15 +171,15 @@ Page({ | |||
| url: config.api.questionnaireDetail, | |||
| data: param | |||
| }).then(res => { | |||
| res.data.question.startDate_Sing = util.formatTime(res.data.question.startDate, "yyyy-MM-dd hh:mm") | |||
| res.data.question.endDate_Sing = util.formatTime(res.data.question.endDate, "yyyy-MM-dd hh:mm") | |||
| console.log(res.data.question) | |||
| if (res.data.userDetails) { | |||
| let temp = res.data.question.topicList | |||
| temp.map((item, index) => { | |||
| // res.data.userDetails | |||
| item.answers.map(item2 => { | |||
| let tempArr = JSON.parse(res.data.userDetails.logList[index].answer) | |||
| @@ -193,8 +208,7 @@ Page({ | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function(options) { | |||
| onLoad: function (options) { | |||
| this.setData({ | |||
| goHomeUrl: app.globalData.goHomeUrl, | |||
| id: options.id, | |||
| @@ -207,15 +221,22 @@ Page({ | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady: function() { | |||
| onReady: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow: function() { | |||
| onShow: function () { | |||
| this.userAuthorization() | |||
| this.setData({ | |||
| goHomeUrl: app.globalData.goHomeUrl, | |||
| id: options.id, | |||
| mouldType: app.globalData.mouldType, | |||
| mouldConfig: app.globalData.mouldConfig, | |||
| }) | |||
| this.getDetail() | |||
| this.setData({ | |||
| thenDate: new Date().getTime() | |||
| }) | |||
| @@ -224,35 +245,35 @@ Page({ | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function() { | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function() { | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function() { | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function() { | |||
| onReachBottom: function () { | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function() { | |||
| */ | |||
| onShareAppMessage: function () { | |||
| var that = this; | |||
| var shareObj = { | |||
| title: "问卷详情", | |||
| @@ -1,25 +1,29 @@ | |||
| <navbar back="{{true}}" home="{{true}}" text="问卷详情" background='#FD832D' color="white"></navbar> | |||
| <view style="height:{{navigationBarHeight}} "></view> | |||
| <view class="Box"> | |||
| <view class="Box" wx:if="{{isPhone}}"> | |||
| <!-- <view class="hidBox"> | |||
| <view class="contcBox"></view> | |||
| </view> --> | |||
| <image class="imgBox" src="{{question.logo}}" style="{{mouldConfig.answerImgH}}"></image> | |||
| <view class="titleBox"> | |||
| <view class="title">{{question.title}}</view> | |||
| <view class="time">{{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}</view> | |||
| <view class="time">{{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}</view> | |||
| <text class="content">{{question.topDesc}}</text> | |||
| </view> | |||
| <view class="oneBox" wx:for="{{question.topicList}}"> | |||
| <view class="oneTitle">{{ item.type==2? index+1 +'、'+item.title+'(可多选)':index+1 +'、'+item.title}}</view> | |||
| <view class="{{item_2.falg?'item_show ':'item_hie'}}" wx:for="{{item.answers}}" wx:for-index="index_2" wx:for-item="item_2" bindtap="setLsit" data-index1="{{index}}" data-index2="{{index_2}}">{{item_2.name}}</view> | |||
| </view> | |||
| <view class="invalid" wx:if="{{thenDate<question.startDate}}">未开始</view> | |||
| <view class="invalid" wx:elif="{{thenDate>question.endDate}}">已过期</view> | |||
| <view class="invalid" wx:if="{{thenDate<question.startDate}}">未开始</view> | |||
| <view class="invalid" wx:elif="{{thenDate>question.endDate}}">已过期</view> | |||
| <view class="submit" bindtap="save" wx:elif="{{question.userStatus<=0&&question.status!=1}}">提交</view> | |||
| <view class="invalid" wx:elif="{{question.userStatus>0}}">已参与</view> | |||
| <view class="invalid" wx:elif="{{question.status==1}}">已下线</view> | |||
| <view class="invalid" wx:elif="{{question.status!=1}}">已上线</view> | |||
| <view class="invalid" wx:elif="{{question.userStatus>0}}">已参与</view> | |||
| <view class="invalid" wx:elif="{{question.status==1}}">已下线</view> | |||
| <view class="invalid" wx:elif="{{question.status!=1}}">已上线</view> | |||
| </view> | |||
| <view class="Box" wx:if="{{!isPhone}}"> | |||
| <view class="notice">暂无可用问卷,请登录以查看问卷!</view> | |||
| <button class="login" type="primary" bindtap="goToLogin">微信一键登录</button> | |||
| </view> | |||
| @@ -9,6 +9,18 @@ page { | |||
| overflow: hidden; | |||
| } | |||
| .notice { | |||
| font-size: 35rpx; | |||
| font-weight: 600; | |||
| text-align: center; | |||
| margin-top: 50rpx; | |||
| } | |||
| .login { | |||
| width: 80%; | |||
| margin-top: 50rpx; | |||
| } | |||
| .imgBox { | |||
| width: 96%; | |||
| height: 300rpx; | |||
| @@ -40,7 +52,8 @@ page { | |||
| -webkit-box-orient: vertical; | |||
| -webkit-line-clamp: 2; */ | |||
| } | |||
| .hidBox{ | |||
| .hidBox { | |||
| width: 100%; | |||
| height: 100%; | |||
| position: fixed; | |||
| @@ -48,17 +61,20 @@ page { | |||
| left: 0; | |||
| background-color: rgba(0, 0, 0, 0.2) | |||
| } | |||
| .contcBox{ | |||
| .contcBox { | |||
| width: 80%; | |||
| height: 300rpx; | |||
| background-color: #fff; | |||
| } | |||
| .time{ | |||
| .time { | |||
| font-size: 32rpx; | |||
| padding: 10rpx 0; | |||
| color: #999; | |||
| } | |||
| .oneBox { | |||
| width: 96%; | |||
| margin: 20rpx auto; | |||
| @@ -95,23 +111,25 @@ page { | |||
| background-color: rgba(243, 151, 56, 1); | |||
| margin-top: 10rpx; | |||
| } | |||
| .submit{ | |||
| .submit { | |||
| width: 600rpx; | |||
| height: 80rpx; | |||
| background-color: rgba(0, 153, 255, 1); | |||
| color: #fff; | |||
| text-align: center; | |||
| line-height: 80rpx; | |||
| border-radius: 6rpx; | |||
| border-radius: 6rpx; | |||
| margin: 20rpx auto; | |||
| } | |||
| .invalid{ | |||
| .invalid { | |||
| width: 600rpx; | |||
| height: 80rpx; | |||
| background-color: rgba(0, 0, 0, 0.2); | |||
| color: #fff; | |||
| text-align: center; | |||
| line-height: 80rpx; | |||
| border-radius: 6rpx; | |||
| border-radius: 6rpx; | |||
| margin: 20rpx auto; | |||
| } | |||
| @@ -35,7 +35,7 @@ | |||
| }, | |||
| "compileType": "miniprogram", | |||
| "libVersion": "2.11.2", | |||
| "appid": "wxfa336cad86ed598d", | |||
| "appid": "wx453ae0d37f3550d0", | |||
| "projectname": "C", | |||
| "simulatorType": "wechat", | |||
| "simulatorPluginLibVersion": {}, | |||