From 7b81e2ffb0e7fae1769d6abdd67fdd6655bdd112 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Thu, 7 Nov 2024 15:02:44 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3?=
=?UTF-8?q?=E3=80=81=E9=9C=B8=E7=8E=8B=E9=A4=90=E3=80=81=E4=BC=98=E6=83=A0?=
=?UTF-8?q?=E5=88=B8=E5=88=86=E4=BA=AB=E6=96=B0=E5=A2=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 3 +-
common/js/api.js | 75 +-
components/popupad.vue | 10 +-
framework/0-conf.js | 8 +-
framework/1-utils.js | 17 +-
framework/11-api.js | 1 -
pages.json | 57 ++
pages/index/indexs.vue | 4 +
pages/member/index - 副本.vue | 723 ------------------
pages/member/index.vue | 127 +--
pages/member/list.vue | 6 +
pages/order_food/components/shoppingCart.vue | 15 +-
.../components/shoppingCartBilling.vue | 5 +-
pages/order_food/order_food.vue | 64 +-
pages/order_food/order_food_search.vue | 16 +-
pages/user/coupon.vue | 33 +-
pages/user/user.vue | 23 +-
pagesInviteFriends/index/index.vue | 295 +++++++
pagesOrder/components/paymentMethod.vue | 27 +-
pagesOrder/components/rechargeFree.vue | 29 +-
pagesOrder/components/topUpActivity.vue | 2 +-
pagesOrder/confirm_order/index.vue | 201 +++--
pagesOrder/order_detail/index.vue | 2 +-
pagesPoints/IntegralDetail/index.vue | 129 ++++
pagesPoints/confirm_order/index.vue | 349 +++++++++
pagesPoints/exchangeRecord/index.vue | 199 +++++
pagesPoints/exchangeRecordDetail/index.vue | 375 +++++++++
pagesPoints/goodsDetail/index.vue | 118 +++
pagesPoints/index/index.vue | 349 +++++++++
29 files changed, 2375 insertions(+), 887 deletions(-)
delete mode 100644 pages/member/index - 副本.vue
create mode 100644 pagesInviteFriends/index/index.vue
create mode 100644 pagesPoints/IntegralDetail/index.vue
create mode 100644 pagesPoints/confirm_order/index.vue
create mode 100644 pagesPoints/exchangeRecord/index.vue
create mode 100644 pagesPoints/exchangeRecordDetail/index.vue
create mode 100644 pagesPoints/goodsDetail/index.vue
create mode 100644 pagesPoints/index/index.vue
diff --git a/App.vue b/App.vue
index 4e988ba..7221fc6 100644
--- a/App.vue
+++ b/App.vue
@@ -37,7 +37,6 @@
},
onShow: function() {
// 获取导航栏信息
-
wx.getSystemInfo({
success: res => {
this.globalData.systemInfo = res;
@@ -150,7 +149,7 @@
}
page {
- background-color: #F9F9F9;
+ background-color: #F6F6F6!important;
}
text {
diff --git a/common/js/api.js b/common/js/api.js
index 8f69837..ade21d5 100644
--- a/common/js/api.js
+++ b/common/js/api.js
@@ -71,7 +71,7 @@ export default {
paymemeberIn(data) { //充值
return uni.api.post("/pay/memeberIn", data);
},
-
+
orderorderList(data) { //订单列表
return uni.api.get("/order/orderList", data);
@@ -285,5 +285,76 @@ export default {
cancelTakeNumber(data) {
return uni.api.post("/callTable/cancel", data, false);
},
-
+
+
+
+ /**
+ * 积分-基本设置-获取店铺设置
+ * @param {Object} param
+ */
+ shopSettingInfo(shopId) {
+ return uni.api.get(`/api/points/basic-setting/${shopId}`);
+ },
+
+ /**
+ * 积分-兑换商品列表
+ * @param {Object} param
+ */
+ pointsGoodsList(param) {
+ return uni.api.get("/api/points/goods-setting/page", param);
+ },
+
+ /**
+ * 积分-生成订单
+ * @param {Object} data
+ */
+ pointsCreateOrder(data) {
+ return uni.api.post("/api/points/exchange-record/create", data);
+ },
+ /**
+ * 积分-支付订单
+ * @param {Object} data
+ */
+ pointsPayOrder(data) {
+ return uni.api.post("/api/points/exchange-record/pay", data);
+ },
+ /**
+ * 积分-取消订单
+ * @param {Object} data
+ */
+ pointsCancelOrder(data) {
+ return uni.api.post("/api/points/exchange-record/cancel", data);
+ },
+ /**
+ * 积分-001-会员积分账户信息
+ * @param {Object} param
+ */
+ memberPointsInfo(memberId) {
+ return uni.api.get(`/api/points/member-points/${memberId}`, );
+ },
+
+ /**
+ * 积分-明细列表
+ * @param {Object} param
+ */
+ memberPointsLogList(param) {
+ return uni.api.get("/api/points/member-points-log/page", param);
+ },
+
+ /**
+ * 积分-兑换记录-列表
+ * @param {Object} param
+ */
+ exchangeRecordList(param) {
+ return uni.api.get("/api/points/exchange-record/page", param);
+ },
+
+ /**
+ * 积分-获取订单可用积分及抵扣金额
+ * @param {Object} param
+ */
+ calcUsablePoints(param) {
+ return uni.api.get("/api/points/member-points/calc-usable-points", param);
+ },
+
}
\ No newline at end of file
diff --git a/components/popupad.vue b/components/popupad.vue
index 742e3be..8960d29 100644
--- a/components/popupad.vue
+++ b/components/popupad.vue
@@ -12,14 +12,15 @@
radius='10'
@change="e => current = e.current"
@click="swiperClick"
- bgColor="transparent" height='720'
+ bgColor="transparent" height="920"
>
-
+
-
+
+
@@ -207,7 +208,8 @@
justify-content: center;
align-items: center;
.swiperBox{
- width: 80%;
+ width: 85%;
+ margin-top: 50rpx;
margin-bottom: 50rpx;
}
.swiper__wrapper__item__wrapper__image{
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 44b09ed..3b14b89 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -6,10 +6,10 @@ const proxyApi = "/api"
// const proxyApi = 'http://192.168.1.15:9888/cashierService' // 王伟
// const proxyApi = 'http://192.168.1.27:9888/cashierService' // 帆哥
// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
-// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
-// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
-const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
-const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
+const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
+const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
+// const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
+// const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
// #endif
// #ifdef H5
diff --git a/framework/1-utils.js b/framework/1-utils.js
index fc02306..fd608a7 100644
--- a/framework/1-utils.js
+++ b/framework/1-utils.js
@@ -260,6 +260,7 @@ const getUserInfo = function (successCallback, failCallback) {
},
fail: (err) => {}
});
+
}
});
@@ -269,23 +270,23 @@ const getUserInfo = function (successCallback, failCallback) {
// #ifdef MP-ALIPAY
return new Promise((resolve, reject) => {
my.getAuthCode({
- scopes: 'auth_user',
- success: (data) => {
+ scopes: 'auth_base',
+ success: async (data) => {
console.log(data)
// 支付宝小程序环境
- my.getAuthUserInfo({
- success: async (infoRes) => {
+ // my.getAuthUserInfo({
+ // success: async (infoRes) => {
let res = await Api.userwxlogin({
code: data.authCode, //临时登录凭证
- rawData: JSON.stringify(infoRes),
+ // rawData: JSON.stringify(infoRes),
source: 'alipay'
})
if (res.code == 0) {
resolve(res)
}
- },
- fail: (err) => {}
- });
+ // },
+ // fail: (err) => {}
+ // });
}
});
})
diff --git a/framework/11-api.js b/framework/11-api.js
index 4c4c7d8..aa063c4 100644
--- a/framework/11-api.js
+++ b/framework/11-api.js
@@ -125,7 +125,6 @@ async function request(options) {
uni.cache.set('storage:offset-time', offset, -1)
return await request(options)
} else {
- console.log(options)
uni.showToast({
title: res.message || res.msg || res.error,
icon: "none",
diff --git a/pages.json b/pages.json
index 3c7140b..8413075 100644
--- a/pages.json
+++ b/pages.json
@@ -373,6 +373,63 @@
}
}
]
+ },
+ {
+ "root": "pagesPoints",
+ "pages": [
+ {
+ "path": "index/index",
+ "style": {
+ "navigationBarTitleText": "积分商城",
+ "navigationBarBackgroundColor": "#E9B183"
+ }
+ },
+ {
+ "path": "goodsDetail/index",
+ "style": {
+ "navigationBarTitleText": "商品详情"
+ }
+ },
+ {
+ "path": "exchangeRecord/index",
+ "style": {
+ "navigationBarTitleText": "兑换记录"
+ }
+ },
+ {
+ "path": "exchangeRecordDetail/index",
+ "style": {
+ "navigationBarTitleText": "订单详情"
+ }
+ },
+ {
+ "path": "IntegralDetail/index",
+ "style": {
+ "navigationBarTitleText": "积分明细"
+ }
+ },
+ {
+ "path": "confirm_order/index",
+ "style": {
+ "navigationBarTitleText": "确认订单",
+ "navigationBarBackgroundColor": "#E9B183"
+ }
+ }
+
+
+ ]
+ },
+ {
+ "root": "pagesInviteFriends",
+ "pages": [
+ {
+ "path": "index/index",
+ "style": {
+ "navigationBarTitleText": "邀请好友",
+ "navigationStyle": "custom"
+ }
+ }
+ ]
}
],
"globalStyle": {
diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue
index 7087ae0..b6d64ef 100644
--- a/pages/index/indexs.vue
+++ b/pages/index/indexs.vue
@@ -91,6 +91,10 @@
})
},
memberindex(url) {
+ // uni.pro.navigateTo("/pagesInviteFriends/index/index", {
+ // shopId: uni.cache.get('shopId'),
+ // type: 'index',
+ // })
uni.pro.navigateTo(url, {
shopId: uni.cache.get('shopId'),
type: 'index',
diff --git a/pages/member/index - 副本.vue b/pages/member/index - 副本.vue
deleted file mode 100644
index 695940e..0000000
--- a/pages/member/index - 副本.vue
+++ /dev/null
@@ -1,723 +0,0 @@
-
-
-
-
-
- {{ shopUserInfo.shopName }}
-
-
-
-
- 账户余额(元)
-
- {{shopUserInfo.amount || '0.00'}}
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
- ¥
-
-
- 自定义金额
-
-
-
-
- 充值
-
- ¥{{item.amount}}
-
-
-
- 赠{{inputshow}}
- ¥{{ item.giftAmount }}
-
-
- 赠送{{item.giftAmount}}元
-
-
-
-
-
-
-
-
- 您将获得:
-
-
-
- {{ item }}
-
-
-
-
-
-
- 适用门店
- {{ shopUserInfo.shopName }}
-
-
- 充值说明
- 1.充值金额1家门店可用
- 2.储值完成后不支持自助退款,可联系商家处理
- 3.钱包余额不支持转赠,不可提现,长期有效
-
-
-
-
-
-
-
-
-
- 已同意
- 《用户隐私协议》
-
-
-
- 立即充值
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/member/index.vue b/pages/member/index.vue
index bbed540..a7ca791 100644
--- a/pages/member/index.vue
+++ b/pages/member/index.vue
@@ -23,30 +23,32 @@
¥
-
+ controlled="true"
+ @input="amountChange"
+ >
自定义金额
-
+
充值
- ¥{{item.minNum}}
-
+ ¥{{item.amount}}
+
- 赠
- ¥{{ item.handselNum }}
+ 赠{{inputshow}}
+ ¥{{ item.giftAmount }}
- 赠送{{item.handselNum}}元
+ 赠送{{item.giftAmount}}元
@@ -108,8 +110,7 @@
isProtocol: false,
listdata: [],
amount: 0,
- minNum: 0,
- handselNum: 0,
+ giftAmount: 0,
userInfo: {},
shopUserInfo: null,
shopId: '',
@@ -118,33 +119,38 @@
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
],
-
+ type: "",
}
},
- async onLoad(e) {
+ async onLoad(options) {
// if ( e.type == 'list' || e.type == 'index') {
// this.shopId = e.shopId;
// this.init();
// }
- console.log(e)
uni.cache.set('forceUpdate',1)
- if (e.q) {
- this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
+ // #ifdef MP-WEIXIN
+ if (options.q) {
+ this.shopId = this.getQueryString(decodeURIComponent(options.q), 'shopId')
uni.cache.set('shopId',this.shopId)
this.tokenShow = false;
- // 等待登录结果返回
- // if (!uni.cache.get('token')) {
- // await this.$onLaunched;
- // }
- this.shopInfo();
- this.paygetActive()
- } else{
- this.shopId = e.shopId;
- uni.cache.set('shopId',this.shopId)
- this.shopInfo();
- this.paygetActive()
}
+ // #endif
+ // #ifdef MP-ALIPAY
+ if (getApp().globalData.shopId) { this.shopId = getApp().globalData.shopId }
+ uni.cache.set('shopId',this.shopId)
+ // #endif
+
+ if (options.shopId) {
+ this.shopId = options.shopId
+ uni.cache.set('shopId',this.shopId)
+ }
+ if (options.type) {
+ this.type = options.type
+ }
+ if ( options.amount ) { this.amount = options.amount; }
+ this.shopInfo();
+ this.paygetActive()
},
methods: {
/**
@@ -193,20 +199,43 @@
let res = await this.api.paygetActive({
shopId: this.shopId,
page: 1,
- pageSize: 10
+ pageSize: 99
})
try {
this.listdata = res.data.list;
this.giftList = this.listdata[0].gives;
- this.amount = this.listdata[0].minNum;
- this.minNum = this.listdata[0].minNum;
- this.handselNum = this.listdata[0].handselNum
+ this.giftAmount = this.listdata[0].giftAmount
+ if ( this.type == 'topUpActivity') {
+ this.amountChange()
+ } else {
+ this.amount = this.listdata[0].amount;
+ }
} catch (e) {
//TODO handle the exception
}
},
+ /**
+ * 监听金额修改
+ */
+ amountChange () {
+ let item = this.listdata.filter(item=>this.amount==item.amount)
+ if ( item.length > 0 ) {
+ this.listdata.forEach((v,e)=>{
+ if ( this.amount == v.amount) {
+ this.inputshow = e;
+ this.clickinput(v,e)
+ }
+ })
+ } else {
+ this.inputshow = '';
+ this.giftList = [];
+ this.giftAmount = '';
+ }
+
+ },
+
/**
* 进入明细\管理
* @param {Object} e
@@ -295,12 +324,10 @@
* @param {Object} b
*/
clickinput(a, b) {
- console.log(a, b)
this.inputshow = b;
this.giftList = a.gives;
- this.amount = a.minNum;
- this.minNum = a.minNum;
- this.handselNum = a.handselNum;
+ this.amount = a.amount;
+ this.giftAmount = a.giftAmount;
},
/**
@@ -315,6 +342,7 @@
});
return false;
}
+ console.log(this.amount)
if (this.amount == null || this.amount == '') {
uni.showToast({
title: '金额不能为空',
@@ -331,7 +359,13 @@
}
let res = await this.api.paymemeberIn({
shopId: this.shopId, // 判断显示哪家的作品,
- amount: this.amount // 判断显示哪家的作品,
+ amount: this.amount ,// 判断显示哪家的作品,
+ // #ifdef MP-WEIXIN
+ payType: 'wechatPay',
+ // #endif
+ // #ifdef MP-ALIPAY
+ payType: 'aliPay',
+ // #endif
})
if (res.code == 0) {
uni.showLoading({
@@ -356,15 +390,20 @@
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
- if ( pages.length > 1) {
- _this.shopInfo()
+ if ( _this.type && _this.type == "topUpActivity") {
+ uni.pro.navigateBack()
} else {
- setTimeout(res => {
- uni.switchTab({
- url: '/pages/index/index'
- })
- }, 500)
+ if ( pages.length > 1) {
+ _this.shopInfo()
+ } else {
+ setTimeout(res => {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }, 500)
+ }
}
+
},
})
@@ -453,7 +492,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
- padding: 14rpx 16rpx;
+ padding: 22rpx 16rpx 22rpx 32rpx;
background-color: #fff;
border-radius: 8rpx;
.customAmount_left{
diff --git a/pages/member/list.vue b/pages/member/list.vue
index 004b591..af886c7 100644
--- a/pages/member/list.vue
+++ b/pages/member/list.vue
@@ -108,12 +108,18 @@
shopId: item.shopId,
type: 'index',
})
+ } else if ( this.type && this.type == 'user_points') {
+ uni.pro.navigateTo('/pagesPoints/index/index', {
+ shopId: item.shopId,
+ type: 'member_list',
+ })
} else {
uni.pro.navigateTo('member/memberdetails', {
shopId: item.shopId
})
}
+
}
},
diff --git a/pages/order_food/components/shoppingCart.vue b/pages/order_food/components/shoppingCart.vue
index 6e0db47..082e2c9 100644
--- a/pages/order_food/components/shoppingCart.vue
+++ b/pages/order_food/components/shoppingCart.vue
@@ -24,8 +24,13 @@
¥
- {{ item.salePrice }}
+ {{ item.memberPrice }}
+ ¥
+ {{ item.salePrice }}
+
+
+
@@ -82,7 +87,7 @@
},
data() {
return {
-
+ shopUserInfo: uni.cache.get('shopUserInfo')
}
},
@@ -297,6 +302,12 @@
}
.num {}
+ .lineThrough{
+ font-weight: normal;
+ text-decoration:line-through;
+ color: #999!important;
+ font-size: 24rpx!important;
+ }
}
.sku-wrap {
diff --git a/pages/order_food/components/shoppingCartBilling.vue b/pages/order_food/components/shoppingCartBilling.vue
index b262b82..a4e10bb 100644
--- a/pages/order_food/components/shoppingCartBilling.vue
+++ b/pages/order_food/components/shoppingCartBilling.vue
@@ -11,7 +11,8 @@
¥
- {{cartLists.amount||'0.00'}}
+ {{cartLists.memberAmount||'0.00'}}
+ {{cartLists.amount||'0.00'}}
去结算
@@ -26,7 +27,7 @@
data() {
return {
-
+ shopUserInfo: uni.cache.get('shopUserInfo')
}
},
props:{
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index ecfef4b..ba04a30 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -61,7 +61,14 @@
- ¥{{item.lowPrice}}/{{item.unitSnap}}
+
+
+ ¥
+ {{item.lowMemberPrice}}
+ ¥
+ {{item.lowPrice}}
+ /{{item.unitSnap}}
+
@@ -73,8 +80,17 @@
- ¥{{item.lowPrice}}/{{item.unitSnap}}
+
+
+ ¥
+ {{item.lowMemberPrice}}
+ ¥
+ {{item.lowPrice}}
+ /{{item.unitSnap}}
+
+
+
@@ -152,7 +168,13 @@
- ¥{{ item1.lowPrice }}/{{item1.unitSnap}}
+
+ ¥
+ {{ item1.lowMemberPrice }}
+ ¥
+ {{ item1.lowPrice }}
+ /{{item1.unitSnap}}
+
非可售时间
@@ -161,7 +183,15 @@
- ¥{{ item1.lowPrice }}/{{item1.unitSnap}}
+
+ ¥
+ {{ item1.lowMemberPrice }}
+ ¥
+ {{ item1.lowPrice }}
+ /{{item1.unitSnap}}
+
+
+
\ No newline at end of file
diff --git a/pages/order_food/order_food_search.vue b/pages/order_food/order_food_search.vue
index 8e68d57..7a204b1 100644
--- a/pages/order_food/order_food_search.vue
+++ b/pages/order_food/order_food_search.vue
@@ -37,7 +37,13 @@
- ¥{{ item1.lowPrice }}/{{item1.unitSnap}}
+
+ ¥
+ {{ item1.lowMemberPrice }}
+ ¥
+ {{ item1.lowPrice }}
+ /{{item1.unitSnap}}
+
非可售时间
@@ -46,7 +52,13 @@
- ¥{{ item1.lowPrice }}/{{item1.unitSnap}}
+
+ ¥
+ {{ item1.lowMemberPrice }}
+ ¥
+ {{ item1.lowPrice }}
+ /{{item1.unitSnap}}
+
+ :class="tabIndex == item.type?'towcontentlistxitemboxopacity':''"
+ v-for="(item,index) in tabList" :key="index" @click="towcontentclick(item)">
{{item.name}}
-
@@ -74,10 +74,8 @@
export default {
data() {
return {
- tabList: [{
- name: '全部',
- type: ''
- },
+ tabList: [
+
{
name: '未使用',
type: '1'
@@ -87,13 +85,17 @@
type: '2'
}
],
- tabIndex: 0,
+ tabIndex: 1,
list: [],
- status: "",
+ status: 1,
+ type: "",
};
},
- onLoad() {
+ onLoad(options) {
+ if (options.type) {
+ this.type = options.type;
+ }
this.getCouponList()
},
@@ -101,11 +103,10 @@
/**
* 切换类型
- * @param {Object} index
* @param {Object} item
*/
- towcontentclick(index, item) {
- this.tabIndex = index;
+ towcontentclick(item) {
+ this.tabIndex = item.type;
this.status = item.type;
this.getCouponList()
},
@@ -115,7 +116,7 @@
*/
async getCouponList() {
try {
- let res = await this.api.getUserConpons({
+ let res = await this.api.conponList({
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status
@@ -156,7 +157,7 @@
margin-top: 32rpx;
.towcontentlistxitembox {
- width: 33%;
+ width: 50%;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
@@ -170,8 +171,6 @@
}
.towcontentlistxitemboxopacity {
- width: 33%;
- font-family: PingFang SC, PingFang SC;
font-weight: bold;
text{
color: #E3AD7F;
diff --git a/pages/user/user.vue b/pages/user/user.vue
index c42f75a..53f0e2a 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -57,7 +57,7 @@
teblist: [],
myAssetsList: [
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
- // { name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
+ { name: "积分", type: "points", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
// { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
],
@@ -121,6 +121,9 @@
if (res.code == 0) {
uni.cache.set('userInfo', res.data);
this.userInfo = res.data;
+ this.myAssetsList[0].num = res.data.balanceAll || "";
+ this.myAssetsList[1].num = res.data.pointsAll || "";
+ this.myAssetsList[2].num = res.data.couponAll || "";
}
},
@@ -180,9 +183,7 @@
}
switch (item.type) {
case 'my_order':
- uni.switchTab({
- url: '/pages/order/order'
- });
+ uni.pro.switchTab('order/order')
break
case 'my_member':
uni.pro.navigateTo('member/list')
@@ -200,7 +201,19 @@
}
break
- case 'my_coupon': //内部页面
+ case 'points': //积分
+ if (uni.cache.get('shopId') && uni.cache.get('token')) {
+ uni.pro.navigateTo('/pagesPoints/index/index', {
+ shopId: uni.cache.get('shopId'),
+ type: 'user',
+ })
+ } else{
+ uni.pro.navigateTo('member/list', {
+ type: 'user_points'
+ })
+ }
+ break;
+ case 'my_coupon': //优惠券
uni.pro.navigateTo('user/coupon')
break;
case 'my_info': //内部页面
diff --git a/pagesInviteFriends/index/index.vue b/pagesInviteFriends/index/index.vue
new file mode 100644
index 0000000..f6ec0bc
--- /dev/null
+++ b/pagesInviteFriends/index/index.vue
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+ 邀请1人可得,双方各得10元优惠券
+ 邀请好友
+ 新用户获得
+
+
+ ¥10.00
+ 满¥100.00可用
+
+
+ 邀新10元优惠券×1张
+ 领取后30天内有效
+
+
+ 每邀请1个用户可获得
+
+
+ ¥10.00
+ 满¥100.00可用
+
+
+ 邀新10元优惠券×1张
+ 领取后30天内有效
+
+
+
+
+
+ {{item.label}}{{item.num||0}}人
+
+
+
+
+ 草莓大福
+ 草莓大福
+
+ 2023-22-33 17:33:99
+
+
+
+
+
+
+
+
+
+ 此用户已死,勿Call
+ [邀请你领取新人专享优惠券!]
+
+
+ ¥10.00
+ 满¥100.00可用
+
+
+ 邀新10元优惠券×1张
+ 领取后30天内有效
+
+
+ 领券
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesOrder/components/paymentMethod.vue b/pagesOrder/components/paymentMethod.vue
index d69cd2d..b53d9c7 100644
--- a/pagesOrder/components/paymentMethod.vue
+++ b/pagesOrder/components/paymentMethod.vue
@@ -18,7 +18,7 @@
-
+
@@ -58,10 +58,29 @@
amountVIP:{
type: Object
},
+ freeCheck: {
+ type: Boolean
+ }
+ },
+ watch: {
+
+ freeCheck(newVal,oldVal) {
+ if ( newVal ) {
+ // #ifdef MP-WEIXIN
+ this.radiovalue = 2
+ // #endif
+ // #ifdef MP-ALIPAY
+ this.radiovalue = 3
+ // #endif
+ let name = this.paymentMethodName[this.radiovalue-1].name;
+ this.$emit("groupChange",{type:this.radiovalue ,name: name })
+ }
+ }
},
mounted() {
- console.log(this.amountVIP)
+ console.log(this.amountVIP)
// this.getAount();
+
},
methods: {
/**
@@ -70,6 +89,9 @@
*/
groupChange(type) {
console.log(type)
+ if ( this.freeCheck && type == 1 ) {
+ return;
+ }
this.radiovalue = type;
let name = this.paymentMethodName[type-1].name;
this.$emit("groupChange",{type:type ,name: name })
@@ -92,7 +114,6 @@
.paymentMethod{
box-sizing: border-box;
margin-top: 30rpx;
- padding: 0 20rpx 220rpx 20rpx;
border-radius: 18rpx;
.paymentMethod_content{
background-color: #fff;
diff --git a/pagesOrder/components/rechargeFree.vue b/pagesOrder/components/rechargeFree.vue
index 2671dfc..960302a 100644
--- a/pagesOrder/components/rechargeFree.vue
+++ b/pagesOrder/components/rechargeFree.vue
@@ -4,10 +4,10 @@
优惠
- 充值消费2倍(¥50),本单立享免单!
+ 充值消费{{freeDingConfig.rechargeTimes}}倍(¥{{freeDingConfig.rechargeThreshold}}),本单立享免单!
-
+
@@ -19,14 +19,34 @@
data() {
return {
rechargeFreeChecked: false,
+ disabled: false,
}
},
props:{
shopUserInfo:{
type: Object
},
+ freeDingConfig:{
+ type: Object
+ },
+ payAmount: {
+ type: Number
+ },
+ freeDisabled: {
+ type: Boolean
+ }
+ },
+ watch: {
+ freeDisabled (newVal) {
+ if ( this.payAmount < this.freeDingConfig.rechargeThreshold ) {
+ this.freeDisabled = true
+ }
+ }
},
mounted() {
+ if ( this.payAmount < this.freeDingConfig.rechargeThreshold ) {
+ this.freeDisabled = true
+ }
},
methods: {
@@ -34,7 +54,12 @@
* 监听是否免单
*/
changeFree ( e ) {
+ if ( this.freeDisabled ) {
+ return;
+ }
+
this.rechargeFreeChecked = !this.rechargeFreeChecked;
+
this.$emit("changeFree",this.rechargeFreeChecked)
}
}
diff --git a/pagesOrder/components/topUpActivity.vue b/pagesOrder/components/topUpActivity.vue
index dc7a6b1..8c70d68 100644
--- a/pagesOrder/components/topUpActivity.vue
+++ b/pagesOrder/components/topUpActivity.vue
@@ -1,6 +1,6 @@
-
+
充值更划算
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index 0d802f6..d8c442e 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -77,20 +77,35 @@
{{(shopTableInfo.seatNum*storeInfo.tableFee).toFixed(2)}}
-
-
-
- {{ item.name }}
+
+
+
+
+ {{ item.name }}
+
+
-
- 使用29积分抵扣¥29.00
-
-
-
-
+
+
+
+ {{ item.name }}
+
+
+
+ 使用 {{ calcUsablePointsData.pointsNum}} 积分抵扣¥{{calcUsablePointsData.pointsNum/calcUsablePointsData.equivalentPoints}}
+
+
+ {{calcUsablePointsData.unusableReason}}
+
+
+
+
+
+
+
- 暂无可用优惠券
+
小计¥
{{listinfo.payAmount}}
@@ -107,12 +122,14 @@
-
+
-
+
-
-
+
+
+
+
实付金额
@@ -178,29 +195,33 @@
sendType: "table",
eatModel: [],
favorable: [
- // { name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
+ { name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
// { name: "团购优惠", type: "group", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
- // { name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png"},
+ { name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
],
isPointsChecked: false,
rechargeFreeChecked: false,
+ calcUsablePointsData: null,
order: {
phone: "",
},
shopTableInfo: null,
+ freeDingConfig: null,
cartLists: [],
listinfo: {
details: [],
payAmount: 0,
name: "",
},
+ freeCheck: false,
+ freeDisabled: false,
totalPrice: 0, // 小计金额
totalAmount: 20, // 支付金额
remark: "", // 备注
radiovalue: 1, // 支付方式
ispws: false, // 输入支付密码
payPasswordShow: false,
- amountVIP: null, // 会员信息
+ amountVIP: uni.cache.get('shopUserInfo'), // 会员信息
listinfoid: null,
paymentBtnText: "余额支付",
isSocket: false,
@@ -229,15 +250,15 @@
uni.$off('message')
}
},
- onLoad(e) {
- console.log(e)
- this.storeInfo = JSON.parse(decodeURIComponent(e.storeInfo));
+ onLoad(options) {
+ if ( options.storeInfo ) {
+ this.storeInfo = JSON.parse(decodeURIComponent(options.storeInfo));
+ }
this.shopId = this.storeInfo.id;
this.listinfo.name = this.storeInfo.shopName;
- this.listinfo.details = JSON.parse(e.cartLists).data;
- this.listinfo.payAmount = JSON.parse(e.cartLists).amount;
- if ( e.tableCode ) { this.tableCode = e.tableCode;}
-
+ this.listinfo.details = JSON.parse(options.cartLists).data;
+ this.cartLists = JSON.parse(options.cartLists);
+ if ( options.tableCode ) { this.tableCode = options.tableCode;}
if ( this.storeInfo.eatModel.indexOf("dine-in") != -1 ) {
this.eatModel = "dine-in";
this.is_type = 0;
@@ -255,8 +276,6 @@
} else {
this.handlemessage()
}
- this.getAount()
-
this.is_typeList.map((item)=>{
console.log(this.storeInfo.eatModel.indexOf(item.val))
if ( this.storeInfo.eatModel.indexOf(item.val) != -1) {
@@ -265,14 +284,71 @@
})
},
methods: {
- changeFree ( val ) {
- console.log(val)
- if ( val ) {
- this.listinfo.payAmount = this.listinfo.payAmount*2
+ setPayAmount ( cartLists ) {
+ console.log(cartLists)
+ if ( this.amountVIP.isVip == 1 && cartLists.memberAmount > 0 ) {
+ this.listinfo.payAmount = (cartLists.memberAmount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
} else {
- this.listinfo.payAmount = this.listinfo.payAmount/2
+ this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
}
},
+ /**
+ * 免单状态监听
+ * @param {Object} val
+ */
+ changeFree ( val ) {
+ this.freeCheck = val;
+
+ if ( val ) {
+ this.listinfo.payAmount = (this.listinfo.payAmount*this.freeDingConfig.rechargeTimes).toFixed(2)
+ } else {
+ this.listinfo.payAmount = (this.listinfo.payAmount/this.freeDingConfig.rechargeTimes).toFixed(2)
+ }
+ },
+
+ /**
+ * 积分状态监听
+ */
+ pointsChange (){
+ if ( this.freeCheck || !this.calcUsablePointsData.usable) {
+ return;
+ }
+ this.isPointsChecked = !this.isPointsChecked
+ if ( this.isPointsChecked ) {
+ this.freeDisabled = true
+
+ this.listinfo.payAmount = (this.listinfo.payAmount-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
+ } else {
+ this.freeDisabled = false
+ this.listinfo.payAmount = (Number(this.listinfo.payAmount)+(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
+ }
+ },
+ goUrl(item){
+ switch (item.type){
+ case 'coupon':
+ uni.pro.navigateTo('/pages/user/coupon', {
+ type: "confirm_order"
+ })
+ break;
+
+ }
+ },
+
+ /**
+ * 获取积分相关信息
+ */
+ async getCalcUsablePoints() {
+ let params = {
+ memberId: this.amountVIP.id,
+ orderAmount: this.listinfo.payAmount,
+ }
+ let res = await this.api.calcUsablePoints(params)
+ this.calcUsablePointsData = res.data;
+ if ( this.calcUsablePointsData.usable && this.listinfo.payAmount >= this.calcUsablePointsData.minPaymentAmount) {
+ this.calcUsablePointsData.pointsNum = this.calcUsablePointsData.accountPoints >= this.calcUsablePointsData.maxUsablePoints ? this.calcUsablePointsData.maxUsablePoints : this.calcUsablePointsData.accountPoints
+ }
+ console.log(this.calcUsablePointsData)
+ },
/**
* 获取桌台码
@@ -306,8 +382,11 @@
if (this.tableCode) {params.code = this.tableCode}
if (this.shopId) {params.shopId = this.shopId}
let res = await this.api.productqueryShop(params)
+ this.freeDingConfig = res.data.freeDingConfig;
this.shopTableInfo = res.data.shopTableInfo;
this.storeInfo = res.data.storeInfo;
+ this.setPayAmount(this.cartLists)
+ this.getCalcUsablePoints()
},
/**
@@ -361,8 +440,7 @@
this.isSocket = true;
this.listinfoid = msg.data.id
this.listinfo.details = msg.data.detailList;
- this.listinfo.payAmount = msg.data.amount;
-
+ this.setPayAmount(msg.data)
uni.$off('getMessage')
this.orderorderInfo(1)
}
@@ -374,7 +452,7 @@
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
- this.listinfo.payAmount = msg.amount;
+ this.setPayAmount(msg)
}
}
@@ -392,7 +470,7 @@
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
- this.listinfo.payAmount = msg.amount;
+ this.setPayAmount(msg)
}
this.isSocket = true;
break;
@@ -426,7 +504,7 @@
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
this.listinfo.details = res.data.info;
- this.listinfo.payAmount = res.data.amount;
+ this.setPayAmount(res.data)
},
/**
@@ -532,14 +610,18 @@
})
return;
}
-
- let res = await this.api.creatOrder({
+
+ let params = {
"tableId": this.tableCode , //桌台码
"shopId": uni.cache.get('shopId'),
"userId": uni.cache.get('userInfo').id,
"sendType": this.sendType,
"remark": this.remark,
- })
+ }
+ if ( this.calcUsablePointsData.pointsNum && this.calcUsablePointsData.pointsNum > 0) {
+ params.pointsNum = this.calcUsablePointsData.pointsNum;
+ }
+ let res = await this.api.creatOrder(params)
console.log(res)
this.listinfoid = res.data.id;
if ( this.storeInfo.registerType == 'restaurant') {
@@ -598,17 +680,36 @@
* 微信/支付宝支付
*/
async showpopupclickdds() {
+ let res;
+ if ( !this.freeCheck ) {
+ res = await this.api.orderPay({
+ orderId: this.listinfoid,
+ // #ifdef MP-WEIXIN
+ payType: 'wechatPay',
+ // #endif
+ // #ifdef MP-ALIPAY
+ payType: 'aliPay',
+ // #endif
+ // payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
+ }) //判断是否支付成功
+ } else {
+ res = await this.api.paymemeberIn({
+ shopId: uni.cache.get('shopId'),
+ amount: this.listinfo.payAmount,
+ orderld: this.listinfoid,
+ // #ifdef MP-WEIXIN
+ payType: 'wechatPay',
+ // #endif
+ // #ifdef MP-ALIPAY
+ payType: 'aliPay',
+ // #endif
+ // payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
+ }) //判断是否支付成功
+ }
+
+
+
- let res = await this.api.orderPay({
- orderId: this.listinfoid,
- // #ifdef MP-WEIXIN
- payType: 'wechatPay',
- // #endif
- // #ifdef MP-ALIPAY
- payType: 'aliPay',
- // #endif
- // payType: this.radiovalue == 2 ? 'wechatPay' : 'aliPay'
- }) //判断是否支付成功
if (res.code == 0) {
// 微信支付还是余额支付
diff --git a/pagesOrder/order_detail/index.vue b/pagesOrder/order_detail/index.vue
index 41ee60e..65e46b4 100644
--- a/pagesOrder/order_detail/index.vue
+++ b/pagesOrder/order_detail/index.vue
@@ -48,7 +48,7 @@
-
+
diff --git a/pagesPoints/IntegralDetail/index.vue b/pagesPoints/IntegralDetail/index.vue
new file mode 100644
index 0000000..844e72f
--- /dev/null
+++ b/pagesPoints/IntegralDetail/index.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+ {{item.content}}
+ {{item.floatPoints}}
+
+ {{item.createTime}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesPoints/confirm_order/index.vue b/pagesPoints/confirm_order/index.vue
new file mode 100644
index 0000000..8c24ab7
--- /dev/null
+++ b/pagesPoints/confirm_order/index.vue
@@ -0,0 +1,349 @@
+
+
+
+
+ 自取门店
+
+ {{shopUserInfo.shopName}}
+ {{shopUserInfo.telephone}}
+
+
+ {{shopUserInfo.address}}
+
+
+
+
+
+
+
+ {{goodsData.goodsName}}
+
+ {{goodsData.requiredPoints}}积分
+ X1
+
+
+
+
+ 使用积分
+ {{goodsData.requiredPoints}}积分
+
+
+
+ 合计¥{{goodsData.extraPrice}}
+
+
+
+ 确认兑换
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesPoints/exchangeRecord/index.vue b/pagesPoints/exchangeRecord/index.vue
new file mode 100644
index 0000000..2b58e06
--- /dev/null
+++ b/pagesPoints/exchangeRecord/index.vue
@@ -0,0 +1,199 @@
+
+
+
+
+
+ 兑换时间{{item.createTime}}
+
+ {{
+ item.status == 'unpaid' ? '待支付' :
+ item.status == 'waiting' ? '待自取' :
+ item.status == 'done' ? '已完成' :
+ item.status == 'cancel' ? '已取消' : ""
+ }}
+
+
+
+
+ {{item.pointsGoodsName}}
+
+ {{item.spendPoints}}积分
+ X1
+
+
+
+
+ 查看详情
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesPoints/exchangeRecordDetail/index.vue b/pagesPoints/exchangeRecordDetail/index.vue
new file mode 100644
index 0000000..a8dfa38
--- /dev/null
+++ b/pagesPoints/exchangeRecordDetail/index.vue
@@ -0,0 +1,375 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 自提凭证
+
+
+
+
+ 提货码:{{orderInfo.couponCode}}
+
+
+
+
+
+
+
+
+
+
+ 已使用
+ {{orderInfo.couponCode}}
+
+
+
+
+
+
+
+
+
+
+ 自取店:{{ shopUserInfo.shopName }}
+
+ {{shopUserInfo.telephone}}
+
+
+ 门店地址:
+ {{shopUserInfo.address}}
+
+
+
+
+
+
+
+
+ {{orderInfo.pointsGoodsName}}
+ {{orderInfo.spendPoints}}积分X1
+
+
+
+
+
+ 支付方式:
+ {{orderInfo.payMethod}}
+
+
+ 兑换时间:
+ {{orderInfo.createTime}}
+
+
+ 订单编号:
+ {{orderInfo.orderNo}}
+
+
+
+
+
+
+
+
+
diff --git a/pagesPoints/goodsDetail/index.vue b/pagesPoints/goodsDetail/index.vue
new file mode 100644
index 0000000..2a3ecec
--- /dev/null
+++ b/pagesPoints/goodsDetail/index.vue
@@ -0,0 +1,118 @@
+
+
+
+
+ {{goodsData.goodsName}}
+ {{goodsData.requiredPoints}} 积分
+
+
+
+ 商品详情
+ {{goodsData.goodsDescription}}
+
+ 立即兑换
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pagesPoints/index/index.vue b/pagesPoints/index/index.vue
new file mode 100644
index 0000000..22ab9ce
--- /dev/null
+++ b/pagesPoints/index/index.vue
@@ -0,0 +1,349 @@
+
+
+
+
+
+
+ 可用积分
+ {{pointsInfo.accountPoints}}
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{item.goodsName}}
+ 剩余{{item.quantity}}件
+
+ {{item.requiredPoints}}积分
+ 立即兑换
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 7167c2604f96f3e61ac73a3df3c5dbdff21c2320 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Fri, 8 Nov 2024 17:32:35 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E5=88=86=E4=BA=AB=E4=BC=98=E6=83=A0?=
=?UTF-8?q?=E5=88=B8=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/api.js | 33 +++++-
components/popupad.vue | 5 +-
pages/index/indexs.vue | 4 -
pages/order_food/order_food.vue | 5 +-
pages/user/coupon.vue | 30 ++---
pagesInviteFriends/index/index.vue | 182 ++++++++++++++++++++++-------
pagesOrder/confirm_order/index.vue | 24 +++-
7 files changed, 211 insertions(+), 72 deletions(-)
diff --git a/common/js/api.js b/common/js/api.js
index ade21d5..0be8890 100644
--- a/common/js/api.js
+++ b/common/js/api.js
@@ -356,5 +356,36 @@ export default {
calcUsablePoints(param) {
return uni.api.get("/api/points/member-points/calc-usable-points", param);
},
-
+
+ /**
+ * 分享-获取邀请页数据
+ * @param {Object} param
+ */
+ getByShopId(param) {
+ return uni.api.get("/tbShopShare/getByShopId", param);
+ },
+
+ /**
+ * 分享-邀请记录
+ * @param {Object} param
+ */
+ shareRecord(param) {
+ return uni.api.get("/tbShopShare/record", param);
+ },
+
+ /**
+ * 分享-被邀请人进入页面时使用
+ * @param {Object} param
+ */
+ shareHeOpen(param) {
+ return uni.api.post("/tbShopShare/open", param);
+ },
+
+ /**
+ * 分享-被邀请人领取优惠券时使用
+ * @param {Object} param
+ */
+ shareReceive(param) {
+ return uni.api.post("/tbShopShare/receive", param);
+ },
}
\ No newline at end of file
diff --git a/components/popupad.vue b/components/popupad.vue
index 8960d29..277b66f 100644
--- a/components/popupad.vue
+++ b/components/popupad.vue
@@ -76,8 +76,9 @@
swiperClick (e) {
let item = this.popupadList[e];
if ( item.linkPath ) {
- uni.navigateTo({
- url: `${item.linkPath}`
+ uni.pro.navigateTo(item.linkPath, {
+ shopId: uni.cache.get('shopId'),
+ is_type: "me",
})
}
},
diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue
index b6d64ef..7087ae0 100644
--- a/pages/index/indexs.vue
+++ b/pages/index/indexs.vue
@@ -91,10 +91,6 @@
})
},
memberindex(url) {
- // uni.pro.navigateTo("/pagesInviteFriends/index/index", {
- // shopId: uni.cache.get('shopId'),
- // type: 'index',
- // })
uni.pro.navigateTo(url, {
shopId: uni.cache.get('shopId'),
type: 'index',
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index ba04a30..62f9d55 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -238,10 +238,10 @@
-
+
-
+
已下单菜品
@@ -481,6 +481,7 @@
duration: 0
});
if ( this.shopId ) {
+ this.productqueryShop();
this.productqueryProduct() //list 数据
this.getShopUserInfo() //list 数据
this.handlemessage() //监听websocket返回
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index 6ae3f26..8ef77ee 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -17,22 +17,22 @@
+ :class="{'containertopboxitemleft_vip': item.type == 2,'containertopboxitemlefts': status != 1,}" >
+ :class="status == 1?'':'containertopboxitemleft_ones'">
{{item.num || 0}}
张
¥
- {{item.couponsAmount || 0}}
+ {{item.discountAmount || 0}}
{{ item.type == 2 ? item.detail : '优惠券(元)'}}
@@ -42,8 +42,9 @@
-
- {{ item.shopName }}
+
+ {{ item.shopName }}
+ {{ item.name }}
无门槛使用
@@ -51,13 +52,13 @@
{{ item.type == 2 ? '会员商品券' : '通用红包券'}}
- {{item.status == 0 ? '去使用':'已使用'}}
+ :class="status == 1?'containertopboxitemright_four containertopboxitemright_btn':'containertopboxitemright_fours containertopboxitemright_btn'">
+ {{status == 1 ? '去使用':'已使用'}}
-
+
@@ -133,11 +134,10 @@
* 去使用优惠券
*/
navigatorGo ( item ) {
- if ( item.type == 2 ) {
- uni.pro.navigateTo('/pages/order_food/order_food', {
- shopId: item.shopId
- })
- }
+ uni.cache.set('shopId',item.shopId)
+ uni.pro.navigateTo('/pages/order_food/order_food', {
+ shopId: item.shopId
+ })
},
}
};
diff --git a/pagesInviteFriends/index/index.vue b/pagesInviteFriends/index/index.vue
index f6ec0bc..05b65bd 100644
--- a/pagesInviteFriends/index/index.vue
+++ b/pagesInviteFriends/index/index.vue
@@ -1,31 +1,31 @@
-
-
+
+
- 邀请1人可得,双方各得10元优惠券
- 邀请好友
+ {{InviteFriendsData.title}}
+
新用户获得
-
+
- ¥10.00
- 满¥100.00可用
+ ¥{{item.discountAmount}}
+ 满¥{{item.fullAmount}}可用
- 邀新10元优惠券×1张
- 领取后30天内有效
+ {{item.couponName}}
+ {{item.useDetail}}
- 每邀请1个用户可获得
-
+ 每邀请{{InviteFriendsData.invitedNum}}个用户可获得
+
- ¥10.00
- 满¥100.00可用
+ ¥{{item.discountAmount}}
+ 满¥{{item.fullAmount}}可用
- 邀新10元优惠券×1张
- 领取后30天内有效
+ {{item.couponName}}
+ {{item.useDetail}}
@@ -38,34 +38,37 @@
>{{item.label}}{{item.num||0}}人
-
+
- 草莓大福
- 草莓大福
+ {{item.invitedName}}
+ {{
+ isSuccess ? '邀请成功' : '未邀请成功'
+ }}
- 2023-22-33 17:33:99
+ {{item.createTime}}
-
+
- 此用户已死,勿Call
+ {{userInfo.nickName}}
[邀请你领取新人专享优惠券!]
-
+
- ¥10.00
- 满¥100.00可用
+ ¥{{item.discountAmount}}
+ 满¥{{item.fullAmount}}可用
- 邀新10元优惠券×1张
- 领取后30天内有效
+ {{item.couponName}}
+ {{item.useDetail}}
- 领券
+ 领券
+ 领券
@@ -82,39 +85,129 @@
data() {
return {
show: false,
- status: "he",
+ is_type: "",
tabList: [
{label: '已邀请', type: 1, num: 0},
{label: '无效' ,type: 2, num: 0}
],
tabAcitve: 1,
+ userInfo: uni.cache.get('userInfo'),
+ shopId: null,
+ shareId: null,
+ invitedId: null,
+ InviteFriendsData: null,
+ shareRecordData: null,
+ shareOpenData: null,
+ isSuccess: true,
+ share: {
+ title: "",
+ path: "",
+ imageUrl: ""
+ }
};
},
onLoad(options) {
-
+ console.log(options)
+ if ( options.shopId ) { this.shopId = options.shopId; }
+ if ( options.is_type ) { this.is_type = options.is_type; }
+ if ( options.shareId ) { this.shareId = options.shareId; }
+ if ( options.invitedId ) { this.invitedId = options.invitedId; }
+ this.is_type = 'he'
+ this.invitedId = "113"
+ this.shareId = "1"
+ this.shopId = "11"
+ if ( this.is_type == 'he') {
+ this.shareHeOpen()
+ }
+ this.getByShopId();
},
onShow() {
},
methods: {
+ onShareAppMessage(res) {
+ if (res.from === 'button') {// 来自页面内分享按钮
+ console.log(res.target)
+ }
+ return this.share
+ },
+ async getByShopId() {
+ let params = {
+ shopId : this.shopId
+ }
+ let res = await this.api.getByShopId(params)
+ if ( res.code == 0 ) {
+ this.InviteFriendsData = res.data;
+ this.share.title = res.data.title
+ this.share.path = `/pagesInviteFriends/index/index?shopId=${this.shopId}&is_type=he&shareId=${this.InviteFriendsData.id}&invitedId=${uni.cache.get('userInfo').id}`
+ this.share.imageUrl = res.data.shareImg
+ this.shareRecord();
+ }
+ },
+
+ /**
+ * 邀请记录
+ */
+ async shareRecord() {
+ let params = {
+ shareId : this.InviteFriendsData.id,
+ invitedId : uni.cache.get('userInfo').id,
+ shopId : this.shopId,
+ isSuccess : this.isSuccess,
+ }
+ let res = await this.api.shareRecord(params)
+ if ( res.code == 0 ) {
+ this.shareRecordData = res.data;
+ this.tabList[0].num = res.data.isSuccess;
+ this.tabList[1].num = res.data.isFail;
+ }
+ },
+
+ /**
+ * 被邀请人进入页面调用接口
+ */
+ async shareHeOpen() {
+ let params = {
+ shareId : this.shareId,
+ invitedId : this.invitedId,
+ // beInvitedId : uni.cache.get('userInfo').id,
+ beInvitedId : 119,
+ shopId : this.shopId,
+ }
+ let res = await this.api.shareHeOpen(params)
+ if ( res.code == 0 ) {
+ this.shareOpenData = res.data;
+ }
+ },
+
+ /**
+ * 领取优惠券
+ */
+ async shareReceive() {
+ let params = {
+ shareId : this.shareId,
+ invitedId : this.invitedId,
+ beInvitedId : uni.cache.get('userInfo').id,
+ shopId : this.shopId,
+ }
+ let res = await this.api.shareReceive(params)
+ if ( res.code == 0 ) {
+ uni.showToast({
+ title: "领取成功",
+ icon: "none",
+ })
+ setTimeout(()=>{
+ uni.pro.redirectTo('/pages/user/coupon', {
+ type: 1
+ })
+ },1000)
+ }
+ },
tabClick(item) {
this.tabAcitve = item.type;
},
- /**
- * 解码
- * @param {Object} url
- * @param {Object} name
- */
- getQueryString(url, name) {
- var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
- var r = url.substr(1).match(reg)
- if (r != null) {
- return r[2]
- }
- return null;
- },
-
+
}
@@ -174,10 +267,12 @@
background: #FCF9F4;
border-radius: 18rpx 18rpx 18rpx 18rpx;
border: 2rpx solid #333333;
+ margin-bottom: 32rpx;
.left{
border-right: 1rpx dashed #333;
padding-right: 34rpx;
margin-right: 46rpx;
+ flex-shrink: 0;
.num{
font-weight: 500;
font-size: 56rpx;
@@ -216,6 +311,7 @@
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding: 32rpx 24rpx 32rpx 24rpx;
+ margin-top: 32rpx;
.tab{
background: #333333;
border-radius: 12rpx 12rpx 12rpx 12rpx;
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index d8c442e..bbeae4e 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -22,7 +22,7 @@
桌台
- {{ shopTableInfo.name }}
+ {{ shopTableInfo.name || '' }}
@@ -85,7 +85,7 @@
-
+
{{ item.name }}
@@ -287,9 +287,9 @@
setPayAmount ( cartLists ) {
console.log(cartLists)
if ( this.amountVIP.isVip == 1 && cartLists.memberAmount > 0 ) {
- this.listinfo.payAmount = (cartLists.memberAmount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
+ this.listinfo.payAmount = (cartLists.memberAmount+(this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0)).toFixed(2)
} else {
- this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo.seatNum*this.storeInfo.tableFee)).toFixed(2)
+ this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0)).toFixed(2)
}
},
/**
@@ -382,6 +382,14 @@
if (this.tableCode) {params.code = this.tableCode}
if (this.shopId) {params.shopId = this.shopId}
let res = await this.api.productqueryShop(params)
+ if ( res.data.shopTableInfo && !res.data.shopTableInfo.choseCount&&this.orderAMeal) {
+ this.orderAMeal = false;
+ uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
+ tableCode: this.tableCode,
+ shopId: res.data.storeInfo.id,
+ })
+ return;
+ }
this.freeDingConfig = res.data.freeDingConfig;
this.shopTableInfo = res.data.shopTableInfo;
this.storeInfo = res.data.storeInfo;
@@ -438,22 +446,26 @@
return;
}
this.isSocket = true;
+ this.isPointsChecked = false;
this.listinfoid = msg.data.id
this.listinfo.details = msg.data.detailList;
this.setPayAmount(msg.data)
uni.$off('getMessage')
this.orderorderInfo(1)
+ this.getCalcUsablePoints()
}
break;
case 'addCart':
this.isSocket = true;
if ( this.eatModel == "dine-in" && this.tableCode ) {
+ this.isPointsChecked = false;
if (this.listinfoid) {
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.setPayAmount(msg)
}
+ this.getCalcUsablePoints()
}
break;
@@ -466,12 +478,14 @@
}, 1000)
break;
case 'addcart':
+ this.isPointsChecked = false;
if (this.listinfoid) {
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.setPayAmount(msg)
}
+ this.getCalcUsablePoints()
this.isSocket = true;
break;
}
@@ -618,7 +632,7 @@
"sendType": this.sendType,
"remark": this.remark,
}
- if ( this.calcUsablePointsData.pointsNum && this.calcUsablePointsData.pointsNum > 0) {
+ if ( this.isPointsChecked && this.calcUsablePointsData.pointsNum && this.calcUsablePointsData.pointsNum > 0) {
params.pointsNum = this.calcUsablePointsData.pointsNum;
}
let res = await this.api.creatOrder(params)
From 2caee2bd1a5f86c8fdb57a140c761ed87e03c08e Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Mon, 11 Nov 2024 17:22:28 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BB=B7=EF=BC=8C?=
=?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=EF=BC=8C=E6=89=93=E5=8C=85=E8=B4=B9?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/order_food/order_food.vue | 6 +-
pages/order_food/order_food_search.vue | 2 +-
pages/user/coupon.vue | 12 +++-
pagesInviteFriends/index/index.vue | 14 ++--
pagesOrder/components/orderInfoBefore.vue | 31 ++++++++-
pagesOrder/confirm_order/index.vue | 79 ++++++++++++++++-------
pagesOrder/orderAMeal/index.vue | 15 +++--
7 files changed, 116 insertions(+), 43 deletions(-)
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index 62f9d55..268f96c 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -43,9 +43,9 @@
{{ item.name }}
-
+
招牌
@@ -1547,7 +1547,7 @@
padding: 12rpx 28rpx;
border-radius: 8rpx;
font-size: 24upx;
- margin-left: 56rpx;
+ margin-right: 56rpx;
background: #EFEFEF;
border: 2rpx solid #EFEFEF;
position: relative;
diff --git a/pages/order_food/order_food_search.vue b/pages/order_food/order_food_search.vue
index 7a204b1..5ad8fc6 100644
--- a/pages/order_food/order_food_search.vue
+++ b/pages/order_food/order_food_search.vue
@@ -1069,7 +1069,7 @@
padding: 12rpx 28rpx;
border-radius: 8rpx;
font-size: 24upx;
- margin-left: 56rpx;
+ margin-right: 56rpx;
background: #EFEFEF;
border: 2rpx solid #EFEFEF;
position: relative;
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index 8ef77ee..6ca57b3 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -135,9 +135,15 @@
*/
navigatorGo ( item ) {
uni.cache.set('shopId',item.shopId)
- uni.pro.navigateTo('/pages/order_food/order_food', {
- shopId: item.shopId
- })
+ if ( this.type == 'confirm_order') {
+ uni.$emit('couponItem', JSON.stringify(item))
+ uni.navigateBack();
+ } else {
+ uni.pro.navigateTo('/pages/order_food/order_food', {
+ shopId: item.shopId
+ })
+ }
+
},
}
};
diff --git a/pagesInviteFriends/index/index.vue b/pagesInviteFriends/index/index.vue
index 05b65bd..9eb382c 100644
--- a/pagesInviteFriends/index/index.vue
+++ b/pagesInviteFriends/index/index.vue
@@ -110,12 +110,11 @@
console.log(options)
if ( options.shopId ) { this.shopId = options.shopId; }
if ( options.is_type ) { this.is_type = options.is_type; }
- if ( options.shareId ) { this.shareId = options.shareId; }
- if ( options.invitedId ) { this.invitedId = options.invitedId; }
- this.is_type = 'he'
- this.invitedId = "113"
- this.shareId = "1"
- this.shopId = "11"
+ if ( options.shareId && options.invitedId != uni.cache.get('userInfo').id ) { this.shareId = options.shareId; }
+ if ( options.invitedId && options.invitedId != uni.cache.get('userInfo').id ) { this.invitedId = options.invitedId; }
+ if ( options.invitedId == uni.cache.get('userInfo').id ) {
+ this.is_type == 'me'
+ }
if ( this.is_type == 'he') {
this.shareHeOpen()
}
@@ -171,8 +170,7 @@
let params = {
shareId : this.shareId,
invitedId : this.invitedId,
- // beInvitedId : uni.cache.get('userInfo').id,
- beInvitedId : 119,
+ beInvitedId : uni.cache.get('userInfo').id,
shopId : this.shopId,
}
let res = await this.api.shareHeOpen(params)
diff --git a/pagesOrder/components/orderInfoBefore.vue b/pagesOrder/components/orderInfoBefore.vue
index 92396aa..d26b100 100644
--- a/pagesOrder/components/orderInfoBefore.vue
+++ b/pagesOrder/components/orderInfoBefore.vue
@@ -91,6 +91,14 @@
{{listinfo.orderInfo.seatAmount}}
+
+ 积分抵扣
+
+
+ ¥
+ {{listinfo.orderInfo.pointsDiscountAmount.toFixed(2)}}
+
+
合计:
¥{{listinfo.payAmount}}
@@ -112,7 +120,25 @@
下单时间:
{{$u.timeFormat(listinfo.time, 'yyyy-mm-dd hh:MM:ss')}}
-
+
+ 下单门店:
+ {{listinfo.name}}
+
+
+ 订单类型:
+ 快递
+ 外卖
+ 自提
+ 堂食
+
+
+ 备注:
+ {{ listinfo.orderInfo.remark||""}}
+
+
+ 就餐人数:
+ {{ listinfo.orderInfo.seatCount}}
+
@@ -281,6 +307,7 @@
}
.shop-info {
margin-top: 32rpx;
+ margin-bottom: 32rpx;
.item:nth-child(1) {
margin-top: 0;
}
@@ -341,7 +368,7 @@
display: flex;
align-items: center;
justify-content: space-between;
- padding: 32rpx 0;
+ padding: 0 0 32rpx 0;
.label{
font-weight: bold;
font-size: 28rpx;
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index bbeae4e..5fd0236 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -46,10 +46,13 @@
{{ listinfo.name }}
-
- 桌号:
- {{ shopTableInfo.name }}
- {{ shopTableInfo.seatNum }}人
+
+
+ 桌号:
+ {{ shopTableInfo.name || '' }}
+ {{ shopTableInfo.seatNum }}人
+
+
@@ -64,10 +67,18 @@
{{item.name || item.productName || "" }}
{{ item.skuName || item.productSkuName || ""}}
- X{{ item.totalNumber || item.num}}
+ X{{ item.totalNumber || ""}}
- ¥{{ item.totalAmount || item.priceAmount || 0}}
+ ¥{{ item.memberPrice*item.totalNumber || item.salePrice*item.totalNumber || 0}}
+
+
+ 打包费
+
+
+ ¥
+ {{packFee.toFixed(2)}}
+
餐位费
@@ -83,7 +94,7 @@
{{ item.name }}
-
+ {{item.value}}
@@ -122,9 +133,9 @@
-
+
-
+
@@ -195,9 +206,9 @@
sendType: "table",
eatModel: [],
favorable: [
- { name: "优惠券", type: "coupon", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
- // { name: "团购优惠", type: "group", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
- { name: "积分抵扣", type: "points", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
+ { name: "优惠券", type: "coupon",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
+ // { name: "团购优惠", type: "group",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
+ { name: "积分抵扣", type: "points",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
],
isPointsChecked: false,
rechargeFreeChecked: false,
@@ -205,6 +216,7 @@
order: {
phone: "",
},
+ userCouponInfos: null,
shopTableInfo: null,
freeDingConfig: null,
cartLists: [],
@@ -226,10 +238,11 @@
paymentBtnText: "余额支付",
isSocket: false,
socketTicket: null,
-
+ orderAMeal: true,
shopId: null,
storeInfo: {},
tableCode: null,
+ packFee: null,
}
},
computed: {
@@ -270,6 +283,7 @@
this.getchoseEatModel();
},
onShow() {
+ let _this = this;
if (this.listinfoid) {
uni.$on('message', this.getMessage)
this.orderorderInfo()
@@ -277,11 +291,32 @@
this.handlemessage()
}
this.is_typeList.map((item)=>{
- console.log(this.storeInfo.eatModel.indexOf(item.val))
if ( this.storeInfo.eatModel.indexOf(item.val) != -1) {
item.show = true;
}
})
+ uni.$on('couponItem',function(data){
+ let couponData = JSON.parse(data)
+ console.log('监听到事件来自返回的参数:' , couponData);
+ _this.userCouponInfos = {
+ userCouponId: couponData.id,
+ discountAmount: couponData.discountAmount,
+ num: 1,
+ }
+ console.log('监听到事件来自返回的参数:' , _this.favorable);
+ if ( couponData.discountAmount < _this.listinfo.payAmount) {
+ _this.listinfo.payAmount = _this.listinfo.payAmount - _this.userCouponInfos.discountAmount
+ _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ if ( _this.isPointsChecked) {
+ _this.pointsChange()
+ _this.getCalcUsablePoints()
+ }
+
+ } else {
+
+ }
+ // TODO 下面执行刷新的方法
+ })
},
methods: {
setPayAmount ( cartLists ) {
@@ -291,6 +326,8 @@
} else {
this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0)).toFixed(2)
}
+ this.isPointsChecked = false;
+ this.getCalcUsablePoints()
},
/**
* 免单状态监听
@@ -387,14 +424,13 @@
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
tableCode: this.tableCode,
shopId: res.data.storeInfo.id,
+ type: 'confirm'
})
return;
}
this.freeDingConfig = res.data.freeDingConfig;
this.shopTableInfo = res.data.shopTableInfo;
this.storeInfo = res.data.storeInfo;
- this.setPayAmount(this.cartLists)
- this.getCalcUsablePoints()
},
/**
@@ -446,26 +482,22 @@
return;
}
this.isSocket = true;
- this.isPointsChecked = false;
this.listinfoid = msg.data.id
this.listinfo.details = msg.data.detailList;
this.setPayAmount(msg.data)
uni.$off('getMessage')
this.orderorderInfo(1)
- this.getCalcUsablePoints()
}
break;
case 'addCart':
this.isSocket = true;
if ( this.eatModel == "dine-in" && this.tableCode ) {
- this.isPointsChecked = false;
if (this.listinfoid) {
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.setPayAmount(msg)
}
- this.getCalcUsablePoints()
}
break;
@@ -478,14 +510,12 @@
}, 1000)
break;
case 'addcart':
- this.isPointsChecked = false;
if (this.listinfoid) {
this.orderorderInfo()
} else {
this.listinfo.details = msg.data;
this.setPayAmount(msg)
}
- this.getCalcUsablePoints()
this.isSocket = true;
break;
}
@@ -504,6 +534,7 @@
this.eatModel = [];
this.eatModel.push(item.val);
this.getchoseEatModel();
+
},
/**
@@ -518,6 +549,7 @@
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
this.listinfo.details = res.data.info;
+ this.packFee = res.data.packFee;
this.setPayAmount(res.data)
},
@@ -634,6 +666,9 @@
}
if ( this.isPointsChecked && this.calcUsablePointsData.pointsNum && this.calcUsablePointsData.pointsNum > 0) {
params.pointsNum = this.calcUsablePointsData.pointsNum;
+ }
+ if ( this.userCouponInfos ) {
+ params.userCouponInfos = this.userCouponInfos
}
let res = await this.api.creatOrder(params)
console.log(res)
diff --git a/pagesOrder/orderAMeal/index.vue b/pagesOrder/orderAMeal/index.vue
index f6c6a8e..3102186 100644
--- a/pagesOrder/orderAMeal/index.vue
+++ b/pagesOrder/orderAMeal/index.vue
@@ -36,11 +36,13 @@
numIndex: 0,
otherNum: '其他',
dinersNum: 1,
+ type: ""
};
},
onLoad(options) {
this.tableCode = options.tableCode;
this.shopId = options.shopId;
+ if ( options.type ) { this.type = options.type}
},
onShow() {
},
@@ -90,10 +92,15 @@
shopId: this.shopId,
}) //判断是否支付成功
if ( res.code == 0) {
- uni.pro.redirectTo('order_food/order_food', {
- // uni.pro.navigateTo('order_food/order_food', {
- tableCode: this.tableCode,
- })
+ if( this.type == 'confirm') {
+ uni.pro,navigateBack()
+ } else {
+ uni.pro.redirectTo('order_food/order_food', {
+ // uni.pro.navigateTo('order_food/order_food', {
+ tableCode: this.tableCode,
+ })
+ }
+
}
}
From 4cf6352494aaa951872df32f2315a5d58ff1ce56 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Mon, 11 Nov 2024 18:00:12 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=89=93=E5=8C=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/confirm_order/index.vue | 46 +++++++++++++++++++++++-------
1 file changed, 36 insertions(+), 10 deletions(-)
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index 5fd0236..8dc6829 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -280,7 +280,7 @@
this.is_type = 1;
}
this.getProductqueryShop();
- this.getchoseEatModel();
+ this.getchoseEatModel('index',0);
},
onShow() {
let _this = this;
@@ -321,10 +321,16 @@
methods: {
setPayAmount ( cartLists ) {
console.log(cartLists)
+ let tableFee;
+ if ( this.is_type == 0 ) {
+ tableFee = this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0
+ } else{
+ tableFee = 0
+ }
if ( this.amountVIP.isVip == 1 && cartLists.memberAmount > 0 ) {
- this.listinfo.payAmount = (cartLists.memberAmount+(this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0)).toFixed(2)
+ this.listinfo.payAmount = (cartLists.memberAmount+tableFee).toFixed(2)
} else {
- this.listinfo.payAmount = (cartLists.amount+(this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0)).toFixed(2)
+ this.listinfo.payAmount = (cartLists.amount+tableFee).toFixed(2)
}
this.isPointsChecked = false;
this.getCalcUsablePoints()
@@ -529,25 +535,45 @@
* @param {Object} val
*/
tabClick ( index, item ) {
- this.is_type = index;
- this.sendType = item.type
- this.eatModel = [];
- this.eatModel.push(item.val);
- this.getchoseEatModel();
+
+ this.getchoseEatModel('tabClick', index, item);
},
/**
* 获取堂食/外带菜品数据
*/
- async getchoseEatModel () {
+ async getchoseEatModel ( type , index, item) {
let params = {
shopId: uni.cache.get('shopId'),
- type: this.is_type,
+ type: index,
}
if ( this.eatModel == "dine-in" && this.tableCode ) { params.tableId = this.tableCode; }
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
+
+ console.log(index)
+ if ( type == 'tabClick') {
+ if ( index == 1 ) {
+ if ( this.listinfo.details.length > 0) {
+ this.is_type = index;
+ this.sendType = item.type
+ this.eatModel = [];
+ this.eatModel.push(item.val);
+ } else {
+ uni.showToast({
+ title: "没有可打包商品",
+ icon: "none",
+ })
+ return;
+ }
+ } else {
+ this.is_type = index;
+ this.sendType = item.type
+ this.eatModel = [];
+ this.eatModel.push(item.val);
+ }
+ }
this.listinfo.details = res.data.info;
this.packFee = res.data.packFee;
this.setPayAmount(res.data)
From 2808dec925e9543228984ff47b33e3de8989df90 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Tue, 12 Nov 2024 11:06:34 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/confirm_order/index.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index 8dc6829..7e7e913 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -96,7 +96,7 @@
{{item.value}}
-
+
{{ item.name }}
@@ -548,14 +548,14 @@
shopId: uni.cache.get('shopId'),
type: index,
}
- if ( this.eatModel == "dine-in" && this.tableCode ) { params.tableId = this.tableCode; }
+ if ( index == 0 && this.tableCode ) { params.tableId = this.tableCode; }
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
console.log(index)
if ( type == 'tabClick') {
if ( index == 1 ) {
- if ( this.listinfo.details.length > 0) {
+ if ( res.data.info.length > 0) {
this.is_type = index;
this.sendType = item.type
this.eatModel = [];
From c679b60cb7cc632576ddfa870a1ed71c346677d5 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Mon, 18 Nov 2024 14:18:10 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/js/api.js | 3 +
framework/0-conf.js | 2 +
pages/member/components/registermember.vue | 71 ++++-
pages/member/index.vue | 25 +-
pages/member/memberdetails.vue | 6 +-
pages/member/setPassword.vue | 2 +-
pages/order_food/components/shoppingCart.vue | 8 -
.../components/shoppingCartBilling.vue | 6 -
pages/order_food/order_food.vue | 1 -
pages/user/coupon.vue | 107 ++++++-
pages/user/my_info.vue | 65 ++++-
pagesInviteFriends/index/index.vue | 18 +-
pagesOrder/components/orderInfoAfter.vue | 269 +++++++++++++++++-
pagesOrder/components/orderInfoBefore.vue | 58 +++-
pagesOrder/confirm_order/index.vue | 214 +++++++++++---
pagesOrder/order_detail/index.vue | 6 +
pagesPoints/index/index.vue | 8 +-
17 files changed, 760 insertions(+), 109 deletions(-)
diff --git a/common/js/api.js b/common/js/api.js
index 0be8890..5656a91 100644
--- a/common/js/api.js
+++ b/common/js/api.js
@@ -85,6 +85,9 @@ export default {
creatOrder(data) { //创建订单
return uni.api.post("/order/creatOrder", data);
},
+ useCoupon(data) { //订单选择优惠券
+ return uni.api.post("/order/useCoupon", data);
+ },
// 团购订单列表
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 3b14b89..2cc2c99 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -8,6 +8,8 @@ const proxyApi = "/api"
// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
+// const proxyApi = 'https://pre-cashier.sxczgkj.cn/cashierService' // 预发布
+// const proxyApiwws = 'wss://pre-cashier.sxczgkj.cn/netty' // 预发布
// const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
// const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
// #endif
diff --git a/pages/member/components/registermember.vue b/pages/member/components/registermember.vue
index c81d248..d06f79a 100644
--- a/pages/member/components/registermember.vue
+++ b/pages/member/components/registermember.vue
@@ -8,13 +8,16 @@
-
@@ -41,7 +44,7 @@
手机号
-
+
@@ -49,7 +52,7 @@
- {{'获取微信手机号'}}
+ {{'获取手机号'}}
@@ -154,11 +157,10 @@
* 上传头像
* @param {Object} e
*/
- uploadImg(e) {
- const {
- avatarUrl
- } = e.detail
- // this.userHeadImg = avatarUrl
+ onChooseAvatar(e) {
+ let _this = this;
+ //#ifdef MP-WEIXIN
+ let avatarUrl = e.detail.avatarUrl
uni.uploadFile({
url: uni.conf.baseUrl + '/common/upload',
// url: uni.conf.baseUrl + '/common/upload',
@@ -167,7 +169,9 @@
environment: 'app',
type: 'android',
version: '1.7.3',
+ 'content-type': 'multipart/form-data'
},
+ fileType:'image',
name: "file",
formData: {
file: avatarUrl,
@@ -180,6 +184,49 @@
console.log(res)
}
});
+ // #endif
+ //#ifdef MP-ALIPAY
+ uni.chooseImage({
+ count: 1, // 默认9,设置图片的数量
+ sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+ success: function (res) {
+ // 成功选择图片后
+ let avatarUrl = res.tempFilePaths[0]; // 获取文件路径
+
+ my.uploadFile({
+ url: uni.conf.baseUrl + '/common/upload',
+ // url: uni.conf.baseUrl + '/common/upload',
+ filePath: avatarUrl,
+ header: {
+ environment: 'app',
+ type: 'android',
+ version: '1.7.3',
+ 'content-type': 'multipart/form-data'
+ },
+ fileType:'image',
+ name: "file",
+ formData: {
+ file: avatarUrl,
+ },
+ success: (uploadFileRes) => {
+ let { data } = JSON.parse(uploadFileRes.data)
+ _this.userHeadImg = data
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ });
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ });
+
+ // #endif
+
+
+
},
/**
diff --git a/pages/member/index.vue b/pages/member/index.vue
index a7ca791..6e82399 100644
--- a/pages/member/index.vue
+++ b/pages/member/index.vue
@@ -372,8 +372,8 @@
title: '加载中',
mask: true
})
- // #ifdef MP-WEIXIN
uni.requestPayment({
+ // #ifdef MP-WEIXIN
provider: 'wxpay', //支付类型-固定值
partnerid: res.data.appId, // 微信支付商户号
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
@@ -381,12 +381,18 @@
package: res.data.package, // 固定值
signType: res.data.signType, //固定值
paySign: res.data.paySign, //签名
+ // #endif
+ // #ifdef MP-ALIPAY
+ provider: 'alipay', //支付类型-固定值
+ orderInfo: res.data.tradeNo, // 微信支付商户号
+ // #endif
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.hideLoading()
let pages = getCurrentPages()
+ // #ifdef MP-WEIXIN
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
@@ -406,6 +412,22 @@
},
})
+ // #endif
+ // #ifdef MP-ALIPAY
+ if ( _this.type && _this.type == "topUpActivity") {
+ uni.pro.navigateBack()
+ } else {
+ if ( pages.length > 1) {
+ _this.shopInfo()
+ } else {
+ setTimeout(res => {
+ uni.switchTab({
+ url: '/pages/index/index'
+ })
+ }, 500)
+ }
+ }
+ // #endif
@@ -415,7 +437,6 @@
}
});
uni.hideLoading()
- // #endif
}
},
diff --git a/pages/member/memberdetails.vue b/pages/member/memberdetails.vue
index 9a52242..2ba6cb0 100644
--- a/pages/member/memberdetails.vue
+++ b/pages/member/memberdetails.vue
@@ -28,10 +28,10 @@
{{shopUserInfo.amount || '0.00'}}储值
- 0积分
+ {{shopUserInfo.accountPoints || '0'}}积分
- 0优惠券
+ {{shopUserInfo.couponNum || '0'}}优惠券
0权益卡
@@ -49,7 +49,7 @@
感谢你 2 天陪伴
您今天的幸运词:林波微步
-
+
diff --git a/pages/member/setPassword.vue b/pages/member/setPassword.vue
index 452e0c6..319a489 100644
--- a/pages/member/setPassword.vue
+++ b/pages/member/setPassword.vue
@@ -5,7 +5,7 @@
当前账号
- 获取微信手机号
+ 获取手机号
diff --git a/pages/order_food/components/shoppingCart.vue b/pages/order_food/components/shoppingCart.vue
index 082e2c9..6ba4f7f 100644
--- a/pages/order_food/components/shoppingCart.vue
+++ b/pages/order_food/components/shoppingCart.vue
@@ -96,22 +96,16 @@
tableCode:{
immediate: true,
handler (newVal) {
- console.log(newVal)
- console.log("tableCode1==",this.tableCode)
}
},
shopId:{
immediate: true,
handler (newVal) {
- console.log(newVal)
- console.log("shopId1==",this.shopId)
}
},
},
mounted() {
- console.log("tableCode3==",this.tableCode)
- console.log("shopId3==",this.shopId)
},
methods: {
@@ -128,8 +122,6 @@
* @param {Object} a
*/
async cartListadd(item, index, c) {
- console.log(this.shopId)
- console.log(this.tableCode)
try {
if ( c == "+" && item.isVip == 1){
return;
diff --git a/pages/order_food/components/shoppingCartBilling.vue b/pages/order_food/components/shoppingCartBilling.vue
index a4e10bb..fe97dba 100644
--- a/pages/order_food/components/shoppingCartBilling.vue
+++ b/pages/order_food/components/shoppingCartBilling.vue
@@ -55,17 +55,11 @@
},
mounted() {
- console.log("tableCode==",this.tableCode)
- console.log("shopId==",this.shopId)
},
watch:{
tableCode(newVal, oldValue) {
- console.log(newVal)
- console.log("tableCode2==",this.tableCode)
},
shopId(newVal, oldValue) {
- console.log(newVal)
- console.log("shopId2==",this.tableCode)
},
},
methods: {
diff --git a/pages/order_food/order_food.vue b/pages/order_food/order_food.vue
index 268f96c..fd80e6f 100644
--- a/pages/order_food/order_food.vue
+++ b/pages/order_food/order_food.vue
@@ -991,7 +991,6 @@
})
this.salePrice = res.data.salePrice // 价格
let data = null;
- console.log(a)
if (a == 1) { //1添加购物车 2是websocket返回这个商品的价格(应为不同的多规格商品返回不同的价格)
let params = {
"skuId": res.data.id,
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index 6ca57b3..25a733e 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -35,7 +35,7 @@
'containertopboxitemleft_tows': status != 1,
'containertopboxitemleft_nameVip': item.type == 2,
}">
- {{ item.type == 2 ? item.detail : '优惠券(元)'}}
+ {{ item.type == 2 ? item.name : '优惠券(元)'}}
@@ -84,19 +84,27 @@
{
name: '已使用',
type: '2'
+ },
+ {
+ name: '已过期',
+ type: '-1'
}
],
tabIndex: 1,
list: [],
status: 1,
type: "",
+ payAmount: 0,
+ shoppingCart: [],
+ productList: [],
};
},
onLoad(options) {
- if (options.type) {
- this.type = options.type;
- }
+ if (options.type) { this.type = options.type }
+ if (options.payAmount) { this.payAmount = options.payAmount }
+ if (options.shoppingCart) { this.shoppingCart = JSON.parse(decodeURIComponent(options.shoppingCart)) }
+ if (options.productList) { this.productList = JSON.parse(decodeURIComponent(options.productList)) }
this.getCouponList()
},
@@ -117,13 +125,26 @@
*/
async getCouponList() {
try {
- let res = await this.api.conponList({
+ let params = {
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status
- })
+ }
+ if ( this.type == 'confirm_order_coupon' || this.type == 'confirm_order_product' ) {
+ params.orderId = -1;
+ }
+ let res = await this.api.conponList(params)
if (res.code == 0) {
- this.list = res.data;
+ console.log(res)
+ let list = [];
+ if ( this.type == 'confirm_order_coupon') {
+ list = res.data.filter(v => v.type == 1);
+ }else if ( this.type == 'confirm_order_product') {
+ list = res.data.filter(v => v.type == 2);
+ } else {
+ list = res.data;
+ }
+ this.list = list;
}
} catch (e) {
//TODO handle the exception
@@ -135,9 +156,73 @@
*/
navigatorGo ( item ) {
uni.cache.set('shopId',item.shopId)
- if ( this.type == 'confirm_order') {
- uni.$emit('couponItem', JSON.stringify(item))
- uni.navigateBack();
+ if ( this.type == 'confirm_order_coupon' || this.type == 'confirm_order_product') {
+ if ( item.type == 1 ) {
+ if( this.payAmount < item.fullAmount) {
+ uni.showToast({
+ title: "当前订单金额不足使用金额",
+ icon: "none",
+ })
+ return;
+ }
+ uni.$emit('couponItem', JSON.stringify(item))
+ uni.navigateBack();
+ } else {
+ let productNum = 0;//商品购物车数量
+ let productTicketNum = 0;//商品券使用数量
+ let product = this.shoppingCart.filter(v => v.productId == item.proId);
+ let productTicket = this.productList.filter(v => v.productId == item.proId);
+ if ( product.length <= 0 ) {
+ uni.showToast({
+ title: "购物车没有"+item.name,
+ icon: "none",
+ })
+ return;
+ }
+ if (this.productList.filter(v => v.userCouponId == item.id).length > 0) {
+ uni.showToast({
+ title: `当前优惠券已选择`,
+ icon: "none",
+ })
+ return;
+ }
+ // 计算当前商品购物车数量
+ product.forEach(item => {
+ productNum += item.number;
+ })
+ // 计算当前商品券使用数量
+ productTicket.forEach(item => {
+ productTicketNum += item.num;
+ })
+ if ( (productNum - productTicketNum) == 0 ) {
+ uni.showToast({
+ title: `当前商品已经全部抵扣`,
+ icon: "none",
+ })
+ return;
+ }
+
+
+
+ // let productNum = 0;
+ // product.map(item => {
+ // productNum += item.number
+ // })
+ // if ( productNum < item.num) {
+ // uni.showToast({
+ // title: `购物车${item.name}数量不足`,
+ // icon: "none",
+ // })
+ // return;
+ // }
+ // if (product[0].number item.num) {
+
+ // }
+ uni.$emit('couponItem', JSON.stringify(item))
+ uni.navigateBack();
+ }
+
+
} else {
uni.pro.navigateTo('/pages/order_food/order_food', {
shopId: item.shopId
@@ -163,7 +248,7 @@
margin-top: 32rpx;
.towcontentlistxitembox {
- width: 50%;
+ width: 33.33%;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
diff --git a/pages/user/my_info.vue b/pages/user/my_info.vue
index 63ee92f..112123e 100644
--- a/pages/user/my_info.vue
+++ b/pages/user/my_info.vue
@@ -8,12 +8,15 @@
-
-
-
-
+
+
+
+
+
+
+
@@ -257,8 +260,9 @@
* @param {Object} e
*/
onChooseAvatar(e) {
- const { avatarUrl } = e.detail
- // this.userHeadImg = avatarUrl
+ let _this = this;
+ //#ifdef MP-WEIXIN
+ let avatarUrl = e.detail.avatarUrl
uni.uploadFile({
url: uni.conf.baseUrl + '/common/upload',
// url: uni.conf.baseUrl + '/common/upload',
@@ -267,22 +271,63 @@
environment: 'app',
type: 'android',
version: '1.7.3',
+ 'content-type': 'multipart/form-data'
},
+ fileType:'image',
name: "file",
formData: {
file: avatarUrl,
},
success: (uploadFileRes) => {
- console.log(uploadFileRes)
- let {
- data
- } = JSON.parse(uploadFileRes.data)
+ let { data } = JSON.parse(uploadFileRes.data)
this.userHeadImg = data
},
fail: (res) => {
console.log(res)
}
});
+ // #endif
+ //#ifdef MP-ALIPAY
+ uni.chooseImage({
+ count: 1, // 默认9,设置图片的数量
+ sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+ success: function (res) {
+ // 成功选择图片后
+ let avatarUrl = res.tempFilePaths[0]; // 获取文件路径
+
+ my.uploadFile({
+ url: uni.conf.baseUrl + '/common/upload',
+ // url: uni.conf.baseUrl + '/common/upload',
+ filePath: avatarUrl,
+ header: {
+ environment: 'app',
+ type: 'android',
+ version: '1.7.3',
+ 'content-type': 'multipart/form-data'
+ },
+ fileType:'image',
+ name: "file",
+ formData: {
+ file: avatarUrl,
+ },
+ success: (uploadFileRes) => {
+ let { data } = JSON.parse(uploadFileRes.data)
+ _this.userHeadImg = data
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ });
+ },
+ fail: (res) => {
+ console.log(res)
+ }
+ });
+
+ // #endif
+
+
},
/**
diff --git a/pagesInviteFriends/index/index.vue b/pagesInviteFriends/index/index.vue
index 9eb382c..75056eb 100644
--- a/pagesInviteFriends/index/index.vue
+++ b/pagesInviteFriends/index/index.vue
@@ -17,7 +17,7 @@
{{item.useDetail}}
- 每邀请{{InviteFriendsData.invitedNum}}个用户可获得
+ 每邀请{{InviteFriendsData.invitedNum||''}}个用户可获得
¥{{item.discountAmount}}
@@ -38,7 +38,7 @@
>{{item.label}}{{item.num||0}}人
-
+
{{item.invitedName}}
{{
@@ -46,7 +46,7 @@
}}
{{item.createTime}}
-
+
@@ -68,7 +68,8 @@
领券
- 领券
+ 已领完
+ 非新用户不可领取
@@ -142,6 +143,14 @@
this.share.path = `/pagesInviteFriends/index/index?shopId=${this.shopId}&is_type=he&shareId=${this.InviteFriendsData.id}&invitedId=${uni.cache.get('userInfo').id}`
this.share.imageUrl = res.data.shareImg
this.shareRecord();
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: "none",
+ })
+ setTimeout(()=>{
+ uni.navigateBack();
+ },2000)
}
},
@@ -190,6 +199,7 @@
shopId : this.shopId,
}
let res = await this.api.shareReceive(params)
+ console.log(res)
if ( res.code == 0 ) {
uni.showToast({
title: "领取成功",
diff --git a/pagesOrder/components/orderInfoAfter.vue b/pagesOrder/components/orderInfoAfter.vue
index bae1e76..f9ca335 100644
--- a/pagesOrder/components/orderInfoAfter.vue
+++ b/pagesOrder/components/orderInfoAfter.vue
@@ -33,6 +33,7 @@
+
未付款
小计¥
@@ -52,6 +53,40 @@
{{listinfo.orderInfo.seatAmount}}
+
+
+
+
+ {{ item.name }}
+
+
+ {{item.value}}
+
+
+
+
+ {{items.name}}
+ X{{items.num}}
+ -¥{{items.discountAmount || 0}}
+
+
+
+
+
+ 使用 {{ calcUsablePointsData.pointsNum}} 积分抵扣¥{{calcUsablePointsData.pointsNum/calcUsablePointsData.equivalentPoints}}
+
+
+ {{calcUsablePointsData.unusableReason}}
+
+
+
+
+
+
+
+
+
+
总计¥
{{listinfo.payAmount}}
@@ -81,11 +116,11 @@
备注:
- {{ listinfo.orderInfo.remark||""}}
+ {{ listinfo.orderInfo.remark || ""}}
就餐人数:
- {{ listinfo.orderInfo.seatCount}}
+ {{ listinfo.orderInfo.seatCount || ""}}
@@ -97,19 +132,184 @@
data() {
return {
-
-
+ favorable: [
+ { name: "优惠券", type: "coupon",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
+ { name: "商品券", type: "product",value: [], url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
+ // { name: "团购优惠", type: "group",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
+ { name: "积分抵扣", type: "points",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
+ ],
+ calcUsablePointsData: null,
+ isPointsChecked: false,
+ freeCheck: false,
+ freeDisabled: false,
+ userCouponInfos: [],
}
},
props:{
listinfo:{
type: Object
- }
+ },
},
mounted() {
+ console.log(this.listinfo.shopId)
+ this.getCalcUsablePoints()
},
methods: {
+ /**
+ * 监听优惠券/商品券选择
+ * @param {Object} data
+ */
+ changeCoupon ( data ) {
+ let _this = this;
+ // uni.$off('couponItem')
+ let couponData = JSON.parse(data)
+ console.log('监听到事件来自返回的参数:' , couponData);
+ if ( couponData.type == 1 ) { //满减优惠券
+ let couponList = _this.userCouponInfos.filter(v => v.type == 1);
+ //不包含优惠券的金额
+ let currentPayAmount = (couponList.length > 0 ? _this.listinfo.payAmount + couponList[0].discountAmount : _this.listinfo.payAmount)
+ // 判断优惠金额不能大于支付金额
+ if ( couponData.discountAmount < currentPayAmount) {
+ _this.listinfo.payAmount = ( currentPayAmount - couponData.discountAmount).toFixed(2)
+ _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ if ( couponList.length > 0) {
+ _this.userCouponInfos.map(item => {
+ if ( item.type == 1 ) {
+ item.userCouponId = couponData.id
+ item.type = couponData.type
+ item.discountAmount = couponData.discountAmount
+ item.num = couponData.type == 1 ? 1 : couponData.num
+ }
+ })
+ } else {
+ _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ _this.userCouponInfos.push({
+ userCouponId: couponData.id,
+ type: couponData.type,
+ discountAmount: couponData.discountAmount,
+ num: couponData.type == 1 ? 1 : couponData.num,
+ })
+ }
+ if ( _this.isPointsChecked) {
+ _this.pointsChange()
+ _this.getCalcUsablePoints()
+ }
+
+ } else {
+ uni.showToast({
+ title: "优惠券满减金额大于订单金额不可使用",
+ icon: "none",
+ })
+ }
+ } else { //商品券
+ // this.listinfo.details
+ // 筛选选中商品券商品列表
+ let couponList = _this.listinfo.details.filter(v => v.productId == couponData.proId);
+ //金额从小到大排序
+ let minCouponList = couponList.sort((a, b) => (a.memberPrice > 0 ? a.memberPrice : a.salePrice) - (b.memberPrice > 0 ? b.memberPrice : b.salePrice))
+ let productTicketList = _this.userCouponInfos.filter(v => v.productId == couponData.proId);
+ //商品券抵扣的数量
+ let productNum = couponData.num;
+ let productPayAmount = 0;
+ let productTicketNum = 0;
+ let productNumber = 0;
+ productTicketList.map((item,index) => {
+ productTicketNum += item.num
+ })
+ console.log(productTicketNum)
+ minCouponList.map((item,index) => {
+ productNumber += item.number
+ if ( productNum > 0 && productNumber > productTicketNum) {
+ let num = productNum >= item.number ? item.number : productNum
+ productNum = (productNum - item.number) >= 0 ? (productNum - item.number) : 0;
+ console.log(num)
+ console.log(item.salePrice)
+ productPayAmount = productPayAmount + (num*(item.memberPrice > 0 ? item.memberPrice : item.salePrice))
+ }
+ })
+ console.log(minCouponList)
+ _this.userCouponInfos.push({
+ userCouponId: couponData.id,
+ type: couponData.type,
+ productId: couponData.proId,
+ discountAmount: productPayAmount,
+ num: productNum == 0 ? couponData.num : (couponData.num - productNum),
+ })
+ _this.favorable[1].value.push({
+ userCouponId: couponData.id,
+ name: couponData.name,
+ type: couponData.type,
+ productId: couponData.proId,
+ discountAmount: productPayAmount,
+ num: productNum == 0 ? couponData.num : (couponData.num - productNum),
+ })
+
+ if ( _this.isPointsChecked) {
+ _this.pointsChange()
+ _this.getCalcUsablePoints()
+ }
+ }
+ uni.$off('couponItem')
+ },
+ /**
+ * 积分状态监听
+ */
+ pointsChange (){
+ if ( this.freeCheck || !this.calcUsablePointsData.usable) {
+ return;
+ }
+ this.isPointsChecked = !this.isPointsChecked
+ if ( this.isPointsChecked ) {
+ this.freeDisabled = true
+
+ this.listinfo.payAmount = (this.listinfo.payAmount-(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
+ } else {
+ this.freeDisabled = false
+ this.listinfo.payAmount = (Number(this.listinfo.payAmount)+(this.calcUsablePointsData.pointsNum/this.calcUsablePointsData.equivalentPoints)).toFixed(2);
+ }
+ },
+ goUrl(item){
+ switch (item.type){
+ case 'coupon':
+ let payAmount = this.listinfo.payAmount;
+ let couponList = this.userCouponInfos.filter(v => v.type == 1);
+ if ( couponList.length > 0 ) {
+ payAmount = payAmount + couponList.discountAmount;
+ }
+ uni.pro.navigateTo('/pages/user/coupon', {
+ type: "confirm_order_coupon",
+ payAmount: payAmount,
+ shoppingCart: JSON.stringify(this.listinfo.details)
+ })
+ break;
+ case 'product':
+ let productList = this.userCouponInfos.filter(v => v.type == 2);
+ uni.pro.navigateTo('/pages/user/coupon', {
+ type: "confirm_order_product",
+ payAmount: this.listinfo.payAmount,
+ shoppingCart: JSON.stringify(this.listinfo.details),
+ productList: JSON.stringify(productList)
+ })
+ break;
+
+
+ }
+ },
+ /**
+ * 获取积分相关信息
+ */
+ async getCalcUsablePoints() {
+ let params = {
+ memberId: this.listinfo.orderInfo.memberId,
+ orderAmount: this.listinfo.payAmount,
+ }
+ let res = await this.api.calcUsablePoints(params)
+ this.calcUsablePointsData = res.data;
+ if ( this.calcUsablePointsData.usable && this.listinfo.payAmount >= this.calcUsablePointsData.minPaymentAmount) {
+ this.calcUsablePointsData.pointsNum = this.calcUsablePointsData.accountPoints >= this.calcUsablePointsData.maxUsablePoints ? this.calcUsablePointsData.maxUsablePoints : this.calcUsablePointsData.accountPoints
+ }
+ },
/**
* 复制订单号
* @param {Object} e
@@ -339,6 +539,65 @@
}
}
}
+
+ .favorable{
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ // padding: 0 30rpx;
+ box-sizing: border-box;
+ padding-bottom: 26rpx;
+ padding-top: 26rpx;
+ border-bottom: 2rpx solid #E5E5E5;
+ .favorable_left{
+ display: flex;
+ align-items: center;
+ .icon{
+ width: 40rpx;
+ height: 40rpx;
+ margin-right: 16rpx;
+ }
+ .name{
+ font-size: 28rpx;
+ font-weight: 400rpx;
+ color: #333;
+ }
+ }
+ .favorable_right{
+ display: flex;
+ align-items: center;
+ .favorable_right_text{
+ font-size: 24rpx;
+ color: #999;
+ font-weight: 400rpx;
+ }
+
+ }
+ .favorable_right.column{
+ display: flex;
+ flex-direction: column;
+ .favorable_right_text{
+ margin-bottom: 10rpx;
+ text:nth-child(1){
+ font-size: 26rpx;
+ color: #999;
+ }
+ text:nth-child(2){
+ font-size: 26rpx;
+ color: #999;
+ margin: 0 30rpx;
+ }
+ text:nth-child(3){
+ font-size: 26rpx;
+ color: #333;
+
+ }
+ }
+ }
+ }
+ .favorable.column{
+ align-items: flex-start;
+ }
.total-wrap {
width: 100%;
diff --git a/pagesOrder/components/orderInfoBefore.vue b/pagesOrder/components/orderInfoBefore.vue
index d26b100..20e4b21 100644
--- a/pagesOrder/components/orderInfoBefore.vue
+++ b/pagesOrder/components/orderInfoBefore.vue
@@ -91,7 +91,27 @@
{{listinfo.orderInfo.seatAmount}}
-
+
+
+ 优惠券
+
+
+ -¥
+ {{item.discountAmount}}
+
+
+
+
+ 商品券
+
+
+ {{item.name}}
+ X{{item.finalUseNum}}
+ -¥{{item.finalDiscountAmount}}
+
+
+
+
积分抵扣
@@ -137,7 +157,7 @@
就餐人数:
- {{ listinfo.orderInfo.seatCount}}
+ {{ listinfo.orderInfo.seatCount || ""}}
@@ -380,13 +400,13 @@
align-items: flex-end;
padding-bottom: 32rpx;
border-bottom: 2rpx dashed #e5e5e5;
- view:nth-child(1){
+ >view:nth-child(1){
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-right: 42rpx;
}
- view:nth-child(2){
+ >view:nth-child(2){
display: flex;
align-items: flex-end;
font-weight: bold;
@@ -394,6 +414,36 @@
color: #333333;
}
}
+ .val.column{
+ display: flex;
+ flex-direction: column;
+ .productCoupon{
+ display: flex;
+ align-items: flex-end;
+ margin: 0 0 10rpx 0;
+ .name{
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999;
+ margin: 0;
+ }
+ .num{
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #999;
+ margin: 0 30rpx;
+ line-height: 20rpx;
+ }
+ .amount{
+ font-weight: bold;
+ font-size: 26rpx;
+ color: #333;
+ }
+ }
+ }
+ }
+ .cell-item.column{
+ align-items: flex-start;
}
.total-wrap {
width: 100%;
diff --git a/pagesOrder/confirm_order/index.vue b/pagesOrder/confirm_order/index.vue
index 7e7e913..873831d 100644
--- a/pagesOrder/confirm_order/index.vue
+++ b/pagesOrder/confirm_order/index.vue
@@ -80,7 +80,7 @@
{{packFee.toFixed(2)}}
-
+
餐位费
X{{shopTableInfo.seatNum}}
@@ -88,20 +88,25 @@
{{(shopTableInfo.seatNum*storeInfo.tableFee).toFixed(2)}}
-
-
+
+
-
+
{{ item.name }}
- {{item.value}}
-
-
-
-
- {{ item.name }}
+
+ {{item.value}}
+
-
+
+
+ {{items.name}}
+ X{{items.num}}
+ -¥{{items.discountAmount || 0}}
+
+
+
+
使用 {{ calcUsablePointsData.pointsNum}} 积分抵扣¥{{calcUsablePointsData.pointsNum/calcUsablePointsData.equivalentPoints}}
@@ -115,6 +120,7 @@
+
@@ -207,6 +213,7 @@
eatModel: [],
favorable: [
{ name: "优惠券", type: "coupon",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
+ { name: "商品券", type: "product",value: [], url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/coupon.png"},
// { name: "团购优惠", type: "group",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/groupOffer.png"},
{ name: "积分抵扣", type: "points",value: "", url: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/confirmOrder/points.png" }
],
@@ -216,7 +223,7 @@
order: {
phone: "",
},
- userCouponInfos: null,
+ userCouponInfos: [],
shopTableInfo: null,
freeDingConfig: null,
cartLists: [],
@@ -294,33 +301,107 @@
if ( this.storeInfo.eatModel.indexOf(item.val) != -1) {
item.show = true;
}
- })
- uni.$on('couponItem',function(data){
+ })
+ uni.$on('couponItem',this.changeCoupon)
+ },
+ methods: {
+ /**
+ * 监听优惠券/商品券选择
+ * @param {Object} data
+ */
+ changeCoupon ( data ) {
+ let _this = this;
+ // uni.$off('couponItem')
let couponData = JSON.parse(data)
console.log('监听到事件来自返回的参数:' , couponData);
- _this.userCouponInfos = {
- userCouponId: couponData.id,
- discountAmount: couponData.discountAmount,
- num: 1,
- }
- console.log('监听到事件来自返回的参数:' , _this.favorable);
- if ( couponData.discountAmount < _this.listinfo.payAmount) {
- _this.listinfo.payAmount = _this.listinfo.payAmount - _this.userCouponInfos.discountAmount
- _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ if ( couponData.type == 1 ) { //满减优惠券
+ let couponList = _this.userCouponInfos.filter(v => v.type == 1);
+ //不包含优惠券的金额
+ let currentPayAmount = (couponList.length > 0 ? _this.listinfo.payAmount + couponList[0].discountAmount : _this.listinfo.payAmount)
+ // 判断优惠金额不能大于支付金额
+ if ( couponData.discountAmount < currentPayAmount) {
+ _this.listinfo.payAmount = ( currentPayAmount - couponData.discountAmount).toFixed(2)
+ _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ if ( couponList.length > 0) {
+ _this.userCouponInfos.map(item => {
+ if ( item.type == 1 ) {
+ item.userCouponId = couponData.id
+ item.type = couponData.type
+ item.discountAmount = couponData.discountAmount
+ item.num = couponData.type == 1 ? 1 : couponData.num
+ }
+ })
+ } else {
+ _this.favorable[0].value = ('-¥'+couponData.discountAmount)
+ _this.userCouponInfos.push({
+ userCouponId: couponData.id,
+ type: couponData.type,
+ discountAmount: couponData.discountAmount,
+ num: couponData.type == 1 ? 1 : couponData.num,
+ })
+ }
+ if ( _this.isPointsChecked) {
+ _this.pointsChange()
+ _this.getCalcUsablePoints()
+ }
+
+ } else {
+ uni.showToast({
+ title: "优惠券满减金额大于订单金额不可使用",
+ icon: "none",
+ })
+ }
+ } else { //商品券
+ // this.listinfo.details
+ // 筛选选中商品券商品列表
+ let couponList = _this.listinfo.details.filter(v => v.productId == couponData.proId);
+ //金额从小到大排序
+ let minCouponList = couponList.sort((a, b) => (a.memberPrice > 0 ? a.memberPrice : a.salePrice) - (b.memberPrice > 0 ? b.memberPrice : b.salePrice))
+ let productTicketList = _this.userCouponInfos.filter(v => v.productId == couponData.proId);
+ //商品券抵扣的数量
+ let productNum = couponData.num;
+ let productPayAmount = 0;
+ let productTicketNum = 0;
+ let productNumber = 0;
+ productTicketList.map((item,index) => {
+ productTicketNum += item.num
+ })
+ console.log(productTicketNum)
+ minCouponList.map((item,index) => {
+ productNumber += item.number
+ if ( productNum > 0 && productNumber > productTicketNum) {
+ let num = productNum >= item.number ? item.number : productNum
+ productNum = (productNum - item.number) >= 0 ? (productNum - item.number) : 0;
+ console.log(num)
+ console.log(item.salePrice)
+ productPayAmount = productPayAmount + (num*(item.memberPrice > 0 ? item.memberPrice : item.salePrice))
+ }
+ })
+ console.log(minCouponList)
+ _this.userCouponInfos.push({
+ userCouponId: couponData.id,
+ type: couponData.type,
+ productId: couponData.proId,
+ discountAmount: productPayAmount,
+ num: productNum == 0 ? couponData.num : (couponData.num - productNum),
+ })
+ _this.favorable[1].value.push({
+ userCouponId: couponData.id,
+ name: couponData.name,
+ type: couponData.type,
+ productId: couponData.proId,
+ discountAmount: productPayAmount,
+ num: productNum == 0 ? couponData.num : (couponData.num - productNum),
+ })
+
if ( _this.isPointsChecked) {
_this.pointsChange()
_this.getCalcUsablePoints()
}
-
- } else {
-
}
- // TODO 下面执行刷新的方法
- })
- },
- methods: {
+ uni.$off('couponItem')
+ },
setPayAmount ( cartLists ) {
- console.log(cartLists)
let tableFee;
if ( this.is_type == 0 ) {
tableFee = this.shopTableInfo?(this.shopTableInfo.seatNum*this.storeInfo.tableFee):0
@@ -332,6 +413,22 @@
} else {
this.listinfo.payAmount = (cartLists.amount+tableFee).toFixed(2)
}
+ if ( this.userCouponInfos.length > 0 ) {
+ console.log(this.userCouponInfos)
+ this.userCouponInfos.forEach(item => {
+ if ( item.type == 1 ) {
+ if ( item.discountAmount && item.discountAmount > 0 ) {
+ this.listinfo.payAmount = (this.listinfo.payAmount - item.discountAmount).toFixed(2)
+ }
+ } else {
+ if ( item.discountAmount && item.discountAmount > 0 ) {
+ this.listinfo.payAmount = (this.listinfo.payAmount - item.discountAmount).toFixed(2)
+ }
+ }
+ })
+ }
+
+
this.isPointsChecked = false;
this.getCalcUsablePoints()
},
@@ -369,10 +466,27 @@
goUrl(item){
switch (item.type){
case 'coupon':
+ let payAmount = this.listinfo.payAmount;
+ let couponList = this.userCouponInfos.filter(v => v.type == 1);
+ if ( couponList.length > 0 ) {
+ payAmount = payAmount + couponList.discountAmount;
+ }
uni.pro.navigateTo('/pages/user/coupon', {
- type: "confirm_order"
+ type: "confirm_order_coupon",
+ payAmount: payAmount,
+ shoppingCart: JSON.stringify(this.listinfo.details)
})
break;
+ case 'product':
+ let productList = this.userCouponInfos.filter(v => v.type == 2);
+ uni.pro.navigateTo('/pages/user/coupon', {
+ type: "confirm_order_product",
+ payAmount: this.listinfo.payAmount,
+ shoppingCart: JSON.stringify(this.listinfo.details),
+ productList: JSON.stringify(productList)
+ })
+ break;
+
}
},
@@ -390,7 +504,6 @@
if ( this.calcUsablePointsData.usable && this.listinfo.payAmount >= this.calcUsablePointsData.minPaymentAmount) {
this.calcUsablePointsData.pointsNum = this.calcUsablePointsData.accountPoints >= this.calcUsablePointsData.maxUsablePoints ? this.calcUsablePointsData.maxUsablePoints : this.calcUsablePointsData.accountPoints
}
- console.log(this.calcUsablePointsData)
},
/**
@@ -421,7 +534,6 @@
lat: uni.cache.get('getLocationstorage').lat ? uni.cache.get('getLocationstorage').lat :
'',
}
- console.log(this.shopId)
if (this.tableCode) {params.code = this.tableCode}
if (this.shopId) {params.shopId = this.shopId}
let res = await this.api.productqueryShop(params)
@@ -552,7 +664,6 @@
if ( this.shopTableInfo && this.shopTableInfo.seatNum ) { params.num = this.shopTableInfo.seatNum; }
let res = await this.api.choseEatModel(params)
- console.log(index)
if ( type == 'tabClick') {
if ( index == 1 ) {
if ( res.data.info.length > 0) {
@@ -697,7 +808,6 @@
params.userCouponInfos = this.userCouponInfos
}
let res = await this.api.creatOrder(params)
- console.log(res)
this.listinfoid = res.data.id;
if ( this.storeInfo.registerType == 'restaurant') {
uni.redirectTo({
@@ -1274,7 +1384,9 @@
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
- margin-bottom: 32rpx;
+ padding-bottom: 26rpx;
+ padding-top: 26rpx;
+ border-bottom: 2rpx solid #E5E5E5;
.favorable_left{
display: flex;
align-items: center;
@@ -1299,6 +1411,30 @@
}
}
+ .favorable_right.column{
+ display: flex;
+ flex-direction: column;
+ .favorable_right_text{
+ margin-bottom: 10rpx;
+ text:nth-child(1){
+ font-size: 26rpx;
+ color: #999;
+ }
+ text:nth-child(2){
+ font-size: 26rpx;
+ color: #999;
+ margin: 0 30rpx;
+ }
+ text:nth-child(3){
+ font-size: 26rpx;
+ color: #333;
+
+ }
+ }
+ }
+ }
+ .favorable.column{
+ align-items: flex-start;
}
.cell-item{
display: flex;
@@ -1327,11 +1463,13 @@
color: #333333;
}
}
+
}
+
.totalPrice{
padding: 32rpx 30rpx;
box-sizing: border-box;
- border-top: 2rpx solid #E5E5E5;
+ // border-top: 2rpx solid #E5E5E5;
display: flex;
justify-content: flex-end;
align-items: flex-end;
diff --git a/pagesOrder/order_detail/index.vue b/pagesOrder/order_detail/index.vue
index 65e46b4..f1ca626 100644
--- a/pagesOrder/order_detail/index.vue
+++ b/pagesOrder/order_detail/index.vue
@@ -153,11 +153,17 @@
})
if (res.code == 0) {
this.listinfo = res.data;
+ console.log(this.listinfo.orderInfo.couponInfoList)
+ if ( this.listinfo.orderInfo.couponInfoList ) {
+ this.listinfo.orderInfo.couponInfoList = JSON.parse(this.listinfo.orderInfo.couponInfoList)
+ // this.listinfo.orderInfo.couponInfoList = eval('(' + jsonString + ')')
+ }
this.listinfoid = res.data.orderId;
this.shopId = res.data.shopId;
if (this.listinfo.useType == " ") {
//堂食先付费
}
+ console.log(this.listinfo)
this.getAount();
}
},
diff --git a/pagesPoints/index/index.vue b/pagesPoints/index/index.vue
index 22ab9ce..6be9288 100644
--- a/pagesPoints/index/index.vue
+++ b/pagesPoints/index/index.vue
@@ -4,14 +4,14 @@
- 可用积分
- {{pointsInfo.accountPoints}}
-
+ 可用积分
+ {{pointsInfo.accountPoints}}
+
{{item.name}}
-
+