Baozhangchao 3 anos atrás
pai
commit
ce5e114a85

+ 0
- 8
src/components/BottomMoadl/index.jsx Ver arquivo

@@ -60,14 +60,6 @@ export default (props) => {
60 60
 
61 61
     e.stopPropagation()
62 62
 
63
-    // getRecommendList({ location: location, pageNum: textNextSum, pageSize: 3 }).then(e => {
64
-    //   setRecommendContent(e.records)
65
-    //   setLoading(false)
66
-
67
-    // }).catch(s => {
68
-    //   setLoading(false)
69
-
70
-    // })
71 63
 
72 64
   }
73 65
 

+ 0
- 1
src/components/MasonryLayout/index.jsx Ver arquivo

@@ -18,7 +18,6 @@ import './style.less'
18 18
 
19 19
 export default (props) => {
20 20
   const { className, listData, render } = props
21
-  console.log("🚀 ~ file: index.jsx ~ line 21 ~ listData", listData)
22 21
 
23 22
   // rfTimes 用来区分是否更换数据源
24 23
   const { list, rfTimes: refresh } = listData

+ 2
- 1
src/pages/MineUserAll/MyTravel/index.jsx Ver arquivo

@@ -43,7 +43,8 @@ export default withLayout((props) => {
43 43
 
44 44
   }
45 45
   const handelEdit = (item) => {
46
-    Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${item.travelId}&dayNum=${item.dayNum}` })
46
+    console.log("🚀 ~ file: index.jsx ~ line 46 ~ handelEdit ~ item", item)
47
+    Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${item.travelId}&dayNum=${item.dayNum}&travelId=${item.travelId}` })
47 48
   }
48 49
 
49 50
   const [travelMine, setTravelMine] = useState([])

+ 10
- 2
src/pages/RandomItinerary/components/ConstellationCard/index.jsx Ver arquivo

@@ -12,7 +12,7 @@ import './style.less'
12 12
 
13 13
 
14 14
 export default (props) => {
15
-  const { ico, textNext, onSelected } = props
15
+  const { ico, textNext, onSelected, nextQuestio } = props
16 16
   const [netxIma, setNetxIma] = useState(false)
17 17
 
18 18
   const Ari = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Ari.png'
@@ -130,6 +130,10 @@ export default (props) => {
130 130
   //第一组
131 131
   const handleFilter = (e) => {
132 132
     onSelected()
133
+    setTimeout(() => {
134
+      nextQuestio()
135
+
136
+    }, 500);
133 137
     const res = filterImage.map((item, inx) => {
134 138
       if (item.title == e.title) {
135 139
 
@@ -150,7 +154,11 @@ export default (props) => {
150 154
 
151 155
   //第二组
152 156
   const handleTwoFilter = (e) => {
153
-    onSelected()
157
+    nextQuestio()
158
+    setTimeout(() => {
159
+      nextQuestio()
160
+
161
+    }, 500);
154 162
 
155 163
     const res = twoImage.map((item, inx) => {
156 164
 

+ 4
- 1
src/pages/RandomItinerary/components/FiveSenses/index.jsx Ver arquivo

@@ -13,7 +13,7 @@ const nose = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIc
13 13
 const mouth = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/mouth.png'
14 14
 
15 15
 export default (props) => {
16
-  const { ico, textNext, onSelected } = props
16
+  const { ico, textNext, onSelected, nextQuestio } = props
17 17
 
18 18
 
19 19
   const [netxIma, setNetxIma] = useState(false)
@@ -63,7 +63,10 @@ export default (props) => {
63 63
 
64 64
     })
65 65
     setOneImage(res)
66
+    setTimeout(() => {
67
+      nextQuestio()
66 68
 
69
+    }, 500);
67 70
 
68 71
   }
69 72
 

+ 11
- 1
src/pages/RandomItinerary/components/GirlFriend/index.jsx Ver arquivo

@@ -9,7 +9,7 @@ import './style.less'
9 9
 
10 10
 
11 11
 export default (props) => {
12
-  const { ico, textNext, onSelected } = props
12
+  const { ico, textNext, onSelected, nextQuestio } = props
13 13
 
14 14
   const YES = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/YES.png'
15 15
   const No = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/No.png'
@@ -21,6 +21,11 @@ export default (props) => {
21 21
     setImageOne(true)
22 22
     setImageTow(false)
23 23
     onSelected()
24
+    setTimeout(() => {
25
+      nextQuestio()
26
+
27
+    }, 500);
28
+
24 29
   }
25 30
 
26 31
 
@@ -28,6 +33,11 @@ export default (props) => {
28 33
     setImageOne(false)
29 34
     setImageTow(true)
30 35
     onSelected()//未选择不给到下一题
36
+    setTimeout(() => {
37
+      nextQuestio()
38
+
39
+    }, 500);
40
+
31 41
   }
32 42
 
33 43
 

+ 9
- 1
src/pages/RandomItinerary/components/Hand/index.jsx Ver arquivo

@@ -10,7 +10,7 @@ import './style.less'
10 10
 
11 11
 
12 12
 export default (props) => {
13
-  const { ico, onSelected } = props
13
+  const { ico, onSelected, nextQuestio } = props
14 14
   const LeftHand = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/LeftHand.png'
15 15
   const RightHand = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/RightHand.png'
16 16
 
@@ -21,6 +21,10 @@ export default (props) => {
21 21
     setImageOne(true)
22 22
     setImageTow(false)
23 23
     onSelected()
24
+    setTimeout(() => {
25
+      nextQuestio()
26
+
27
+    }, 500);
24 28
   }
25 29
 
26 30
 
@@ -28,6 +32,10 @@ export default (props) => {
28 32
     setImageOne(false)
29 33
     setImageTow(true)
30 34
     onSelected()
35
+    setTimeout(() => {
36
+      nextQuestio()
37
+
38
+    }, 500);
31 39
   }
32 40
 
33 41
 

+ 5
- 1
src/pages/RandomItinerary/components/UFO/index.jsx Ver arquivo

@@ -11,7 +11,7 @@ import './style.less'
11 11
 
12 12
 
13 13
 export default (props) => {
14
-  const { ico, onSelected } = props
14
+  const { ico, onSelected, handleGoTo } = props
15 15
   const [netxIma, setNetxIma] = useState(false)
16 16
 
17 17
   const MaJiang = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/MaJiang.png'
@@ -74,6 +74,10 @@ export default (props) => {
74 74
 
75 75
     })
76 76
     setUfoImage(res)
77
+    setTimeout(() => {
78
+      handleGoTo()
79
+
80
+    }, 500);
77 81
 
78 82
 
79 83
   }

+ 11
- 7
src/pages/RandomItinerary/index.jsx Ver arquivo

@@ -66,6 +66,10 @@ export default withLayout((props) => {
66 66
     }
67 67
 
68 68
   }
69
+  //选择题目即下一题
70
+  const nextQuestio = () => setShow(show + 1)
71
+
72
+
69 73
 
70 74
 
71 75
   return (
@@ -77,25 +81,25 @@ export default withLayout((props) => {
77 81
 
78 82
         <View className='index-container'>
79 83
           {
80
-            show === 1 && <ConstellationCard ico={ChangeNext} textNext='换一批' onSelected={onSelected} />
84
+            show === 1 && <ConstellationCard ico={ChangeNext} textNext='换一批' onSelected={onSelected} nextQuestio={nextQuestio} />
81 85
           }
82 86
           {
83
-            show === 2 && <GirlFriend onSelected={onSelected} />
87
+            show === 2 && <GirlFriend onSelected={onSelected} nextQuestio={nextQuestio} />
84 88
           }
85 89
           {
86
-            show === 3 && <Hand onSelected={onSelected} />
90
+            show === 3 && <Hand onSelected={onSelected} nextQuestio={nextQuestio} />
87 91
           }
88 92
           {
89
-            show === 4 && <FiveSenses onSelected={onSelected} />
93
+            show === 4 && <FiveSenses onSelected={onSelected} nextQuestio={nextQuestio} />
90 94
           }
91 95
           {
92
-            show === 5 && <UFO onSelected={onSelected} />
96
+            show === 5 && <UFO onSelected={onSelected} handleGoTo={handleGoTo} />
93 97
           }
94 98
 
95 99
         </View>
96 100
 
97 101
 
98
-
102
+        {/* 
99 103
         {
100 104
 
101 105
           btn === true && <View className='btn-bottom' onClick={handleGoTo}>
@@ -105,7 +109,7 @@ export default withLayout((props) => {
105 109
               }
106 110
             </text>
107 111
           </View>
108
-        }
112
+        } */}
109 113
 
110 114
 
111 115
 

+ 54
- 8
src/pages/Travel/Edit/index.jsx Ver arquivo

@@ -1,25 +1,25 @@
1 1
 import Taro from '@tarojs/taro'
2
-import { Image, Button, View, Text } from '@tarojs/components'
2
+import { Image, Button, View, Text, Input } from '@tarojs/components'
3 3
 import SpinBox from "@/components/Spin/SpinBox";
4 4
 import CustomCard from '@/components/foodCards/CustomCard/index'
5 5
 
6
-import { useState, useEffect } from "react";
6
+import { useState, useEffect, useRef } from "react";
7 7
 import BottomMoadl from '@/components/BottomMoadl/index'
8 8
 import RecommendedCard from '@/components/foodCards/RecommendedCard'
9 9
 import Travel from '@/assets/icons/Travel/travel.png'
10 10
 import ChangeNext from '@/assets/icons/Travel/ChangeNext.png'
11 11
 import withLayout from '@/layouts'
12
-
12
+import Popup from '@/components/Popup';
13 13
 import editImg from '@/assets/icons/Travel/editimg.png'
14 14
 import CustomNav from '@/components/CustomNav'
15
-import { deleteTravelItem, getTravelID, getRecommendList } from '@/services/travel'
15
+import { deleteTravelItem, getTravelID, seaveTravelID } from '@/services/travel'
16 16
 
17 17
 import NewCustom from './NewCustom'
18 18
 import './style.less'
19 19
 
20 20
 export default withLayout((props) => {
21 21
   const { router, location } = props
22
-  const { id, dayNum } = router.params
22
+  const { id, dayNum, travelId } = router.params
23 23
 
24 24
 
25 25
 
@@ -32,6 +32,9 @@ export default withLayout((props) => {
32 32
   const [travelCustom, setTravelCustom] = useState()
33 33
 
34 34
 
35
+  const [showDialog, setShowDialog] = useState(false);
36
+  const [inputChangle, setInputChangle] = useState();
37
+
35 38
   const handleDelete = (res) => {
36 39
     setLoading(true)
37 40
     getTravelID(id).then(e => {
@@ -171,13 +174,56 @@ export default withLayout((props) => {
171 174
     setShowFrame(!showFrame)
172 175
 
173 176
   }
177
+  //修改行程名字
178
+
179
+  const handelInput = (e) => {
180
+    console.log(e.detail.value);
181
+
182
+    setInputChangle(e.detail.value)
183
+  }
184
+
185
+  //取消
186
+  const ButtonCancel = () => {
187
+    setShowDialog(false)
188
+
189
+  }
190
+  //确认
191
+  const ButtonOK = () => {
192
+    seaveTravelID(id, { title: inputChangle, travelId: travelId }).then(val => {
193
+      Taro.showToast({
194
+        title: '修改成功',
195
+        icon: 'none',
196
+        duration: 1000
197
+      })
198
+      setShowDialog(false)
199
+      handelAddTravel()
200
+
201
+    })
202
+
203
+  }
204
+
205
+
174 206
 
175
-  const handelCancel = () => {
176
-    Taro.redirectTo({ url: '/pages/MineUserAll/MyTravel/index' })
207
+  const handleModale = () => {
208
+    setShowDialog(true)
177 209
   }
178 210
 
179 211
   return (
180 212
     <view className='page-index'>
213
+      <Popup show={showDialog} maskClosable={false}>
214
+
215
+        <view className='travel-box-info-ROOM'>
216
+          <view className='travel-bi-name-ROOM' >
217
+            <view className='travel-bin-title-ROOM'>修改行程名称:</view>
218
+            <Input className='travel-bint-nameInfo-ROOM' value={inputChangle} onInput={handelInput} />
219
+          </view>
220
+        </view>
221
+
222
+        <view className='travel-button-box' >
223
+          <button className='travelButton-Cancel' onClick={ButtonCancel} >取消</button>
224
+          <button className='travelButton-OK' onClick={ButtonOK} >确定</button>
225
+        </view>
226
+      </Popup>
181 227
       {/* 
182 228
       frameTitle 标题
183 229
       flag 弹窗显示 true false
@@ -193,7 +239,7 @@ export default withLayout((props) => {
193 239
         <scroll-view scrollY style='height: calc(100% - 75px);margin-bottom: 40px;' >
194 240
 
195 241
           <View className='TravelTitle'>
196
-            {travelCustom?.title}<Image src={editImg} className='edit' ></Image>
242
+            {travelCustom?.title}<Image src={editImg} className='edit' onClick={handleModale} ></Image>
197 243
           </View>
198 244
           <View className='index-container'>
199 245
 

+ 51
- 0
src/pages/Travel/Edit/style.less Ver arquivo

@@ -1,3 +1,54 @@
1
+.travel-box-info-ROOM {
2
+  display: flex;
3
+  padding: 10px;
4
+  .travel-bi-name-ROOM {
5
+    width: 100%;
6
+
7
+    .travel-bin-title-ROOM {
8
+      margin: 3vw 3vw;
9
+      color: rgb(125, 125, 125);
10
+    }
11
+    .travel-bint-nameInfo-ROOM {
12
+      font-weight: 800;
13
+      display: block;
14
+      -webkit-border-radius: 4em;
15
+      -moz-border-radius: 4em;
16
+      border-radius: 40px 40px 40px 40px;
17
+      // border-radius: 2em;
18
+      font-size: 28px;
19
+      padding: 1em 3vw;
20
+      box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
21
+    }
22
+  }
23
+}
24
+
25
+.travel-button-box {
26
+  width: 100%;
27
+  margin-top: 53px;
28
+
29
+  .travelButton-Cancel {
30
+    display: inline-block;
31
+    width: 236px;
32
+    height: 78px;
33
+    border: 2px solid #274291;
34
+    font-size: 30px;
35
+    font-weight: bold;
36
+    color: #274291;
37
+    border-radius: 12px;
38
+    margin-right: 80px;
39
+  }
40
+  .travelButton-OK {
41
+    display: inline-block;
42
+    width: 236px;
43
+    height: 78px;
44
+    background: #274291;
45
+    border-radius: 12px;
46
+    font-size: 30px;
47
+    font-weight: bold;
48
+    color: #ffffff;
49
+  }
50
+}
51
+
1 52
 .box-content {
2 53
   height: 100vh;
3 54
   .TravelTitle {

+ 7
- 8
src/pages/details/NoteDetails/index.jsx Ver arquivo

@@ -59,7 +59,6 @@ export default withLayout((props) => {
59 59
   const [guidance, setGuidance] = useState('shareOff')
60 60
 
61 61
   useEffect(() => {
62
-
63 62
     Taro.nextTick(() => {
64 63
       // 在当前同步流程结束后,下一个时间片执行
65 64
       //绑定video 标签,拿到他实际的宽度,然后和 取到的高度,计算,才能得到正确的数值
@@ -135,11 +134,11 @@ export default withLayout((props) => {
135 134
 
136 135
   useEffect(() => {
137 136
     //获取我的行程。
137
+    handelNoteList()
138
+    // getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
139
+    //   setTravelMine(e)
138 140
 
139
-    getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
140
-      setTravelMine(e)
141
-
142
-    })
141
+    // })
143 142
 
144 143
     if (id) {
145 144
       setLoading(true)
@@ -173,7 +172,7 @@ export default withLayout((props) => {
173 172
 
174 173
 
175 174
   return (
176
-    <view className='page-index'>
175
+    <view className='page-index' >
177 176
       {
178 177
         guidance === 'shareOn' ? <view className='index-navbar'>
179 178
           <add-tipsFood logo={logo} custom duration={-1} />
@@ -185,7 +184,7 @@ export default withLayout((props) => {
185 184
       }
186 185
 
187 186
 
188
-      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
187
+      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: 'while' }}>
189 188
         <scroll-view scrollY style={{ height: '100%' }}>
190 189
           <view className='storeDetails'>
191 190
             <View className='huadong'>
@@ -218,7 +217,7 @@ export default withLayout((props) => {
218 217
             </view>
219 218
           </view>
220 219
           <view class='adContainer'>
221
-            <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
220
+            {/* <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' /> */}
222 221
           </view>
223 222
           <view style={{ position: 'relative', display: extend == '' ? 'none' : '' }}>
224 223
             <view className='title'>

+ 1
- 1
src/pages/details/NoteDetails/index.less Ver arquivo

@@ -129,5 +129,5 @@
129 129
   line-height: 34px;
130 130
   text-align: center;
131 131
   padding: 40px 0;
132
-  background-color: #f8f8f8;
132
+  background-color: white;
133 133
 }

+ 1
- 1
src/pages/details/foodDetails/foodDetails.jsx Ver arquivo

@@ -219,7 +219,7 @@ export default withLayout((props) => {
219 219
                   ))}
220 220
                 </view>
221 221
                 <view class='adContainer'>
222
-                  <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
222
+                  {/* <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' /> */}
223 223
                 </view>
224 224
                 <view
225 225
                   style={{

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx Ver arquivo

@@ -136,7 +136,7 @@ export default withLayout((props) => {
136 136
             </view>
137 137
           </view>
138 138
           <view class='adContainer'>
139
-            <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
139
+            {/* <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' /> */}
140 140
           </view>
141 141
           <view style={{ position: 'relative', display: extend == '' ? 'none' : '' }}>
142 142
             <view className='title'>

+ 1
- 1
src/pages/index/components/NoteCard/index.jsx Ver arquivo

@@ -24,7 +24,7 @@ export default (props) => {
24 24
   }
25 25
   return (
26 26
 
27
-    <view className={uqClass} style={{ overflow: 'hidden' }}>
27
+    <view className={uqClass} style={{ overflow: 'hidden', backgroundColor: 'while' }}>
28 28
       <view className='contentCard' style={style}>
29 29
         <view className='cardTop'>
30 30
           <image mode='widthFix' src={compressImage(item.poster)} className='cCardimg' />

+ 1
- 1
src/pages/index/tabs/Recommend.jsx Ver arquivo

@@ -19,7 +19,7 @@ const listStyle = { height: '100%' }
19 19
 export default (props) => {
20 20
   const { router, person, location } = props
21 21
   const listClass = useMemo(() => random('f'), [])
22
-  const [activeTab, setActiveTab] = useState(0)
22
+  const [activeTab, setActiveTab] = useState(1)
23 23
   const listRef = useRef()
24 24
 
25 25
   const [queryParams, setQueryParams] = useState({ location, pageNum: 1, pageSize: 10, typeId: '' })

+ 1
- 1
src/pages/index/tabs/RecommendNote/index.jsx Ver arquivo

@@ -67,7 +67,7 @@ export default (props) => {
67 67
 
68 68
 
69 69
   return (
70
-    <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
70
+    <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column', backgroundColor: 'white' }}>
71 71
 
72 72
       <List
73 73
         ref={listRef}

+ 8
- 0
src/services/travel.js Ver arquivo

@@ -22,6 +22,14 @@ export const getTravelMine = (params) => request(`/travel/mine`, { params })
22 22
 
23 23
 export const getTravelID = (id, params) => request(`/travel/${id}`, { params })
24 24
 
25
+/**
26
+ * 更新我的行程
27
+ * @param {*} 
28
+ * @returns 
29
+ */
30
+
31
+export const seaveTravelID = (id, data) => request(`/travel/${id}`, { method: 'put', data })
32
+
25 33
 
26 34
 /**
27 35
  * 新建保存行程

+ 0
- 1
src/utils/request.js Ver arquivo

@@ -34,7 +34,6 @@ export default (url, options) => {
34 34
           resolve(data)
35 35
 
36 36
         } else {
37
-          console.error(res)
38 37
           logger.error(nwUrl)
39 38
           logger.error(options)
40 39
           logger.error(res)