feat: 实现用户登录完成订阅活动消息,实现活动专题商品分类大小,修复店铺加好友二维码点击打电话问题,测试订单支付完成白屏问题,调整店铺商品加购悬浮尺寸
This commit is contained in:
parent
02f9fcbf5c
commit
f04b8383bc
@ -1,29 +1,12 @@
|
||||
<template>
|
||||
<view class="loginPopup-container">
|
||||
<uni-popup
|
||||
ref="popup"
|
||||
type="bottom"
|
||||
:mask-click="false"
|
||||
:safe-area="true"
|
||||
:borderRadius="'10px 10x 10px 10px'"
|
||||
>
|
||||
<uni-popup ref="popup" type="bottom" :mask-click="false" :safe-area="true" :borderRadius="'10px 10x 10px 10px'">
|
||||
<view class="popup-box">
|
||||
<view class="head-img"></view>
|
||||
<view
|
||||
v-if="showCloseIcon"
|
||||
class="uni-icon uni-icon-closeempty"
|
||||
color="#888"
|
||||
@click="close"
|
||||
></view>
|
||||
<view v-if="showCloseIcon" class="uni-icon uni-icon-closeempty" color="#888" @click="close"></view>
|
||||
<view class="popup-content">
|
||||
|
||||
<!-- <view class="title"> 微信账号登录小发同城小程序 </view> -->
|
||||
<button
|
||||
class="btn-login"
|
||||
open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber"
|
||||
>
|
||||
|
||||
<button class="btn-login" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<view>手机号快捷登录</view>
|
||||
</button>
|
||||
</view>
|
||||
@ -40,13 +23,18 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showCloseIcon:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
}
|
||||
showCloseIcon: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
tmplIds: [
|
||||
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||
// "Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["showLoginPopup", "Config"]),
|
||||
@ -63,7 +51,7 @@ export default {
|
||||
// immediate: true,
|
||||
},
|
||||
},
|
||||
onUnload() {},
|
||||
onUnload() { },
|
||||
onHide() {
|
||||
this.close();
|
||||
},
|
||||
@ -96,8 +84,8 @@ export default {
|
||||
that.$.request({
|
||||
url: that.cf.URL.get_miniapp_open_id,
|
||||
data: params,
|
||||
success: (data, status, msg, code) => {},
|
||||
fail: (err, status) => {},
|
||||
success: (data, status, msg, code) => { },
|
||||
fail: (err, status) => { },
|
||||
});
|
||||
} else {
|
||||
that.$.showModal({
|
||||
@ -154,6 +142,63 @@ export default {
|
||||
},
|
||||
success: function (res) {
|
||||
that.doWxUserRegisterAndLogin(res.phoneNumber);
|
||||
|
||||
setTimeout(() => {
|
||||
that.$.showModal({
|
||||
title: "订阅提示",
|
||||
content: "是否订阅活动消息通知?",
|
||||
cancelText: "暂不订阅",
|
||||
confirmText: "立即订阅",
|
||||
success: async function (n) {
|
||||
if (n.confirm) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: that.tmplIds,
|
||||
success(rsp) {
|
||||
let acceptCount = 0;
|
||||
let rejectCount = 0;
|
||||
|
||||
console.log("success res====", rsp);
|
||||
|
||||
for (const templateId in rsp) {
|
||||
if (that.tmplIds.includes(templateId)) {
|
||||
const result = rsp[templateId];
|
||||
if (result === "accept") {
|
||||
acceptCount++;
|
||||
} else if (
|
||||
result === "reject" ||
|
||||
result === "ban"
|
||||
) {
|
||||
rejectCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (acceptCount > 0 && rejectCount === 0) {
|
||||
uni.showToast({
|
||||
title: "订阅成功",
|
||||
});
|
||||
} else if (acceptCount === 0 && rejectCount > 0) {
|
||||
uni.showToast({
|
||||
title: "已拒绝订阅",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已订阅或拒绝",
|
||||
});
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
that.$.showModal({
|
||||
content: `${res.errCode}:${res.errMsg}`,
|
||||
showCancel: false,
|
||||
confirmText: "好的",
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}, 500);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
@ -280,4 +325,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -339,10 +339,10 @@
|
||||
:y="initY + 44 + 10">
|
||||
<view class="mCS" :style="{
|
||||
'background-color': item.bgColor,
|
||||
borderTopLeftRadius: (item.borderTopLeftRadius || 0) + 'px',
|
||||
borderTopRightRadius: (item.borderTopRightRadius || 0) + 'px',
|
||||
borderBottomLeftRadius: (item.borderBottomLeftRadius || 0) + 'px',
|
||||
borderBottomRightRadius: (item.borderBottomRightRadius || 0) + 'px',
|
||||
borderTopLeftRadius: (item.borderTopLeftRadius) + 'px',
|
||||
borderTopRightRadius: (item.borderTopRightRadius) + 'px',
|
||||
borderBottomLeftRadius: (item.borderBottomLeftRadius) + 'px',
|
||||
borderBottomRightRadius: (item.borderBottomRightRadius) + 'px',
|
||||
overflow: 'hidden',
|
||||
}">
|
||||
<!-- #ifdef MP-WEIXIN&&false -->
|
||||
@ -1147,8 +1147,9 @@ export default {
|
||||
console.log('=====',parseInt(t.type))
|
||||
switch (parseInt(t.type)) {
|
||||
case 0:
|
||||
if (typeof t.mobile != "undefined" || t.mobile != "") {
|
||||
console.log('==进来了===')
|
||||
//if (typeof t.mobile != "undefined" || t.mobile != "") {
|
||||
if (t?.mobile) {
|
||||
console.log('==进来了===', t.mobile)
|
||||
uni.makePhoneCall({
|
||||
phoneNumber:
|
||||
typeof t.mobile != "undefined" ? t.mobile.toString() : "", //电话号码
|
||||
@ -1541,6 +1542,7 @@ uni-page-body {
|
||||
|
||||
.mCS {
|
||||
position: initial;
|
||||
border-radius: 100% !important;
|
||||
}
|
||||
|
||||
.diyPage {
|
||||
@ -1566,4 +1568,16 @@ uni-page-body {
|
||||
.disable {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
||||
.boxGrid{
|
||||
padding-left: 10rpx !important;
|
||||
padding-right: 10rpx !important;
|
||||
}
|
||||
.boxGridIcon{
|
||||
width: 122rpx;
|
||||
height: 122rpx;
|
||||
image{
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1200,7 +1200,10 @@ export default {
|
||||
time: null,
|
||||
isReminderOrder: false,
|
||||
subscribe: 0,
|
||||
tmplIds: ["kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc", "Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc"],
|
||||
tmplIds: [
|
||||
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
|
||||
"Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -1253,35 +1256,38 @@ export default {
|
||||
this.notice.addNotification("RefreshMessage", this.RefreshMessage, this);
|
||||
},
|
||||
onShow: function () {
|
||||
const _this = this
|
||||
const _this = this;
|
||||
this.InitPage(this.options);
|
||||
|
||||
if (this.subscribe == 1) {
|
||||
$.showModal({
|
||||
title: "订阅提示",
|
||||
content: "是否订阅活动消息通知?",
|
||||
cancelText: "暂不订阅",
|
||||
confirmText: "立即订阅",
|
||||
success: function (n) {
|
||||
if (n.confirm) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: _this.tmplIds,
|
||||
success(res) {
|
||||
console.log("success res====", res);
|
||||
uni.showToast({
|
||||
title: "消息已订阅",
|
||||
});
|
||||
},
|
||||
fail(res) {
|
||||
uni.showToast({
|
||||
title: "稍后再试",
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
// setTimeout(() => {
|
||||
// try {
|
||||
// if (this.subscribe == 1) {
|
||||
// $.showModal({
|
||||
// title: "订阅提示",
|
||||
// content: "是否订阅活动消息通知?",
|
||||
// cancelText: "暂不订阅",
|
||||
// confirmText: "立即订阅",
|
||||
// success: function (n) {
|
||||
// if (n.confirm) {
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: _this.tmplIds,
|
||||
// success(res) {
|
||||
// console.log("success res====", res);
|
||||
// uni.showToast({
|
||||
// title: "消息已订阅",
|
||||
// });
|
||||
// },
|
||||
// fail(res) {
|
||||
// uni.showToast({
|
||||
// title: "稍后再试",
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// } catch (error) {}
|
||||
// }, 500);
|
||||
},
|
||||
onUnload: function () {
|
||||
//移除通知
|
||||
|
||||
@ -1873,7 +1873,7 @@ export default {
|
||||
let that = this;
|
||||
var n = {
|
||||
api: this.Config.URL.wx.get_tpl_msg_config,
|
||||
pages: "/member/order/detail?on=" + e,
|
||||
pages: "/member/order/detail?on="+e,
|
||||
formId: this.formId,
|
||||
WeiXinOpenId: this.userInfo.openId,
|
||||
value: {
|
||||
@ -1943,7 +1943,7 @@ export default {
|
||||
},
|
||||
onFail: function (e) {
|
||||
let that = this;
|
||||
that.$.gotopage("/member/order/detail?on=" + this.order_id);
|
||||
that.$.gotopage("/member/order/detail?on="+this.order_id);
|
||||
},
|
||||
returnUrl: function (e) {
|
||||
var that = this;
|
||||
@ -1955,7 +1955,7 @@ export default {
|
||||
// 延时100毫秒等待异步队列setPaidYes的处理
|
||||
setTimeout(function () {
|
||||
that.$.gotopage(
|
||||
`/member/order/detail?on="${e}&init_pay_flag=true&subscribe=1`
|
||||
`/member/order/detail?on=${e}&init_pay_flag=true&subscribe=1`
|
||||
);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ export default {
|
||||
.diy_goods_carts {
|
||||
position: fixed;
|
||||
right: 24rpx;
|
||||
bottom: 240rpx;
|
||||
bottom: 400rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -404,8 +404,8 @@ export default {
|
||||
box-shadow: 2rpx 4rpx 20rpx rgba(0,0,0,0.3);
|
||||
|
||||
.icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user