From 48e7ee4d1c5a5f63b2a0bb150360964a065d68d6 Mon Sep 17 00:00:00 2001
From: Fox-33 <1466778434@qq.com>
Date: Thu, 4 Sep 2025 11:26:38 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/fetch.js | 2 +-
api/model/activity.js | 4 +-
api/model/login.js | 4 +-
api/model/order.js | 30 +++-
components/config/PrivacyAgreementPoup.vue | 1 -
components/home/bgSwiperView.vue | 20 +--
components/home/categoryView.vue | 12 +-
components/home/productView.vue | 11 +-
components/home/recommendView.vue | 14 +-
components/home/swiperView.vue | 29 +---
components/partner/posterPopup.vue | 2 +-
components/product/productCard.vue | 18 ++-
pages/index/category.vue | 165 +++++++++++++++------
pages/index/index.vue | 137 ++++++++---------
pages_order/article/index.vue | 5 +-
pages_order/article/search.vue | 18 ++-
pages_order/auth/wxUserInfo.vue | 2 +-
pages_order/comment/commentRecordsOfProduct.vue | 2 +-
pages_order/live/index.vue | 88 ++++++++---
pages_order/live/list.vue | 48 +++++-
pages_order/order/components/orderInfoView.vue | 2 +-
pages_order/order/orderConfirm/index.vue | 20 +--
pages_order/order/orderConfirm/infoPopup.vue | 41 +----
pages_order/order/orderConfirm/memberCard.vue | 2 +-
.../order/orderConfirm/timeOptionsSelect.vue | 5 +-
pages_order/order/orderDetail/index.vue | 21 ++-
pages_order/order/orderPay/index.vue | 17 ++-
pages_order/product/collectList.vue | 5 +-
pages_order/product/productDetail.vue | 54 +++----
pages_order/product/search.vue | 79 ++--------
pages_order/traveler/travelerCard.vue | 39 +----
pages_order/traveler/travelerList.vue | 115 ++++----------
pages_order/traveler/travelerPopup.vue | 132 ++++++++++++-----
static/image/icon-close.png | Bin 0 -> 978 bytes
static/image/icon-service.png | Bin 0 -> 8176 bytes
store/store.js | 9 +-
uni_modules/uv-tabs/components/uv-tabs/uv-tabs.vue | 1 -
.../uv-vtabs/components/uv-vtabs/uv-vtabs.vue | 3 -
38 files changed, 598 insertions(+), 559 deletions(-)
create mode 100644 static/image/icon-close.png
create mode 100644 static/image/icon-service.png
diff --git a/api/fetch.js b/api/fetch.js
index 848bd68..87ed77c 100644
--- a/api/fetch.js
+++ b/api/fetch.js
@@ -1,7 +1,7 @@
import api from './api.js'
const fetch = (key, data = {}, transform = true, loadingTitle) => {
- return new Promise(resolve => {
+ return new Promise((resolve, reject) => {
const callback = (res) => {
if (!transform) {
diff --git a/api/model/activity.js b/api/model/activity.js
index d93f0c3..a524a73 100644
--- a/api/model/activity.js
+++ b/api/model/activity.js
@@ -19,7 +19,9 @@ const api = {
// 首页&分类-收藏研学活动
collectionActivity: {
url: '/activity/collectionActivity',
- method: 'GET',
+ method: 'POST',
+ auth: true,
+ limit : 500,
},
}
diff --git a/api/model/login.js b/api/model/login.js
index c818a04..ffaa447 100644
--- a/api/model/login.js
+++ b/api/model/login.js
@@ -5,14 +5,14 @@
const api = {
// 微信登录接口
wxLogin: {
- url: '/login_common/appletLogin',
+ url: '/login/login',
method: 'GET',
limit : 500,
showLoading : true,
},
// 获取绑定手机号码
bindPhone: {
- url: '/login_common/bindPhone',
+ url: '/login/bindPhone',
method: 'GET',
auth: true,
},
diff --git a/api/model/order.js b/api/model/order.js
index 481df2a..20301b0 100644
--- a/api/model/order.js
+++ b/api/model/order.js
@@ -20,13 +20,41 @@ const api = {
showLoading : true,
},
// 我的订单-支付订单
- createOrder: {
+ payOrder: {
url: '/order/payOrder',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
+ // 我的订单-查询出行人列表
+ queryTouristList: {
+ url: '/order/queryTouristList',
+ method: 'GET',
+ auth: true,
+ },
+ // 我的订单-查询出行人详情
+ queryTouristById: {
+ url: '/order/queryTouristById',
+ method: 'GET',
+ auth: true,
+ },
+ // 我的订单-添加出行人
+ addTourist: {
+ url: '/order/addTourist',
+ method: 'POST',
+ auth: true,
+ limit : 500,
+ showLoading : true,
+ },
+ // 我的订单-修改出行人信息
+ updateTourist: {
+ url: '/order/updateTourist',
+ method: 'POST',
+ auth: true,
+ limit : 500,
+ showLoading : true,
+ },
}
export default api
\ No newline at end of file
diff --git a/components/config/PrivacyAgreementPoup.vue b/components/config/PrivacyAgreementPoup.vue
index 6eda2c6..895aac9 100644
--- a/components/config/PrivacyAgreementPoup.vue
+++ b/components/config/PrivacyAgreementPoup.vue
@@ -50,7 +50,6 @@
if(wx.getPrivacySetting){
wx.getPrivacySetting({
success: res => {
- console.log(res)
if (res.needAuthorization) {
// 需要弹出隐私协议
this.init()
diff --git a/components/home/bgSwiperView.vue b/components/home/bgSwiperView.vue
index f05a878..2d26c5f 100644
--- a/components/home/bgSwiperView.vue
+++ b/components/home/bgSwiperView.vue
@@ -21,22 +21,12 @@
this.getData()
},
methods: {
- getData() {
-
- // todo: fetch
-
- this.bannerList = [
- {
- image: '/static/image/bg.png',
- },
- {
- image: '/static/image/bg.png',
- },
- {
- image: '/static/image/bg.png',
- },
- ]
+ async getData() {
+ try {
+ this.bannerList = (await this.$fetch('queryBannerList', { type: 0 })).records // type:0-首页顶部 1-首页中部
+ } catch (err) {
+ }
},
},
}
diff --git a/components/home/categoryView.vue b/components/home/categoryView.vue
index bcef0e7..e375c3b 100644
--- a/components/home/categoryView.vue
+++ b/components/home/categoryView.vue
@@ -27,31 +27,31 @@
id: '001',
icon: '/static/image/temp-1.png',
label: '主题研学',
- path: `/pages/index/category?categoryId=009`,
+ path: `/pages/index/category?categoryId=1962345709817106434`,
},
{
id: '002',
icon: '/static/image/temp-2.png',
label: '社会实践',
- path: `/pages/index/category?categoryId=008`,
+ path: `/pages/index/category?categoryId=1962346300198948866`,
},
{
id: '003',
icon: '/static/image/temp-3.png',
label: '研学交流',
- path: `/pages/index/category?categoryId=010`,
+ path: `/pages/index/category?categoryId=1962346769759670273`,
},
{
id: '004',
icon: '/static/image/temp-4.png',
label: '周末研学',
- path: `/pages/index/category?categoryId=006`,
+ path: `/pages/index/category?categoryId=1962346834884628481`,
},
{
id: '005',
icon: '/static/image/temp-5.png',
label: '假期专项',
- path: `/pages/index/category?categoryId=011`,
+ path: `/pages/index/category?categoryId=1962346960097185793`,
},
{
id: '006',
@@ -68,7 +68,7 @@
id: '008',
icon: '/static/image/temp-8.png',
label: '本地研学',
- path: `/pages/index/category?categoryId=012`,
+ path: `/pages/index/category?categoryId=1962347024639135745`,
},
{
id: '009',
diff --git a/components/home/productView.vue b/components/home/productView.vue
index 7f6b653..6b92b2e 100644
--- a/components/home/productView.vue
+++ b/components/home/productView.vue
@@ -66,22 +66,17 @@
}
},
created() {
- this.fetchCategory()
+ this.fetchRecommend()
},
methods: {
- fetchCategory() {
+ fetchRecommend() {
// todo: fetch
-
this.tabs = [
{ name: '全部' },
- // todo: jump to detail
- { id: '001', name: '草原运动会', disabled: true, },
- { id: '002', name: '我的韶山行', disabled: true, },
- { id: '003', name: '出境游', disabled: true, },
+ { id: '1962342791093227522', name: '研学活动一', disabled: true, },
]
},
onClickTab(e) {
- console.log('onClickTab', e.index)
this.current = 0
const index = e.index
diff --git a/components/home/recommendView.vue b/components/home/recommendView.vue
index 66b58da..274ce93 100644
--- a/components/home/recommendView.vue
+++ b/components/home/recommendView.vue
@@ -1,6 +1,6 @@
-
+
{{ item.label }}
@@ -32,22 +32,34 @@
label: '限时优惠',
desc: '速抢折扣',
highlight: true,
+ path: `/pages_order/product/search?isDiscount=1&title=限时优惠`,
},
{
id: '002',
icon: '/static/image/temp-12.png',
label: '口碑爆款',
desc: '热销推荐',
+ path: `/pages_order/product/search?isHot=1&title=口碑爆款`,
},
{
id: '003',
icon: '/static/image/temp-13.png',
label: '新上线路',
desc: '全新上线',
+ path: `/pages_order/product/search?isNew=1&title=新上线路`,
},
]
},
+ onClick(target) {
+ const { path } = target
+
+ if (path) {
+ uni.navigateTo({
+ url: path
+ })
+ }
+ },
},
}
diff --git a/components/home/swiperView.vue b/components/home/swiperView.vue
index 967603f..18ef828 100644
--- a/components/home/swiperView.vue
+++ b/components/home/swiperView.vue
@@ -22,31 +22,12 @@
this.getData()
},
methods: {
- getData() {
-
- // todo: fetch
-
- this.bannerList = [
- {
- image: '/static/image/temp-14.png',
- },
- {
- image: '/static/image/temp-14.png',
- },
- {
- image: '/static/image/temp-14.png',
- },
- {
- image: '/static/image/temp-14.png',
- },
- {
- image: '/static/image/temp-14.png',
- },
- {
- image: '/static/image/temp-14.png',
- },
- ]
+ async getData() {
+ try {
+ this.bannerList = (await this.$fetch('queryBannerList', { type: 1 })).records // type:0-首页顶部 1-首页中部
+ } catch (err) {
+ }
},
onClickBanner(index) {
console.log('onClickBanner', index)
diff --git a/components/partner/posterPopup.vue b/components/partner/posterPopup.vue
index 760e150..dba142f 100644
--- a/components/partner/posterPopup.vue
+++ b/components/partner/posterPopup.vue
@@ -265,7 +265,7 @@
ctx.restore();
ctx.save()
- maxWidth = 520 * Ratio / dpr
+ maxWidth = 560 * Ratio / dpr
lineHeight = 60 * Ratio / dpr
ctx.font = "normal normal 600 16px normal";
ctx.fillStyle = "#181818";
diff --git a/components/product/productCard.vue b/components/product/productCard.vue
index 56291bf..6a396b7 100644
--- a/components/product/productCard.vue
+++ b/components/product/productCard.vue
@@ -8,8 +8,7 @@
{{ data.title }}
-
- {{ data.tagList.join('·') }}
+ {{ tagDesc }}
@@ -68,11 +67,22 @@
}
},
computed: {
+ tagDesc() {
+ // todo: check key
+ const { tagList } = this.data
+
+ return tagList?.length ? tagList.split('、').join('·') : ''
+ return
+ const { categoryId_dictText, timeId_dictText, ageId_dictText } = this.data
+
+ return [categoryId_dictText, timeId_dictText, ageId_dictText].filter(val => val).join('·')
+ },
priceInt() {
- return parseInt(this.data.priceDiscount)
+ return Math.floor(this.data.priceDiscount)
},
priceFrac() {
- return (this.data.priceDiscount % this.priceInt).toFixed(2).slice(1)
+ let frac = this.data.priceDiscount % this.priceInt
+ return frac > 0 ? frac.toFixed(2).slice(1) : ''
},
collectBtnWidth() {
return this.isCollected ? 80 : 56
diff --git a/pages/index/category.vue b/pages/index/category.vue
index 92c29d0..a03a257 100644
--- a/pages/index/category.vue
+++ b/pages/index/category.vue
@@ -224,66 +224,145 @@
async fetchCategoryList() {
this.categoryList = [
{
- id: '001',
- name: '国际游',
- children: [],
+ "key": "1962345168240185345",
+ "title": "国际游",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '002',
- name: '夏令营',
- children: [],
+ "key": "1962345225345634305",
+ "title": "夏令营",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '003',
- name: '周末营',
- children: [],
+ "key": "1962345290571255810",
+ "title": "周末营",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '004',
- name: '周边游',
- children: [],
+ "key": "1962345372007862273",
+ "title": "周边游",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '005',
- name: '定制游',
- children: [],
+ "key": "1962345497681793025",
+ "title": "定制游",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '006',
- name: '周末活动',
- children: [],
+ "key": "1962345589524467714",
+ "title": "周末活动",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '007',
- name: '亲子活动',
- children: [],
+ "key": "1962345642188148737",
+ "title": "亲子活动",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '008',
- name: '社会实践',
- children: [],
+ "key": "1962345709817106434",
+ "title": "主题研学",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '009',
- name: '主题研学',
- children: [],
+ "key": "1962346300198948866",
+ "title": "社会实践",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '010',
- name: '研学交流',
- children: [],
+ "key": "1962346769759670273",
+ "title": "研学交流",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '011',
- name: '假期专项',
- children: [],
+ "key": "1962346834884628481",
+ "title": "周末研学",
+ "icon": null,
+ "parentId": "0",
+ "value": null,
+ "code": null,
+ "children": null,
+ "leaf": true
},
{
- id: '012',
- name: '本地研学',
- children: [],
+ "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: []
+ }
+ })
+
return
try {
this.categoryList = (await this.$fetch('getCategoryList', { pageSize: 1000 }))?.records?.map(item => ({ id: item.id, name: item.name, children: [] }))
@@ -421,6 +500,12 @@
},
async queryProductList(categoryId) {
+ try {
+ return (await this.$fetch('queryActivityList', { ...this.queryParams, categoryId }))?.records || []
+ } catch (err) {
+ return []
+ }
+
return [
{
id: '001',
@@ -477,12 +562,6 @@
applyNum: 4168,
},
]
-
- try {
- return (await this.$fetch('queryActivityList', { ...this.queryParams, categoryId }))?.records || []
- } catch (err) {
- return []
- }
},
async initList() {
console.log('queryParams', this.queryParams)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 00046fc..6779c9f 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -54,12 +54,22 @@
-
-
+
+
+
+
+
+
+
-
+
@@ -311,4 +253,49 @@
}
}
+ .movable {
+
+ &-view {
+ position: fixed;
+ width: auto;
+ height: auto;
+ }
+
+ &-content {
+ position: relative;
+
+ .btn {
+ &-service {
+ column-gap: 4rpx;
+ padding: 6rpx 6rpx 6rpx 18rpx;
+ background: linear-gradient(to right, #21FEEC, #019AF9);
+ border: 2rpx solid #00A9FF;
+ border-radius: 40rpx;
+
+ .label {
+ white-space: nowrap;
+ font-size: 24rpx;
+ font-weight: 500;
+ color: #FFFFFF;
+ text-shadow: 0 1px 2px #135A98;
+ }
+
+ .icon {
+ width: 64rpx;
+ height: auto;
+ }
+ }
+
+ &-close {
+ width: 32rpx;
+ height: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ transform: translate(-10rpx, -10rpx);
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_order/article/index.vue b/pages_order/article/index.vue
index ba68695..197dbc3 100644
--- a/pages_order/article/index.vue
+++ b/pages_order/article/index.vue
@@ -2,7 +2,7 @@
-
+
@@ -33,6 +33,9 @@