update: 长按图片测试问题,实现订阅消息功能
This commit is contained in:
parent
41a6ada67b
commit
930cfd4886
@ -169,7 +169,8 @@
|
||||
}">
|
||||
<label v-if="item.eltm4.btnType == 4">{{ item.eltm4.btnText }}</label>
|
||||
</view>
|
||||
<view v-else :class="['c' + item.eltm4.btnType, { disable: getGoodsStatus(items) }]" @click.stop="addCart(items)">
|
||||
<view v-else :class="['c' + item.eltm4.btnType, { disable: getGoodsStatus(items) }]"
|
||||
@click.stop="addCart(items)">
|
||||
<label v-if="item.eltm4.btnType == 3">buy</label>
|
||||
</view>
|
||||
</view>
|
||||
@ -304,7 +305,8 @@
|
||||
:style="{ 'font-size': '30px', color: item.eltm8.fontColor }"></label>
|
||||
</view>
|
||||
|
||||
<navigator :url="'/pagesub/search/search?store_id='+shopInfo.store_id" class="u-search-box" v-if="item.eltmType == 9" :style="{
|
||||
<navigator :url="'/pagesub/search/search?store_id=' + shopInfo.store_id" class="u-search-box"
|
||||
v-if="item.eltmType == 9" :style="{
|
||||
'background-color': item.bgColor,
|
||||
'padding-top': item.eltm9.paddingTop + 'px',
|
||||
'padding-bottom': item.eltm9.paddingBottom + 'px',
|
||||
@ -333,7 +335,8 @@
|
||||
</uni-nav-bar>
|
||||
|
||||
<movable-area class="movableAreaIM" v-if="item.eltmType == 11 && hasLogin && chatUrl">
|
||||
<movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX" :y="initY + 44 + 10">
|
||||
<movable-view class="movableView" @touchmove.stop.prevent="doNothing" direction="all" :x="initX"
|
||||
:y="initY + 44 + 10">
|
||||
<view class="mCS" :style="{
|
||||
'background-color': item.bgColor,
|
||||
borderTopLeftRadius: (item.borderTopLeftRadius || 0) + 'px',
|
||||
@ -1141,8 +1144,11 @@ export default {
|
||||
|
||||
var t = e.currentTarget.dataset;
|
||||
//console.info(t);
|
||||
console.log('=====',parseInt(t.type))
|
||||
switch (parseInt(t.type)) {
|
||||
case 0:
|
||||
if (typeof t.mobile != "undefined" || t.mobile != "") {
|
||||
console.log('==进来了===')
|
||||
uni.makePhoneCall({
|
||||
phoneNumber:
|
||||
typeof t.mobile != "undefined" ? t.mobile.toString() : "", //电话号码
|
||||
@ -1153,6 +1159,7 @@ export default {
|
||||
console.log(e);
|
||||
},
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// this.$emit('buy', 'hello')
|
||||
|
||||
@ -36,7 +36,8 @@
|
||||
<image
|
||||
lazy-load
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/rpk_min.png"
|
||||
></image>
|
||||
>
|
||||
</image>
|
||||
</movable-view>
|
||||
|
||||
<view
|
||||
@ -549,7 +550,8 @@
|
||||
margin: auto;
|
||||
"
|
||||
src="https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/img/location.png"
|
||||
></image>
|
||||
>
|
||||
</image>
|
||||
<view
|
||||
class="m-cell-ft m-order-typetxt"
|
||||
style="color: #17abe3; margin-left: 4rpx"
|
||||
@ -669,8 +671,8 @@
|
||||
v-if="item.return_id"
|
||||
class="u-link-btn hide"
|
||||
style="line-height: 30rpx"
|
||||
>{{ __("售后详情") }}</navigator
|
||||
>
|
||||
>{{ __("售后详情") }}
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
@ -841,7 +843,8 @@
|
||||
lazy-load
|
||||
src="/static/images/call.png"
|
||||
style="width: 30rpx; height: 26rpx; margin-right: 10rpx"
|
||||
></image>
|
||||
>
|
||||
</image>
|
||||
<view class="m-cell-ft m-order-typetxt" style="color: #17abe3">
|
||||
{{ OrderInfo.chain_mobile }}</view
|
||||
>
|
||||
@ -1196,6 +1199,8 @@ export default {
|
||||
_mapContext: null,
|
||||
time: null,
|
||||
isReminderOrder: false,
|
||||
subscribe: 0,
|
||||
tmplIds: ["kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc", "Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc"],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -1219,7 +1224,12 @@ export default {
|
||||
});
|
||||
|
||||
let that = this;
|
||||
this.subscribe =
|
||||
options.subscribe && options.subscribe == 1
|
||||
? options.subscribe
|
||||
: this.subscribe;
|
||||
that._mapContext = uni.createMapContext("map", this);
|
||||
|
||||
this.setData({
|
||||
options: options,
|
||||
discount: options.discount,
|
||||
@ -1243,7 +1253,35 @@ export default {
|
||||
this.notice.addNotification("RefreshMessage", this.RefreshMessage, this);
|
||||
},
|
||||
onShow: function () {
|
||||
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: "稍后再试",
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
onUnload: function () {
|
||||
//移除通知
|
||||
@ -2360,6 +2398,7 @@ export default {
|
||||
padding: 6px 12px;
|
||||
border-top-left-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
|
||||
.order-name {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
@ -2417,6 +2456,7 @@ export default {
|
||||
.move-area {
|
||||
margin-top: 44px;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.nav-title {
|
||||
|
||||
@ -1774,7 +1774,7 @@ export default {
|
||||
} else {
|
||||
const item = that.submitinfo.items[0].items[0];
|
||||
if (item.payment_type_id === 1) {
|
||||
that.$.gotopage("/member/order/detail?on=" + that.order_id);
|
||||
that.$.gotopage(`/member/order/detail?on=${that.order_id}&subscribe=1`);
|
||||
} else {
|
||||
that.gotopay();
|
||||
}
|
||||
@ -1816,13 +1816,12 @@ export default {
|
||||
that.returnUrl(param.order_id);
|
||||
},
|
||||
fail: function (n) {
|
||||
that.$.gotopage("/member/order/detail?on=" + param.order_id);
|
||||
that.$.gotopage(`/member/order/detail?on=${param.order_id}&subscribe=1`);
|
||||
that.isTmplMsg && that.sendMessage(param.order_id, 1);
|
||||
},
|
||||
complete: function (n) {
|
||||
if (n.errMsg == "requestPayment:cancel") {
|
||||
that.$.gotopage("/member/order/detail?on=" + param.order_id);
|
||||
|
||||
that.$.gotopage(`/member/order/detail?on=${param.order_id}&subscribe=1`);
|
||||
that.isTmplMsg && that.sendMessage(param.order_id, 1);
|
||||
}
|
||||
},
|
||||
@ -1956,7 +1955,7 @@ export default {
|
||||
// 延时100毫秒等待异步队列setPaidYes的处理
|
||||
setTimeout(function () {
|
||||
that.$.gotopage(
|
||||
"/member/order/detail?on=" + e + "&init_pay_flag=true"
|
||||
`/member/order/detail?on="${e}&init_pay_flag=true&subscribe=1`
|
||||
);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user