From 1ecc2fc908b9b77cb972a93d5ecee1b86d381c17 Mon Sep 17 00:00:00 2001 From: liuyuan <582976274@qq.com> Date: Fri, 11 Apr 2025 12:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E8=AF=BB=E4=BB=B7=E6=A0=BC=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 4 +- pages/bookShop/orderLCont.vue | 9 -- pages/course/courseDetail.vue | 27 ++---- pages/goods/order/index.vue | 166 ++++++++++++++++------------------ pages/news/newsForwebview.vue | 10 +- pages/peanut/home.vue | 1 - 6 files changed, 87 insertions(+), 130 deletions(-) diff --git a/manifest.json b/manifest.json index e077e9f..83a6719 100644 --- a/manifest.json +++ b/manifest.json @@ -12,8 +12,8 @@ "src" : "图片路径" } ], - "versionName" : "2.0.1", - "versionCode" : 2001, + "versionName" : "2.0.03", + "versionCode" : 2003, "app-plus" : { "nvueCompiler" : "uni-app", "compatible" : { diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue index 31a67bb..1a5afb2 100644 --- a/pages/bookShop/orderLCont.vue +++ b/pages/bookShop/orderLCont.vue @@ -300,15 +300,6 @@ - {{ orderContet.jfDeduction }} - 实付款 : diff --git a/pages/course/courseDetail.vue b/pages/course/courseDetail.vue index da5405a..1027d4f 100644 --- a/pages/course/courseDetail.vue +++ b/pages/course/courseDetail.vue @@ -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 diff --git a/pages/goods/order/index.vue b/pages/goods/order/index.vue index 4880bd1..f1028b5 100644 --- a/pages/goods/order/index.vue +++ b/pages/goods/order/index.vue @@ -46,7 +46,7 @@ v-for="(v, i) in goodsDataList" > {{ v.productName }} - - - + ¥{{ v.activityPrice.toFixed(2) }} @@ -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; diff --git a/pages/news/newsForwebview.vue b/pages/news/newsForwebview.vue index 289100f..f5501d0 100644 --- a/pages/news/newsForwebview.vue +++ b/pages/news/newsForwebview.vue @@ -3,13 +3,11 @@ - - +