1.优化嗨森逛分享领取优惠

2.删除未用图片
yj-dev
杨杰 2 years ago
parent 912c398e24
commit 85ffb79965
  1. 62
      App.vue
  2. 4
      Utils/Api.js
  3. 10
      pages.json
  4. 4
      pages/goods/externalCoupon/externalCoupon.vue
  5. 90
      pages/tabBar/home/home.vue
  6. 8
      pages/tabBar/user/user.vue
  7. 75
      pages/welcome/welcome.vue
  8. 4
      subPages/recharge/recharge.vue
  9. 103
      subPages/shareCounpon/shareCounpon.vue
  10. 8
      subPages/shareImgage/shareImgage.vue
  11. BIN
      subPages/static/union1.jpg
  12. BIN
      subPages/static/union2.jpg
  13. BIN
      subPages/static/upay1.jpg
  14. BIN
      subPages/static/upay2.jpg
  15. BIN
      subPages/static/upay4.jpg

@ -74,18 +74,18 @@
// #ifdef MP
let accountInfo = uni.getAccountInfoSync();
// if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') {
// this.globalData.url = 'https://hsgcs.dctpay.com/crest';
// this.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
// this.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
// this.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
// this.globalData.userurl = 'https://hsgcs.dctpay.com/user';
// this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
// this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
// this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
// this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
// }
// if (accountInfo.miniProgram.envVersion == 'release') {
if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') {
this.globalData.url = 'https://hsgcs.dctpay.com/crest';
this.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
this.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
this.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
this.globalData.userurl = 'https://hsgcs.dctpay.com/user';
this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
}
if (accountInfo.miniProgram.envVersion == 'release') {
this.globalData.url = 'https://hsg.dctpay.com/crest';
this.globalData.v1url = 'https://hsg.dctpay.com/v1';
this.globalData.payurl = 'https://pay.dctpay.com/crest';
@ -95,29 +95,29 @@
this.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
this.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
this.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
// }
}
// #endif
// #ifdef H5
let that = this;
// that.globalData.url = 'https://hsgcs.dctpay.com/crest';
// that.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
// that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
// that.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
// that.globalData.userurl = 'https://hsgcs.dctpay.com/user';
// that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
// that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
// that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
// that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
that.globalData.url = 'https://hsgcs.dctpay.com/crest';
that.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
that.globalData.payurl = 'https://gratia-pay.dctpay.com/crest';
that.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
that.globalData.userurl = 'https://hsgcs.dctpay.com/user';
that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
that.globalData.url = 'https://hsg.dctpay.com/crest';
that.globalData.v1url = 'https://hsg.dctpay.com/v1';
that.globalData.payurl = 'https://pay.dctpay.com/crest';
that.globalData.orderurl = 'https://hsg.dctpay.com/order';
that.globalData.userurl = 'https://hsg.dctpay.com/user';
that.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
// that.globalData.url = 'https://hsg.dctpay.com/crest';
// that.globalData.v1url = 'https://hsg.dctpay.com/v1';
// that.globalData.payurl = 'https://pay.dctpay.com/crest';
// that.globalData.orderurl = 'https://hsg.dctpay.com/order';
// that.globalData.userurl = 'https://hsg.dctpay.com/user';
// that.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
// that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
// that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
// that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
uni.getStorage({
key: 'openId',
success(e) {

@ -704,11 +704,11 @@ export const payReceiveDiscount = params => {
}
//获取二维码
export const generateWeChatMpQrCode = params => {
return POST('POST', `${payBase}/storeDiscountActivityPartakeUser/generateWeChatMpQrCode`, params).then(res => res.data);
return POST('GET', `${payBase}/storeDiscountActivityPartakeUser/generateWeChatMpQrCode`, params).then(res => res.data);
}
//查询订单详情
export const getOrderByOutTradeOrder = params => {
return POST('POST', `${payBase}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data);
return POST('GET', `${payBase}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data);
}

@ -832,14 +832,20 @@
"path": "shareCounpon/shareCounpon",
"style": {
"navigationBarTitleText": "分享领取优惠券",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
}, {
"path": "shareImgage/shareImgage",
"style": {
"navigationBarTitleText": "分享领取优惠券",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false //
}
}
}

@ -65,8 +65,7 @@
</view>
</view>
<view class="contconpon width90 border-r"
v-if="minecoupones && couponsDetails.highDiscount.usingRange == 8">
<view class="contconpon width90 border-r" v-if="minecoupones && couponsDetails.highDiscount.usingRange == 8">
<image :src="imagewxUrl+imgadres3" mode="widthFix" class="width100"
v-if="couponsDetails.highDiscountAgentCode.status ==1"></image>
<image :src="imagewxUrl+imgadres2" mode="widthFix" class="width100 mart10"
@ -317,7 +316,6 @@
},
//
receiveDiscount() {
uni.showLoading({
title: '领取中...'
})

@ -217,36 +217,36 @@
this.getCmsContentcmsContent();
}
// #ifdef H5
uni.getStorage({
key: 'accountId',
success(e) {
if (e.data) {
app.globalData.accountId = e.data;
}
}
})
uni.getStorage({
key: 'gasKey',
success(e) {
if (e.data) {
app.globalData.gasKey = e.data;
}
}
})
uni.getStorage({
key: 'staffCode',
success(e) {
if (e.data) {
if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
'000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData
.accountId == '0000010&key') {
app.globalData.staffCode = e.data;
} else {
app.globalData.mchId = e.data;
}
}
}
})
// uni.getStorage({
// key: 'accountId',
// success(e) {
// if (e.data) {
// app.globalData.accountId = e.data;
// }
// }
// })
// uni.getStorage({
// key: 'gasKey',
// success(e) {
// if (e.data) {
// app.globalData.gasKey = e.data;
// }
// }
// })
// uni.getStorage({
// key: 'staffCode',
// success(e) {
// if (e.data) {
// if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
// '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData
// .accountId == '0000010&key') {
// app.globalData.staffCode = e.data;
// } else {
// app.globalData.mchId = e.data;
// }
// }
// }
// })
// #endif
},
onLoad(options) {
@ -578,21 +578,21 @@
url: '/subPages/selectEntry/selectEntry'
})
}
if (e.data == '0000011&key' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/externalCoupon/externalCoupon'
})
}
if (e.data == '0000012&key' && app.globalData.h5code) {
uni.navigateTo({
url: '/subPages/shareCounpon/shareCounpon'
})
}
if (e.data == '0000013&key' && app.globalData.h5code) {
uni.navigateTo({
url: '/subPages/shareImgage/shareImgage'
})
}
// if (e.data == '0000011&key' && app.globalData.h5code) {
// uni.navigateTo({
// url: '../../goods/externalCoupon/externalCoupon'
// })
// }
// if (e.data == '0000012&key' && app.globalData.h5code) {
// uni.navigateTo({
// url: '/subPages/shareCounpon/shareCounpon'
// })
// }
// if (e.data == '0000013&key' && app.globalData.h5code) {
// uni.navigateTo({
// url: '/subPages/shareImgage/shareImgage'
// })
// }
}
}
})

@ -35,12 +35,12 @@
<view class="width100 font18 fcor333 mart5">优惠券</view>
</view>
<!-- <view style="width: 1px;height: 50px;background-color: #f6f6f6;">
<view style="width: 1px;height: 50px;background-color: #f6f6f6;">
</view>
<view class=" fotct" style="width: 32%;" @click="jumppage(7)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{payactivitynum}} </text> </view>
<view class="width100 font18 fcor333 mart5">活动券</view>
</view> -->
</view>
</view>
</view>
@ -252,7 +252,7 @@
onLoad() {
if (!app.globalData.userInfo) {
this.findUser();
// this.queryHzfDiscountTotalNum();
this.queryHzfDiscountTotalNum();
}
},
onReady() {
@ -267,7 +267,7 @@
onShow() {
if (app.globalData.userInfo) {
this.findUser();
// this.queryHzfDiscountTotalNum();
this.queryHzfDiscountTotalNum();
}
// #ifdef MP
if (!app.globalData.userInfo.isSetPayPwd) {

@ -21,12 +21,12 @@
let that = this;
// #ifdef MP
app.globalData.accountId = options.accountId;
// uni.switchTab({
// url: '../tabBar/home/home'
// })
uni.navigateTo({
url:'/subPages/shareImgage/shareImgage'
uni.switchTab({
url: '../tabBar/home/home'
})
// uni.navigateTo({
// url: '/subPages/shareImgage/shareImgage'
// })
// #endif
// #ifdef H5
var arr1 = window.location.href;
@ -37,6 +37,69 @@
key: "h5code",
data: arr2[1]
})
uni.getStorage({
key: 'accountId',
success(e) {
if (e.data) {
app.globalData.accountId = e.data;
}
}
})
uni.getStorage({
key: 'gasKey',
success(e) {
if (e.data) {
app.globalData.gasKey = e.data;
}
}
})
uni.getStorage({
key: 'staffCode',
success(e) {
if (e.data) {
if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
'000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData
.accountId == '0000010&key') {
app.globalData.staffCode = e.data;
} else {
app.globalData.mchId = e.data;
}
}
}
})
uni.getStorage({
key: 'accountType',
success(e) {
if (e.data) {
app.globalData.accountType = e.data;
}
}
})
// 0011
// 0012
// 0013
// 0014
if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) {
uni.navigateTo({
url: '/pages/goods/externalCoupon/externalCoupon'
})
return;
}
if ((app.globalData.accountType == '0000012&key' || app.globalData.accountType == '0000014&key') && app
.globalData.h5code) {
uni.navigateTo({
url: '/subPages/shareCounpon/shareCounpon'
})
return;
}
if (app.globalData.accountType == '0000013&key' && app.globalData.h5code) {
uni.navigateTo({
url: '/subPages/shareImgage/shareImgage'
})
return;
}
uni.switchTab({
url: '../tabBar/home/home'
})
@ -140,7 +203,7 @@
},
jumpcdx() {
location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsg.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
},
}
}

@ -1,9 +1,9 @@
<template>
<view>
<image class="width100" mode="widthFix" src="../static/upay3.jpg"></image>
<!-- <image class="width100" mode="widthFix" src="../static/upay3.jpg"></image>
<image class="width94 mart20" mode="widthFix" src="../static/upay4.jpg" @click="jumprecent(1)"></image>
<image class="width94 mart10" mode="widthFix" src="../static/upay2.jpg" @click="jumprecent(2)"></image>
<image class="width94 mart10" mode="widthFix" src="../static/upay1.jpg" @click="jumprecent(3)"></image>
<image class="width94 mart10" mode="widthFix" src="../static/upay1.jpg" @click="jumprecent(3)"></image> -->
<!-- <wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6"
:showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres1"></image>

@ -1,6 +1,7 @@
<template>
<view>
<view class="imgshead"></view>
<view class="imgshead backroundimgfit" v-if="partakeWay == 2"></view>
<view class="imgshead backroundimgsed" v-if="partakeWay == 3"></view>
<view class="imgscontent">
<view class="conts paddtop13">
<view v-for="(item,index) in couponList" :key="index" class="conpon border-r height90 flleft marb10 ">
@ -50,21 +51,33 @@
imagewxUrl: app.globalData.imageWxImg,
couponList: [],
shareNum: 0, //
orderNo: ''
orderNo: '', //
partakeWay: '' //
}
},
created() {
this.doShare();
if (app.globalData.accountType == '0000012&key') {
this.doShare();
}
},
onShow() {
let that = this;
uni.getStorage({
key: 'shareNum',
success(e) {
that.shareNum = e.data;
}
})
this.getOrderByOutTradeOrder();
if (app.globalData.accountType == '0000012&key') {
uni.removeStorage({
key: 'shareNum'
});
that.partakeWay = 2;
that.getOrderByOutTradeOrder();
}
if (app.globalData.accountType == '0000014&key') {
that.partakeWay = 3;
uni.getStorage({
key: 'staffCode',
success: (res) => {
that.getReceiveDiscountList(res.data);
},
})
}
},
methods: {
//
@ -79,7 +92,7 @@
}
getOrderByOutTradeOrder(datas).then(res => {
if (res.return_code == '000000') {
that.getReceiveDiscountList(res.return_data.storeId);
that.getReceiveDiscountList(res.return_data.order.qrCodeSn);
} else {
uni.showToast({
title: res.return_msg,
@ -94,12 +107,13 @@
//
getReceiveDiscountList(items) {
let datas = {
qrCodeSn: items
qrCodeSn: items,
partakeWay: this.partakeWay
// 1000017476
}
getReceiveDiscountList(datas).then(res => {
if (res.return_code == '000000') {
that.couponList = res.return_data;
this.couponList = res.return_data;
} else {
uni.showToast({
title: res.return_msg,
@ -111,6 +125,20 @@
},
//
payReceiveDiscount() {
let that = this;
if (that.partakeWay == 2) {
uni.getStorage({
key: 'shareNum',
success(e) {
if (e.data) {
that.shareNum = e.data;
} else {
that.shareNum = 0;
}
}
})
}
if (app.globalData.userInfo.phone == '' || app.globalData.userInfo.phone == null || app.globalData.userInfo
.phone == undefined) {
uni.showModal({
@ -126,7 +154,7 @@
})
return;
}
if (this.shareNum == 0) {
if (that.shareNum == 0 && that.partakeWay == 2) {
uni.showToast({
title: "分享活动得领取机会",
duration: 2000,
@ -135,9 +163,9 @@
return;
}
let actividatas = [];
for (var i = 0; i < this.couponList.length; i++) {
for (var i = 0; i < that.couponList.length; i++) {
let acid = {
id: this.couponList[i].id
id: that.couponList[i].id
};
actividatas.push(acid);
}
@ -152,11 +180,14 @@
duration: 2000,
icon: 'none'
})
this.shareNum = this.shareNum - 1
uni.setStorage({
key: "shareNum",
data: this.shareNum
})
if (that.partakeWay == 2) {
that.shareNum--;
uni.setStorage({
key: "shareNum",
data: that.shareNum
})
}
} else {
uni.showToast({
title: res.return_msg,
@ -168,6 +199,7 @@
},
//
doShare() {
let that = this;
let theUrl = window.location.href.split('#')[0];
let datas = {
url: theUrl
@ -188,9 +220,9 @@
wx.onMenuShareTimeline({
title: '分享好友,立获大额优惠券', //
desc: '分享好友,立获大额优惠券', //
link: 'https://hsg.dctpay.com/hsgH5?accountId=0000013&key=&code=' +
this.orderNo, //
imgUrl: 'https://hsg.dctpay.com/filesystem/wxApplets/logo.png', //
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({
@ -198,10 +230,10 @@
duration: 2000,
icon: 'none'
})
this.shareNum = this.shareNum + 1;
that.shareNum++;
uni.setStorage({
key: "shareNum",
data: this.shareNum
data: that.shareNum
})
},
cancel: function(r) {},
@ -211,9 +243,9 @@
wx.onMenuShareAppMessage({
title: '分享好友,立获大额优惠券', //
desc: '分享好友,立获大额优惠券', //
link: 'https://hsg.dctpay.com/hsgH5?accountId=0000013&key=&code=' +
this.orderNo, //
imgUrl: 'https://hsg.dctpay.com/filesystem/wxApplets/logo.png', //
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({
@ -221,10 +253,10 @@
duration: 2000,
icon: 'none'
})
this.shareNum = this.shareNum + 1;
that.shareNum++;
uni.setStorage({
key: "shareNum",
data: this.shareNum
data: that.shareNum
})
},
cancel: function(r) {},
@ -247,12 +279,19 @@
<style lang="scss">
.imgshead {
background-image: url(https://hsg.dctpay.com/filesystem/wxApplets/share1.png);
background-size: 100% 230px;
height: 230px;
background-repeat: no-repeat;
}
.backroundimgfit {
background-image: url(https://hsg.dctpay.com/filesystem/wxApplets/share1.png);
}
.backroundimgsed {
background-image: url(https://hsg.dctpay.com/filesystem/wxApplets/share4.png);
}
.imgscontent {
background-image: url(https://hsg.dctpay.com/filesystem/wxApplets/share2.png);
background-size: 100% 320px;

@ -1,6 +1,6 @@
<template>
<view>
<image class="width100" mode="widthFix" src="https://gratia-pay.dctpay.com/filesystem/share/1679038223473.png">
<image class="width100" mode="widthFix" :src="urls">
</image>
</view>
</template>
@ -16,6 +16,9 @@
urls: 'https://gratia-pay.dctpay.com/filesystem/share/1679038223473.png' //
}
},
onLoad() {
this.generateWeChatMpQrCode();
},
methods: {
generateWeChatMpQrCode() {
let that = this;
@ -25,7 +28,8 @@
let datas = {
outTradeNo: res.data,
// 1000017476,
type: 2
type: 2,
systemType: 1
}
generateWeChatMpQrCode(datas).then(res => {
if (res.return_code == '000000') {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Loading…
Cancel
Save