1.上线2.0 解决问题

修改问题
yj-dev
杨杰 2 years ago
parent 20306a115e
commit effba458ef
  1. 63
      App.vue
  2. 12
      pages/user/coupon/coupon.vue
  3. 8
      pages/user/order_details/order_details.vue
  4. 233
      qianzhu-KFC/payment-method/payment-method.vue

@ -14,14 +14,14 @@
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
// imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/', // imageqrImg: 'https://hsg.dctpay.com/filesystem/temporary/',
// //
url: 'https://hsgcs.dctpay.com/crest', url: '',
v1url: 'https://hsgcs.dctpay.com/v1', v1url: '',
orderurl:'https://hsgcs.dctpay.com/order', orderurl: '',
userurl:'https://hsgcs.dctpay.com/user', userurl: '',
brestUrl: 'https://hsgcs.dctpay.com/brest', brestUrl: '',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: '',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg: '',
imageqrImg: 'https://hsgcs.dctpay.com/filesystem/temporary/', imageqrImg: '',
userInfo: "", userInfo: "",
brestUserInfo: '', brestUserInfo: '',
bresthighAgent: '', bresthighAgent: '',
@ -66,10 +66,52 @@
pelletoilList: '' pelletoilList: ''
}, },
onLaunch: function() {}, onLaunch: function() {
},
onShow: function() { onShow: function() {
// #ifdef MP
let accountInfo = uni.getAccountInfoSync();
if (accountInfo.miniProgram.envVersion == 'develop' || accountInfo.miniProgram.envVersion == 'trial') {
this.globalData.url = 'https://hsgcs.dctpay.com/crest';
this.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
this.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
this.globalData.userurl = 'https://hsgcs.dctpay.com/user';
this.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
this.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
this.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
this.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
}
if (accountInfo.miniProgram.envVersion == 'release') {
this.globalData.url = 'https://hsg.dctpay.com/crest';
this.globalData.v1url = 'https://hsg.dctpay.com/v1';
this.globalData.orderurl = 'https://hsg.dctpay.com/order';
this.globalData.userurl = 'https://hsg.dctpay.com/user';
this.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
this.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
this.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
this.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
}
// #endif
// #ifdef H5 // #ifdef H5
let that = this; let that = this;
// that.globalData.url = 'https://hsgcs.dctpay.com/crest';
// that.globalData.v1url = 'https://hsgcs.dctpay.com/v1';
// that.globalData.orderurl = 'https://hsgcs.dctpay.com/order';
// that.globalData.userurl = 'https://hsgcs.dctpay.com/user';
// that.globalData.brestUrl = 'https://hsgcs.dctpay.com/brest';
// that.globalData.imgUrl = 'https://hsgcs.dctpay.com/filesystem/';
// that.globalData.imageWxImg = 'https://hsgcs.dctpay.com/filesystem/wxApplets/';
// that.globalData.imageqrImg = 'https://hsgcs.dctpay.com/filesystem/temporary/';
that.globalData.url = 'https://hsg.dctpay.com/crest';
that.globalData.v1url = 'https://hsg.dctpay.com/v1';
that.globalData.orderurl = 'https://hsg.dctpay.com/order';
that.globalData.userurl = 'https://hsg.dctpay.com/user';
that.globalData.brestUrl = 'https://hsg.dctpay.com/brest';
that.globalData.imgUrl = 'https://hsg.dctpay.com/filesystem/';
that.globalData.imageWxImg = 'https://hsg.dctpay.com/filesystem/wxApplets/';
that.globalData.imageqrImg = 'https://hsg.dctpay.com/filesystem/temporary/';
uni.getStorage({ uni.getStorage({
key: 'openId', key: 'openId',
success(e) { success(e) {
@ -184,7 +226,8 @@
}) })
// #endif // #endif
}, },
onHide: function() {} onHide: function() {
}
} }
</script> </script>

@ -417,29 +417,29 @@
}, },
// //
jumpcoupons(e) { jumpcoupons(e) {
if (e.useScope == 3) { if (e.discountUseScope == 3) {
uni.navigateTo({ uni.navigateTo({
url: '../../../subPages/recharge/recharge' url: '../../../subPages/recharge/recharge'
}) })
} else if (e.useScope == 4) { } else if (e.discountUseScope == 4) {
app.globalData.distinguishid = 1; app.globalData.distinguishid = 1;
uni.navigateTo({ uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order' url: '/qianzhu-KFC/buffet-order/buffet-order'
}) })
} else if (e.useScope == 5) { } else if (e.discountUseScope == 5) {
app.globalData.distinguishid = 2; app.globalData.distinguishid = 2;
uni.navigateTo({ uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order' url: '/qianzhu-KFC/buffet-order/buffet-order'
}) })
} else if (e.useScope == 6) { } else if (e.discountUseScope == 6) {
uni.navigateTo({ uni.navigateTo({
url: '/member-Recharge/choicepage/choicepage' url: '/member-Recharge/choicepage/choicepage'
}) })
} else if (e.useScope == 7) { } else if (e.discountUseScope == 7) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/goods/refuel/refuel' url: '/pages/goods/refuel/refuel'
}) })
} else if (e.usingRange == 5) { } else if (e.discountUseScope == 5) {
this.useDiscount(e.discountAgentCodeId); this.useDiscount(e.discountAgentCodeId);
} else { } else {
uni.navigateTo({ uni.navigateTo({

@ -7,7 +7,8 @@
{{countdownm}}:{{countdowns}} {{countdownm}}:{{countdowns}}
</view> </view>
<view class="width100 font13 fcor666 mart10">若超时未支付,订单将自动取消</view> <view class="width100 font13 fcor666 mart10">若超时未支付,订单将自动取消</view>
<view class="stubtn mart15" style="background-color: #0F8FE8;" @click="toPay()">立即支付 <view class="stubtn mart15" style="background-color: #0F8FE8;"
@click="toPay(recinfo.highChildOrderList[0].goodsId)">立即支付
</view> </view>
</view> </view>
<view class="width100 headsbg paddbotm15" v-if="recinfo.orderStatus != 1"> <view class="width100 headsbg paddbotm15" v-if="recinfo.orderStatus != 1">
@ -475,7 +476,8 @@
</view> </view>
</view> </view>
<view class="btn" @tap="cancel" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view> <view class="btn" @tap="cancel" style="border: 1px solid #0083f5;color: #0083f5;">取消订单</view>
<view class="btn" @tap="toPay" style="background-color: #0083f5;color: #fff;">去支付</view> <view class="btn" @tap="toPay(recinfo.highChildOrderList[0].goodsId)"
style="background-color: #0083f5;color: #fff;">去支付</view>
</view> </view>
</view> </view>
@ -732,7 +734,7 @@
} }
}); });
}, },
toPay() { toPay(item) {
let payTypes; let payTypes;
if (this.recinfo.payType == 1 || this.recinfo.payType == null) { if (this.recinfo.payType == 1 || this.recinfo.payType == null) {
payTypes = 3; payTypes = 3;

@ -16,6 +16,17 @@
</view> </view>
<view class="content"> <view class="content">
<view class="pay-list" v-for="(item,index) in paytypeList" :key="index"> <view class="pay-list" v-for="(item,index) in paytypeList" :key="index">
<view class="row" @tap="paytype='2'" v-if="item == 2">
<view class="left">
<image :src="imagewxUrl+imgadres"></image>
</view>
<view class="center">
微信支付
</view>
<view class="right">
<radio :checked="paytype=='2'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='3'" v-if="item == 3"> <view class="row" @tap="paytype='3'" v-if="item == 3">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres2"></image> <image :src="imagewxUrl+imgadres2"></image>
@ -27,7 +38,7 @@
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> <radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view> </view>
<!-- <view class="row" @tap="paytype='oilcard'"> <view class="row" @tap="paytype='6'" v-if="item == 6">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres1"></image> <image :src="imagewxUrl+imgadres1"></image>
</view> </view>
@ -35,20 +46,49 @@
油卡支付(余额:{{oilPirce}}) 油卡支付(余额:{{oilPirce}})
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='oilcard'" @click="changeRiado1()" color="#0083f5" /> <radio :checked="paytype=='6'" color="#0083f5" />
</view> </view>
</view> --> </view>
<view class="row" @tap="paytype='2'" v-if="item == 2"> <view class="row" @tap="paytype='7'" v-if="item == 7">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres"></image> <image :src="imagewxUrl+imgadres1"></image>
</view> </view>
<view class="center"> <view class="center">
微信支付 车队油卡(余额:{{oilUserNoPrice}})
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='2'" color="#0083f5" /> <radio :checked="paytype=='7'" color="#0083f5" />
</view>
</view>
</view>
<view v-if="paytype=='7'" class="backcorfff">
<view class="heightl60 paddleft10 fcor333 fontwig6 font16 width100 backcorfff flleft">车队油卡列表</view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff"
v-for="(item,index) in oilUserCardlist" :key="index">
<view class="width60 flleft font14">
{{item.cardNo}}({{item.contactName}})
</view>
<view class="flright width30 fotct">
<radio :checked="oilUserno==item.cardNo" @click="changeRiado2(item)" color="#0083f5" />
</view> </view>
</view> </view>
<view class="username">
<view class="namecont font15">车牌号</view>
<input style="width: 70%;" placeholder="输入车牌号" class="font15" v-model="cardNoNumber">
<!-- <view class="date text1" >{{cardNoNumber}}</view> -->
<!-- </view> -->
<picker mode="selector" style="width: 20%;" :range="UserCard" range-key="carLicensePlate"
@change="bindUserCard">
<view class="date text1"
style="color: white;position: absolute;margin-top: -2px;min-width: 100px;">
11111{{cardNoNumber}}</view>
</picker>
<image class="flright" style="width: 15px;height: 15px;" src='../../static/img/downj.png'>
</image>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -60,7 +100,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="height110"></view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" /> <ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
</view> </view>
</template> </template>
@ -68,11 +108,12 @@
<script> <script>
import { import {
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
oilCardPay,
findUser, findUser,
wechatPay, wechatPay,
cardPay, cardPay,
getThirdPartyByDetail getThirdPartyByDetail,
getUserCardList,
getCardListByCardNo
} from '../../Utils/Api.js' } from '../../Utils/Api.js'
import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue'; import ssPaymentPassword from '@/components/sanshui-payment-password/index.vue';
let app = getApp(); let app = getApp();
@ -98,7 +139,13 @@
oilPirce: 0, // oilPirce: 0, //
showType: '', // showType: '', //
paytypeList: [], // paytypeList: [], //
productType: '' // productType: '', //
oilUserCardlist: '', //
oilUserno: '', //
contactName: '', //
oilUserNoPrice: '', //
UserCard: '', //
cardNoNumber: '', //
}; };
}, },
onLoad(e) { onLoad(e) {
@ -128,7 +175,8 @@
let datas = { let datas = {
platformId: this.showType, platformId: this.showType,
"companyId": app.globalData.companyId, "companyId": app.globalData.companyId,
productType: this.productType productType: this.productType,
"orderNo": this.orderNo,
} }
getThirdPartyByDetail(datas).then(res => { getThirdPartyByDetail(datas).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
@ -137,6 +185,36 @@
} }
}); });
}, },
//
getUserCardList() {
let datas = {
type: 3
}
getUserCardList(datas).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
this.oilUserCardlist = res.return_data;
this.oilUserno = res.return_data[0].cardNo;
this.contactName = res.return_data[0].contactName;
this.oilUserNoPrice = res.return_data[0].balance;
this.getCardListByCardNo(res.return_data[0].cardNo);
}
});
},
//
getCardListByCardNo(item) {
let datas = {
cardNo: item
}
getCardListByCardNo(datas).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
this.UserCard = res.return_data;
this.cardNoNumber = res.return_data[0].carLicensePlate;
} else {
this.UserCard = '';
this.cardNoNumber = '';
}
});
},
// //
findUser() { findUser() {
let params; let params;
@ -150,6 +228,7 @@
if (res.return_data.oilCard) { if (res.return_data.oilCard) {
this.oilPirce = res.return_data.oilCard.amount; this.oilPirce = res.return_data.oilCard.amount;
} }
this.getUserCardList();
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
@ -157,6 +236,10 @@
} }
}); });
}, },
//
bindUserCard(e) {
this.cardNoNumber = this.UserCard[e.target.value].carLicensePlate;
},
// //
changeRiado() { changeRiado() {
if (!this.user.isSetHltCard) { if (!this.user.isSetHltCard) {
@ -193,6 +276,14 @@
return; return;
} }
}, },
//
changeRiado2(item) {
this.oilUserno = item.cardNo;
this.contactName = item.contactName;
this.oilUserNoPrice = item.balance;
this.getCardListByCardNo(item.cardNo);
},
// //
// //
getHuiLianTongCardBalance() { getHuiLianTongCardBalance() {
@ -242,9 +333,20 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ if (that.productType == 1 || that.productType == 2 || that
url: '/qianzhu-KFC/order-details/order-details?id=' + that.orderNo .productType == 3) {
}) uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' +
that.orderNo
})
} else {
uni.reLaunch({
url: '/pages/user/order_details/order_details?id=' +
that.orderNo
})
}
}, },
fail: function(err) { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
@ -296,7 +398,7 @@
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'oilcard') { } else if (that.paytype == '6') {
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/updatePas/updatePas' url: '/pages/login/updatePas/updatePas'
@ -319,6 +421,14 @@
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == '7') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
that.$refs.paymentPassword.modalFun('show');
} else { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -332,11 +442,22 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
if (this.paytype == '3') { if (this.paytype == '3' || this.paytype == '6' || this.paytype == '7') {
let cardNo;
if (this.paytype == 3) {
cardNo = this.user.hltCardNo.cardNo;
}
if (this.paytype == 6) {
cardNo = this.user.oilCard.cardNo;
}
if (this.paytype == 7) {
cardNo = this.oilUserno;
}
let params = { let params = {
"orderNo": this.orderNo, "orderNo": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo, "cardNo": cardNo,
"password": this.PaymentPassword "password": this.PaymentPassword,
"carLicensePlate": this.cardNoNumber
} }
cardPay(params).then(res => { cardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
@ -344,39 +465,15 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ if (this.productType == 1 || this.productType == 2 || this.productType == 3) {
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo uni.reLaunch({
}) url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo
return; })
} } else {
if (res.return_code == '102130') { uni.reLaunch({
uni.navigateTo({ url: '/pages/user/order_details/order_details?id=' + this.orderNo
url: '/pages/login/updatePas/updatePas' })
}) }
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
if (this.paytype == 'oilcard') {
let params = {
"orderId": this.orderNo,
"cardNo": this.user.oilCard.cardNo,
"password": this.PaymentPassword
}
oilCardPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/qianzhu-KFC/order-details/order-details?id=' + this.orderNo
})
return; return;
} }
if (res.return_code == '102130') { if (res.return_code == '102130') {
@ -392,6 +489,7 @@
}) })
return; return;
} }
}, },
payRequest: function(self) { payRequest: function(self) {
uni.showLoading({ uni.showLoading({
@ -426,10 +524,19 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ if (this.productType == 1 || this.productType == 2 || this
url: '/qianzhu-KFC/order-details/order-details?id=' + this .productType == 3) {
.orderNo uni.reLaunch({
}) url: '/qianzhu-KFC/order-details/order-details?id=' +
this.orderNo
})
} else {
uni.reLaunch({
url: '/pages/user/order_details/order_details?id=' +
this.orderNo
})
}
}, },
cancel: function(r) {}, cancel: function(r) {},
fail: function(res) {} fail: function(res) {}
@ -560,4 +667,18 @@
} }
} }
} }
.username {
width: calc(100% - 100upx);
height: 100upx;
display: flex;
align-items: center;
border-bottom: 1px solid #f6f6f6;
padding: 8upx 20upx;
.namecont {
color: #666666;
width: 28%;
}
}
</style> </style>

Loading…
Cancel
Save