651fca9e by simon

版本提交

1 parent 00b209ae
......@@ -33,6 +33,7 @@
"authorize-comp": "../../component/authorize-comp/authorize-comp",
"empty-tips": "../../component/empty-tips/empty-tips",
"tips-guide-register-comp": "../../component/tips-guide-register-comp/tips-guide-register-comp",
"tips-privacy-comp": "../../component/tips-privacy-comp/tips-privacy-comp",
"van-popup": "../../ui/vant-weapp/popup/index"
}
}
......
......@@ -24,6 +24,13 @@ Component({
name: "_evt_hide_mask"
});
},
// 不授权
doNotAuth() {
// this.hideMask();
this.triggerEvent('evtcomp', {
name: "_evt_do_not_auth"
});
},
authComplete() {
this.triggerEvent('evtcomp', {
name: "_evt_auth_complete"
......@@ -37,7 +44,7 @@ Component({
} else {
wx.showToast({
title: "请允许授权",
icon:"none"
icon: "none"
})
}
},
......
......@@ -28,21 +28,36 @@
}
.tips {
margin-top: 50px;
font-size: 32px;
margin-top: 12px;
font-size: 28px;
line-height: 48px;
padding: 0 28px;
@extend .bb;
color: #333333;
}
}
.btn {
@include cb(300px, 80px);
.btn-wrap {
position: absolute;
left: 0;
right: 0;
bottom: 80px;
margin: 0 auto;
// margin: 0 auto;
display: flex;
justify-content: center;
.btn {
@include cb(220px, 64px);
margin: 0 12px;
}
.gray {
background: transparent;
background-color: #d2d2d2;
}
}
}
......
......@@ -4,7 +4,10 @@
<view class="logo">
<image mode="widthFix" src="../../image/logo.png" />
</view>
<view class="tips">参与活动需要您的微信授权哦</view>
<view class="tips">参与丸美心愿单活动,需获取您微信相关信息才能创建心愿单和获取礼品哦~</view>
</view>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
<view class="btn-wrap">
<button class="btn gray" bindtap="doNotAuth">暂不授权</button>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
</view>
\ No newline at end of file
......
Component({
options: {
styleIsolation: 'apply-shared'
},
properties: {
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText: {
type: String,
value: 'default value',
}
},
data: {
// 这里是一些组件内部数据
someData: {}
},
methods: {
// 这里是一个自定义方法
customMethod() {
this.triggerEvent('evtcomp', {
name: "_evt_custom"
})
},
// 隐藏蒙层
hideMask() {
this.triggerEvent('evtcomp', {
name: "_evt_hide_mask"
});
}
}
})
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.comp-item {
position: relative;
width: 654px;
height: 1036px;
// background-color: wheat;
.bg {
position: absolute;
width: 654px;
height: 1036px;
}
.space1 {
height: 730px;
}
.btn {
// @include cb(234px, 64px);
@include cb(300px, 80px);
position: absolute;
left: 0;
right: 0;
top: 1460px;
// top: 1260px;
margin: 0 auto;
}
}
.close-wrap {
text-align: center;
color: #ffffff;
.iconfont {
font-size: 100px;
}
}
<scroll-view scroll-y="{{true}}" class="comp-item">
<image class="bg" src="../../image/oss/tips/tips-privacy.png" mode="widthFix" />
<view class="space1"></view>
</scroll-view>
<view class="close-wrap">
<span bindtap="hideMask" class="iconfont iconclose1"></span>
</view>
......@@ -56,6 +56,10 @@ Component({
}).then((result) => {
let curData = app.globalData.giftData
curData = Object.assign(curData, result);
// modify 2019-09-20
// curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
app.globalData.giftData = curData;
console.log("app.globalData.giftData 333:", app.globalData.giftData);
console.log(JSON.stringify(app.globalData.giftData));
......
......@@ -11,7 +11,7 @@ function wxLogin() {
success: function (res) {
// isWxLogin = true;
Store.setItem('wxcode', res.code);
resolve();
resolve(res.code);
}
});
});
......@@ -47,7 +47,7 @@ function login() {
wx.request({
url: baseUrl + '/warubiEyeCreamApi/app/login',
data: {
code: Store.getItem('wxcode')
code: result
},
method: 'POST',
success: function (res2) {
......
......@@ -327,6 +327,12 @@ Page({
}
break;
// 拒绝授权回首页
case "_evt_do_not_auth":
this.hideMask();
this.onPlayTooHandler();
break;
// 前往注册页面
case "_evt_to_register":
this.hideMask();
......
......@@ -79,6 +79,9 @@ Page({
},
// 查看可用门店
onNearbyStoreHandler(evt) {
if(this.data.used){
return;
}
this.wxLocation();
},
// 使用微信位置
......@@ -175,7 +178,7 @@ Page({
console.log(res);
}
});
}, 50);
}, 500);
},
//适配不同屏幕大小的canvas
setCanvasSize(sz) {
......
......@@ -94,6 +94,11 @@ Page({
this.hideMask();
break;
// 拒绝授权
case "_evt_do_not_auth":
this.hideMask();
break;
default:
break;
}
......
......@@ -94,6 +94,9 @@ Page({
},
// 查看可用门店
onNearbyStoreHandler(evt) {
if(this.data.used){
return;
}
this.wxLocation();
},
// 使用微信位置
......@@ -189,7 +192,7 @@ Page({
console.log(res);
}
});
}, 50);
}, 1000);
},
//适配不同屏幕大小的canvas
......
......@@ -10,6 +10,7 @@ Page({
redirect: "createWish", // 注册完的重定向页面
tipsRegisteredVisible: false,
tipsCommonVisible: false,
tipsPrivacyVisible: false,
// form start
name: "",
mobile: "",
......@@ -153,7 +154,11 @@ Page({
})
},
// 跳转至会员条款
onPolicyHandler() {},
onPolicyHandler() {
this.setData({
tipsPrivacyVisible:true
})
},
// 跳转到登陆页面
toLoginHandler() {
app.router.push({
......@@ -278,6 +283,14 @@ Page({
})
},
hideMask() {
this.setData({
tipsRegisteredVisible: false,
tipsPrivacyVisible: false,
tipsCommonVisible: false,
})
},
// 子组件事件
evtcomp(evt) {
let {
......@@ -287,10 +300,7 @@ Page({
switch (name) {
case "_evt_hide_mask":
this.setData({
tipsRegisteredVisible: false,
tipsCommonVisible: false
})
this.hideMask();
break;
default:
......
......@@ -99,6 +99,9 @@
<van-popup show="{{ tipsRegisteredVisible }}">
<tips-register-ed-comp bind:evtcomp="evtcomp"></tips-register-ed-comp>
</van-popup>
<van-popup show="{{ tipsPrivacyVisible }}" bind:click-overlay="hideMask">
<tips-privacy-comp bind:evtcomp="evtcomp"></tips-privacy-comp>
</van-popup>
<van-popup show="{{ tipsCommonVisible }}">
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
</van-popup>
......
......@@ -225,7 +225,8 @@ $iptHeight:80px;
margin-bottom: 30px;
.label {
width: 80px;
// width: 80px;
width: 130px;
}
.val {
......
......@@ -82,6 +82,16 @@
<view class="label">地址</view>
<view class="val">{{addressStr}}</view>
</view>
<block wx:if="{{order.logisticsCompany && order.logisticsSn}}">
<view class="form-item">
<view class="label">物流公司</view>
<text selectable="{{true}}" class="val">{{order.logisticsCompany}}</text>
</view>
<view class="form-item">
<view class="label">物流单号</view>
<text selectable="{{true}}" class="val">{{order.logisticsSn}}</text>
</view>
</block>
</view>
<view bindtap="onWishHandler" class="submit-btn">返回首页</view>
</view>
......
......@@ -178,6 +178,8 @@ Page({
curWish: curData,
status: curData.status
})
// modify 2019-09-20
// curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
app.globalData.giftData = curData;
console.log("app.globalData.giftData 111:", app.globalData.giftData);
console.log(JSON.stringify(app.globalData.giftData));
......