Compare commits

...

10 Commits

17 changed files with 220 additions and 99 deletions

View File

@ -463,7 +463,8 @@ export default {
currentAddress.location.lat + "," + currentAddress.location.lng;
}
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {
console.log("fail", res);
@ -493,7 +494,8 @@ export default {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {
@ -616,7 +618,8 @@ export default {
output: "json",
city_limit: true,
ret_coordtype: "gcj02ll",
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
// ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
ak: that.bdMapAk,
};
let city = that.originalData.result.addressComponent.city;

View File

@ -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>

View File

@ -299,7 +299,7 @@
</swiper>
</view>
<view v-if="item.eltmType == 8" class="mTel" :style="{ 'background-color': item.bgColor, top: initY + 'px' }"
<view v-if="item.eltmType == 8" class="mTel" :style="{ 'background-color': item.bgColor, top: mobileY + 'px' }"
:data-tel="item.eltm8.tel" @tap="callTel">
<label class="iconfont icon-dianhua--copy"
:style="{ 'font-size': '30px', color: item.eltm8.fontColor }"></label>
@ -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 -->
@ -994,7 +994,8 @@ export default {
showLoginPopup: false,
chatUrl: "",
initX: "690",
initY: "1336",
initY: "667",
mobileY: "375",
};
},
mounted() {
@ -1012,6 +1013,7 @@ export default {
initX: data.width - 50,
initY: data.height / 2,
});
that.mobileY = data.height / 2;
}
}
)
@ -1147,8 +1149,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 +1544,7 @@ uni-page-body {
.mCS {
position: initial;
border-radius: 100% !important;
}
.diyPage {
@ -1566,4 +1570,17 @@ 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>

View File

@ -53,11 +53,11 @@ export default {
if ('chatimg' == this.node.attr.class)
{
this.newStyleStr = `${styleStr}; width: 100%; padding: 0 ${+padding}px;`;
this.newStyleStr = `${styleStr}; max-width: 100%; padding: 0 ${+padding}px;`;
}
else
{
this.newStyleStr = `${styleStr}; ${imageHeightStyle}; width: ${imageWidth}px; padding: 0 ${+padding}px;`;
this.newStyleStr = `${styleStr}; ${imageHeightStyle}; max-width: ${imageWidth}px; padding: 0 ${+padding}px;`;
}
},
//

View File

@ -324,7 +324,7 @@ class apiconfig {
.replace(/img\[([^\s]+?)\]/g, function(img){ //转义图片
//return '<img class="layui-layim-photos" style="width: 100%;height: 100%;" src="' + img.replace(/(^img\[)|(\]$)/g, '') + '">';
return '<div><img class="chatimg single-img" src="' + img.replace(/(^img\[)|(\]$)/g, '') + '" /><span style="min-width: 240px;">&nbsp;</span></div>';
return '<div><img class="chatimg single-img" style="max-width:100%" src="' + img.replace(/(^img\[)|(\]$)/g, '') + '" /><span style="min-width: 240px;">&nbsp;</span></div>';
})
.replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g, function(str){ //转义文件
var href = (str.match(/file\(([\s\S]+?)\)\[/)||[])[1];

View File

@ -855,7 +855,7 @@ export default {
data.item_row.item_id;
let imgstr =
'<img class="chatimg" src="' +
'<img class="chatimg aaa1" style="max-width:100%" src="' +
data.item_row.product_image +
'">';
let content =
@ -886,7 +886,7 @@ export default {
//
if (options.text) {
let msg = {
text: options.text,
text: options.text+'aaa1',
};
that.sendMsg(msg, "text");
}
@ -1226,7 +1226,7 @@ export default {
}
console.info(data);
console.info("msgList", this.msgList);
console.info("msgList1111", this.msgList);
if (callback) {
callback();

View File

@ -851,7 +851,7 @@ export default {
data.item_row.item_id */
let imgstr =
'<img class="chatimg" src="' +
'<img class="chatimg" style="max-width:100%" src="' +
data.info.product_image +
'">';
let content =

View File

@ -38,6 +38,11 @@ Vue.prototype.sprintf = $.sprintf
Vue.prototype.number_format = $.number_format
Vue.prototype.mf = $.mf
Vue.prototype.statecode = Statecode
Vue.prototype.bdMapAk = "j2XbIbapUzLD0ycnJa6Cc5T7lppsxvMJ";
Vue.prototype.tmplIds = [
"kiDj_hSF_ASwD-Dlgxnypi6IJBQZ12a-hEpd3zZ-Uxc",
"Lq6_OHOemtmBoWGrd9zvyJ3ultzXB5metmqPtYeV0pc",
];
//Vue.prototype.$mysocket = mysocket;
Vue.prototype.$Socket = Socket;
Vue.prototype.$apiconfig = apiconfig;

View File

@ -294,7 +294,8 @@
}
},
"mp-baidu" : {
"appid" : "15306246",
// "appid" : "15306246",
"appid" : "120197275",
"setting" : {
"urlCheck" : true
},

View File

@ -409,7 +409,8 @@ export default {
let that = this;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
if (type2 == "found") {
@ -547,7 +548,8 @@ export default {
let that = this;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {
@ -1022,7 +1024,8 @@ export default {
region: this.originalData.result.addressComponent.city,
output: "json",
city_limit: true,
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
// ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
ak: that.bdMapAk,
ret_coordtype: "gcj02ll",
};

View File

@ -352,6 +352,7 @@ export default {
});
},
getLocation() {
const that = this
uni.getLocation({
type: "wgs84",
isHighAccuracy: true,
@ -359,7 +360,8 @@ export default {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {
@ -440,7 +442,8 @@ export default {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {
@ -604,7 +607,8 @@ export default {
let baiduParams = {
uid: uid,
scope: 1,
ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
// ak: "qWKt2xbrqXsp2yK35YYXVBNZgrbiCG5v",
ak: this.bdMapAk,
output: "json",
};

View File

@ -167,7 +167,8 @@
:data-on="OrderInfo.order_id"
v-if="
OrderInfo.kind_id == 1201 &&
OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED
[2040,2050,2060].includes(OrderInfo.order_state_id) &&
OrderInfo.order_is_received==0
"
@click="confirmReceipt(OrderInfo, $event)"
>{{ __("确认收货") }}</view
@ -1200,7 +1201,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 +1257,39 @@ 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) {
console.log("fail res====", res);
// uni.showToast({
// title: "",
// });
},
});
}
},
});
}
} catch (error) {}
}, 500);
},
onUnload: function () {
//

View File

@ -351,7 +351,8 @@
:data-on="items.order_id"
v-if="
items.kind_id == 1201 &&
items.order_state_id == StateCode.ORDER_STATE_SHIPPED
[2040, 2050, 2060].includes(items.order_state_id) &&
items.order_is_received == 0
"
class="u-link-btn"
@click="confirmReceipt(items, $event)"

View File

@ -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 {
// 100setPaidYes
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);
}

View File

@ -526,6 +526,7 @@ export default {
borderColor: "#dfdfdf",
fontColor: "#fff",
backgroundColor: "transparent",
provinceData: [],
cityData: [],
areaData: [],
@ -625,6 +626,36 @@ export default {
);
that.notice.addNotification("RefreshSubsite", that.RefreshSubsite, that);
that.notice.addNotification("ScanCode", that.onScanCode, that);
setTimeout(() => {
try {
$.showModal({
title: "订阅提示",
content: "是否订阅活动消息通知?",
cancelText: "暂不订阅",
confirmText: "立即订阅",
success: function (n) {
if (n.confirm) {
wx.requestSubscribeMessage({
tmplIds: that.tmplIds,
success(res) {
console.log("success res====", res);
// uni.showToast({
// title: "",
// });
},
fail(res) {
console.log("fail res====", res);
// uni.showToast({
// title: "",
// });
},
});
}
},
});
} catch (error) {}
}, 1000);
},
/**
@ -636,9 +667,9 @@ export default {
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
let _this = this;
this.getAppDistrict();
//that.$.isNull(that.plantformInfo) || uni.setNavigationBarTitle({title: that.plantformInfo.name});
//_this.$.isNull(_this.plantformInfo) || uni.setNavigationBarTitle({title: _this.plantformInfo.name});
//this.refresh || this.setData({refresh: true})
this.showCartNum();
@ -653,10 +684,10 @@ export default {
if (currentAddress) {
this.address = currentAddress.name;
} else {
that.isPhoneLocationEnabled();
_this.isPhoneLocationEnabled();
}
that.resetLang();
_this.resetLang();
},
/**
@ -966,7 +997,8 @@ export default {
location = res.latitude + "," + res.longitude;
let BMap = new bmap.BMapWX({
ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
// ak: "LkqqCMB1qZmjYEkzx0Y1PTfmAUrkWPog",
ak: that.bdMapAk,
});
let fail = function (res) {

View File

@ -646,10 +646,12 @@ export default {
.diy_goods_carts {
position: fixed;
right: 24rpx;
bottom: 240rpx;
bottom: 400rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
flex: 1;
@ -661,8 +663,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;
}

View File

@ -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;
}