|
|
|
@ -87,107 +87,98 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width94 backcorfff mart10"> |
|
|
|
|
<view class="width94 alijusstart height50 font14 fcor666"> |
|
|
|
|
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view> |
|
|
|
|
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width94 comorder mart10"> |
|
|
|
|
|
|
|
|
|
<view class="width92 alijusstart paddtop20"> |
|
|
|
|
<view class="width30 fcor333 fontwig6 font16"> |
|
|
|
|
积分抵扣 |
|
|
|
|
</view> |
|
|
|
|
<view class="cj-slider"> |
|
|
|
|
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view> |
|
|
|
|
<cj-slider style="width: 60%; float:left;" v-if="isDiscount" v-model="priceValue" :min="0" |
|
|
|
|
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving" |
|
|
|
|
@end="blockEnd" /> |
|
|
|
|
<!-- <cj-slider style="width: 60%; float:left;" v-if="isDiscount == 2" v-model="priceValue" :min="0" |
|
|
|
|
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving" |
|
|
|
|
@end="blockEnd" /> --> |
|
|
|
|
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart15 marb5"></view> |
|
|
|
|
<view class="height50 width100 backcorfff"> |
|
|
|
|
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
抵扣金额 |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
¥{{priceValue[1] / 100}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart5 marb5"></view> |
|
|
|
|
|
|
|
|
|
<view class="height40 width100 backcorfff"> |
|
|
|
|
<view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;"> |
|
|
|
|
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image> |
|
|
|
|
<text>下单返积分</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
返{{rebateIntegral}}积分 |
|
|
|
|
</view> |
|
|
|
|
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
{{rebateIntegral}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;"> |
|
|
|
|
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image> |
|
|
|
|
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="height50 width100 backcorfff"> |
|
|
|
|
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> |
|
|
|
|
支付方式: <text class="jfrecharge" @click="jumpdeposits" |
|
|
|
|
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3">积分充值</text> |
|
|
|
|
|
|
|
|
|
<view class="width94 backcorfff mart10"> |
|
|
|
|
<view class="width94 alijusstart height50 font14 fcor666"> |
|
|
|
|
<view class="width40 fcor333 fontwig6 font16" style="padding-left: 2%;">邀请码</view> |
|
|
|
|
<input class="width60 fotrt font15" v-model="identificationCode" placeholder="请输入邀请码" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width94 comorder mart10"> |
|
|
|
|
|
|
|
|
|
<view class="width92 alijusstart paddtop20"> |
|
|
|
|
<view class="width30 fcor333 fontwig6 font16"> |
|
|
|
|
积分抵扣 |
|
|
|
|
</view> |
|
|
|
|
<view class="cj-slider"> |
|
|
|
|
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view> |
|
|
|
|
<cj-slider style="width: 60%; float:left;" v-if="isDiscount" v-model="priceValue" :min="0" |
|
|
|
|
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving" |
|
|
|
|
@end="blockEnd" /> |
|
|
|
|
<!-- <cj-slider style="width: 60%; float:left;" v-if="isDiscount == 2" v-model="priceValue" :min="0" |
|
|
|
|
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving" |
|
|
|
|
@end="blockEnd" /> --> |
|
|
|
|
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart5 marb5"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" |
|
|
|
|
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3" |
|
|
|
|
@tap="paytype='jinbi'"> |
|
|
|
|
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text> |
|
|
|
|
<view class="width94 line1 mart15 marb5"></view> |
|
|
|
|
<view class="height50 width100 backcorfff"> |
|
|
|
|
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
抵扣金额 |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
<radio :checked="paytype=='jinbi'" color="#0083f5" /> |
|
|
|
|
¥{{priceValue[1] / 100}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart5 marb5" |
|
|
|
|
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype='weixin'" |
|
|
|
|
v-if="couponList.payType == 1 || couponList.payType==3 "> |
|
|
|
|
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;"> |
|
|
|
|
微信支付 |
|
|
|
|
<view class="width94 line1 mart5 marb5"></view> |
|
|
|
|
|
|
|
|
|
<view class="height40 width100 backcorfff"> |
|
|
|
|
<view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;"> |
|
|
|
|
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image> |
|
|
|
|
<text>下单返积分</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
返{{rebateIntegral}}积分 |
|
|
|
|
</view> |
|
|
|
|
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
<radio :checked="paytype=='weixin'" color="#0083f5" /> |
|
|
|
|
{{rebateIntegral}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 1 || couponList.payType==3"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype='gonghuika'" v-if="couponList.payType== 4"> |
|
|
|
|
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}元</text> |
|
|
|
|
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;"> |
|
|
|
|
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image> |
|
|
|
|
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="height50 width100 backcorfff"> |
|
|
|
|
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> |
|
|
|
|
支付方式 |
|
|
|
|
<!-- : <text class="jfrecharge" @click="jumpdeposits" |
|
|
|
|
v-if="couponList.payType == 1 || couponList.payType == 2 || couponList.payType==3">积分充值</text> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
<!-- <view class="width94 line1 mart5 marb5"></view> --> |
|
|
|
|
<view class="width100" v-for="(item,index) in paytypeList" :key="index"> |
|
|
|
|
<view class="width94 line1 mart5 marb5" |
|
|
|
|
v-if="item == 2"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype='2'" v-if="item == 2"> |
|
|
|
|
<view class="width50 flleft fcor333 font16" style="padding-left: 4%;"> |
|
|
|
|
微信支付 |
|
|
|
|
</view> |
|
|
|
|
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
<radio :checked="paytype=='2'" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 line1 mart5 marb5" v-if="item == 3"></view> |
|
|
|
|
<view class="height50 width100 backcorfff" @tap="paytype='3'" v-if="item == 3"> |
|
|
|
|
<view class="width70 flleft fcor333 font16 text1" style="padding-left: 4%;"> |
|
|
|
|
汇联通工会卡<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}元</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
|
|
|
|
style="align-items: center;"> |
|
|
|
|
<radio :checked="paytype=='3'" @click="changeRiado()" color="#0083f5" /> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <view class="width94 comorder mart10"> |
|
|
|
|
<view class="height50 width100 backcorfff"> |
|
|
|
|
<view class="width80p flleft fcor333 fontwig6 font14" style="padding-left: 4%;"> |
|
|
|
@ -242,7 +233,7 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { |
|
|
|
|
addOrder, |
|
|
|
|
addOrder, |
|
|
|
|
create, |
|
|
|
|
getCouponById, |
|
|
|
|
loginByPhone, |
|
|
|
@ -250,12 +241,12 @@ |
|
|
|
|
orderToPay, |
|
|
|
|
orderToGoldPay, |
|
|
|
|
findUser, |
|
|
|
|
hltUnionCardPay, |
|
|
|
|
hltUnionCardPay, |
|
|
|
|
getRebateIntegral, |
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
findById |
|
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
getThirdPartyByDetail |
|
|
|
|
} 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(); |
|
|
|
@ -295,14 +286,15 @@ |
|
|
|
|
coupondiscountid: '', |
|
|
|
|
orderDetails: '', //订单详情 |
|
|
|
|
payGold: '', //积分数 |
|
|
|
|
identificationCode: '' ,//渠道商 |
|
|
|
|
paytypeList: [], //支付方式 |
|
|
|
|
priceValue: [0, 0], // 积分可以指定默认值 |
|
|
|
|
changePrice: '', //滑动值 |
|
|
|
|
isDiscount: true, |
|
|
|
|
availIntegal: '', // 可用积分 |
|
|
|
|
isUse: true, // 是否禁用状态 |
|
|
|
|
rebateIntegral: '', //返回积分 |
|
|
|
|
identificationCode: '', //渠道商 |
|
|
|
|
paytypeList: [], //支付方式 |
|
|
|
|
priceValue: [0, 0], // 积分可以指定默认值 |
|
|
|
|
changePrice: '', //滑动值 |
|
|
|
|
isDiscount: true, |
|
|
|
|
availIntegal: '', // 可用积分 |
|
|
|
|
isUse: true, // 是否禁用状态 |
|
|
|
|
rechargeDes: '', // 支付详情 |
|
|
|
|
rebateIntegral: '', //返回积分 |
|
|
|
|
Integrastu: 1 //返积分状态 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -349,40 +341,37 @@ |
|
|
|
|
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询详情 |
|
|
|
|
findById() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中' |
|
|
|
|
}) |
|
|
|
|
let showType; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
showType = 2; |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
showType = 1; |
|
|
|
|
// #endif |
|
|
|
|
let datas = { |
|
|
|
|
platformId: showType, |
|
|
|
|
id: this.objectId |
|
|
|
|
} |
|
|
|
|
findById(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.rechargeDes = res.return_data; |
|
|
|
|
this.paytypeList = res.return_data.productPayTypeString.split(','); |
|
|
|
|
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); |
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(res.return_data.payPrice * 100).toFixed(0) |
|
|
|
|
let payprice = parseFloat(res.return_data.payPrice * 100 * zkprice).toFixed( |
|
|
|
|
0); |
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
|
} else { |
|
|
|
|
this.availIntegal = payprice; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
methods: { |
|
|
|
|
//查询支付方式 |
|
|
|
|
getThirdPartyByDetail() { |
|
|
|
|
// #ifdef H5 |
|
|
|
|
this.showType = 2; |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
this.showType = 1; |
|
|
|
|
// #endif |
|
|
|
|
let datas = { |
|
|
|
|
platformId: this.showType, |
|
|
|
|
regionId: app.globalData.cityId, |
|
|
|
|
productType: 4, |
|
|
|
|
productId: this.couponList.couponSource |
|
|
|
|
} |
|
|
|
|
getThirdPartyByDetail(datas).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.rechargeDes = res.return_data; |
|
|
|
|
this.paytypeList = res.return_data.productPayType.split(','); |
|
|
|
|
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1); |
|
|
|
|
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2); |
|
|
|
|
let pprice = parseFloat(this.totalprice * 100).toFixed(0) |
|
|
|
|
let payprice = parseFloat(this.totalprice * 100 * zkprice).toFixed( |
|
|
|
|
0); |
|
|
|
|
if (payprice > this.user.gold) { |
|
|
|
|
this.availIntegal = this.user.gold; |
|
|
|
|
} else { |
|
|
|
|
this.availIntegal = payprice; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//查询积分 |
|
|
|
|
findUser() { |
|
|
|
@ -390,13 +379,13 @@ |
|
|
|
|
findUser(params).then(res => { |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
app.globalData.userInfo = res.return_data; |
|
|
|
|
this.user = res.return_data; |
|
|
|
|
this.availIntegal = res.return_data.gold; |
|
|
|
|
this.user = res.return_data; |
|
|
|
|
this.availIntegal = res.return_data.gold; |
|
|
|
|
this.findById(); |
|
|
|
|
if (this.user.hltCardNo) { |
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
this.getHuiLianTongCardBalance(); |
|
|
|
|
} |
|
|
|
|
this.getUserNormalDiscountList(); |
|
|
|
|
this.getUserNormalDiscountList(); |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: "user", |
|
|
|
@ -404,24 +393,24 @@ |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//支付返利积分 |
|
|
|
|
getRebateIntegral() { |
|
|
|
|
let datas = { |
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
"price": this.paytheprice, |
|
|
|
|
"productId": 1, |
|
|
|
|
"type": 1, |
|
|
|
|
} |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//支付返利积分 |
|
|
|
|
getRebateIntegral() { |
|
|
|
|
let datas = { |
|
|
|
|
"companyId": app.globalData.companyId, |
|
|
|
|
"price": this.paytheprice, |
|
|
|
|
"productId": 1, |
|
|
|
|
"type": 1, |
|
|
|
|
} |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//查询卡券详情 |
|
|
|
|
getCouponById() { |
|
|
|
@ -436,6 +425,7 @@ |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
this.couponList = res.return_data; |
|
|
|
|
this.paytheprice = res.return_data.discountPrice; |
|
|
|
|
this.getThirdPartyByDetail(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
@ -617,7 +607,7 @@ |
|
|
|
|
//获取订单数据 |
|
|
|
|
orderToPay(item) { |
|
|
|
|
let that = this; |
|
|
|
|
if (that.paytype == 'weixin') { |
|
|
|
|
if (that.paytype == '2') { |
|
|
|
|
// #ifdef H5 |
|
|
|
|
let params = { |
|
|
|
|
"orderId": item.id, |
|
|
|
@ -678,104 +668,7 @@ |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} else if (that.paytype == 'jinbi') { |
|
|
|
|
if (that.user.gold < that.paytheprice * 100 && !this.couponList.buyPoints) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
icon: 'none', |
|
|
|
|
title: '积分不足', |
|
|
|
|
duration: 2000, |
|
|
|
|
success() { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../user/deposit/deposit' |
|
|
|
|
}) |
|
|
|
|
}, 1000) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (that.user.gold < that.paytheprice * 100 && this.couponList.buyPoints) { |
|
|
|
|
|
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '积分支付', |
|
|
|
|
content: '积分不足,请购买并兑换', |
|
|
|
|
success: function(res) { |
|
|
|
|
if (res.confirm) { |
|
|
|
|
// #ifdef H5 |
|
|
|
|
let params = { |
|
|
|
|
"orderId": item.id, |
|
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
"orderScene": "GOODS_ORDER", |
|
|
|
|
"openIdType": 2 |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
// #ifdef MP |
|
|
|
|
let params = { |
|
|
|
|
"orderId": item.id, |
|
|
|
|
"openId": app.globalData.openId, |
|
|
|
|
"orderScene": "GOODS_ORDER" |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
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: '支付成功' |
|
|
|
|
}) |
|
|
|
|
app.globalData.storeid = ''; |
|
|
|
|
app.globalData.storename = ''; |
|
|
|
|
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' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!that.user.isSetPayPwd) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '../login/updatePas/updatePas' |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
that.$refs.paymentPassword.modalFun('show'); |
|
|
|
|
} else if (that.paytype == 'gonghuika') { |
|
|
|
|
} else if (that.paytype == '3') { |
|
|
|
|
if (that.tongCardPrice < that.paytheprice) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
icon: 'none', |
|
|
|
@ -827,37 +720,37 @@ |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '支付中...' |
|
|
|
|
}) |
|
|
|
|
if (this.paytype == 'jinbi') { |
|
|
|
|
let params = { |
|
|
|
|
"orderId": this.orderId, |
|
|
|
|
"password": this.PaymentPassword |
|
|
|
|
} |
|
|
|
|
orderToGoldPay(params).then(res => { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '支付成功' |
|
|
|
|
}) |
|
|
|
|
app.globalData.storeid = ''; |
|
|
|
|
app.globalData.storename = ''; |
|
|
|
|
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' |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// if (this.paytype == 'jinbi') { |
|
|
|
|
// let params = { |
|
|
|
|
// "orderId": this.orderId, |
|
|
|
|
// "password": this.PaymentPassword |
|
|
|
|
// } |
|
|
|
|
// orderToGoldPay(params).then(res => { |
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
// if (res.return_code == '000000') { |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: '支付成功' |
|
|
|
|
// }) |
|
|
|
|
// app.globalData.storeid = ''; |
|
|
|
|
// app.globalData.storename = ''; |
|
|
|
|
// 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' |
|
|
|
|
// }) |
|
|
|
|
// }) |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
"orderId": this.orderId, |
|
|
|
@ -948,31 +841,31 @@ |
|
|
|
|
duration: 4000 |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
blockStart() {}, |
|
|
|
|
blockMoving() { |
|
|
|
|
// console.log('正在滑动中') |
|
|
|
|
}, |
|
|
|
|
//滑动结束 |
|
|
|
|
blockEnd() { |
|
|
|
|
this.isDiscount = 1; |
|
|
|
|
if (this.deductionPrice == 0) { |
|
|
|
|
this.payPrice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed( |
|
|
|
|
2); |
|
|
|
|
} else { |
|
|
|
|
this.payPrice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this |
|
|
|
|
.deductionPrice).toFixed(2); |
|
|
|
|
} |
|
|
|
|
if (this.payPrice == 0) { |
|
|
|
|
this.isUse = false; |
|
|
|
|
this.paytype = ''; |
|
|
|
|
} else { |
|
|
|
|
this.isUse = true; |
|
|
|
|
} |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
blockStart() {}, |
|
|
|
|
blockMoving() { |
|
|
|
|
// console.log('正在滑动中') |
|
|
|
|
}, |
|
|
|
|
//滑动结束 |
|
|
|
|
blockEnd() { |
|
|
|
|
this.isDiscount = 1; |
|
|
|
|
if (this.deductionPrice == 0) { |
|
|
|
|
this.payPrice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed( |
|
|
|
|
2); |
|
|
|
|
} else { |
|
|
|
|
this.payPrice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this |
|
|
|
|
.deductionPrice).toFixed(2); |
|
|
|
|
} |
|
|
|
|
if (this.payPrice == 0) { |
|
|
|
|
this.isUse = false; |
|
|
|
|
this.paytype = ''; |
|
|
|
|
} else { |
|
|
|
|
this.isUse = true; |
|
|
|
|
} |
|
|
|
|
this.getRebateIntegral(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//跳转积分充值 |
|
|
|
|
jumpdeposits() { |
|
|
|
|
uni.navigateTo({ |
|
|
|
@ -998,12 +891,12 @@ |
|
|
|
|
width: 40rpx; |
|
|
|
|
height: 40rpx; |
|
|
|
|
margin-top: 30rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.cj-slider { |
|
|
|
|
width: 100%; |
|
|
|
|
align-items: center; |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.cj-slider { |
|
|
|
|
width: 100%; |
|
|
|
|
align-items: center; |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.goodsimg { |
|
|
|
|