szr190 месяцев назад: 2
Родитель
Сommit
cdcd7bb67b

+ 1 - 6
src/App.vue

@@ -1,12 +1,7 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import { user } from '@/stores/modules/user'
3
 import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
2
 import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
4
 
3
 
5
-const userStore = user()
6
-
7
-onLaunch(() => {
8
-  //
9
-})
4
+onLaunch(() => {})
10
 onShow(() => {
5
 onShow(() => {
11
   console.log('App Show')
6
   console.log('App Show')
12
 })
7
 })

+ 37 - 0
src/api/home.ts

@@ -158,3 +158,40 @@ export const getQuestionDetail = (id: string) => {
158
     url: `/other/question/web/${id}`
158
     url: `/other/question/web/${id}`
159
   })
159
   })
160
 }
160
 }
161
+
162
+// 新增问题反馈
163
+export const addQuestionFeedback = (data: any) => {
164
+  return http({
165
+    method: 'POST',
166
+    url: `/operate/feedback/mpAdd`,
167
+    data
168
+  })
169
+}
170
+
171
+// 查询问题反馈列表
172
+export const getQuestionFeedbackList = (data: any) => {
173
+  return http({
174
+    method: 'GET',
175
+    url: `/operate/feedback/mpList`,
176
+    data
177
+  })
178
+}
179
+
180
+// 查询问题反馈详情
181
+export const getQuestionFeedbackDetail = (id: string) => {
182
+  return http({
183
+    method: 'GET',
184
+    url: `/operate/feedback/mp/${id}`
185
+  })
186
+}
187
+
188
+/**
189
+ * @description: 获取banner
190
+ * @return {*}
191
+ */
192
+export const getBannerApi = () => {
193
+  return http<EmptyObjectType[]>({
194
+    method: 'GET',
195
+    url: '/operate/banner/web'
196
+  })
197
+}

+ 2 - 2
src/api/login.ts

@@ -154,9 +154,9 @@ export const phoneLoginApi = (data: { code: string }) => {
154
 }
154
 }
155
 
155
 
156
 // 手机号登录
156
 // 手机号登录
157
-export const h5PhoneLoginApi = () => {
157
+export const h5PhoneLoginApi = (phone: string) => {
158
   return http({
158
   return http({
159
     method: 'POST',
159
     method: 'POST',
160
-    url: `/h5PhoneLogin`
160
+    url: `/h5PhoneLogin?phone=${phone}`
161
   })
161
   })
162
 }
162
 }

+ 4 - 5
src/base/common/charge.vue

@@ -5,15 +5,12 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ chargeInfo?.title }}</view>
8
         <view class="common-card-title">{{ chargeInfo?.title }}</view>
10
-        <!-- sub title -->
11
         <view class="common-sub-title">营业时间:{{ chargeInfo?.businessAt }}</view>
9
         <view class="common-sub-title">营业时间:{{ chargeInfo?.businessAt }}</view>
12
         <view class="common-sub-title">客服电话:{{ chargeInfo?.mobile }}</view>
10
         <view class="common-sub-title">客服电话:{{ chargeInfo?.mobile }}</view>
13
       </view>
11
       </view>
14
       <view class="common-card">
12
       <view class="common-card">
15
         <view class="common-card-title u-margin-bottom-20">当前电价</view>
13
         <view class="common-card-title u-margin-bottom-20">当前电价</view>
16
-        <!-- 当前电价及时间展示 -->
17
         <view class="charge-current-wrapper">
14
         <view class="charge-current-wrapper">
18
           <view class="current-left-wrap">
15
           <view class="current-left-wrap">
19
             <view class="text">{{ content?.price }}</view>
16
             <view class="text">{{ content?.price }}</view>
@@ -46,8 +43,10 @@ onLoad(async () => {
46
   const parkId = uni.getStorageSync('parkId')
43
   const parkId = uni.getStorageSync('parkId')
47
   const res = await getParkServicePower(parkId)
44
   const res = await getParkServicePower(parkId)
48
   if (res.code === 200) {
45
   if (res.code === 200) {
49
-    chargeInfo.value = res.data
50
-    content.value = JSON.parse(chargeInfo.value.content)
46
+    if (res.data) {
47
+      chargeInfo.value = res.data
48
+      content.value = JSON.parse(chargeInfo.value?.content)
49
+    }
51
   }
50
   }
52
 })
51
 })
53
 </script>
52
 </script>

+ 4 - 5
src/base/common/driversHome.vue

@@ -5,9 +5,7 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ driverInfo?.title }}</view>
8
         <view class="common-card-title">{{ driverInfo?.title }}</view>
10
-        <!-- sub title -->
11
         <view class="common-sub-title">营业时间:{{ driverInfo?.businessAt }}</view>
9
         <view class="common-sub-title">营业时间:{{ driverInfo?.businessAt }}</view>
12
         <view class="common-sub-title">客服电话:{{ driverInfo?.mobile }}</view>
10
         <view class="common-sub-title">客服电话:{{ driverInfo?.mobile }}</view>
13
       </view>
11
       </view>
@@ -39,9 +37,10 @@ onLoad(async () => {
39
   const parkId = uni.getStorageSync('parkId')
37
   const parkId = uni.getStorageSync('parkId')
40
   const res = await getParkServiceDriver(parkId)
38
   const res = await getParkServiceDriver(parkId)
41
   if (res.code === 200) {
39
   if (res.code === 200) {
42
-    driverInfo.value = res.data
43
-    content.value = JSON.parse(driverInfo.value.content)
44
-    console.log('🚀 ~ content.value:', content.value)
40
+    if (res.data) {
41
+      driverInfo.value = res.data
42
+      content.value = JSON.parse(driverInfo.value?.content)
43
+    }
45
   }
44
   }
46
 })
45
 })
47
 </script>
46
 </script>

+ 4 - 4
src/base/common/join.vue

@@ -20,8 +20,6 @@
20
 import { ref } from 'vue'
20
 import { ref } from 'vue'
21
 import { onLoad } from '@dcloudio/uni-app'
21
 import { onLoad } from '@dcloudio/uni-app'
22
 import { getParkServiceInvestment } from '@/api/home'
22
 import { getParkServiceInvestment } from '@/api/home'
23
-import { useGlobal } from '../../composables/index'
24
-const { minioUrl } = useGlobal()
25
 
23
 
26
 // 招商加盟详情
24
 // 招商加盟详情
27
 const joinInfo = ref<any>({})
25
 const joinInfo = ref<any>({})
@@ -32,8 +30,10 @@ onLoad(async () => {
32
   if (parkId) {
30
   if (parkId) {
33
     const res = await getParkServiceInvestment(parkId)
31
     const res = await getParkServiceInvestment(parkId)
34
     if (res.code === 200) {
32
     if (res.code === 200) {
35
-      joinInfo.value = res.data
36
-      content.value = JSON.parse(joinInfo.value.content)
33
+      if (res.data) {
34
+        joinInfo.value = res.data
35
+        content.value = JSON.parse(joinInfo.value?.content)
36
+      }
37
     }
37
     }
38
   }
38
   }
39
 })
39
 })

+ 4 - 4
src/base/common/nursingRoom.vue

@@ -5,9 +5,7 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ boyInfo?.title }}</view>
8
         <view class="common-card-title">{{ boyInfo?.title }}</view>
10
-        <!-- sub title -->
11
         <view class="common-sub-title">营业时间:{{ boyInfo?.businessAt }}</view>
9
         <view class="common-sub-title">营业时间:{{ boyInfo?.businessAt }}</view>
12
         <view class="common-sub-title">客服电话:{{ boyInfo?.mobile }}</view>
10
         <view class="common-sub-title">客服电话:{{ boyInfo?.mobile }}</view>
13
       </view>
11
       </view>
@@ -39,8 +37,10 @@ onLoad(async () => {
39
   const parkId = uni.getStorageSync('parkId')
37
   const parkId = uni.getStorageSync('parkId')
40
   const res = await getParkServiceBoy(parkId)
38
   const res = await getParkServiceBoy(parkId)
41
   if (res.code === 200) {
39
   if (res.code === 200) {
42
-    boyInfo.value = res.data
43
-    content.value = JSON.parse(boyInfo.value.content)
40
+    if (res.data) {
41
+      boyInfo.value = res.data
42
+      content.value = JSON.parse(boyInfo.value?.content)
43
+    }
44
   }
44
   }
45
 })
45
 })
46
 </script>
46
 </script>

+ 0 - 4
src/base/common/refuel.vue

@@ -5,9 +5,7 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ refuelInfo.title }}</view>
8
         <view class="common-card-title">{{ refuelInfo.title }}</view>
10
-        <!-- sub title -->
11
         <view class="common-sub-title">营业时间:{{ refuelInfo?.businessAt }}</view>
9
         <view class="common-sub-title">营业时间:{{ refuelInfo?.businessAt }}</view>
12
         <view class="common-sub-title">客服电话:{{ refuelInfo?.mobile }}</view>
10
         <view class="common-sub-title">客服电话:{{ refuelInfo?.mobile }}</view>
13
       </view>
11
       </view>
@@ -30,8 +28,6 @@
30
 import { ref } from 'vue'
28
 import { ref } from 'vue'
31
 import { onLoad } from '@dcloudio/uni-app'
29
 import { onLoad } from '@dcloudio/uni-app'
32
 import { getParkServiceOil } from '@/api/home'
30
 import { getParkServiceOil } from '@/api/home'
33
-import { useGlobal } from '../../composables/index'
34
-const { minioUrl } = useGlobal()
35
 
31
 
36
 // 我要加油
32
 // 我要加油
37
 const refuelInfo = ref<any>({})
33
 const refuelInfo = ref<any>({})

+ 4 - 4
src/base/common/repair.vue

@@ -5,9 +5,7 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ carInfo?.title }}</view>
8
         <view class="common-card-title">{{ carInfo?.title }}</view>
10
-        <!-- sub title -->
11
         <view class="common-sub-title">营业时间:{{ carInfo?.businessAt }}</view>
9
         <view class="common-sub-title">营业时间:{{ carInfo?.businessAt }}</view>
12
         <view class="common-sub-title">客服电话:{{ carInfo?.mobile }}</view>
10
         <view class="common-sub-title">客服电话:{{ carInfo?.mobile }}</view>
13
       </view>
11
       </view>
@@ -34,8 +32,10 @@ onLoad(async () => {
34
   const parkId = uni.getStorageSync('parkId')
32
   const parkId = uni.getStorageSync('parkId')
35
   const res = await getParkServiceCar(parkId)
33
   const res = await getParkServiceCar(parkId)
36
   if (res.code === 200) {
34
   if (res.code === 200) {
37
-    carInfo.value = res.data
38
-    content.value = JSON.parse(carInfo.value.content)
35
+    if (res.data) {
36
+      carInfo.value = res.data
37
+      content.value = JSON.parse(carInfo.value.content)
38
+    }
39
   }
39
   }
40
 })
40
 })
41
 </script>
41
 </script>

+ 0 - 2
src/base/common/spot.vue

@@ -5,12 +5,10 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">
8
         <view class="common-card-title">
10
           <view class="text">{{ details.title }}</view>
9
           <view class="text">{{ details.title }}</view>
11
           <view class="card-tag">{{ content.level }}</view>
10
           <view class="card-tag">{{ content.level }}</view>
12
         </view>
11
         </view>
13
-        <!-- sub title -->
14
         <view class="common-sub-title">开放时间:{{ details?.businessAt }}</view>
12
         <view class="common-sub-title">开放时间:{{ details?.businessAt }}</view>
15
         <view class="common-sub-title">
13
         <view class="common-sub-title">
16
           <view class="text">地址:{{ content?.address }}</view>
14
           <view class="text">地址:{{ content?.address }}</view>

+ 6 - 7
src/base/shop/details.vue

@@ -5,14 +5,11 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ details.title }}</view>
8
         <view class="common-card-title">{{ details.title }}</view>
10
-        <!-- rate -->
11
         <view class="common-card-rate">
9
         <view class="common-card-rate">
12
-          <uni-rate allow-half :value="content.rate" color="#ddd" activeColor="#ff5702" />
10
+          <uni-rate allow-half :value="content.rate" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
13
           <text>{{ content.rate }}</text>
11
           <text>{{ content.rate }}</text>
14
         </view>
12
         </view>
15
-        <!-- sub title -->
16
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
13
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
17
       </view>
14
       </view>
18
       <view class="common-card">
15
       <view class="common-card">
@@ -21,7 +18,7 @@
21
           <u-parse :html="content?.intro" />
18
           <u-parse :html="content?.intro" />
22
         </view>
19
         </view>
23
         <view class="common-card-title u-margin-top-30">精品推荐</view>
20
         <view class="common-card-title u-margin-top-30">精品推荐</view>
24
-        <view class="common-card-list" v-if="content.facilities.length > 0">
21
+        <view class="common-card-list" v-if="content.facilities?.length > 0">
25
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
22
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
26
             <view class="item-img-wrap">
23
             <view class="item-img-wrap">
27
               <image :src="item.img" mode="scaleToFill" />
24
               <image :src="item.img" mode="scaleToFill" />
@@ -50,8 +47,10 @@ onLoad(async (options) => {
50
   const parkId = uni.getStorageSync('parkId')
47
   const parkId = uni.getStorageSync('parkId')
51
   const res = await getParkServiceEatDetail(id.value, parkId)
48
   const res = await getParkServiceEatDetail(id.value, parkId)
52
   if (res.code === 200) {
49
   if (res.code === 200) {
53
-    details.value = res.data
54
-    content.value = JSON.parse(details.value.content)
50
+    if (res.data) {
51
+      details.value = res.data
52
+      content.value = JSON.parse(details.value?.content || '{}')
53
+    }
55
   }
54
   }
56
 })
55
 })
57
 </script>
56
 </script>

+ 10 - 8
src/base/shop/detailsShop.vue

@@ -5,23 +5,23 @@
5
     </view>
5
     </view>
6
     <view class="common-content-wrapper">
6
     <view class="common-content-wrapper">
7
       <view class="common-card">
7
       <view class="common-card">
8
-        <!-- common title -->
9
         <view class="common-card-title">{{ details.title }}</view>
8
         <view class="common-card-title">{{ details.title }}</view>
10
-        <!-- rate -->
11
         <view class="common-card-rate">
9
         <view class="common-card-rate">
12
-          <uni-rate allow-half :value="content.rate" color="#ddd" activeColor="#ff5702" />
10
+          <uni-rate allow-half :value="content.rate" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
13
           <text>{{ content.rate }}</text>
11
           <text>{{ content.rate }}</text>
14
         </view>
12
         </view>
15
-        <!-- sub title -->
16
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
13
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
17
       </view>
14
       </view>
18
       <view class="common-card">
15
       <view class="common-card">
19
         <view class="common-card-title">店铺简介</view>
16
         <view class="common-card-title">店铺简介</view>
20
-        <view class="common-card-content">
17
+        <view class="common-card-content" v-if="content?.intro">
21
           <u-parse :html="content?.intro" />
18
           <u-parse :html="content?.intro" />
22
         </view>
19
         </view>
20
+        <view class="common-card-content" v-else>
21
+          <u-empty text="暂无简介" />
22
+        </view>
23
         <view class="common-card-title u-margin-top-30">精品推荐</view>
23
         <view class="common-card-title u-margin-top-30">精品推荐</view>
24
-        <view class="common-card-list" v-if="content.facilities.length > 0">
24
+        <view class="common-card-list" v-if="content.facilities?.length > 0">
25
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
25
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
26
             <view class="item-img-wrap">
26
             <view class="item-img-wrap">
27
               <image :src="item.img" mode="scaleToFill" />
27
               <image :src="item.img" mode="scaleToFill" />
@@ -50,8 +50,10 @@ onLoad(async (options) => {
50
   const parkId = uni.getStorageSync('parkId')
50
   const parkId = uni.getStorageSync('parkId')
51
   const res = await getParkServiceShopDetail(id.value, parkId)
51
   const res = await getParkServiceShopDetail(id.value, parkId)
52
   if (res.code === 200) {
52
   if (res.code === 200) {
53
-    details.value = res.data
54
-    content.value = JSON.parse(details.value.content)
53
+    if (res.data) {
54
+      details.value = res.data
55
+      content.value = JSON.parse(details.value?.content || '{}')
56
+    }
55
   }
57
   }
56
 })
58
 })
57
 </script>
59
 </script>

+ 1 - 1
src/base/shop/index.vue

@@ -8,7 +8,7 @@
8
 
8
 
9
 <script lang="ts" setup>
9
 <script lang="ts" setup>
10
 import { ref, computed } from 'vue'
10
 import { ref, computed } from 'vue'
11
-import { onLoad, onShow, onPageScroll } from '@dcloudio/uni-app'
11
+import { onShow, onPageScroll } from '@dcloudio/uni-app'
12
 import { getParkServiceShopList } from '@/api/home'
12
 import { getParkServiceShopList } from '@/api/home'
13
 import { useListLoader } from '@/composables/useListLoader'
13
 import { useListLoader } from '@/composables/useListLoader'
14
 
14
 

+ 1 - 1
src/base/shop/meal.vue

@@ -8,7 +8,7 @@
8
 
8
 
9
 <script lang="ts" setup>
9
 <script lang="ts" setup>
10
 import { ref, computed } from 'vue'
10
 import { ref, computed } from 'vue'
11
-import { onLoad, onShow, onPageScroll } from '@dcloudio/uni-app'
11
+import { onShow, onPageScroll } from '@dcloudio/uni-app'
12
 import { getParkServiceEatList } from '@/api/home'
12
 import { getParkServiceEatList } from '@/api/home'
13
 import { useListLoader } from '@/composables/useListLoader'
13
 import { useListLoader } from '@/composables/useListLoader'
14
 
14
 

+ 0 - 1
src/base/suggest/details.vue

@@ -1,6 +1,5 @@
1
 <template>
1
 <template>
2
   <view class="notice-detail-container">
2
   <view class="notice-detail-container">
3
-    <!-- 详情内容 -->
4
     <view class="notice-detail-content">
3
     <view class="notice-detail-content">
5
       <view class="detail-content-header">
4
       <view class="detail-content-header">
6
         <view class="title">{{ detailInfo.title }}</view>
5
         <view class="title">{{ detailInfo.title }}</view>

+ 58 - 20
src/base/suggest/record.vue

@@ -1,30 +1,65 @@
1
 <template>
1
 <template>
2
-  <view class="suggest-record-container">
3
-    <view class="record-item">
4
-      <view class="record-item-header">
5
-        <view class="title u-line-2">功能还有不少需要提升的,需要改进的地方不少希望尽快处理提升完善</view>
6
-        <view class="pic-list">
7
-          <view class="pic-wrap">
8
-            <image src="" mode="scaleToFill" />
2
+  <mescroll-body @init="mescrollInit" :down="{ use: true, minAngle: angle }" @down="downCallback" @up="upCallback">
3
+    <view class="suggest-record-container">
4
+      <view class="record-item" v-for="(item, index) in listData" :key="index">
5
+        <view class="record-item-header" :class="{ borderBottom: item.status === 1 }" :style="{ paddingBottom: item.status === 0 ? '0' : '24rpx' }">
6
+          <view class="title u-line-2">{{ item.content }}</view>
7
+          <view class="pic-list">
8
+            <view class="pic-wrap" v-for="(pic, index) in item.albumPics" :key="index">
9
+              <image :src="pic" mode="aspectFill" @click="previewImage(item.albumPics, index)" />
10
+            </view>
9
           </view>
11
           </view>
10
-          <view class="pic-wrap">
11
-            <image src="" mode="scaleToFill" />
12
+          <view class="time-status-wrap">
13
+            <view class="time-text">{{ item.publishAt }}</view>
14
+            <view class="status-text" :class="{ warning: item.status === 0 }">{{ item.status === 1 ? '已完结' : '待反馈' }}</view>
12
           </view>
15
           </view>
13
         </view>
16
         </view>
14
-        <view class="time-status-wrap">
15
-          <view class="time-text">2025-10-12 12:36:50</view>
16
-          <view class="status-text">已完结</view>
17
+        <view class="record-item-bottom" v-if="item.status === 1">
18
+          <view class="bottom-title-text">{{ item.feedback }}</view>
19
+          <view class="bottom-time-text">{{ item.feedbackAt }}</view>
17
         </view>
20
         </view>
18
       </view>
21
       </view>
19
-      <view class="record-item-bottom">
20
-        <view class="bottom-title-text">感谢您对我们的反馈,我们会持续优化, 继续完善!</view>
21
-        <view class="bottom-time-text">2025-10-12 12:36:50</view>
22
-      </view>
23
     </view>
22
     </view>
24
-  </view>
23
+  </mescroll-body>
25
 </template>
24
 </template>
26
 
25
 
27
-<script lang="ts" setup></script>
26
+<script lang="ts" setup>
27
+import { ref } from 'vue'
28
+import { onLoad, onPageScroll } from '@dcloudio/uni-app'
29
+import { getQuestionFeedbackList } from '@/api/home'
30
+import { useListLoader } from '@/composables/useListLoader'
31
+
32
+const angle = ref(45)
33
+// 监听页面滚动
34
+onPageScroll((e) => {
35
+  if (e.scrollTop > 80) {
36
+    angle.value = 90
37
+  } else {
38
+    angle.value = 45
39
+  }
40
+})
41
+
42
+// 图片预览功能
43
+const previewImage = (pics: string[], currentIndex: number) => {
44
+  // 将图片路径转换为完整路径
45
+  const fullImageList = pics.map((pic) => pic)
46
+
47
+  // 调用uni的图片预览API
48
+  uni.previewImage({
49
+    current: fullImageList[currentIndex], // 当前显示图片的http链接
50
+    urls: fullImageList, // 需要预览的图片http链接列表
51
+    loop: true // 是否可循环预览
52
+  })
53
+}
54
+
55
+// 列表加载
56
+const { listData, upCallback, downCallback, handleSearch, mescrollInit } = useListLoader({
57
+  apiFn: getQuestionFeedbackList,
58
+  initialParams: {
59
+    parkId: uni.getStorageSync('parkId')
60
+  }
61
+})
62
+</script>
28
 
63
 
29
 <style lang="scss" scoped>
64
 <style lang="scss" scoped>
30
 .suggest-record-container {
65
 .suggest-record-container {
@@ -36,10 +71,12 @@
36
     padding: 34rpx 34rpx 38rpx 34rpx;
71
     padding: 34rpx 34rpx 38rpx 34rpx;
37
     background-color: #fff;
72
     background-color: #fff;
38
     border-radius: 14rpx;
73
     border-radius: 14rpx;
74
+    margin-bottom: 24rpx;
39
     .record-item-header {
75
     .record-item-header {
40
       box-sizing: border-box;
76
       box-sizing: border-box;
41
-      padding-bottom: 24rpx;
42
-      border-bottom: 1rpx solid #f4f5f9;
77
+      &.borderBottom {
78
+        border-bottom: 1rpx solid #f4f5f9;
79
+      }
43
       .title {
80
       .title {
44
         font-size: 28rpx;
81
         font-size: 28rpx;
45
         color: #333;
82
         color: #333;
@@ -88,6 +125,7 @@
88
         font-weight: 500;
125
         font-weight: 500;
89
         line-height: 42rpx;
126
         line-height: 42rpx;
90
         margin-bottom: 20rpx;
127
         margin-bottom: 20rpx;
128
+        color: #999;
91
       }
129
       }
92
       .bottom-time-text {
130
       .bottom-time-text {
93
         font-size: 25rpx;
131
         font-size: 25rpx;

+ 92 - 12
src/base/suggest/suggest.vue

@@ -3,17 +3,22 @@
3
     <!-- 问题类型 -->
3
     <!-- 问题类型 -->
4
     <HyCard title="请选择您要反馈的问题类型">
4
     <HyCard title="请选择您要反馈的问题类型">
5
       <view class="suggest-type-wrapper">
5
       <view class="suggest-type-wrapper">
6
-        <view class="type-item active">现场环境</view>
7
-        <view class="type-item">商家服务</view>
8
-        <view class="type-item">商品问题</view>
9
-        <view class="type-item">价格问题</view>
10
-        <view class="type-item">其他</view>
6
+        <view
7
+          v-for="(item, index) in typeList"
8
+          :key="index"
9
+          class="type-item"
10
+          :class="{ active: index === typeIndex }"
11
+          @click="handleTypeClick(index)"
12
+        >
13
+          {{ item.name }}
14
+        </view>
11
       </view>
15
       </view>
12
     </HyCard>
16
     </HyCard>
13
     <!-- 描述问题 -->
17
     <!-- 描述问题 -->
14
     <HyCard title="请描述您的问题">
18
     <HyCard title="请描述您的问题">
15
       <view class="suggest-common-wrapper">
19
       <view class="suggest-common-wrapper">
16
         <u-input
20
         <u-input
21
+          v-model="form.content"
17
           type="textarea"
22
           type="textarea"
18
           :height="328"
23
           :height="328"
19
           :maxlength="200"
24
           :maxlength="200"
@@ -25,21 +30,95 @@
25
     <!-- 图片描述 -->
30
     <!-- 图片描述 -->
26
     <HyCard title="图片描述(选填)">
31
     <HyCard title="图片描述(选填)">
27
       <view class="suggest-common-wrapper">
32
       <view class="suggest-common-wrapper">
28
-        <u-upload />
33
+        <u-upload ref="uploadRef" width="160" height="160" :action="'/system/oss/upload'" />
29
       </view>
34
       </view>
30
     </HyCard>
35
     </HyCard>
31
     <!-- 联系方式 -->
36
     <!-- 联系方式 -->
32
     <HyCard title="联系方式">
37
     <HyCard title="联系方式">
33
       <view class="suggest-common-wrapper">
38
       <view class="suggest-common-wrapper">
34
-        <u-input placeholder="请输入您的联系方式" />
39
+        <u-input v-model="form.phone" placeholder="请输入您的联系方式" />
35
       </view>
40
       </view>
36
     </HyCard>
41
     </HyCard>
37
     <!-- 提交 -->
42
     <!-- 提交 -->
38
-    <view class="submit-btn-wrapper">提交</view>
43
+    <view class="submit-btn-wrapper" @click="submit">提交</view>
39
   </view>
44
   </view>
40
 </template>
45
 </template>
41
 
46
 
42
-<script lang="ts" setup></script>
47
+<script lang="ts" setup>
48
+import { computed, reactive, ref, getCurrentInstance } from 'vue'
49
+import { addQuestionFeedback } from '@/api/home'
50
+
51
+const { proxy } = getCurrentInstance() as any
52
+
53
+const typeList = ref([
54
+  { name: '现场环境', value: 1 },
55
+  { name: '商家服务', value: 2 },
56
+  { name: '商品问题', value: 3 },
57
+  { name: '价格问题', value: 4 },
58
+  { name: '其他', value: 5 }
59
+])
60
+const typeIndex = ref(0)
61
+const categoryId = computed(() => typeList.value[typeIndex.value].value)
62
+
63
+const handleTypeClick = (index: number) => {
64
+  typeIndex.value = index
65
+}
66
+
67
+const form = reactive({
68
+  content: '',
69
+  phone: ''
70
+})
71
+
72
+const pics = ref<any>([])
73
+
74
+const submit = () => {
75
+  if (!form.content) {
76
+    uni.showToast({
77
+      title: '请描述您的问题',
78
+      icon: 'none'
79
+    })
80
+    return
81
+  }
82
+  if (!form.phone) {
83
+    uni.showToast({
84
+      title: '请输入您的联系方式',
85
+      icon: 'none'
86
+    })
87
+    return
88
+  }
89
+  // 处理上传的图片
90
+  const files = proxy?.$refs?.uploadRef?.lists.filter((v: any) => v.progress == 100) || []
91
+  files.forEach((file: any) => {
92
+    if (file.response && file.response.data && file.response.data.url) {
93
+      pics.value.push(file.response.data.url)
94
+    }
95
+  })
96
+  // 构造提交参数
97
+  const submitParams = {
98
+    ...form,
99
+    categoryId: categoryId.value,
100
+    albumPics: pics.value,
101
+    parkId: uni.getStorageSync('parkId')
102
+  }
103
+  // 提交到服务器
104
+  addQuestionFeedback(submitParams).then((res: any) => {
105
+    if (res.code == 200) {
106
+      uni.showToast({
107
+        title: '提交成功',
108
+        icon: 'success'
109
+      })
110
+      // 提交成功后,清空表单数据
111
+      form.content = ''
112
+      form.phone = ''
113
+      pics.value = []
114
+      typeIndex.value = 0
115
+      setTimeout(() => {
116
+        uni.navigateBack()
117
+      }, 1000)
118
+    }
119
+  })
120
+}
121
+</script>
43
 
122
 
44
 <style lang="scss" scoped>
123
 <style lang="scss" scoped>
45
 .suggest-submit-container {
124
 .suggest-submit-container {
@@ -83,9 +162,10 @@
83
     font-size: 31rpx;
162
     font-size: 31rpx;
84
     color: #fff;
163
     color: #fff;
85
     border-radius: 42rpx;
164
     border-radius: 42rpx;
86
-    position: fixed;
87
-    bottom: 31rpx;
88
-    left: 28rpx;
165
+    margin-top: 50rpx;
166
+    // position: fixed;
167
+    // bottom: 31rpx;
168
+    // left: 28rpx;
89
   }
169
   }
90
 }
170
 }
91
 </style>
171
 </style>

+ 0 - 2
src/base/travel/tips.vue

@@ -1,7 +1,6 @@
1
 <template>
1
 <template>
2
   <mescroll-body @init="mescrollInit" :down="{ use: true, minAngle: angle }" @down="downCallback" @up="upCallback">
2
   <mescroll-body @init="mescrollInit" :down="{ use: true, minAngle: angle }" @down="downCallback" @up="upCallback">
3
     <view class="travel-tips-container">
3
     <view class="travel-tips-container">
4
-      <!-- tabs -->
5
       <u-tabs
4
       <u-tabs
6
         v-model="tabActive"
5
         v-model="tabActive"
7
         :list="list"
6
         :list="list"
@@ -13,7 +12,6 @@
13
         }"
12
         }"
14
         @change="handleTabChange"
13
         @change="handleTabChange"
15
       ></u-tabs>
14
       ></u-tabs>
16
-      <!-- list -->
17
       <view class="travel-tips-list">
15
       <view class="travel-tips-list">
18
         <view class="tips-list-item" v-for="(item, index) in listData" :key="index" @click="toDetail(item.id)">
16
         <view class="tips-list-item" v-for="(item, index) in listData" :key="index" @click="toDetail(item.id)">
19
           <view class="title u-line-2">{{ item.title }}</view>
17
           <view class="title u-line-2">{{ item.title }}</view>

+ 3 - 4
src/components/HyCard.vue

@@ -16,9 +16,7 @@
16
 </template>
16
 </template>
17
 
17
 
18
 <script lang="ts" setup>
18
 <script lang="ts" setup>
19
-import { ref } from 'vue'
20
-
21
-const props = defineProps({
19
+defineProps({
22
   title: {
20
   title: {
23
     type: String,
21
     type: String,
24
     default: ''
22
     default: ''
@@ -61,7 +59,8 @@ const handleClickRight = () => {
61
   border-radius: 14rpx;
59
   border-radius: 14rpx;
62
   &.bg-card {
60
   &.bg-card {
63
     width: 100%;
61
     width: 100%;
64
-    min-height: 549rpx;
62
+    // min-height: 549rpx;
63
+    padding-bottom: 24rpx;
65
     background-position: center center;
64
     background-position: center center;
66
     background-size: 100% 100%;
65
     background-size: 100% 100%;
67
     background-repeat: no-repeat;
66
     background-repeat: no-repeat;

+ 1 - 3
src/components/HyCharge.vue

@@ -13,9 +13,7 @@
13
 </template>
13
 </template>
14
 
14
 
15
 <script lang="ts" setup>
15
 <script lang="ts" setup>
16
-import { ref } from 'vue'
17
-
18
-const props = defineProps({
16
+defineProps({
19
   title: {
17
   title: {
20
     type: String,
18
     type: String,
21
     default: '快充'
19
     default: '快充'

+ 3 - 2
src/components/HyService.vue

@@ -5,7 +5,7 @@
5
       <text>{{ item.title }}</text>
5
       <text>{{ item.title }}</text>
6
     </view>
6
     </view>
7
     <view class="item-right-wrap" :style="{ backgroundImage: `url(${minioUrl}/bg_service_03.png)` }">
7
     <view class="item-right-wrap" :style="{ backgroundImage: `url(${minioUrl}/bg_service_03.png)` }">
8
-      <view class="main-text" v-if="item.title === '司机之家'">淋浴/洗衣</view>
8
+      <view class="main-text" v-if="item.title === '司机之家'">{{ item.content.serviceContent }}</view>
9
       <view class="block-content" v-else>
9
       <view class="block-content" v-else>
10
         <view class="label">空闲</view>
10
         <view class="label">空闲</view>
11
         <view class="number-box">
11
         <view class="number-box">
@@ -20,7 +20,8 @@
20
 <script lang="ts" setup>
20
 <script lang="ts" setup>
21
 import { useGlobal } from '@/composables/index'
21
 import { useGlobal } from '@/composables/index'
22
 const { minioUrl } = useGlobal()
22
 const { minioUrl } = useGlobal()
23
-const props = defineProps({
23
+
24
+defineProps({
24
   item: {
25
   item: {
25
     type: Object,
26
     type: Object,
26
     default: () => ({})
27
     default: () => ({})

+ 0 - 3
src/components/HyTag.vue

@@ -8,9 +8,6 @@
8
 </template>
8
 </template>
9
 
9
 
10
 <script lang="ts" setup>
10
 <script lang="ts" setup>
11
-import { useGlobal } from '@/composables/index'
12
-const { minioUrl } = useGlobal()
13
-
14
 // props需要传入 图片宽高、文字、字号、是否需要背景边框
11
 // props需要传入 图片宽高、文字、字号、是否需要背景边框
15
 defineProps({
12
 defineProps({
16
   imgWidth: {
13
   imgWidth: {

Разница между файлами не показана из-за своего большого размера
+ 0 - 1026
src/menu/index.js


+ 1 - 1
src/pages.json

@@ -54,7 +54,7 @@
54
           "path": "suggest/record",
54
           "path": "suggest/record",
55
           "style": {
55
           "style": {
56
             "navigationBarTitleText": "反馈历史",
56
             "navigationBarTitleText": "反馈历史",
57
-            "enablePullDownRefresh": true
57
+            "enablePullDownRefresh": false
58
           }
58
           }
59
         },
59
         },
60
         {
60
         {

+ 34 - 5
src/pages/index.vue

@@ -7,15 +7,16 @@ import {
7
   getParkServiceShopList,
7
   getParkServiceShopList,
8
   getParkServiceScenicList,
8
   getParkServiceScenicList,
9
   getParkServiceFacility,
9
   getParkServiceFacility,
10
-  getParkServiceNoticeList
10
+  getParkServiceNoticeList,
11
+  getBannerApi
11
 } from '@/api/home'
12
 } from '@/api/home'
12
-import { getParkWebAPI } from '@/api/system'
13
+import { h5PhoneLoginApi } from '@/api/login'
13
 import { useListLoader } from '@/composables/useListLoader'
14
 import { useListLoader } from '@/composables/useListLoader'
14
 import { useGlobal } from '@/composables/index'
15
 import { useGlobal } from '@/composables/index'
15
 import { user } from '@/stores/modules/user'
16
 import { user } from '@/stores/modules/user'
16
 
17
 
17
-const userStore = user()
18
 const { minioUrl } = useGlobal()
18
 const { minioUrl } = useGlobal()
19
+const userStore = user()
19
 
20
 
20
 const angle = ref(45)
21
 const angle = ref(45)
21
 // 监听页面滚动
22
 // 监听页面滚动
@@ -54,7 +55,17 @@ const isRescueShow = ref(false)
54
 // 失物招领弹窗展示
55
 // 失物招领弹窗展示
55
 const isLostFoundShow = ref(false)
56
 const isLostFoundShow = ref(false)
56
 
57
 
57
-onLoad(() => {
58
+onLoad((options) => {
59
+  const m = options?.m || ''
60
+  if (m) {
61
+    h5PhoneLoginApi(m).then((res: any) => {
62
+      const token = res.data.token || ''
63
+      if (token) {
64
+        uni.setStorageSync('token', token)
65
+        userStore.setToken(token)
66
+      }
67
+    })
68
+  }
58
   // 页面加载时从本地缓存获取园区ID
69
   // 页面加载时从本地缓存获取园区ID
59
   const cachedParkId = uni.getStorageSync('parkId')
70
   const cachedParkId = uni.getStorageSync('parkId')
60
   if (cachedParkId) {
71
   if (cachedParkId) {
@@ -74,6 +85,8 @@ const init = () => {
74
   getFacilityList()
85
   getFacilityList()
75
   // 获取出行提醒数据
86
   // 获取出行提醒数据
76
   getNoticeList()
87
   getNoticeList()
88
+  // 获取banner数据
89
+  // getBannerList()
77
 }
90
 }
78
 
91
 
79
 // 处理园区选择变化
92
 // 处理园区选择变化
@@ -93,6 +106,15 @@ onShow(() => {
93
   init()
106
   init()
94
 })
107
 })
95
 
108
 
109
+// 获取banner数据
110
+const bannerList = ref<any>([])
111
+const getBannerList = async () => {
112
+  const res = (await getBannerApi()) as any
113
+  if (res.data) {
114
+    bannerList.value = res.data.map((item: any) => item.imageInfo?.url)
115
+  }
116
+}
117
+
96
 // 获取我要加油数据
118
 // 获取我要加油数据
97
 const oilInfo = ref<any>({})
119
 const oilInfo = ref<any>({})
98
 const listOli = ref<any>([])
120
 const listOli = ref<any>([])
@@ -209,6 +231,13 @@ const navigateToShop = () => {
209
   })
231
   })
210
 }
232
 }
211
 
233
 
234
+// 精选商家详情点击事件
235
+const navigateToShopDetail = (id: string) => {
236
+  uni.navigateTo({
237
+    url: '/base/shop/detailsShop?id=' + id
238
+  })
239
+}
240
+
212
 // 景点点击事件
241
 // 景点点击事件
213
 const navigateToSpot = (id: string) => {
242
 const navigateToSpot = (id: string) => {
214
   uni.navigateTo({
243
   uni.navigateTo({
@@ -354,7 +383,7 @@ const callPhone = (phone: string) => {
354
       <!-- 人气优选商家 -->
383
       <!-- 人气优选商家 -->
355
       <HyCard title="人气优选商家" rightText="更多商家" isShowRight :marginBottom="24" @clickRight="navigateToShop">
384
       <HyCard title="人气优选商家" rightText="更多商家" isShowRight :marginBottom="24" @clickRight="navigateToShop">
356
         <view class="index-shop-wrapper" v-if="shopList.length > 0">
385
         <view class="index-shop-wrapper" v-if="shopList.length > 0">
357
-          <view class="shop-item" v-for="(item, index) in shopList" :key="index">
386
+          <view class="shop-item" v-for="(item, index) in shopList" :key="index" @click="navigateToShopDetail(item.id)">
358
             <view class="img-wrap">
387
             <view class="img-wrap">
359
               <image :src="item.content.image" mode="scaleToFill" />
388
               <image :src="item.content.image" mode="scaleToFill" />
360
             </view>
389
             </view>

+ 27 - 3
src/pages/my.vue

@@ -1,16 +1,40 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
+import { ref } from 'vue'
3
+import { onLoad } from '@dcloudio/uni-app'
4
+import { getUserInfoApi } from '@/api/login'
2
 import { useGlobal } from '@/composables/index'
5
 import { useGlobal } from '@/composables/index'
3
 const { minioUrl } = useGlobal()
6
 const { minioUrl } = useGlobal()
7
+
8
+const userInfo = ref<any>({})
9
+
10
+onLoad(() => {
11
+  getUserInfoApi().then((res: any) => {
12
+    const _userInfo = res.data || {}
13
+    userInfo.value = _userInfo
14
+  })
15
+})
16
+
17
+const toPage = (path: string) => {
18
+  uni.navigateTo({
19
+    url: path
20
+  })
21
+}
22
+
23
+const callPhone = (phone: string) => {
24
+  uni.makePhoneCall({
25
+    phoneNumber: phone
26
+  })
27
+}
4
 </script>
28
 </script>
5
 
29
 
6
 <template>
30
 <template>
7
   <view class="my-container" :style="{ backgroundImage: `url(${minioUrl + '/my_bg.png'})` }">
31
   <view class="my-container" :style="{ backgroundImage: `url(${minioUrl + '/my_bg.png'})` }">
8
     <view class="my-header-wrapper">
32
     <view class="my-header-wrapper">
9
       <image :src="minioUrl + '/icon_default_user.png'" mode="scaleToFill" />
33
       <image :src="minioUrl + '/icon_default_user.png'" mode="scaleToFill" />
10
-      <text class="user-name-text">用户15615550287</text>
34
+      <text class="user-name-text">{{ userInfo.user.mobile || userInfo.user.username }}</text>
11
     </view>
35
     </view>
12
     <HyCard>
36
     <HyCard>
13
-      <view class="my-list-item">
37
+      <view class="my-list-item" @click="toPage('/base/suggest/record')">
14
         <view class="list-left">
38
         <view class="list-left">
15
           <image :src="minioUrl + '/icon_feed.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
39
           <image :src="minioUrl + '/icon_feed.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
16
           <text class="text">我的反馈</text>
40
           <text class="text">我的反馈</text>
@@ -19,7 +43,7 @@ const { minioUrl } = useGlobal()
19
           <image :src="minioUrl + '/icon_right.png'" mode="scaleToFill" />
43
           <image :src="minioUrl + '/icon_right.png'" mode="scaleToFill" />
20
         </view>
44
         </view>
21
       </view>
45
       </view>
22
-      <view class="my-list-item">
46
+      <view class="my-list-item" @click="callPhone('0532-88886666')">
23
         <view class="list-left">
47
         <view class="list-left">
24
           <image :src="minioUrl + '/icon_phone.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
48
           <image :src="minioUrl + '/icon_phone.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
25
           <text class="text">客服热线:0532-88886666</text>
49
           <text class="text">客服热线:0532-88886666</text>

+ 5 - 5
src/pages/service.vue

@@ -19,10 +19,10 @@ onPageScroll((e) => {
19
 
19
 
20
 const rateMap = {
20
 const rateMap = {
21
   5: '五星级服务区',
21
   5: '五星级服务区',
22
-  4: '四星服务区',
23
-  3: '三星服务区',
24
-  2: '二星服务区',
25
-  1: '一星服务区'
22
+  4: '四星服务区',
23
+  3: '三星服务区',
24
+  2: '二星服务区',
25
+  1: '一星服务区'
26
 } as any
26
 } as any
27
 
27
 
28
 const list = computed(() => {
28
 const list = computed(() => {
@@ -64,7 +64,7 @@ const goToNavigation = (longitude: string, latitude: string, name: string) => {
64
             <view class="header-right-box">
64
             <view class="header-right-box">
65
               <view class="u-line-1 title">{{ item.title }}</view>
65
               <view class="u-line-1 title">{{ item.title }}</view>
66
               <view class="rate-content">
66
               <view class="rate-content">
67
-                <uni-rate :value="item.content.rate" activeColor="#ff5702"></uni-rate>
67
+                <uni-rate allow-half :value="item.content.rate" disabled disabledColor="#ff5702" activeColor="#ff5702"></uni-rate>
68
                 <text class="rate-text">{{ rateMap[item.content.rate] }}</text>
68
                 <text class="rate-text">{{ rateMap[item.content.rate] }}</text>
69
               </view>
69
               </view>
70
               <view class="distance">{{ item.content.distance }}KM</view>
70
               <view class="distance">{{ item.content.distance }}KM</view>

+ 0 - 7
src/stores/index.ts

@@ -1,10 +1,3 @@
1
-/*
2
- * @Author: wyd
3
- * @Date: 2024-02
4
- * @LastEditors: wyd
5
- * @LastEditTime: 2024-03
6
- * @Description:
7
- */
8
 import { createPinia } from 'pinia'
1
 import { createPinia } from 'pinia'
9
 import persist from 'pinia-plugin-persistedstate'
2
 import persist from 'pinia-plugin-persistedstate'
10
 
3
 

+ 2 - 2
src/stores/modules/system.ts

@@ -37,13 +37,13 @@ export const system = defineStore(
37
       clearInfo,
37
       clearInfo,
38
       setLoad
38
       setLoad
39
     }
39
     }
40
-  },
40
+  }
41
   // 持久化配置
41
   // 持久化配置
42
   // {
42
   // {
43
   //   persist: {
43
   //   persist: {
44
   //     paths: [],
44
   //     paths: [],
45
   //     storage: {
45
   //     storage: {
46
-        
46
+
47
   //     }
47
   //     }
48
   //   }
48
   //   }
49
   // }
49
   // }

+ 0 - 7
src/stores/modules/user.ts

@@ -1,10 +1,3 @@
1
-/*
2
- * @Author: wyd
3
- * @Date: 2024-02
4
- * @LastEditors: wyd
5
- * @LastEditTime: 2024-04
6
- * @Description: 用户信息
7
- */
8
 import { defineStore } from 'pinia'
1
 import { defineStore } from 'pinia'
9
 import { ref } from 'vue'
2
 import { ref } from 'vue'
10
 import type { UserInfo } from '@/types/user'
3
 import type { UserInfo } from '@/types/user'

+ 0 - 7
src/stores/reset.ts

@@ -1,10 +1,3 @@
1
-/*
2
- * @Author: wyd
3
- * @Date: 2024-03
4
- * @LastEditors: wyd
5
- * @LastEditTime: 2024-03
6
- * @Description: 重置pinia所有状态
7
- */
8
 import cloneDeep from 'lodash/cloneDeep'
1
 import cloneDeep from 'lodash/cloneDeep'
9
 
2
 
10
 export default function resetStore(data: { store: any }) {
3
 export default function resetStore(data: { store: any }) {