联合支付
This commit is contained in:
parent
9751c27673
commit
bcc7f9b0b5
|
@ -18,8 +18,9 @@
|
|||
<text style="font-size: 24upx;margin-left: 4upx;">特惠价</text>
|
||||
<text style="font-size: 34upx">¥</text>
|
||||
<text style="font-weight: 700;">{{ ordersMoney }}</text>
|
||||
<text
|
||||
style="font-size: 24upx;color: grey;text-decoration:line-through;margin-left: 8px">¥{{ ordersList.originalPrice }}</text>
|
||||
<text style="font-size: 24upx;color: grey;text-decoration:line-through;margin-left: 8px">¥{{ ordersList.originalPrice }}</text>
|
||||
<text class="sadclass" v-if="sadNum>0"><image src="/my/static/sad.png" style="width:12px;height: 12px;"></image><span style="margin-left:8px;">{{sadNum}}</span></text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 16upx 16upx 16upx 16upx;display: flex;">
|
||||
|
@ -337,6 +338,7 @@
|
|||
number: 0,
|
||||
Maxnumber: -1,
|
||||
numberMoney: 0,
|
||||
sadNum:0,
|
||||
shengji: '',
|
||||
pinglunList: [],
|
||||
getQun: '立即领券',
|
||||
|
@ -647,6 +649,7 @@
|
|||
this.ordersList = {};
|
||||
this.ordersMoney = res.data.memberPrice;
|
||||
this.numberMoney = res.data.memberPrice;
|
||||
this.sadNum = res.data.sad;
|
||||
this.ordersList = res.data;
|
||||
if (res.data.attr.length > 0) {
|
||||
this.attrValue = [];
|
||||
|
@ -1204,5 +1207,7 @@
|
|||
content: '\e438';
|
||||
}
|
||||
|
||||
/* 星星 */
|
||||
.sadclass{
|
||||
margin: 15px;border: 1px solid #d84444;padding: 5px 10px;border-radius: 30px;font-size: 13px !important;
|
||||
}
|
||||
</style>
|
|
@ -84,6 +84,15 @@
|
|||
<input type="text" style="width: 70%;font-size: 30upx;color: #999999;margin-left: 10upx;"
|
||||
v-model="descrition" placeholder="选填" />
|
||||
</view>
|
||||
<!-- 盛安豆兑换 -->
|
||||
<view style="display: flex;padding: 30upx 20upx;">
|
||||
<view style="font-size: 30upx;color: #333333;width: 25%;">盛安豆兑换</view>
|
||||
<input type="number" style="width: 70%;font-size: 30upx;color: #999999;margin-left: 10upx;"
|
||||
v-model="sad" placeholder="选填" @blur="changeSadPrice"/>
|
||||
</view>
|
||||
<view style="display: flex;padding: 30upx 20upx;">
|
||||
<view style="width: 100%;font-size: 12px;color:#bab6b6;">您拥有盛安豆:{{mysad}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="display: flex;background-color: #FFFFFF;width: 100%;height: 100upx;position: fixed;bottom: 0upx;">
|
||||
<view style="display: flex;font-size: 28upx;color: #333333;padding: 25upx 0 10upx 20upx;width: 50%;">
|
||||
|
@ -133,11 +142,15 @@
|
|||
groupPinkId: '',
|
||||
mobile: '',
|
||||
jianMoney: 0,
|
||||
mysad:0,
|
||||
sad:null,
|
||||
list: {},
|
||||
addressId: '',
|
||||
className: '',
|
||||
userByinvitationId: '',
|
||||
checkAddress: false
|
||||
checkAddress: false,
|
||||
oldPrice:0,
|
||||
dhbl:100,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
@ -181,10 +194,8 @@
|
|||
},
|
||||
methods: {
|
||||
WaySel(e) {
|
||||
console.log(e);
|
||||
// this.sendId = this.WayListTwo[e.detail.value].id;
|
||||
this.sendName = this.WayList[e.detail.value];
|
||||
console.log('this.sendName---->',this.sendName);
|
||||
|
||||
if (this.sendName === '快递') {
|
||||
this.sendWay = 1;
|
||||
|
@ -201,7 +212,6 @@
|
|||
getAddressList(addressId) {
|
||||
if (addressId) {
|
||||
this.$Request.getT('/app/address/selectAddressByAddressId?addressId=' + this.addressId).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 0 && res.data) {
|
||||
this.checkAddress = true;
|
||||
this.detail = res.data.city + '' + res.data.district + '' + res.data.detailsAddress;
|
||||
|
@ -233,7 +243,6 @@
|
|||
// 获取默认地址
|
||||
addressMy() {
|
||||
this.$Request.getT('/app/address/selectAddressById').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 0 && res.data) {
|
||||
this.checkAddress = true;
|
||||
|
||||
|
@ -269,6 +278,13 @@
|
|||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
|
||||
this.$Request.get("/app/artificer/selectArtificerMoney").then(res => {
|
||||
if (res.code == 0) {
|
||||
this.mysad = res.data.mysad ? res.data.mysad : 0; //盛安豆总数
|
||||
}
|
||||
});
|
||||
|
||||
this.$Request.getT('/goods/find?id=' + id).then(res => {
|
||||
if (res.status === 0) {
|
||||
this.list = res.data;
|
||||
|
@ -276,6 +292,7 @@
|
|||
this.attrValuecoverImg = res.data.coverImg;
|
||||
if (this.checkString == '') {
|
||||
this.price = parseFloat(this.list.sku[0].skuPrice);
|
||||
this.oldPrice = parseFloat(this.list.sku[0].skuPrice);
|
||||
this.money = parseFloat(this.list.sku[0].skuPrice);
|
||||
this.maxNumber = this.list.sku[0].stock ? this.list.sku[0].stock : 1;
|
||||
}
|
||||
|
@ -292,6 +309,8 @@
|
|||
}
|
||||
uni.hideLoading();
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// getAddressList() {
|
||||
// let userId = this.$queue.getData('userId');
|
||||
|
@ -364,8 +383,10 @@
|
|||
payMoney: this.price + this.postagePrice,
|
||||
relationId: this.userByinvitationId,
|
||||
detailJson: this.checkString,
|
||||
commissionPrice: commissionPrice
|
||||
commissionPrice: commissionPrice,
|
||||
sfrxdh:this.sad
|
||||
}
|
||||
console.log('data--->',data);
|
||||
this.$Request.postJson('/app/orders/save', data).then(res => {
|
||||
if (res.status === 0) {
|
||||
uni.redirectTo({
|
||||
|
@ -388,6 +409,7 @@
|
|||
// this.price = parseFloat(this.price - this.money).toFixed(1);
|
||||
this.price = parseFloat(this.numFilter(parseFloat(this.price) - parseFloat(this.money)));
|
||||
}
|
||||
this.changeSadPrice();
|
||||
},
|
||||
jia() {
|
||||
let number = this.number + 1
|
||||
|
@ -398,6 +420,23 @@
|
|||
} else {
|
||||
this.$queue.showToast('没库存啦,只能买这么多了!');
|
||||
}
|
||||
this.changeSadPrice();
|
||||
},
|
||||
changeSadPrice(){
|
||||
if(this.sad>this.mysad){
|
||||
this.sad = this.mysad
|
||||
this.price = parseFloat(this.oldPrice * this.number - this.sad / this.dhbl);
|
||||
if(this.price<0){
|
||||
this.price = 0;
|
||||
}
|
||||
this.$queue.showToast('最大只可以输入【'+this.mysad+'】盛安豆');
|
||||
}else{
|
||||
this.price = parseFloat(this.oldPrice * this.number - this.sad / this.dhbl);
|
||||
if(this.price<0){
|
||||
this.price = 0;
|
||||
this.sad = this.oldPrice * this.number * this.dhbl
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,14 +35,19 @@
|
|||
style="font-size: 30upx;color: #333333;width: 90%;height: 80upx;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
{{list.title}}
|
||||
</view>
|
||||
<view style="display: flex;height: 50upx;margin-top: 70upx;">
|
||||
<view style="display: flex;height: 50upx;margin-top: 10upx;">
|
||||
<view style="display: flex;width: 50%;">
|
||||
<view style="font-size: 30upx;color: #333333;">¥ {{list.price}}</view>
|
||||
<view style="font-size: 24upx;color: #666666;padding-top: 7upx;padding-left: 10upx;">
|
||||
×{{list.number}}</view>
|
||||
</view>
|
||||
<view v-if="list.price*list.number-list.payMoney>0"
|
||||
style="font-size: 26upx;color: #333333;padding: 0 0 10upx 20upx;width: 50%;text-align: right;">
|
||||
优惠: ¥{{(list.price*list.number-list.payMoney).toFixed(2)}}</view>
|
||||
</view>
|
||||
<view style="display: flex;height: 50upx;margin-top: 10upx;">
|
||||
<view
|
||||
style="font-size: 26upx;color: #333333;padding: 0 0 10upx 20upx;width: 40%;text-align: right;">
|
||||
style="font-size: 26upx;color: #333333;padding: 0 0 10upx 20upx;width: 100%;text-align: right;">
|
||||
总金额: ¥{{list.payMoney}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue