添加商城联合支付

This commit is contained in:
yangjun 2024-07-18 17:26:46 +08:00
parent 1a28c33eb5
commit 3c54622ea1
5 changed files with 69 additions and 33 deletions

View File

@ -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;">
@ -140,7 +141,7 @@
<view class="goods-info-title" style="color: #333;font-weight: bold;">宝贝详情</view>
<view class="imglist">
<!-- <uparse :content="ordersList.descrition" @navigate="navigate" class="is-response"></uparse> -->
<div class="imglist-div" v-html="ordersList.descrition"></div>
<div v-html="ordersList.descrition"></div>
</view>
</view>
@ -182,7 +183,7 @@
<!-- #endif -->
<view class="em">
<view style="font-size: 14px" @tap="goBackUp">
<view style="font-size: 14px" @tap="navBarButtontO('home')">
<text class="iconfont icon-shouye"></text>
返回首页
</view>
@ -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 = [];
@ -989,21 +992,8 @@
</script>
<style>
/* @import '../../../../static/css/index.css'; */
@import url('../../../../static/css/indexShop.css');
.imglist{
width:100%;
}
.imglist-div{
width:100%;
}
.imglist-div /deep/p{
width:100%;
}
.imglist-div /deep/p /deep/img{
width:100%;
}
@import '../../../../static/css/index.css';
page {
background: #f8f8f8;
}
@ -1217,5 +1207,7 @@
content: '\e438';
}
/* 星星 */
.sadclass{
margin: 15px;border: 1px solid #d84444;padding: 5px 10px;border-radius: 30px;font-size: 13px !important;
}
</style>

View File

@ -509,7 +509,7 @@
1) {
console.log(url);
uni.navigateTo({
url:url
url
});
} else {
//#ifndef H5

View File

@ -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
}
}
}
}
}

View File

@ -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>
@ -139,7 +144,7 @@
</view>
<!-- 淘口令分享 -->
<!-- <simpleModal ref="simpleModalTkl" @maskClose="TklmaskClose">
<simpleModal ref="simpleModalTkl" @maskClose="TklmaskClose">
<view class="buy-box-title">兑换码</view>
<view class="buy-box-center" style="width: 700upx;">
<view class="code-cent">
@ -161,7 +166,7 @@
@tap="copyTklWenAns">{{ copyTklStatus ? '已复制到剪切板' : '一键复制' }}</view>
</view>
</view>
</simpleModal> -->
</simpleModal>
<view
style="text-align: center;position: fixed;bottom: 0upx;background-color: #FFFFFF;width: 100%;height: 100upx;justify-content: center;overflow: hidden;"

View File

@ -14,7 +14,7 @@
</scroll-view>
</view>
<!-- #ifdef H5 -->
<view style="margin-top: 50px;" v-if="newsList.length > 0">
<view style="margin-top: 100upx;" v-if="newsList.length > 0">
<!-- #endif -->
<!-- #ifndef H5 -->
<view style="margin-top: 20upx;padding-top: 60rpx;" v-if="newsList.length > 0">
@ -409,7 +409,7 @@
/* #endif */
/* #ifdef H5 */
position: fixed;
top: 0;
top: 44px;
left: 0;
z-index: 999;
/* #endif */