1.修改分享领取优惠券功能

yj-dev
杨杰 2 years ago
parent 9db1233b44
commit fd039f2c04
  1. 77
      pages.json
  2. 10
      pages/goods/externalCoupon/externalCoupon.vue
  3. 2
      pages/order/confirmation.vue
  4. 9
      pages/tabBar/home/home.vue
  5. 9
      pages/welcome/welcome.vue
  6. 25
      subPages/recharge-centre/recharge-centre.vue
  7. 90
      subPages/shareCounpon/shareCounpon.vue
  8. 14
      uni.scss

@ -7,14 +7,14 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{ }, {
"path": "pages/user/news/news", "path": "pages/user/news/news",
"style": { "style": {
"navigationBarTitleText": "消息", "navigationBarTitleText": "消息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{ }, {
"path": "pages/tabBar/home/home", "path": "pages/tabBar/home/home",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
@ -27,17 +27,17 @@
"softinputNavBar": "none" "softinputNavBar": "none"
} }
} }
}, { }, {
"path": "pages/qianZhuPay/union-pay/union-pay", "path": "pages/qianZhuPay/union-pay/union-pay",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "选择方式", "navigationBarTitleText": "选择方式",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
"path": "pages/user/bindingCardList/bindingCardList", "path": "pages/user/bindingCardList/bindingCardList",
"style": { "style": {
"navigationBarTitleText": "卡列表", "navigationBarTitleText": "卡列表",
@ -234,8 +234,8 @@
"path": "pages/user/coupon/coupon", "path": "pages/user/coupon/coupon",
"style": { "style": {
"navigationBarTitleText": "优惠券", "navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"backgroundColorTop": "#f3f3f3", "backgroundColorTop": "#f3f3f3",
"backgroundColorBottom": "#ffffff", "backgroundColorBottom": "#ffffff",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
@ -505,16 +505,16 @@
} }
,{ , {
"path" : "components/postion/postion", "path": "components/postion/postion",
"style" : "style": {
{ "navigationBarTitleText": "",
"navigationBarTitleText": "", "enablePullDownRefresh": false
"enablePullDownRefresh": false }
}
}
}
], ],
"subpackages": [{ "subpackages": [{
"root": "subPages", "root": "subPages",
"pages": [{ "pages": [{
@ -819,7 +819,14 @@
} }
} }
}, {
"path": "shareCounpon/shareCounpon",
"style": {
"navigationBarTitleText": "分享领取优惠券",
"enablePullDownRefresh": false
} }
}
] ]
}, { }, {
"root": "qianzhu-KFC", "root": "qianzhu-KFC",
@ -877,13 +884,13 @@
"path": "order-details/order-details", "path": "order-details/order-details",
"style": { "style": {
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#3da7e7", "navigationBarBackgroundColor": "#3da7e7",
"backgroundColorTop": "#3da7e7", "backgroundColorTop": "#3da7e7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},{ }, {
"path": "kfc-menu-list/kfc-menu-list", "path": "kfc-menu-list/kfc-menu-list",
"style": { "style": {
"navigationBarTitleText": "菜单", "navigationBarTitleText": "菜单",

@ -92,7 +92,7 @@
font-size: 16px; font-size: 16px;
} }
</style> </style>
<button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">立即使用</button> <button class="download" style="height:40px;line-height: 40PX;width:100%;border:none;">使用</button>
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>
@ -176,8 +176,10 @@
}, },
onLoad() { onLoad() {
var arr1 = window.location.href; var arr1 = window.location.href;
var arr2 = arr1.split('='); var arr2 = arr1.split('=');
this.getH5AccessToken(arr2[1]); if(!app.globalData.openId){
this.getH5AccessToken(arr2[1]);
}
this.getDiscountByQrCode(); this.getDiscountByQrCode();
}, },
@ -214,7 +216,7 @@
getDiscountByQrCode() { getDiscountByQrCode() {
let that = this; let that = this;
uni.getStorage({ uni.getStorage({
key: 'h5code', key: 'staffCode',
success: (res) => { success: (res) => {
let params = { let params = {
code: res.data code: res.data

@ -288,7 +288,7 @@
radioStatus: true, radioStatus: true,
memDiscountId: '', memDiscountId: '',
user: '', user: '',
paytype: 'weixin', paytype: '2',
PaymentPassword: '', PaymentPassword: '',
orderId: '', orderId: '',
jumpType: '', jumpType: '',

@ -516,7 +516,9 @@
// 007 线 // 007 线
// 008 // 008
// 009 广 // 009 广
// 0010 // 0010
// 0011
if (e.data == '000000#/' && app.globalData.h5code) { if (e.data == '000000#/' && app.globalData.h5code) {
uni.navigateTo({ uni.navigateTo({
url: '../../goods/refuel-details/refuel-details' url: '../../goods/refuel-details/refuel-details'
@ -573,6 +575,11 @@
url: '/subPages/selectEntry/selectEntry' url: '/subPages/selectEntry/selectEntry'
}) })
} }
if (e.data == '0000011&key' && app.globalData.h5code) {
uni.navigateTo({
url: '../../goods/externalCoupon/externalCoupon'
})
}
} }
} }
}) })

@ -23,13 +23,16 @@
app.globalData.accountId = options.accountId; app.globalData.accountId = options.accountId;
uni.switchTab({ uni.switchTab({
url: '../tabBar/home/home' url: '../tabBar/home/home'
}) })
// uni.navigateTo({
// url:'/subPages/shareCounpon/shareCounpon'
// })
// #endif // #endif
// #ifdef H5 // #ifdef H5
var arr1 = window.location.href; var arr1 = window.location.href;
var arr2 = arr1.split('='); var arr2 = arr1.split('=');
if (arr2[1] != undefined && arr2[2] == '1#/') { if (arr2[1] != undefined && arr2[2] == '1#/') {
app.globalData.h5code = arr2[1]; app.globalData.h5code = arr2[1];
uni.setStorage({ uni.setStorage({
key: "h5code", key: "h5code",
data: arr2[1] data: arr2[1]
@ -58,7 +61,7 @@
that.loginBySilence(arr3[0]); that.loginBySilence(arr3[0]);
} }
if (arr2[3] != undefined && arr2[3]) { if (arr2[3] != undefined && arr2[3]) {
let arr4 = arr2[3].split('#'); let arr4 = arr2[3].split('#');
uni.setStorage({ uni.setStorage({
key: "staffCode", key: "staffCode",
data: arr4[0] data: arr4[0]

@ -131,7 +131,7 @@
notice: '', // notice: '', //
textcont: '', // textcont: '', //
explainReceiptTime: '', // explainReceiptTime: '', //
time: 0, time: 20,
// //
scrollIntoView: 0, // scrollIntoView: 0, //
@ -160,17 +160,18 @@
this.findSecConfigByTypewap(); this.findSecConfigByTypewap();
}, },
mounted() { mounted() {
let scroll_width = 0; // let scroll_width = 0;
const query = uni.createSelectorQuery().in(this); // const query = uni.createSelectorQuery().in(this);
query.select('.right-left-scroll').boundingClientRect(data => { // query.select('.right-left-scroll').boundingClientRect(data => {
scroll_width = (data.width).toFixed(2); // scroll_width = (data.width).toFixed(2);
}).exec(); // }).exec();
query.select('.right-left-scroll .content').boundingClientRect(data => { // query.select('.right-left-scroll .content').boundingClientRect(data => {
if (data.width - scroll_width > 0) { // if (data.width - scroll_width > 0) {
this.time = (9 * data.width / scroll_width).toFixed(2); // this.time = (9 * data.width / scroll_width).toFixed(2);
} // console.log('=====' + this.time);
}).exec(); // }
// }).exec();
}, },
methods: { methods: {
// //

@ -0,0 +1,90 @@
<template>
<view>
<view class="imgshead"></view>
<view class="imgscontent">
<view class="conts paddtop13">
<view v-for="(item,index) in couponList" :key="index" class="conpon border-r height90 flleft marb10 ">
<view class="width94 font15 fontwig6 fotlt fcorfff mart5">
96折星巴克优惠券
</view>
<view class="width80 fotct backcor99 mart5 linec6" style="opacity: 0.2;"></view>
<view class="width90 font10 fotlt fcorfff mart3">
满30-5
</view>
<view class="width90 font10 fotlt fcorfff mart3">
有效时间: 30
</view>
<view class="width90 font10 fotlt fcorfff mart3">
截止时间:2023年2月31日
</view>
</view>
</view>
</view>
<view class="imgsfoot">
<view class="width100 height50"></view>
<view class="couponBtn fontlet font24 fotct fontwig6 width60w height45l">一键领取</view>
</view>
</view>
</template>
<script>
let app = getApp();
export default {
data() {
return {
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'share1.png',
imgadres1: 'share2.png',
couponList: [1, 2, 3, 4, 5, 6]
}
},
methods: {
}
}
</script>
<style lang="scss">
.imgshead {
background-image: url(https://hsgcs.dctpay.com/filesystem/wxApplets/share1.png);
background-size: 100% 230px;
height: 230px;
background-repeat: no-repeat;
}
.imgscontent {
background-image: url(https://hsgcs.dctpay.com/filesystem/wxApplets/share2.png);
background-size: 100% 320px;
height: 320px;
background-repeat: no-repeat;
.conts {
width: 74%;
margin-left: 13%;
}
}
.imgsfoot {
background-image: url(https://hsgcs.dctpay.com/filesystem/wxApplets/share3.png);
background-size: 100% 250px;
height: 250px;
background-repeat: no-repeat;
}
.conpon {
background: linear-gradient(to bottom, #fe8e3f, #f14f21);
width: 48%;
margin-right: 1%;
margin-left: 1%;
}
.couponBtn {
letter-spacing: 3px;
color: #ff482d;
border-radius: 25px;
background: linear-gradient(to right, #fea03c, #f7dd6a);
}
</style>

@ -75,7 +75,10 @@ $uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx; $uni-font-size-paragraph:30upx;
/* 字体大小 */ /* 字体大小 */
.font10 {
font-size: 10px;
}
.font11 { .font11 {
font-size: 11px; font-size: 11px;
} }
@ -659,7 +662,10 @@ $uni-font-size-paragraph:30upx;
.mart5 { .mart5 {
margin-top: 5px; margin-top: 5px;
} }
.mart3 {
margin-top: 3px;
}
.mart1 { .mart1 {
margin-top: 1px; margin-top: 1px;
} }
@ -842,10 +848,6 @@ $uni-font-size-paragraph:30upx;
justify-content: flex-end; justify-content: flex-end;
display: flex; display: flex;
} }
.font12{
font-size: 12px;
}
.aliitem{ .aliitem{

Loading…
Cancel
Save