Baozhangchao 3 years ago
parent
commit
dbc24d62d9
28 changed files with 1655 additions and 21 deletions
  1. BIN
      src/assets/icons/GuideCheck/shareImage.png
  2. 112
    0
      src/components/foodCards/ShareCard/index.jsx
  3. 52
    0
      src/components/foodCards/ShareCard/style.less
  4. 7
    0
      src/pages/RandomItinerary/ResultOver/index.config.js
  5. 87
    0
      src/pages/RandomItinerary/ResultOver/index.jsx
  6. 52
    0
      src/pages/RandomItinerary/ResultOver/style.less
  7. 238
    0
      src/pages/RandomItinerary/components/ConstellationCard/index.jsx
  8. 69
    0
      src/pages/RandomItinerary/components/ConstellationCard/style.less
  9. 106
    0
      src/pages/RandomItinerary/components/FiveSenses/index.jsx
  10. 49
    0
      src/pages/RandomItinerary/components/FiveSenses/style.less
  11. 79
    0
      src/pages/RandomItinerary/components/GirlFriend/index.jsx
  12. 63
    0
      src/pages/RandomItinerary/components/GirlFriend/style.less
  13. 78
    0
      src/pages/RandomItinerary/components/Hand/index.jsx
  14. 50
    0
      src/pages/RandomItinerary/components/Hand/style.less
  15. 38
    0
      src/pages/RandomItinerary/components/ResultOver/index.jsx
  16. 116
    0
      src/pages/RandomItinerary/components/UFO/index.jsx
  17. 48
    0
      src/pages/RandomItinerary/components/UFO/style.less
  18. 11
    0
      src/pages/RandomItinerary/index.config.js
  19. 104
    0
      src/pages/RandomItinerary/index.jsx
  20. 20
    0
      src/pages/RandomItinerary/style.less
  21. 0
    1
      src/pages/Travel/Edit/index.jsx
  22. 1
    0
      src/pages/Travel/Edit/style.less
  23. 63
    0
      src/pages/index/components/Customized/index.jsx
  24. 187
    0
      src/pages/index/components/Customized/style.less
  25. 0
    0
      src/pages/index/components/MiniYellow/style.less
  26. 4
    17
      src/pages/index/tabs/Guide.jsx
  27. 9
    1
      src/routes.js
  28. 12
    2
      src/services/travel.js

BIN
src/assets/icons/GuideCheck/shareImage.png View File


+ 112
- 0
src/components/foodCards/ShareCard/index.jsx View File

@@ -0,0 +1,112 @@
1
+import { useState, useEffect, useRef } from 'react'
2
+
3
+import Taro from '@tarojs/taro'
4
+import { deleteTravel, deleteTravelItem } from '@/services/travel'
5
+
6
+import { View, Text, Image, ScrollView } from '@tarojs/components'
7
+import CouponCard from '@/components/CouponCard'
8
+import { compressImage } from '@/utils'
9
+import SaveIcon from '@/components/SaveIcon'
10
+import Location from '@/components/Location'
11
+
12
+import grassOFF from '@/assets/icons/housemantj/grassOFF.png'
13
+import DeleteTravel from '@/assets/icons/Travel/delete.png'
14
+
15
+import grassNO from '@/assets/icons/housemantj/grassNO.png'
16
+import Popup from '@/components/Popup'
17
+
18
+import './style.less'
19
+
20
+
21
+const CouponMedia = CouponCard.Media
22
+const Action = CouponCard.Action
23
+
24
+//套餐卡片
25
+export default (props) => {
26
+  const { item, st, editable, setScroll, goshop, det, onDay, onDelete } = props
27
+  // const travelId = travelMineContent?.records[0]?.travelId
28
+  const { targetId, itemId } = props.item
29
+  const goDetail = () => {
30
+    Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${targetId}` })
31
+
32
+  }
33
+  const goFood = () => {
34
+    Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${targetId}` })
35
+
36
+  }
37
+  const [showCutover, setShowCutover] = useState(false)
38
+  const [valueList, setValueList] = useState([])
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+  // useEffect(() => {
49
+
50
+  // }, [item])
51
+
52
+  const onClose = () => {
53
+    //关闭当前套餐详情弹窗
54
+    setShowCutover(false)
55
+    //使父组件恢复滚动
56
+    setScroll(true)
57
+  }
58
+
59
+
60
+
61
+
62
+  const handlePayClick = (e) => {
63
+
64
+    onDelete(itemId)
65
+
66
+    // Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
67
+
68
+  }
69
+  const PayAction = <Action.Icon icon={DeleteTravel} text='删除' onClick={handlePayClick} />
70
+
71
+
72
+
73
+
74
+  return (
75
+    <View style={{ margin: '15px 5px' }} >
76
+      <View className='packageDetail' style={{ display: goshop ? '' : 'none' }}>
77
+        <Popup show={showCutover} maskClosable={showCutover} onClose={onClose}>
78
+          <ScrollView
79
+            scrollY
80
+            style={{ maxHeight: '60vh' }}
81
+          >
82
+            <Image mode='widthFix' src={item.details ? item.details : item.poster} />
83
+          </ScrollView>
84
+        </Popup >
85
+      </View>
86
+      <CouponCard action={PayAction}>
87
+        <CouponMedia onClick={item.targetType === 'tourist' ? goDetail : goFood}>
88
+          <CouponMedia.Header
89
+            cashback={item.cashback}
90
+            image={compressImage(item.poster)}
91
+          // badge='food'
92
+          />
93
+          <CouponMedia.Body star={st}>
94
+            <View className='foodCard'>
95
+              <View className='cpn-card-text'>
96
+                {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
97
+              </View>
98
+              <View className='cpn-card-text' style={{ marginTop: '10rpx' }}>
99
+                <Text className='cpn-card-text_mn'>¥{`${(item.averagePrice == '' ? '0.00' : item.averagePrice / 100)?.toFixed(2)}元`}</Text>
100
+                {/* <Text className='cpn-card-text_rm'>{`门市价${(item.standardPrice / 100)?.toFixed(2)}元`}</Text> */}
101
+              </View>
102
+              <View className='cpn-md-act'>
103
+                <Location {...det} />
104
+                <SaveIcon saved={item.isSaved > 0} targetType='shop_package' editable={editable} targetId={item.packageId} />
105
+              </View>
106
+            </View>
107
+          </CouponMedia.Body>
108
+        </CouponMedia>
109
+      </CouponCard>
110
+    </View>
111
+  )
112
+}

+ 52
- 0
src/components/foodCards/ShareCard/style.less View File

@@ -0,0 +1,52 @@
1
+.view-picker {
2
+  position: relative;
3
+  top: 30%;
4
+}
5
+
6
+.foodCard {
7
+  .cpn-card-text {
8
+    font-size: 24px;
9
+    font-weight: 400;
10
+    color: #333333;
11
+    line-height: 40px;
12
+    vertical-align: baseline;
13
+
14
+    & > text {
15
+      display: inline-block;
16
+
17
+      & + text {
18
+        margin-left: 8px;
19
+      }
20
+    }
21
+    &_mn {
22
+      font-size: 24px;
23
+      font-weight: bold;
24
+      color: #333333;
25
+    }
26
+
27
+    &_rm {
28
+      font-size: 18px;
29
+      font-weight: 400;
30
+      text-decoration: line-through;
31
+      color: #666666;
32
+    }
33
+  }
34
+
35
+  .cpn-md-act {
36
+    display: flex;
37
+    margin-top: 10px;
38
+
39
+    & > view {
40
+      flex: 1;
41
+    }
42
+  }
43
+}
44
+.packageDetail {
45
+  Image {
46
+    width: 100%;
47
+  }
48
+  .weui-dialog__bd {
49
+    padding: 0;
50
+    margin: 0;
51
+  }
52
+}

+ 7
- 0
src/pages/RandomItinerary/ResultOver/index.config.js View File

@@ -0,0 +1,7 @@
1
+export default {
2
+  navigationBarTitleText: '',
3
+  navigationStyle: 'custom',
4
+  disableScroll: true,
5
+  enableShareAppMessage: true
6
+
7
+}

+ 87
- 0
src/pages/RandomItinerary/ResultOver/index.jsx View File

@@ -0,0 +1,87 @@
1
+import Taro, { useShareAppMessage } from "@tarojs/taro"
2
+import { Text, View, Button } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+
5
+import CustomNav from '@/components/CustomNav'
6
+import withLayout from '@/layouts'
7
+import { getTravelDestiny, share } from "@/services/travel"
8
+import ShareCard from "@/components/foodCards/ShareCard"
9
+import './style.less'
10
+
11
+
12
+export default withLayout((props) => {
13
+  const { ico, textNext } = props
14
+  const [traveContent, setTraveContent] = useState()
15
+  const [shareList, setShareList] = useState([])
16
+  const ShowOver = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/ShowOver.png'
17
+
18
+
19
+  useEffect(() => {
20
+
21
+    getTravelDestiny().then(e => {
22
+      setTraveContent(e)
23
+      setShareList(e?.travelItemList || [])
24
+    })
25
+
26
+
27
+  }, [])
28
+
29
+  useShareAppMessage((e) => {
30
+
31
+    return {
32
+      promise: share({ shareUrl: '/pages/index/index', targetId: traveContent.serialNo, targetType: 'travel' }).then(res => {
33
+        return {
34
+          title: '',
35
+          path: `/pages/index/index?shareId=${res.shareId}`,
36
+        }
37
+      })
38
+
39
+    }
40
+  })
41
+
42
+
43
+  return (
44
+    <view className='page-index'>
45
+      <view className='index-navbar'>
46
+        <CustomNav title='命定行程' />
47
+      </view>
48
+      <scroll-view scrollY style='height: calc(100% - 75px);margin-bottom: 40px;' >
49
+
50
+        <View className='Over-box'>
51
+
52
+          <View className='Over-index-box' >
53
+            <image className='OI-image' src={ShowOver} />
54
+            <View className='OI-text-box'>
55
+              <Text className='OI-text'>
56
+                整体运势或有起伏的情况,需要做好各方面的平衡避免有故此彼伏的情况。 你要学会自己衡量得失利弊,但时间不够用的时候就要面临个人的
57
+              </Text>
58
+              <Text className='OI-text'>
59
+                未必就是走的人多的路就是对,你可以保持自己的想法。
60
+              </Text>
61
+              <Text className='OI-text'>
62
+                南京对于你而言是梦想中的地方,你的命定行程适合阳光、梦幻的地方。结合你的回答你的命定行程如下:
63
+              </Text>
64
+              <View className='bottom-text'>》</View>
65
+            </View>
66
+          </View>
67
+          {
68
+            traveContent?.isHidden === false && shareList.map((item) => <ShareCard def={item} item={item} key={item.itemId} />
69
+
70
+
71
+            )
72
+          }
73
+          {
74
+            traveContent?.isHidden === false &&
75
+            <Button openType='share' className='purebtn'><View className='shareImg'>分享并邀请好友点开查看完整命定行程</View></Button>
76
+            // <View className='content' >分享并邀请好友点开查看完整命定行程</View>
77
+
78
+          }
79
+        </View>
80
+
81
+      </scroll-view>
82
+
83
+    </view >
84
+
85
+
86
+  )
87
+})

+ 52
- 0
src/pages/RandomItinerary/ResultOver/style.less View File

@@ -0,0 +1,52 @@
1
+.Over-box {
2
+  .Over-index-box {
3
+    width: 690px;
4
+    background: #ffffff;
5
+    border: 2px solid #dce6e3;
6
+    border-radius: 10px;
7
+    margin: 15px auto;
8
+    .OI-image {
9
+      width: 630px;
10
+      height: 223px;
11
+      margin: 10px 30px;
12
+    }
13
+    .OI-text-box {
14
+      width: 100%;
15
+      padding: 10px 25px;
16
+
17
+      .OI-text {
18
+        text-indent: 2em;
19
+        display: block;
20
+        width: 94%;
21
+        font-size: 28px;
22
+        font-weight: 400;
23
+        color: #202020;
24
+        line-height: 80px;
25
+      }
26
+      .bottom-text {
27
+        transform: rotate(90deg);
28
+        width: 200px;
29
+        text-align: center;
30
+        margin: 0 auto;
31
+
32
+        position: relative;
33
+        right: 5vw;
34
+      }
35
+    }
36
+  }
37
+  .shareImg {
38
+    width: 95%;
39
+    height: 115px;
40
+    background: url("../../../assets/icons/GuideCheck/shareImage.png") no-repeat;
41
+    background-size: 100%;
42
+    margin: 0 auto;
43
+    margin-bottom: 2em;
44
+    font-size: 29px;
45
+    font-weight: 400;
46
+    color: #1a3b83;
47
+    line-height: 120px;
48
+    text-align: center;
49
+  }
50
+  .content {
51
+  }
52
+}

+ 238
- 0
src/pages/RandomItinerary/components/ConstellationCard/index.jsx View File

@@ -0,0 +1,238 @@
1
+import Taro from "@tarojs/taro"
2
+import { Icon, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+
7
+
8
+import './style.less'
9
+
10
+
11
+
12
+
13
+
14
+export default (props) => {
15
+  const { ico, textNext, onSelected } = props
16
+  const [netxIma, setNetxIma] = useState(false)
17
+
18
+  const Ari = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Ari.png'
19
+  const Tau = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Tau.png'
20
+  const Gem = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Gem.png'
21
+  const Cnc = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Cnc.png'
22
+  const Leo = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Leo.png'
23
+  const Vir = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Vir.png'
24
+
25
+  const Lib = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Lib.png'
26
+  const Sco = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Sco.png'
27
+  const Sgr = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Sgr.png'
28
+  const Cap = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Cap.png'
29
+  const Agr = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Agr.png'
30
+  const Psc = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/ConstelPhoto/Psc.png'
31
+
32
+  const [filterImage, setFilterImage] = useState(
33
+    [
34
+      {
35
+        title: '白羊座',
36
+        moon: '03.21-04.19',
37
+        ico: Ari,
38
+        active: false
39
+      },
40
+      {
41
+        title: '金牛座',
42
+        moon: '04.20-05.20',
43
+        ico: Tau,
44
+        active: false
45
+
46
+      },
47
+      {
48
+        title: '双子座',
49
+        moon: '05.21-06.21',
50
+        ico: Gem,
51
+        active: false
52
+
53
+      },
54
+      {
55
+        title: '巨蟹座',
56
+        moon: '06.22-07.22',
57
+        ico: Cnc,
58
+        active: false
59
+
60
+      },
61
+      {
62
+        title: '狮子座',
63
+        moon: '07.23-08.22',
64
+        ico: Leo,
65
+        active: false
66
+
67
+      },
68
+      {
69
+        title: '处女座',
70
+        moon: '08.23-09.22',
71
+        ico: Vir,
72
+        active: false
73
+
74
+      },
75
+    ]
76
+  )
77
+  const [twoImage, setTwoImage] = useState(
78
+    [
79
+      {
80
+        title: '天秤座',
81
+        moon: '09.23-10.23',
82
+        ico: Lib,
83
+        active: false
84
+
85
+      },
86
+      {
87
+        title: '天蝎座',
88
+        moon: '10.24-11.22',
89
+        ico: Sco,
90
+        active: false
91
+
92
+      },
93
+      {
94
+        title: '射手座',
95
+        moon: '11.23-12.21',
96
+        ico: Sgr,
97
+        active: false
98
+
99
+      },
100
+      {
101
+        title: '摩羯座',
102
+        moon: '12.22-01.19',
103
+        ico: Cap,
104
+        active: false
105
+
106
+      },
107
+      {
108
+        title: '水瓶座',
109
+        moon: '01.20-02.18',
110
+        ico: Agr,
111
+        active: false
112
+
113
+      },
114
+      {
115
+        title: '双鱼座',
116
+        moon: '02.19-03.20',
117
+        ico: Psc,
118
+        active: false
119
+
120
+      },
121
+    ]
122
+  )
123
+
124
+
125
+
126
+  const handleTextNext = () => {
127
+    setNetxIma(!netxIma)
128
+  }
129
+
130
+  //第一组
131
+  const handleFilter = (e) => {
132
+    onSelected()
133
+    const res = filterImage.map((item, inx) => {
134
+      if (item.title == e.title) {
135
+
136
+        item.active = true
137
+
138
+      } else {
139
+
140
+        item.active = false
141
+      }
142
+      return item
143
+
144
+    })
145
+    setFilterImage(res)
146
+
147
+
148
+
149
+  }
150
+
151
+  //第二组
152
+  const handleTwoFilter = (e) => {
153
+    onSelected()
154
+
155
+    const res = twoImage.map((item, inx) => {
156
+
157
+      if (item.title == e.title) {
158
+
159
+        item.active = true
160
+
161
+      } else {
162
+
163
+        item.active = false
164
+      }
165
+      return item
166
+
167
+    })
168
+    setTwoImage(res)
169
+
170
+
171
+  }
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+  return (
185
+    <View >
186
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
187
+        1<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>你是什么星座的?
188
+      </View>
189
+      {
190
+        netxIma === false ? filterImage.map((item, index) =>
191
+          <view className='Random-Conste-box' key={index} onClick={() => handleFilter(item)} >
192
+            <View className='RC-box-imageContent'>
193
+              <image className={`RC-box-image ${item.active && 'imageLess'}`} src={item.ico} />
194
+            </View>
195
+            <view className='RC-box-content' >
196
+              <View className='RC-box-C-title' >
197
+                {item.title}
198
+              </View>
199
+              <View className='RC-box-C-moon' >
200
+                {item.moon}
201
+              </View>
202
+            </view>
203
+
204
+          </view>
205
+
206
+        )
207
+          :
208
+          twoImage.map((item, index) =>
209
+            <view className='Random-Conste-box' key={index} onClick={() => handleTwoFilter(item)} >
210
+              <View className='RC-box-imageContent'>
211
+                <image className={`RC-box-image ${item.active && 'imageLess'}`} src={item.ico} />
212
+
213
+              </View>
214
+              <view className='RC-box-content' >
215
+                <View className='RC-box-C-title' >
216
+                  {item.title}
217
+                </View>
218
+                <View className='RC-box-C-moon' >
219
+                  {item.moon}
220
+                </View>
221
+              </view>
222
+
223
+            </view>
224
+
225
+          )
226
+
227
+      }
228
+
229
+      <view className='bottom-text' onClick={handleTextNext}>
230
+        <image className='btn-image' src={ico} />
231
+        <text className='btn-text' >{textNext}</text>
232
+      </view>
233
+
234
+    </View>
235
+
236
+
237
+  )
238
+}

+ 69
- 0
src/pages/RandomItinerary/components/ConstellationCard/style.less View File

@@ -0,0 +1,69 @@
1
+.Random-Conste-box {
2
+  margin: 80px 20px;
3
+  width: 335px;
4
+  height: 180px;
5
+  background: #fbfbfb;
6
+  -webkit-box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.04),
7
+    0 4px 36px 0 rgba(0, 0, 0, 0.08);
8
+  box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.04),
9
+    0 8px 72px 0 rgba(0, 0, 0, 0.08);
10
+  border-radius: 38px;
11
+
12
+  display: inline-flex;
13
+  .RC-box-imageContent {
14
+    width: 50%;
15
+    height: 100%;
16
+    position: relative;
17
+    bottom: 8vw;
18
+    .RC-box-image {
19
+      width: 160px;
20
+      height: 190px;
21
+      filter: grayscale(100%);
22
+    }
23
+    .imageLess {
24
+      filter: grayscale(0%);
25
+    }
26
+  }
27
+
28
+  .RC-box-content {
29
+    width: 50%;
30
+    height: 100%;
31
+    display: inline-block;
32
+
33
+    text-align: center;
34
+    .RC-box-C-title {
35
+      font-size: 34px;
36
+      font-weight: bold;
37
+      color: #140f0f;
38
+
39
+      margin-top: 25%;
40
+      margin-bottom: 10px;
41
+    }
42
+
43
+    .RC-box-C-moon {
44
+      font-size: 22px;
45
+      font-weight: 500;
46
+      color: #140f0f;
47
+    }
48
+  }
49
+}
50
+
51
+.bottom-text {
52
+  margin-left: 40%;
53
+  margin-top: -2em;
54
+  width: 100%;
55
+  padding: 1.5em 0 1.5em 0;
56
+  display: flex;
57
+  align-items: center;
58
+  .btn-image {
59
+    width: 32px;
60
+    height: 32px;
61
+  }
62
+  .btn-text {
63
+    width: 110px;
64
+    font-size: 30px;
65
+    font-weight: bold;
66
+    color: #202020;
67
+    margin-left: 10px;
68
+  }
69
+}

+ 106
- 0
src/pages/RandomItinerary/components/FiveSenses/index.jsx View File

@@ -0,0 +1,106 @@
1
+import Taro from "@tarojs/taro"
2
+import { Icon, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+
7
+import './style.less'
8
+
9
+const ear = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/ear.png'
10
+const Eye = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/Eye.png'
11
+const Eyebrow = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/Eyebrow.png'
12
+const nose = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/nose.png'
13
+const mouth = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/mouth.png'
14
+
15
+export default (props) => {
16
+  const [netxIma, setNetxIma] = useState(false)
17
+  const [oneImage, setOneImage] = useState([
18
+    {
19
+      title: '眉毛',
20
+      ico: Eyebrow,
21
+      active: false
22
+    },
23
+    {
24
+      title: '眼睛',
25
+      ico: Eye,
26
+      active: false
27
+    },
28
+    {
29
+      title: '嘴巴',
30
+      ico: mouth,
31
+      active: false
32
+    },
33
+    {
34
+      title: '鼻子',
35
+      ico: nose,
36
+      active: false
37
+    },
38
+    {
39
+      title: '耳朵',
40
+      ico: ear,
41
+      active: false
42
+    },
43
+
44
+  ])
45
+
46
+  const handleTextNext = (e) => {
47
+
48
+    const res = oneImage.map((item, inx) => {
49
+
50
+      if (item.title == e.title) {
51
+
52
+        item.active = true
53
+
54
+      } else {
55
+
56
+        item.active = false
57
+      }
58
+      return item
59
+
60
+    })
61
+    setOneImage(res)
62
+
63
+
64
+  }
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+  return (
73
+    <View >
74
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;marginLeft:10px;'>
75
+        4<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>现在开始想你的一个五官,你想到的是?
76
+      </View>
77
+      {
78
+        oneImage.map((item, index) =>
79
+          <view className='Five-Conste-box' key={index} onClick={() => handleTextNext(item)}>
80
+            <View className='Five-box-imageContent'>
81
+              <image className={`Five-box-image ${item.active && 'Five-imageLess'}`} src={item.ico} />
82
+
83
+            </View>
84
+            <view className='Five-box-content' >
85
+              <View className='Five-box-C-title' >
86
+                {item.title}
87
+              </View>
88
+              <View className='Five-box-C-moon' >
89
+              </View>
90
+            </view>
91
+
92
+          </view>
93
+
94
+        )
95
+
96
+
97
+
98
+
99
+      }
100
+
101
+
102
+    </View>
103
+
104
+
105
+  )
106
+}

+ 49
- 0
src/pages/RandomItinerary/components/FiveSenses/style.less View File

@@ -0,0 +1,49 @@
1
+.Five-Conste-box {
2
+  margin: 20px 20px;
3
+  width: 335px;
4
+  height: 180px;
5
+  background: #fbfbfb;
6
+  -webkit-box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.04),
7
+    0 4px 36px 0 rgba(0, 0, 0, 0.08);
8
+  box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.04),
9
+    0 8px 72px 0 rgba(0, 0, 0, 0.08);
10
+  border-radius: 38px;
11
+
12
+  display: inline-flex;
13
+  .Five-box-imageContent {
14
+    width: 50%;
15
+    height: 100%;
16
+    position: relative;
17
+    .Five-box-image {
18
+      width: 160px;
19
+      height: 190px;
20
+      padding-left: 10px;
21
+
22
+      filter: grayscale(100%);
23
+    }
24
+    .Five-imageLess {
25
+      filter: grayscale(0%);
26
+    }
27
+  }
28
+
29
+  .Five-box-content {
30
+    width: 50%;
31
+    height: 100%;
32
+    display: inline-block;
33
+
34
+    text-align: center;
35
+    .Five-box-C-title {
36
+      font-size: 34px;
37
+      font-weight: bold;
38
+      color: #140f0f;
39
+
40
+      margin-top: 35%;
41
+    }
42
+
43
+    .Five-box-C-moon {
44
+      font-size: 22px;
45
+      font-weight: 500;
46
+      color: #140f0f;
47
+    }
48
+  }
49
+}

+ 79
- 0
src/pages/RandomItinerary/components/GirlFriend/index.jsx View File

@@ -0,0 +1,79 @@
1
+import Taro from "@tarojs/taro"
2
+import { Icon, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+
7
+
8
+import './style.less'
9
+
10
+
11
+export default (props) => {
12
+  const { ico, textNext } = props
13
+  const YES = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/YES.png'
14
+  const No = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/No.png'
15
+
16
+  const [imageOne, setImageOne] = useState(false)
17
+  const [imageTow, setImageTow] = useState(false)
18
+
19
+  const handleYES = () => {
20
+    setImageOne(true)
21
+    setImageTow(false)
22
+  }
23
+
24
+
25
+  const handleNo = () => {
26
+    setImageOne(false)
27
+    setImageTow(true)
28
+  }
29
+
30
+
31
+
32
+
33
+
34
+  return (
35
+    <View >
36
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
37
+        2<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>你是单身吗?
38
+      </View>
39
+
40
+
41
+      <view className='Girl-Conste-box' onClick={handleYES}  >
42
+        <View className='Girl-box-imageContent'>
43
+          <image className={`Girl-box-image  imageTwo ${imageOne && 'Girl-imageLess'} `} src={YES} />
44
+
45
+        </View>
46
+        <view className='Girl-box-content' >
47
+          <View className='Girl-box-C-title' >
48
+            YES
49
+          </View>
50
+          <View className='Girl-box-C-moon' >
51
+            是
52
+          </View>
53
+        </view>
54
+
55
+      </view>
56
+
57
+      <view className='Girl-Conste-box' onClick={handleNo} >
58
+        <View className='Girl-box-imageContent'>
59
+          <image className={`Girl-box-image ${imageTow && 'Girl-imageLess'} `} src={No} />
60
+        </View>
61
+        <view className='Girl-box-content' >
62
+          <View className='Girl-box-C-title' >
63
+            No
64
+          </View>
65
+          <View className='Girl-box-C-moon' >
66
+            否
67
+          </View>
68
+        </view>
69
+
70
+      </view>
71
+
72
+
73
+
74
+
75
+    </View>
76
+
77
+
78
+  )
79
+}

+ 63
- 0
src/pages/RandomItinerary/components/GirlFriend/style.less View File

@@ -0,0 +1,63 @@
1
+.Girl-Conste-box {
2
+  width: 630px;
3
+  height: 315px;
4
+  background: #fbfbfb;
5
+  -webkit-box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.04),
6
+    0 4px 36px 0 rgba(0, 0, 0, 0.08);
7
+  box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.04),
8
+    0 8px 72px 0 rgba(0, 0, 0, 0.08);
9
+  border-radius: 38px;
10
+  margin: 0 auto;
11
+  margin-top: 3em;
12
+  display: flex;
13
+  .Girl-box-imageContent {
14
+    width: 50%;
15
+    height: 100%;
16
+    position: relative;
17
+    bottom: 8vw;
18
+    .Girl-box-image {
19
+      width: 200px;
20
+      height: 360px;
21
+      position: relative;
22
+      bottom: -22px;
23
+      left: 90px;
24
+      filter: grayscale(100%);
25
+    }
26
+    .imageTwo {
27
+      height: 420px;
28
+      width: 240px;
29
+      position: relative;
30
+      left: 0em;
31
+      bottom: 45px;
32
+      filter: grayscale(100%);
33
+    }
34
+
35
+    .Girl-imageLess {
36
+      filter: grayscale(0%);
37
+    }
38
+  }
39
+
40
+  .Girl-box-content {
41
+    width: 50%;
42
+    height: 100%;
43
+    display: inline-block;
44
+    text-align: center;
45
+    /* margin: 1em; */
46
+    margin-top: 1.5em;
47
+    .Girl-box-C-title {
48
+      font-size: 66px;
49
+      font-weight: bold;
50
+      color: #140f0f;
51
+      margin: 15px;
52
+    }
53
+
54
+    .Girl-box-C-moon {
55
+      font-weight: bold;
56
+      color: #140f0f;
57
+    }
58
+  }
59
+}
60
+
61
+.imageTwo {
62
+  width: 200px;
63
+}

+ 78
- 0
src/pages/RandomItinerary/components/Hand/index.jsx View File

@@ -0,0 +1,78 @@
1
+import Taro from "@tarojs/taro"
2
+import { Icon, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+
7
+
8
+
9
+import './style.less'
10
+
11
+
12
+export default (props) => {
13
+  const { ico, textNext } = props
14
+  const LeftHand = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/LeftHand.png'
15
+  const RightHand = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/RightHand.png'
16
+
17
+  const [imageOne, setImageOne] = useState(false)
18
+  const [imageTow, setImageTow] = useState(false)
19
+
20
+  const handleLeftHand = () => {
21
+    setImageOne(true)
22
+    setImageTow(false)
23
+  }
24
+
25
+
26
+  const handleRightHand = () => {
27
+    setImageOne(false)
28
+    setImageTow(true)
29
+  }
30
+
31
+
32
+
33
+  return (
34
+    <View >
35
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
36
+        3<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>双手交叉相握,你是拇指在上还是右手拇指在上?
37
+      </View>
38
+
39
+
40
+      <view className='Hand-Conste-box' onClick={handleLeftHand} >
41
+        <View className='Hand-box-imageContent'>
42
+          <image className={`Hand-box-image  ${imageOne && 'Hand-imageLess'} `} src={LeftHand} />
43
+        </View>
44
+        <view className='Hand-box-content' >
45
+          <View className='Hand-box-C-title' >
46
+            Head
47
+          </View>
48
+          <View className='Hand-box-C-moon' >
49
+            左手
50
+          </View>
51
+        </view>
52
+
53
+      </view>
54
+
55
+      <view className='Hand-Conste-box' onClick={handleRightHand} >
56
+        <View className='Hand-box-imageContent'>
57
+          <image className={`Hand-box-image  ${imageTow && 'Hand-imageLess'} `} src={RightHand} />
58
+
59
+        </View>
60
+        <view className='Hand-box-content' >
61
+          <View className='Hand-box-C-title' >
62
+            Right
63
+          </View>
64
+          <View className='Hand-box-C-moon' >
65
+            右手
66
+          </View>
67
+        </view>
68
+
69
+      </view>
70
+
71
+
72
+
73
+
74
+    </View>
75
+
76
+
77
+  )
78
+}

+ 50
- 0
src/pages/RandomItinerary/components/Hand/style.less View File

@@ -0,0 +1,50 @@
1
+.Hand-Conste-box {
2
+  width: 630px;
3
+  height: 315px;
4
+  background: #fbfbfb;
5
+  -webkit-box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.04),
6
+    0 4px 36px 0 rgba(0, 0, 0, 0.08);
7
+  box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.04),
8
+    0 8px 72px 0 rgba(0, 0, 0, 0.08);
9
+  border-radius: 38px;
10
+  margin: 0 auto;
11
+  margin-top: 3em;
12
+  display: flex;
13
+  .Hand-box-imageContent {
14
+    width: 50%;
15
+    height: 100%;
16
+    position: relative;
17
+    bottom: 8vw;
18
+    .Hand-box-image {
19
+      width: 200px;
20
+      height: 360px;
21
+      position: relative;
22
+      bottom: -10px;
23
+      left: 90px;
24
+      filter: grayscale(100%);
25
+    }
26
+    .Hand-imageLess {
27
+      filter: grayscale(0%);
28
+    }
29
+  }
30
+
31
+  .Hand-box-content {
32
+    width: 50%;
33
+    height: 100%;
34
+    display: inline-block;
35
+    text-align: center;
36
+    /* margin: 1em; */
37
+    margin-top: 1.5em;
38
+    .Hand-box-C-title {
39
+      font-size: 66px;
40
+      font-weight: bold;
41
+      color: #140f0f;
42
+      margin: 15px;
43
+    }
44
+
45
+    .Hand-box-C-moon {
46
+      font-weight: bold;
47
+      color: #140f0f;
48
+    }
49
+  }
50
+}

+ 38
- 0
src/pages/RandomItinerary/components/ResultOver/index.jsx View File

@@ -0,0 +1,38 @@
1
+import Taro from "@tarojs/taro"
2
+import { Text, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+
5
+import './style.less'
6
+
7
+
8
+export default (props) => {
9
+  const { ico, textNext } = props
10
+  const ShowOver = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/ShowOver.png'
11
+
12
+
13
+
14
+
15
+  return (
16
+    <View className='Over-box'>
17
+
18
+      <View className='Over-index-box' >
19
+        <image className='OI-image' src={ShowOver} />
20
+        <View className='OI-text-box'>
21
+          <Text className='OI-text'>
22
+            整体运势或有起伏的情况,需要做好各方面的平衡避免有故此彼伏的情况。 你要学会自己衡量得失利弊,但时间不够用的时候就要面临个人的
23
+          </Text>
24
+          <Text className='OI-text'>
25
+            未必就是走的人多的路就是对,你可以保持自己的想法。
26
+          </Text>
27
+          <Text className='OI-text'>
28
+            南京对于你而言是梦想中的地方,你的命定行程适合阳光、梦幻的地方。结合你的回答你的命定行程如下:
29
+          </Text>
30
+          <View className='bottom-text'>》</View>
31
+        </View>
32
+
33
+      </View>
34
+      <View className='content'>分享并邀请好友点开查看完整命定行程</View>
35
+    </View>
36
+
37
+  )
38
+}

+ 116
- 0
src/pages/RandomItinerary/components/UFO/index.jsx View File

@@ -0,0 +1,116 @@
1
+import Taro from "@tarojs/taro"
2
+import { Icon, View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+
7
+
8
+
9
+
10
+import './style.less'
11
+
12
+
13
+export default (props) => {
14
+  const { ico, textNext } = props
15
+  const [netxIma, setNetxIma] = useState(false)
16
+
17
+  const MaJiang = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/MaJiang.png'
18
+  const hello = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/hello.png'
19
+  const WeChat = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/WeChat.png'
20
+  const police = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/police.png'
21
+  const RunAway = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/RunAway.png'//
22
+
23
+
24
+  const [ufoImage, setUfoImage] = useState([
25
+    {
26
+      title: '打麻将',
27
+      ico: MaJiang,
28
+      active: false
29
+    },
30
+    {
31
+      title: '打招呼',
32
+      ico: hello,
33
+      active: false
34
+
35
+    },
36
+    {
37
+      title: '加微信',
38
+      ico: WeChat,
39
+      active: false
40
+
41
+    },
42
+    {
43
+      title: '报警',
44
+      ico: police,
45
+      active: false
46
+
47
+    },
48
+    {
49
+      title: '逃跑',
50
+      ico: RunAway,
51
+      active: false
52
+
53
+    },
54
+
55
+  ]
56
+
57
+  )
58
+
59
+
60
+
61
+  const handleTexUfo = (e) => {
62
+
63
+    const res = ufoImage.map((item, inx) => {
64
+
65
+      if (item.title == e.title) {
66
+
67
+        item.active = true
68
+
69
+      } else {
70
+
71
+        item.active = false
72
+      }
73
+      return item
74
+
75
+    })
76
+    setUfoImage(res)
77
+
78
+
79
+  }
80
+
81
+
82
+  return (
83
+    <View >
84
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;marginLeft:10px;'>
85
+        5<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>当你看到外星人是第一时间会做什么?
86
+      </View>
87
+      {
88
+        ufoImage.map((item, index) =>
89
+          <view className='UFO-Conste-box' key={index} onClick={() => handleTexUfo(item)}>
90
+            <View className='UFO-box-imageContent'>
91
+              <image className={`UFO-box-image ${item.active && 'UFO-imageLess'}`} src={item.ico} />
92
+
93
+            </View>
94
+            <view className='UFO-box-content' >
95
+              <View className='UFO-box-C-title' >
96
+                {item.title}
97
+              </View>
98
+              <View className='UFO-box-C-moon' >
99
+              </View>
100
+            </view>
101
+
102
+          </view>
103
+
104
+        )
105
+
106
+
107
+
108
+
109
+      }
110
+
111
+
112
+    </View>
113
+
114
+
115
+  )
116
+}

+ 48
- 0
src/pages/RandomItinerary/components/UFO/style.less View File

@@ -0,0 +1,48 @@
1
+.UFO-Conste-box {
2
+  margin: 20px 20px;
3
+  width: 335px;
4
+  height: 180px;
5
+  background: #fbfbfb;
6
+  -webkit-box-shadow: 0 7px 14px 0 rgba(0, 0, 0, 0.04),
7
+    0 4px 36px 0 rgba(0, 0, 0, 0.08);
8
+  box-shadow: 0 14px 28px 0 rgba(0, 0, 0, 0.04),
9
+    0 8px 72px 0 rgba(0, 0, 0, 0.08);
10
+  border-radius: 38px;
11
+
12
+  display: inline-flex;
13
+  .UFO-box-imageContent {
14
+    width: 50%;
15
+    height: 100%;
16
+    position: relative;
17
+    .UFO-box-image {
18
+      width: 160px;
19
+      height: 190px;
20
+      padding-left: 10px;
21
+      filter: grayscale(100%);
22
+    }
23
+    .UFO-imageLess {
24
+      filter: grayscale(0%);
25
+    }
26
+  }
27
+
28
+  .UFO-box-content {
29
+    width: 50%;
30
+    height: 100%;
31
+    display: inline-block;
32
+
33
+    text-align: center;
34
+    .UFO-box-C-title {
35
+      font-size: 34px;
36
+      font-weight: bold;
37
+      color: #140f0f;
38
+
39
+      margin-top: 35%;
40
+    }
41
+
42
+    .UFO-box-C-moon {
43
+      font-size: 22px;
44
+      font-weight: 500;
45
+      color: #140f0f;
46
+    }
47
+  }
48
+}

+ 11
- 0
src/pages/RandomItinerary/index.config.js View File

@@ -0,0 +1,11 @@
1
+export default {
2
+  navigationBarTitleText: '命定行程',
3
+  navigationStyle: 'custom',
4
+  disableScroll: true,
5
+
6
+  usingComponents: {
7
+
8
+  }
9
+
10
+
11
+}

+ 104
- 0
src/pages/RandomItinerary/index.jsx View File

@@ -0,0 +1,104 @@
1
+import Taro from "@tarojs/taro"
2
+import { View } from "@tarojs/components"
3
+import { useEffect, useState } from "react"
4
+import CustomNav from '@/components/CustomNav'
5
+import withLayout from '@/layouts'
6
+import ChangeNext from '@/assets/icons/Travel/ChangeNext.png'
7
+import { seaveTravelDestiny } from "@/services/travel"
8
+import ConstellationCard from "./components/ConstellationCard"//星座
9
+import FiveSenses from "./components/FiveSenses"//五官
10
+import GirlFriend from "./components/GirlFriend"//有没有女朋友
11
+import Hand from "./components/Hand"//左右手
12
+import UFO from "./components/UFO"//不明飞行物
13
+
14
+
15
+import './style.less'
16
+
17
+
18
+
19
+export default withLayout((props) => {
20
+  const { router, person } = props
21
+  const [show, setShow] = useState(1)
22
+  const [btn, setBtn] = useState(true)
23
+
24
+  //是否选择
25
+  const [i, setI] = useState(false)
26
+
27
+  const onSelected = () => {
28
+    setI(true)
29
+  }
30
+
31
+  const handleGoTo = () => {
32
+    if (show >= 5) {
33
+
34
+      seaveTravelDestiny().then(e => {
35
+
36
+        Taro.navigateTo({ url: `/pages/RandomItinerary/ResultOver/index` })
37
+
38
+      })
39
+
40
+
41
+    } else {
42
+      if (i === false) {
43
+        Taro.showToast({
44
+          title: '请选择一项噢',
45
+          icon: 'none',
46
+          duration: 2000
47
+        })
48
+
49
+      } else {
50
+        setShow(show + 1)
51
+
52
+      }
53
+
54
+    }
55
+
56
+  }
57
+
58
+
59
+  return (
60
+    <view className='page-index'>
61
+      <view className='index-navbar'>
62
+        <CustomNav title='命定行程' />
63
+      </view>
64
+      <scroll-view scrollY style='height: calc(100% - 75px);margin-bottom: 40px;' >
65
+
66
+        <View className='index-container'>
67
+          {
68
+            show === 1 && <ConstellationCard ico={ChangeNext} textNext='换一批' onSelected={onSelected} />
69
+          }
70
+          {
71
+            show === 2 && <GirlFriend />
72
+          }
73
+          {
74
+            show === 3 && <Hand />
75
+          }
76
+          {
77
+            show === 4 && <FiveSenses />
78
+          }
79
+          {
80
+            show === 5 && <UFO />
81
+          }
82
+
83
+        </View>
84
+
85
+
86
+
87
+        {
88
+
89
+          btn === true && <View className='btn-bottom' onClick={handleGoTo}>
90
+            <text >
91
+              {
92
+                show > 4 ? '查看我的命定行程' : '下一题'
93
+              }
94
+            </text>
95
+          </View>
96
+        }
97
+
98
+
99
+
100
+      </scroll-view>
101
+
102
+    </view >
103
+  )
104
+})

+ 20
- 0
src/pages/RandomItinerary/style.less View File

@@ -0,0 +1,20 @@
1
+.page-index {
2
+  .btn-bottom {
3
+    width: 690px;
4
+    height: 92px;
5
+    border: 2px solid #1a3b83;
6
+    border-radius: 44px;
7
+    font-size: 30px;
8
+    font-weight: bold;
9
+    color: #1a3b83;
10
+    margin: 0 auto;
11
+    display: flex;
12
+    align-items: center;
13
+    margin-top: 3em;
14
+    margin-bottom: 2em;
15
+    text {
16
+      text-align: center;
17
+      width: 100%;
18
+    }
19
+  }
20
+}

+ 0
- 1
src/pages/Travel/Edit/index.jsx View File

@@ -53,7 +53,6 @@ export default withLayout((props) => {
53 53
   const addTextSum = () => {
54 54
     setDayNumber(dayNumber + 1)
55 55
     if (dayNumber > dayNum) {
56
-      console.log('asdasdsad');
57 56
 
58 57
     } else {
59 58
       console.log('98888888');

+ 1
- 0
src/pages/Travel/Edit/style.less View File

@@ -49,6 +49,7 @@
49 49
 
50 50
       &:nth-child(2) {
51 51
         margin-left: 4em;
52
+        margin-bottom: 2em;
52 53
       }
53 54
     }
54 55
 

+ 63
- 0
src/pages/index/components/Customized/index.jsx View File

@@ -0,0 +1,63 @@
1
+
2
+
3
+import Taro from '@tarojs/taro'
4
+import { View } from '@tarojs/components'
5
+import { getTravelDestiny } from '@/services/travel'
6
+// import ResultOver from "../../../RandomItinerary/components/ResultOver/index"//结果
7
+
8
+import './style.less'
9
+
10
+export default (props) => {
11
+  const { item, onMoldeOn } = props
12
+
13
+
14
+  const goToTravel = () => {
15
+    Taro.navigateTo({ url: `/pages/Travel/customizedTravel/index` })
16
+
17
+  }
18
+
19
+  //跳转答题页
20
+  const goToRandomItinerary = () => {
21
+
22
+    getTravelDestiny().then(e => {
23
+
24
+      if (!e) {
25
+        Taro.navigateTo({ url: `/pages/RandomItinerary/index` })
26
+
27
+      } else {
28
+        Taro.navigateTo({ url: `/pages/RandomItinerary/ResultOver/index` })
29
+
30
+      }
31
+
32
+    })
33
+
34
+
35
+
36
+
37
+  }
38
+
39
+  return (
40
+    <view style='width:100%;display:flex;'>
41
+      <view style='width:45%'>
42
+        <view onClick={goToTravel} className='CustomizedEntrance'  ></view>
43
+        <image className='MiniYellow' src='https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/MiniYellow.png' />
44
+
45
+        <image className='BigPink' src='https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/BigPink.png' />
46
+
47
+      </view>
48
+      <view className='style=width:45%'>
49
+        <view className='BigYellow'  ></view>
50
+
51
+        {/* <view className='MiniPink'  ></view> */}
52
+        <image className='MiniPink' src='https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/MiniPink.png' />
53
+
54
+
55
+        <view onClick={goToRandomItinerary} className='LtineraryEntrance'  ></view>
56
+
57
+      </view>
58
+    </view>
59
+
60
+
61
+
62
+  )
63
+}

+ 187
- 0
src/pages/index/components/Customized/style.less View File

@@ -0,0 +1,187 @@
1
+.CustomizedEntrance {
2
+  width: 345px;
3
+  height: 440px;
4
+  position: relative;
5
+  left: 0;
6
+  animation: CustomizedEntrance 2s ease-in infinite;
7
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
8
+  background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/CustomizedEntrance.png")
9
+    no-repeat;
10
+  background-size: 100% 100%;
11
+
12
+  animation-fill-mode: both; /*播放后的状态*/
13
+}
14
+
15
+.MiniYellow {
16
+  width: 90px;
17
+
18
+  height: 100px;
19
+  position: relative;
20
+  animation: MiniYellow 1.2s ease-in infinite;
21
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
22
+  // background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/MiniYellow.png")
23
+  //   no-repeat;
24
+  // background-size: 100% 100%;
25
+
26
+  animation-fill-mode: both; /*播放后的状态*/
27
+  left: 201px;
28
+  bottom: 40px;
29
+}
30
+
31
+.BigPink {
32
+  width: 321px;
33
+  height: 250px;
34
+  position: relative;
35
+  left: 54px;
36
+  animation: BigPink 1.4s ease-in infinite;
37
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
38
+  // background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/BigPink.png")
39
+  //   no-repeat;
40
+  // background-size: 100% 100%;
41
+  bottom: 10px;
42
+  animation-fill-mode: both; /*播放后的状态*/
43
+}
44
+
45
+// 右面部分
46
+
47
+.LtineraryEntrance {
48
+  background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/LtineraryEntrance.png")
49
+    no-repeat;
50
+
51
+  width: 345px;
52
+  height: 440px;
53
+  position: relative;
54
+  left: 0;
55
+  top: -40px;
56
+  animation: LtineraryEntrance 3.5s ease-in-out infinite;
57
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
58
+
59
+  background-size: 100% 100%;
60
+
61
+  animation-fill-mode: both; /*播放后的状态*/
62
+}
63
+.BigYellow {
64
+  width: 267px;
65
+  height: 190px;
66
+  position: relative;
67
+  left: 20px;
68
+  z-index: -1;
69
+  animation: BigYellow 1.4s ease-in infinite;
70
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
71
+  background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/BigYellow.png")
72
+    no-repeat;
73
+  background-size: 100% 100%;
74
+  bottom: 10px;
75
+  animation-fill-mode: both; /*播放后的状态*/
76
+}
77
+.MiniPink {
78
+  width: 135px;
79
+  height: 184px;
80
+
81
+  position: relative;
82
+  left: 0px;
83
+  bottom: 20px;
84
+  animation: MiniPink 1.4s ease-in infinite;
85
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
86
+  // background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/MiniPink.png")
87
+  //   no-repeat;
88
+  // background-size: 100% 100%;
89
+  animation-fill-mode: both; /*播放后的状态*/
90
+}
91
+
92
+// @keyframes CustomizedEntrance {
93
+//   0% {
94
+//     left: 0px;
95
+//   }
96
+//   25% {
97
+//     left: 15px;
98
+//   }
99
+//   50% {
100
+//     left: 30px;
101
+//   }
102
+//   100% {
103
+//     left: 0px;
104
+//   }
105
+// }
106
+
107
+@keyframes CustomizedEntrance {
108
+  0% {
109
+    transform: translateY(-3px);
110
+  }
111
+
112
+  50% {
113
+    transform: translateY(-50px);
114
+  }
115
+
116
+  100% {
117
+    transform: translateY(-3px);
118
+  }
119
+}
120
+
121
+@keyframes MiniYellow {
122
+  0% {
123
+    transform: translateY(-3px);
124
+  }
125
+
126
+  50% {
127
+    transform: translateY(-50px);
128
+  }
129
+
130
+  100% {
131
+    transform: translateY(-3px);
132
+  }
133
+}
134
+@keyframes BigPink {
135
+  0% {
136
+    transform: translateX(-3px);
137
+  }
138
+
139
+  50% {
140
+    transform: translateX(-50px);
141
+  }
142
+
143
+  100% {
144
+    transform: translateX(-3px);
145
+  }
146
+}
147
+
148
+@keyframes LtineraryEntrance {
149
+  0% {
150
+    transform: translatey(-0px);
151
+  }
152
+
153
+  50% {
154
+    transform: translatey(80px);
155
+  }
156
+
157
+  100% {
158
+    transform: translatey(0px);
159
+  }
160
+}
161
+@keyframes BigYellow {
162
+  0% {
163
+    top: 0px;
164
+  }
165
+  25% {
166
+    top: 6px;
167
+  }
168
+  50% {
169
+    top: 16px;
170
+  }
171
+  100% {
172
+    top: 0px;
173
+  }
174
+}
175
+@keyframes MiniPink {
176
+  0% {
177
+    transform: translateY(-3px);
178
+  }
179
+
180
+  50% {
181
+    transform: translateY(-50px);
182
+  }
183
+
184
+  100% {
185
+    transform: translateY(-3px);
186
+  }
187
+}

+ 0
- 0
src/pages/index/components/MiniYellow/style.less View File


+ 4
- 17
src/pages/index/tabs/Guide.jsx View File

@@ -9,10 +9,10 @@ import copy_logo from '@/assets/icons/GuideCheck/copy_logo.png'
9 9
 import Cup from '@/assets/icons/GuideCheck/Cup.png'
10 10
 import BlackSpot from '@/assets/icons/GuideCheck/BlackSpot.png'
11 11
 import { getRecommendList, getExtendContent } from '@/services/home'
12
-import sleep from '@/assets/icons/GuideCheck/sleep_logo.png'
13 12
 import { getTaRoom, goToRoomForm } from '@/services/taRoom​'
14 13
 import useTrackClick from '@/utils/hooks/useTrackClick'
15 14
 import { useModel } from "@/store";
15
+import Customized from '../components/Customized'
16 16
 import './GuideCss/style.less'
17 17
 
18 18
 
@@ -135,14 +135,6 @@ export default (props) => {
135 135
   return (
136 136
     <scroll-view scrollY style={{ height: '100%' }}  >
137 137
       <view className='Guide-Home-box'>
138
-        {
139
-          ifroomId === 'havenot' && (
140
-            <view className='Guide-image-text-box'>
141
-              <image className='Guide-images' src={sleep} />
142
-              <view className='Guide-text'>您还没有入住订单哟~</view>
143
-            </view>
144
-          )
145
-        }
146 138
         {/* 有民宿的情况下 */}
147 139
         {
148 140
           ifroomId === 'reality' && (
@@ -216,16 +208,11 @@ export default (props) => {
216 208
           )
217 209
         }
218 210
         <view className='Guide-Content-box'>
219
-          <view className='title-image'>
220
-            <image mode='scaleToFill' className='title-image-cup' src={Cup} />
221
-            <text className='title-title-boss' >老板推荐好吃的</text>
222
-          </view>
211
+          <Customized />
223 212
         </view>
224
-        <view style={{ marginTop: '10rpx', paddingBottom: '60rpx' }}>
225
-          {(spackage || []).map((item, index) => <BossCard det={item} st={parseFloat(item.score.toFixed(1))} key={(index)} trackClick={trackClick} taRoomContent={taRoomContent} item={item} />)}
226
-        </view>
227
-        <Image mode='widthFix' style={{ width: '100%' }} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex} />
213
+        <Image mode='widthFix' style={{ width: '100%', position: 'relative', bottom: '-10vw' }} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex} />
228 214
       </view>
215
+
229 216
     </scroll-view>
230 217
   )
231 218
 }

+ 9
- 1
src/routes.js View File

@@ -74,7 +74,15 @@ const mainPages = [
74 74
   {
75 75
     title: '入住指引跳转表单',
76 76
     page: 'pages/RoomOrder/index'
77
-  }
77
+  },
78
+  {
79
+    title: '命定行程',
80
+    page: 'pages/RandomItinerary/index',
81
+  },
82
+  {
83
+    title: '命定行程结果页',
84
+    page: 'pages/RandomItinerary/ResultOver/index',
85
+  },
78 86
 ];
79 87
 
80 88
 // 商户管理页面shop/pages/spread/spreadIndex

+ 12
- 2
src/services/travel.js View File

@@ -23,7 +23,6 @@ export const getTravelMine = (params) => request(`/travel/mine`, { params })
23 23
 export const getTravelID = (id, params) => request(`/travel/${id}`, { params })
24 24
 
25 25
 
26
-
27 26
 /**
28 27
  * 新建保存行程
29 28
  * @param {*} 
@@ -46,7 +45,7 @@ export const getTravelDestiny = (data) => request(`/travel/destiny`, { method: '
46 45
  * @returns 
47 46
  */
48 47
 
49
-export const addTravelDestiny = (data) => request(`/travel/destiny`, { method: 'post', data })
48
+export const seaveTravelDestiny = (data) => request(`/travel/destiny`, { method: 'post', data })
50 49
 
51 50
 
52 51
 
@@ -87,3 +86,14 @@ export const saveTravel = (id, data) => request(`/travel/${id}/travel-item`, { m
87 86
  * params 
88 87
  */
89 88
 export const getRecommendList = (params) => request('/resource/recommend', { params })
89
+
90
+
91
+/**
92
+ * 分享
93
+ * @returns 
94
+ * params 
95
+ */
96
+export const share = (data) => request('/share', { method: 'post', data })
97
+
98
+
99
+