Authored by QC-L

登录兼容 review by 黄敬囿

... ... @@ -9,7 +9,7 @@ let CHOOSED_COUNTRY_ID = 'CHOOSED_COUNTRY_ID'
let CHOOSED_COUNTRY_NAME = 'CHOOSED_COUNTRY_NAME'
let app = getApp();
const {extend,Toast} = require('../../vendors/zanui/index');
const event = global.event;
Page(extend({},Toast,{
/**
* 页面的初始数据
... ... @@ -185,11 +185,12 @@ Page(extend({},Toast,{
//如果是从h5页面唤起,则重新用webview 打开h5链接;其他页面直接返回上一层
if (that.data.h5back){
wx.navigateBack({
delta: 1,
delta: 2,
})
wx.redirectTo({
url: '../webview/webview?url=' + that.data.h5back
})
event.emit('wechat-login-success');
}else{
if (result.is_register){
that.showZanToast({
... ... @@ -200,8 +201,9 @@ Page(extend({},Toast,{
prePage[prePage.length - 2].bindPhoneNumComplete();
}
wx.navigateBack({
delta: 1,
delta: 2,
})
event.emit('wechat-login-success');
}
}, 1500);
} else {
... ... @@ -210,6 +212,7 @@ Page(extend({},Toast,{
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
prePage[prePage.length - 2].bindPhoneNumComplete();
}
event.emit('wechat-login-success');
wx.navigateBack({
delta: 1,
})
... ... @@ -427,6 +430,7 @@ bindBtnAction:function (needBind, callBackFun) {
} else {
that.redirectAction();
}
event.emit('wechat-login-success');
}
})
},
... ... @@ -438,21 +442,21 @@ redirectAction: function() {
let that = this;
if (that.data.h5back) {
wx.navigateBack({
delta: 1,
delta: 2,
})
wx.redirectTo({
url: '../webview/webview?url=' + that.data.h5back
})
} else {
let prePage = getCurrentPages();
that.newCustomerStorage();
if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
prePage[prePage.length - 2].bindPhoneNumComplete();
}
// let prePage = getCurrentPages();
// that.newCustomerStorage();
// if (prePage.length > 1 && prePage[prePage.length - 2].bindPhoneNumComplete != undefined) {
// prePage[prePage.length - 2].bindPhoneNumComplete();
// }
// console.log("currentPage:", getCurrentPages())
wx.navigateBack({
delta: 1,
delta: 2,
})
return
}
... ...
... ... @@ -66,7 +66,7 @@
<button catchtap="bindBtnAction" class="view-bindBtn {{disabledClass == undefined ? 'disabled' : disabledClass}}" >完成</button>
<button class="view-verifyBtn" open-type="{{hasUnionID?'getPhoneNumber':'getUserInfo'}}" bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>自动验证</button>
<!-- <button class="view-verifyBtn" open-type="{{hasUnionID?'getPhoneNumber':'getUserInfo'}}" bindgetphonenumber="getPhoneNumber" bindgetuserinfo='getUserInfo'>自动验证</button> -->
</view>
... ...
... ... @@ -503,7 +503,7 @@ Page(Object.assign({
onShareAppMessage(res) {
let params = {
TITLE: `【0元抽奖】点一下,免费拿走${this.data.product.name}`,
DESC: '我在有货精选发现一个不错的商品赶快来看看吧!'
DESC: '我在YO!LUCK发现一个不错的商品赶快来看看吧!'
};
if (res.from === 'menu') {
... ...
... ... @@ -458,7 +458,6 @@ Page(Object.assign({
},
loginSuccess(params) {
console.log(params);
let app = getApp();
this.setData({
isLogin: app.isLogin(),
... ...
... ... @@ -232,7 +232,7 @@ Page(Object.assign({
onShareAppMessage(res) {
let params = {
TITLE: `【0元抽奖】点一下,免费拿走${this.data.shareProduct.name}`,
DESC: '我在有货精选发现一个不错的商品赶快来看看吧!'
DESC: '我在YO!LUCK发现一个不错的商品赶快来看看吧!'
};
if (res.from === 'menu') {
... ...
... ... @@ -38,8 +38,8 @@
.yoho-logo {
width: 200rpx;
height: 40rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.content {
... ... @@ -78,27 +78,30 @@
.product-name {
color: #444444;
text-align: center;
font-size: 30rpx;
font-size: 32rpx;
margin-top: 30rpx;
margin-bottom: 20rpx;
/* line-height: 50rpx; */
line-height: 60rpx;
font-weight: bold;
display: inherit;
display: -webkit-box;
overflow: hidden;
text-overflow:ellipsis;
white-space: pre-wrap;
text-overflow: ellipsis;
word-wrap: normal;
white-space: normal !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
padding: 0 40rpx;
padding: 0 10rpx;
font-family: SanFranciscoText-Bold;
/* white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden; */
}
.product-price {
font-family: SanFranciscoText-Bold;
text-align: center;
font-size: 34rpx;
margin: 30rpx 0;
margin: 20rpx 0;
}
.price {
... ...