Baozhangchao 3 lat temu
rodzic
commit
33a76bc3de

+ 1
- 1
config/dev.js Wyświetl plik

@@ -3,7 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"http://127.0.0.1:8080"',
6
+    // HOST: '"http://192.168.89.147:8080"',
7 7
     HOST: '"http://sgl-v2-test.njyunzhi.com"',
8 8
     OSS: '"yz-shigongli.oss-accelerate.aliyuncs.com"',
9 9
     VERSION: '"2.0.33"',

+ 1
- 1
src/components/SearchBar/index.jsx Wyświetl plik

@@ -10,7 +10,7 @@ export default (props) => {
10 10
 
11 11
 
12 12
   return (
13
-    <View className='searchBar'>
13
+    <View className='searchBar' >
14 14
       <mp-searchbar
15 15
         placeholder={placeholder}
16 16
         onBlur={onBlur}

+ 1
- 1
src/pages/MineUserAll/AllOrder/index.jsx Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 import { useState, useEffect, useMemo, } from 'react'
2
-import {Taro, useRouter } from '@tarojs/taro'
2
+import { Taro, useRouter } from '@tarojs/taro'
3 3
 import { View } from '@tarojs/components'
4 4
 import withLayout from '@/layouts'
5 5
 import CustomNav from '@/components/CustomNav'

+ 5
- 1
src/pages/RoomOrder/index.jsx Wyświetl plik

@@ -17,6 +17,7 @@ export default withLayout((props) => {
17 17
   const [taRoomContent, setTaRoomContent] = useState([])
18 18
   const [orderContent, setOrderContent] = useState([])
19 19
   const [titleLogo, settitleLogo] = useState('none')
20
+  const [loading, setLoading] = useState(false)
20 21
 
21 22
   const { hotelId } = orderContent
22 23
   const CarNumber = orderContent?.personNum
@@ -28,6 +29,7 @@ export default withLayout((props) => {
28 29
   }
29 30
 
30 31
   const handleSubmit = (e) => {
32
+    setLoading(true)
31 33
 
32 34
     // 订阅消息
33 35
     withSubscribeMessage([TPL_MESSAGE_HOTEL_CHECK_OUT], () => {
@@ -45,6 +47,8 @@ export default withLayout((props) => {
45 47
         // Taro.navigateBack({
46 48
         //   delta: 1
47 49
         // })
50
+        setLoading(false)
51
+
48 52
         Taro.reLaunch({
49 53
           url: `/pages/index/index?tab=1&roomId=${roomId}`
50 54
         })
@@ -80,7 +84,7 @@ export default withLayout((props) => {
80 84
               )
81 85
             })
82 86
           }
83
-          <button className='button-OK' onClick={handleSubmit} >确定</button>
87
+          <button className='button-OK' onClick={handleSubmit} loading={loading} disabled={loading} >确定</button>
84 88
         </scroll-view>
85 89
       </View>
86 90
     </view>

+ 5
- 4
src/pages/details/foodDetails/foodDetails.jsx Wyświetl plik

@@ -8,7 +8,7 @@ import {
8 8
 } from "@/services/home";
9 9
 import { getVerifyTargetList } from "@/services/payOrder";
10 10
 import { useState, useEffect, useRef } from "react";
11
-import { Button,View, Ad } from "@tarojs/components";
11
+import { Button, View, Ad } from "@tarojs/components";
12 12
 import Star from "@/components/Star/Star.jsx";
13 13
 import NoData from '@/components/NoData'
14 14
 import Cards from "@/components/foodCards/foodCards.jsx";
@@ -24,11 +24,12 @@ import share from "@/assets/icons/housemantj/touristShare.png";
24 24
 import good from "@/assets/icons/housemantj/touristGood.png";
25 25
 import baozan from "@/assets/icons/housemantj/bgood.png";
26 26
 import weibaozan from "@/assets/icons/housemantj/unLike.png";
27
+import logo from "@/assets/icons/UserCenter/laba.png"
28
+
27 29
 import useSave from "@/utils/hooks/useSave";
28 30
 import useLike from "@/utils/hooks/useLike";
29 31
 import Extend from "../components/Extend/extend";
30 32
 import ImageList from "../components/ImageList";
31
-import logo from "./laba.png";
32 33
 import "./foodDetails.less";
33 34
 
34 35
 export default withLayout((props) => {
@@ -217,8 +218,8 @@ export default withLayout((props) => {
217 218
                     <Cards scene={scene} id={id} setScroll={setScroll} subOrderId={subOrderId} key={item.packageId} editable='1' st={star} goshop='1' item={item} det={detail} />
218 219
                   ))}
219 220
                 </view>
220
-                <view class="adContainer">
221
-                  <Ad unit-id="adunit-a0f97bb7ec8ec7bb" ad-intervals="30" />
221
+                <view class='adContainer'>
222
+                  <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
222 223
                 </view>
223 224
                 <view
224 225
                   style={{

BIN
src/pages/details/foodDetails/laba.png Wyświetl plik


+ 32
- 8
src/pages/details/mjDetails/sceneryDetails.jsx Wyświetl plik

@@ -3,6 +3,7 @@ import ax from '@/assets/icons/housemantj/onlove.png'
3 3
 import dw from '@/assets/icons/housemantj/loc-o.png'
4 4
 import titlejd from '@/assets/icons/housemantj/goodTourist.png'
5 5
 import titlems from '@/assets/icons/housemantj/goodFood.png'
6
+import { compressImage } from '@/utils'
6 7
 import share from '@/assets/icons/housemantj/touristShare.png'
7 8
 import good from '@/assets/icons/housemantj/touristGood.png'
8 9
 import baozan from '@/assets/icons/housemantj/bgood.png'
@@ -13,17 +14,17 @@ import SpinBox from "@/components/Spin/SpinBox";
13 14
 import TabIcon from '@/components/HorTabbar/TabIcon'
14 15
 import { useState, useEffect } from 'react'
15 16
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
16
-import { Button, View, Ad } from '@tarojs/components';
17
+import logo from "@/assets/icons/UserCenter/laba.png"
18
+import { Swiper, SwiperItem, Button, View, Ad } from '@tarojs/components';
17 19
 import useSave from "@/utils/hooks/useSave"
18 20
 import useLike from "@/utils/hooks/useLike"
19 21
 import Cards from '@/components/foodCards/foodCards.jsx'
20 22
 import Taro, { useShareAppMessage } from '@tarojs/taro'
21 23
 import Extend from '../components/Extend/extend'
22
-import ImageList from "../components/ImageList";
23
-import logo from "../foodDetails/laba.png";
24
-
25 24
 import './sceneryDetails.less'
26 25
 
26
+
27
+
27 28
 export default withLayout((props) => {
28 29
   const { router, person, location } = props
29 30
   const { id } = props.router.params
@@ -34,6 +35,10 @@ export default withLayout((props) => {
34 35
 
35 36
   //banner图集数组
36 37
   const [imglist, setimglist] = useState([])
38
+  const [index, setIndex] = useState(0)
39
+  const handchange = (e) => {
40
+    setIndex(e.detail.current)
41
+  }
37 42
 
38 43
   //本店指南
39 44
   const [extend, setExtend] = useState([])
@@ -110,7 +115,26 @@ export default withLayout((props) => {
110 115
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
111 116
         <scroll-view scrollY style={{ height: '100%' }}>
112 117
           <view className='storeDetails'>
113
-            <ImageList imglist={imglist} />
118
+            <View className='huadong'>
119
+              <Swiper
120
+                className='swiper'
121
+                circular
122
+                onChange={handchange}
123
+              >
124
+                {
125
+                  imglist.map((item) => (
126
+
127
+                    <SwiperItem>
128
+                      <image src={compressImage(item.url)} mode='aspectFit' className='storeImage' />
129
+                    </SwiperItem>
130
+                  ))}
131
+              </Swiper>
132
+              <view className='tpPage'>
133
+                <text>
134
+                  {index + 1}/{imglist.length}
135
+                </text>
136
+              </view>
137
+            </View>
114 138
 
115 139
             <view className='storeJs'>
116 140
               <view className='introduce'>
@@ -123,7 +147,7 @@ export default withLayout((props) => {
123 147
               <view className='wz'>{detail.address}</view>
124 148
               <view className='dpPosition' onClick={openMap}>
125 149
                 <image src={dw} className='dwTip' />
126
-                <view className='distance'>{(detail.distance / 1000).toFixed(2)}公里<image src={zhuandao} className="zhuandao" /></view>
150
+                <view className='distance'>{(detail.distance / 1000).toFixed(2)}公里<image src={zhuandao} className='zhuandao' /></view>
127 151
               </view>
128 152
             </view>
129 153
           </view>
@@ -134,8 +158,8 @@ export default withLayout((props) => {
134 158
               <image className='scTip' src={isSaved > 0 ? ax : good} /><text>{isSaved > 0 ? '已收藏' : '加入收藏'}</text>
135 159
             </view>
136 160
           </view>
137
-          <view class="adContainer">
138
-            <Ad unit-id="adunit-a0f97bb7ec8ec7bb" ad-intervals="30" />
161
+          <view class='adContainer'>
162
+            <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
139 163
           </view>
140 164
           <view style={{ position: 'relative', display: extend == '' ? 'none' : '' }}>
141 165
             <view className='title'>

+ 1
- 1
src/pages/index/components/Card/index.jsx Wyświetl plik

@@ -32,7 +32,7 @@ export default (props) => {
32 32
       <view className='contentCard' style={style}>
33 33
         <view className='cardTop'>
34 34
           <image mode='widthFix' onClick={Detail} src={compressImage(item.poster)} className='cCardimg' />
35
-          <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
35
+          {/* <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} /> */}
36 36
           <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
37 37
         </view>
38 38
         <view className='bContent' onClick={Detail}>

+ 23
- 6
src/pages/index/tabs/Recommend.jsx Wyświetl plik

@@ -9,7 +9,8 @@ import { getIndexType, getResourceList } from '@/services/home'
9 9
 import { random } from '@/utils'
10 10
 import Card from '../components/Card'
11 11
 import './less/Recommend.less'
12
-import { OfficialAccount } from '@tarojs/components'
12
+
13
+
13 14
 const listStyle = { height: '100%' }
14 15
 
15 16
 export default (props) => {
@@ -19,7 +20,9 @@ export default (props) => {
19 20
   const [typeList, setTypeList] = useState([])
20 21
   const listRef = useRef()
21 22
 
22
-  const [queryParams, setQueryParams] = useState({ location, pageNum: 1, pageSize: 10, typeId: '' })
23
+  const [queryParams, setQueryParams] = useState({ location, pageNum: 1, pageSize: 10, typeId: '' })//地点
24
+
25
+  // const [queryParams, setQueryParams] = useState({ location, pageNum: 1, pageSize: 10, typeId: '' })//笔记
23 26
   const rfTimes = useRef(0)
24 27
 
25 28
   // 获取资源表信息
@@ -27,8 +30,19 @@ export default (props) => {
27 30
 
28 31
 
29 32
   //分类标签
30
-  const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
31
-  const details = (index, tab) => {
33
+  const tabs = [{ title: '地点' }, { title: '笔记' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
34
+
35
+  //笔记
36
+  const penDetails = (index, tab) => {
37
+    // setActiveTab(index)
38
+    // setQueryParams({
39
+    //   ...queryParams,
40
+    //   typeId: tab
41
+    // })
42
+  }
43
+
44
+
45
+  const placeDetails = (index, tab) => {
32 46
     setActiveTab(index)
33 47
     setQueryParams({
34 48
       ...queryParams,
@@ -38,7 +52,10 @@ export default (props) => {
38 52
   //切换上面的标签
39 53
   const handleTabChange = (e) => {
40 54
     const { index } = e.detail
41
-    details(index, tabs[index].typeId || '')
55
+    // if (index = 0) {
56
+
57
+    // }
58
+    placeDetails(index, tabs[index].typeId || '')
42 59
   }
43 60
 
44 61
   const handleDataChange = (value, e) => {
@@ -56,7 +73,7 @@ export default (props) => {
56 73
     //查询分类标签表
57 74
     getIndexType({ pageSize: 20 }).then((res) => {
58 75
       setTypeList(res.records || [])
59
-      details(1, res.records[0].typeId)
76
+      placeDetails(1, res.records[0]?.typeId)
60 77
     })
61 78
   }, [])
62 79
 

+ 34
- 11
src/pages/search/search.jsx Wyświetl plik

@@ -1,5 +1,6 @@
1 1
 import CustomNav from '@/components/CustomNav'
2 2
 import Taro from '@tarojs/taro'
3
+import { View, Picker } from '@tarojs/components'
3 4
 import withLayout from '@/layouts'
4 5
 import { getIndexSearch } from '@/services/home'
5 6
 import { useEffect, useState } from 'react'
@@ -18,25 +19,47 @@ export default withLayout((props) => {
18 19
       Taro.navigateTo({ url: `/pages/searchResult/searchResult?q=${e.detail.value}` });
19 20
     }
20 21
   }
22
+  const [selectValue, setselectValue] = useState('地点')
23
+  const state = {
24
+    selector: ['地点', '笔记'],
25
+    selectorChecked: selectValue,
26
+    // timeSel: '12:01',
27
+    // dateSel: '2018-04-22'
28
+  }
29
+
30
+  const onChange = e => {
31
+    setselectValue(state.selector[e.detail.value])
32
+  }
21 33
   useEffect(() => {
22 34
     getIndexSearch().then((res) => {
23 35
       setHotList(res || [])
24 36
     })
25 37
   }, [])
26 38
   return (
27
-    <view className='page-index'>
28
-      <view className='index-navbar'>
39
+    <View className='page-index'>
40
+      <View className='index-navbar'>
29 41
         <CustomNav title='搜索' />
30
-      </view>
31
-      <SearchBar placeholder='搜索景点/店铺' onBlur={onSearch} />
32
-      <view className='content'>
33
-        <view className='hotSearch'>热门搜索</view>
34
-        <view className='hotSearchtip'>
42
+      </View>
43
+      <View className='page-index-box' >
44
+
45
+        <Picker className='picker-box' mode='selector' range={state.selector} onChange={onChange}>
46
+          <View className='picker-text'>
47
+            {state.selectorChecked} |
48
+          </View>
49
+        </Picker>
50
+        <View className='selector-box'>
51
+          <SearchBar placeholder='搜索景点/店铺' onBlur={onSearch} />
52
+        </View>
53
+
54
+      </View>
55
+      <View className='content'>
56
+        <View className='hotSearch'>热门搜索</View>
57
+        <View className='hotSearchtip'>
35 58
           {
36
-            (hotList || []).map((item) => <view onClick={() => hotSearch(item.word)}>{item.word}</view>)
59
+            (hotList || []).map((item) => <View onClick={() => hotSearch(item.word)}>{item.word}</View>)
37 60
           }
38
-        </view>
39
-      </view>
40
-    </view>
61
+        </View>
62
+      </View>
63
+    </View>
41 64
   )
42 65
 })

+ 48
- 18
src/pages/search/search.less Wyświetl plik

@@ -1,19 +1,49 @@
1
-.content{
2
-  padding: 60px 30px;
3
-  .hotSearch{
4
-    font-size: 34px;     
5
-    font-weight: bold;
6
-    color: #202020;
7
-    margin-bottom:58.4px;
1
+.page-index {
2
+  .page-index-box {
3
+    margin-top: -10vw;
4
+    .picker-box {
5
+      width: 20%;
6
+      display: inline-block;
7
+      position: relative;
8
+      top: 10vw;
9
+
10
+      .picker-text {
11
+        line-height: 73px;
12
+        text-align: center;
13
+        border-radius: 42px;
14
+        font-size: 30px;
15
+        font-weight: 700;
16
+        background-color: #f8f8f8;
17
+        position: relative;
18
+        top: 34px;
19
+        height: 9.9vw;
20
+        left: 12px;
21
+      }
22
+    }
23
+    .selector-box {
24
+      width: 83%;
25
+      position: relative;
26
+      right: -15vw;
27
+    }
8 28
   }
9
-  .hotSearchtip view{
10
-    border-radius: 30px;
11
-    font-size: 24px;     
12
-    font-weight: bold;
13
-    margin:0 40px 40px 0;
14
-    padding:18px 23px;
15
-    float: left;
16
-    color: #666666;
17
-    border: 1px solid #999999;
18
-  }  
19
-}
29
+
30
+  .content {
31
+    padding: 60px 30px;
32
+    .hotSearch {
33
+      font-size: 34px;
34
+      font-weight: bold;
35
+      color: #202020;
36
+      margin-bottom: 58.4px;
37
+    }
38
+    .hotSearchtip view {
39
+      border-radius: 30px;
40
+      font-size: 24px;
41
+      font-weight: bold;
42
+      margin: 0 40px 40px 0;
43
+      padding: 18px 23px;
44
+      float: left;
45
+      color: #666666;
46
+      border: 1px solid #999999;
47
+    }
48
+  }
49
+}

+ 6
- 1
src/routes.js Wyświetl plik

@@ -22,6 +22,11 @@ const mainPages = [
22 22
     title: '景点详情',
23 23
     page: 'pages/details/mjDetails/sceneryDetails',
24 24
   },
25
+  {
26
+    title: '笔记详情',
27
+    page: 'pages/details/NoteDetails/index',
28
+
29
+  },
25 30
   {
26 31
     title: '订单',
27 32
     page: 'pages/PayOrder/index',
@@ -63,7 +68,7 @@ const mainPages = [
63 68
 // 商户管理页面shop/pages/spread/spreadIndex
64 69
 const shopPages = [
65 70
   {
66
-    title: '商铺管理',  
71
+    title: '商铺管理',
67 72
     page: 'pages/spread/spreadIndex',
68 73
     isIndex: true,
69 74
   },