确认订单中 增加商品数量修改 运费
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "orderCoupon",
|
||||
props: ["list", "curCouponId", "sumMeony", "addressId",'selectcouponList'],
|
||||
props: ["list", "curCouponId", "sumMeony",'selectcouponList'],
|
||||
data() {
|
||||
return {
|
||||
youhuiShow: true,
|
||||
|
||||
@@ -6,9 +6,9 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
@@ -20,8 +20,8 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
||||
// baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
|
||||
// baseUrl = "ws://twin-ui.com:6001/";
|
||||
// socketUrl = "ws://twin-ui.com:6001/";
|
||||
}
|
||||
|
||||
@@ -40,9 +40,9 @@ let $http = new request({
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
// 'project_token': base.projectToken, //项目token(可删除)
|
||||
},
|
||||
timeout:'15000' // 15秒
|
||||
|
||||
});
|
||||
timeout: '15000' // 15秒
|
||||
|
||||
});
|
||||
// 添加获取七牛云token的方法
|
||||
$http.getQnToken = function(callback) {
|
||||
//该地址需要开发者自行配置(每个后台的接口风格都不一样)
|
||||
@@ -148,13 +148,13 @@ $http.requestEnd = function(options) {
|
||||
let loginPopupNum = 0;
|
||||
//所有接口数据处理(此方法需要开发者根据各自的接口返回类型修改,以下只是模板)
|
||||
$http.dataFactory = async function(res) {
|
||||
// console.log("接口请求数据", {
|
||||
// url: res.url,
|
||||
// resolve: res.response,
|
||||
// header: res.header,
|
||||
// data: res.data,
|
||||
// method: res.method,
|
||||
// });
|
||||
console.log("接口请求数据", {
|
||||
url: res.url,
|
||||
resolve: res.response,
|
||||
header: res.header,
|
||||
data: res.data,
|
||||
method: res.method,
|
||||
});
|
||||
if (res.response.statusCode && res.response.statusCode == 200) {
|
||||
let httpData = res.response.data;
|
||||
if (typeof(httpData) == "string") {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.0.31",
|
||||
"versionCode" : 1031,
|
||||
"versionName" : "1.0.32",
|
||||
"versionCode" : 1032,
|
||||
"app-plus" : {
|
||||
"nvueCompiler" : "weex",
|
||||
"compatible" : {
|
||||
|
||||
@@ -276,7 +276,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom jf_box" v-if="v.type == 4&&initData.user.jf>0">
|
||||
<view
|
||||
class="bottom jf_box"
|
||||
v-if="v.type == 4 && initData.user.jf > 0"
|
||||
>
|
||||
<view class="jf_box">
|
||||
<text style="color: #258feb; font-weight: 600"
|
||||
>可用积分({{ jfNumberMax }}分)</text
|
||||
@@ -599,7 +602,6 @@
|
||||
v-if="showCouponPup"
|
||||
:sumMeony="totalPrice"
|
||||
:selectcouponList="selectcouponList"
|
||||
:addressId="addressId"
|
||||
:curCouponId="curCouponId"
|
||||
:list="couponHistoryList"
|
||||
ref="orderCoupon"
|
||||
@@ -966,7 +968,12 @@ export default {
|
||||
title: res.errMsg,
|
||||
icon: "none",
|
||||
});
|
||||
await this.getTotalPrice();
|
||||
if (this.isShowAddress) {
|
||||
await this.getUserAddress();
|
||||
} else {
|
||||
await this.getTotalPrice();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (res.code == 0) {
|
||||
@@ -1006,7 +1013,11 @@ export default {
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
await this.getTotalPrice();
|
||||
if (this.isShowAddress) {
|
||||
await this.getUserAddress();
|
||||
} else {
|
||||
await this.getTotalPrice();
|
||||
}
|
||||
// await that.getDetailInfo();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -1153,6 +1164,10 @@ export default {
|
||||
console.log("res at line 374:", res);
|
||||
if (res.code == 0) {
|
||||
this.initData = res.data;
|
||||
console.log(
|
||||
"this.initData at line 初始化课程订单信息:",
|
||||
this.initData
|
||||
);
|
||||
this.isShowAddress = res.data.is_course ? false : true;
|
||||
if (!this.isShowAddress && !this.options.isFudu) {
|
||||
this.priceBreakdownList.push({
|
||||
@@ -1162,11 +1177,7 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.isShowAddress) {
|
||||
await this.getUserAddress();
|
||||
} else {
|
||||
// await this.getTotalPrice();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
@@ -1230,6 +1241,7 @@ export default {
|
||||
this.addressData = this.defaultAddressList;
|
||||
}
|
||||
console.log("this.addressData at line 742:", this.addressData);
|
||||
|
||||
if (this.defaultAddressList.id) {
|
||||
console.log("有默认地址");
|
||||
await this.getFreightNum();
|
||||
@@ -1319,14 +1331,13 @@ export default {
|
||||
this.jfNumberMax = that.totalPrice - couponAmount;
|
||||
console.log("this.jfNumberMax at line 1303:", this.jfNumberMax);
|
||||
} else {
|
||||
if(this.initData.user.jf>=couponAmount){
|
||||
this.jfNumber = this.initData.user.jf - couponAmount;
|
||||
this.jfNumberMax = this.initData.user.jf - couponAmount;
|
||||
}else{
|
||||
this.jfNumber=this.initData.user.jf
|
||||
this.jfNumberMax=this.initData.user.jf
|
||||
if (this.initData.user.jf >= couponAmount) {
|
||||
this.jfNumber = this.initData.user.jf - couponAmount;
|
||||
this.jfNumberMax = this.initData.user.jf - couponAmount;
|
||||
} else {
|
||||
this.jfNumber = this.initData.user.jf;
|
||||
this.jfNumberMax = this.initData.user.jf;
|
||||
}
|
||||
|
||||
}
|
||||
if (that.jfNumber == 0 || that.jfNumber == null) {
|
||||
that.jfNumberShow = "0.00";
|
||||
@@ -1337,7 +1348,7 @@ export default {
|
||||
}
|
||||
that.actualPayment = that.actualPayment + that.freightNum;
|
||||
} else {
|
||||
that.actualPayment = that.totalPrice + that.freightNum;
|
||||
that.actualPayment = that.totalPrice + that.freightNum - couponAmount;
|
||||
}
|
||||
|
||||
// console.log('couponAmount优惠券金额',couponAmount);
|
||||
|
||||
Reference in New Issue
Block a user