1.修改页面样式

2.新增修改密码,设置密码
yj-dev
杨杰 3 years ago
parent 79b6dd46cd
commit 2291551734
  1. 14
      Utils/Api.js
  2. 224
      components/sanshui-modal/index.vue
  3. 639
      components/sanshui-payment-password/index.vue
  4. 2
      components/wyb-popup/wyb-popup.vue
  5. 25
      pages.json
  6. 66
      pages/goods/coupon-details/coupon-details.vue
  7. 4
      pages/goods/goods-list/goods-list.vue
  8. 228
      pages/goods/goods.vue
  9. 2
      pages/goods/recording/recording.vue
  10. 28
      pages/goods/refuel/refuel.vue
  11. 222
      pages/goods/store-list/store-details.vue
  12. 103
      pages/login/updatePas/resetPas.vue
  13. 90
      pages/login/updatePas/updatePas.vue
  14. 693
      pages/order/confirmation.vue
  15. 145
      pages/pay/payment/payment.vue
  16. 73
      pages/pay/success/success.vue
  17. 10
      pages/tabBar/home/home.vue
  18. 30
      pages/tabBar/user/user.vue
  19. 6
      pages/user/coupon/coupon.vue
  20. 6
      pages/user/mineCoupons/mineCoupons.vue
  21. 4
      pages/user/mineCouponsDestails/mineCouponsDestails.vue
  22. 54
      pages/user/order_details/order_details.vue
  23. 45
      pages/user/order_list/order_list.vue
  24. BIN
      static/img/jt.png
  25. BIN
      static/img/pas.png
  26. 18
      uni.scss

@ -17,7 +17,15 @@ export const GetPhoneNumber = params => {
//获取用户授权信息 //获取用户授权信息
export const getUserInfo = params => { export const getUserInfo = params => {
return POST('GET', `${base}/wechat/getUserInfo`, params).then(res => res.data); 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 => { export const findUser = params => {
@ -59,11 +67,11 @@ export const addOrder = params => {
export const orderToPay = params => { export const orderToPay = params => {
return POST('POST', `${base}/order/orderToPay`, params).then(res => res.data); return POST('POST', `${base}/order/orderToPay`, params).then(res => res.data);
} }
//金币支付 //积分支付
export const orderToGoldPay = params => { export const orderToGoldPay = params => {
return POST('POST', `${base}/order/orderToGoldPay`, params).then(res => res.data); return POST('POST', `${base}/order/orderToGoldPay`, params).then(res => res.data);
} }
//查询用户金币使用情况 //查询用户积分使用情况
export const getUserGoldRecList = params => { export const getUserGoldRecList = params => {
return POST('GET', `${base}/highGoldRec/getUserGoldRecList`, params).then(res => res.data); return POST('GET', `${base}/highGoldRec/getUserGoldRecList`, params).then(res => res.data);
} }

@ -0,0 +1,224 @@
<template>
<view class="ss-modal-body" :class="{'ss-modal-active' : animation, 'ss-modal-H5Top': _H5Top, 'ss-modal-H5Bottom': _H5Bottom}" :data-platform="platform">
<view class="ss-modal" :class="'ss-modal-' + position +' ' + 'ss-modal-' + mode">
<slot></slot>
</view>
<view v-if="_mask" class="uni-mask" @touchmove.stop.prevent="moveHandle" catchtouchmove="true" @click.stop="hide()"></view>
</view>
</template>
<script>
const systemInfo = uni.getSystemInfoSync();
export default {
data () {
return {
animation: false,
platform: systemInfo.platform
}
},
props: {
/*
* 参数说明定位
*/
position: {// top left right bottom middle
type: String,
default: 'middle'
},
/*
* 参数说明
* full 宽度100%
* insert 80%宽度内联小框
* cover 宽度高度100%
*/
mode: {
type: String,
default: 'full'
},
mask: {
type: [Boolean, String],
default: true
},
/*
* H5置顶
*/
H5Top: {
type: [Boolean, String],
default: true
},
/*
* H5置底
*/
H5Bottom: {
type: [Boolean, String],
default: true
},
},
computed: {
_mask() {
return String(this.mask) === 'false' ? false : true;
},
_H5Top() {
return String(this.H5Top) === 'false' ? false : true;
},
_H5Bottom() {
return String(this.H5Bottom) === 'false' ? false : true;
}
},
watch: {
animation(val) {
this.$emit('change', val);
}
},
methods: {
moveHandle() {
return ;
},
show () {
this.animation = true;
return true;
},
hide () {
this.animation = false;
return false;
},
toggle () {
return !this.animation ? this.show() : this.hide()
}
}
}
</script>
<style lang="scss">
//
.ss-modal-body{
box-sizing: border-box;
opacity: 0;
position: fixed;
top: 44px;
bottom: 50px;
left: 0;
width: 100%;
pointer-events: none;
transform: translateX(0);
transition: all .2s linear;
z-index: 98;
&.ss-modal-active{
pointer-events: auto;
opacity: 1;
}
}
/* #ifdef H5 */
.ss-modal-body.ss-modal-H5Top{
top: 0;
z-index: 999;
}
.ss-modal-body.ss-modal-H5Bottom{
bottom: 0;
z-index: 999;
}
/* #endif */
.ss-modal-body .uni-mask{
z-index: 1;
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0,0,0,.6);
}
.ss-modal{
position: fixed;
z-index: 2;
transition: inherit;
/deep/ .gmy-float-touch{
display: none;
}
}
.ss-modal-middle{
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.ss-modal-cover{
width: 100%;
// width: 100vw;
width: calc(100% + 3px);
// width: calc(100vw + 2px);//translate
height: 100%;
// height: 100vw;
height: calc(100% + 3px);
// height: calc(100vh + 2px);//translate
left: 0;
top: 0;
transform: translate(100%, 0);
}
.ss-modal-top{
left: 50%;
z-index: 98;
width: 100%;
height: auto;
transform: translate(-50%, -100%);
& + .uni-mask{
z-index: 97;
}
}
.ss-modal-full{
width: 100%;
width: calc(100% + 3px);//translate
left: 0;
transform: translate(0, -100%);
}
.ss-modal-full.ss-modal-top{
transform: translate(0, -200%);
}
.ss-modal-full.ss-modal-bottom{
transform: translate(0, 100%);
transition: inherit;
}
.ss-modal-right{
right: 0;
max-width: 80%;
}
.ss-modal-left{
left: 0;
max-width: 80%;
}
.ss-modal-middle.ss-modal-insert {
min-width: 380rpx;
min-height: 380rpx;
max-width: 102%;
max-height: 80%;
transform: translate(-50%, -50%);
background: none;
box-shadow: none;
}
.ss-modal-body{
opacity: 0;
pointer-events: none;
}
.ss-modal-active{
opacity: 1;
pointer-events: auto;
.ss-modal-top{
top: 44px;
transform: translate(-50%, 0);
}
.ss-modal-full{
transform: translate(0, -50%);
}
.ss-modal-full.ss-modal-top{
transform: translate(0, 0);
}
.ss-modal-bottom{
transform: translate(0, 0);
}
.ss-modal-cover{
transform: translate(0, 0);
}
}
.ss-modal-bottom{
bottom: 0;
}
</style>

File diff suppressed because one or more lines are too long

@ -147,7 +147,7 @@
if (this.type === 'left' || this.type === 'right') { if (this.type === 'left' || this.type === 'right') {
return '100%' return '100%'
} else { } else {
return 'auto' return '400px'
} }
} }
} }

@ -175,6 +175,7 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",
"navigationBarTitleText": "详情",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"onReachBottomDistance": 50, "onReachBottomDistance": 50,
"h5": { "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": { "globalStyle": {

@ -2,34 +2,60 @@
<view> <view>
<view class="backcorf06 height100p"></view> <view class="backcorf06 height100p"></view>
<view class="backcorfff backgrd width90 couhead"> <view class="backcorfff backgrd width90 couhead">
<image class="couimg flleft" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image> <image class="couimg flleft" mode="widthFix" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image>
<view class="couhedcout"> <view class="couhedcout">
<view class="height40 width100"> <view class="height40 width100">
<view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 2">已使用</view> <view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 2">已使用</view>
<view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 1">未使用</view> <view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 1">未使用</view>
<view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 0">已过期</view> <view class="couStu flright fotct mart10" v-if="couponDesInfo.highUserCoupon.status == 0">已过期</view>
</view> </view>
<view class="fontwig6 font16 fcor333 mart5">{{couponDesInfo.couponInfo.couponName}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="oneTime">领取时间:{{oneTime | formatDate('-')}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="twoTime">使用有效期:{{twoTime | formatDate('-')}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="threeTime">消费时间:{{threeTime | formatDate('-')}}</view>
</view> </view>
<view class="fontwig6 font16 fcor333 mart5">{{couponDesInfo.couponInfo.couponName}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="oneTime">领取时间:{{oneTime | formatDate('-')}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="twoTime">使用有效期:{{twoTime | formatDate('-')}}</view>
<view class="fontwig6 font13 fcor999 mart5" v-if="threeTime">消费时间:{{threeTime | formatDate('-')}}</view>
</view> </view>
<view class="width90 backcorfff mart60 qrcs"> <view class="width90 backcorfff mart60 qrcs">
<view class="mart20 fotct fcorred font15 marb20 height20" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="width100" v-if="couponDesInfo.couponInfo.couponSource == 4">
<view class="mart20 width90 font18 fcor333 fontwig6">
使用流程
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">1:</view>
<view style="margin-left: 5%;">客户使用积分兑换或者工会卡购买</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">2:</view>
<view style="margin-left: 5%;">兑换成功后中石化给客户发送一张同等面额的码商券保存在加油中石化APP中</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">3:</view>
<view style="margin-left: 5%;">客户登录加油中石化APP查看码商券详情</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">4:</view>
<view style="margin-left: 5%;">客户选择中石化任意加油站加油加完油后在加油中石化APP中查看订单选择支付支付时选择码商券抵用支付完成即可</view>
</view>
</view>
<view class="mart20 fotct fcorred font15 marb20 height20"
v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
请出示核销码(商户扫客户)</view> 请出示核销码(商户扫客户)</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0"> <view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view> </view>
<view class="fotct fcor333 font15 marb10 mart10">{{couponDesInfo.couponCodeInfo.codeKey}}</view> <view class="fotct fcor333 font15 marb10 mart10" v-if="couponDesInfo.couponInfo.couponSource != 4">{{couponDesInfo.couponCodeInfo.codeKey}}</view>
</view> </view>
<view class="width90 mart10 googscs backcorfff"> <view class="width90 mart10 googscs backcorfff" v-if="couponDesInfo.couponInfo.couponSource != 4">
<view class="width90 height45l font18 fcor666">门店信息</view> <view class="width90 height45l font18 fcor666 aliitem">
<image mode="widthFix" style="width: 50rpx; max-height: 50rpx;margin-right: 10px;"
src="../../../static/img/adresw.png"></image> 门店信息
</view>
<view class="line1 width100"></view> <view class="line1 width100"></view>
<view class="width90 stoCont" v-for="(store,i) in storeList" :key="i"> <view class="width90 stoCont" v-for="(store,i) in storeList" :key="i">
<view class="width80p flleft mart10"> <view class="width80p flleft mart10">
<view class="font16 fcor333 fontwig6 ">{{store.storeName}}</view> <view class="font16 fcor333 fontwig6 ">{{store.storeName}}</view>
<view class="font13 fcor666 mart5">{{store.address}}</view> <view class="font13 fcor666 mart10">{{store.address}}</view>
</view> </view>
<view class="width20 flright mart10 fotrt" @click="seeloaction(store)"> <view class="width20 flright mart10 fotrt" @click="seeloaction(store)">
<image mode="widthFix" style="width: 25px;height: 25px;" :src="imagewxUrl+imgadres1"> <image mode="widthFix" style="width: 25px;height: 25px;" :src="imagewxUrl+imgadres1">
@ -39,8 +65,8 @@
</view> </view>
</view> </view>
<view class="height60"></view> <view class="height60"></view>
<button class="czlq width100" v-if="couponDesInfo.highUserCoupon.status == 0" <!-- <button class="czlq width100" v-if="couponDesInfo.highUserCoupon.status == 0"
@click="againReceiveCoupon">重新领取</button> @click="againReceiveCoupon">重新领取</button> -->
</view> </view>
</template> </template>
@ -71,7 +97,6 @@
this.couDesId = option.id; this.couDesId = option.id;
this.menddesId = option.mendId; this.menddesId = option.mendId;
this.getUserCouponDetail(); this.getUserCouponDetail();
this.getStoreListByCoupon();
}, },
filters: { filters: {
// //
@ -106,10 +131,17 @@
getUserCouponDetail(params).then(res => { getUserCouponDetail(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponDesInfo = res.return_data; 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.oneTime = res.return_data.highUserCoupon.createTime;
this.twoTime = res.return_data.highUserCoupon.useEndTime; this.twoTime = res.return_data.highUserCoupon.useEndTime;
this.threeTime = res.return_data.highUserCoupon.consumeTime; this.threeTime = res.return_data.highUserCoupon.consumeTime;
uni.hideLoading()
} else { } else {
uni.hideLoading() uni.hideLoading()
} }
@ -209,7 +241,7 @@
} }
.couhedcout { .couhedcout {
margin-left: 200rpx; margin-left: 210rpx;
} }
.couStu { .couStu {
@ -235,7 +267,7 @@
.stoCont { .stoCont {
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
height: 170rpx; height: 160rpx;
} }
.loading-text { .loading-text {

@ -23,7 +23,7 @@
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="width90 height110 mart5" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)"> <view class="width90 height110 mart5" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)">
<image class="goodsimg flleft mart5" :src="imageUrl+row.couponImg"></image> <image class="goodsimg flleft mart5" mode="widthFix" :src="imageUrl+row.couponImg"></image>
<view class="goodsli "> <view class="goodsli ">
<view class="text2 fcor333 font14 fontwig6">{{row.couponName}}</view> <view class="text2 fcor333 font14 fontwig6">{{row.couponName}}</view>
<view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view> <view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view>
@ -93,7 +93,7 @@
} }
if (option.id == 2) { if (option.id == 2) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '金币列表' title: '积分列表'
}); });
} }
this.getCouponListArea(); this.getCouponListArea();

File diff suppressed because one or more lines are too long

@ -8,7 +8,7 @@
<view class="width90" v-for="recod in recordInfo" :key="recod.id"> <view class="width90" v-for="recod in recordInfo" :key="recod.id">
<view class="width100 font15 height20 mart10"> <view class="width100 font15 height20 mart10">
<view class="flleft width50 fcor666"> <view class="flleft width50 fcor666">
金币充值 积分充值
</view> </view>
<view class="flright width50 fotrt fcorred" v-if="typeId == 1"> <view class="flright width50 fotrt fcorred" v-if="typeId == 1">
+{{recod.gold}} +{{recod.gold}}

@ -104,34 +104,6 @@
imgadres2:'xiala.png', imgadres2:'xiala.png',
imgadres3:'noorder.png', imgadres3:'noorder.png',
menuList: [ menuList: [
// {
// 'title': '',
// 'key': 'single',
// 'isMutiple': false,
// 'detailTitle': '',
// 'reflexTitle': true,
// 'defaultSelectedIndex': 0,
// 'detailList': [{
// 'title': '',
// 'value': ''
// }, {
// 'title': '',
// 'value': ''
// }, {
// 'title': '',
// 'value': ''
// }, {
// 'title': '',
// 'value': ''
// }, {
// 'title': '',
// 'value': ''
// },
// ]
// },
{ {
'title': '油号', 'title': '油号',
'key': 'single2', 'key': 'single2',

File diff suppressed because one or more lines are too long

@ -0,0 +1,103 @@
<template>
<view>
<view class="logo">
<view class="img">
<image mode="widthFix" src="../../../static/img/logo2.jpg">
</image>
</view>
</view>
<!-- 账号密码输入框 -->
<view class="form">
<view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入旧密码" type="number" maxlength="6" v-model="jpasswd" password=true placeholder-style="color: #333333;" />
</view>
<view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入新密码" type="number" maxlength="6" v-model="xpasswd" password=true placeholder-style="color: #333333;" />
</view>
<view class="btn mart50" @tap="updateUserPayPwd"> </view>
</view>
</view>
</template>
<script>
import {
updateUserPayPwd
} from "../../../Utils/Api.js";
let app =getApp();
export default {
data() {
return {
jpasswd: '',
xpasswd: '',
}
},
methods: {
updateUserPayPwd() {
uni.hideKeyboard();
if (this.jpasswd == '') {
uni.showToast({
title: '请填写旧密码',
icon: "none"
});
return false;
}
if (this.xpasswd == '') {
uni.showToast({
title: '请填写新密码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '设置中...'
})
let datas = {
"password": this.jpasswd,
"newPassword":this.xpasswd
}
updateUserPayPwd(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: '修改成功',
icon: "none",
duration:2000
});
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.navigateBack({
})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss">
@import "../../../static/css/login.scss";
.form {
.res {
display: flex;
justify-content: space-between;
align-items: center;
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
</style>

@ -0,0 +1,90 @@
<template>
<view>
<view class="logo">
<view class="img">
<image mode="widthFix" src="../../../static/img/logo2.jpg">
</image>
</view>
</view>
<!-- 账号密码输入框 -->
<view class="form">
<view class="password">
<image src="../../../static/img/pas.png" style="width: 40rpx;height: 40rpx;"></image><input
placeholder="请输入密码" type="number" maxlength="6" v-model="passwd" password=true placeholder-style="color: #333333;" />
</view>
<view class="btn mart50" @tap="setUserPayPwd"> </view>
</view>
</view>
</template>
<script>
import {
setUserPayPwd
} from "../../../Utils/Api.js";
let app =getApp();
export default {
data() {
return {
passwd: '',
}
},
methods: {
setUserPayPwd() {
uni.hideKeyboard();
if (this.passwd == '') {
uni.showToast({
title: '请填写密码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '设置中...'
})
let datas = {
"password": this.passwd
}
setUserPayPwd(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: '设置成功',
icon: "none",
duration:2000
});
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.navigateBack({
})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss">
@import "../../../static/css/login.scss";
.form {
.res {
display: flex;
justify-content: space-between;
align-items: center;
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
</style>

File diff suppressed because one or more lines are too long

@ -3,15 +3,11 @@
<view class="block"> <view class="block">
<view class="content"> <view class="content">
<view class="orderinfo"> <view class="orderinfo">
<!-- <view class="row">
<view class="nominal">订单名称:</view>
<view class="text">{{orderName}}</view>
</view> -->
<view class="row"> <view class="row">
<view class="nominal">订单金额:</view> <view class="nominal">订单金额:</view>
<view class="text" v-if="pryType == 1">{{amount}} </view> <view class="text" v-if="pryType == 1">{{amount}} </view>
<view class="text" v-if="pryType == 2">{{amount*100}} 金币 (当前金币:{{user.gold}})</view> <view class="text" v-if="pryType == 2">{{amount*100}} 个积分 (当前积分:{{user.gold}})</view>
<view class="text" v-if="pryType == 3">{{amount}}(当前金币:{{user.gold}})</view> <view class="text" v-if="pryType == 3">{{amount}}(当前积分:{{user.gold}})</view>
</view> </view>
</view> </view>
</view> </view>
@ -29,7 +25,7 @@
</image> </image>
</view> </view>
<view class="center"> <view class="center">
金币支付 积分支付
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
@ -57,6 +53,8 @@
</view> </view>
</view> </view>
</view> </view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
</view> </view>
</template> </template>
@ -65,23 +63,27 @@
orderToPay, orderToPay,
orderToGoldPay orderToGoldPay
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
// #ifdef H5 // #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
// #endif // #endif
export default { export default {
components: {
ssPaymentPassword
},
data() { data() {
return { return {
amount: 0, amount: 0,
orderName: '',
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres:'wxpay.png', imgadres: 'wxpay.png',
pryType: '', pryType: '',
paytype: '', // paytype: '', //
orderNo: '', orderNo: '',
user: '', user: '',
couponId: '', couponId: '',
jumpType:'' jumpType: '',
PaymentPassword: ''
}; };
}, },
onLoad(e) { onLoad(e) {
@ -98,26 +100,13 @@
this.paytype = '' this.paytype = ''
} }
this.amount = parseFloat(e.amount).toFixed(2); 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: { methods: {
// //
orderToPay() { orderToPay() {
let that = this; let that = this;
if (that.paytype == 'wxpay') { if (that.paytype == 'wxpay') {
let params = { let params = {
"orderId": that.orderNo, "orderId": that.orderNo,
"openId": app.globalData.openId, "openId": app.globalData.openId,
@ -141,7 +130,7 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
if(that.jumpType == 4){ if (that.jumpType == 4) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/tabBar/user/user' url: '/pages/tabBar/user/user'
}); });
@ -171,43 +160,13 @@
} }
}) })
} else if (that.paytype == 'jinbi') { } else if (that.paytype == 'jinbi') {
uni.showModal({ if(!that.user.isSetPayPwd){
title: '金币支付', uni.navigateTo({
content: '确认是否用金币支付?', url: '../../login/updatePas/updatePas'
success: (res) => { })
if (res.confirm) { return;
uni.showLoading({ }
title: '支付中...' that.$refs.paymentPassword.modalFun('show');
})
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) {}
}
});
} else { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', 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) { payRequest: function(self) {
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
@ -232,16 +231,16 @@
jweixin.ready(function() { jweixin.ready(function() {
jweixin.checkJsApi({ jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2, jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) { success: function(res) {},
}, fail: function(res) {}
fail: function(res) {
}
}); });
jweixin.chooseWXPay({ jweixin.chooseWXPay({
appId: self.return_data.appId, appId: self.return_data.appId,
timestamp: self.return_data.timeStamp, // jssdk使timestamp使timeStampS timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32 nonceStr: self.return_data.nonceStr, // 32
package: self.return_data.package, // prepay_idprepay_id=*** package: self.return_data
.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5' signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, // paySign: self.return_data.sign, //
success: function(res) { success: function(res) {
@ -249,7 +248,7 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
if(that.jumpType == 4){ if (that.jumpType == 4) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/tabBar/user/user' url: '/pages/tabBar/user/user'
}); });
@ -259,10 +258,8 @@
url: '../success/success?id=' + that.couponId url: '../success/success?id=' + that.couponId
}); });
}, },
cancel: function(r) { cancel: function(r) {},
}, fail: function(res) {}
fail: function(res) {
}
}); });
}); });
@ -390,4 +387,4 @@
} }
} }
} }
</style> </style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -16,8 +16,8 @@
<view class="right"> <view class="right">
<view class="username" v-if="!user.name">请授权登录</view> <view class="username" v-if="!user.name">请授权登录</view>
<view class="username" v-else>{{user.name}}</view> <view class="username" v-else>{{user.name}}</view>
<view class="font14 fcorfff" v-if="!user.gold">金币: 0</view> <view class="font14 fcorfff" v-if="!user.gold">积分: 0</view>
<view class="font14 fcorfff" v-else>金币: {{user.gold}} </view> <view class="font14 fcorfff" v-else>积分: {{user.gold}} </view>
<!-- <view class="signature" @tap="toSetting">{{user.signature}}</view> --> <!-- <view class="signature" @tap="toSetting">{{user.signature}}</view> -->
</view> </view>
<!-- 二维码按钮 --> <!-- 二维码按钮 -->
@ -99,6 +99,18 @@
</view> </view>
</view> </view>
</view> </view>
<view class="toolbar" style="margin-top: 20px;">
<view class="title">我的操作</view>
<view class="list">
<view class="box" v-for="(row,index) in czList" :key="index" @tap="toPage(row.url,row.text)">
<view class="img">
<image :src="row.img"></image>
</view>
<view class="text">{{row.text}}</view>
</view>
</view>
</view>
<!-- 占位 --> <!-- 占位 -->
<view class="place-bottom"></view> <view class="place-bottom"></view>
<authorize></authorize> <authorize></authorize>
@ -195,7 +207,19 @@
// text: '', // text: '',
// img: 'user/bank.png' // 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 //page.json "enablePullDownRefresh": true

@ -12,7 +12,7 @@
<view class="tis" v-if="couponValidList.length==0"> <view class="tis" v-if="couponValidList.length==0">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="row" v-for="(row,index) in couponValidList" :key="index"> <view class="row" v-for="(row,index) in couponValidList" :key="index" @click="jumpcoupons(row.id)">
<!-- 删除按钮 --> <!-- 删除按钮 -->
<view class="menu" @tap.stop="deleteCoupon(row.id,couponValidList)"> <view class="menu" @tap.stop="deleteCoupon(row.id,couponValidList)">
<view class="icon shanchu"></view> <view class="icon shanchu"></view>
@ -24,7 +24,7 @@
{{row.highDiscount.discountName}} {{row.highDiscount.discountName}}
</view> </view>
<view class="term"> <view class="term">
截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}} 截止时间:{{row.useEndTime | formatDate('-')}}
</view> </view>
<view class="gap-top"></view> <view class="gap-top"></view>
<view class="gap-bottom"></view> <view class="gap-bottom"></view>
@ -41,7 +41,7 @@
<view class="criteria"> <view class="criteria">
{{row.highDiscount.discountName}} {{row.highDiscount.discountName}}
</view> </view>
<view class="use" @click="jumpcoupons(row.id)"> <view class="use" >
去使用 去使用
</view> </view>
</view> </view>

@ -13,7 +13,7 @@
<view class="product-list mart20" v-for="product in productList" :key="product.id" <view class="product-list mart20" v-for="product in productList" :key="product.id"
@click="jumpMineCou(product.id,product.highCouponModel.id)"> @click="jumpMineCou(product.id,product.highCouponModel.id)">
<image mode="widthFix" class="headimg mart5 flleft" :src="imageUrl+product.highCouponModel.couponImg"> <image mode="widthFix" class="headimg mart10 flleft" :src="imageUrl+product.highCouponModel.couponImg">
</image> </image>
<view class="headconts paddtright10"> <view class="headconts paddtright10">
<view class="headtitle paddtop15 font18 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }} <view class="headtitle paddtop15 font18 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }}
@ -85,7 +85,7 @@
h = h >= 10 ? h : "0" + h; h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm; mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s; s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`; return `${year}${spe}${month}${spe}${day}`;
} }
}, },
onLoad() { onLoad() {
@ -218,7 +218,7 @@
} }
.headconts { .headconts {
margin-left: 210rpx; margin-left: 220rpx;
} }
.info { .info {

@ -7,7 +7,7 @@
<view class="coupon-mes mart10" style="margin-right: 90px;"> <view class="coupon-mes mart10" style="margin-right: 90px;">
<view class="fcor333 fontwig6 font24 width100 text2">{{couponsDetails.highDiscount.discountName}}</view> <view class="fcor333 fontwig6 font24 width100 text2">{{couponsDetails.highDiscount.discountName}}</view>
<view class="fcor666 font13 width100 mart5"> <view class="fcor666 font13 width100 mart5">
活动截止时间:{{salesEndTime | formatDate('-')}}</view> 使用截止时间:{{salesEndTime | formatDate('-')}}</view>
</view> </view>
<view class="fcor666 font13 width100 mart5"> <view class="fcor666 font13 width100 mart5">
领取有效期:{{couponsDetails.highDiscount.effectiveDay}} 领取有效期:{{couponsDetails.highDiscount.effectiveDay}}
@ -100,7 +100,7 @@
getDiscountByUserDiscountId(params).then(res => { getDiscountByUserDiscountId(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponsDetails = res.return_data; 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); this.getCouponByDiscount(res.return_data.highDiscount.id);
} }
}) })

@ -66,7 +66,7 @@
支付模式 : 支付模式 :
</view> </view>
<view class="right" v-if="recinfo.payModel == 1"> <view class="right" v-if="recinfo.payModel == 1">
金币 积分
</view> </view>
<view class="right" v-if="recinfo.payModel == 2"> <view class="right" v-if="recinfo.payModel == 2">
第三方平台 第三方平台
@ -87,7 +87,7 @@
微信 微信
</view> </view>
<view class="right" v-if="recinfo.payType == 3"> <view class="right" v-if="recinfo.payType == 3">
金币 积分
</view> </view>
</view> </view>
<view class="row" v-if="recinfo.totalPrice"> <view class="row" v-if="recinfo.totalPrice">
@ -183,33 +183,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 明细 -->
<!-- <view class="detail">
<view class="row">
<view class="nominal">
商品金额
</view>
<view class="content">
200 && 200个金币
</view>
</view>
<view class="row">
<view class="nominal">
运费
</view>
<view class="content">
+{{freight|toFixed}}
</view>
</view>
<view class="row">
<view class="nominal">
积分抵扣
</view>
<view class="content">
-{{deduction|toFixed}}
</view>
</view>
</view> -->
<view class="width100 height60"></view> <view class="width100 height60"></view>
<view class="footer" <view class="footer"
v-if="recinfo.orderStatus == 1 && recinfo.highChildOrderList[0].goodsType !=6 && recinfo.highChildOrderList[0].goodsType !=5 && recinfo.highChildOrderList[0].goodsType !=4"> v-if="recinfo.orderStatus == 1 && recinfo.highChildOrderList[0].goodsType !=6 && recinfo.highChildOrderList[0].goodsType !=5 && recinfo.highChildOrderList[0].goodsType !=4">
@ -255,29 +228,6 @@
}, },
onShow() { onShow() {
// //
// uni.getStorage({
// key: 'buylist',
// success: (ret) => {
// this.buylist = ret.data;
// this.goodsPrice = 0;
// //
// let len = this.buylist.length;
// for (let i = 0; i < len; i++) {
// this.goodsPrice = this.goodsPrice + (this.buylist[i].number * this.buylist[i].price);
// }
// this.deduction = this.int / 100;
// this.sumPrice = this.goodsPrice - this.deduction + this.freight;
// }
// });
// uni.getStorage({
// key: 'selectAddress',
// success: (e) => {
// this.recinfo = e.data;
// uni.removeStorage({
// key: 'selectAddress'
// })
// }
// })
this.getOrderById(); this.getOrderById();
}, },
onHide() { onHide() {

@ -38,7 +38,7 @@
</view> </view>
<view class="zspec" v-if="row.highChildOrderList[0].goodsType == 1">卡券订单</view> <view class="zspec" v-if="row.highChildOrderList[0].goodsType == 1">卡券订单</view>
<view class="zspec" v-if="row.highChildOrderList[0].goodsType == 3">加油缴费</view> <view class="zspec" v-if="row.highChildOrderList[0].goodsType == 3">加油缴费</view>
<view class="zspec" v-if="row.highChildOrderList[0].goodsType == 2">金币订单</view> <view class="zspec" v-if="row.highChildOrderList[0].goodsType == 2">积分订单</view>
</view> </view>
</view> --> </view> -->
<!-- <view class="detail"> <!-- <view class="detail">
@ -53,20 +53,28 @@
</view> </view>
</view> --> </view> -->
<view class="width96 height40" @click="jumpDetails(row.id)"> <view class="width96 height40" @click="jumpDetails(row.id)">
<view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 1"> <view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 1 || row.highChildOrderList[0].goodsType == 2">
<image src="../../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order2.png" style="width: 50rpx;height: 50rpx;"></image>
卡券订单 卡券订单
</view> </view>
<view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 3"> <view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 3">
<image src="../../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order4.png" style="width: 50rpx;height: 50rpx;"></image>
加油缴费 团油订单
</view>
<view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 5">
<image src="../../../static/img/order5.png" style="width: 50rpx;height: 50rpx;"></image>
电影票
</view>
<view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 4">
<image src="../../../static/img/order3.png" style="width: 50rpx;height: 50rpx;"></image>
KFC
</view> </view>
<view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 2"> <view class="width50 flleft aliitem fotlt font16" v-if="row.highChildOrderList[0].goodsType == 6">
<image src="../../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image> <image src="../../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image>
金币订单 话费充值
</view> </view>
<view class="width50 flright fotrt fcor666 font15"> <view class="width50 flright fotrt fcor666 font15">
06-13 12: 11(待改) {{row.createTime | formatDate('-')}}
</view> </view>
</view> </view>
<view class="width96 line1 mart10"></view> <view class="width96 line1 mart10"></view>
@ -162,6 +170,27 @@
onReachBottom() { onReachBottom() {
this.getUserOrderList(); 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: { watch: {
//reFresh, //reFresh,
reFresh: function() { reFresh: function() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -275,6 +275,10 @@ $uni-font-size-paragraph:30upx;
width: 94%; width: 94%;
margin-left: 3%; margin-left: 3%;
} }
.width92 {
width: 92%;
margin-left: 4%;
}
.width80 { .width80 {
@ -343,6 +347,9 @@ $uni-font-size-paragraph:30upx;
} }
/* 高40px */ /* 高40px */
.height40p {
height: 40px;
}
.height45 { .height45 {
height: 45px; height: 45px;
} }
@ -365,6 +372,12 @@ $uni-font-size-paragraph:30upx;
height: 60px; height: 60px;
} }
.height80 {
height: 80px;
}
.height90 { .height90 {
height: 90px; height: 90px;
} }
@ -617,6 +630,11 @@ $uni-font-size-paragraph:30upx;
display: flex; display: flex;
} }
.alijun{
justify-content: flex-end;
display: flex;
}
.font12{ .font12{
font-size: 12px; font-size: 12px;
} }
Loading…
Cancel
Save