添加商城联合支付
This commit is contained in:
parent
1a28c33eb5
commit
3c54622ea1
|
@ -18,8 +18,9 @@
|
||||||
<text style="font-size: 24upx;margin-left: 4upx;">特惠价</text>
|
<text style="font-size: 24upx;margin-left: 4upx;">特惠价</text>
|
||||||
<text style="font-size: 34upx">¥</text>
|
<text style="font-size: 34upx">¥</text>
|
||||||
<text style="font-weight: 700;">{{ ordersMoney }}</text>
|
<text style="font-weight: 700;">{{ ordersMoney }}</text>
|
||||||
<text
|
<text style="font-size: 24upx;color: grey;text-decoration:line-through;margin-left: 8px">¥{{ ordersList.originalPrice }}</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>
|
</view>
|
||||||
<view style="padding: 16upx 16upx 16upx 16upx;display: flex;">
|
<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="goods-info-title" style="color: #333;font-weight: bold;">宝贝详情</view>
|
||||||
<view class="imglist">
|
<view class="imglist">
|
||||||
<!-- <uparse :content="ordersList.descrition" @navigate="navigate" class="is-response"></uparse> -->
|
<!-- <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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -182,7 +183,7 @@
|
||||||
|
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="em">
|
<view class="em">
|
||||||
<view style="font-size: 14px" @tap="goBackUp">
|
<view style="font-size: 14px" @tap="navBarButtontO('home')">
|
||||||
<text class="iconfont icon-shouye"></text>
|
<text class="iconfont icon-shouye"></text>
|
||||||
返回首页
|
返回首页
|
||||||
</view>
|
</view>
|
||||||
|
@ -337,6 +338,7 @@
|
||||||
number: 0,
|
number: 0,
|
||||||
Maxnumber: -1,
|
Maxnumber: -1,
|
||||||
numberMoney: 0,
|
numberMoney: 0,
|
||||||
|
sadNum:0,
|
||||||
shengji: '',
|
shengji: '',
|
||||||
pinglunList: [],
|
pinglunList: [],
|
||||||
getQun: '立即领券',
|
getQun: '立即领券',
|
||||||
|
@ -647,6 +649,7 @@
|
||||||
this.ordersList = {};
|
this.ordersList = {};
|
||||||
this.ordersMoney = res.data.memberPrice;
|
this.ordersMoney = res.data.memberPrice;
|
||||||
this.numberMoney = res.data.memberPrice;
|
this.numberMoney = res.data.memberPrice;
|
||||||
|
this.sadNum = res.data.sad;
|
||||||
this.ordersList = res.data;
|
this.ordersList = res.data;
|
||||||
if (res.data.attr.length > 0) {
|
if (res.data.attr.length > 0) {
|
||||||
this.attrValue = [];
|
this.attrValue = [];
|
||||||
|
@ -989,21 +992,8 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* @import '../../../../static/css/index.css'; */
|
@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%;
|
|
||||||
}
|
|
||||||
page {
|
page {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
@ -1217,5 +1207,7 @@
|
||||||
content: '\e438';
|
content: '\e438';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 星星 */
|
.sadclass{
|
||||||
|
margin: 15px;border: 1px solid #d84444;padding: 5px 10px;border-radius: 30px;font-size: 13px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -509,7 +509,7 @@
|
||||||
1) {
|
1) {
|
||||||
console.log(url);
|
console.log(url);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:url
|
url
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//#ifndef H5
|
//#ifndef H5
|
||||||
|
|
|
@ -84,6 +84,15 @@
|
||||||
<input type="text" style="width: 70%;font-size: 30upx;color: #999999;margin-left: 10upx;"
|
<input type="text" style="width: 70%;font-size: 30upx;color: #999999;margin-left: 10upx;"
|
||||||
v-model="descrition" placeholder="选填" />
|
v-model="descrition" placeholder="选填" />
|
||||||
</view>
|
</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>
|
||||||
<view style="display: flex;background-color: #FFFFFF;width: 100%;height: 100upx;position: fixed;bottom: 0upx;">
|
<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%;">
|
<view style="display: flex;font-size: 28upx;color: #333333;padding: 25upx 0 10upx 20upx;width: 50%;">
|
||||||
|
@ -133,11 +142,15 @@
|
||||||
groupPinkId: '',
|
groupPinkId: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
jianMoney: 0,
|
jianMoney: 0,
|
||||||
|
mysad:0,
|
||||||
|
sad:null,
|
||||||
list: {},
|
list: {},
|
||||||
addressId: '',
|
addressId: '',
|
||||||
className: '',
|
className: '',
|
||||||
userByinvitationId: '',
|
userByinvitationId: '',
|
||||||
checkAddress: false
|
checkAddress: false,
|
||||||
|
oldPrice:0,
|
||||||
|
dhbl:100,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -181,10 +194,8 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
WaySel(e) {
|
WaySel(e) {
|
||||||
console.log(e);
|
|
||||||
// this.sendId = this.WayListTwo[e.detail.value].id;
|
// this.sendId = this.WayListTwo[e.detail.value].id;
|
||||||
this.sendName = this.WayList[e.detail.value];
|
this.sendName = this.WayList[e.detail.value];
|
||||||
console.log('this.sendName---->',this.sendName);
|
|
||||||
|
|
||||||
if (this.sendName === '快递') {
|
if (this.sendName === '快递') {
|
||||||
this.sendWay = 1;
|
this.sendWay = 1;
|
||||||
|
@ -201,7 +212,6 @@
|
||||||
getAddressList(addressId) {
|
getAddressList(addressId) {
|
||||||
if (addressId) {
|
if (addressId) {
|
||||||
this.$Request.getT('/app/address/selectAddressByAddressId?addressId=' + this.addressId).then(res => {
|
this.$Request.getT('/app/address/selectAddressByAddressId?addressId=' + this.addressId).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.code == 0 && res.data) {
|
if (res.code == 0 && res.data) {
|
||||||
this.checkAddress = true;
|
this.checkAddress = true;
|
||||||
this.detail = res.data.city + '' + res.data.district + '' + res.data.detailsAddress;
|
this.detail = res.data.city + '' + res.data.district + '' + res.data.detailsAddress;
|
||||||
|
@ -233,7 +243,6 @@
|
||||||
// 获取默认地址
|
// 获取默认地址
|
||||||
addressMy() {
|
addressMy() {
|
||||||
this.$Request.getT('/app/address/selectAddressById').then(res => {
|
this.$Request.getT('/app/address/selectAddressById').then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.code == 0 && res.data) {
|
if (res.code == 0 && res.data) {
|
||||||
this.checkAddress = true;
|
this.checkAddress = true;
|
||||||
|
|
||||||
|
@ -269,6 +278,13 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...'
|
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 => {
|
this.$Request.getT('/goods/find?id=' + id).then(res => {
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
|
@ -276,6 +292,7 @@
|
||||||
this.attrValuecoverImg = res.data.coverImg;
|
this.attrValuecoverImg = res.data.coverImg;
|
||||||
if (this.checkString == '') {
|
if (this.checkString == '') {
|
||||||
this.price = parseFloat(this.list.sku[0].skuPrice);
|
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.money = parseFloat(this.list.sku[0].skuPrice);
|
||||||
this.maxNumber = this.list.sku[0].stock ? this.list.sku[0].stock : 1;
|
this.maxNumber = this.list.sku[0].stock ? this.list.sku[0].stock : 1;
|
||||||
}
|
}
|
||||||
|
@ -292,6 +309,8 @@
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// getAddressList() {
|
// getAddressList() {
|
||||||
// let userId = this.$queue.getData('userId');
|
// let userId = this.$queue.getData('userId');
|
||||||
|
@ -364,8 +383,10 @@
|
||||||
payMoney: this.price + this.postagePrice,
|
payMoney: this.price + this.postagePrice,
|
||||||
relationId: this.userByinvitationId,
|
relationId: this.userByinvitationId,
|
||||||
detailJson: this.checkString,
|
detailJson: this.checkString,
|
||||||
commissionPrice: commissionPrice
|
commissionPrice: commissionPrice,
|
||||||
|
sfrxdh:this.sad
|
||||||
}
|
}
|
||||||
|
console.log('data--->',data);
|
||||||
this.$Request.postJson('/app/orders/save', data).then(res => {
|
this.$Request.postJson('/app/orders/save', data).then(res => {
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
@ -388,6 +409,7 @@
|
||||||
// this.price = parseFloat(this.price - this.money).toFixed(1);
|
// this.price = parseFloat(this.price - this.money).toFixed(1);
|
||||||
this.price = parseFloat(this.numFilter(parseFloat(this.price) - parseFloat(this.money)));
|
this.price = parseFloat(this.numFilter(parseFloat(this.price) - parseFloat(this.money)));
|
||||||
}
|
}
|
||||||
|
this.changeSadPrice();
|
||||||
},
|
},
|
||||||
jia() {
|
jia() {
|
||||||
let number = this.number + 1
|
let number = this.number + 1
|
||||||
|
@ -398,6 +420,23 @@
|
||||||
} else {
|
} else {
|
||||||
this.$queue.showToast('没库存啦,只能买这么多了!');
|
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;">
|
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}}
|
{{list.title}}
|
||||||
</view>
|
</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="display: flex;width: 50%;">
|
||||||
<view style="font-size: 30upx;color: #333333;">¥ {{list.price}}</view>
|
<view style="font-size: 30upx;color: #333333;">¥ {{list.price}}</view>
|
||||||
<view style="font-size: 24upx;color: #666666;padding-top: 7upx;padding-left: 10upx;">
|
<view style="font-size: 24upx;color: #666666;padding-top: 7upx;padding-left: 10upx;">
|
||||||
×{{list.number}}</view>
|
×{{list.number}}</view>
|
||||||
</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
|
<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>
|
总金额: ¥{{list.payMoney}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -139,7 +144,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 淘口令分享 -->
|
<!-- 淘口令分享 -->
|
||||||
<!-- <simpleModal ref="simpleModalTkl" @maskClose="TklmaskClose">
|
<simpleModal ref="simpleModalTkl" @maskClose="TklmaskClose">
|
||||||
<view class="buy-box-title">兑换码</view>
|
<view class="buy-box-title">兑换码</view>
|
||||||
<view class="buy-box-center" style="width: 700upx;">
|
<view class="buy-box-center" style="width: 700upx;">
|
||||||
<view class="code-cent">
|
<view class="code-cent">
|
||||||
|
@ -161,7 +166,7 @@
|
||||||
@tap="copyTklWenAns">{{ copyTklStatus ? '已复制到剪切板' : '一键复制' }}</view>
|
@tap="copyTklWenAns">{{ copyTklStatus ? '已复制到剪切板' : '一键复制' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</simpleModal> -->
|
</simpleModal>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
style="text-align: center;position: fixed;bottom: 0upx;background-color: #FFFFFF;width: 100%;height: 100upx;justify-content: center;overflow: hidden;"
|
style="text-align: center;position: fixed;bottom: 0upx;background-color: #FFFFFF;width: 100%;height: 100upx;justify-content: center;overflow: hidden;"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<view style="margin-top: 50px;" v-if="newsList.length > 0">
|
<view style="margin-top: 100upx;" v-if="newsList.length > 0">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifndef H5 -->
|
<!-- #ifndef H5 -->
|
||||||
<view style="margin-top: 20upx;padding-top: 60rpx;" v-if="newsList.length > 0">
|
<view style="margin-top: 20upx;padding-top: 60rpx;" v-if="newsList.length > 0">
|
||||||
|
@ -409,7 +409,7 @@
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 44px;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
Loading…
Reference in New Issue