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