diff --git a/api/api.js b/api/api.js
index c5ab3d4..6ec7e2f 100644
--- a/api/api.js
+++ b/api/api.js
@@ -5,7 +5,7 @@ import utils from '../utils/utils.js'
let limit = {}
let debounce = {}
-const models = ['login', 'index', 'image', 'activity', 'coupon', 'order', 'comment', 'bind', 'experience', 'partner', 'info', 'notice']
+const models = ['login', 'index', 'image', 'activity', 'coupon', 'order', 'comment', 'medal', 'bind', 'experience', 'partner', 'info', 'notice']
const config = {
// 示例
@@ -19,6 +19,9 @@ const config = {
queryPeriodList : {url : '/config/queryPeriodList', method : 'GET'},
queryCommentOptionList : {url : '/config/queryCommentOptionList', method : 'GET'},
queryExperienceQuestionList : {url : '/config/queryExperienceQuestionList', method : 'GET'},
+ queryAddressList : {url : '/config/queryAddressList', method : 'GET'},
+ queryAgeList : {url : '/config/queryAgeList', method : 'GET'},
+ queryTimeList : {url : '/config/queryTimeList', method : 'GET'},
}
diff --git a/api/model/index.js b/api/model/index.js
index 713df52..b7c0f41 100644
--- a/api/model/index.js
+++ b/api/model/index.js
@@ -26,6 +26,16 @@ const api = {
url: '/index/queryPolicyById',
method: 'GET',
},
+ // 首页-查询研学日记列表
+ queryJournalList: {
+ url: '/index/queryJournalList',
+ method: 'GET',
+ },
+ // 首页-查询研学日记详情
+ queryJournalById: {
+ url: '/index/queryJournalById',
+ method: 'GET',
+ },
}
export default api
\ No newline at end of file
diff --git a/api/model/medal.js b/api/model/medal.js
new file mode 100644
index 0000000..403c88c
--- /dev/null
+++ b/api/model/medal.js
@@ -0,0 +1,20 @@
+// 我的成就相关接口
+
+const api = {
+ // 我的成就-查询勋章列表
+ queryMedalList: {
+ url: '/medal/queryMedalList',
+ method: 'GET',
+ auth: true,
+ },
+ // 我的成就-点亮勋章
+ lightMedal: {
+ url: '/medal/lightMedal',
+ method: 'POST',
+ auth: true,
+ limit : 500,
+ showLoading : true,
+ },
+}
+
+export default api
\ No newline at end of file
diff --git a/api/model/partner.js b/api/model/partner.js
index 97e5bf3..7a2739d 100644
--- a/api/model/partner.js
+++ b/api/model/partner.js
@@ -35,6 +35,11 @@ const api = {
url: '/partner/queryIndirectList',
method: 'GET',
},
+ // 我的团队-查询佣金记录列表
+ queryCommissionList: {
+ url: '/partner/queryCommissionList',
+ method: 'GET',
+ },
}
export default api
\ No newline at end of file
diff --git a/common.scss b/common.scss
index 2404755..5833ad1 100644
--- a/common.scss
+++ b/common.scss
@@ -77,6 +77,10 @@
border: none;
}
+.nowrap {
+ white-space: nowrap;
+}
+
/deep/ .uv-modal__content {
padding: 0 !important;
}
diff --git a/components/base/posterPopup.vue b/components/base/posterPopup.vue
new file mode 100644
index 0000000..66a33f0
--- /dev/null
+++ b/components/base/posterPopup.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/growing/recordsView.vue b/components/growing/recordsView.vue
index 39722ef..ce1d35e 100644
--- a/components/growing/recordsView.vue
+++ b/components/growing/recordsView.vue
@@ -15,7 +15,7 @@
- {{ record.activityTitle || record.activityId_dictText || '' }}
+ {{ record.name }}
@@ -82,6 +82,7 @@
}
.desc {
+ padding: 12rpx 0 8rpx 0;
font-family: PingFang SC;
font-size: 28rpx;
font-weight: 400;
diff --git a/components/growing/userCard.vue b/components/growing/userCard.vue
index d087878..ba36cd5 100644
--- a/components/growing/userCard.vue
+++ b/components/growing/userCard.vue
@@ -17,7 +17,7 @@
- 学生
+ {{ memberInfo.roleDesc || '' }}
@@ -25,24 +25,17 @@
{{ `ID:${memberInfo.id}` }}
- 8
+ {{ medalCount }}
成就
- 68
+ {{ experienceCount }}
足迹
-
-
-
-
-
-
-
-
+
@@ -52,6 +45,22 @@
import { mapState } from 'vuex'
export default {
+ props: {
+ medalList: {
+ type: Array,
+ default() {
+ return []
+ }
+ },
+ medalCount: {
+ type: Number,
+ default: 0
+ },
+ experienceCount: {
+ type: Number,
+ default: 0
+ },
+ },
data() {
return {
}
@@ -63,8 +72,12 @@
...mapState(['memberInfo']),
},
methods: {
- getData() {
- // todo
+ async getData() {
+ try {
+ await this.$fetch('queryMedalList', { pageNo: 1, pageSize: 1000, isLight: '1', })
+ } catch (err) {
+
+ }
},
onAdd() {
this.$emit('addRecord')
diff --git a/components/home/categoryView.vue b/components/home/categoryView.vue
index e375c3b..271b2af 100644
--- a/components/home/categoryView.vue
+++ b/components/home/categoryView.vue
@@ -1,7 +1,7 @@
-
+
{{ item.label }}
@@ -18,71 +18,52 @@
this.getData()
},
methods: {
- getData() {
+ async getData() {
- // todo: fetch
-
- this.categoryOptions = [
- {
- id: '001',
- icon: '/static/image/temp-1.png',
- label: '主题研学',
- path: `/pages/index/category?categoryId=1962345709817106434`,
- },
- {
- id: '002',
- icon: '/static/image/temp-2.png',
- label: '社会实践',
- path: `/pages/index/category?categoryId=1962346300198948866`,
- },
- {
- id: '003',
- icon: '/static/image/temp-3.png',
- label: '研学交流',
- path: `/pages/index/category?categoryId=1962346769759670273`,
- },
- {
- id: '004',
- icon: '/static/image/temp-4.png',
- label: '周末研学',
- path: `/pages/index/category?categoryId=1962346834884628481`,
- },
- {
- id: '005',
- icon: '/static/image/temp-5.png',
- label: '假期专项',
- path: `/pages/index/category?categoryId=1962346960097185793`,
- },
- {
- id: '006',
- icon: '/static/image/temp-6.png',
- label: '研学日记',
- },
- {
- id: '007',
- icon: '/static/image/temp-7.png',
- label: '研学政策',
- path: `/pages_order/article/search?api=queryPolicyList&title=研学政策`,
- },
- {
- id: '008',
- icon: '/static/image/temp-8.png',
- label: '本地研学',
- path: `/pages/index/category?categoryId=1962347024639135745`,
- },
- {
- id: '009',
- icon: '/static/image/temp-9.png',
- label: '公司动态',
- path: `/pages_order/article/search?api=queryNewsList&title=公司动态`,
- },
- {
- id: '010',
- icon: '/static/image/temp-10.png',
- label: '全部',
- path: `/pages/index/category`,
- },
- ]
+ try {
+ const categorys = (await this.$fetch('queryCategoryList', { pageSize: 6, isShow: '1' }))?.records?.map(item => {
+ const { id, icon, title } = item
+
+ return {
+ id,
+ icon,
+ label: title,
+ path: `/pages/index/category?categoryId=${id}`,
+ }
+ })
+
+ this.categoryOptions = [
+ ...categorys.slice(0, 5),
+ {
+ id: '006',
+ icon: '/static/image/temp-6.png',
+ label: '研学日记',
+ path: `/pages_order/article/search?api=queryJournalList&title=研学日记`,
+ },
+ {
+ id: '007',
+ icon: '/static/image/temp-7.png',
+ label: '研学政策',
+ path: `/pages_order/article/search?api=queryPolicyList&title=研学政策`,
+ },
+ categorys[5],
+ {
+ id: '009',
+ icon: '/static/image/temp-9.png',
+ label: '公司动态',
+ path: `/pages_order/article/search?api=queryNewsList&title=公司动态`,
+ },
+ {
+ id: '010',
+ icon: '/static/image/temp-10.png',
+ label: '全部',
+ path: `/pages/index/category`,
+ },
+ ]
+
+ } catch(err) {
+
+ }
},
onClick(target) {
@@ -121,7 +102,7 @@
.img {
width: 72rpx;
- height: auto;
+ height: 72rpx;
}
}
}
diff --git a/components/home/productView.vue b/components/home/productView.vue
index f5eb9a8..1198ad3 100644
--- a/components/home/productView.vue
+++ b/components/home/productView.vue
@@ -35,6 +35,7 @@
diff --git a/components/home/recommendView.vue b/components/home/recommendView.vue
index 274ce93..c4a80b8 100644
--- a/components/home/recommendView.vue
+++ b/components/home/recommendView.vue
@@ -22,9 +22,6 @@
},
methods: {
getData() {
-
- // todo: fetch
-
this.recommendList = [
{
id: '001',
@@ -49,7 +46,6 @@
path: `/pages_order/product/search?isNew=1&title=新上线路`,
},
]
-
},
onClick(target) {
const { path } = target
diff --git a/components/partner/posterPopup.vue b/components/partner/posterPopup copy.vue
similarity index 97%
rename from components/partner/posterPopup.vue
rename to components/partner/posterPopup copy.vue
index bba815b..aced6a7 100644
--- a/components/partner/posterPopup.vue
+++ b/components/partner/posterPopup copy.vue
@@ -45,12 +45,12 @@
close() {
this.$refs.popup.close();
},
- async fetchQrCode(path) {
- // todo: delete
- this.wxCodeImage = 'https://uploadfile.bizhizu.cn/up/e3/64/e0/e364e0f7f6af11f11abdafc22d17b15c.jpg'
- return
+ async fetchQrCode() {
+ // // todo: delete
+ // this.wxCodeImage = 'https://uploadfile.bizhizu.cn/up/e3/64/e0/e364e0f7f6af11f11abdafc22d17b15c.jpg'
+ // return
try {
- const path = `pages/index/index?userId=${this.userInfo.id}`
+ const path = `pages/index/index?shareId=${this.userInfo.id}`
this.wxCodeImage = (await this.$fetch('getInviteCode', { path }))?.url
} catch (err) {
diff --git a/components/product/productCard.vue b/components/product/productCard.vue
index 2033860..51c64b4 100644
--- a/components/product/productCard.vue
+++ b/components/product/productCard.vue
@@ -49,11 +49,6 @@
return {}
}
},
- // todo: fetch
- isCollected: {
- type: Boolean,
- default: false,
- },
size: {
type: String,
default: 'normal' // normal | small
@@ -64,6 +59,7 @@
isMove: false,
startClientX: null,
displayX: 0,
+ collectBtnVisible: false,
}
},
computed: {
@@ -84,6 +80,9 @@
let frac = this.data.priceDiscount % this.priceInt
return frac > 0 ? frac.toFixed(2).slice(1) : ''
},
+ isCollected() {
+ return this.data.isCollection == '1'
+ },
collectBtnWidth() {
return this.isCollected ? 80 : 56
},
@@ -98,7 +97,7 @@
const translateX = 100 - display
return `width: ${width}px; transform: translateX(${translateX}%); background: ${background};`
- }
+ },
},
methods: {
onTouchstart(e) {
@@ -120,11 +119,21 @@
this.isMove = true
},
onTouchend() {
- console.log('displayX', this.displayX, this.collectBtnWidth, this.displayX < this.collectBtnWidth)
+
+ if (!this.isMove && !this.collectBtnVisible) {
+ this.onRegistrate()
+ }
+
if (this.displayX < this.collectBtnWidth) {
this.displayX = 0
}
+ if (this.displayX) {
+ this.collectBtnVisible = true
+ } else {
+ this.collectBtnVisible = false
+ }
+
this.isMove = false
},
showCollectBtn() {
@@ -134,23 +143,10 @@
this.displayX = 0
},
async onCollect() {
- console.log('onCollect')
-
try {
- let succ
-
- if (this.isCollected) {
- // todo: fetch cancel collect
- succ = true
- uni.showToast({
- icon: 'success',
- title: '已移除收藏',
- });
- } else {
- succ = await this.$store.dispatch('collect', this.data.id)
- }
+ let succ = await this.$store.dispatch('collect', this.data.id)
succ && this.hiddenCollectBtn()
this.$emit('collect', !this.isCollected)
diff --git a/mixins/list.js b/mixins/list.js
index 23bb70e..5746843 100644
--- a/mixins/list.js
+++ b/mixins/list.js
@@ -61,6 +61,12 @@ export default {
this.total = res.result.total || res.result.length
// 调用数据加载完成的回调
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
+ } else {
+ // 更新列表数据
+ this[this.mixinsListKey || 'list'] = []
+ // 更新总数
+ this.total = 0
+ error(res)
}
})
})
diff --git a/pages.json b/pages.json
index 6c3f261..6a6f172 100644
--- a/pages.json
+++ b/pages.json
@@ -52,6 +52,9 @@
{
"path": "auth/wxUserInfo"
},
+ {
+ "path": "auth/roleChoose"
+ },
{
"path": "auth/loginAndRegisterAndForgetPassword"
},
diff --git a/pages/index/category.vue b/pages/index/category.vue
index dae4706..35f5942 100644
--- a/pages/index/category.vue
+++ b/pages/index/category.vue
@@ -22,7 +22,7 @@
至
@@ -62,22 +66,22 @@
- {{ startDate ? $dayjs(startDate).format('YYYY-MM-DD') : '开始日期' }}
-
至
- {{ endDate ? $dayjs(endDate).format('YYYY-MM-DD') : '结束日期' }}
-
+ {{ dateHigh ? $dayjs(dateHigh).format('YYYY-MM-DD') : '结束日期' }}
+
@@ -187,19 +191,19 @@
data() {
return {
current: 0,
- startPrice: null,
- endPrice: null,
- startDate: null,
- endDate: null,
+ priceLow: null,
+ priceHigh: null,
+ dateLow: null,
+ dateHigh: null,
minTime: new Date().getTime(),
queryParams: {
pageNo: 1,
pageSize: 1000,
- // todo
sort: 'comprehensive',
},
categoryList: [],
filters: [],
+ addressOptionsConfig: {},
isFold: true,
}
},
@@ -230,167 +234,52 @@
} catch(err) {
this.categoryList = []
}
- return
-
- this.categoryList = [
- {
- "key": "1962345168240185345",
- "title": "国际游",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345225345634305",
- "title": "夏令营",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345290571255810",
- "title": "周末营",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345372007862273",
- "title": "周边游",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345497681793025",
- "title": "定制游",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345589524467714",
- "title": "周末活动",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345642188148737",
- "title": "亲子活动",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962345709817106434",
- "title": "主题研学",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962346300198948866",
- "title": "社会实践",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962346769759670273",
- "title": "研学交流",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962346834884628481",
- "title": "周末研学",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962346960097185793",
- "title": "假期专享",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- },
- {
- "key": "1962347024639135745",
- "title": "本地研学",
- "icon": null,
- "parentId": "0",
- "value": null,
- "code": null,
- "children": null,
- "leaf": true
- }
- ].map(item => {
- const { key, title } = item
-
- return {
- id: key,
- name: title,
- children: []
- }
- })
-
},
async fetchFilters() {
+ let fetchs = [
+ this.$fetch('queryAddressList', { pageNo: 1, pageSize: 1000, pid: '0' }),
+ this.$fetch('queryAgeList', { pageNo: 1, pageSize: 1000 }),
+ this.$fetch('queryTimeList', { pageNo: 1, pageSize: 1000 }),
+ ]
+ const results = (await Promise.allSettled(fetchs))
+ .map(res => {
+ return res.value.records.map(item => {
+ return {
+ id: item.id,
+ label: item.title,
+ }
+ })
+ })
+ console.log('results', results)
+
+ fetchs = results[0].map(item => {
+ return this.$fetch('queryAddressList', { pageNo: 1, pageSize: 1000, pid: item.id })
+ })
+ const addressResults = (await Promise.allSettled(fetchs))
+ .map(res => {
+ return res.value.records.map(item => {
+ return {
+ id: item.id,
+ label: item.title,
+ }
+ })
+ })
+ console.log('addressResults', addressResults)
+ const addressOptionsConfig = addressResults.reduce((obj, records, index) => {
+ obj[results[0][index].id] = records
+ return obj
+ }, {})
+
+ this.addressOptionsConfig = addressOptionsConfig
+ console.log('addressOptionsConfig', addressOptionsConfig)
+
this.filters = [
{
id: '001',
key: 'frontier',
label: '国境',
- options: [
- {
- id: '00101',
- label: '国内',
- },
- {
- id: '00102',
- label: '国外',
- },
- ],
+ options: results[0],
},
{
id: '002',
@@ -400,30 +289,7 @@
{
label: '全部',
},
- {
- id: '00201',
- label: '上海',
- },
- {
- id: '00202',
- label: '北京',
- },
- {
- id: '00203',
- label: '浙江省',
- },
- {
- id: '00204',
- label: '广东省',
- },
- {
- id: '00205',
- label: '广西省',
- },
- {
- id: '00206',
- label: '云南省',
- },
+ ...addressOptionsConfig[results[0][0].id]
],
},
{
@@ -434,22 +300,7 @@
{
label: '全部',
},
- {
- id: '00301',
- label: '6-10岁',
- },
- {
- id: '00302',
- label: '11-14岁',
- },
- {
- id: '00303',
- label: '15-16岁',
- },
- {
- id: '00304',
- label: '17-18岁',
- },
+ ...results[1]
],
},
{
@@ -460,22 +311,7 @@
{
label: '全部',
},
- {
- id: '00401',
- label: '1日',
- },
- {
- id: '00402',
- label: '多日',
- },
- {
- id: '00403',
- label: '寒假',
- },
- {
- id: '00404',
- label: '暑假',
- },
+ ...results[2],
],
},
{
@@ -489,6 +325,7 @@
label: '出发日期',
},
]
+ console.log('filters', this.filters)
this.filters.forEach(item => {
const { key, options } = item
@@ -500,11 +337,39 @@
this.queryParams[key] = options[0].id
})
- // todo: fetch
},
async queryProductList(categoryId) {
try {
- return (await this.$fetch('queryActivityList', { ...this.queryParams, categoryId }))?.records || []
+ const {
+ frontier,
+ addressId,
+ sort,
+ ...params
+ } = this.queryParams
+
+ params.addressId = addressId || frontier
+ params.categoryId = categoryId
+
+ switch(sort) {
+ // 销量排序(saleOrder):0-从高到低 1-从低到高
+ case 'sale-desc': // 销量排序 - 降序
+ params.saleOrder = '0'
+ break
+ case 'sale-asc': // 销量排序 - 升序
+ params.saleOrder = '1'
+ break
+ // 价格排序(priceOrder):0-从高到低 1-从低到高
+ case 'price-desc': // 销量排序 - 降序
+ params.priceOrder = '0'
+ break
+ case 'price-asc': // 销量排序 - 升序
+ params.priceOrder = '1'
+ break
+ default:
+ break
+ }
+
+ return (await this.$fetch('queryActivityList', params))?.records || []
} catch (err) {
return []
}
@@ -532,6 +397,33 @@
} else {
delete this.queryParams[key]
}
+
+ if (key === 'frontier') {
+ this.filters[1].options = [
+ {
+ label: '全部',
+ },
+ ...this.addressOptionsConfig[val]
+ ]
+ delete this.queryParams.addressId
+ }
+
+ this.initList()
+ },
+ onStartPriceChange(value) {
+ if (value) {
+ this.queryParams.priceLow = value
+ } else {
+ delete this.queryParams.priceLow
+ }
+ this.initList()
+ },
+ onEndPriceChange(value) {
+ if (value) {
+ this.queryParams.priceHigh = value
+ } else {
+ delete this.queryParams.priceHigh
+ }
this.initList()
},
openStartDatePicker() {
@@ -540,21 +432,21 @@
onStartDateChange(e) {
const date = e.value
- this.queryParams.startDate = date
+ this.queryParams.dateLow = $dayjs(date).format('YYYY-MM-DD')
- const { endDate } = this.queryParams
+ const { dateHigh } = this.queryParams
- if (endDate && this.$dayjs(date).isAfter(endDate, 'day')) {
- this.endDate = null
- delete this.queryParams.endDate
+ if (dateHigh && this.$dayjs(date).isAfter(dateHigh, 'day')) {
+ this.dateHigh = null
+ delete this.queryParams.dateHigh
}
this.initList()
},
onClearStartDate() {
- this.startDate = null
+ this.dateLow = null
- delete this.queryParams.startDate
+ delete this.queryParams.dateLow
this.initList()
},
@@ -564,28 +456,27 @@
onEndDateChange(e) {
const date = e.value
- this.queryParams.endDate = date
+ this.queryParams.dateHigh = $dayjs(date).format('YYYY-MM-DD')
- const { startDate } = this.queryParams
+ const { dateLow } = this.queryParams
- if (startDate && this.$dayjs(date).isBefore(startDate, 'day')) {
- this.startDate = null
- delete this.queryParams.startDate
+ if (dateLow && this.$dayjs(date).isBefore(dateLow, 'day')) {
+ this.dateLow = null
+ delete this.queryParams.dateLow
}
this.initList()
},
onClearEndDate() {
- this.endDate = null
+ this.dateHigh = null
- delete this.queryParams.endDate
+ delete this.queryParams.dateHigh
this.initList()
},
onSortChange(sort) {
console.log('onSortChange', sort)
- // todo set sort
- this.getData()
+ this.initList()
},
}
}
diff --git a/pages/index/growing.vue b/pages/index/growing.vue
index 75990cb..0d4f15d 100644
--- a/pages/index/growing.vue
+++ b/pages/index/growing.vue
@@ -21,7 +21,7 @@
-
+
@@ -31,7 +31,7 @@
请先选择人员
-
+
@@ -46,14 +46,14 @@
import tabber from '@/components/base/tabbar.vue'
import userCard from '@/components/growing/userCard.vue'
import recordsView from '@/components/growing/recordsView.vue'
- import recordFormPopup from '@/pages_order/comment/recordFormPopup.vue'
+ // import recordFormPopup from '@/pages_order/comment/recordFormPopup.vue'
export default {
mixins: [mixinsList],
components: {
userCard,
recordsView,
- recordFormPopup,
+ // recordFormPopup,
tabber,
},
data() {
@@ -63,8 +63,10 @@
queryParams: {
pageNo: 1,
pageSize: 10,
- userId: '',
+ // userId: '',
},
+ medalList: [],
+ medalCount: 0,
}
},
computed: {
@@ -87,16 +89,19 @@
}
// this.queryParams.userId = this.memberInfo.id
// this.getData()
+
+ if(uni.getStorageSync('token')){
+ this.fetchMedalList()
+ }
},
methods: {
getDataThen(records) {
this.list = records.map(item => {
- const { id, name, image, createTime } = item
+ const { id, activityTitle, activityId_dictText, image, createTime } = item
return {
id,
- // todo: check key
- name,
+ name: activityTitle || activityId_dictText || '',
image: image?.split?.(',') || [],
createTime
}
@@ -109,9 +114,20 @@
})
// this.keyword = ''
},
- onAdd() {
- this.$refs.recordFormPopup.open()
+ async fetchMedalList() {
+ try {
+ const result = await this.$fetch('queryMedalList', { pageNo: 1, pageSize: 1000, isLight: '1', })
+ const { records, total } = result
+
+ this.medalList = records
+ this.medalCount = total
+ } catch (err) {
+
+ }
},
+ // onAdd() {
+ // this.$refs.recordFormPopup.open()
+ // },
jumpToChooseMember() {
uni.navigateTo({
url: `/pages_order/member/switch`
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b3a7f9d..a442354 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -50,7 +50,7 @@
-
+
@@ -102,10 +102,26 @@
showBtnService: true,
}
},
- onLoad() {
+ onLoad(arg) {
+ const { shareId } = arg
+
+ if (shareId) {
+ uni.setStorageSync('shareId', shareId)
+ }
+
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
+
+ if (shareId && !uni.getStorageSync('token')) {
+
+ uni.navigateTo({
+ url: '/pages_order/auth/wxLogin'
+ })
+
+ return
+ }
+
},
computed: {
searchStyle() {
diff --git a/pages/index/partner.vue b/pages/index/partner.vue
index 1dbe3c4..b724c10 100644
--- a/pages/index/partner.vue
+++ b/pages/index/partner.vue
@@ -18,22 +18,22 @@
-
- 家长
+
+ {{ userInfo.roleDesc || '' }}
- 战斗世界
- ID:5625354
+ {{ userInfo.nickName }}
+ {{ `ID:${userInfo.id}` }}
- 888
- 推广人数
+ {{ userCenterData.spreadNum }}
+ 推广人数
- 341
- 总佣金
+ {{ userCenterData.commission }}
+ 总佣金
@@ -74,12 +74,12 @@
-
+
- {{ item.name }}
+ {{ item.commissionUser.nickName }}
- {{ `+¥${item.price}` }}
- {{ item.createTime }}
+ {{ `+¥${item.amount}` }}
+ {{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
@@ -92,10 +92,12 @@
+
+
\ No newline at end of file
diff --git a/pages_order/auth/wxUserInfo.vue b/pages_order/auth/wxUserInfo.vue
index 243c78a..b8cd948 100644
--- a/pages_order/auth/wxUserInfo.vue
+++ b/pages_order/auth/wxUserInfo.vue
@@ -176,8 +176,6 @@
title: '保存成功',
});
- this.$store.commit('getUserInfo')
-
setTimeout(() => {
if (this.mode === 'edit') {
this.$utils.navigateBack()
@@ -186,6 +184,7 @@
uni.reLaunch({
url:'/pages/index/index'
})
+ this.$store.commit('getUserInfo')
}, 800)
}
diff --git a/pages_order/comment/recordFormPopup.vue b/pages_order/comment/recordFormPopup.vue
index 4ea95ea..0a744c9 100644
--- a/pages_order/comment/recordFormPopup.vue
+++ b/pages_order/comment/recordFormPopup.vue
@@ -13,14 +13,14 @@
errorType="toast"
>
-
+
关联项目
- {{ projectDesc }}
+ {{ projectDesc }}
请选择关联项目
@@ -28,7 +28,7 @@
-
+
上传图片
@@ -106,10 +106,10 @@
return {
isShow: false,
form: {
- activityId: null,
- processScore: null,
- spotScore: null,
- teacherScore: null,
+ experienceId: null,
+ // processScore: null,
+ // spotScore: null,
+ // teacherScore: null,
images: [],
texts: [],
},
@@ -119,8 +119,8 @@
computed: {
...mapState(['userInfo', 'configList']),
projectDesc() {
- const { activityId } = this.form
- const target = this.projects?.find?.(item => item.id === activityId)
+ const { experienceId } = this.form
+ const target = this.projects?.find?.(item => item.id === experienceId)
return target?.name || ''
},
@@ -132,7 +132,7 @@
this.projects = records.map(item => {
return {
- id: item.activityId,
+ id: item.id,
name: item.activityTitle || item.activityId_dictText || ''
}
})
@@ -142,19 +142,32 @@
},
setRules() {
const rules = {
- 'activityId': {
+ 'experienceId': {
type: 'string',
required: true,
message: '请选择关联项目',
},
+ 'texts': {
+ type: 'array',
+ required: true,
+ message: '请完整回答',
+ validator: (rule, value, callback) => {
+
+ if (value.every(val => !!val)) {
+ return true
+ }
+
+ return false
+ },
+ },
}
// todo: check
- // this.questions.forEach((item, index) => {
+ // this.configList.experienceQuestionList.forEach((item, index) => {
// rules[`texts[${index}]`] = {
// type: 'string',
// required: true,
- // message: `请回答“${item.label}”`,
+ // message: `请回答“${item.question}”`,
// }
// })
@@ -170,10 +183,10 @@
const texts = this.configList.experienceQuestionList.map(() => '')
this.form = {
- activityId: null,
- processScore: null,
- spotScore: null,
- teacherScore: null,
+ experienceId: null,
+ // processScore: null,
+ // spotScore: null,
+ // teacherScore: null,
images: [],
texts,
}
@@ -192,20 +205,20 @@
}, 800)
},
openRelatePojectPicker() {
- this.$refs.reloateProjectPopup.open(this.form.activityId || null)
+ this.$refs.reloateProjectPopup.open(this.form.experienceId || null)
},
onRelateProjectChange(id) {
- this.form.activityId = id
+ this.form.experienceId = id
},
async onPublish() {
try {
await this.$refs.form.validate()
const {
- activityId,
- processScore,
- spotScore,
- teacherScore,
+ experienceId,
+ // processScore,
+ // spotScore,
+ // teacherScore,
images,
texts,
} = this.form
@@ -213,12 +226,12 @@
const params = {
// todo: check
userId: this.userInfo.id,
- activityId,
- processScore,
- spotScore,
- teacherScore,
+ experienceId,
+ // processScore,
+ // spotScore,
+ // teacherScore,
image: images.join(','),
- content: texts.join('\r\n') // todo: check
+ content: texts.join('\r\n')
}
await this.$fetch('addExperience', params)
diff --git a/pages_order/growing/achievement/index.vue b/pages_order/growing/achievement/index.vue
index 4314e93..7935c07 100644
--- a/pages_order/growing/achievement/index.vue
+++ b/pages_order/growing/achievement/index.vue
@@ -8,7 +8,7 @@
- 共获得8枚成就
+ 共获得{{ total }}枚成就
新获得
@@ -17,7 +17,7 @@
-
+
@@ -37,8 +37,7 @@
data() {
return {
keyword: '',
- // todo
- mixinsListApi: '',
+ mixinsListApi: 'queryMedalList',
}
},
onLoad({ search }) {
@@ -50,82 +49,27 @@
this.getData()
},
methods: {
- // todo: delete
- getData() {
- this.list = [
- {
- id: '001',
- name: '呼伦贝尔6/8日丨经典or环线 双套餐可选',
- children: [
- {
- id: '0011',
- icon: '/pages_order/static/temp-47.png',
- label: '言值认证',
- createTime: '2025-07-12',
- },
- {
- id: '0012',
- icon: '/pages_order/static/temp-47.png',
- label: '国际旅行',
- createTime: '2025-07-12',
- },
- {
- id: '0013',
- icon: '/pages_order/static/temp-47.png',
- label: '萌新毕业证',
- createTime: '2025-07-12',
- },
- ],
- },
- {
- id: '002',
- name: '新疆天山行7/9日丨醉美伊犁&吐鲁番双套餐新疆天山行7/9日丨醉美伊犁&吐鲁番双套餐',
- children: [
- {
- id: '0011',
- icon: '/pages_order/static/temp-47.png',
- label: '言值认证',
- createTime: '2025-05-15',
- },
- ],
- },
- {
- id: '003',
- name: '呼伦贝尔6/8日丨经典or环线 双套餐可选',
- children: [
- {
- id: '0011',
- icon: '/pages_order/static/temp-47.png',
- label: '言值认证',
- createTime: '2025-07-12',
- },
- {
- id: '0012',
- icon: '/pages_order/static/temp-47.png',
- label: '国际旅行',
- createTime: '2025-07-12',
- },
- ],
- },
- {
- id: '004',
- name: '新丝路到敦煌7日丨甘青轻松穿越,沙漠+草原',
+ getDataThen(records) {
+ this.list = records.map(item => {
+ const { id, activityId_dictText, medalId, medal, createTime, isLight: _isLight } = item
+
+ const { title, icon1, icon2 } = medal
+ const isLight = _isLight == '1'
+
+ return {
+ id,
+ name: activityId_dictText,
children: [
{
- id: '0012',
- icon: '/pages_order/static/temp-47.png',
- label: '国际旅行',
- createTime: '2025-07-12',
- },
- {
- id: '0013',
- icon: '/pages_order/static/temp-47.png',
- label: '萌新毕业证',
- createTime: '2025-07-12',
+ medalId,
+ icon: isLight ? icon1 : icon2,
+ label: title,
+ createTime,
+ isLight,
},
- ],
- },
- ]
+ ]
+ }
+ })
},
},
}
diff --git a/pages_order/growing/achievement/recordsView.vue b/pages_order/growing/achievement/recordsView.vue
index 9392d2b..961c514 100644
--- a/pages_order/growing/achievement/recordsView.vue
+++ b/pages_order/growing/achievement/recordsView.vue
@@ -16,10 +16,10 @@
-
+
{{ child.label }}
- {{ child.createTime }}
+ {{ $dayjs(child.createTime).format('YYYY-MM-DD') }}
@@ -39,6 +39,16 @@
}
}
},
+ methods: {
+ async onLightMedal(medalId) {
+ try {
+ await this.$fetch('lightMedal', { medalId })
+ this.$emit('lighted')
+ } catch (err) {
+
+ }
+ },
+ },
}
diff --git a/pages_order/growing/activity/commentCard.vue b/pages_order/growing/activity/commentCard.vue
new file mode 100644
index 0000000..4eecee5
--- /dev/null
+++ b/pages_order/growing/activity/commentCard.vue
@@ -0,0 +1,210 @@
+
+
+
+ {{ data.content }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/growing/activity/index.vue b/pages_order/growing/activity/index.vue
index 48dd517..088f5a4 100644
--- a/pages_order/growing/activity/index.vue
+++ b/pages_order/growing/activity/index.vue
@@ -44,17 +44,20 @@
活动掠影
- 标记有我
+ 标记有我
-
+
-
+
@@ -75,21 +78,30 @@
+
+
+
+
- 生成海报
+ 生成海报
申请邮件
@@ -217,7 +237,7 @@
}
}
- .btn-mark {
+ .btn {
padding: 6rpx 22rpx;
font-family: PingFang SC;
font-size: 28rpx;
diff --git a/pages_order/growing/activity/search.vue b/pages_order/growing/activity/search.vue
index a850542..8490b7f 100644
--- a/pages_order/growing/activity/search.vue
+++ b/pages_order/growing/activity/search.vue
@@ -24,7 +24,7 @@
-
+
@@ -53,68 +53,68 @@
return {
keyword: '',
isFocusSearch: false,
+ sort: 'comprehensive',
queryParams: {
pageNo: 1,
pageSize: 10,
- title: '',
- sort: 'comprehensive',
+ activityTitle: '',
+ // sort: 'comprehensive',
},
- // todo
- mixinsListApi: '',
+ mixinsListApi: 'queryExperienceList',
}
},
onLoad({ search }) {
if (search) {
this.keyword = search
- this.queryParams.title = search
+ this.queryParams.activityTitle = search
}
this.getData()
},
methods: {
- // todo: delete
- getData() {
- this.list = [
- {
- id: '001',
- name: '新疆天山行7/9日丨醉美伊犁&吐鲁番双套餐',
- image: [
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- ],
- createTime: '2025-07-12',
- },
- {
- id: '002',
- name: '仙踪新昌·韩妃江古道|邂逅“江南小桂林”',
- image: [
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- ],
- createTime: '2025-06-18',
- },
- {
- id: '003',
- name: '山水石窟·大佛寺|江南佛窟造像,新昌山水轻徒',
- image: [
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- '/pages_order/static/temp-38.png',
- ],
- createTime: '2025-06-15',
- },
- ]
- },
search() {
this.queryParams.pageNo = 1
this.queryParams.pageSize = 10
- this.queryParams.title = this.keyword
+ if (this.keyword) {
+ this.queryParams.activityTitle = this.keyword
+ } else {
+ delete this.queryParams.activityTitle
+ }
this.getData()
},
onSortChange(sort) {
console.log('onSortChange', sort)
+ this.getda()
+ },
+ beforeGetData() {
+ console.log('beforeGetData')
+ let params = {}
+
+ switch(this.sort) {
+ // 时间排序(dateOrder):0-从高到低 1-从低到高
+ case 'date-desc': // 时间排序 - 降序
+ params.dateOrder = '0'
+ break
+ case 'date-asc': // 时间排序 - 升序
+ params.dateOrder = '1'
+ break
+ default:
+ break
+ }
+
+ return params
+ },
+ getDataThen(records) {
+ this.list = records.map(item => {
+ const { id, activityTitle, activityId_dictText, image, createTime } = item
+
+ return {
+ id,
+ name: activityTitle || activityId_dictText || '',
+ image: image?.split?.(',') || [],
+ createTime
+ }
+ })
},
},
}
diff --git a/pages_order/growing/activity/sortBar.vue b/pages_order/growing/activity/sortBar.vue
index db77d7f..9713294 100644
--- a/pages_order/growing/activity/sortBar.vue
+++ b/pages_order/growing/activity/sortBar.vue
@@ -9,11 +9,11 @@
-
+
时间
-
-
+
+
@@ -58,11 +58,11 @@
sort = 'sale-desc'
}
break;
- case 'price':
- if (this.sort == 'price-desc') {
- sort = 'price-asc'
+ case 'date':
+ if (this.sort == 'date-desc') {
+ sort = 'date-asc'
} else {
- sort = 'price-desc'
+ sort = 'date-desc'
}
break;
default:
diff --git a/pages_order/order/components/orderInfoView.vue b/pages_order/order/components/orderInfoView.vue
index 1c6bb9b..cc1a987 100644
--- a/pages_order/order/components/orderInfoView.vue
+++ b/pages_order/order/components/orderInfoView.vue
@@ -7,16 +7,16 @@
{{ statusDesc }}
-
+
{{ item.name }}
- {{ getTypeDesc(item.type) }}
- {{ getTypeTips(item.type) }}
+ {{ item.period || '' }}
+ {{ item.periodDesc || '' }}
{{ item.cerNo }}
- ¥{{ item.price }}
+ ¥{{ item.price || '-' }}
总价格
@@ -63,16 +63,6 @@
1: '已支付',
2: '已完成',
}
- const MEMBER_TYPE_AND_DESC_MAPPING = {
- 0: '成人',
- 1: '青少年',
- 2: '儿童',
- }
- const MEMBER_TYPE_AND_TIPS_MAPPING = {
- 0: '(18周岁以上)',
- 1: '(14周岁以上)',
- 2: '(14周岁以下)',
- }
export default {
props: {
@@ -88,44 +78,8 @@
const { status } = this.data
return ORDER_STATUS_AND_DESC_MAPPING[status]
},
- productPackage() {
- const { time, product } = this.data
- const { timeOptions } = product || {}
-
- return timeOptions?.find?.(item => item.id === time) || {}
- },
- members() {
- const { members } = this.data
- const { adultsPrice, teenagerPrice, childPrice } = this.productPackage
-
- return members?.map?.(item => {
- const { type } = item
-
- let price = 0
-
- switch(type) {
- case 0: // 成年
- price = adultsPrice
- break
- case 1: // 青少年
- price = teenagerPrice
- break
- case 2: // 儿童
- price = childPrice
- break
- }
-
- return { ...item, price }
- })
- },
},
methods: {
- getTypeDesc(type) {
- return MEMBER_TYPE_AND_DESC_MAPPING[type]
- },
- getTypeTips(type) {
- return MEMBER_TYPE_AND_TIPS_MAPPING[type]
- },
},
}
diff --git a/pages_order/order/orderConfirm/index.vue b/pages_order/order/orderConfirm/index.vue
index e89bc11..8dbd1c1 100644
--- a/pages_order/order/orderConfirm/index.vue
+++ b/pages_order/order/orderConfirm/index.vue
@@ -246,9 +246,15 @@
const {
time,
prices,
+ priceList,
members,
} = this.orderInfo
+ console.log('priceList', priceList)
+ console.log('members', members)
+
+ let arr = []
+
this.form = {
name: '',
phone: '',
@@ -294,8 +300,12 @@
const {
product,
time,
+ priceList,
} = this.orderInfo
+ console.log('priceList', priceList)
+ console.log('members', members)
+
const {
name,
phone,
@@ -306,6 +316,20 @@
} = this.form
const { startDate, endDate } = this.productPackage
+
+ // let json = members.map(member => {
+ // const { periodId } = member
+ // const { period_dictText, price } = priceList.find(item => item.periodId === periodId) || {}
+
+ // return {
+ // ...member,
+ // period_dictText,
+ // price,
+ // }
+ // })
+
+ // console.log('json', json)
+
let params = {
activityId: product.id,
startDate,
@@ -319,7 +343,8 @@
discount: this.discount,
priceDiscount: this.totalPrice,
payAmount: this.totalPrice,
- tourisIds: members.map(touris => touris.id).join(',')
+ tourisIds: members.map(touris => touris.id).join(';'),
+ // jsonObject: JSON.stringify(json),
}
const orderId = await this.$fetch('createOrder', params)
diff --git a/pages_order/order/orderConfirm/peopleNumberInput.vue b/pages_order/order/orderConfirm/peopleNumberInput.vue
index b384121..1f516af 100644
--- a/pages_order/order/orderConfirm/peopleNumberInput.vue
+++ b/pages_order/order/orderConfirm/peopleNumberInput.vue
@@ -3,8 +3,7 @@
{{ item.period_dictText }}
-
- {{ `(${getTypeDesc(item.period_dictText)})` }}
+ {{ `(${getTypeDesc(item.periodId)})` }}
¥
{{ item.price }}
@@ -32,11 +31,6 @@