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