From 66b112f80fc90c836bada869d3219977974ebe07 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Tue, 4 Jul 2023 14:57:14 +0800
Subject: [PATCH] fix
---
components/filter-popup/filter-popup.vue | 15 ++++++++++++++-
config/request.js | 6 +++---
libs/util.js | 2 +-
order/addCourse/addCourse.vue | 11 ++++++-----
order/editCourse/editCourse.vue | 1 -
order/orderDetail/orderDetail.vue | 2 ++
order/shopCart/shopCart.vue | 2 ++
pages.json | 2 +-
pages/orders/orders.vue | 13 +++++++++++--
pages/plans/plans.vue | 6 +++---
team/scheme/scheme.vue | 1 +
11 files changed, 44 insertions(+), 17 deletions(-)
diff --git a/components/filter-popup/filter-popup.vue b/components/filter-popup/filter-popup.vue
index 70ce029..636217d 100644
--- a/components/filter-popup/filter-popup.vue
+++ b/components/filter-popup/filter-popup.vue
@@ -207,6 +207,20 @@ export default {
e.title = e.disciplineName
})
this.categories.push(list)
+
+ const res = await courseProfessionalClass(1)
+ res.list.map(e => {
+ e.id = e.professionalClassId
+ e.title = e.professionalClassName
+ })
+ this.categories.push(res.list)
+
+ const res1 = await courseProfessional(1)
+ res1.list.map(e => {
+ e.id = e.professionalId
+ e.title = e.professionalName
+ })
+ this.categories.push(res1.list)
},
// 学科专业确定回调
change(e) {
@@ -233,7 +247,6 @@ export default {
// 学科专业切换回调
async columnchange(e) {
const { column } = e.detail
- console.log('change',column)
if (column == 0) {
const { list } = await courseProfessionalClass(this.categories[0][e.detail.value].id)
list.map(e => {
diff --git a/config/request.js b/config/request.js
index a729790..6f3a944 100644
--- a/config/request.js
+++ b/config/request.js
@@ -5,9 +5,9 @@
*/
export default {
- // baseURL: 'https://huorantech.cn/',
- // baseURL: 'http://192.168.31.51:9000/',
- baseURL: 'http://121.37.12.51/',
+ baseURL: 'https://huorantech.cn/',
+ // baseURL: 'http://192.168.31.152:9000/',
+ // baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},
diff --git a/libs/util.js b/libs/util.js
index ebf5089..c2969a6 100644
--- a/libs/util.js
+++ b/libs/util.js
@@ -68,7 +68,7 @@ export default {
getBmName(val) {
return uni.getStorageSync('team').partnerClassificationName
},
- // 返回图标。如果有图标,则直接返回,否则判断是否是数据产品,即productType=2,如果是,则取数据图标,否则则显示通用图标,这两个图标都在config/product.js里有配置
+ // 返回图标。如果有图标,则直接返回
getIcon(e) {
return e.appletIcon || Product.normalIcon
},
diff --git a/order/addCourse/addCourse.vue b/order/addCourse/addCourse.vue
index 71f5934..d615d11 100644
--- a/order/addCourse/addCourse.vue
+++ b/order/addCourse/addCourse.vue
@@ -279,16 +279,17 @@
console.log(44, e)
const classId = e.classificationId
const pid = +e.associatedProduct
+ const { mallId } = e
if (classId == 1 || classId == 2) {
- list1.push(pid)
+ list1.push(mallId)
} else if (classId == 3) {
- list2.push(pid)
+ list2.push(mallId)
} else if (classId == 4) {
- list3.push(pid)
+ list3.push(mallId)
} else if (classId == 5) {
- list0.push(pid)
+ list0.push(mallId)
} else if (classId == 6) {
- list4.push(pid)
+ list4.push(mallId)
}
result.push(this.createParam(e, this.$util.getOrderType(classId)))
resolve()
diff --git a/order/editCourse/editCourse.vue b/order/editCourse/editCourse.vue
index b9ee743..ebfb681 100644
--- a/order/editCourse/editCourse.vue
+++ b/order/editCourse/editCourse.vue
@@ -143,7 +143,6 @@
courses['list' + e.authority].list.push(e)
})
this.courses = courses
- console.log('editCourse', this.courses)
}).catch(e => {})
try {
uni.removeStorageSync('courses')
diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue
index ba461dd..e2100e4 100644
--- a/order/orderDetail/orderDetail.vue
+++ b/order/orderDetail/orderDetail.vue
@@ -809,8 +809,10 @@
}
}
.ship-info {
+ height: 400rpx;
padding: 20rpx;
white-space: pre-wrap;
font-size: 28rpx;
+ overflow: auto;
}
diff --git a/order/shopCart/shopCart.vue b/order/shopCart/shopCart.vue
index b7d2540..c78ab09 100644
--- a/order/shopCart/shopCart.vue
+++ b/order/shopCart/shopCart.vue
@@ -58,6 +58,7 @@
}
},
onShow() {
+ this.checked = []
// 清除产品缓存
try {
uni.removeStorageSync('orderForm')
@@ -164,6 +165,7 @@
submit() {
const list = this.checked // 已选产品
if (list.length) {
+ // 判断勾选的产品是否有重复的
if (new Set(list.map(e => e.mallId)).size !== list.length) return this.$util.errMsg('所选产品存在重复,请重新选择')
const promises = []
diff --git a/pages.json b/pages.json
index 7df87e2..6be1e49 100644
--- a/pages.json
+++ b/pages.json
@@ -251,7 +251,7 @@
"path" : "scheme/scheme",
"style" :
{
- "navigationBarTitleText": "",
+ "navigationBarTitleText": "方案详情",
"enablePullDownRefresh": false
}
},
diff --git a/pages/orders/orders.vue b/pages/orders/orders.vue
index 2e1c8a5..5d535c2 100644
--- a/pages/orders/orders.vue
+++ b/pages/orders/orders.vue
@@ -1,5 +1,5 @@
-
+
@@ -60,6 +60,7 @@
+ 功能升级中,敬请期待...
@@ -69,6 +70,7 @@
export default {
data() {
return {
+ per: true, // 是否有权限
popup: false,
//筛选表单数据
filterData: [
@@ -143,6 +145,7 @@
}
},
onShow() {
+ this.per = true
// 清除产品缓存
try {
uni.removeStorageSync('orderForm')
@@ -153,8 +156,11 @@
methods: {
// 初始化权限
initRole() {
- this.tabs = []
const auth = uni.getStorageSync('auth')
+ if (!auth.includes('订单')) {
+ this.per = false
+ }
+ this.tabs = []
auth.includes('订单:我的订单') && this.tabs.push({
name: '我的订单',
id: 0
@@ -309,4 +315,7 @@
color: #bdbdbd;
}
}
+.oh {
+ overflow: hidden;
+}
diff --git a/pages/plans/plans.vue b/pages/plans/plans.vue
index 3e529b4..b40f1db 100644
--- a/pages/plans/plans.vue
+++ b/pages/plans/plans.vue
@@ -17,8 +17,8 @@
产品:
-
- {{ item.toggle ? '收起' : '展开' }}
+ {{ item.productNames }}
+ {{ item.toggle ? '收起' : '展开' }}
@@ -109,7 +109,7 @@
// 未加载完所有数据,并且不是筛选,则拼接list,否则直接赋值
const list = data.records
list.forEach(e => {
- e.toggle = false
+ if (e.productNames) e.toggle = e.productNames.length < 14 // 超过了14个字才需要显示展开按钮
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // 每次获取了数据后page+1
diff --git a/team/scheme/scheme.vue b/team/scheme/scheme.vue
index 7e32fe9..380996e 100644
--- a/team/scheme/scheme.vue
+++ b/team/scheme/scheme.vue
@@ -36,6 +36,7 @@
title: '加载中'
})
schemeFindById(this.id).then(({ data }) => {
+ if (data.productList) data.product = data.productList.map(e => e.productName).join('、')
this.form = data
uni.hideLoading()
}).catch(e => {