diff --git a/Utils/Api.js b/Utils/Api.js
index dfbf883..daba217 100644
--- a/Utils/Api.js
+++ b/Utils/Api.js
@@ -17,7 +17,15 @@ export const GetPhoneNumber = params => {
//获取用户授权信息
export const getUserInfo = params => {
return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data);
-}
+}
+// 设置用户积分支付密码
+export const setUserPayPwd = params => {
+ return POST('POST', `${base}/highUser/setUserPayPwd`, params).then(res => res.data);
+}
+// 修改用户积分支付密码
+export const updateUserPayPwd = params => {
+ return POST('POST', `${base}/highUser/updateUserPayPwd`, params).then(res => res.data);
+}
//获取用户信息
export const findUser = params => {
@@ -59,11 +67,11 @@ export const addOrder = params => {
export const orderToPay = params => {
return POST('POST', `${base}/order/orderToPay`, params).then(res => res.data);
}
-//金币支付
+//积分支付
export const orderToGoldPay = params => {
return POST('POST', `${base}/order/orderToGoldPay`, params).then(res => res.data);
}
-//查询用户金币使用情况
+//查询用户积分使用情况
export const getUserGoldRecList = params => {
return POST('GET', `${base}/highGoldRec/getUserGoldRecList`, params).then(res => res.data);
}
diff --git a/components/sanshui-modal/index.vue b/components/sanshui-modal/index.vue
new file mode 100644
index 0000000..0837d1e
--- /dev/null
+++ b/components/sanshui-modal/index.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/sanshui-payment-password/index.vue b/components/sanshui-payment-password/index.vue
new file mode 100644
index 0000000..aa08a71
--- /dev/null
+++ b/components/sanshui-payment-password/index.vue
@@ -0,0 +1,639 @@
+
+
+
+
+
+
+
+
+
+ {{_titleObj.title}}
+ {{_titleObj.subTitle}}
+
+ {{payPassWord[index]}}
+
+
+
+
+
+ {{_titleObj.title}}
+ {{_titleObj.twoSubTitle}}
+
+ {{payPassWord[index]}}
+
+
+
+
+
+
+ {{_titleObj.twoTitle}}
+ {{_titleObj.twoSubTitle}}
+
+ {{payPassWord[index]}}
+
+
+
+ {{_titleObj.threeTitle}}
+ {{_titleObj.threeSubTitle}}
+
+ {{payPassWord[index]}}
+
+
+
+
+
+ 安全密码为6位数字,用于提现、设置密保、添加银行卡等操作,可保障资金安全
+ {{msgText}}
+
+
+
+
+
+
+
+ 上一步
+
+
+
+ 完成
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+
+
+
diff --git a/components/wyb-popup/wyb-popup.vue b/components/wyb-popup/wyb-popup.vue
index 2ca14fa..f93c12a 100644
--- a/components/wyb-popup/wyb-popup.vue
+++ b/components/wyb-popup/wyb-popup.vue
@@ -147,7 +147,7 @@
if (this.type === 'left' || this.type === 'right') {
return '100%'
} else {
- return 'auto'
+ return '400px'
}
}
}
diff --git a/pages.json b/pages.json
index 57f05d8..7077c2f 100644
--- a/pages.json
+++ b/pages.json
@@ -175,6 +175,7 @@
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
+ "navigationBarTitleText": "详情",
"navigationBarTextStyle": "white",
"onReachBottomDistance": 50,
"h5": {
@@ -439,6 +440,30 @@
}
}
+ ,{
+ "path" : "pages/login/updatePas/updatePas",
+ "style" :
+ {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "设置密码",
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white"
+ }
+ } ,{
+ "path" : "pages/login/updatePas/resetPas",
+ "style" :
+ {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": "修改密码",
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#0083f5",
+ "backgroundColorTop": "#0083f5",
+ "navigationBarTextStyle": "white"
+ }
+
+ }
],
"globalStyle": {
diff --git a/pages/goods/coupon-details/coupon-details.vue b/pages/goods/coupon-details/coupon-details.vue
index 9e444d0..161d8b2 100644
--- a/pages/goods/coupon-details/coupon-details.vue
+++ b/pages/goods/coupon-details/coupon-details.vue
@@ -2,34 +2,60 @@
-
+
已使用
未使用
已过期
+ {{couponDesInfo.couponInfo.couponName}}
+ 领取时间:{{oneTime | formatDate('-')}}
+ 使用有效期:{{twoTime | formatDate('-')}}
+ 消费时间:{{threeTime | formatDate('-')}}
- {{couponDesInfo.couponInfo.couponName}}
- 领取时间:{{oneTime | formatDate('-')}}
- 使用有效期:{{twoTime | formatDate('-')}}
- 消费时间:{{threeTime | formatDate('-')}}
+
-
+
+
+ 使用流程:
+
+
+ 1:
+ 客户使用积分兑换或者工会卡购买。
+
+
+ 2:
+ 兑换成功后中石化给客户发送一张同等面额的码商券,保存在”加油中石化“APP中。
+
+
+ 3:
+ 客户登录”加油中石化“APP,查看码商券详情。
+
+
+ 4:
+ 客户选择中石化任意加油站加油,加完油后,在加油中石化“APP中查看订单,选择支付,支付时选择码商券抵用。支付完成即可。
+
+
+
请出示核销码(商户扫客户)
-
+
- {{couponDesInfo.couponCodeInfo.codeKey}}
+ {{couponDesInfo.couponCodeInfo.codeKey}}
-
- 门店信息
+
+
+ 门店信息
+
{{store.storeName}}
- {{store.address}}
+ {{store.address}}
@@ -39,8 +65,8 @@
-
+
@@ -71,7 +97,6 @@
this.couDesId = option.id;
this.menddesId = option.mendId;
this.getUserCouponDetail();
- this.getStoreListByCoupon();
},
filters: {
//过滤器 用于格式化时间
@@ -106,10 +131,17 @@
getUserCouponDetail(params).then(res => {
if (res.return_code == '000000') {
this.couponDesInfo = res.return_data;
+ uni.hideLoading();
+ if (res.return_data.couponInfo.couponSource == 4) {
+ this.oneTime = res.return_data.highUserCoupon.createTime;
+ this.twoTime = res.return_data.highUserCoupon.useEndTime;
+ this.threeTime = res.return_data.highUserCoupon.consumeTime;
+ return;
+ }
+ this.getStoreListByCoupon();
this.oneTime = res.return_data.highUserCoupon.createTime;
this.twoTime = res.return_data.highUserCoupon.useEndTime;
this.threeTime = res.return_data.highUserCoupon.consumeTime;
- uni.hideLoading()
} else {
uni.hideLoading()
}
@@ -209,7 +241,7 @@
}
.couhedcout {
- margin-left: 200rpx;
+ margin-left: 210rpx;
}
.couStu {
@@ -235,7 +267,7 @@
.stoCont {
border-bottom: 1px solid #f6f6f6;
- height: 170rpx;
+ height: 160rpx;
}
.loading-text {
diff --git a/pages/goods/goods-list/goods-list.vue b/pages/goods/goods-list/goods-list.vue
index bacd07b..214b917 100644
--- a/pages/goods/goods-list/goods-list.vue
+++ b/pages/goods/goods-list/goods-list.vue
@@ -23,7 +23,7 @@
-
+
{{row.couponName}}
限购{{row.limitNumber}}件
@@ -93,7 +93,7 @@
}
if (option.id == 2) {
uni.setNavigationBarTitle({
- title: '金币列表'
+ title: '积分列表'
});
}
this.getCouponListArea();
diff --git a/pages/goods/goods.vue b/pages/goods/goods.vue
index c75fb9a..8e9de05 100644
--- a/pages/goods/goods.vue
+++ b/pages/goods/goods.vue
@@ -24,7 +24,7 @@
-
+
{{currentSwiper+1}}/{{swiperList.length}}
@@ -54,42 +54,18 @@
-
{{goodsData[0].couponName}}
有效期至: {{goodsData[0].salesEndTime | formatDate('-')}}
- 库存 : {{goodsData[0].stockCount}}件
-
-
-
-
+
-
+
+
+
+ 赠送卡券
+
+
+
+
@@ -126,6 +110,37 @@
+
+ 赠送卡券
+
+
+
+
+ {{ product.highCouponModel.couponName }}
+ 有效期至:201-05-15 22:59:59(待改)
+
+ ¥{{ product.highCouponModel.discountPrice}}
+
+ ¥{{ product.highCouponModel.salesPrice}}
+
+
+
+
+ {{ product.highCouponModel.discountPrice*100}}
+
+
+
+ {{ product.highCouponModel.salesPrice*100}}
+
+
+
+
+
@@ -137,10 +152,12 @@
getUserInfo
} from "../../Utils/Api.js";
import authorize from '../../components/Authorize.vue'
+ import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
let app = getApp()
export default {
components: {
- authorize
+ authorize,
+ wybPopup
},
data() {
return {
@@ -204,18 +221,7 @@
onReady() {
// this.calcAnchor(); //计算锚点高度,页面数据是ajax加载时,请把此行放在数据渲染完成事件中执行以保证高度计算正确
},
- onPageScroll(e) {
- //锚点切换
- // this.selectAnchor = e.scrollTop >= this.anchorlist[2].top ? 2 : e.scrollTop >= this.anchorlist[1].top ? 1 : 0;
- //导航栏渐变
- // let tmpY = 375;
- // e.scrollTop = e.scrollTop > tmpY ? 375 : e.scrollTop;
- // this.afterHeaderOpacity = e.scrollTop * (1 / tmpY);
- // this.beforeHeaderOpacity = 1 - this.afterHeaderOpacity;
- //切换层级
- // this.beforeHeaderzIndex = e.scrollTop > 0 ? 10 : 11;
- // this.afterHeaderzIndex = e.scrollTop > 0 ? 11 : 10;
- },
+ onPageScroll(e) {},
//上拉加载,需要自己在page.json文件中配置"onReachBottomDistance"
onReachBottom() {
// uni.showToast({ title: '触发上拉加载' });
@@ -243,6 +249,10 @@
}
})
},
+ //显示弹出
+ showPopup() {
+ this.$refs.popup.show();
+ },
//查看大图
perImage(item) {
uni.previewImage({
@@ -299,15 +309,7 @@
},
//获取登陆信息
getuserinfo() {
- // uni.showLoading({
- // title: '提交中...'
- // });
let that = this;
- // wx.login({
- // success(res) {
- // if (res.code) {
- //发起网络请求
- // var code = res.code;
// 获取微信用户信息
uni.getUserProfile({
desc: '登录中...',
@@ -357,37 +359,20 @@
});
}
})
- // } else {
- // uni.showToast({
- // title: "微信登录授权失败",
- // icon: "none"
- // });
- // }
- // }
- // })
},
buy() {
let that = this;
- // if (that.goodsData[0].stockCount && that.goodsData[0].couponSource == 4) {
- uni.showToast({
- title: '提交订单...',
- icon: 'none',
- duration: 2000,
- success() {
- uni.navigateTo({
- url: '../order/confirmation?id=' + that.goodsData[0].id
- })
- }
- })
- // } else {
- // uni.showToast({
- // title: '卡券数量不足',
- // icon: 'none',
- // duration: 2000
- // })
- // }
-
+ uni.showToast({
+ title: '提交订单...',
+ icon: 'none',
+ duration: 2000,
+ success() {
+ uni.navigateTo({
+ url: '../order/confirmation?id=' + that.goodsData[0].id
+ })
+ }
+ })
},
//跳转评论列表
@@ -493,55 +478,47 @@
background-color: #f8f8f8;
}
- .product-list {
- width: 92%;
- padding: 0 4% 3vw 4%;
+ .jtcs {
+ width: 40rpx;
+ height: 40rpx;
+ margin-top: 40rpx;
+ }
+
+ .tccs {
+ box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.2);
+ border: 1px solid #f6f6f6;
+ border-radius: 8px;
+ align-items: center;
display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- .product {
- width: 48%;
- border-radius: 20upx;
- background-color: #fff;
- margin: 0 0 15upx 0;
- box-shadow: 0upx 5upx 25upx rgba(0, 0, 0, 0.1);
+ image {
+ width: 170rpx;
+ max-height: 170rpx;
+ }
+ }
- image {
- width: 100%;
- border-radius: 20upx 20upx 0 0;
- }
+ .tcrig {
+ margin-left: 20rpx;
+ }
- .name {
- width: 92%;
- padding: 8upx 4%;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- text-align: justify;
- overflow: hidden;
- font-size: 30upx;
- }
+ .info {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-end;
+ width: 92%;
- .info {
- display: flex;
- justify-content: space-between;
- align-items: flex-end;
- width: 92%;
- padding: 10upx 4% 10upx 4%;
-
- .price {
- color: #e65339;
- font-size: 15px;
- font-weight: 600;
- }
+ .price {
+ color: #e65339;
+ font-size: 15px;
+ font-weight: 600;
+ display: flex;
+ align-items: center;
+ }
- .slogan {
- color: #807c87;
- font-size: 24upx;
- text-decoration: line-through;
- }
- }
+ .slogan {
+ color: #807c87;
+ font-size: 24upx;
+ text-decoration: line-through;
}
}
@@ -748,16 +725,11 @@
.swiper-box {
position: relative;
width: 100%;
- height: 100vw;
-
swiper {
width: 100%;
- height: 100vw;
-
swiper-item {
image {
width: 100%;
- height: 100vw;
}
}
}
@@ -780,9 +752,9 @@
.info-box {
width: 92%;
- padding: 4%;
- background-color: #fff;
- margin-bottom: 20rpx;
+ padding: 4%;
+ background-color: #fff;
+ margin-bottom: 20rpx;
}
.goods-info {
diff --git a/pages/goods/recording/recording.vue b/pages/goods/recording/recording.vue
index e9f027f..e620591 100644
--- a/pages/goods/recording/recording.vue
+++ b/pages/goods/recording/recording.vue
@@ -8,7 +8,7 @@
- 金币充值
+ 积分充值
+{{recod.gold}}
diff --git a/pages/goods/refuel/refuel.vue b/pages/goods/refuel/refuel.vue
index 1ca57b1..fd67420 100644
--- a/pages/goods/refuel/refuel.vue
+++ b/pages/goods/refuel/refuel.vue
@@ -104,34 +104,6 @@
imgadres2:'xiala.png',
imgadres3:'noorder.png',
menuList: [
- // {
- // 'title': '品牌',
- // 'key': 'single',
- // 'isMutiple': false,
- // 'detailTitle': '请选择(单选)',
- // 'reflexTitle': true,
- // 'defaultSelectedIndex': 0,
- // 'detailList': [{
- // 'title': '全部品牌',
- // 'value': ''
- // }, {
- // 'title': '中石化',
- // 'value': '中石化'
- // }, {
- // 'title': '中石油',
- // 'value': '中石油'
- // }, {
- // 'title': '亮牌',
- // 'value': '亮牌'
- // }, {
- // 'title': '其他',
- // 'value': '其他'
- // },
-
- // ]
-
- // },
-
{
'title': '油号',
'key': 'single2',
diff --git a/pages/goods/store-list/store-details.vue b/pages/goods/store-list/store-details.vue
index 4995733..f55e6e8 100644
--- a/pages/goods/store-list/store-details.vue
+++ b/pages/goods/store-list/store-details.vue
@@ -1,52 +1,41 @@
-
-
-
- 立即
前往
+
+
+
+
+ {{merchanList.storeName}}
-
-
- {{merchanList.storeName}}
- {{merchanList.address}}
+
+
+
+ {{merchanList.address}}
+ 营业时间: 00:00-23:59 站内开票
-
-
-
+
+
{{distance}}km
-
-
-
-
+
+
+
+ {{mers.highCouponModel.couponName}}
+
+ 有效期至:{{mers.useEndTime | formatDate('-')}}
+
+
+ 查看详情
+
+
+
亲、你还没有买券哦~
-
@@ -67,6 +56,8 @@
data() {
return {
imageUrl: app.globalData.imgUrl,
+ imagewxUrl: app.globalData.imageWxImg,
+ imgadres1: 'dhl.png',
merchanId: '',
merchanList: '',
distance: '',
@@ -120,67 +111,67 @@
// success(res) {
// if (res.code) {
// // 发起网络请求
- // var code = res.code;
- // 获取微信用户信息
- uni.getUserProfile({
- desc: '登录中...',
- success: function(res) {
- let params = {
- openId: app.globalData.openId,
- iv: res.iv,
- encryptedData: res.encryptedData
- }
- getUserInfo(params).then(res => {
- if (res.return_code == '000000') {
- uni.hideLoading();
- app.globalData.userInfo = res
- .return_data
- .object
- .highUser;
- app.globalData.token = res
- .return_data.uniqueCode;
- uni.setStorage({
- key: "user",
- data: res.return_data
- .object
- .highUser
- })
- uni.setStorage({
- key: "token",
- data: res.return_data
- .uniqueCode
- })
- that.user = res.return_data.object.highUser;
- that.getCouponListByStoreId();
- } else {
- uni.hideLoading();
- uni.showToast({
- title: res.return_msg,
- icon: 'none',
- duration: 2000
- })
- }
- });
- },
- fail: res => {
- uni.hideLoading();
- uni.showToast({
- title: "微信登录授权失败",
- icon: "none"
- });
- }
- })
- // } else {
- // uni.showToast({
- // title: "微信登录授权失败",
- // icon: "none"
- // });
- // }
- // },
- // fail(res) {
- // uni.hideLoading();
- // }
- // })
+ // var code = res.code;
+ // 获取微信用户信息
+ uni.getUserProfile({
+ desc: '登录中...',
+ success: function(res) {
+ let params = {
+ openId: app.globalData.openId,
+ iv: res.iv,
+ encryptedData: res.encryptedData
+ }
+ getUserInfo(params).then(res => {
+ if (res.return_code == '000000') {
+ uni.hideLoading();
+ app.globalData.userInfo = res
+ .return_data
+ .object
+ .highUser;
+ app.globalData.token = res
+ .return_data.uniqueCode;
+ uni.setStorage({
+ key: "user",
+ data: res.return_data
+ .object
+ .highUser
+ })
+ uni.setStorage({
+ key: "token",
+ data: res.return_data
+ .uniqueCode
+ })
+ that.user = res.return_data.object.highUser;
+ that.getCouponListByStoreId();
+ } else {
+ uni.hideLoading();
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ });
+ },
+ fail: res => {
+ uni.hideLoading();
+ uni.showToast({
+ title: "微信登录授权失败",
+ icon: "none"
+ });
+ }
+ })
+ // } else {
+ // uni.showToast({
+ // title: "微信登录授权失败",
+ // icon: "none"
+ // });
+ // }
+ // },
+ // fail(res) {
+ // uni.hideLoading();
+ // }
+ // })
// }
// })
@@ -257,6 +248,43 @@
diff --git a/pages/login/updatePas/updatePas.vue b/pages/login/updatePas/updatePas.vue
new file mode 100644
index 0000000..d9dfeb1
--- /dev/null
+++ b/pages/login/updatePas/updatePas.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确 认
+
+
+
+
+
+
+
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 913f79a..63db1a5 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -1,104 +1,130 @@
- 卡券信息
-
-
-
-
-
-
-
-
- {{couponList.couponName}}
- 规格:默认 数量:1
-
- ¥{{couponList.discountPrice}}
-
-
- {{couponList.discountPrice*100}}
-
-
- ¥{{couponList.salesPrice}}
-
-
-
- {{couponList.salesPrice*100}}
-
+
+
+
+
+ {{couponList.couponName}}
+ 规格: 默认
+
+ ¥{{couponList.discountPrice}}
+
+
+ {{couponList.discountPrice*100}}
+
+
+ ¥{{couponList.salesPrice}}
+
+
+
+ {{couponList.salesPrice*100}}
+ x1
-
-
-
-
-
-
- 商品金额
+
+
+
+ 商品总额
-
+
¥{{couponList.discountPrice}}
-
-
+
{{couponList.discountPrice*100}}
-
-
- 运费
+
+
+
+
+ 配送费
+
+
+ ¥0
+
+
+
+
+
+
+ 优惠抵扣{{UserNormalDiscountList.length}}张可用
+
+
+ 未使用
+
-
- ¥0.00
+
+ -¥{{deductionPrice}}
+
-
-
- 优惠抵扣
+
+
+
+
+
+ 支付方式
+
+
+
+
+
+ 积分支付可用金币: {{user.gold}}
-
- ¥{{deductionPrice}}
+
+
-
-
- 是否使用优惠券
+
+
+
+ 微信支付
-
-
+
+
-
+
+
- 可用优惠券
-
-
-
-
-
-
-
-
-
-
-
- {{item.highDiscount.discountName}}
- {{item.highDiscount.salesEndTime | formatDate('-')}}
-
-
-
+
+
+
+
+ 《条约协议》点击立即支付,即代表同意
+
+
+
-
+
+
-
@@ -125,10 +168,21 @@
getCouponById,
GetPhoneNumber,
getUserNormalDiscountList,
- bindUserPhone
+ bindUserPhone,
+ orderToPay,
+ orderToGoldPay
} from '../../Utils/Api.js';
+ import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
+ import ssPaymentPassword from '../../components/sanshui-payment-password'
let app = getApp();
+ // #ifdef H5
+ var jweixin = require('jweixin-module');
+ // #endif
export default {
+ components: {
+ wybPopup,
+ ssPaymentPassword
+ },
data() {
return {
buylist: [], //订单列表
@@ -138,21 +192,6 @@
note: '', //备注
int: 1200, //抵扣积分
deduction: 0, //抵扣价格
- recinfo: {
- id: 1,
- name: "大黑哥",
- head: "大",
- tel: "18816881688",
- address: {
- region: {
- "label": "广东省-深圳市-福田区",
- "value": [18, 2, 1],
- "cityCode": "440304"
- },
- detailed: '深南大道1111号无名摩登大厦6楼A2'
- },
- isDefault: true
- },
couponId: '',
couponList: [],
UserNormalDiscountList: [],
@@ -161,7 +200,12 @@
paytheprice: '',
radioStatus: true,
memDiscountId: '',
- user: ''
+ user: '',
+ paytype: '',
+ PaymentPassword: '',
+ isture: true,
+ orderId: '',
+ jumpType:''
};
},
@@ -220,14 +264,44 @@
}
})
},
- switch2Change(e) {
- this.radioStatus = e.target.value;
- if (!this.radioStatus) {
+ //显示弹出
+ showPopup() {
+ this.$refs.popup.show();
+ },
+
+ radioChanges(item) {
+ if (this.memDiscountId == item.id) { // 如果已经选中,则取消选中
+ this.memDiscountId = '';
this.paytheprice = this.couponList.discountPrice;
this.deductionPrice = '0.00';
- this.memDiscountId = '';
+ } else { // 否则进行选中赋值
+ this.memDiscountId = item.id;
+ if (item.highDiscount.discountType == 1) {
+ if (this.couponList.salesPrice > item.highDiscount.discountPrice) {
+ //满减价格
+ this.deductionPrice = item.highDiscount.discountPrice;
+ this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) /
+ 100);
+ } else {
+ uni.showToast({
+ title: '未满足满减条件',
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ } else if (item.highDiscount.discountType == 2) {
+ //抵扣价格
+ this.deductionPrice = item.highDiscount.discountPrice;
+ this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) / 100);
+ } else if (item.highDiscount.discountType == 3) {
+ // 打折
+ this.deductionPrice = this.couponList.salesPrice - this.couponList.salesPrice * (
+ item.highDiscount.discountPrice / 10);
+ this.paytheprice = this.couponList.salesPrice * (item.highDiscount
+ .discountPrice / 10);
+ }
}
- this.current = this.UserNormalDiscountList.length;
+ this.$refs.popup.hide();
},
//查询优惠券详情
getUserNormalDiscountList() {
@@ -240,43 +314,10 @@
}
})
},
- //选择优惠券
- radioChange(evt) {
- for (let i = 0; i < this.UserNormalDiscountList.length; i++) {
- if (this.UserNormalDiscountList[i].highDiscount.id == evt.target.value) {
- this.memDiscountId = this.UserNormalDiscountList[i].id;
- this.current = i;
- if (this.UserNormalDiscountList[i].highDiscount.discountType == 1) {
- if (this.couponList.salesPrice > this.UserNormalDiscountList[i].highDiscount.discountPrice) {
- //满减价格
- this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice;
- this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) /
- 100);
- } else {
- uni.showToast({
- title: '未满足满减条件',
- icon: 'none',
- duration: 2000
- })
- }
- } else if (this.UserNormalDiscountList[i].highDiscount.discountType == 2) {
- //抵扣价格
- this.deductionPrice = this.UserNormalDiscountList[i].highDiscount.discountPrice;
- this.paytheprice = (((this.couponList.salesPrice * 100) - (this.deductionPrice * 100)) / 100);
- } else if (this.UserNormalDiscountList[i].highDiscount.discountType == 3) {
- // 打折
- this.deductionPrice = this.couponList.salesPrice - this.couponList.salesPrice * (this
- .UserNormalDiscountList[i].highDiscount.discountPrice / 10);
- this.paytheprice = this.couponList.salesPrice * (this.UserNormalDiscountList[i].highDiscount
- .discountPrice / 10);
- }
- }
- }
- },
// H5获取手机号
jumpH5Bding() {
uni.navigateTo({
- url:'/pages/login/register?id=2'
+ url: '/pages/login/register?id=2'
})
},
// 微信获取手机号
@@ -303,6 +344,14 @@
});
},
toPay() {
+ if (this.paytype == '') {
+ uni.showToast({
+ title: '请选择支付方式',
+ icon: 'none',
+ duration: 2000
+ })
+ return;
+ }
uni.showLoading({
title: '提交订单中...'
})
@@ -317,11 +366,15 @@
addOrder(goods).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
- uni.redirectTo({
- url: '../pay/payment/payment?amount=' + res.return_data.payPrice +
- '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id +
- '&couponId=' + this.couponId +'&typeaout='+ res.return_data.highChildOrderList[0].ext1
- })
+ // uni.redirectTo({
+ // url: '../pay/payment/payment?amount=' + res.return_data.payPrice +
+ // '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id +
+ // '&couponId=' + this.couponId + '&typeaout=' + res.return_data
+ // .highChildOrderList[0].ext1
+ // })
+ this.jumpType = res.return_data.highChildOrderList[0].ext1;
+ this.orderId = res.return_data.id;
+ this.orderToPay(res.return_data);
} else {
uni.hideLoading();
uni.showToast({
@@ -331,13 +384,241 @@
});
}
})
+ },
+
+ //获取订单数据
+ orderToPay(item) {
+ let that = this;
+ if (that.paytype == 'weixin') {
+ let params = {
+ "orderId": item.id,
+ "openId": app.globalData.openId,
+ "orderScene": "GOODS_ORDER"
+ }
+ orderToPay(params).then(res => {
+ if (res.return_code == '000000') {
+ // #ifdef MP
+ uni.showLoading({
+ title: '支付中...'
+ })
+ uni.requestPayment({
+ "appId": res.return_data.appId,
+ "nonceStr": res.return_data.nonceStr,
+ "package": res.return_data.package,
+ "paySign": res.return_data.sign,
+ "signType": "MD5",
+ "timeStamp": res.return_data.timeStamp,
+ success: function(res) {
+ uni.hideLoading();
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url: '../pay/success/success?id=' + that.couponId
+ });
+ },
+ fail: function(err) {
+ uni.hideLoading();
+ uni.navigateBack({})
+ },
+ });
+ // #endif
+
+ //判断是否是公众号
+ // #ifdef H5
+ //判断微信浏览器
+ that.payRequest(res);
+ // #endif
+
+ } else {
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
+ }
+ })
+ } else if (that.paytype == 'jinbi') {
+ if(!that.user.isSetPayPwd){
+ uni.navigateTo({
+ url: '../login/updatePas/updatePas'
+ })
+ return;
+ }
+ that.isture = false;
+ that.$refs.paymentPassword.modalFun('show');
+ } else {
+ uni.showToast({
+ title: '请选择支付方式',
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ },
+ submitHandle(e) {
+ this.PaymentPassword = e.value;
+ this.isture = true;
+ uni.showLoading({
+ title: '支付中...'
+ })
+ let params = {
+ "orderId": this.orderId,
+ "password": this.PaymentPassword
+ }
+ orderToGoldPay(params).then(res => {
+ uni.hideLoading();
+ if (res.return_code == '000000') {
+ uni.showToast({
+ title: '支付成功'
+ })
+ uni.reLaunch({
+ url:'../pay/success/success?id=' + this.couponId
+ });
+ return;
+ }
+ if (res.return_code == '102130') {
+ uni.navigateTo({
+ url: '../../login/updatePas/updatePas'
+ })
+ return;
+ }
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
+ })
},
+ payRequest: function(self) {
+ uni.showLoading({
+ title: '支付中...'
+ })
+ jweixin.config({
+ // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+ appId: self.return_data.appId, // 必填,公众号的唯一标识
+ timestamp: self.return_data.timeStamp, // 必填,生成签名的时间戳
+ nonceStr: self.return_data.nonceStr, // 必填,生成签名的随机串
+ signature: self.return_data.sign, // 必填,签名,见附录1
+ jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+ });
+ uni.hideLoading();
+ jweixin.ready(function() {
+ jweixin.checkJsApi({
+ jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
+ success: function(res) {},
+ fail: function(res) {}
+ });
+ jweixin.chooseWXPay({
+ appId: self.return_data.appId,
+ timestamp: self.return_data
+ .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
+ nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位
+ package: self.return_data
+ .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
+ signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
+ paySign: self.return_data.sign, // 支付签名
+ success: function(res) {
+ // 支付成功后的回调函数
+ uni.showToast({
+ title: '支付成功'
+ })
+ if (that.jumpType == 4) {
+ uni.reLaunch({
+ url: '/pages/tabBar/user/user'
+ });
+ return;
+ }
+ uni.reLaunch({
+ url: '../success/success?id=' + that.couponId
+ });
+ },
+ cancel: function(r) {},
+ fail: function(res) {}
+ });
+ });
+
+ jweixin.error(function(res) {
+ uni.showToast({
+ icon: 'none',
+ title: '支付失败了',
+ duration: 4000
+ });
+ });
+ },
+
}
}
+
diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue
index 6399981..7140894 100644
--- a/pages/pay/payment/payment.vue
+++ b/pages/pay/payment/payment.vue
@@ -3,15 +3,11 @@
-
订单金额:
{{amount}} 元
- {{amount*100}} 个金币 (当前金币:{{user.gold}})
- {{amount}}元(当前金币:{{user.gold}})
+ {{amount*100}} 个积分 (当前积分:{{user.gold}})
+ {{amount}}元(当前积分:{{user.gold}})
@@ -29,7 +25,7 @@
- 金币支付
+ 积分支付
@@ -57,6 +53,8 @@
+
+
@@ -65,23 +63,27 @@
orderToPay,
orderToGoldPay
} from '../../../Utils/Api.js'
+ import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
+ components: {
+ ssPaymentPassword
+ },
data() {
return {
amount: 0,
- orderName: '',
imagewxUrl: app.globalData.imageWxImg,
- imgadres:'wxpay.png',
+ imgadres: 'wxpay.png',
pryType: '',
paytype: '', //支付类型
orderNo: '',
user: '',
couponId: '',
- jumpType:''
+ jumpType: '',
+ PaymentPassword: ''
};
},
onLoad(e) {
@@ -98,26 +100,13 @@
this.paytype = ''
}
this.amount = parseFloat(e.amount).toFixed(2);
- uni.getStorage({
- key: 'paymentOrder',
- success: (e) => {
- if (e.data.length > 1) {
- this.orderName = '多商品合并支付'
- } else {
- this.orderName = e.data[0].name;
- }
- uni.removeStorage({
- key: 'paymentOrder'
- })
- }
- })
},
methods: {
//获取订单数据
orderToPay() {
let that = this;
if (that.paytype == 'wxpay') {
-
+
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
@@ -141,7 +130,7 @@
uni.showToast({
title: '支付成功'
})
- if(that.jumpType == 4){
+ if (that.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
@@ -171,43 +160,13 @@
}
})
} else if (that.paytype == 'jinbi') {
- uni.showModal({
- title: '金币支付',
- content: '确认是否用金币支付?',
- success: (res) => {
- if (res.confirm) {
- uni.showLoading({
- title: '支付中...'
- })
- let params = {
- "orderId": that.orderNo
- }
- orderToGoldPay(params).then(res => {
- if (res.return_code == '000000') {
- uni.hideLoading();
- uni.showToast({
- title: '支付成功'
- })
- if(that.jumpType == 4){
- uni.reLaunch({
- url: '/pages/tabBar/user/user'
- });
- return;
- }
- uni.reLaunch({
- url: '../success/success?id=' + that.couponId
- });
-
- } else {
- uni.showToast({
- title: res.return_msg,
- icon: 'none'
- })
- }
- })
- } else if (res.cancel) {}
- }
- });
+ if(!that.user.isSetPayPwd){
+ uni.navigateTo({
+ url: '../../login/updatePas/updatePas'
+ })
+ return;
+ }
+ that.$refs.paymentPassword.modalFun('show');
} else {
uni.showToast({
title: '请选择支付方式',
@@ -216,6 +175,46 @@
})
}
},
+ submitHandle(e) {
+ this.PaymentPassword = e.value;
+ uni.showLoading({
+ title: '支付中...'
+ })
+ let params = {
+ "orderId": this.orderNo,
+ "password": this.PaymentPassword
+ }
+ orderToGoldPay(params).then(res => {
+ uni.hideLoading();
+ if (res.return_code == '000000') {
+ uni.showToast({
+ title: '支付成功'
+ })
+ if (this.jumpType == 4) {
+ uni.reLaunch({
+ url: '/pages/tabBar/user/user'
+ });
+ return;
+ }
+ uni.reLaunch({
+ url: '../success/success?id=' + this.couponId
+ });
+
+ }
+ if (res.return_code == '102130') {
+ uni.navigateTo({
+ url: '../../login/updatePas/updatePas'
+ })
+ return;
+ }
+
+ uni.showToast({
+ title: res.return_msg,
+ icon: 'none'
+ })
+
+ })
+ },
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
@@ -232,16 +231,16 @@
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
- success: function(res) {
- },
- fail: function(res) {
- }
+ success: function(res) {},
+ fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
- timestamp: self.return_data.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
+ timestamp: self.return_data
+ .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位
- package: self.return_data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
+ package: self.return_data
+ .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
paySign: self.return_data.sign, // 支付签名
success: function(res) {
@@ -249,7 +248,7 @@
uni.showToast({
title: '支付成功'
})
- if(that.jumpType == 4){
+ if (that.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
@@ -259,10 +258,8 @@
url: '../success/success?id=' + that.couponId
});
},
- cancel: function(r) {
- },
- fail: function(res) {
- }
+ cancel: function(r) {},
+ fail: function(res) {}
});
});
@@ -390,4 +387,4 @@
}
}
}
-
+
diff --git a/pages/pay/success/success.vue b/pages/pay/success/success.vue
index 7dcb664..1e33938 100644
--- a/pages/pay/success/success.vue
+++ b/pages/pay/success/success.vue
@@ -22,29 +22,56 @@
消费时间:{{threeTime | formatDate('-')}}
+
- 核销码(商户扫客户)
- 请告知加油员用码商支付
-
-
+
+
+ 使用流程:
+
+
+ 1:
+ 客户使用积分兑换或者工会卡购买。
+
+
+ 2:
+ 兑换成功后中石化给客户发送一张同等面额的码商券,保存在”加油中石化“APP中。
+
+
+ 3:
+ 客户登录”加油中石化“APP,查看码商券详情。
+
+
+ 4:
+ 客户选择中石化任意加油站加油,加完油后,在加油中石化“APP中查看订单,选择支付,支付时选择码商券抵用。支付完成即可。
+
-
- 二维码生效中,前往个人中心查看
-
-
- 立即
前往
+
+
+
+ 核销码(商户扫客户)
+ 请告知加油员用码商支付
+
+
+
+
-
-
- {{store.storeName}}
- {{store.address}}
+ 二维码生效中,前往个人中心查看
+
+
+ 立即
前往
-
-
-
-
- {{store.distance}}km
+
+
+ {{store.storeName}}
+ {{store.address}}
+
+
+
+
+
+ {{store.distance}}km
+
@@ -74,7 +101,6 @@
onLoad(option) {
this.couDesId = option.id;
this.getUserNewCouponDetail();
- this.getStoreListByCoupon();
},
filters: {
//过滤器 用于格式化时间
@@ -109,6 +135,13 @@
getUserNewCouponDetail(params).then(res => {
if (res.return_code == '000000') {
this.couponDesInfo = res.return_data;
+ if(res.return_data.couponInfo.couponSource == 4){
+ this.oneTime = res.return_data.highUserCoupon.createTime;
+ this.twoTime = res.return_data.highUserCoupon.useEndTime;
+ this.threeTime = res.return_data.highUserCoupon.consumeTime;
+ return;
+ }
+ this.getStoreListByCoupon();
this.oneTime = res.return_data.couponCodeInfo.receiveTime;
this.twoTime = res.return_data.couponCodeInfo.salesEndTime;
this.threeTime = res.return_data.couponCodeInfo.consumeTime;
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 89ce8a8..73f352d 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -69,14 +69,14 @@
- {{pro.couponName}}
+ {{pro.couponName}}
¥{{pro.discountPrice}}
-
+
@@ -87,7 +87,7 @@
@click="toGoods(item.id)">
- {{item.couponName}}
+ {{item.couponName}}
{{ item.discountPrice*100}}
@@ -150,7 +150,7 @@
@@ -99,6 +99,18 @@
+
+
+ 我的操作
+
+
+
+
+
+ {{row.text}}
+
+
+
@@ -195,7 +207,19 @@
// text: '充话费',
// img: 'user/bank.png'
// }
- ]
+ ],
+ //操作列表
+ czList: [{
+ url: '../../login/updatePas/updatePas',
+ text: '设置密码',
+ img: '../../../static/img/pas.png'
+ },{
+ url: '../../login/updatePas/resetPas',
+ text: '修改密码',
+ img: '../../../static/img/pas.png'
+ },
+
+ ],
}
},
//下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
diff --git a/pages/user/coupon/coupon.vue b/pages/user/coupon/coupon.vue
index 12c8700..8a0e244 100644
--- a/pages/user/coupon/coupon.vue
+++ b/pages/user/coupon/coupon.vue
@@ -12,7 +12,7 @@
-
+
- 截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}}
+ 截止时间:{{row.useEndTime | formatDate('-')}}
@@ -41,7 +41,7 @@
{{row.highDiscount.discountName}}
-
+
去使用
diff --git a/pages/user/mineCoupons/mineCoupons.vue b/pages/user/mineCoupons/mineCoupons.vue
index 74959e1..1d9c734 100644
--- a/pages/user/mineCoupons/mineCoupons.vue
+++ b/pages/user/mineCoupons/mineCoupons.vue
@@ -13,7 +13,7 @@
-
+
{{ product.highCouponModel.couponName }}
@@ -85,7 +85,7 @@
h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
- return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
+ return `${year}${spe}${month}${spe}${day}`;
}
},
onLoad() {
@@ -218,7 +218,7 @@
}
.headconts {
- margin-left: 210rpx;
+ margin-left: 220rpx;
}
.info {
diff --git a/pages/user/mineCouponsDestails/mineCouponsDestails.vue b/pages/user/mineCouponsDestails/mineCouponsDestails.vue
index 539ee8b..e6053db 100644
--- a/pages/user/mineCouponsDestails/mineCouponsDestails.vue
+++ b/pages/user/mineCouponsDestails/mineCouponsDestails.vue
@@ -7,7 +7,7 @@
{{couponsDetails.highDiscount.discountName}}
- 活动截止时间:{{salesEndTime | formatDate('-')}}
+ 使用截止时间:{{salesEndTime | formatDate('-')}}
领取有效期:{{couponsDetails.highDiscount.effectiveDay}}天
@@ -100,7 +100,7 @@
getDiscountByUserDiscountId(params).then(res => {
if (res.return_code == '000000') {
this.couponsDetails = res.return_data;
- this.salesEndTime = res.return_data.highDiscount.salesEndTime;
+ this.salesEndTime = res.return_data.useEndTime;
this.getCouponByDiscount(res.return_data.highDiscount.id);
}
})
diff --git a/pages/user/order_details/order_details.vue b/pages/user/order_details/order_details.vue
index 4994533..6569656 100644
--- a/pages/user/order_details/order_details.vue
+++ b/pages/user/order_details/order_details.vue
@@ -66,7 +66,7 @@
支付模式 :
- 金币
+ 积分
第三方平台
@@ -87,7 +87,7 @@
微信
- 金币
+ 积分
@@ -183,33 +183,6 @@
-
-
卡券订单
加油缴费
- 金币订单
+ 积分订单
-->
-
-
+
+
卡券订单
-
- 加油缴费
+
+ 团油订单
+
+
+
+ 电影票
+
+
+
+ KFC
-
+
- 金币订单
+ 话费充值
- 06-13 12: 11(待改)
+ {{row.createTime | formatDate('-')}}
@@ -162,6 +170,27 @@
onReachBottom() {
this.getUserOrderList();
},
+ filters: {
+ toFixed: function(x) {
+ return parseFloat(x).toFixed(2);
+ },
+ //过滤器 用于格式化时间
+ formatDate: function(value, spe = '/') {
+ let data = new Date(value);
+ let year = data.getFullYear();
+ let month = data.getMonth() + 1;
+ let day = data.getDate();
+ let h = data.getHours();
+ let mm = data.getMinutes();
+ let s = data.getSeconds();
+ month = month >= 10 ? month : "0" + month;
+ day = day >= 10 ? day : "0" + day;
+ h = h >= 10 ? h : "0" + h;
+ mm = mm >= 10 ? mm : "0" + mm;
+ s = s >= 10 ? s : "0" + s;
+ return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
+ }
+ },
watch: {
//监听reFresh,如果有修改就执行监听器
reFresh: function() {
diff --git a/static/img/jt.png b/static/img/jt.png
new file mode 100644
index 0000000..e82b724
Binary files /dev/null and b/static/img/jt.png differ
diff --git a/static/img/pas.png b/static/img/pas.png
new file mode 100644
index 0000000..43896a8
Binary files /dev/null and b/static/img/pas.png differ
diff --git a/uni.scss b/uni.scss
index 0354739..eec6a33 100644
--- a/uni.scss
+++ b/uni.scss
@@ -275,6 +275,10 @@ $uni-font-size-paragraph:30upx;
width: 94%;
margin-left: 3%;
}
+.width92 {
+ width: 92%;
+ margin-left: 4%;
+}
.width80 {
@@ -343,6 +347,9 @@ $uni-font-size-paragraph:30upx;
}
/* 高40px */
+.height40p {
+ height: 40px;
+}
.height45 {
height: 45px;
}
@@ -365,6 +372,12 @@ $uni-font-size-paragraph:30upx;
height: 60px;
}
+.height80 {
+ height: 80px;
+}
+
+
+
.height90 {
height: 90px;
}
@@ -617,6 +630,11 @@ $uni-font-size-paragraph:30upx;
display: flex;
}
+.alijun{
+ justify-content: flex-end;
+ display: flex;
+}
+
.font12{
font-size: 12px;
}
\ No newline at end of file