e3fcabea by simon

默认提交

1 parent 97275c2a
...@@ -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 })
...@@ -116,7 +116,7 @@ Page({ ...@@ -116,7 +116,7 @@ Page({
116 }) 116 })
117 }, 117 },
118 118
119 /** 119 /**
120 * 去验证 120 * 去验证
121 */ 121 */
122 toVipLoginHandler() { 122 toVipLoginHandler() {
...@@ -142,19 +142,18 @@ Page({ ...@@ -142,19 +142,18 @@ Page({
142 switch (name) { 142 switch (name) {
143 143
144 144
145 // 去验证 145 // 去验证
146 case "_evt_to_verify": 146 case "_evt_to_verify":
147 this.hideMask(); 147 this.hideMask();
148 this.toVipLoginHandler(); 148 this.toVipLoginHandler();
149 break; 149 break;
150
151 150
152 // 暂不验证 151 // 暂不验证
153 case "_evt_not_verify": 152 case "_evt_not_verify":
154 this.hideMask(); 153 this.hideMask();
155 break; 154 break;
156 155
157 // 隐藏弹窗 156 // 隐藏弹窗
158 case "_evt_hide_mask": 157 case "_evt_hide_mask":
159 this.hideMask(); 158 this.hideMask();
160 break; 159 break;
......
...@@ -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 })
...@@ -112,7 +112,7 @@ Page({ ...@@ -112,7 +112,7 @@ Page({
112 }) 112 })
113 }, 113 },
114 114
115 /** 115 /**
116 * 去验证 116 * 去验证
117 */ 117 */
118 toVipLoginHandler() { 118 toVipLoginHandler() {
...@@ -137,19 +137,18 @@ Page({ ...@@ -137,19 +137,18 @@ Page({
137 } = evt.detail; 137 } = evt.detail;
138 switch (name) { 138 switch (name) {
139 139
140 // 去验证 140 // 去验证
141 case "_evt_to_verify": 141 case "_evt_to_verify":
142 this.hideMask(); 142 this.hideMask();
143 this.toVipLoginHandler(); 143 this.toVipLoginHandler();
144 break; 144 break;
145 145
146 // 暂不验证 146 // 暂不验证
147 case "_evt_not_verify": 147 case "_evt_not_verify":
148 this.hideMask(); 148 this.hideMask();
149 break; 149 break;
150
151 150
152 // 隐藏弹窗 151 // 隐藏弹窗
153 case "_evt_hide_mask": 152 case "_evt_hide_mask":
154 this.hideMask(); 153 this.hideMask();
155 break; 154 break;
......
...@@ -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,29 +44,61 @@ Page({ ...@@ -43,29 +44,61 @@ Page({
43 this.initData(); 44 this.initData();
44 }, 45 },
45 initData() { 46 initData() {
46 this.getProvince(); 47 this.queryMember().then((result) => {
47 this.getMemberType().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 {
57 this.getProvince();
58 this.getMemberType().then((result) => {
59 app.post({
60 url: app.api.memberIdQuery,
61 data: {},
62 }).then((result) => {
63 let verifyInfo = result;
64 this.setData({
65 name: verifyInfo.realName,
66 mobile: verifyInfo.phone,
67 province: verifyInfo.province,
68 city: verifyInfo.city,
69 memberTypeCode: verifyInfo.memberTypeCode,
70 memberTypeName: verifyInfo.memberTypeName,
71 files: [{
72 path: verifyInfo.images
73 }]
74 })
75 })
76 })
77 }
78
79
80
81 })
82
83 },
84
85 /**
86 * 获取会员信息
87 */
88 queryMember() {
89 return new Promise((resolve, reject) => {
48 app.post({ 90 app.post({
49 url: app.api.memberIdQuery, 91 url: app.api.member,
50 data: {}, 92 data: {}
51 }).then((result) => { 93 }).then((result) => {
52 let verifyInfo = result;
53 this.setData({ 94 this.setData({
54 name: verifyInfo.realName, 95 userInfo: result
55 mobile: verifyInfo.phone,
56 province: verifyInfo.province,
57 city: verifyInfo.city,
58 memberTypeCode: verifyInfo.memberTypeCode,
59 memberTypeName: verifyInfo.memberTypeName,
60 files: [{
61 path: verifyInfo.images
62 }]
63 }) 96 })
97 resolve(result);
64 }) 98 })
65 }) 99 });
66 }, 100 },
67 101
68
69 /** 102 /**
70 * 获取用户类型 103 * 获取用户类型
71 */ 104 */
......