复读价格问题
This commit is contained in:
@@ -300,15 +300,6 @@
|
||||
<span v-if="orderContet.jfDeduction > 0">-</span> <span>¥</span
|
||||
>{{ orderContet.jfDeduction }}
|
||||
</view>
|
||||
<!-- <view class="orderReal">
|
||||
<span style="color: #666; margin-right: 10rpx; float: left"
|
||||
>优惠券 :
|
||||
</span>
|
||||
<b v-if="orderContet.coupon.couponAmount" style="color: #dd3c0c"
|
||||
><span>-¥</span>{{ orderContet.coupon.couponAmount }}</b
|
||||
>
|
||||
<b v-else style="color: #dd3c0c"><span>-¥</span>0</b>
|
||||
</view> -->
|
||||
<view class="orderReal" v-if="orderContet.orderStatus != 0">
|
||||
<span style="color: #666; margin-right: 10rpx; float: left"
|
||||
>实付款 :
|
||||
|
||||
@@ -610,7 +610,9 @@
|
||||
textList: [], //转化文字集合
|
||||
//存储解析后的内容
|
||||
parsedContent: '',
|
||||
images: []
|
||||
images: [],
|
||||
//复读的id
|
||||
fuduId: null
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -701,11 +703,6 @@
|
||||
currentIndex: index // 当前图片的索引
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async request(){
|
||||
var newCertificate = await this.getCertificateInfo()
|
||||
this.selfStudyCertificate = []
|
||||
@@ -1054,19 +1051,6 @@
|
||||
this.currentCateIndex = courseIndex;
|
||||
let _myurl = ''
|
||||
_myurl = '/pages/course/chapterDetailAndorid'
|
||||
// if (this.librayList[this.curIndex].type == 0 ||this.librayList[this.curIndex].isBuy == 1 || v.isAudition == 1 || this.userVip!=null) {
|
||||
// let noRecored = false
|
||||
// v.isAudition == 1 && this.userVip==null && this.librayList[this.curIndex].isBuy == 0 ?
|
||||
// noRecored = true : ''
|
||||
// uni.navigateTo({
|
||||
// url: `${_myurl}?navTitle=${this.pageTitle}&title=${v.title}&courseId=${this.courseId}&id=${v.id}&conditions=${v.conditions}&noRecored=${noRecored}`,
|
||||
// });
|
||||
// } else if (this.userVip==null && this.librayList[this.curIndex].type == 2) {
|
||||
// this.$commonJS.showToast("请开通VIP后观看本课程");
|
||||
// } else {
|
||||
// this.$commonJS.showToast("请先购买课程");
|
||||
// }
|
||||
|
||||
let noRecored = false;
|
||||
v.isAudition == 1 && this.userVip==null && this.librayList[this.curIndex].isBuy == 0 ? noRecored = true : ''
|
||||
if(this.userVip){
|
||||
@@ -1098,7 +1082,8 @@
|
||||
typeId: 0,
|
||||
navTitle: this.course.title,
|
||||
title: this.course.title,
|
||||
isFudu: this.isFudu
|
||||
isFudu: this.isFudu,
|
||||
fuduId: this.fuduId
|
||||
}); // 这里转换成 字符串
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/order/index?data=${mynavData}`,
|
||||
@@ -1865,6 +1850,8 @@
|
||||
this.$refs.commonSelectGoods.open();
|
||||
this.isFudu = true
|
||||
this.show = true;
|
||||
//存复读需要的id
|
||||
this.fuduId = item.id;
|
||||
}else{
|
||||
this.show = false
|
||||
this.isFudu = false
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
v-for="(v, i) in goodsDataList"
|
||||
>
|
||||
<span
|
||||
v-if="v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null"
|
||||
v-if="v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null&&!options.isFudu"
|
||||
style="
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
@@ -84,38 +84,11 @@
|
||||
style="justify-content: space-between; position: relative"
|
||||
>
|
||||
<view class="curriulum_title">{{ v.productName }} </view>
|
||||
<!-- <view
|
||||
style="
|
||||
width: 120rpx !important;
|
||||
text-align: right;
|
||||
padding-top: 10rpx;
|
||||
"
|
||||
class=" "
|
||||
>
|
||||
<view class="">
|
||||
¥{{
|
||||
v.activityPrice && v.activityPrice > 0
|
||||
? v.activityPrice
|
||||
: v.price
|
||||
}}
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view
|
||||
v-if="v.activityPrice > 0 && v.activityPrice < v.price"
|
||||
style="
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
top: 45rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
font-size: 24rpx;
|
||||
"
|
||||
>原价:¥{{ v.price }}</view> -->
|
||||
</view>
|
||||
<view>
|
||||
<text
|
||||
v-if="
|
||||
v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null
|
||||
v.isVipPrice == 1 && v.vipPrice != 0 && v.vipPrice != null&&!options.isFudu
|
||||
"
|
||||
>
|
||||
<text style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||
@@ -136,7 +109,7 @@
|
||||
>
|
||||
</text>
|
||||
|
||||
<text v-else-if="v.activityPrice && v.activityPrice > 0">
|
||||
<text v-else-if="v.activityPrice && v.activityPrice > 0&&!options.isFudu">
|
||||
<text style="color: #e97512; font-size: 12px; font-weight: bold"
|
||||
>¥{{ v.activityPrice.toFixed(2) }}</text
|
||||
>
|
||||
@@ -823,68 +796,96 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getGoodsList() {
|
||||
this.$http
|
||||
.request({
|
||||
// url: "book/buyOrder/calculateTransportPrice/",
|
||||
url: "/book/buyOrder/getShopProductListByIds",
|
||||
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
productIds: this.options.goods.map((e) => e.productId).toString(),
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
this.goodsDataList = res.shopProductList;
|
||||
console.log("this.goodsDataList at line 780:", this.goodsDataList);
|
||||
await this.getVipFei();
|
||||
await this.getDistrictAmount();
|
||||
await this.getActiveCouponList();
|
||||
var list = [...this.goodsDataList];
|
||||
list = list.map((e) => e.goodsType);
|
||||
this.haveCourse = list.some((ele) => ele === "05");
|
||||
|
||||
if (this.options.sourceType == "curriculum") {
|
||||
this.goToInfo = {
|
||||
url: "/pages/curriculum/order/index/index",
|
||||
type: 2,
|
||||
};
|
||||
} else {
|
||||
this.goToInfo = {
|
||||
url: "/pages/bookShop/orderList",
|
||||
type: 1,
|
||||
};
|
||||
}
|
||||
this.initPrepareOrder();
|
||||
});
|
||||
//判断复读逻辑
|
||||
if(this.options.isFudu){
|
||||
this.$http
|
||||
.request({
|
||||
url: "/common/courseRelearn/relearnShopProductList",
|
||||
method: "POST",
|
||||
data: {
|
||||
catalogueId: this.options.fuduId
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
this.goodsDataList =res.productList.filter((e)=>this.options.goods[0].productName == e.productName);
|
||||
// await this.getVipFei();
|
||||
// await this.getDistrictAmount();
|
||||
await this.getActiveCouponList();
|
||||
var list = [...this.goodsDataList];
|
||||
list = list.map((e) => e.goodsType);
|
||||
this.haveCourse = list.some((ele) => ele === "05");
|
||||
|
||||
if (this.options.sourceType == "curriculum") {
|
||||
this.goToInfo = {
|
||||
url: "/pages/curriculum/order/index/index",
|
||||
type: 2,
|
||||
};
|
||||
} else {
|
||||
this.goToInfo = {
|
||||
url: "/pages/bookShop/orderList",
|
||||
type: 1,
|
||||
};
|
||||
}
|
||||
this.initPrepareOrder();
|
||||
});
|
||||
}else{
|
||||
this.$http
|
||||
.request({
|
||||
url: "/book/buyOrder/getShopProductListByIds",
|
||||
method: "POST",
|
||||
data: {
|
||||
productIds: this.options.goods.map((e) => e.productId).toString(),
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
this.goodsDataList = res.shopProductList;
|
||||
console.log("this.goodsDataList at line 780:", this.goodsDataList);
|
||||
await this.getVipFei();
|
||||
await this.getDistrictAmount();
|
||||
await this.getActiveCouponList();
|
||||
var list = [...this.goodsDataList];
|
||||
list = list.map((e) => e.goodsType);
|
||||
this.haveCourse = list.some((ele) => ele === "05");
|
||||
|
||||
if (this.options.sourceType == "curriculum") {
|
||||
this.goToInfo = {
|
||||
url: "/pages/curriculum/order/index/index",
|
||||
type: 2,
|
||||
};
|
||||
} else {
|
||||
this.goToInfo = {
|
||||
url: "/pages/bookShop/orderList",
|
||||
type: 1,
|
||||
};
|
||||
}
|
||||
this.initPrepareOrder();
|
||||
});
|
||||
}
|
||||
},
|
||||
async getVipFei() {
|
||||
let key = [];
|
||||
let dataToString = "";
|
||||
// console.log(this.adressMoRen, '默认地址')
|
||||
this.goodsDataList.forEach((item, index) => {
|
||||
key.push({
|
||||
productId: item.productId,
|
||||
quantity: this.orderNumber,
|
||||
});
|
||||
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
|
||||
});
|
||||
// console.log(key,'this.adressMoRen.areaidpath')
|
||||
|
||||
await $http
|
||||
.request({
|
||||
// url: "book/buyOrder/calculateTransportPrice/",
|
||||
url: "/book/buyOrder/getVipDiscountAmount",
|
||||
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
productList: key,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
@@ -892,7 +893,6 @@ export default {
|
||||
if (res.code == 0) {
|
||||
console.log("res.code at line 538:", res);
|
||||
this.vipPrice = res.discountAmount;
|
||||
// console.log('需要的运费', res.result)
|
||||
await this.getTotalPrice();
|
||||
}
|
||||
});
|
||||
@@ -949,14 +949,6 @@ export default {
|
||||
},
|
||||
// 查询商品可用优惠券
|
||||
async getActiveCouponList() {
|
||||
// if (this.goodsDataList.length <= 0) {
|
||||
// uni.showToast({
|
||||
// title: "商品参数错误,无法获取优惠券",
|
||||
// icon: "none",
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
var list = [];
|
||||
this.goodsDataList.forEach((e) => {
|
||||
var str = `${e.productId}:${
|
||||
@@ -1124,7 +1116,7 @@ export default {
|
||||
}
|
||||
if (
|
||||
this.goodsDataList[0].activityPrice &&
|
||||
this.goodsDataList[0].activityPrice > 0
|
||||
this.goodsDataList[0].activityPrice > 0 &&!this.options.isFudu
|
||||
) {
|
||||
this.priceBreakdownList.push({
|
||||
text: "活动立减",
|
||||
@@ -1135,7 +1127,7 @@ export default {
|
||||
if (
|
||||
this.goodsDataList[0].isVipPrice &&
|
||||
this.goodsDataList[0].vipPrice &&
|
||||
this.goodsDataList[0].vipPrice > 0
|
||||
this.goodsDataList[0].vipPrice > 0 &&!this.options.isFudu
|
||||
) {
|
||||
this.priceBreakdownList.push({
|
||||
text: "VIP专享立减",
|
||||
@@ -1289,11 +1281,7 @@ export default {
|
||||
var s = 0;
|
||||
var that = this;
|
||||
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
|
||||
s +=
|
||||
// this.goodsDataList[i].activityPrice &&
|
||||
// this.goodsDataList[i].activityPrice > 0
|
||||
// ? this.goodsDataList[i].activityPrice
|
||||
this.goodsDataList[i].price;
|
||||
s += this.goodsDataList[i].price;
|
||||
}
|
||||
that.totalPrice = s * this.orderNumber;
|
||||
var couponAmount = 0;
|
||||
|
||||
@@ -3,13 +3,11 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="新闻详情"></z-nav-bar>
|
||||
<web-view v-if="urlVisible" :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
<web-view v-if="urlVisible" :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
var clear;
|
||||
import {
|
||||
@@ -72,19 +70,13 @@
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
if(this.type == 1 && this.surl != ''){
|
||||
// this.surl = this.newsObj.url
|
||||
this.urlVisible = true
|
||||
this.news = {}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
components: {
|
||||
// musicPlay
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
getData() {
|
||||
|
||||
@@ -1043,7 +1043,6 @@ export default {
|
||||
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`,
|
||||
});
|
||||
}
|
||||
// }
|
||||
},
|
||||
openURL(url) {
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
Reference in New Issue
Block a user