diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue
index 379b5e6..e5ba6e8 100644
--- a/pages/tabBar/category/category.vue
+++ b/pages/tabBar/category/category.vue
@@ -2,105 +2,106 @@
+
+
+
-
-
-
+
+
+
-
+
-
- {{item.name}}
+ {{item.name}}
-
+
-
+
-
+
-
- {{item.title}}
+ {{item.title}}
-
+ v-if="distance == item.id">
+
-
+
-
+
+
-
-
-
+
+
+
+
-
+
@@ -151,9 +152,11 @@
}
},
onLoad() {
- this.getIndustry();
- this.latitude = app.globalData.latitude;
- this.longitude = app.globalData.longitude;
+ },
+ onShow() {
+ // this.latitude = app.globalData.latitude;
+ // this.longitude = app.globalData.longitude;
+ this.onControltap();
},
computed: {
mapheight() {
@@ -209,8 +212,8 @@
name: this.searchName,
type: this.typeplat,
childId: this.selectFirst,
- longitude: app.globalData.longitude,
- latitude: app.globalData.latitude
+ longitude: this.longitude,
+ latitude: this.latitude
}
getMapStore(datas).then(res => {
if (res.return_code == '000000') {
@@ -235,15 +238,26 @@
this.getMapStore();
},
//地图点击事件
- markertap(e) {},
+ markertap(e) {
+ // #ifdef H5
+ let markerId = e.detail.markerId;
+ for (var i = 0; i < this.marker.length; i++) {
+ if (markerId == this.marker[i].id) {
+ this.seeloaction(this.marker[i]);
+ }
+ }
+ // #endif
+ },
//地图点击事件
- callouttap(e) {
+ callouttap(e) {
+ // #ifdef MP
let markerId = e.markerId;
for (var i = 0; i < this.marker.length; i++) {
- if (markerId == this.marker[i].id) {
+ if (markerId == this.marker[i].id) {
this.seeloaction(this.marker[i]);
}
- }
+ }
+ // #endif
},
postionIng() {
@@ -356,8 +370,26 @@
},
// 定位点击事件
onControltap() {
-
-
+ uni.showLoading({
+ title: '定位中'
+ })
+ uni.getLocation({
+ geocode: true,
+ type: 'wgs84',
+ success: (res) => {
+ uni.hideLoading();
+ console.log(res, '获取当前位置')
+ this.longitude = res.longitude;
+ this.latitude = res.latitude;
+ this.getIndustry();
+ },
+ fail() {
+ uni.hideLoading();
+ },
+ address: (res) => {
+ console.log('address', res)
+ }
+ });
},
//选择类型
changeType(item) {
@@ -372,6 +404,7 @@
if (this.selectChiler == 1) {
this.selectChiler = 2;
} else {
+ this.selectChilerdistance = 2;
this.selectChiler = 1;
}
},
@@ -380,6 +413,7 @@
if (this.selectChilerdistance == 1) {
this.selectChilerdistance = 2;
} else {
+ this.selectChiler = 2;
this.selectChilerdistance = 1;
}
@@ -455,6 +489,7 @@
justify-content: center;
width: 40px;
height: 40px;
+ border-radius: 50%;
color: #484848;
background-color: #fff;
background-size: 60px 60px;
@@ -466,8 +501,8 @@
.cover-image {
display: inline-block;
- width: 15px;
- height: 15px;
+ width: 20px;
+ height: 20px;
}
.cover-view-foot {
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 1b6428d..94d8609 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -272,44 +272,45 @@
that.postionIng();
// #endif
// #ifdef H5
+ that.postionIng();
// if (app.globalData.h5code) {
// that.getH5AccessToken();
// }
- uni.showLoading({
- title: '加载中'
- })
- var geolocation = new qq.maps.Geolocation('7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', "嗨森逛");
+ // uni.showLoading({
+ // title: '加载中'
+ // })
+ // var geolocation = new qq.maps.Geolocation('7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', "嗨森逛");
// 回调的第一次参数为成功后具体的位置信息
- geolocation.getLocation(
- res => {
- uni.hideLoading();
- app.globalData.latitude = res.lat;
- app.globalData.longitude = res.lng;
-
- uni.setStorage({
- key: "latitude",
- data: res.lat
- })
-
- uni.setStorage({
- key: "longitude",
- data: res.lng
- })
- that.findByLatAndLng(res.lng, res.lat);
- },
- err => {
- uni.hideLoading();
- uni.showModal({
- title: '获取定位权限失败,默认城市重庆市',
- content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。'
- })
- that.city = '重庆市';
- app.globalData.cityName = '重庆市';
- app.globalData.cityId = '500000';
- that.getCmsContentcmsContent();
- that.getCmsAactibity();
- }
- );
+ // geolocation.getLocation(
+ // res => {
+ // uni.hideLoading();
+ // app.globalData.latitude = res.lat;
+ // app.globalData.longitude = res.lng;
+
+ // uni.setStorage({
+ // key: "latitude",
+ // data: res.lat
+ // })
+
+ // uni.setStorage({
+ // key: "longitude",
+ // data: res.lng
+ // })
+ // that.findByLatAndLng(res.lng, res.lat);
+ // },
+ // err => {
+ // uni.hideLoading();
+ // uni.showModal({
+ // title: '获取定位权限失败,默认城市重庆市',
+ // content: '请确定手机定位已打开,并且当前浏览器允许获取定位,都开启后请刷新页面。'
+ // })
+ // that.city = '重庆市';
+ // app.globalData.cityName = '重庆市';
+ // app.globalData.cityId = '500000';
+ // that.getCmsContentcmsContent();
+ // that.getCmsAactibity();
+ // }
+ // );
// #endif
uni.getStorage({
key: "user",
diff --git a/static/img/dispos.png b/static/img/dispos.png
new file mode 100644
index 0000000..779a728
Binary files /dev/null and b/static/img/dispos.png differ
diff --git a/subPages/shareCounpon/shareCounpon.vue b/subPages/shareCounpon/shareCounpon.vue
index 71a785b..edaf61d 100644
--- a/subPages/shareCounpon/shareCounpon.vue
+++ b/subPages/shareCounpon/shareCounpon.vue
@@ -1,7 +1,8 @@
-
-
-
+
+
+
+
@@ -52,34 +53,34 @@
couponList: [],
shareNum: 0, //次数,
orderNo: '', //订单号
- partakeWay: '' //区分类型
+ partakeWay: '', //区分类型
+ shareLink: '', // 分享链接
+ qrCodeSn: '' //二维码编号
}
},
created() {
- if (app.globalData.accountType == '0000012&key') {
- this.doShare();
- }
+ // if (app.globalData.accountType == '0000012&key') {
+ this.doShare();
+ // }
},
onShow() {
let that = this;
+ uni.setNavigationBarTitle({
+ title: '分享领取优惠券'
+ })
if (app.globalData.accountType == '0000012&key') {
uni.removeStorage({
key: 'shareNum'
- });
- uni.setNavigationBarTitle({
- title: '分享领取优惠券'
- })
+ });
that.partakeWay = 2;
that.getOrderByOutTradeOrder();
}
if (app.globalData.accountType == '0000014&key') {
- that.partakeWay = 3;
- uni.setNavigationBarTitle({
- title: '立即领取优惠券'
- })
+ that.partakeWay = 3;
uni.getStorage({
key: 'staffCode',
success: (res) => {
+ that.qrCodeSn = res.data;
that.getReceiveDiscountList(res.data);
},
})
@@ -132,7 +133,7 @@
//领取优惠券
payReceiveDiscount() {
let that = this;
- if (that.partakeWay == 2) {
+ // if (that.partakeWay == 2) {
uni.getStorage({
key: 'shareNum',
success(e) {
@@ -143,7 +144,7 @@
}
}
})
- }
+ // }
if (app.globalData.userInfo.phone == '' || app.globalData.userInfo.phone == null || app.globalData.userInfo
.phone == undefined) {
@@ -159,8 +160,9 @@
}
})
return;
- }
- if (that.shareNum == 0 && that.partakeWay == 2) {
+ }
+ // && that.partakeWay == 2
+ if (that.shareNum == 0 ) {
uni.showToast({
title: "分享活动得领取机会",
duration: 2000,
@@ -186,13 +188,13 @@
duration: 2000,
icon: 'none'
})
- if (that.partakeWay == 2) {
+ // if (that.partakeWay == 2) {
that.shareNum--;
uni.setStorage({
key: "shareNum",
data: that.shareNum
})
- }
+ // }
} else {
uni.showToast({
@@ -206,6 +208,11 @@
//分享
doShare() {
let that = this;
+ if (app.globalData.accountType == '0000012&key') {
+ that.shareLink = 'https://hsgcs.dctpay.com/hsgH5?accountId=0000013&key=&code=' + that.orderNo;
+ } else {
+ that.shareLink = 'https://hsgcs.dctpay.com/hsgH5?accountId=0000014&key=&code=' + that.qrCodeSn;
+ }
let theUrl = window.location.href.split('#')[0];
let datas = {
url: theUrl
@@ -218,39 +225,37 @@
timestamp: res.return_data.timestamp, // 必填,生成签名的时间戳
nonceStr: res.return_data.nonceStr, // 必填,生成签名的随机串
signature: res.return_data.signature, // 必填,签名,见附录1
- jsApiList: ['onMenuShareTimeline',
+ jsApiList: [
'onMenuShareAppMessage'
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
wx.ready(function() {
- wx.onMenuShareTimeline({
- title: '分享好友,立获大额优惠券', // 分享标题
- desc: '分享好友,立获大额优惠券', // 分享描述
- link: 'https://hsgcs.dctpay.com/hsgH5?accountId=0000013&key=&code=' +
- that.orderNo, // 分享链接
- imgUrl: 'https://hsgcs.dctpay.com/filesystem/wxApplets/logo.png', // 分享图标
- success: function(res) {
- // 支付成功后的回调函数
- uni.showToast({
- title: '分享成功',
- duration: 2000,
- icon: 'none'
- })
- that.shareNum++;
- uni.setStorage({
- key: "shareNum",
- data: that.shareNum
- })
- },
- cancel: function(r) {},
- fail: function(res) {}
- });
+ // wx.onMenuShareTimeline({
+ // title: '分享好友,立获大额优惠券', // 分享标题
+ // desc: '分享好友,立获大额优惠券', // 分享描述
+ // link: that.shareLink, // 分享链接
+ // imgUrl: 'https://hsgcs.dctpay.com/filesystem/wxApplets/logo.png', // 分享图标
+ // success: function(res) {
+ // // 支付成功后的回调函数
+ // uni.showToast({
+ // title: '分享成功',
+ // duration: 2000,
+ // icon: 'none'
+ // })
+ // that.shareNum++;
+ // uni.setStorage({
+ // key: "shareNum",
+ // data: that.shareNum
+ // })
+ // },
+ // cancel: function(r) {},
+ // fail: function(res) {}
+ // });
wx.onMenuShareAppMessage({
- title: '分享好友,立获大额优惠券', // 分享标题
- desc: '分享好友,立获大额优惠券', // 分享描述
- link: 'https://hsgcs.dctpay.com/hsgH5?accountId=0000013&key=&code=' +
- that.orderNo, // 分享链接
+ title: '分享朋友圈,立获大额优惠券', // 分享标题
+ desc: '分享朋友圈,立获大额优惠券', // 分享描述
+ link: that.shareLink, // 分享链接
imgUrl: 'https://hsgcs.dctpay.com/filesystem/wxApplets/logo.png', // 分享图标
success: function(res) {
// 支付成功后的回调函数
@@ -331,4 +336,4 @@
border-radius: 25px;
background: linear-gradient(to right, #fea03c, #f7dd6a);
}
-
+
\ No newline at end of file