diff --git a/high-unionPay/App.vue b/high-unionPay/App.vue
index 9bff45a..37cdcaf 100644
--- a/high-unionPay/App.vue
+++ b/high-unionPay/App.vue
@@ -27,6 +27,8 @@
balancePrice : '',
balanceCardNo:'',
identificationCode:'',
+ //公司id
+ companyId:'',
//门店ID
storeid:'',
//门店名字
diff --git a/high-unionPay/Utils/Api.js b/high-unionPay/Utils/Api.js
index 00db002..86d19ec 100644
--- a/high-unionPay/Utils/Api.js
+++ b/high-unionPay/Utils/Api.js
@@ -498,4 +498,9 @@ export const sendUserPass = params => {
//话费列表
export const getUserOrderListhuafei = params => {
return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data);
-}
\ No newline at end of file
+}
+
+//肯德基返利
+export const getRebateIntegral = params => {
+ return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
+}
diff --git a/high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue b/high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue
index adbe812..5017bc6 100644
--- a/high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue
+++ b/high-unionPay/member-Recharge/rec-confirmation/rec-confirmation.vue
@@ -73,6 +73,26 @@
¥{{priceValue[1] / 100}}
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
+
支付方式
@@ -86,7 +106,7 @@
-
+
@@ -116,17 +136,17 @@
优惠券选择
-
-
-
-
- {{items.discountName}}
+
+
+
+ {{items.discountName}}
有效期:{{items.useEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
-
-
+
+
{
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询工会卡详情
getHuiLianTongCardBalance() {
if (!this.user.hltCardNo) {
@@ -279,10 +321,12 @@
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
- this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed(
- 2));
+ this.payPrice = Math.abs(parseFloat(this.totalprice - parseFloat(this.priceValue[1] / 100).toFixed(2))
+ .toFixed(
+ 2));
} else {
- this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
+ this.payPrice = Math.abs(parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) -
+ this
.deductionPrice).toFixed(2));
}
if (this.payPrice == 0) {
@@ -291,6 +335,7 @@
} else {
this.isUse = true;
}
+ this.getRebateIntegral();
},
//获取选择支付方式
changeRiado() {
@@ -361,7 +406,7 @@
"orderId": res.return_data.id,
}
this.qianzhuorderToUnionPay(params);
- }else {
+ } else {
uni.showToast({
title: res.return_msg,
icon: 'none',
@@ -445,12 +490,16 @@
//计算支付价格
calculatepayPrice() {
if (this.deductionPrice == 0) {
- this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(2)))
+ this.payPrice = Math.abs(parseFloat(this.totalprice - (parseFloat(this.priceValue[1] / 100).toFixed(
+ 2)))
.toFixed(2));
} else {
- this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
+ this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
+ 2)) - this
.deductionPrice).toFixed(2));
- }
+ }
+
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -514,31 +563,32 @@
duration: 2000
})
}
- },
- //银联支付
- uniontopay(item) {
- let that = this;
- upsdk.pluginReady(function() {
- upsdk.pay({
- tn: item,
- success: function(res) {
- uni.showToast({
- title: '支付成功'
- })
- uni.reLaunch({
- url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderId
- })
- },
- fail: function(err) {
- uni.showToast({
- title: err.msg,
- icon: 'none',
- duration: 2000
- })
- // 支付失败, err.msg 是失败原因描述, 比如TN号不合法, 或者用户取消了交易 等等。
- }
- });
- });
+ },
+ //银联支付
+ uniontopay(item) {
+ let that = this;
+ upsdk.pluginReady(function() {
+ upsdk.pay({
+ tn: item,
+ success: function(res) {
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url: '/qianzhu-KFC/order-details/order-details?id=' + this
+ .orderId
+ })
+ },
+ fail: function(err) {
+ uni.showToast({
+ title: err.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ // 支付失败, err.msg 是失败原因描述, 比如TN号不合法, 或者用户取消了交易 等等。
+ }
+ });
+ });
},
submitHandle(e) {
uni.showLoading({
@@ -712,10 +762,8 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ width: 160rpx;
+ max-height: 160rpx;
}
}
diff --git a/high-unionPay/pages.json b/high-unionPay/pages.json
index 8fc70c3..18e8128 100644
--- a/high-unionPay/pages.json
+++ b/high-unionPay/pages.json
@@ -1039,12 +1039,12 @@
"selectedIconPath": "static/img/tabBar/home-on.png",
"text": "嗨森逛"
},
- // {
- // "pagePath": "pages/tabBar/category/category",
- // "iconPath": "static/img/tabBar/category.png",
- // "selectedIconPath": "static/img/tabBar/category-on.png",
- // "text": "导航"
- // },
+ {
+ "pagePath": "pages/tabBar/category/category",
+ "iconPath": "static/img/tabBar/category.png",
+ "selectedIconPath": "static/img/tabBar/category-on.png",
+ "text": "商户"
+ },
{
"pagePath": "pages/tabBar/user/user",
"iconPath": "static/img/tabBar/user.png",
diff --git a/high-unionPay/pages/goods/goods-list/goods-list.vue b/high-unionPay/pages/goods/goods-list/goods-list.vue
index 1e348df..9789374 100644
--- a/high-unionPay/pages/goods/goods-list/goods-list.vue
+++ b/high-unionPay/pages/goods/goods-list/goods-list.vue
@@ -19,6 +19,12 @@
+
+
+ {{item.title}}
+
+
@@ -40,12 +46,12 @@
-
-
- {{ row.salesPrice*100}}
-
+ {{ row.salesPrice*100}} ¥{{row.salesPrice}} -->
+
+
+ {{ row.salesPrice*100}}
+
¥{{ row.salesPrice}}
@@ -59,7 +65,8 @@
import {
getCouponList,
getCmsContent,
- getBrandCouponList
+ getBrandCouponList,
+ getListGoodsType
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@@ -88,7 +95,8 @@
typeId: '',
couponName: '',
brandid: '',
- goodtyid: ''
+ goodtyid: '',
+ cateTypeList: [] //分类
};
},
@@ -96,6 +104,9 @@
this.typeId = option.id;
this.brandid = option.brandId;
this.goodtyid = option.goodsId;
+ if (this.goodtyid == undefined) {
+ this.goodtyid = '';
+ }
if (option.id == 1) {
uni.setNavigationBarTitle({
title: '商品列表'
@@ -114,7 +125,12 @@
uni.setNavigationBarTitle({
title: '中石化码列表'
});
- this.getCouponListArea();
+ // this.getCouponListArea();
+ if (app.globalData.cityName == '贵州省') {
+ this.getListGoodsType();
+ } else {
+ this.getCouponListArea();
+ }
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
}
if (option.id == 4) {
@@ -133,6 +149,38 @@
this.getCouponListArea();
},
methods: {
+ //查询品牌
+ getListGoodsType() {
+ uni.showLoading({
+ title: '加载中...'
+ })
+ let params = {
+ pageNum: 1,
+ pageSize: 10000,
+ userService: '贵州中石化'
+ }
+ getListGoodsType(params).then(res => {
+ uni.hideLoading();
+ if (res.return_code == '000000') {
+ this.cateTypeList = res.return_data.list;
+ this.goodtyid = res.return_data.list[0].id;
+ if (app.globalData.cityName == '贵州省') {
+ this.getCouponListArea();
+ }
+ } else {
+ this.cateTypeList = [];
+ }
+ })
+ },
+ //切换id
+ switchid(item) {
+ this.goodtyid = item.id;
+ this.pageNum = 1;
+ this.pageSize = 10;
+ this.isNoMoreData = false;
+ this.goodsList = [];
+ this.getCouponListArea();
+ },
//获取弹出或者弹窗
getCmsContent() {
let params = {
@@ -160,7 +208,8 @@
}
let pagenum = this.pageNum;
let params = {
- regionId: app.globalData.cityId,
+ regionId: app.globalData.cityId,
+ goodsTypeId: this.goodtyid,
pageNum: pagenum,
pageSize: this.pageSize,
displayArea: this.typeId,
diff --git a/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue b/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
index 27f7ca0..9ef122a 100644
--- a/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
+++ b/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
@@ -121,7 +121,25 @@
-
+
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
支付方式:
@@ -176,18 +194,18 @@
优惠券选择
-
-
-
-
- {{items.highDiscount.discountName}}
+
+
+
+ {{items.highDiscount.discountName}}
有效期:{{items.highDiscount.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
-
-
+
+
@@ -218,9 +236,10 @@
getUserOrderPreList,
canUseDiscount,
addOrder,
- cancelOrder,
+ cancelOrder,
unionPay,
- oilPriceDiscountCompute
+ oilPriceDiscountCompute,
+ getRebateIntegral
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
@@ -257,7 +276,9 @@
memDiscountId: '', //优惠券id
priceValue: [0, 0], // 积分可以指定默认值
availIntegal: 0, // 可用积分
- gasOrderList: '' //存的订单信息
+ gasOrderList: '', //存的订单信息
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
}
},
onLoad(e) {
@@ -288,6 +309,24 @@
}
});
},
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": 1,
+ "type": 3,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询优惠券
canUseDiscount() {
let params = {
@@ -307,8 +346,8 @@
let datas = {
"price": this.gasOrderList.highChildOrderList[0].goodsPrice,
"goodsId": this.gasOrderList.highChildOrderList[0].goodsId,
- "oilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
- }
+ "oilNo": this.gasOrderList.highChildOrderList[0].gasOilNo,
+ }
oilPriceDiscountCompute(datas).then(res => {
if (res.return_code == '000000') {
this.orderList = res.return_data;
@@ -320,6 +359,7 @@
} else {
this.availIntegal = payprice;
}
+ this.getRebateIntegral();
}
})
},
@@ -397,7 +437,8 @@
this.payPrice = Math.abs(parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(
2)) - this
.deductionPrice).toFixed(2));
- }
+ }
+ this.getRebateIntegral();
},
rechangeload() {
this.isUse = false;
@@ -431,6 +472,7 @@
} else {
this.isUse = true;
}
+ this.getRebateIntegral();
},
//密码支付完成
@@ -687,8 +729,8 @@
title: '提交订单中...'
})
let goods = {
- "identificationCode": this.gasOrderList.identificationCode,
- "payGold": this.priceValue[1],
+ "identificationCode": this.gasOrderList.identificationCode,
+ "payGold": this.priceValue[1],
"memDiscountId": this.memDiscountId,
"highChildOrderList": [{
"goodsType": this.gasOrderList.highChildOrderList[0].goodsType,
@@ -791,50 +833,50 @@
that.$refs.paymentPassword.modalFun('show');
}
- },
- //银联获取信息
- unionPay() {
- let goods = {
- "orderId": this.orderNo
- }
- unionPay(goods).then(res => {
- if (res.return_code == '000000') {
- this.uniontopay(res.return_data.prepayid);
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: 'none',
- duration: 2000
- });
- }
- })
- },
- //银联支付
- uniontopay(item) {
- let that = this;
- upsdk.pluginReady(function() {
- upsdk.pay({
- tn: item,
- success: function(res) {
- uni.showToast({
- title: '支付成功'
- })
- uni.reLaunch({
- url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
- .orderNo
- });
- },
- fail: function(err) {
- uni.navigateBack({})
- uni.showToast({
- title: err.msg,
- icon: 'none',
- duration: 2000
- })
- // 支付失败, err.msg 是失败原因描述, 比如TN号不合法, 或者用户取消了交易 等等。
- }
- });
- });
+ },
+ //银联获取信息
+ unionPay() {
+ let goods = {
+ "orderId": this.orderNo
+ }
+ unionPay(goods).then(res => {
+ if (res.return_code == '000000') {
+ this.uniontopay(res.return_data.prepayid);
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ })
+ },
+ //银联支付
+ uniontopay(item) {
+ let that = this;
+ upsdk.pluginReady(function() {
+ upsdk.pay({
+ tn: item,
+ success: function(res) {
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
+ .orderNo
+ });
+ },
+ fail: function(err) {
+ uni.navigateBack({})
+ uni.showToast({
+ title: err.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ // 支付失败, err.msg 是失败原因描述, 比如TN号不合法, 或者用户取消了交易 等等。
+ }
+ });
+ });
}
}
}
@@ -935,10 +977,8 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ width: 160rpx;
+ max-height: 160rpx;
}
}
diff --git a/high-unionPay/pages/goods/refuel-details/refuel-details.vue b/high-unionPay/pages/goods/refuel-details/refuel-details.vue
index d90e125..b079c79 100644
--- a/high-unionPay/pages/goods/refuel-details/refuel-details.vue
+++ b/high-unionPay/pages/goods/refuel-details/refuel-details.vue
@@ -240,13 +240,21 @@
})
},
//前往导航
- seeloaction() {
- uni.openLocation({
- latitude: Number(this.storeList.gasAddressLatitude), //目的地的定位
- longitude: Number(this.storeList.gasAddressLongitude), //目的地的定位
- name: this.storeList.gasName,
- address: this.storeList.gasAddress
- })
+ seeloaction() {
+ uni.showToast({
+ title: '当前暂不支持导航',
+ duration:2000,
+ icon: "none"
+ });
+ // window.open(
+ // `//uri.amap.com/navigation?from=${app.globalData.longitude},${app.globalData.latitude},我的位置&to=${this.storeList.gasAddressLongitude},${this.storeList.gasAddressLatitude},${this.storeList.gasAddress}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=1`
+ // )
+ // uni.openLocation({
+ // latitude: Number(this.storeList.gasAddressLatitude), //目的地的定位
+ // longitude: Number(this.storeList.gasAddressLongitude), //目的地的定位
+ // name: this.storeList.gasName,
+ // address: this.storeList.gasAddress
+ // })
},
//显示弹出
showPopup(item) {
diff --git a/high-unionPay/pages/goods/refuel/refuel.vue b/high-unionPay/pages/goods/refuel/refuel.vue
index 71af9f3..f0be536 100644
--- a/high-unionPay/pages/goods/refuel/refuel.vue
+++ b/high-unionPay/pages/goods/refuel/refuel.vue
@@ -197,12 +197,12 @@
},
seeloaction(item) {
- uni.openLocation({
- latitude: Number(item.latitude), //目的地的定位
- longitude: Number(item.longitude), //目的地的定位
- name: item.store_name,
- address: item.address
- })
+ // uni.openLocation({
+ // latitude: Number(item.latitude), //目的地的定位
+ // longitude: Number(item.longitude), //目的地的定位
+ // name: item.store_name,
+ // address: item.address
+ // })
},
changeValue1(item) {
this.distanceName = item.name;
diff --git a/high-unionPay/pages/goods/store-list/store-details.vue b/high-unionPay/pages/goods/store-list/store-details.vue
index e4fc128..01424a3 100644
--- a/high-unionPay/pages/goods/store-list/store-details.vue
+++ b/high-unionPay/pages/goods/store-list/store-details.vue
@@ -133,12 +133,17 @@
},
//前往导航
seeloaction() {
- uni.openLocation({
- latitude: Number(this.merchanList.latitude), //目的地的定位
- longitude: Number(this.merchanList.longitude), //目的地的定位
- name: this.merchanList.storeName,
- address: this.merchanList.address
- })
+ uni.showToast({
+ title: '当前暂不支持导航',
+ duration:2000,
+ icon: "none"
+ });
+ // uni.openLocation({
+ // latitude: Number(this.merchanList.latitude), //目的地的定位
+ // longitude: Number(this.merchanList.longitude), //目的地的定位
+ // name: this.merchanList.storeName,
+ // address: this.merchanList.address
+ // })
},
//查询门店对应的卡券
getCouponListByStoreId() {
diff --git a/high-unionPay/pages/login/updatePas/resetPas.vue b/high-unionPay/pages/login/updatePas/resetPas.vue
index a241c0d..7e45cb3 100644
--- a/high-unionPay/pages/login/updatePas/resetPas.vue
+++ b/high-unionPay/pages/login/updatePas/resetPas.vue
@@ -1,103 +1,164 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确 认
-
-
-
-
-
-
-
diff --git a/high-unionPay/pages/order/confirmation.vue b/high-unionPay/pages/order/confirmation.vue
index ec55580..1db1a5b 100644
--- a/high-unionPay/pages/order/confirmation.vue
+++ b/high-unionPay/pages/order/confirmation.vue
@@ -86,23 +86,23 @@
-
-
-
-
- 邀请码
-
-
+
+
+
+
+ 邀请码
+
+
- 支付方式积分充值
+ 支付方式积分充值
-
-
+
+
积分支付可用积分: {{user.gold}}
@@ -111,8 +111,8 @@
-
-
+
+
银联支付
@@ -121,6 +121,16 @@
+
+
+
+ 工会卡支付可用余额: {{tongCardPrice}}元
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{box.storeName}}
-
-
-
- {{box.address}}
-
-
-
- {{box.distance}}km
-
-
-
-
-
- 筛选门店
-
-
- {{item.merchantName}}
-
-
-
-
-
-
-
diff --git a/high-unionPay/pages/tabBar/home/home.vue b/high-unionPay/pages/tabBar/home/home.vue
index c2ff318..72795e7 100644
--- a/high-unionPay/pages/tabBar/home/home.vue
+++ b/high-unionPay/pages/tabBar/home/home.vue
@@ -258,9 +258,12 @@
}
findByLatAndLng(datas).then(res => {
if (res.return_code == '000000') {
- app.globalData.qianzhuCityName = res.return_data.result.addressComponent.city;
-
-
+ // res.return_data.provinceName
+ app.globalData.cityName = res.return_data.provinceName;
+ app.globalData.qianzhuCityName = res.return_data.cityName;
+ app.globalData.cityId = res.return_data.regionId;
+ // app.globalData.cityId = '520000';
+ app.globalData.companyId = res.return_data.companyId;
}
});
},
diff --git a/high-unionPay/pages/tabBar/user/user.vue b/high-unionPay/pages/tabBar/user/user.vue
index 42bd382..7c7d82b 100644
--- a/high-unionPay/pages/tabBar/user/user.vue
+++ b/high-unionPay/pages/tabBar/user/user.vue
@@ -275,7 +275,7 @@
},
{
url: '../../login/updatePas/updatePas',
- text: '设置密码',
+ text: '设置积分密码',
img: '../../../static/img/pas.png',
type: 2
},
@@ -296,7 +296,7 @@
},
{
url: '../../login/updatePas/resetPas',
- text: '修改密码',
+ text: '修改积分密码',
img: '../../../static/img/pas.png',
type: 2
},
diff --git a/high-unionPay/pages/unionPay/recharge/recharge.vue b/high-unionPay/pages/unionPay/recharge/recharge.vue
index ab4639f..2efc205 100644
--- a/high-unionPay/pages/unionPay/recharge/recharge.vue
+++ b/high-unionPay/pages/unionPay/recharge/recharge.vue
@@ -1,30 +1,68 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue b/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
index 8e13fdd..bb4b4dd 100644
--- a/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
+++ b/high-unionPay/pages/unionPay/unionComfirmation/unionComfirmation.vue
@@ -2,9 +2,12 @@
-
-
-
+
+
+
+
+
+
电信话费充值
移动话费充值
@@ -80,6 +83,26 @@
+
+
+
+ 下单返积分
+
+
+ 返{{rebateIntegral}}积分
+
+
+ {{rebateIntegral}}
+
+
+
+
+ 积分抵扣与优惠券抵扣不同享
+
+
+
支付方式
@@ -126,17 +149,24 @@
优惠券选择
-
-
-
-
- {{items.discountName}}
+
+
+
+ {{items.discountName}}
有效期至:{{items.useEndTime | timeFormat('yyyy-mm-dd')}}
-
-
-
+
+
+
+
+
@@ -154,9 +184,10 @@
hltUnionCardPayghk,
getHuiLianTongCardBalance,
getUserOrderPreList,
- findById
+ findById,
+ getRebateIntegral
} from '../../../Utils/Api.js';
- import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
+ import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../../components/cj-slider/cj-slider.vue';
import ssPaymentPassword from '../../../components/sanshui-payment-password';
let app = getApp();
@@ -176,7 +207,7 @@
radioStatus: true,
memDiscountId: '',
user: '',
- paytype: '',
+ paytype: '4',
PaymentPassword: '',
orderId: '',
jumpType: '',
@@ -197,7 +228,9 @@
changePrice: '', //滑动值
isDiscount: true,
availIntegal: '', // 可用积分
- isUse: true // 是否禁用状态
+ isUse: true, // 是否禁用状态
+ rebateIntegral: '', //返回积分
+ Integrastu: 1 //返积分状态
};
},
@@ -254,6 +287,7 @@
this.user = res.return_data;
this.findById();
this.getHuiLianTongCardBalance();
+ this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@@ -261,6 +295,24 @@
}
});
},
+ //支付返利积分
+ getRebateIntegral() {
+ let datas = {
+ "companyId": app.globalData.companyId,
+ "price": this.payPrice,
+ "productId": this.rechargeModel,
+ "type": 3,
+ }
+ getRebateIntegral(datas).then(res => {
+ if (res.return_code == '000000') {
+ this.rebateIntegral = res.return_data;
+ this.Integrastu = 1;
+ } else {
+ this.rebateIntegral = res.return_msg;
+ this.Integrastu = 2;
+ }
+ })
+ },
//查询优惠券
getUserOrderPreList() {
let params = {
@@ -300,7 +352,7 @@
},
//选择优惠券
radioChanges(item) {
- this.paytheprice = this.orderPrice;
+ this.paytheprice = this.orderPrice;
this.rechangeload();
if (this.memDiscountId == item.id) { // 如果已经选中,则取消选中
this.memDiscountId = '';
@@ -337,7 +389,7 @@
let pprice = parseFloat(item * 100).toFixed(0);
let payprice = parseFloat(item * 100 * zkprice).toFixed(0);
if (payprice > this.user.gold) {
- this.availIntegal = this.user.gold;
+ this.availIntegal = this.user.gold;
this.priceValue[1] = 0;
// if (this.availIntegal < this.priceValue[1]) {
// this.priceValue[1] = this.user.gold;
@@ -346,7 +398,7 @@
} else {
this.availIntegal = payprice;
this.priceValue[1] = 0;
- }
+ }
this.reload();
this.calculatepayPrice();
},
@@ -358,11 +410,12 @@
} else {
this.payPrice = parseFloat(this.orderPrice - (parseFloat(this.priceValue[1] / 100).toFixed(2)) - this
.deductionPrice).toFixed(2);
- }
- },
- rechangeload() {
- this.isUse = false;
- this.$nextTick(() => (this.isUse = true))
+ }
+ this.getRebateIntegral();
+ },
+ rechangeload() {
+ this.isUse = false;
+ this.$nextTick(() => (this.isUse = true))
},
//刷新组件
reload() {
@@ -388,45 +441,45 @@
duration: 2000
})
return;
- }
-
- let params = {
- "memDiscountId": that.memDiscountId,
- "rechargeContent": that.rechargeContent,
- "goodsId": that.objectId,
- "integralNum": that.priceValue[1],
- "password": ''
- }
- uni.showLoading({
- title: '加载中...'
- })
- addOrderPay(params).then(res => {
- uni.hideLoading()
- if (res.return_code == '000000') {
- that.orderToUnionPay(res.return_data.id);
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: "none"
- })
- }
+ }
+
+ let params = {
+ "memDiscountId": that.memDiscountId,
+ "rechargeContent": that.rechargeContent,
+ "goodsId": that.objectId,
+ "integralNum": that.priceValue[1],
+ "password": ''
+ }
+ uni.showLoading({
+ title: '加载中...'
+ })
+ addOrderPay(params).then(res => {
+ uni.hideLoading()
+ if (res.return_code == '000000') {
+ that.orderToUnionPay(res.return_data.id);
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: "none"
+ })
+ }
+ })
+ },
+ //获取订单信息
+ orderToUnionPay(item) {
+ let params = {
+ "orderId": item
+ }
+ orderToUnionPay(params).then(res => {
+ if (res.return_code == '000000') {
+ this.uniontopay(res.return_data.prepayid, item);
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
+ }
})
- },
- //获取订单信息
- orderToUnionPay(item) {
- let params = {
- "orderId": item
- }
- orderToUnionPay(params).then(res => {
- if (res.return_code == '000000') {
- this.uniontopay(res.return_data.prepayid,item);
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: 'none'
- })
- }
- })
},
//获取选择支付方式
changeRiado() {
@@ -494,32 +547,32 @@
icon: 'none',
duration: 2000
})
- },
- //银联支付
- uniontopay(item,item1) {
- let that = this;
- upsdk.pluginReady(function() {
- upsdk.pay({
- tn: item,
- success: function(res) {
- uni.showToast({
- title: '支付成功'
- })
- uni.reLaunch({
- url: '../Phone-recharge-details/Phone-recharge-details?id=' +
- item1
- })
- },
- fail: function(err) {
- uni.navigateBack({})
- uni.showToast({
- title: err.msg,
- icon: 'none',
- duration: 2000
- })
- }
- });
- });
+ },
+ //银联支付
+ uniontopay(item, item1) {
+ let that = this;
+ upsdk.pluginReady(function() {
+ upsdk.pay({
+ tn: item,
+ success: function(res) {
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url: '../Phone-recharge-details/Phone-recharge-details?id=' +
+ item1
+ })
+ },
+ fail: function(err) {
+ uni.navigateBack({})
+ uni.showToast({
+ title: err.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ });
+ });
},
submitHandle(e) {
uni.showLoading({
@@ -547,7 +600,7 @@
uni.hideLoading();
if (res.return_code == '000000') {
this.orderId = res.return_data.id;
- uni.reLaunch({
+ uni.reLaunch({
url: '../Phone-recharge-details/Phone-recharge-details?id=' +
this.orderId
})
@@ -617,6 +670,7 @@
} else {
this.isUse = true;
}
+ this.getRebateIntegral();
},
}
@@ -739,10 +793,8 @@
border-radius: 8px;
image {
- float: left;
- width: 170rpx;
- max-height: 170rpx;
- margin-left: 10px;
+ width: 160rpx;
+ max-height: 160rpx;
}
}
diff --git a/high-unionPay/pages/user/bindingCard/bindingCard.vue b/high-unionPay/pages/user/bindingCard/bindingCard.vue
index 1ad4197..342809c 100644
--- a/high-unionPay/pages/user/bindingCard/bindingCard.vue
+++ b/high-unionPay/pages/user/bindingCard/bindingCard.vue
@@ -5,20 +5,20 @@
- {{typeName}}
+ {{typeName}}
-
+
-
+
@@ -32,17 +32,17 @@
绑定卡号
获取预留手机号
-
+