默认提交
Showing
12 changed files
with
119 additions
and
20 deletions
| ... | @@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index'); | ... | @@ -2,7 +2,7 @@ let ENV_CONFIG = require('./env/index'); |
| 2 | 2 | ||
| 3 | const APPID = '' | 3 | const APPID = '' |
| 4 | /** ====每次发布版本记得修改此环境配置==== */ | 4 | /** ====每次发布版本记得修改此环境配置==== */ |
| 5 | const ENV = 'Dev'; // Dev Prod | 5 | const ENV = 'Prod'; // Dev Prod |
| 6 | const NET_CONFIG = ENV_CONFIG[ENV]; | 6 | const NET_CONFIG = ENV_CONFIG[ENV]; |
| 7 | const MOCKAPI = ENV_CONFIG.mockApi; | 7 | const MOCKAPI = ENV_CONFIG.mockApi; |
| 8 | 8 | ... | ... |
| ... | @@ -62,6 +62,7 @@ $contentWidth:690px; | ... | @@ -62,6 +62,7 @@ $contentWidth:690px; |
| 62 | 62 | ||
| 63 | &-ele { | 63 | &-ele { |
| 64 | display: flex; | 64 | display: flex; |
| 65 | align-items: center; | ||
| 65 | font-size: 22px; | 66 | font-size: 22px; |
| 66 | @extend .bb; | 67 | @extend .bb; |
| 67 | 68 | ||
| ... | @@ -77,12 +78,12 @@ $contentWidth:690px; | ... | @@ -77,12 +78,12 @@ $contentWidth:690px; |
| 77 | color: #333333; | 78 | color: #333333; |
| 78 | 79 | ||
| 79 | padding-left: 24px; | 80 | padding-left: 24px; |
| 80 | font-size: 20px; | 81 | font-size: 24px; |
| 81 | 82 | ||
| 82 | .t1 { | 83 | .t1 { |
| 83 | margin-left: 20px; | 84 | margin-left: 20px; |
| 84 | margin-top: 36px; | 85 | margin-top: 36px; |
| 85 | align-self: flex-start; | 86 | align-self: center; |
| 86 | 87 | ||
| 87 | } | 88 | } |
| 88 | 89 | ... | ... |
| ... | @@ -34,7 +34,8 @@ | ... | @@ -34,7 +34,8 @@ |
| 34 | <view class="desc"> | 34 | <view class="desc"> |
| 35 | <view bindtap="queryAuctionRecordLast" class="refresh-btn">刷新价格</view> | 35 | <view bindtap="queryAuctionRecordLast" class="refresh-btn">刷新价格</view> |
| 36 | <view class="desc-tit">{{productInfo.auctionName}}</view> | 36 | <view class="desc-tit">{{productInfo.auctionName}}</view> |
| 37 | <view class="desc-t1">{{productInfo.auctionDescription}}</view> | 37 | <!-- <view class="desc-t1">{{productInfo.auctionDescription}}</view> --> |
| 38 | <text class="desc-t1">{{productInfo.auctionDescription}}</text> | ||
| 38 | <view class="desc-t1">活动区域:{{productInfo.district}}</view> | 39 | <view class="desc-t1">活动区域:{{productInfo.district}}</view> |
| 39 | </view> | 40 | </view> |
| 40 | <!-- 线 --> | 41 | <!-- 线 --> | ... | ... |
| ... | @@ -7,7 +7,7 @@ let app = getApp(); | ... | @@ -7,7 +7,7 @@ let app = getApp(); |
| 7 | Page({ | 7 | Page({ |
| 8 | data: { | 8 | data: { |
| 9 | authorizeVisible: false, | 9 | authorizeVisible: false, |
| 10 | signTipsCompVisible:false, | 10 | signTipsCompVisible: false, |
| 11 | isInit: false, | 11 | isInit: false, |
| 12 | total: 0, | 12 | total: 0, |
| 13 | page: 1, | 13 | page: 1, |
| ... | @@ -71,7 +71,7 @@ Page({ | ... | @@ -71,7 +71,7 @@ Page({ |
| 71 | title: curData.auctionName | 71 | title: curData.auctionName |
| 72 | } | 72 | } |
| 73 | }) | 73 | }) |
| 74 | } else if(curData.isCanDetail == 2){ | 74 | } else if (curData.isCanDetail == 2) { |
| 75 | this.setData({ | 75 | this.setData({ |
| 76 | signTipsCompVisible: true, | 76 | signTipsCompVisible: true, |
| 77 | }) | 77 | }) |
| ... | @@ -148,7 +148,6 @@ Page({ | ... | @@ -148,7 +148,6 @@ Page({ |
| 148 | this.toVipLoginHandler(); | 148 | this.toVipLoginHandler(); |
| 149 | break; | 149 | break; |
| 150 | 150 | ||
| 151 | |||
| 152 | // 暂不验证 | 151 | // 暂不验证 |
| 153 | case "_evt_not_verify": | 152 | case "_evt_not_verify": |
| 154 | this.hideMask(); | 153 | this.hideMask(); | ... | ... |
| ... | @@ -18,6 +18,7 @@ Page({ | ... | @@ -18,6 +18,7 @@ Page({ |
| 18 | userInfo: {}, //用户信息 | 18 | userInfo: {}, //用户信息 |
| 19 | code: "", // 手输入码 / 扫出的奖金码 | 19 | code: "", // 手输入码 / 扫出的奖金码 |
| 20 | memberCode: "", // 扫出的用户码 | 20 | memberCode: "", // 扫出的用户码 |
| 21 | isVerify: true, // 是否已经认证 | ||
| 21 | }, | 22 | }, |
| 22 | onShareAppMessage() {}, | 23 | onShareAppMessage() {}, |
| 23 | showAuth() { | 24 | showAuth() { |
| ... | @@ -49,7 +50,13 @@ Page({ | ... | @@ -49,7 +50,13 @@ Page({ |
| 49 | this.queryProduct(); | 50 | this.queryProduct(); |
| 50 | this.queryBanner(); | 51 | this.queryBanner(); |
| 51 | 52 | ||
| 52 | if (m || c) { | 53 | let sessionId = app.store.getItem('sessionId'); |
| 54 | if (!sessionId) { | ||
| 55 | this.setData({ | ||
| 56 | isVerify: false | ||
| 57 | }) | ||
| 58 | } | ||
| 59 | if (m || c || sessionId) { | ||
| 53 | this.initData(); | 60 | this.initData(); |
| 54 | } | 61 | } |
| 55 | }, | 62 | }, |
| ... | @@ -65,8 +72,21 @@ Page({ | ... | @@ -65,8 +72,21 @@ Page({ |
| 65 | memberCode, | 72 | memberCode, |
| 66 | code | 73 | code |
| 67 | } = this.data; | 74 | } = this.data; |
| 75 | if (memberCode) { | ||
| 76 | app.globalData.tlMemberCode = memberCode; | ||
| 77 | } | ||
| 68 | // 如果存在扫码参数,则需要拉用户身份(未授权的情况下 要拉授权) | 78 | // 如果存在扫码参数,则需要拉用户身份(未授权的情况下 要拉授权) |
| 69 | this.queryMember().then((result) => { | 79 | this.queryMember().then((result) => { |
| 80 | let { | ||
| 81 | auditStatus | ||
| 82 | } = result; | ||
| 83 | if (auditStatus != "authorization") { | ||
| 84 | // 未认证用户 | ||
| 85 | this.setData({ | ||
| 86 | isVerify: false | ||
| 87 | }) | ||
| 88 | } | ||
| 89 | |||
| 70 | // 扫用户码 | 90 | // 扫用户码 |
| 71 | this.queryScanPersonQrcode().then((result2) => { | 91 | this.queryScanPersonQrcode().then((result2) => { |
| 72 | // 查询奖金码 | 92 | // 查询奖金码 |
| ... | @@ -101,6 +121,43 @@ Page({ | ... | @@ -101,6 +121,43 @@ Page({ |
| 101 | console.log("officialAccountErrorFuc:", evt) | 121 | console.log("officialAccountErrorFuc:", evt) |
| 102 | }, | 122 | }, |
| 103 | 123 | ||
| 124 | |||
| 125 | /** | ||
| 126 | * 检查验证修改 | ||
| 127 | */ | ||
| 128 | checkVerify() { | ||
| 129 | let auditStatus = this.data.userInfo && this.data.userInfo.auditStatus || ""; | ||
| 130 | if (auditStatus == "authorization") { | ||
| 131 | // 已经验证 去修改页,查看审核 | ||
| 132 | this.toVipVerifyHandler(); | ||
| 133 | } else if (auditStatus == "unauthorized") { | ||
| 134 | // 待验证 去修改页,查看审核 | ||
| 135 | this.toVipVerifyHandler(); | ||
| 136 | } else { | ||
| 137 | // 未验证 去编辑页,填写表单 | ||
| 138 | this.toVipLoginHandler(); | ||
| 139 | } | ||
| 140 | }, | ||
| 141 | |||
| 142 | /** | ||
| 143 | * 去验证 | ||
| 144 | */ | ||
| 145 | toVipLoginHandler() { | ||
| 146 | app.router.push({ | ||
| 147 | path: "vipLogin" | ||
| 148 | }) | ||
| 149 | }, | ||
| 150 | |||
| 151 | /** | ||
| 152 | * 查看审核 | ||
| 153 | */ | ||
| 154 | toVipVerifyHandler() { | ||
| 155 | app.router.push({ | ||
| 156 | path: "vipVerify" | ||
| 157 | }) | ||
| 158 | }, | ||
| 159 | |||
| 160 | |||
| 104 | /** | 161 | /** |
| 105 | * 请求产品 | 162 | * 请求产品 |
| 106 | */ | 163 | */ |
| ... | @@ -154,7 +211,7 @@ Page({ | ... | @@ -154,7 +211,7 @@ Page({ |
| 154 | this.setData({ | 211 | this.setData({ |
| 155 | userInfo: result | 212 | userInfo: result |
| 156 | }) | 213 | }) |
| 157 | resolve(); | 214 | resolve(result); |
| 158 | }) | 215 | }) |
| 159 | }); | 216 | }); |
| 160 | }, | 217 | }, | ... | ... |
| ... | @@ -67,7 +67,7 @@ $contentWidth:670px; | ... | @@ -67,7 +67,7 @@ $contentWidth:670px; |
| 67 | height: 40px; | 67 | height: 40px; |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | .icon-search{ | 70 | .icon-search { |
| 71 | width: 36px; | 71 | width: 36px; |
| 72 | height: 36px; | 72 | height: 36px; |
| 73 | opacity: .6; | 73 | opacity: .6; |
| ... | @@ -79,7 +79,7 @@ $contentWidth:670px; | ... | @@ -79,7 +79,7 @@ $contentWidth:670px; |
| 79 | margin-left: 4px; | 79 | margin-left: 4px; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | .t1{ | 82 | .t1 { |
| 83 | font-size: 22px; | 83 | font-size: 22px; |
| 84 | margin: 0 12px 0; | 84 | margin: 0 12px 0; |
| 85 | color: #808080; | 85 | color: #808080; |
| ... | @@ -124,6 +124,7 @@ $contentWidth:670px; | ... | @@ -124,6 +124,7 @@ $contentWidth:670px; |
| 124 | 124 | ||
| 125 | // 产品 | 125 | // 产品 |
| 126 | .product { | 126 | .product { |
| 127 | position: relative; | ||
| 127 | width: $contentWidth; | 128 | width: $contentWidth; |
| 128 | margin: 0 auto; | 129 | margin: 0 auto; |
| 129 | margin-top: 62px; | 130 | margin-top: 62px; |
| ... | @@ -172,3 +173,10 @@ $contentWidth:670px; | ... | @@ -172,3 +173,10 @@ $contentWidth:670px; |
| 172 | } | 173 | } |
| 173 | } | 174 | } |
| 174 | } | 175 | } |
| 176 | |||
| 177 | .verify-btn { | ||
| 178 | @include cb(100px, 48px, 24px); | ||
| 179 | position: absolute; | ||
| 180 | right: 0; | ||
| 181 | top: 4px; | ||
| 182 | } | ... | ... |
| ... | @@ -34,6 +34,7 @@ | ... | @@ -34,6 +34,7 @@ |
| 34 | </swiper> | 34 | </swiper> |
| 35 | </view> | 35 | </view> |
| 36 | <view class="product"> | 36 | <view class="product"> |
| 37 | <view bindtap="toVipLoginHandler" wx:if="{{!isVerify}}" class="verify-btn">去认证</view> | ||
| 37 | <view class="product-title">产品推荐{{codeStr}}</view> | 38 | <view class="product-title">产品推荐{{codeStr}}</view> |
| 38 | <view class="product-list"> | 39 | <view class="product-list"> |
| 39 | <!-- for循环 --> | 40 | <!-- for循环 --> | ... | ... |
| ... | @@ -77,12 +77,12 @@ $contentWidth:690px; | ... | @@ -77,12 +77,12 @@ $contentWidth:690px; |
| 77 | color: #333333; | 77 | color: #333333; |
| 78 | 78 | ||
| 79 | padding-left: 24px; | 79 | padding-left: 24px; |
| 80 | font-size: 20px; | 80 | font-size: 24px; |
| 81 | 81 | ||
| 82 | .t1 { | 82 | .t1 { |
| 83 | margin-left: 20px; | 83 | margin-left: 20px; |
| 84 | margin-top: 36px; | 84 | // margin-top: 36px; |
| 85 | align-self: flex-start; | 85 | align-self: center; |
| 86 | 86 | ||
| 87 | } | 87 | } |
| 88 | 88 | ... | ... |
| ... | @@ -34,7 +34,8 @@ | ... | @@ -34,7 +34,8 @@ |
| 34 | <!-- 描述 --> | 34 | <!-- 描述 --> |
| 35 | <view class="desc"> | 35 | <view class="desc"> |
| 36 | <view class="desc-tit">{{productInfo.seckillName}}</view> | 36 | <view class="desc-tit">{{productInfo.seckillName}}</view> |
| 37 | <view class="desc-t1">{{productInfo.seckillDescription}}</view> | 37 | <!-- <view class="desc-t1">{{productInfo.seckillDescription}}</view> --> |
| 38 | <text class="desc-t1">{{productInfo.seckillDescription}}</text> | ||
| 38 | <view class="desc-t1"> | 39 | <view class="desc-t1"> |
| 39 | 秒杀数量:{{productInfo.minNum == productInfo.maxNum ? productInfo.minNum+'个' : productInfo.minNum+' - '+productInfo.maxNum+'个'}} | 40 | 秒杀数量:{{productInfo.minNum == productInfo.maxNum ? productInfo.minNum+'个' : productInfo.minNum+' - '+productInfo.maxNum+'个'}} |
| 40 | </view> | 41 | </view> | ... | ... |
| ... | @@ -7,7 +7,7 @@ let app = getApp(); | ... | @@ -7,7 +7,7 @@ let app = getApp(); |
| 7 | Page({ | 7 | Page({ |
| 8 | data: { | 8 | data: { |
| 9 | authorizeVisible: false, | 9 | authorizeVisible: false, |
| 10 | signTipsCompVisible:false, | 10 | signTipsCompVisible: false, |
| 11 | isInit: false, | 11 | isInit: false, |
| 12 | total: 0, | 12 | total: 0, |
| 13 | page: 1, | 13 | page: 1, |
| ... | @@ -73,7 +73,7 @@ Page({ | ... | @@ -73,7 +73,7 @@ Page({ |
| 73 | code: curData.seckillCode, | 73 | code: curData.seckillCode, |
| 74 | } | 74 | } |
| 75 | }) | 75 | }) |
| 76 | } else if(curData.isCanDetail == 2){ | 76 | } else if (curData.isCanDetail == 2) { |
| 77 | this.setData({ | 77 | this.setData({ |
| 78 | signTipsCompVisible: true, | 78 | signTipsCompVisible: true, |
| 79 | }) | 79 | }) |
| ... | @@ -148,7 +148,6 @@ Page({ | ... | @@ -148,7 +148,6 @@ Page({ |
| 148 | this.hideMask(); | 148 | this.hideMask(); |
| 149 | break; | 149 | break; |
| 150 | 150 | ||
| 151 | |||
| 152 | // 隐藏弹窗 | 151 | // 隐藏弹窗 |
| 153 | case "_evt_hide_mask": | 152 | case "_evt_hide_mask": |
| 154 | this.hideMask(); | 153 | this.hideMask(); | ... | ... |
| ... | @@ -275,12 +275,11 @@ Page({ | ... | @@ -275,12 +275,11 @@ Page({ |
| 275 | */ | 275 | */ |
| 276 | checkVerify() { | 276 | checkVerify() { |
| 277 | let auditStatus = this.data.userInfo && this.data.userInfo.auditStatus || ""; | 277 | let auditStatus = this.data.userInfo && this.data.userInfo.auditStatus || ""; |
| 278 | // console.log("@checkVerify || auditStatus:", auditStatus); | ||
| 279 | if (auditStatus == "authorization") { | 278 | if (auditStatus == "authorization") { |
| 280 | // 已经验证 去修改页,查看审核 | 279 | // 已经验证 去修改页,查看审核 |
| 281 | this.toVipVerifyHandler(); | 280 | this.toVipVerifyHandler(); |
| 282 | } else if (auditStatus == "unauthorized") { | 281 | } else if (auditStatus == "unauthorized") { |
| 283 | // 已经验证 去修改页,查看审核 | 282 | // 待验证 去修改页,查看审核 |
| 284 | this.toVipVerifyHandler(); | 283 | this.toVipVerifyHandler(); |
| 285 | } else { | 284 | } else { |
| 286 | // 未验证 去编辑页,填写表单 | 285 | // 未验证 去编辑页,填写表单 | ... | ... |
| ... | @@ -7,6 +7,7 @@ let app = getApp(); | ... | @@ -7,6 +7,7 @@ let app = getApp(); |
| 7 | Page({ | 7 | Page({ |
| 8 | data: { | 8 | data: { |
| 9 | authorizeVisible: false, | 9 | authorizeVisible: false, |
| 10 | userInfo: {}, | ||
| 10 | // form start | 11 | // form start |
| 11 | name: "", | 12 | name: "", |
| 12 | shopName: "", | 13 | shopName: "", |
| ... | @@ -43,6 +44,16 @@ Page({ | ... | @@ -43,6 +44,16 @@ Page({ |
| 43 | this.initData(); | 44 | this.initData(); |
| 44 | }, | 45 | }, |
| 45 | initData() { | 46 | initData() { |
| 47 | this.queryMember().then((result) => { | ||
| 48 | let auditStatus = this.data.userInfo && this.data.userInfo.auditStatus || ""; | ||
| 49 | // console.log("viplogin - auditStatus:", auditStatus); | ||
| 50 | if (auditStatus == "authorization" || auditStatus == "unauthorized") { | ||
| 51 | // 未验证和待验证 | ||
| 52 | app.router.push({ | ||
| 53 | openType: "redirect", | ||
| 54 | path: "vipVerify" | ||
| 55 | }) | ||
| 56 | } else { | ||
| 46 | this.getProvince(); | 57 | this.getProvince(); |
| 47 | this.getMemberType().then((result) => { | 58 | this.getMemberType().then((result) => { |
| 48 | app.post({ | 59 | app.post({ |
| ... | @@ -63,8 +74,30 @@ Page({ | ... | @@ -63,8 +74,30 @@ Page({ |
| 63 | }) | 74 | }) |
| 64 | }) | 75 | }) |
| 65 | }) | 76 | }) |
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | }) | ||
| 82 | |||
| 66 | }, | 83 | }, |
| 67 | 84 | ||
| 85 | /** | ||
| 86 | * 获取会员信息 | ||
| 87 | */ | ||
| 88 | queryMember() { | ||
| 89 | return new Promise((resolve, reject) => { | ||
| 90 | app.post({ | ||
| 91 | url: app.api.member, | ||
| 92 | data: {} | ||
| 93 | }).then((result) => { | ||
| 94 | this.setData({ | ||
| 95 | userInfo: result | ||
| 96 | }) | ||
| 97 | resolve(result); | ||
| 98 | }) | ||
| 99 | }); | ||
| 100 | }, | ||
| 68 | 101 | ||
| 69 | /** | 102 | /** |
| 70 | * 获取用户类型 | 103 | * 获取用户类型 | ... | ... |
-
Please register or sign in to post a comment