|
@@ -154,9 +154,8 @@
|
|
|
<el-input-number @change="changeCount" size="mini" v-model="skuCount" :step="1" :min="1"
|
|
<el-input-number @change="changeCount" size="mini" v-model="skuCount" :step="1" :min="1"
|
|
|
step-strictly></el-input-number>
|
|
step-strictly></el-input-number>
|
|
|
</td>
|
|
</td>
|
|
|
- <td style="text-align: center;">
|
|
|
|
|
|
|
+ <td style="text-align: center">
|
|
|
{{ data.price }} 积分
|
|
{{ data.price }} 积分
|
|
|
- <span style="color: red;" v-if="money">+ {{ money }}元</span>
|
|
|
|
|
</td>
|
|
</td>
|
|
|
<td style="text-align: center">
|
|
<td style="text-align: center">
|
|
|
<el-select size="small" clearable v-model="deliveryType" placeholder="请选择"
|
|
<el-select size="small" clearable v-model="deliveryType" placeholder="请选择"
|
|
@@ -175,8 +174,8 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</td>
|
|
</td>
|
|
|
<td style="text-align: center" class="finlly-price">
|
|
<td style="text-align: center" class="finlly-price">
|
|
|
- {{ total }} 积分
|
|
|
|
|
- <span style="color: red;" v-if="money">+ {{ totalMoney }}元</span>
|
|
|
|
|
|
|
+ {{ money ? userInfo.surplusIntegral : total }} 积分
|
|
|
|
|
+ <span style="color: red;" v-if="money">+{{ money }}元</span>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
@@ -315,12 +314,8 @@
|
|
|
<el-dialog title="结算明细" :visible.sync="dialogFormOrderInfo" width="300px">
|
|
<el-dialog title="结算明细" :visible.sync="dialogFormOrderInfo" width="300px">
|
|
|
<div class="checklist">
|
|
<div class="checklist">
|
|
|
<div class="listItem">
|
|
<div class="listItem">
|
|
|
- <div class="itemName">商品</div>
|
|
|
|
|
- <div class="itemValue">
|
|
|
|
|
- {{ data.price }} 积分
|
|
|
|
|
- <span style="color: red;" v-if="money">+ {{ money }}元</span>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div class="itemName">商品积分</div>
|
|
|
|
|
+ <div class="itemValue">{{ data.price }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="listItem">
|
|
<div class="listItem">
|
|
|
<div class="itemName">商品数量</div>
|
|
<div class="itemName">商品数量</div>
|
|
@@ -333,8 +328,8 @@
|
|
|
<div class="listItem">
|
|
<div class="listItem">
|
|
|
<div class="itemName">合计</div>
|
|
<div class="itemName">合计</div>
|
|
|
<div class="itemValue">
|
|
<div class="itemValue">
|
|
|
- {{ total }} 积分
|
|
|
|
|
- <span style="color: red;"v-if="money">+ {{ totalMoney }}元</span>
|
|
|
|
|
|
|
+ {{ money ? userInfo.surplusIntegral : total }}
|
|
|
|
|
+ <span style="color: red;" v-if="money">+{{ money }}元</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -416,12 +411,8 @@
|
|
|
<div class="itemValue">{{ couponName }}</div>
|
|
<div class="itemValue">{{ couponName }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
|
- <div class="itemName">商品</div>
|
|
|
|
|
- <div class="itemValue">
|
|
|
|
|
- {{ data.price }} 积分
|
|
|
|
|
- <span style="color: red;" v-if="money">+ {{ money }} 元</span>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <div class="itemName">商品积分</div>
|
|
|
|
|
+ <div class="itemValue">{{ data.price }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
|
<div class="itemName">商品数量</div>
|
|
<div class="itemName">商品数量</div>
|
|
@@ -441,8 +432,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
|
<div class="itemName">合计</div>
|
|
<div class="itemName">合计</div>
|
|
|
- <div class="itemValue">{{ total }} 积分<span style="color: red;"
|
|
|
|
|
- v-if="money">+ {{ totalMoney }}元</span></div>
|
|
|
|
|
|
|
+ <div class="itemValue">{{ money ? userInfo.surplusIntegral : total }}<span style="color: red;"
|
|
|
|
|
+ v-if="money">+{{ money }}元</span></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -462,7 +453,7 @@
|
|
|
<div class="item-right">
|
|
<div class="item-right">
|
|
|
<div class="up">
|
|
<div class="up">
|
|
|
<div>应付金额</div>
|
|
<div>应付金额</div>
|
|
|
- <div style="color: #fe2c55;margin-left: 8px;">¥ {{ totalMoney }}</div>
|
|
|
|
|
|
|
+ <div style="color: #fe2c55;margin-left: 8px;">¥ {{ money }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="down">
|
|
<div class="down">
|
|
|
<img style="height: 18px;" src="../../assets/icon/weixinPay.png" alt="weixinpay">
|
|
<img style="height: 18px;" src="../../assets/icon/weixinPay.png" alt="weixinpay">
|
|
@@ -520,7 +511,6 @@ export default {
|
|
|
recharge: false,
|
|
recharge: false,
|
|
|
//充值金额
|
|
//充值金额
|
|
|
money: undefined,
|
|
money: undefined,
|
|
|
- totalMoney: undefined,
|
|
|
|
|
couponName: '',
|
|
couponName: '',
|
|
|
voucher: '',
|
|
voucher: '',
|
|
|
couponList: [],
|
|
couponList: [],
|
|
@@ -614,16 +604,16 @@ export default {
|
|
|
...mapGetters(['userInfo'])
|
|
...mapGetters(['userInfo'])
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- // total(val) {
|
|
|
|
|
- // let surplusIntegral = this.$store.getters.userInfo.surplusIntegral;
|
|
|
|
|
- // let money = (val - surplusIntegral) / 10;
|
|
|
|
|
- // if (money >= 0) {
|
|
|
|
|
- // this.money = money
|
|
|
|
|
- // } else {
|
|
|
|
|
- // this.money = 0
|
|
|
|
|
- // }
|
|
|
|
|
- // console.log(this.money);
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ total(val) {
|
|
|
|
|
+ let surplusIntegral = this.$store.getters.userInfo.surplusIntegral;
|
|
|
|
|
+ let money = (val - surplusIntegral) / 10;
|
|
|
|
|
+ if (money >= 0) {
|
|
|
|
|
+ this.money = money
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.money = 0
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.money);
|
|
|
|
|
+ },
|
|
|
'$route' (to, from) {
|
|
'$route' (to, from) {
|
|
|
// 路由发生变化页面刷新
|
|
// 路由发生变化页面刷新
|
|
|
this.$router.go(0);
|
|
this.$router.go(0);
|
|
@@ -653,8 +643,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
handlePayWxQRcode() { // 获取微信支付二维码
|
|
handlePayWxQRcode() { // 获取微信支付二维码
|
|
|
getWxPayCode({ // 这里根据不同的后端接口去修改
|
|
getWxPayCode({ // 这里根据不同的后端接口去修改
|
|
|
- integral: this.totalMoney * 10,
|
|
|
|
|
- totalFee: this.totalMoney,
|
|
|
|
|
|
|
+ integral: this.money * 10,
|
|
|
|
|
+ totalFee: this.money,
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
let data = res.data.data;
|
|
let data = res.data.data;
|
|
|
this.qrcode(data.payUrl); // 例如:data.payUrl 的值为 "weixin://wxpay/bizpayurl?pr=......",根据这个值生成相对应的微信支付二维码
|
|
this.qrcode(data.payUrl); // 例如:data.payUrl 的值为 "weixin://wxpay/bizpayurl?pr=......",根据这个值生成相对应的微信支付二维码
|
|
@@ -680,7 +670,7 @@ export default {
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: '支付成功!'
|
|
message: '支付成功!'
|
|
|
});
|
|
});
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
|
|
+ this.money = 0;
|
|
|
this.recharge = false;
|
|
this.recharge = false;
|
|
|
clearInterval(this.timer); // 清除定时器;
|
|
clearInterval(this.timer); // 清除定时器;
|
|
|
clearInterval(this.timerPayWxQRcode);
|
|
clearInterval(this.timerPayWxQRcode);
|
|
@@ -730,23 +720,22 @@ export default {
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- // if (this.money) {
|
|
|
|
|
- // this.$confirm('积分不足,差额部分可用现金补齐,是否购买积分?', {
|
|
|
|
|
- // confirmButtonText: '确定',
|
|
|
|
|
- // cancelButtonText: '取消',
|
|
|
|
|
- // type: 'warning'
|
|
|
|
|
- // }).then(() => {
|
|
|
|
|
- // this.recharge = true;
|
|
|
|
|
- // this.$nextTick(function () {
|
|
|
|
|
- // this.handlePayWxQRcode();
|
|
|
|
|
- // // this.qrcode(this.payUrl);
|
|
|
|
|
- // })
|
|
|
|
|
-
|
|
|
|
|
- // }).catch(() => { });
|
|
|
|
|
- // } else {
|
|
|
|
|
- // this.dialogVisible = true;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ if (this.money) {
|
|
|
|
|
+ this.$confirm('积分不足,差额部分可用现金补齐,是否购买积分?', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.recharge = true;
|
|
|
|
|
+ this.$nextTick(function () {
|
|
|
|
|
+ this.handlePayWxQRcode();
|
|
|
|
|
+ // this.qrcode(this.payUrl);
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(() => { });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleChange(value) {
|
|
handleChange(value) {
|
|
@@ -773,7 +762,6 @@ export default {
|
|
|
this.disabled = true;
|
|
this.disabled = true;
|
|
|
if (val == "0" || val == "") {
|
|
if (val == "0" || val == "") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
}
|
|
}
|
|
|
if (val == "1") {
|
|
if (val == "1") {
|
|
@@ -789,13 +777,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (val == "2" || val == "3") {
|
|
if (val == "2" || val == "3") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
|
}
|
|
}
|
|
|
if (val == "4") {
|
|
if (val == "4") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
if (this.phoneNumber) {
|
|
if (this.phoneNumber) {
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
@@ -808,7 +794,6 @@ export default {
|
|
|
this.disabled = true;
|
|
this.disabled = true;
|
|
|
if (val == "0" || val == "") {
|
|
if (val == "0" || val == "") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
}
|
|
}
|
|
|
if (val == "1") {
|
|
if (val == "1") {
|
|
@@ -819,13 +804,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
if (val == "2" || val == "3") {
|
|
if (val == "2" || val == "3") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
|
}
|
|
}
|
|
|
if (val == "4") {
|
|
if (val == "4") {
|
|
|
this.total = this.data.price;
|
|
this.total = this.data.price;
|
|
|
- this.totalMoney = this.money;
|
|
|
|
|
this.skuCount = 1;
|
|
this.skuCount = 1;
|
|
|
if (this.phoneNumber) {
|
|
if (this.phoneNumber) {
|
|
|
this.disabled = false;
|
|
this.disabled = false;
|
|
@@ -837,9 +820,6 @@ export default {
|
|
|
setTab("exchange");
|
|
setTab("exchange");
|
|
|
},
|
|
},
|
|
|
changeCount(val) {
|
|
changeCount(val) {
|
|
|
- if(this.money){
|
|
|
|
|
- this.totalMoney = ((this.money * 100) * val)/ 100;
|
|
|
|
|
- }
|
|
|
|
|
this.total = this.data.price * val;
|
|
this.total = this.data.price * val;
|
|
|
if (
|
|
if (
|
|
|
this.deliveryType == "1" &&
|
|
this.deliveryType == "1" &&
|
|
@@ -870,8 +850,6 @@ export default {
|
|
|
this.address = this.contactInfo.contactAddr;
|
|
this.address = this.contactInfo.contactAddr;
|
|
|
}
|
|
}
|
|
|
this.total = response.data.data.price;
|
|
this.total = response.data.data.price;
|
|
|
- this.money = 12.34;
|
|
|
|
|
- this.totalMoney = 12.34;
|
|
|
|
|
let imgs = response.data.data.imgs;
|
|
let imgs = response.data.data.imgs;
|
|
|
if (imgs) {
|
|
if (imgs) {
|
|
|
imgs.forEach(element => {
|
|
imgs.forEach(element => {
|
|
@@ -1248,8 +1226,6 @@ img {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
color: #1e80ff;
|
|
color: #1e80ff;
|
|
|
- /* color: red; */
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
.footer {
|