651fca9e by simon

版本提交

1 parent 00b209ae
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
33 "authorize-comp": "../../component/authorize-comp/authorize-comp", 33 "authorize-comp": "../../component/authorize-comp/authorize-comp",
34 "empty-tips": "../../component/empty-tips/empty-tips", 34 "empty-tips": "../../component/empty-tips/empty-tips",
35 "tips-guide-register-comp": "../../component/tips-guide-register-comp/tips-guide-register-comp", 35 "tips-guide-register-comp": "../../component/tips-guide-register-comp/tips-guide-register-comp",
36 "tips-privacy-comp": "../../component/tips-privacy-comp/tips-privacy-comp",
36 "van-popup": "../../ui/vant-weapp/popup/index" 37 "van-popup": "../../ui/vant-weapp/popup/index"
37 } 38 }
38 } 39 }
......
...@@ -24,6 +24,13 @@ Component({ ...@@ -24,6 +24,13 @@ Component({
24 name: "_evt_hide_mask" 24 name: "_evt_hide_mask"
25 }); 25 });
26 }, 26 },
27 // 不授权
28 doNotAuth() {
29 // this.hideMask();
30 this.triggerEvent('evtcomp', {
31 name: "_evt_do_not_auth"
32 });
33 },
27 authComplete() { 34 authComplete() {
28 this.triggerEvent('evtcomp', { 35 this.triggerEvent('evtcomp', {
29 name: "_evt_auth_complete" 36 name: "_evt_auth_complete"
...@@ -37,7 +44,7 @@ Component({ ...@@ -37,7 +44,7 @@ Component({
37 } else { 44 } else {
38 wx.showToast({ 45 wx.showToast({
39 title: "请允许授权", 46 title: "请允许授权",
40 icon:"none" 47 icon: "none"
41 }) 48 })
42 } 49 }
43 }, 50 },
......
...@@ -28,21 +28,36 @@ ...@@ -28,21 +28,36 @@
28 } 28 }
29 29
30 .tips { 30 .tips {
31 margin-top: 50px; 31 margin-top: 12px;
32 font-size: 32px; 32 font-size: 28px;
33 33 line-height: 48px;
34 padding: 0 28px;
35 @extend .bb;
34 color: #333333; 36 color: #333333;
35 37
36 } 38 }
37 } 39 }
38 40
39 .btn { 41 .btn-wrap {
40 @include cb(300px, 80px);
41 position: absolute; 42 position: absolute;
42 left: 0; 43 left: 0;
43 right: 0; 44 right: 0;
44 bottom: 80px; 45 bottom: 80px;
45 margin: 0 auto; 46 // margin: 0 auto;
47 display: flex;
48 justify-content: center;
49
50 .btn {
51 @include cb(220px, 64px);
52 margin: 0 12px;
46 } 53 }
47 54
55 .gray {
56 background: transparent;
57 background-color: #d2d2d2;
58 }
59 }
60
61
62
48 } 63 }
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
4 <view class="logo"> 4 <view class="logo">
5 <image mode="widthFix" src="../../image/logo.png" /> 5 <image mode="widthFix" src="../../image/logo.png" />
6 </view> 6 </view>
7 <view class="tips">参与活动需要您的微信授权哦</view> 7 <view class="tips">参与丸美心愿单活动,需获取您微信相关信息才能创建心愿单和获取礼品哦~</view>
8 </view> 8 </view>
9 <view class="btn-wrap">
10 <button class="btn gray" bindtap="doNotAuth">暂不授权</button>
9 <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button> 11 <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
12 </view>
10 </view> 13 </view>
...\ No newline at end of file ...\ No newline at end of file
......
1 Component({
2 options: {
3 styleIsolation: 'apply-shared'
4 },
5 properties: {
6 // 这里定义了innerText属性,属性值可以在组件使用时指定
7 innerText: {
8 type: String,
9 value: 'default value',
10 }
11 },
12 data: {
13 // 这里是一些组件内部数据
14 someData: {}
15 },
16 methods: {
17 // 这里是一个自定义方法
18 customMethod() {
19 this.triggerEvent('evtcomp', {
20 name: "_evt_custom"
21 })
22 },
23 // 隐藏蒙层
24 hideMask() {
25 this.triggerEvent('evtcomp', {
26 name: "_evt_hide_mask"
27 });
28 }
29 }
30 })
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .comp-item {
5 position: relative;
6 width: 654px;
7 height: 1036px;
8
9 // background-color: wheat;
10 .bg {
11 position: absolute;
12 width: 654px;
13 height: 1036px;
14 }
15
16 .space1 {
17 height: 730px;
18 }
19
20 .btn {
21 // @include cb(234px, 64px);
22 @include cb(300px, 80px);
23 position: absolute;
24 left: 0;
25 right: 0;
26 top: 1460px;
27 // top: 1260px;
28 margin: 0 auto;
29 }
30
31
32 }
33
34 .close-wrap {
35 text-align: center;
36 color: #ffffff;
37
38 .iconfont {
39 font-size: 100px;
40 }
41
42 }
1 <scroll-view scroll-y="{{true}}" class="comp-item">
2 <image class="bg" src="../../image/oss/tips/tips-privacy.png" mode="widthFix" />
3 <view class="space1"></view>
4 </scroll-view>
5 <view class="close-wrap">
6 <span bindtap="hideMask" class="iconfont iconclose1"></span>
7 </view>
...@@ -56,6 +56,10 @@ Component({ ...@@ -56,6 +56,10 @@ Component({
56 }).then((result) => { 56 }).then((result) => {
57 let curData = app.globalData.giftData 57 let curData = app.globalData.giftData
58 curData = Object.assign(curData, result); 58 curData = Object.assign(curData, result);
59
60 // modify 2019-09-20
61 // curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
62
59 app.globalData.giftData = curData; 63 app.globalData.giftData = curData;
60 console.log("app.globalData.giftData 333:", app.globalData.giftData); 64 console.log("app.globalData.giftData 333:", app.globalData.giftData);
61 console.log(JSON.stringify(app.globalData.giftData)); 65 console.log(JSON.stringify(app.globalData.giftData));
......
...@@ -11,7 +11,7 @@ function wxLogin() { ...@@ -11,7 +11,7 @@ function wxLogin() {
11 success: function (res) { 11 success: function (res) {
12 // isWxLogin = true; 12 // isWxLogin = true;
13 Store.setItem('wxcode', res.code); 13 Store.setItem('wxcode', res.code);
14 resolve(); 14 resolve(res.code);
15 } 15 }
16 }); 16 });
17 }); 17 });
...@@ -47,7 +47,7 @@ function login() { ...@@ -47,7 +47,7 @@ function login() {
47 wx.request({ 47 wx.request({
48 url: baseUrl + '/warubiEyeCreamApi/app/login', 48 url: baseUrl + '/warubiEyeCreamApi/app/login',
49 data: { 49 data: {
50 code: Store.getItem('wxcode') 50 code: result
51 }, 51 },
52 method: 'POST', 52 method: 'POST',
53 success: function (res2) { 53 success: function (res2) {
......
...@@ -327,6 +327,12 @@ Page({ ...@@ -327,6 +327,12 @@ Page({
327 } 327 }
328 break; 328 break;
329 329
330 // 拒绝授权回首页
331 case "_evt_do_not_auth":
332 this.hideMask();
333 this.onPlayTooHandler();
334 break;
335
330 // 前往注册页面 336 // 前往注册页面
331 case "_evt_to_register": 337 case "_evt_to_register":
332 this.hideMask(); 338 this.hideMask();
......
...@@ -79,6 +79,9 @@ Page({ ...@@ -79,6 +79,9 @@ Page({
79 }, 79 },
80 // 查看可用门店 80 // 查看可用门店
81 onNearbyStoreHandler(evt) { 81 onNearbyStoreHandler(evt) {
82 if(this.data.used){
83 return;
84 }
82 this.wxLocation(); 85 this.wxLocation();
83 }, 86 },
84 // 使用微信位置 87 // 使用微信位置
...@@ -175,7 +178,7 @@ Page({ ...@@ -175,7 +178,7 @@ Page({
175 console.log(res); 178 console.log(res);
176 } 179 }
177 }); 180 });
178 }, 50); 181 }, 500);
179 }, 182 },
180 //适配不同屏幕大小的canvas 183 //适配不同屏幕大小的canvas
181 setCanvasSize(sz) { 184 setCanvasSize(sz) {
......
...@@ -94,6 +94,11 @@ Page({ ...@@ -94,6 +94,11 @@ Page({
94 this.hideMask(); 94 this.hideMask();
95 break; 95 break;
96 96
97 // 拒绝授权
98 case "_evt_do_not_auth":
99 this.hideMask();
100 break;
101
97 default: 102 default:
98 break; 103 break;
99 } 104 }
......
...@@ -94,6 +94,9 @@ Page({ ...@@ -94,6 +94,9 @@ Page({
94 }, 94 },
95 // 查看可用门店 95 // 查看可用门店
96 onNearbyStoreHandler(evt) { 96 onNearbyStoreHandler(evt) {
97 if(this.data.used){
98 return;
99 }
97 this.wxLocation(); 100 this.wxLocation();
98 }, 101 },
99 // 使用微信位置 102 // 使用微信位置
...@@ -189,7 +192,7 @@ Page({ ...@@ -189,7 +192,7 @@ Page({
189 console.log(res); 192 console.log(res);
190 } 193 }
191 }); 194 });
192 }, 50); 195 }, 1000);
193 196
194 }, 197 },
195 //适配不同屏幕大小的canvas 198 //适配不同屏幕大小的canvas
......
...@@ -10,6 +10,7 @@ Page({ ...@@ -10,6 +10,7 @@ Page({
10 redirect: "createWish", // 注册完的重定向页面 10 redirect: "createWish", // 注册完的重定向页面
11 tipsRegisteredVisible: false, 11 tipsRegisteredVisible: false,
12 tipsCommonVisible: false, 12 tipsCommonVisible: false,
13 tipsPrivacyVisible: false,
13 // form start 14 // form start
14 name: "", 15 name: "",
15 mobile: "", 16 mobile: "",
...@@ -153,7 +154,11 @@ Page({ ...@@ -153,7 +154,11 @@ Page({
153 }) 154 })
154 }, 155 },
155 // 跳转至会员条款 156 // 跳转至会员条款
156 onPolicyHandler() {}, 157 onPolicyHandler() {
158 this.setData({
159 tipsPrivacyVisible:true
160 })
161 },
157 // 跳转到登陆页面 162 // 跳转到登陆页面
158 toLoginHandler() { 163 toLoginHandler() {
159 app.router.push({ 164 app.router.push({
...@@ -278,6 +283,14 @@ Page({ ...@@ -278,6 +283,14 @@ Page({
278 }) 283 })
279 }, 284 },
280 285
286 hideMask() {
287 this.setData({
288 tipsRegisteredVisible: false,
289 tipsPrivacyVisible: false,
290 tipsCommonVisible: false,
291 })
292 },
293
281 // 子组件事件 294 // 子组件事件
282 evtcomp(evt) { 295 evtcomp(evt) {
283 let { 296 let {
...@@ -287,10 +300,7 @@ Page({ ...@@ -287,10 +300,7 @@ Page({
287 switch (name) { 300 switch (name) {
288 301
289 case "_evt_hide_mask": 302 case "_evt_hide_mask":
290 this.setData({ 303 this.hideMask();
291 tipsRegisteredVisible: false,
292 tipsCommonVisible: false
293 })
294 break; 304 break;
295 305
296 default: 306 default:
......
...@@ -99,6 +99,9 @@ ...@@ -99,6 +99,9 @@
99 <van-popup show="{{ tipsRegisteredVisible }}"> 99 <van-popup show="{{ tipsRegisteredVisible }}">
100 <tips-register-ed-comp bind:evtcomp="evtcomp"></tips-register-ed-comp> 100 <tips-register-ed-comp bind:evtcomp="evtcomp"></tips-register-ed-comp>
101 </van-popup> 101 </van-popup>
102 <van-popup show="{{ tipsPrivacyVisible }}" bind:click-overlay="hideMask">
103 <tips-privacy-comp bind:evtcomp="evtcomp"></tips-privacy-comp>
104 </van-popup>
102 <van-popup show="{{ tipsCommonVisible }}"> 105 <van-popup show="{{ tipsCommonVisible }}">
103 <tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp> 106 <tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
104 </van-popup> 107 </van-popup>
......
...@@ -225,7 +225,8 @@ $iptHeight:80px; ...@@ -225,7 +225,8 @@ $iptHeight:80px;
225 margin-bottom: 30px; 225 margin-bottom: 30px;
226 226
227 .label { 227 .label {
228 width: 80px; 228 // width: 80px;
229 width: 130px;
229 } 230 }
230 231
231 .val { 232 .val {
......
...@@ -82,6 +82,16 @@ ...@@ -82,6 +82,16 @@
82 <view class="label">地址</view> 82 <view class="label">地址</view>
83 <view class="val">{{addressStr}}</view> 83 <view class="val">{{addressStr}}</view>
84 </view> 84 </view>
85 <block wx:if="{{order.logisticsCompany && order.logisticsSn}}">
86 <view class="form-item">
87 <view class="label">物流公司</view>
88 <text selectable="{{true}}" class="val">{{order.logisticsCompany}}</text>
89 </view>
90 <view class="form-item">
91 <view class="label">物流单号</view>
92 <text selectable="{{true}}" class="val">{{order.logisticsSn}}</text>
93 </view>
94 </block>
85 </view> 95 </view>
86 <view bindtap="onWishHandler" class="submit-btn">返回首页</view> 96 <view bindtap="onWishHandler" class="submit-btn">返回首页</view>
87 </view> 97 </view>
......
...@@ -178,6 +178,8 @@ Page({ ...@@ -178,6 +178,8 @@ Page({
178 curWish: curData, 178 curWish: curData,
179 status: curData.status 179 status: curData.status
180 }) 180 })
181 // modify 2019-09-20
182 // curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
181 app.globalData.giftData = curData; 183 app.globalData.giftData = curData;
182 console.log("app.globalData.giftData 111:", app.globalData.giftData); 184 console.log("app.globalData.giftData 111:", app.globalData.giftData);
183 console.log(JSON.stringify(app.globalData.giftData)); 185 console.log(JSON.stringify(app.globalData.giftData));
......