Ver código fonte

Merge branch '3.0' of http://git.ycjcjy.com/shigongli/miniapp-v2 into 3.0

张延森 3 anos atrás
pai
commit
352b7861de
100 arquivos alterados com 4438 adições e 175 exclusões
  1. 1
    1
      config/dev.js
  2. 4
    0
      config/index.js
  3. 1
    1
      config/prod.js
  4. 2
    1
      package.json
  5. BIN
      src/assets/icons/GuideCheck/shareImage.png
  6. BIN
      src/assets/icons/Travel/ChangeNext.png
  7. BIN
      src/assets/icons/Travel/add.png
  8. BIN
      src/assets/icons/Travel/custom.png
  9. BIN
      src/assets/icons/Travel/delete.png
  10. BIN
      src/assets/icons/Travel/editimg.png
  11. BIN
      src/assets/icons/Travel/oneDay.png
  12. BIN
      src/assets/icons/Travel/threeDay.png
  13. BIN
      src/assets/icons/Travel/travel.png
  14. BIN
      src/assets/icons/Travel/twoDay.png
  15. BIN
      src/assets/icons/UserCenter/MyTravel.png
  16. 0
    0
      src/assets/icons/UserCenter/laba.png
  17. BIN
      src/assets/icons/housemantj/NoteasICO.png
  18. BIN
      src/assets/icons/housemantj/TextMentioned.png
  19. BIN
      src/assets/icons/housemantj/VideoStart.png
  20. BIN
      src/assets/icons/housemantj/grassNO.png
  21. BIN
      src/assets/icons/housemantj/grassOFF.png
  22. 114
    0
      src/components/BottomMoadl/index.jsx
  23. 117
    0
      src/components/BottomMoadl/style.css
  24. 84
    6
      src/components/CollectList/MyCollect/index.jsx
  25. 1
    2
      src/components/CouponCard/Media/Header.jsx
  26. 3
    2
      src/components/MasonryLayout/index.jsx
  27. 9
    2
      src/components/MoreGuide/index.jsx
  28. 1
    1
      src/components/SearchBar/index.jsx
  29. 112
    0
      src/components/foodCards/CustomCard/index.jsx
  30. 52
    0
      src/components/foodCards/CustomCard/style.less
  31. 108
    0
      src/components/foodCards/RecommendedCard/index.jsx
  32. 54
    0
      src/components/foodCards/RecommendedCard/style.less
  33. 108
    0
      src/components/foodCards/ShareCard/index.jsx
  34. 52
    0
      src/components/foodCards/ShareCard/style.less
  35. 221
    0
      src/components/foodCards/ShopNoteCard/index.jsx
  36. 52
    0
      src/components/foodCards/ShopNoteCard/style.less
  37. 4
    4
      src/components/foodCards/foodCards.jsx
  38. 11
    10
      src/hotel/components/HouseManage/houseManage.jsx
  39. 4
    0
      src/layouts/index.jsx
  40. 1
    1
      src/pages/MineUserAll/AllOrder/index.jsx
  41. 5
    0
      src/pages/MineUserAll/MyTravel/index.config.js
  42. 100
    0
      src/pages/MineUserAll/MyTravel/index.jsx
  43. 51
    0
      src/pages/MineUserAll/MyTravel/style.less
  44. 7
    0
      src/pages/RandomItinerary/ResultOver/index.config.js
  45. 88
    0
      src/pages/RandomItinerary/ResultOver/index.jsx
  46. 52
    0
      src/pages/RandomItinerary/ResultOver/style.less
  47. 238
    0
      src/pages/RandomItinerary/components/ConstellationCard/index.jsx
  48. 73
    0
      src/pages/RandomItinerary/components/ConstellationCard/style.less
  49. 110
    0
      src/pages/RandomItinerary/components/FiveSenses/index.jsx
  50. 51
    0
      src/pages/RandomItinerary/components/FiveSenses/style.less
  51. 82
    0
      src/pages/RandomItinerary/components/GirlFriend/index.jsx
  52. 66
    0
      src/pages/RandomItinerary/components/GirlFriend/style.less
  53. 80
    0
      src/pages/RandomItinerary/components/Hand/index.jsx
  54. 52
    0
      src/pages/RandomItinerary/components/Hand/style.less
  55. 38
    0
      src/pages/RandomItinerary/components/ResultOver/index.jsx
  56. 116
    0
      src/pages/RandomItinerary/components/UFO/index.jsx
  57. 50
    0
      src/pages/RandomItinerary/components/UFO/style.less
  58. 11
    0
      src/pages/RandomItinerary/index.config.js
  59. 116
    0
      src/pages/RandomItinerary/index.jsx
  60. 24
    0
      src/pages/RandomItinerary/style.less
  61. 5
    1
      src/pages/RoomOrder/index.jsx
  62. BIN
      src/pages/Travel/Edit/NewCustom/ico/openUp.png
  63. BIN
      src/pages/Travel/Edit/NewCustom/ico/packUp.png
  64. 86
    0
      src/pages/Travel/Edit/NewCustom/index.jsx
  65. 9
    0
      src/pages/Travel/Edit/NewCustom/style.less
  66. 11
    0
      src/pages/Travel/Edit/components/RecommendModel/index.jsx
  67. 0
    0
      src/pages/Travel/Edit/components/RecommendModel/style.less
  68. 13
    0
      src/pages/Travel/Edit/index.config.js
  69. 242
    0
      src/pages/Travel/Edit/index.jsx
  70. 100
    0
      src/pages/Travel/Edit/style.less
  71. 63
    0
      src/pages/Travel/customizedTravel/components/CustomDay/index.jsx
  72. 61
    0
      src/pages/Travel/customizedTravel/components/CustomDay/style.less
  73. 57
    0
      src/pages/Travel/customizedTravel/components/ThreeModel/index.jsx
  74. 73
    0
      src/pages/Travel/customizedTravel/components/ThreeModel/style.less
  75. 57
    0
      src/pages/Travel/customizedTravel/components/TipModel/index.jsx
  76. 73
    0
      src/pages/Travel/customizedTravel/components/TipModel/style.less
  77. 57
    0
      src/pages/Travel/customizedTravel/components/TwoModel/index.jsx
  78. 73
    0
      src/pages/Travel/customizedTravel/components/TwoModel/style.less
  79. 10
    0
      src/pages/Travel/customizedTravel/index.config.js
  80. 80
    0
      src/pages/Travel/customizedTravel/index.jsx
  81. 15
    0
      src/pages/Travel/customizedTravel/style.less
  82. 9
    0
      src/pages/details/NoteDetails/index.config.js
  83. 199
    0
      src/pages/details/NoteDetails/index.jsx
  84. 133
    0
      src/pages/details/NoteDetails/index.less
  85. 62
    0
      src/pages/details/components/ImageList/index.jsx
  86. 27
    0
      src/pages/details/components/ImageList/style.less
  87. 11
    35
      src/pages/details/foodDetails/foodDetails.jsx
  88. 0
    27
      src/pages/details/foodDetails/foodDetails.less
  89. 8
    29
      src/pages/details/mjDetails/sceneryDetails.jsx
  90. 1
    28
      src/pages/details/mjDetails/sceneryDetails.less
  91. 1
    1
      src/pages/index/components/Card/index.jsx
  92. 63
    0
      src/pages/index/components/Customized/index.jsx
  93. 172
    0
      src/pages/index/components/Customized/style.less
  94. 45
    0
      src/pages/index/components/NoteCard/index.jsx
  95. 76
    0
      src/pages/index/components/NoteCard/style.less
  96. 0
    1
      src/pages/index/index.config.js
  97. 1
    1
      src/pages/index/tabbar.js
  98. 8
    18
      src/pages/index/tabs/Guide.jsx
  99. 11
    3
      src/pages/index/tabs/GuideCss/style.less
  100. 0
    0
      src/pages/index/tabs/Mine.jsx

+ 1
- 1
config/dev.js Ver arquivo

@@ -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"',

+ 4
- 0
config/index.js Ver arquivo

@@ -50,6 +50,10 @@ const config = {
50 50
           generateScopedName: '[name]__[local]___[hash:base64:5]'
51 51
         }
52 52
       }
53
+    },
54
+    webpackChain (chain, webpack) {
55
+      chain.plugin('analyzer')
56
+        .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
53 57
     }
54 58
   },
55 59
   h5: {

+ 1
- 1
config/prod.js Ver arquivo

@@ -5,7 +5,7 @@ module.exports = {
5 5
   defineConstants: {
6 6
     HOST: '"https://sgl-v2.njyunzhi.com"',
7 7
     OSS: '"yz-shigongli.oss-accelerate.aliyuncs.com"',
8
-    VERSION: '"2.0.36_2021-10-11 22:14:48"',
8
+    VERSION: '"3.0.1_2021-11-10"',
9 9
   },
10 10
   mini: {},
11 11
   h5: {

+ 2
- 1
package.json Ver arquivo

@@ -56,6 +56,7 @@
56 56
     "eslint-plugin-import": "^2.12.0",
57 57
     "eslint-plugin-react": "^7.8.2",
58 58
     "eslint-plugin-react-hooks": "^4.2.0",
59
-    "stylelint": "9.3.0"
59
+    "stylelint": "9.3.0",
60
+    "webpack-bundle-analyzer": "^4.5.0"
60 61
   }
61 62
 }

BIN
src/assets/icons/GuideCheck/shareImage.png Ver arquivo


BIN
src/assets/icons/Travel/ChangeNext.png Ver arquivo


BIN
src/assets/icons/Travel/add.png Ver arquivo


BIN
src/assets/icons/Travel/custom.png Ver arquivo


BIN
src/assets/icons/Travel/delete.png Ver arquivo


BIN
src/assets/icons/Travel/editimg.png Ver arquivo


BIN
src/assets/icons/Travel/oneDay.png Ver arquivo


BIN
src/assets/icons/Travel/threeDay.png Ver arquivo


BIN
src/assets/icons/Travel/travel.png Ver arquivo


BIN
src/assets/icons/Travel/twoDay.png Ver arquivo


BIN
src/assets/icons/UserCenter/MyTravel.png Ver arquivo


src/pages/details/foodDetails/laba.png → src/assets/icons/UserCenter/laba.png Ver arquivo


BIN
src/assets/icons/housemantj/NoteasICO.png Ver arquivo


BIN
src/assets/icons/housemantj/TextMentioned.png Ver arquivo


BIN
src/assets/icons/housemantj/VideoStart.png Ver arquivo


BIN
src/assets/icons/housemantj/grassNO.png Ver arquivo


BIN
src/assets/icons/housemantj/grassOFF.png Ver arquivo


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

@@ -0,0 +1,114 @@
1
+import Taro from '@tarojs/taro'
2
+import { View, Text } from '@tarojs/components'
3
+import DeleteTravel from '@/assets/icons/Travel/delete.png'
4
+import RecommendedCard from '@/components/foodCards/RecommendedCard'
5
+import SpinBox from "@/components/Spin/SpinBox";
6
+
7
+import { useState, useEffect } from 'react'
8
+import { deleteTravel, getRecommendList } from '@/services/travel'
9
+
10
+import './style.css'
11
+
12
+
13
+export default (props) => {
14
+  const { frameTitle, onRecommend, flag, ico, textNext, location, dayNumber, travelId, handelAddTravel } = props
15
+
16
+  // const [flag, setFlag] = useState(false)
17
+  // const [wrapAnimate, setWrapAnimate] = useState('wrap wrapAnimate')
18
+  // const [frameAnimate, setFrameAnimate] = useState('frame-wrapper frameAnimate')
19
+  let wrapAnimate = 'wrap wrapAnimate'
20
+  let frameAnimate = 'frame-wrapper frameAnimate'
21
+  const [textNextSum, setTextNext] = useState(1)
22
+  const [recommendContent, setRecommendContent] = useState([])
23
+  const [loading, setLoading] = useState(false)
24
+
25
+  const hideFrame = () => {
26
+    wrapAnimate = 'wrap wrapAnimateOut'
27
+    frameAnimate = 'frame-wrapper frameAnimateOut'
28
+    onRecommend()
29
+
30
+  }
31
+
32
+  const catchNone = () => {
33
+    //阻止冒泡
34
+
35
+  }
36
+  const handelText = () => {
37
+    handleTextNext()
38
+
39
+  }
40
+
41
+
42
+  useEffect(() => {
43
+    setLoading(true)
44
+    getRecommendList({ location: location, pageNum: textNextSum, pageSize: 3 }).then(e => {
45
+      setRecommendContent(e.records)
46
+      setLoading(false)
47
+
48
+    }).catch(s => {
49
+      setLoading(false)
50
+
51
+    })
52
+  }, [location, textNextSum])
53
+
54
+
55
+  //换一批
56
+  const handleTextNext = (e) => {
57
+    // setLoading(true)
58
+    setTextNext(textNextSum + 1)
59
+
60
+    e.stopPropagation()
61
+
62
+    // getRecommendList({ location: location, pageNum: textNextSum, pageSize: 3 }).then(e => {
63
+    //   setRecommendContent(e.records)
64
+    //   setLoading(false)
65
+
66
+    // }).catch(s => {
67
+    //   setLoading(false)
68
+
69
+    // })
70
+
71
+  }
72
+
73
+  return (
74
+    flag && <view  >
75
+      <view className={wrapAnimate} style='background:rgba(0,0,0,0);'></view>
76
+      <view onClick={hideFrame} className={frameAnimate}>
77
+        <view onClick={catchNone} className='frame'>
78
+          {/* 标题  */}
79
+          <view className='title-wrapper '>
80
+            <view>{frameTitle}</view>
81
+            {/* <image onClick={hideFrame} src={DeleteTravel} mode='widthFix'></image> */}
82
+          </view>
83
+          {/* 内容 */}
84
+
85
+          <View style='overflow-x: hidden;'>
86
+            <SpinBox loading={loading}>
87
+
88
+              {
89
+                recommendContent.map((item, index) =>
90
+
91
+
92
+
93
+                  <RecommendedCard key={index} item={item} det={item} editable='1' location={location} travelId={travelId} dayNumber={dayNumber} handelAddTravel={handelAddTravel} />
94
+                )
95
+              }
96
+              {props.children}
97
+            </SpinBox>
98
+
99
+            <view className='bottom-text' onClick={handleTextNext}>
100
+              <image src={ico} />
101
+              <text>{textNext}</text>
102
+            </view>
103
+          </View>
104
+
105
+        </view>
106
+
107
+      </view>
108
+
109
+    </view>
110
+  )
111
+
112
+
113
+
114
+}

+ 117
- 0
src/components/BottomMoadl/style.css Ver arquivo

@@ -0,0 +1,117 @@
1
+.wrapAnimate {
2
+  animation: wrapAnimate 0.2s ease forwards;
3
+}
4
+@keyframes wrapAnimate {
5
+  0% {
6
+  }
7
+  100% {
8
+    background: rgba(0, 0, 0, 0.35);
9
+  }
10
+}
11
+.wrapAnimateOut {
12
+  animation: wrapAnimateOut 0.4s ease forwards;
13
+}
14
+@keyframes wrapAnimateOut {
15
+  0% {
16
+    background: rgba(0, 0, 0, 0.35);
17
+  }
18
+
19
+  100% {
20
+    background: rgba(0, 0, 0, 0);
21
+  }
22
+}
23
+.frameAnimate {
24
+  animation: frameAnimate 0.5s ease forwards;
25
+}
26
+@keyframes frameAnimate {
27
+  0% {
28
+  }
29
+  100% {
30
+    opacity: 1;
31
+    top: 0vh;
32
+  }
33
+}
34
+.frameAnimateOut {
35
+  animation: frameAnimateOut 0.5s ease forwards;
36
+}
37
+@keyframes frameAnimateOut {
38
+  0% {
39
+    opacity: 2;
40
+    top: 0vh;
41
+  }
42
+  50% {
43
+    opacity: 1;
44
+    top: 50vh;
45
+  }
46
+  100% {
47
+    opacity: 0;
48
+    top: 100vh;
49
+  }
50
+}
51
+.frame-wrapper {
52
+  position: fixed;
53
+  height: 100vh;
54
+  width: 100vw;
55
+  z-index: 2;
56
+  top: 50vh;
57
+}
58
+.frame {
59
+  background: #fff;
60
+  position: absolute;
61
+  bottom: 0;
62
+  width: 100%;
63
+  padding: 2.9vw 2.9vw 0;
64
+  border-top-left-radius: 20px;
65
+  border-top-right-radius: 20px;
66
+  z-index: 3;
67
+  box-sizing: border-box;
68
+  align-items: center;
69
+  text-align: center;
70
+}
71
+.title-wrapper {
72
+  justify-content: space-between;
73
+
74
+  text-align: center;
75
+  height: 28px;
76
+  font-size: 35px;
77
+  font-weight: 700;
78
+  color: #202020;
79
+  margin-bottom: 5.9vw;
80
+}
81
+.title-wrapper > image {
82
+  width: 3.5vw;
83
+  height: 3.5vw;
84
+  padding: 0 5vw;
85
+  margin-right: -5vw;
86
+}
87
+/* .flex {
88
+  display: flex;
89
+  align-items: center;
90
+} */
91
+.wrap {
92
+  position: fixed;
93
+  z-index: 1;
94
+  top: 0;
95
+  left: 0;
96
+  right: 0;
97
+  bottom: 0;
98
+}
99
+
100
+.bottom-text {
101
+  margin-left: 40%;
102
+  width: 100%;
103
+  padding: 1.5em 0 1.5em 0;
104
+  display: flex;
105
+  align-items: center;
106
+}
107
+
108
+.bottom-text > image {
109
+  width: 32px;
110
+  height: 32px;
111
+}
112
+.bottom-text > text {
113
+  width: 110px;
114
+  font-size: 30px;
115
+  font-weight: bold;
116
+  color: #202020;
117
+}

+ 84
- 6
src/components/CollectList/MyCollect/index.jsx Ver arquivo

@@ -13,6 +13,7 @@ const CouponMedia = CouponCard.Media
13 13
 const Action = CouponCard.Action
14 14
 export default (props) => {
15 15
   const { item, cardNavigateTo } = props
16
+  console.log("🚀 ~ file: index.jsx ~ line 16 ~ item", item)
16 17
 
17 18
   const targetType = item.targetType
18 19
   const star = parseFloat(((item.sweetScore + item.environmentScore + item.serviceScore) / 3).toFixed(1));
@@ -20,9 +21,27 @@ export default (props) => {
20 21
 
21 22
 
22 23
   const handleDetail = () => {
23
-    targetType == "shop_package" ? Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` })
24
-      : targetType == "tourist" ? Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` })
25
-        : Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
24
+    switch (targetType) {
25
+      case "shop_package":
26
+        Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` })
27
+        break;
28
+      case "shop":
29
+        Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
30
+        break;
31
+      case "tourist":
32
+        Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` })
33
+        break;
34
+      case "note":
35
+        Taro.navigateTo({ url: `/pages/details/NoteDetails/index?id=${item.targetId}` })
36
+        break;
37
+      default:
38
+        break;
39
+    }
40
+
41
+    // targetType == "shop_package" && Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` })
42
+    // targetType == "shop" && Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
43
+    // targetType == "tourist" && Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` })
44
+    // targetType == "note" && Taro.navigateTo({ url: `/pages/details/NoteDetails/index?id=${item.targetId}` })
26 45
   }
27 46
 
28 47
   const PayAction = <Action.Icon icon={SeeDetails} text='查看详情' onClick={handleDetail} />
@@ -44,7 +63,7 @@ export default (props) => {
44 63
                   <View className='cpn-card-text'>
45 64
                     {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
46 65
                   </View>
47
-                  <View className='cpn-card-text' style={{ lineHeight:'10px' }}>
66
+                  <View className='cpn-card-text' style={{ lineHeight: '10px' }}>
48 67
                     <Text className='cpn-card-text_mn'>¥{`${(item.actualPrice / 100)?.toFixed(2)}元`}</Text>
49 68
                     <Text className='cpn-card-text_rm'>{`门市价${(item.standardPrice / 100)?.toFixed(2)}元`}</Text>
50 69
                   </View>
@@ -58,7 +77,7 @@ export default (props) => {
58 77
         )
59 78
       }
60 79
       {
61
-        targetType !== "shop_package" && (
80
+        targetType === "shop" && (
62 81
           <View style={{ margin: '15px 5px' }}>
63 82
             <CouponCard action={PayAction}>
64 83
               <CouponMedia>
@@ -70,7 +89,7 @@ export default (props) => {
70 89
                   <View className='cpn-card-text'>
71 90
                     {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
72 91
                   </View>
73
-                  <View className='cpn-card-text' style={{ lineHeight:'10px' }}>
92
+                  <View className='cpn-card-text' style={{ lineHeight: '10px' }}>
74 93
                     <Text className='cpn-card-text_mn'>¥{`${formatPrice(item.averagePrice)}元`}</Text>
75 94
                   </View>
76 95
                   <View className='cpn-md-act'>
@@ -86,6 +105,65 @@ export default (props) => {
86 105
           </View>
87 106
         )
88 107
       }
108
+
109
+      {
110
+        targetType === "tourist" && (
111
+          <View style={{ margin: '15px 5px' }}>
112
+            <CouponCard action={PayAction}>
113
+              <CouponMedia>
114
+                <CouponMedia.Header
115
+                  image={compressImage(item.poster)}
116
+                  badge={targetType}
117
+                />
118
+                <CouponMedia.Body >
119
+                  <View className='cpn-card-text'>
120
+                    {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
121
+                  </View>
122
+                  <View className='cpn-card-text' style={{ lineHeight: '10px' }}>
123
+                    <Text className='cpn-card-text_mn'>¥{`${formatPrice(item.averagePrice)}元`}</Text>
124
+                  </View>
125
+                  <View className='cpn-md-act'>
126
+                    <Location {...item} />
127
+                    <view className='wdscbaozan'>
128
+                      <image className='title-on' src={baozan} />
129
+                      <text className='title-on-text'>爆赞 {item.likeNum}</text>
130
+                    </view>
131
+                  </View>
132
+                </CouponMedia.Body>
133
+              </CouponMedia>
134
+            </CouponCard>
135
+          </View>
136
+        )
137
+      }
138
+      {
139
+        targetType === 'note' && (
140
+          <View style={{ margin: '15px 5px' }}>
141
+            <CouponCard action={PayAction}>
142
+              <CouponMedia>
143
+                <CouponMedia.Header
144
+                  image={compressImage(item.poster)}
145
+                  badge={targetType}
146
+                />
147
+                <CouponMedia.Body >
148
+                  <View className='cpn-card-text'>
149
+                    {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
150
+                  </View>
151
+                  {/* <View className='cpn-card-text' style={{ lineHeight: '10px' }}>
152
+                  <Text className='cpn-card-text_mn'>¥{`${formatPrice(item.averagePrice)}元`}</Text>
153
+                </View> */}
154
+                  {/* <View className='cpn-md-act'>
155
+                  <Location {...item} />
156
+                  <view className='wdscbaozan'>
157
+                    <image className='title-on' src={baozan} />
158
+                    <text className='title-on-text'>爆赞 {item.likeNum}</text>
159
+                  </view>
160
+                </View> */}
161
+                </CouponMedia.Body>
162
+              </CouponMedia>
163
+            </CouponCard>
164
+          </View>
165
+        )
166
+      }
89 167
     </View>
90 168
   )
91 169
 }

+ 1
- 2
src/components/CouponCard/Media/Header.jsx Ver arquivo

@@ -19,8 +19,7 @@ export default (props) => {
19 19
   return (
20 20
     <View className='coupun-media_header'>
21 21
       {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
22
-      <View className='coupun-media_thumb' style={{marginTop:enableCashback?'':'20px'}}>
23
-        <BadgeTag type={badge} />
22
+      <View className='coupun-media_thumb' style={{ marginTop: enableCashback ? '' : '20px' }}>
24 23
         <View className='image' style={backStyle}></View>
25 24
       </View>
26 25
     </View>

+ 3
- 2
src/components/MasonryLayout/index.jsx Ver arquivo

@@ -18,6 +18,7 @@ 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)
21 22
 
22 23
   // rfTimes 用来区分是否更换数据源
23 24
   const { list, rfTimes: refresh } = listData
@@ -36,7 +37,7 @@ export default (props) => {
36 37
   // const [rightList, appendRight, setRightList] = useColumn()
37 38
   const [leftList, setLeftList] = useState([])
38 39
   const [rightList, setRightList] = useState([])
39
-  
40
+
40 41
   // 渲染逻辑
41 42
   // const forceRender = useRenderFunc(renderListRef, leftHeight, rightHeight, appendLeft, appendRight)
42 43
 
@@ -51,7 +52,7 @@ export default (props) => {
51 52
     // //
52 53
     // forceRender.current()
53 54
   }
54
-  
55
+
55 56
   // console.debug('------leftHeight------->', leftHeight.current)
56 57
   // console.debug('------rightHeight------->', rightHeight.current)
57 58
   // console.debug('------renderListRef------->', renderListRef.current)

+ 9
- 2
src/components/MoreGuide/index.jsx Ver arquivo

@@ -1,9 +1,12 @@
1 1
 import { Video } from '@tarojs/components';
2
+import { useState } from 'react';
2 3
 import { compressImage } from '@/utils'
3 4
 import './style.less'
4 5
 
5 6
 export default (props) => {
6
-  const { item } = props
7
+  const { item, } = props
8
+
9
+
7 10
   return (
8 11
     <>
9 12
       {
@@ -17,8 +20,12 @@ export default (props) => {
17 20
             <Video
18 21
               controls
19 22
               autoplay={false}
23
+              VideoType={false}
20 24
               loop={false}
21
-              muted={false} style={{ width: "100%", height: '200px' }} src={item.content}></Video>
25
+              muted={false} style={{ width: "100%", height: '200px' }} src={item.content}
26
+            >
27
+
28
+            </Video>
22 29
       }
23 30
     </>
24 31
   )

+ 1
- 1
src/components/SearchBar/index.jsx Ver arquivo

@@ -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}

+ 112
- 0
src/components/foodCards/CustomCard/index.jsx Ver arquivo

@@ -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.targetId} />
105
+              </View>
106
+            </View>
107
+          </CouponMedia.Body>
108
+        </CouponMedia>
109
+      </CouponCard>
110
+    </View>
111
+  )
112
+}

+ 52
- 0
src/components/foodCards/CustomCard/style.less Ver arquivo

@@ -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
+}

+ 108
- 0
src/components/foodCards/RecommendedCard/index.jsx Ver arquivo

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

+ 54
- 0
src/components/foodCards/RecommendedCard/style.less Ver arquivo

@@ -0,0 +1,54 @@
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
+    text-align: left;
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
+      text-align: left;
26
+    }
27
+
28
+    &_rm {
29
+      font-size: 18px;
30
+      font-weight: 400;
31
+      text-decoration: line-through;
32
+      color: #666666;
33
+    }
34
+  }
35
+
36
+  .cpn-md-act {
37
+    display: flex;
38
+    margin-top: 10px;
39
+    text-align: left;
40
+
41
+    & > view {
42
+      flex: 1;
43
+    }
44
+  }
45
+}
46
+.packageDetail {
47
+  Image {
48
+    width: 100%;
49
+  }
50
+  .weui-dialog__bd {
51
+    padding: 0;
52
+    margin: 0;
53
+  }
54
+}

+ 108
- 0
src/components/foodCards/ShareCard/index.jsx Ver arquivo

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

+ 52
- 0
src/components/foodCards/ShareCard/style.less Ver arquivo

@@ -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
+}

+ 221
- 0
src/components/foodCards/ShopNoteCard/index.jsx Ver arquivo

@@ -0,0 +1,221 @@
1
+import { useState, useEffect, useRef } from 'react'
2
+
3
+import Taro from '@tarojs/taro'
4
+import { View, Picker, Image, ScrollView, Text } from '@tarojs/components'
5
+import CouponCard from '@/components/CouponCard'
6
+import { compressImage } from '@/utils'
7
+import SaveIcon from '@/components/SaveIcon'
8
+import Location from '@/components/Location'
9
+
10
+import grassOFF from '@/assets/icons/housemantj/grassOFF.png'
11
+import grassNO from '@/assets/icons/housemantj/grassNO.png'
12
+import VideoStart from '@/assets/icons/housemantj/VideoStart.png'
13
+import Popup from '@/components/Popup'
14
+import { saveTravel, newTravelMine, getTravelMine } from '@/services/travel'
15
+
16
+import './style.less'
17
+
18
+
19
+const CouponMedia = CouponCard.Media
20
+const Action = CouponCard.Action
21
+
22
+//套餐卡片
23
+export default (props) => {
24
+  const { item, st, editable, setScroll, goshop, travelMine, resourceList, det, handelNoteList } = props
25
+  // const travelId = travelMineContent?.records[0]?.travelId
26
+  const targetId = props.item?.targetId
27
+  const targetType = props.item?.targetType
28
+
29
+
30
+  const goFood = () => {
31
+    Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${targetId}` })
32
+
33
+  }
34
+  const [showCutover, setShowCutover] = useState(false)
35
+  const [valueList, setValueList] = useState([])
36
+
37
+
38
+  useEffect(() => {
39
+    if (item == []) {
40
+      console.log('asdasdsadasd');
41
+    }
42
+    setValueList(travelMine.records)
43
+
44
+
45
+  }, [travelMine.records, item])
46
+
47
+  const onClose = () => {
48
+    //关闭当前套餐详情弹窗
49
+    setShowCutover(false)
50
+    //使父组件恢复滚动
51
+    setScroll(true)
52
+  }
53
+
54
+  //列改变
55
+  const [traveCoumun, setTraveCoumun] = useState()
56
+
57
+
58
+  const numberTrave = (new Array(traveCoumun).fill()).map((_, index) => ({ id: index + 1, title: `第 ${index + 1} 天` }))
59
+
60
+  const array = [valueList, travelMine.records == '' ? [] : numberTrave]
61
+
62
+
63
+  const handleColumn = e => {
64
+    // console.log(e.detail.column);
65
+
66
+    const { column, value } = e.detail
67
+
68
+
69
+    const firstValue = valueList[value]
70
+    setTraveCoumun(firstValue.dayNum)
71
+
72
+  }
73
+
74
+
75
+  const day = new Date();
76
+  const y = day.getFullYear();
77
+  const m = day.getMonth() + 1;
78
+  const d = day.getDate();
79
+  let number = 0
80
+  const onChange = (e) => {
81
+
82
+
83
+
84
+    if (travelMine.records == '') {
85
+
86
+
87
+      console.log('没有行程');
88
+      newTravelMine({ title: `我的行程 ${y}-${m}-${d}` }).then(res => {
89
+        handelNoteList()
90
+        // 首先创建一个行程,然后才能拿到下面的这些数据
91
+
92
+        const [firstInx, secondInx] = e.detail?.value
93
+
94
+        const firstValue = valueList[firstInx] || ''
95
+        console.log("🚀 ~ file: index.jsx ~ line 89 ~ newTravelMine ~ e.detail", firstValue)
96
+
97
+        const secondValue = numberTrave[secondInx] || ''
98
+
99
+        const { travelId } = firstValue
100
+
101
+        //行程内容
102
+        const { i } = secondValue//天数
103
+        // saveTravel({})
104
+        saveTravel(res.travelId, { dayOrder: i, targetId: targetId, targetType: targetType }).then((val) => {
105
+          Taro.showToast({
106
+            title: '添加成功',
107
+            icon: 'none',
108
+            duration: 1000
109
+          })
110
+          resourceList(travelId)
111
+        })
112
+      })
113
+    } else {
114
+      console.log('有行程', e);
115
+      const [firstInx, secondInx] = e.detail.value
116
+
117
+      const firstValue = valueList[firstInx]
118
+
119
+      const secondValue = numberTrave[secondInx]
120
+
121
+      const { travelId } = firstValue
122
+
123
+      //行程内容
124
+      const { i } = secondValue//天数
125
+
126
+      saveTravel(travelId, { dayOrder: i, targetId: targetId, targetType: targetType }).then((res) => {
127
+        Taro.showToast({
128
+          title: '添加成功',
129
+          icon: 'none',
130
+
131
+          duration: 1000
132
+        })
133
+        resourceList(travelId)
134
+
135
+        // setGrowGrass(grassNO)
136
+
137
+      })
138
+      // console.log('else');
139
+
140
+    }
141
+  }
142
+
143
+
144
+  const handlePayClick = () => {
145
+    if (travelMine.records == '') {
146
+      Taro.showToast({
147
+        title: '暂无行程,已自动创建',
148
+        icon: 'none',
149
+        duration: 3000
150
+      })
151
+
152
+      newTravelMine({ title: `我的行程 ${y}-${m}-${d}` }).then(res => {
153
+        handelNoteList()
154
+        // 首先创建一个行程,然后才能拿到下面的这些数据
155
+      })
156
+
157
+    }
158
+
159
+
160
+
161
+    // Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
162
+
163
+  }
164
+  const PayAction = travelMine.total >= 1 ?
165
+    <View className='view-picker'>
166
+      <Picker
167
+        className='picker-box'
168
+        mode='multiSelector'
169
+        range={array}
170
+        range-key='title'
171
+        onColumnChange={handleColumn}
172
+        onChange={onChange}
173
+        scrollType='link'
174
+      // value={}
175
+      >
176
+        <Action.Icon icon={item.isVisited < 1 ? grassOFF : grassNO} text={item.isVisited < 1 ? '种草' : '已种草'} onClick={handlePayClick} />
177
+      </Picker>
178
+    </View>
179
+    :
180
+    <Action.Icon icon={item.isVisited < 1 ? grassOFF : grassNO} text={item.isVisited < 1 ? '种草' : '已种草'} onClick={handlePayClick} />
181
+
182
+
183
+  return (
184
+    <View style={{ margin: '15px 5px' }} >
185
+      <View className='packageDetail' style={{ display: goshop ? '' : 'none' }}>
186
+        <Popup show={showCutover} maskClosable={showCutover} onClose={onClose}>
187
+          <ScrollView
188
+            scrollY
189
+            style={{ maxHeight: '60vh' }}
190
+          >
191
+            <Image mode='widthFix' src={item.details ? item.details : item.poster} />
192
+          </ScrollView>
193
+        </Popup >
194
+      </View>
195
+      <CouponCard action={PayAction}>
196
+        <CouponMedia onClick={goFood}>
197
+          <CouponMedia.Header
198
+            cashback={item.cashback}
199
+            image={compressImage(item.poster)}
200
+            badge='note'
201
+          />
202
+          <CouponMedia.Body star={st}>
203
+            <View className='foodCard'>
204
+              <View className='cpn-card-text'>
205
+                {(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}
206
+              </View>
207
+              <View className='cpn-card-text' style={{ marginTop: '10rpx' }}>
208
+                <Text className='cpn-card-text_mn'>¥{`${(item.averagePrice == '' ? '0.00' : item.averagePrice / 100)?.toFixed(2)}元`}</Text>
209
+                {/* <Text className='cpn-card-text_rm'>{`门市价${(item.standardPrice / 100)?.toFixed(2)}元`}</Text> */}
210
+              </View>
211
+              <View className='cpn-md-act'>
212
+                <Location {...det} />
213
+                <SaveIcon saved={item.isSaved > 0} targetType='shop_package' editable={editable} targetId={item.targetId} />
214
+              </View>
215
+            </View>
216
+          </CouponMedia.Body>
217
+        </CouponMedia>
218
+      </CouponCard>
219
+    </View>
220
+  )
221
+}

+ 52
- 0
src/components/foodCards/ShopNoteCard/style.less Ver arquivo

@@ -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
+}

+ 4
- 4
src/components/foodCards/foodCards.jsx Ver arquivo

@@ -6,8 +6,8 @@ import { compressImage } from '@/utils'
6 6
 import SaveIcon from '@/components/SaveIcon'
7 7
 import Pay from '@/assets/icons/housemantj/pay.png'
8 8
 import Popup from '@/components/Popup'
9
-import './style.less'
10 9
 import { useState } from 'react'
10
+import './style.less'
11 11
 
12 12
 
13 13
 const CouponMedia = CouponCard.Media
@@ -15,7 +15,7 @@ const Action = CouponCard.Action
15 15
 
16 16
 //套餐卡片
17 17
 export default (props) => {
18
-  const { item, st, det, editable,setScroll, goshop, scene, subOrderId, id } = props
18
+  const { item, st, det, editable, setScroll, goshop, scene, subOrderId, id } = props
19 19
   const { shopId } = props.item
20 20
   const goFood = () => {
21 21
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
@@ -42,8 +42,8 @@ export default (props) => {
42 42
   const PayAction = <Action.Icon icon={Pay} text='支付' onClick={handlePayClick} />
43 43
   return (
44 44
     <View style={{ margin: '15px 5px' }} >
45
-      <View className='packageDetail' style={{display:goshop?'':'none'}}>
46
-        <Popup show={showCutover} maskClosable={showCutover}  onClose={onClose}>
45
+      <View className='packageDetail' style={{ display: goshop ? '' : 'none' }}>
46
+        <Popup show={showCutover} maskClosable={showCutover} onClose={onClose}>
47 47
           <ScrollView
48 48
             scrollY
49 49
             style={{ maxHeight: '60vh' }}

+ 11
- 10
src/hotel/components/HouseManage/houseManage.jsx Ver arquivo

@@ -1,24 +1,25 @@
1 1
 import Taro, { useDidShow } from '@tarojs/taro'
2 2
 import { View, Image } from '@tarojs/components';
3
+import ToggleRole from '@/components/ToggleRole'
4
+
3 5
 import see from '@/assets/icons/landlord/lookPerson.png'
4 6
 import share from '@/assets/icons/landlord/shareLink.png'
5 7
 import del from '@/assets/icons/landlord/delete.png'
6 8
 import addImg from '@/assets/icons/landlord/add.png'
7 9
 import copyRoomImg from '@/assets/icons/landlord/copyroom.png'
8 10
 import React, { useState, useEffect, useRef, useImperativeHandle, useMemo } from 'react'
9
-import { getRoomList,deleteRoom,copyRoom } from '@/services/landlord'
11
+import { getRoomList, deleteRoom, copyRoom } from '@/services/landlord'
10 12
 import Spin3 from '@/components/Spin/Spin3';
11 13
 import List from '@/components/List';
12 14
 import Picker from '@/components/Picker'
13 15
 import SearchBar from '@/components/SearchBar'
14 16
 import ShareRoom from '../shareRoom/ShareRoom.jsx'
15 17
 import ShareCard from '../shareCard/shareCard'
16
-import ToggleRole from '@/components/ToggleRole'
17 18
 import './houseManage.less'
18 19
 
19 20
 
20 21
 export default React.forwardRef((props, ref) => {
21
-  const { hotel, hotelList, onHotelChange,isBind } = props
22
+  const { hotel, hotelList, onHotelChange, isBind } = props
22 23
   const [detail, setDetail] = useState([])
23 24
   const [search, setSearch] = useState()
24 25
 
@@ -46,8 +47,8 @@ export default React.forwardRef((props, ref) => {
46 47
               title: '删除房源成功',
47 48
               icon: 'none',
48 49
             })
49
-            getRoomList({ hotelId: hotel.hotelId }).then((res) => {
50
-              setDetail(res.records || [])
50
+            getRoomList({ hotelId: hotel.hotelId }).then((vals) => {
51
+              setDetail(vals.records || [])
51 52
             })
52 53
           })
53 54
         }
@@ -61,8 +62,8 @@ export default React.forwardRef((props, ref) => {
61 62
   const [showCutover, setShowCutover] = useState(false)
62 63
   const [showCard, setShowCard] = useState(false)
63 64
   const [room, setRoom] = useState({})
64
-  const ShowMoldeOn = (room) => {
65
-    setRoom(room)
65
+  const ShowMoldeOn = (rooms) => {
66
+    setRoom(rooms)
66 67
     setShowCutover(true)
67 68
   }
68 69
   const onClose = () => {
@@ -160,9 +161,9 @@ export default React.forwardRef((props, ref) => {
160 161
         <Spin3 show={loading} />
161 162
       </View>
162 163
       <View style={{ flex: 'none' }}>
163
-        <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择民宿" value={hotel?.hotelId} kv={['hotelName', 'hotelId']} dicts={hotelList} onChange={handleHotelChange} /></view>
164
+        <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder='请选择民宿' value={hotel?.hotelId} kv={['hotelName', 'hotelId']} dicts={hotelList} onChange={handleHotelChange} /></view>
164 165
         <view className='User-info-cutover-normal'>
165
-            <ToggleRole role='hotel' isBind={isBind}/>
166
+          <ToggleRole role='hotel' isBind={isBind} />
166 167
         </view>
167 168
       </View>
168 169
       <View style={{ flex: 'none' }}>
@@ -179,7 +180,7 @@ export default React.forwardRef((props, ref) => {
179 180
           params={queryParams}
180 181
           onDataChange={setDetail}
181 182
           refresherEnabled={false}
182
-          noData="暂无房源信息"
183
+          noData='暂无房源信息'
183 184
         >
184 185
           <view className='waterfall'>
185 186
             {

+ 4
- 0
src/layouts/index.jsx Ver arquivo

@@ -5,6 +5,7 @@ import { useModel } from '@/store'
5 5
 import { getQueryString } from '@/utils'
6 6
 import useRouter from '@/utils/hooks/useRouter'
7 7
 import useTrackPage from '@/utils/hooks/useTrackPage'
8
+import useShareOpen from '@/utils/hooks/useShareOpen'
8 9
 import Loading from './Loading'
9 10
 import { getPageBy, getIndexPageOf } from '../routes'
10 11
 
@@ -22,6 +23,9 @@ export default (Child) => (props) => {
22 23
   }
23 24
   useTrackPage(trackPageData)
24 25
 
26
+  // 打开分享
27
+  useShareOpen(person?.personId, router.params.shareId)
28
+
25 29
   // 确保人员信息到位, 确保二维码解析结束
26 30
   const loading = !person?.personRole || (router.params.scene && !router.params.parseQRFinished);
27 31
 

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

@@ -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
- 0
src/pages/MineUserAll/MyTravel/index.config.js Ver arquivo

@@ -0,0 +1,5 @@
1
+export default {
2
+  navigationBarTitleText: '我的行程',
3
+  navigationStyle: 'custom',
4
+  disableScroll: true,
5
+}

+ 100
- 0
src/pages/MineUserAll/MyTravel/index.jsx Ver arquivo

@@ -0,0 +1,100 @@
1
+import Taro from '@tarojs/taro'
2
+import { Image, Button, View } from '@tarojs/components'
3
+import SpinBox from "@/components/Spin/SpinBox";
4
+import formatTime from '@/utils/formatTime'
5
+import withLayout from '@/layouts'
6
+
7
+import { useState, useEffect } from "react";
8
+import SlideView from '@/components/SlideView';
9
+import editImg from '@/assets/icons/Travel/editimg.png'
10
+import CustomNav from '@/components/CustomNav'
11
+import { getTravelMine, deleteTravel } from '@/services/travel'
12
+
13
+import './style.less'
14
+
15
+export default withLayout((props) => {
16
+
17
+  const [loading, setLoading] = useState(false)
18
+
19
+  //删除
20
+  const handelDelete = (e) => {
21
+    Taro.showModal({
22
+      title: '提示',
23
+      content: '确定要删除吗',
24
+      success: function (res) {
25
+        if (res.confirm) {
26
+
27
+          deleteTravel(e.travelId).then(r => {
28
+            Taro.showToast({
29
+              title: '删除成功',
30
+              icon: 'none',
31
+              duration: 1000
32
+            })
33
+            getList()
34
+
35
+          })
36
+
37
+        } else if (res.cancel) {
38
+
39
+
40
+        }
41
+      }
42
+    })
43
+
44
+  }
45
+  const handelEdit = (item) => {
46
+    Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${item.travelId}&dayNum=${item.dayNum}` })
47
+  }
48
+
49
+  const [travelMine, setTravelMine] = useState([])
50
+  const getList = () => {
51
+    getTravelMine({ pageNum: 1, pageSize: 99, }).then(e => {
52
+      setTravelMine(e.records)
53
+
54
+
55
+    })
56
+  }
57
+
58
+  useEffect(() => {
59
+    getList()
60
+
61
+  }, [])
62
+  return (
63
+    <View className='page-index box-content'>
64
+      <View className='index-navbar'>
65
+        <CustomNav title='我的行程' />
66
+      </View>
67
+      <View className='index-container'>
68
+        <SpinBox loading={loading}>
69
+          <scroll-view
70
+            scrollY
71
+            style='height: 100%;'
72
+          >
73
+            <View className='View-box'>
74
+              {
75
+                travelMine.map((item, index) =>
76
+
77
+                  <SlideView key={index} del onDelete={() => handelDelete(item)} className='myTravel'>
78
+                    <View className='View-box-Card' onClick={() => handelEdit(item)}>
79
+                      <View className='bottom'>
80
+                        <View className='travelName'>{item.title}</View>
81
+                        <Image src={editImg} className='edit'></Image>
82
+                      </View>
83
+                      <View className='bottom'>
84
+                        <View className='travelDay'>行程时间:{item.dayNum}天</View>
85
+                        <View className='travelDate'>创建时间:{formatTime(item.createDate, "yyyy/MM/dd")}</View>
86
+                      </View>
87
+                    </View>
88
+                  </SlideView>
89
+
90
+                )
91
+              }
92
+
93
+              <View className='foot'>这是我的底线</View>
94
+            </View>
95
+          </scroll-view>
96
+        </SpinBox>
97
+      </View>
98
+    </View >
99
+  )
100
+})

+ 51
- 0
src/pages/MineUserAll/MyTravel/style.less Ver arquivo

@@ -0,0 +1,51 @@
1
+.box-content {
2
+  background-color: #F8F8F8;
3
+  height: 100vh;
4
+  .View-box {
5
+    margin: 30px 20px 0 20px;
6
+    .myTravel{
7
+      .slideview-content{
8
+        margin:7.5px 0;
9
+      }
10
+    }
11
+    .View-box-Card{
12
+      background: #FFF;
13
+      box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
14
+      border-radius: 12px;
15
+      padding: 40px 34px 40px 26px;
16
+      line-height: 31.5px;
17
+      font-weight: bold;
18
+      color: #666;
19
+      margin: 15px 10px;
20
+      .travelName{
21
+        font-size: 34px;
22
+        color: #333;
23
+      }
24
+      .edit{
25
+        width: 40px;
26
+        height: 40px;
27
+      }
28
+      .bottom{   
29
+        display: flex;
30
+        justify-content: space-between;  
31
+        .travelDay{
32
+          margin-top: 40px;
33
+          font-size: 28px;
34
+        }
35
+        .travelDate{
36
+          margin-top: 40px;
37
+          font-size: 24px;
38
+          font-weight: 400;
39
+        }
40
+      }
41
+    }
42
+
43
+    .foot {
44
+      font-size: 28px;
45
+      color: #c0c8d3;
46
+      margin: 40px 0;
47
+      text-align: center;
48
+    }
49
+  }
50
+}
51
+

+ 7
- 0
src/pages/RandomItinerary/ResultOver/index.config.js Ver arquivo

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

+ 88
- 0
src/pages/RandomItinerary/ResultOver/index.jsx Ver arquivo

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

+ 52
- 0
src/pages/RandomItinerary/ResultOver/style.less Ver arquivo

@@ -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 Ver arquivo

@@ -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;margin-bottom: 1em;'>
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
+}

+ 73
- 0
src/pages/RandomItinerary/components/ConstellationCard/style.less Ver arquivo

@@ -0,0 +1,73 @@
1
+.Random-Conste-box {
2
+  margin: 60px 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
+
22
+      filter: grayscale(95%);
23
+      opacity: 0.6;
24
+    }
25
+    .imageLess {
26
+      opacity: 1;
27
+      opacity: 1;
28
+      filter: grayscale(0%);
29
+    }
30
+  }
31
+
32
+  .RC-box-content {
33
+    width: 50%;
34
+    height: 100%;
35
+    display: inline-block;
36
+
37
+    text-align: center;
38
+    .RC-box-C-title {
39
+      font-size: 34px;
40
+      font-weight: bold;
41
+      color: #140f0f;
42
+
43
+      margin-top: 25%;
44
+      margin-bottom: 10px;
45
+    }
46
+
47
+    .RC-box-C-moon {
48
+      font-size: 22px;
49
+      font-weight: 500;
50
+      color: #140f0f;
51
+    }
52
+  }
53
+}
54
+
55
+.bottom-text {
56
+  margin-left: 40%;
57
+  margin-top: -2em;
58
+  width: 100%;
59
+  padding: 0.5em 0 2em 0;
60
+  display: flex;
61
+  align-items: center;
62
+  .btn-image {
63
+    width: 32px;
64
+    height: 32px;
65
+  }
66
+  .btn-text {
67
+    width: 110px;
68
+    font-size: 30px;
69
+    font-weight: bold;
70
+    color: #202020;
71
+    margin-left: 10px;
72
+  }
73
+}

+ 110
- 0
src/pages/RandomItinerary/components/FiveSenses/index.jsx Ver arquivo

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

+ 51
- 0
src/pages/RandomItinerary/components/FiveSenses/style.less Ver arquivo

@@ -0,0 +1,51 @@
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(95%);
23
+      opacity: 0.6;
24
+    }
25
+    .Five-imageLess {
26
+      opacity: 1;
27
+      filter: grayscale(0%);
28
+    }
29
+  }
30
+
31
+  .Five-box-content {
32
+    width: 50%;
33
+    height: 100%;
34
+    display: inline-block;
35
+
36
+    text-align: center;
37
+    .Five-box-C-title {
38
+      font-size: 34px;
39
+      font-weight: bold;
40
+      color: #140f0f;
41
+
42
+      margin-top: 35%;
43
+    }
44
+
45
+    .Five-box-C-moon {
46
+      font-size: 22px;
47
+      font-weight: 500;
48
+      color: #140f0f;
49
+    }
50
+  }
51
+}

+ 82
- 0
src/pages/RandomItinerary/components/GirlFriend/index.jsx Ver arquivo

@@ -0,0 +1,82 @@
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, onSelected } = props
13
+
14
+  const YES = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/YES.png'
15
+  const No = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/RandomIIcon/No.png'
16
+
17
+  const [imageOne, setImageOne] = useState(false)
18
+  const [imageTow, setImageTow] = useState(false)
19
+
20
+  const handleYES = () => {
21
+    setImageOne(true)
22
+    setImageTow(false)
23
+    onSelected()
24
+  }
25
+
26
+
27
+  const handleNo = () => {
28
+    setImageOne(false)
29
+    setImageTow(true)
30
+    onSelected()//未选择不给到下一题
31
+  }
32
+
33
+
34
+
35
+
36
+
37
+  return (
38
+    <View >
39
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
40
+        2<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>你是单身吗?
41
+      </View>
42
+
43
+
44
+      <view className='Girl-Conste-box' onClick={handleYES}  >
45
+        <View className='Girl-box-imageContent'>
46
+          <image className={`Girl-box-image  imageTwo ${imageOne && 'Girl-imageLess'} `} src={YES} />
47
+
48
+        </View>
49
+        <view className='Girl-box-content' >
50
+          <View className='Girl-box-C-title' >
51
+            YES
52
+          </View>
53
+          <View className='Girl-box-C-moon' >
54
+            是
55
+          </View>
56
+        </view>
57
+
58
+      </view>
59
+
60
+      <view className='Girl-Conste-box' onClick={handleNo} >
61
+        <View className='Girl-box-imageContent'>
62
+          <image className={`Girl-box-image ${imageTow && 'Girl-imageLess'} `} src={No} />
63
+        </View>
64
+        <view className='Girl-box-content' >
65
+          <View className='Girl-box-C-title' >
66
+            No
67
+          </View>
68
+          <View className='Girl-box-C-moon' >
69
+            否
70
+          </View>
71
+        </view>
72
+
73
+      </view>
74
+
75
+
76
+
77
+
78
+    </View>
79
+
80
+
81
+  )
82
+}

+ 66
- 0
src/pages/RandomItinerary/components/GirlFriend/style.less Ver arquivo

@@ -0,0 +1,66 @@
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(95%);
25
+      opacity: 0.6;
26
+    }
27
+    .imageTwo {
28
+      height: 420px;
29
+      width: 240px;
30
+      position: relative;
31
+      left: 0em;
32
+      bottom: 45px;
33
+      filter: grayscale(95%);
34
+      opacity: 0.6;
35
+    }
36
+
37
+    .Girl-imageLess {
38
+      opacity: 1;
39
+      filter: grayscale(0%);
40
+    }
41
+  }
42
+
43
+  .Girl-box-content {
44
+    width: 50%;
45
+    height: 100%;
46
+    display: inline-block;
47
+    text-align: center;
48
+    /* margin: 1em; */
49
+    margin-top: 1.5em;
50
+    .Girl-box-C-title {
51
+      font-size: 66px;
52
+      font-weight: bold;
53
+      color: #140f0f;
54
+      margin: 15px;
55
+    }
56
+
57
+    .Girl-box-C-moon {
58
+      font-weight: bold;
59
+      color: #140f0f;
60
+    }
61
+  }
62
+}
63
+
64
+.imageTwo {
65
+  width: 200px;
66
+}

+ 80
- 0
src/pages/RandomItinerary/components/Hand/index.jsx Ver arquivo

@@ -0,0 +1,80 @@
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, onSelected } = 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
+    onSelected()
24
+  }
25
+
26
+
27
+  const handleRightHand = () => {
28
+    setImageOne(false)
29
+    setImageTow(true)
30
+    onSelected()
31
+  }
32
+
33
+
34
+
35
+  return (
36
+    <View >
37
+      <View style='font-size: 20px;font-weight: bold;color: #140F0F;marginLeft:10px;;'>
38
+        3<text style='font-size: 13px;font-weight: bold;color: #140F0F;'> / 5 </text>双手交叉相握,你是拇指在上还是右手拇指在上?
39
+      </View>
40
+
41
+
42
+      <view className='Hand-Conste-box' onClick={handleLeftHand} >
43
+        <View className='Hand-box-imageContent'>
44
+          <image className={`Hand-box-image  ${imageOne && 'Hand-imageLess'} `} src={LeftHand} />
45
+        </View>
46
+        <view className='Hand-box-content' >
47
+          <View className='Hand-box-C-title' >
48
+            Head
49
+          </View>
50
+          <View className='Hand-box-C-moon' >
51
+            左手
52
+          </View>
53
+        </view>
54
+
55
+      </view>
56
+
57
+      <view className='Hand-Conste-box' onClick={handleRightHand} >
58
+        <View className='Hand-box-imageContent'>
59
+          <image className={`Hand-box-image  ${imageTow && 'Hand-imageLess'} `} src={RightHand} />
60
+
61
+        </View>
62
+        <view className='Hand-box-content' >
63
+          <View className='Hand-box-C-title' >
64
+            Right
65
+          </View>
66
+          <View className='Hand-box-C-moon' >
67
+            右手
68
+          </View>
69
+        </view>
70
+
71
+      </view>
72
+
73
+
74
+
75
+
76
+    </View>
77
+
78
+
79
+  )
80
+}

+ 52
- 0
src/pages/RandomItinerary/components/Hand/style.less Ver arquivo

@@ -0,0 +1,52 @@
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(95%);
25
+      opacity: 0.6;
26
+    }
27
+    .Hand-imageLess {
28
+      opacity: 1;
29
+      filter: grayscale(0%);
30
+    }
31
+  }
32
+
33
+  .Hand-box-content {
34
+    width: 50%;
35
+    height: 100%;
36
+    display: inline-block;
37
+    text-align: center;
38
+    /* margin: 1em; */
39
+    margin-top: 1.5em;
40
+    .Hand-box-C-title {
41
+      font-size: 66px;
42
+      font-weight: bold;
43
+      color: #140f0f;
44
+      margin: 15px;
45
+    }
46
+
47
+    .Hand-box-C-moon {
48
+      font-weight: bold;
49
+      color: #140f0f;
50
+    }
51
+  }
52
+}

+ 38
- 0
src/pages/RandomItinerary/components/ResultOver/index.jsx Ver arquivo

@@ -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 Ver arquivo

@@ -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, onSelected } = 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
+    onSelected()
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
+}

+ 50
- 0
src/pages/RandomItinerary/components/UFO/style.less Ver arquivo

@@ -0,0 +1,50 @@
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(95%);
22
+      opacity: 0.6;
23
+    }
24
+    .UFO-imageLess {
25
+      opacity: 1;
26
+      filter: grayscale(0%);
27
+    }
28
+  }
29
+
30
+  .UFO-box-content {
31
+    width: 50%;
32
+    height: 100%;
33
+    display: inline-block;
34
+
35
+    text-align: center;
36
+    .UFO-box-C-title {
37
+      font-size: 34px;
38
+      font-weight: bold;
39
+      color: #140f0f;
40
+
41
+      margin-top: 35%;
42
+    }
43
+
44
+    .UFO-box-C-moon {
45
+      font-size: 22px;
46
+      font-weight: 500;
47
+      color: #140f0f;
48
+    }
49
+  }
50
+}

+ 11
- 0
src/pages/RandomItinerary/index.config.js Ver arquivo

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

+ 116
- 0
src/pages/RandomItinerary/index.jsx Ver arquivo

@@ -0,0 +1,116 @@
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
+import './style.less'
14
+
15
+
16
+
17
+export default withLayout((props) => {
18
+  const { router, person } = props
19
+  const [show, setShow] = useState(1)
20
+  const [btn, setBtn] = useState(true)
21
+
22
+  //是否选择
23
+  const [i, setI] = useState(false)
24
+
25
+  const onSelected = () => {
26
+    setI(true)
27
+  }
28
+
29
+
30
+  const handleGoTo = () => {
31
+    if (show >= 5) {
32
+      if (i === false) {
33
+        Taro.showToast({
34
+          title: '请选择一项噢',
35
+          icon: 'none',
36
+          duration: 2000
37
+        })
38
+
39
+      } else {
40
+        setI(false)
41
+        seaveTravelDestiny().then(e => {
42
+
43
+          Taro.navigateTo({ url: `/pages/RandomItinerary/ResultOver/index` })
44
+
45
+        })
46
+
47
+      }
48
+
49
+
50
+
51
+
52
+    } else {
53
+      if (i === false) {
54
+        Taro.showToast({
55
+          title: '请选择一项噢',
56
+          icon: 'none',
57
+          duration: 2000
58
+        })
59
+
60
+      } else {
61
+        setShow(show + 1)
62
+        setI(false)
63
+
64
+      }
65
+
66
+    }
67
+
68
+  }
69
+
70
+
71
+  return (
72
+    <view className='page-index'>
73
+      <view className='index-navbar'>
74
+        <CustomNav title='命定行程' />
75
+      </view>
76
+      <scroll-view scrollY style='height: calc(100% - 75px);margin-bottom: 40px;' >
77
+
78
+        <View className='index-container'>
79
+          {
80
+            show === 1 && <ConstellationCard ico={ChangeNext} textNext='换一批' onSelected={onSelected} />
81
+          }
82
+          {
83
+            show === 2 && <GirlFriend onSelected={onSelected} />
84
+          }
85
+          {
86
+            show === 3 && <Hand onSelected={onSelected} />
87
+          }
88
+          {
89
+            show === 4 && <FiveSenses onSelected={onSelected} />
90
+          }
91
+          {
92
+            show === 5 && <UFO onSelected={onSelected} />
93
+          }
94
+
95
+        </View>
96
+
97
+
98
+
99
+        {
100
+
101
+          btn === true && <View className='btn-bottom' onClick={handleGoTo}>
102
+            <text >
103
+              {
104
+                show > 4 ? '查看我的命定行程' : '下一题'
105
+              }
106
+            </text>
107
+          </View>
108
+        }
109
+
110
+
111
+
112
+      </scroll-view>
113
+
114
+    </view >
115
+  )
116
+})

+ 24
- 0
src/pages/RandomItinerary/style.less Ver arquivo

@@ -0,0 +1,24 @@
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: 1.5em;
14
+    // margin-bottom: 2em;
15
+    position: absolute;
16
+    left: 4%;
17
+    bottom: 0;
18
+
19
+    text {
20
+      text-align: center;
21
+      width: 100%;
22
+    }
23
+  }
24
+}

+ 5
- 1
src/pages/RoomOrder/index.jsx Ver arquivo

@@ -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>

BIN
src/pages/Travel/Edit/NewCustom/ico/openUp.png Ver arquivo


BIN
src/pages/Travel/Edit/NewCustom/ico/packUp.png Ver arquivo


+ 86
- 0
src/pages/Travel/Edit/NewCustom/index.jsx Ver arquivo

@@ -0,0 +1,86 @@
1
+
2
+import { useState } from 'react'
3
+import CustomCard from '@/components/foodCards/CustomCard/index'
4
+
5
+import Taro from '@tarojs/taro'
6
+import { View, Button } from '@tarojs/components'
7
+import { getTravelMine, deleteTravelItem } from '@/services/travel'
8
+import openUp from './ico/openUp.png'
9
+import packUp from './ico/packUp.png'
10
+import './style.less'
11
+
12
+
13
+
14
+export default (props) => {
15
+  const { item, handleDelete } = props
16
+  const { travelItemList, travelId, dayNum } = item
17
+
18
+
19
+
20
+
21
+  const [unfold, setUnfold] = useState(false)
22
+  const onUnfold = () => {
23
+    setUnfold(!unfold)
24
+
25
+  }
26
+
27
+  const onDay = () => {
28
+    console.log("🚀 ~ file: index.jsx ~ line 17 ~ item", item)
29
+
30
+  }
31
+
32
+  const onDelete = (e) => {
33
+
34
+    const itemId = e
35
+    Taro.showModal({
36
+      title: '提示',
37
+      content: '确定要删除吗',
38
+      success: function (res) {
39
+        if (res.confirm) {
40
+          handleDelete()
41
+
42
+          deleteTravelItem(travelId, itemId).then(val => {
43
+            Taro.showToast({
44
+              title: '删除成功',
45
+              icon: 'none',
46
+              duration: 1000
47
+            })
48
+          })
49
+        } else if (res.cancel) {
50
+
51
+
52
+        }
53
+      }
54
+    })
55
+
56
+  }
57
+
58
+
59
+  return (
60
+    <view style='height:100%'>
61
+      {
62
+
63
+        travelItemList == '' ? '' : <view onClick={onUnfold} className='cssUnfold' >
64
+          <image className='unfoldIcoCss' src={unfold === true ? packUp : openUp} />
65
+          展开</view>
66
+      }
67
+
68
+
69
+      <scroll-view scrollY style={unfold === false ? 'height:100%;' : ' height:0em;'} >
70
+        {
71
+
72
+          travelItemList.map((ite, index) =>
73
+            item == '' ? <view></view> :
74
+
75
+              <CustomCard item={ite} det={ite} travelId={travelId} onDelete={onDelete} />
76
+
77
+          )
78
+
79
+        }
80
+
81
+      </scroll-view>
82
+    </view>
83
+
84
+
85
+  )
86
+}

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

@@ -0,0 +1,9 @@
1
+.cssUnfold {
2
+  margin-left: 10px;
3
+  display: flex;
4
+  align-items: center;
5
+  .unfoldIcoCss {
6
+    width: 40px;
7
+    height: 40px;
8
+  }
9
+}

+ 11
- 0
src/pages/Travel/Edit/components/RecommendModel/index.jsx Ver arquivo

@@ -0,0 +1,11 @@
1
+
2
+import './style.less'
3
+
4
+export default (props) => {
5
+  const { showCutover ,onClose} = props
6
+  return (
7
+    <mp-dialog buttons={[]} show={showCutover} mask maskClosable={showCutover} onClose={onClose}>
8
+      {props.children}
9
+    </mp-dialog>
10
+  )
11
+}

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


+ 13
- 0
src/pages/Travel/Edit/index.config.js Ver arquivo

@@ -0,0 +1,13 @@
1
+export default {
2
+  navigationBarTitleText: '定制行程',
3
+  navigationStyle: 'custom',
4
+  styleIsolation: 'shared',
5
+  enableShareAppMessage: true,
6
+  disableScroll: true,
7
+
8
+  usingComponents: {
9
+    "mp-dialog": "weui-miniprogram/dialog/dialog",
10
+
11
+  }
12
+}
13
+

+ 242
- 0
src/pages/Travel/Edit/index.jsx Ver arquivo

@@ -0,0 +1,242 @@
1
+import Taro from '@tarojs/taro'
2
+import { Image, Button, View, Text } from '@tarojs/components'
3
+import SpinBox from "@/components/Spin/SpinBox";
4
+import CustomCard from '@/components/foodCards/CustomCard/index'
5
+
6
+import { useState, useEffect } from "react";
7
+import BottomMoadl from '@/components/BottomMoadl/index'
8
+import RecommendedCard from '@/components/foodCards/RecommendedCard'
9
+import Travel from '@/assets/icons/Travel/travel.png'
10
+import ChangeNext from '@/assets/icons/Travel/ChangeNext.png'
11
+import withLayout from '@/layouts'
12
+
13
+import editImg from '@/assets/icons/Travel/editimg.png'
14
+import CustomNav from '@/components/CustomNav'
15
+import { deleteTravelItem, getTravelID, getRecommendList } from '@/services/travel'
16
+
17
+import NewCustom from './NewCustom'
18
+import './style.less'
19
+
20
+export default withLayout((props) => {
21
+  const { router, location } = props
22
+  const { id, dayNum } = router.params
23
+
24
+
25
+
26
+  const [loading, setLoading] = useState(false)
27
+  const [bottomDayNum, setBottomDayNum] = useState(true)
28
+
29
+
30
+
31
+  const [showCutover, setShowCutover] = useState([])
32
+  const [travelCustom, setTravelCustom] = useState()
33
+
34
+
35
+  const handleDelete = (res) => {
36
+    setLoading(true)
37
+    getTravelID(id).then(e => {
38
+      setTravelCustom(e)
39
+      setShowCutover(e.travelItemList)
40
+      netx(e.travelItemList)
41
+      setLoading(false)
42
+
43
+    }).catch(r => {
44
+      setLoading(false)
45
+
46
+    })
47
+  }
48
+
49
+
50
+
51
+  const [dayNumber, setDayNumber] = useState(1)
52
+  const sum = dayNum - dayNumber
53
+  const [state, setstate] = useState(true)
54
+
55
+
56
+  const addTextSum = () => {
57
+    setDayNumber(dayNumber + 1)
58
+
59
+    if (dayNumber == 1) {
60
+      setstate(false)
61
+    }
62
+
63
+
64
+
65
+  }
66
+  const minusTextSum = () => {
67
+    setDayNumber(dayNumber - 1)
68
+    if (dayNumber == 2) {
69
+      setstate(true)
70
+
71
+    }
72
+
73
+
74
+  }
75
+
76
+
77
+  const netx = (e) => {
78
+
79
+
80
+    let a = e.filter((val) => {
81
+      return val.dayOrder == dayNumber
82
+    })
83
+    setShowCutover(a)
84
+
85
+  }
86
+
87
+  const handelAddTravel = () => {
88
+    setLoading(true)
89
+
90
+    //获取我的行程。
91
+    getTravelID(id).then(e => {
92
+      setTravelCustom(e)
93
+      setShowCutover(e.travelItemList)
94
+      netx(e.travelItemList)
95
+      setLoading(false)
96
+
97
+    }).catch(e => {
98
+      setLoading(false)
99
+
100
+    })
101
+
102
+
103
+  }
104
+
105
+  useEffect(() => {
106
+    if (dayNum == 1) {
107
+      setBottomDayNum(false)
108
+    } else {
109
+      setBottomDayNum(true)
110
+
111
+    }
112
+
113
+    setLoading(true)
114
+
115
+    //获取我的行程。
116
+    getTravelID(id).then(e => {
117
+      setTravelCustom(e)
118
+      setShowCutover(e.travelItemList)
119
+      netx(e.travelItemList)
120
+      setLoading(false)
121
+
122
+    }).catch(e => {
123
+      setLoading(false)
124
+
125
+    })
126
+
127
+
128
+  }, [id, dayNumber])
129
+
130
+
131
+
132
+  const onDelete = (e) => {
133
+
134
+    const itemId = e
135
+    Taro.showModal({
136
+      title: '提示',
137
+      content: '确定要删除吗',
138
+      success: function (res) {
139
+        if (res.confirm) {
140
+
141
+          deleteTravelItem(id, itemId).then(val => {
142
+            Taro.showToast({
143
+              title: '删除成功',
144
+              icon: 'none',
145
+              duration: 1000
146
+            })
147
+            handleDelete()
148
+
149
+          })
150
+        } else if (res.cancel) {
151
+
152
+
153
+        }
154
+      }
155
+    })
156
+
157
+  }
158
+
159
+
160
+  const [showFrame, setShowFrame] = useState(false)
161
+
162
+
163
+
164
+
165
+
166
+  //行程推荐
167
+  const setRecommend = () => {
168
+
169
+
170
+    setShowFrame(!showFrame)
171
+
172
+  }
173
+
174
+  const handelCancel = () => {
175
+    Taro.redirectTo({ url: '/pages/MineUserAll/MyTravel/index' })
176
+  }
177
+
178
+  return (
179
+    <view className='page-index'>
180
+      {/* 
181
+      frameTitle 标题
182
+      flag 弹窗显示 true false
183
+      ico 底部图标
184
+      textNext 底部文字
185
+      */}
186
+      <BottomMoadl frameTitle='行程推荐' dayNumber={dayNumber} travelId={id} flag={showFrame} handelAddTravel={handelAddTravel} onRecommend={setRecommend} ico={ChangeNext} textNext='换一批' location={location} />
187
+
188
+      <View className='box-content'>
189
+        <View className='index-navbar'>
190
+          <CustomNav title='定制行程' />
191
+        </View>
192
+        <scroll-view scrollY style='height: calc(100% - 75px);margin-bottom: 40px;' >
193
+
194
+          <View className='TravelTitle'>
195
+            {travelCustom?.title}<Image src={editImg} className='edit' ></Image>
196
+          </View>
197
+          <View className='index-container'>
198
+
199
+            <SpinBox loading={loading}>
200
+
201
+              <View className='View-box'>
202
+
203
+                {
204
+                  showCutover.map((item, index) =>
205
+
206
+                    <CustomCard key={index} item={item} det={item} editable='1' travelId={item.travelId} onDelete={onDelete} />
207
+
208
+                  )
209
+                }
210
+              </View>
211
+            </SpinBox>
212
+          </View>
213
+
214
+
215
+          <View className='tuijian' onClick={setRecommend}>
216
+            <Image src={Travel}></Image>
217
+            <Text>查看行程推荐</Text>
218
+          </View>
219
+
220
+
221
+          {
222
+            bottomDayNum &&
223
+            <View className='bottom'>
224
+              {
225
+
226
+                // dayNumber >= dayNum && <Button className='bottom-btn bottom-btn-cancel' onClick={minusTextSum} >上一天</Button>
227
+                state === false && <Button className='bottom-btn bottom-btn-cancel' onClick={minusTextSum} >上一天</Button>
228
+              }
229
+              {
230
+                sum >= 1 && <Button className='bottom-btn bottom-btn-ok' onClick={addTextSum}>下一天</Button>
231
+              }
232
+
233
+            </View>
234
+          }
235
+
236
+
237
+        </scroll-view>
238
+      </View >
239
+    </view>
240
+
241
+  )
242
+})

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

@@ -0,0 +1,100 @@
1
+.box-content {
2
+  height: 100vh;
3
+  .TravelTitle {
4
+    font-weight: bold;
5
+    color: #333;
6
+    line-height: 44px;
7
+    margin: 63px 30px 15px;
8
+    display: flex;
9
+    .edit {
10
+      width: 40px;
11
+      height: 40px;
12
+      margin: 0 30px;
13
+    }
14
+  }
15
+  .View-box {
16
+    margin: 30px 20px 0 20px;
17
+  }
18
+  .tuijian {
19
+    margin-bottom: 2em;
20
+    font-size: 28px;
21
+    font-weight: bold;
22
+    text-decoration: underline;
23
+    color: #274291;
24
+    line-height: 30px;
25
+    text-align: center;
26
+    image {
27
+      width: 42px;
28
+      height: 41px;
29
+      position: relative;
30
+      top: 8px;
31
+      right: 6px;
32
+    }
33
+  }
34
+  .bottom {
35
+    // flex: none;
36
+    margin: 60px 0;
37
+    // letter-spacing: 5px;
38
+    // height: 78px;
39
+
40
+    text-align: center;
41
+
42
+    &-btn {
43
+      width: 236px;
44
+      font-size: 30px;
45
+      border-radius: 12px;
46
+      font-weight: bold;
47
+      display: inline-block;
48
+      border: 2px solid #274190;
49
+
50
+      &:nth-child(2) {
51
+        margin-left: 4em;
52
+      }
53
+    }
54
+
55
+    &-btn-cancel {
56
+      color: #274290;
57
+    }
58
+
59
+    &-btn-ok {
60
+      background: #274291;
61
+      color: #fff;
62
+    }
63
+
64
+    .cancel {
65
+      width: 236px;
66
+      font-size: 30px;
67
+      border: 2px solid #274190;
68
+      border-radius: 12px;
69
+      font-weight: bold;
70
+      color: #274290;
71
+      float: left;
72
+    }
73
+
74
+    .btnok {
75
+      width: 236px;
76
+      background: #274291;
77
+      border-radius: 12px;
78
+      font-size: 30px;
79
+      font-weight: bold;
80
+      color: #fff;
81
+      float: right;
82
+    }
83
+    .hoverBtnok {
84
+      width: 236px;
85
+      background: #274291;
86
+      border-radius: 12px;
87
+      font-size: 30px;
88
+      font-weight: bold;
89
+      color: #fff;
90
+    }
91
+    .hoverCanel {
92
+      width: 236px;
93
+      font-size: 30px;
94
+      border: 2px solid #274190;
95
+      border-radius: 12px;
96
+      font-weight: bold;
97
+      color: #274290;
98
+    }
99
+  }
100
+}

+ 63
- 0
src/pages/Travel/customizedTravel/components/CustomDay/index.jsx Ver arquivo

@@ -0,0 +1,63 @@
1
+import React, { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { Input, Button, View, Label } from '@tarojs/components'
4
+import Popup from '@/components/Popup'
5
+import { newTravelMine } from '@/services/travel'
6
+
7
+import './style.less'
8
+
9
+
10
+export default (props) => {
11
+  const { showCutover, onClose, onFinish } = props
12
+  const [datNum, setDayNum] = useState('')
13
+  const [loading, setLoading] = useState(false)
14
+
15
+
16
+  const day = new Date();
17
+  const y = day.getFullYear();
18
+  const m = day.getMonth() + 1;
19
+  const d = day.getDate();
20
+
21
+  const handelShare = (e) => {
22
+    onClose()
23
+
24
+    newTravelMine({ title: `我的自定义行程 ${y}-${m}-${d}`, dayNum: datNum }).then(res => {
25
+      Taro.showToast({
26
+        title: '创建成功',
27
+        icon: 'none',
28
+        duration: 2000
29
+      })
30
+      Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${res.travelId}&dayNum=${res.dayNum}` })
31
+
32
+    })
33
+
34
+
35
+    // Taro.navigateTo({url:'/pages/Travel/Edit/index'})
36
+  }
37
+  const handelClose = (e) => {
38
+
39
+    onClose()
40
+  }
41
+
42
+  const handelChangle = (e) => {
43
+    setDayNum(e)
44
+
45
+  }
46
+  return (
47
+    <Popup show={showCutover} maskClosable={showCutover} onClose={handelClose}>
48
+      <View className='from-room srl'>
49
+        <View style={{ marginBottom: '25px' }}>
50
+          <View className='rzline' /><Label className='srl mg'>温馨提示</Label><View className='rzline' />
51
+        </View>
52
+        <View className='srleft'>
53
+          <Label>出行天数:</Label>
54
+          <Input onInput={(e) => handelChangle(e.detail.value)} value={datNum} type='number' maxlength='2' min='1' max='10' placeholder='请输入出行天数' />
55
+        </View>
56
+        <View>
57
+          <Button className='cancel' onClick={handelClose}>取消</Button>
58
+          <Button className='btn' onClick={handelShare} loading={loading} disabled={loading}>确定</Button>
59
+        </View>
60
+      </View>
61
+    </Popup>
62
+  )
63
+}

+ 61
- 0
src/pages/Travel/customizedTravel/components/CustomDay/style.less Ver arquivo

@@ -0,0 +1,61 @@
1
+.from-room{
2
+  padding-top: 60px;
3
+}
4
+.srl{
5
+  font-size: 30px;
6
+  font-weight: bold;
7
+  color: #202020;  
8
+  .mg{
9
+    font-size: 38px;
10
+    margin: 0 20px 50px 20px;
11
+  }
12
+  .rzline{
13
+    border-top: 2px #999 dashed;
14
+    height: 2px;
15
+    width: 80px;
16
+    display: inline-block;
17
+    margin-bottom: 8px;
18
+  }
19
+  .srleft{
20
+    text-align: left;
21
+    Input{
22
+      height: 92px;
23
+      font-size: 28px;
24
+      color: #999;
25
+      background: #FEFEFE;
26
+      box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.08);
27
+      margin-bottom: 40px;
28
+    }
29
+    .picker{
30
+      font-size: 28px;
31
+      color: #999;
32
+      line-height: 92px;
33
+      height: 92px;
34
+      background: #FEFEFE;
35
+      margin-bottom: 40px;
36
+      box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.08);
37
+    }
38
+  }  
39
+  .cancel{
40
+    color: #274290;
41
+    display: inline-block;
42
+    margin: 20px 20px 0 0;
43
+    width: 236px;
44
+    height: 78px;
45
+    line-height: 78px;
46
+    border: 2px solid #274190;
47
+    border-radius: 12px;
48
+  }
49
+  .btn {
50
+    width: 236px;
51
+    height: 78px;
52
+    line-height: 78px;
53
+    background: #274291;
54
+    border-radius: 12px;
55
+    display: inline-block;
56
+    color: #fff;
57
+  }
58
+}
59
+
60
+  
61
+  

+ 57
- 0
src/pages/Travel/customizedTravel/components/ThreeModel/index.jsx Ver arquivo

@@ -0,0 +1,57 @@
1
+import React, { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { Input, Button, View, Label } from '@tarojs/components'
4
+import Popup from '@/components/Popup'
5
+import { newTravelMine } from '@/services/travel'
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+  const { showCutover, onClose, onFinish } = props
11
+  const [roomNum, setRoomNum] = useState('')
12
+  const [loading, setLoading] = useState(false)
13
+  const day = new Date();
14
+  const y = day.getFullYear();
15
+  const m = day.getMonth() + 1;
16
+  const d = day.getDate();
17
+  const handelShare = () => {
18
+    onClose()
19
+
20
+    newTravelMine({ title: `我的行程三日游 ${y}-${m}-${d}`, dayNum: 3 }).then(res => {
21
+      Taro.showToast({
22
+        title: '创建成功',
23
+        icon: 'none',
24
+        duration: 2000
25
+      })
26
+      Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${res.travelId}&dayNum=${res.dayNum}` })
27
+
28
+    })
29
+
30
+
31
+  }
32
+  const handelClose = () => {
33
+    setRoomNum()
34
+    onClose()
35
+  }
36
+  const goIndex = () => {
37
+    Taro.navigateTo({ url: '/pages/index/index' })
38
+  }
39
+  return (
40
+    <Popup show={showCutover} maskClosable={showCutover} onClose={handelClose}>
41
+      <View className='from-room srl'>
42
+        <View>
43
+          <View className='rzline' /><Label className='srl mg'>温馨提示</Label><View className='rzline' />
44
+        </View>
45
+        <View className='tips'>
46
+          <View>看看周边推荐</View>
47
+          <View className='goindex' onClick={goIndex}>戳我快速查看
48
+            <View className='arrow'><View className='v1'></View><View className='v2'></View></View></View>
49
+        </View>
50
+        <View>
51
+          <Button className='cancel' onClick={handelClose}>取消</Button>
52
+          <Button className='btn' onClick={handelShare} loading={loading} disabled={loading}>确定</Button>
53
+        </View>
54
+      </View>
55
+    </Popup>
56
+  )
57
+}

+ 73
- 0
src/pages/Travel/customizedTravel/components/ThreeModel/style.less Ver arquivo

@@ -0,0 +1,73 @@
1
+.from-room{
2
+  padding-top: 60px;
3
+}
4
+.srl{
5
+  font-size: 30px;
6
+  font-weight: bold;
7
+  color: #202020;  
8
+  .mg{
9
+    font-size: 38px;
10
+    margin: 0 20px 50px 20px;
11
+  }
12
+  .rzline{
13
+    border-top: 2px #999 dashed;
14
+    height: 2px;
15
+    width: 80px;
16
+    display: inline-block;
17
+    margin-bottom: 8px;
18
+  }
19
+   .tips{
20
+    font-size: 30px;
21
+    font-weight: bold;
22
+    color: #333333;
23
+    letter-spacing: 5px; 
24
+    line-height: 50px;   
25
+    margin: 40px 0;
26
+    .goindex{
27
+      color: #274291;
28
+      position: relative;
29
+    }
30
+    .arrow{
31
+      position: absolute;
32
+      right: 150px;
33
+      top: 12px;  
34
+      .v1{
35
+        width: 0;
36
+        height: 0;
37
+        border: 15px solid transparent;
38
+        border-left-color: #274291;
39
+      }
40
+      .v2{
41
+        width: 0;
42
+        height: 0;
43
+        border: 15px solid transparent;
44
+        border-left-color: #fff;
45
+        position: absolute;
46
+        bottom: 0;
47
+        left: -5px;
48
+      }
49
+    }
50
+   }
51
+  .cancel{
52
+    color: #274290;
53
+    display: inline-block;
54
+    margin: 20px 20px 0 0;
55
+    width: 236px;
56
+    height: 78px;
57
+    line-height: 78px;
58
+    border: 2px solid #274190;
59
+    border-radius: 12px;
60
+  }
61
+  .btn {
62
+    width: 236px;
63
+    height: 78px;
64
+    line-height: 78px;
65
+    background: #274291;
66
+    border-radius: 12px;
67
+    display: inline-block;
68
+    color: #fff;
69
+  }
70
+}
71
+
72
+  
73
+  

+ 57
- 0
src/pages/Travel/customizedTravel/components/TipModel/index.jsx Ver arquivo

@@ -0,0 +1,57 @@
1
+import React, { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { Input, Button, View, Label } from '@tarojs/components'
4
+import Popup from '@/components/Popup'
5
+import { newTravelMine } from '@/services/travel'
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+  const { showCutover, onClose, onFinish } = props
11
+  const [roomNum, setRoomNum] = useState('')
12
+  const [loading, setLoading] = useState(false)
13
+  const day = new Date();
14
+  const y = day.getFullYear();
15
+  const m = day.getMonth() + 1;
16
+  const d = day.getDate();
17
+  const handelShare = () => {
18
+
19
+    newTravelMine({ title: `我的行程一日游 ${y}-${m}-${d}` }).then(res => {
20
+      onClose()
21
+      Taro.showToast({
22
+        title: '创建成功',
23
+        icon: 'none',
24
+        duration: 2000
25
+      })
26
+      Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${res.travelId}&dayNum=${res.dayNum}` })
27
+
28
+    })
29
+
30
+
31
+  }
32
+  const handelClose = () => {
33
+    setRoomNum()
34
+    onClose()
35
+  }
36
+  const goIndex = () => {
37
+    Taro.navigateTo({ url: '/pages/index/index' })
38
+  }
39
+  return (
40
+    <Popup show={showCutover} maskClosable={showCutover} onClose={handelClose}>
41
+      <View className='from-room srl'>
42
+        <View>
43
+          <View className='rzline' /><Label className='srl mg'>温馨提示</Label><View className='rzline' />
44
+        </View>
45
+        <View className='tips'>
46
+          <View>看看周边推荐</View>
47
+          <View className='goindex' onClick={goIndex}>戳我快速查看
48
+            <View className='arrow'><View className='v1'></View><View className='v2'></View></View></View>
49
+        </View>
50
+        <View>
51
+          <Button className='cancel' onClick={handelClose}>取消</Button>
52
+          <Button className='btn' onClick={handelShare} loading={loading} disabled={loading}>确定</Button>
53
+        </View>
54
+      </View>
55
+    </Popup>
56
+  )
57
+}

+ 73
- 0
src/pages/Travel/customizedTravel/components/TipModel/style.less Ver arquivo

@@ -0,0 +1,73 @@
1
+.from-room{
2
+  padding-top: 60px;
3
+}
4
+.srl{
5
+  font-size: 30px;
6
+  font-weight: bold;
7
+  color: #202020;  
8
+  .mg{
9
+    font-size: 38px;
10
+    margin: 0 20px 50px 20px;
11
+  }
12
+  .rzline{
13
+    border-top: 2px #999 dashed;
14
+    height: 2px;
15
+    width: 80px;
16
+    display: inline-block;
17
+    margin-bottom: 8px;
18
+  }
19
+   .tips{
20
+    font-size: 30px;
21
+    font-weight: bold;
22
+    color: #333333;
23
+    letter-spacing: 5px; 
24
+    line-height: 50px;   
25
+    margin: 40px 0;
26
+    .goindex{
27
+      color: #274291;
28
+      position: relative;
29
+    }
30
+    .arrow{
31
+      position: absolute;
32
+      right: 150px;
33
+      top: 12px;  
34
+      .v1{
35
+        width: 0;
36
+        height: 0;
37
+        border: 15px solid transparent;
38
+        border-left-color: #274291;
39
+      }
40
+      .v2{
41
+        width: 0;
42
+        height: 0;
43
+        border: 15px solid transparent;
44
+        border-left-color: #fff;
45
+        position: absolute;
46
+        bottom: 0;
47
+        left: -5px;
48
+      }
49
+    }
50
+   }
51
+  .cancel{
52
+    color: #274290;
53
+    display: inline-block;
54
+    margin: 20px 20px 0 0;
55
+    width: 236px;
56
+    height: 78px;
57
+    line-height: 78px;
58
+    border: 2px solid #274190;
59
+    border-radius: 12px;
60
+  }
61
+  .btn {
62
+    width: 236px;
63
+    height: 78px;
64
+    line-height: 78px;
65
+    background: #274291;
66
+    border-radius: 12px;
67
+    display: inline-block;
68
+    color: #fff;
69
+  }
70
+}
71
+
72
+  
73
+  

+ 57
- 0
src/pages/Travel/customizedTravel/components/TwoModel/index.jsx Ver arquivo

@@ -0,0 +1,57 @@
1
+import React, { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { Input, Button, View, Label } from '@tarojs/components'
4
+import Popup from '@/components/Popup'
5
+import { newTravelMine } from '@/services/travel'
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+  const { showCutover, onClose, onFinish } = props
11
+  const [roomNum, setRoomNum] = useState('')
12
+  const [loading, setLoading] = useState(false)
13
+  const day = new Date();
14
+  const y = day.getFullYear();
15
+  const m = day.getMonth() + 1;
16
+  const d = day.getDate();
17
+  const handelShare = () => {
18
+    onClose()
19
+
20
+    newTravelMine({ title: `我的行程二日游 ${y}-${m}-${d}`, dayNum: 2 }).then(res => {
21
+      Taro.showToast({
22
+        title: '创建成功',
23
+        icon: 'none',
24
+        duration: 2000
25
+      })
26
+      Taro.navigateTo({ url: `/pages/Travel/Edit/index?id=${res.travelId}&dayNum=${res.dayNum}` })
27
+
28
+    })
29
+
30
+
31
+  }
32
+  const handelClose = () => {
33
+    setRoomNum()
34
+    onClose()
35
+  }
36
+  const goIndex = () => {
37
+    Taro.navigateTo({ url: '/pages/index/index' })
38
+  }
39
+  return (
40
+    <Popup show={showCutover} maskClosable={showCutover} onClose={handelClose}>
41
+      <View className='from-room srl'>
42
+        <View>
43
+          <View className='rzline' /><Label className='srl mg'>温馨提示</Label><View className='rzline' />
44
+        </View>
45
+        <View className='tips'>
46
+          <View>看看周边推荐</View>
47
+          <View className='goindex' onClick={goIndex}>戳我快速查看
48
+            <View className='arrow'><View className='v1'></View><View className='v2'></View></View></View>
49
+        </View>
50
+        <View>
51
+          <Button className='cancel' onClick={handelClose}>取消</Button>
52
+          <Button className='btn' onClick={handelShare} loading={loading} disabled={loading}>确定</Button>
53
+        </View>
54
+      </View>
55
+    </Popup>
56
+  )
57
+}

+ 73
- 0
src/pages/Travel/customizedTravel/components/TwoModel/style.less Ver arquivo

@@ -0,0 +1,73 @@
1
+.from-room{
2
+  padding-top: 60px;
3
+}
4
+.srl{
5
+  font-size: 30px;
6
+  font-weight: bold;
7
+  color: #202020;  
8
+  .mg{
9
+    font-size: 38px;
10
+    margin: 0 20px 50px 20px;
11
+  }
12
+  .rzline{
13
+    border-top: 2px #999 dashed;
14
+    height: 2px;
15
+    width: 80px;
16
+    display: inline-block;
17
+    margin-bottom: 8px;
18
+  }
19
+   .tips{
20
+    font-size: 30px;
21
+    font-weight: bold;
22
+    color: #333333;
23
+    letter-spacing: 5px; 
24
+    line-height: 50px;   
25
+    margin: 40px 0;
26
+    .goindex{
27
+      color: #274291;
28
+      position: relative;
29
+    }
30
+    .arrow{
31
+      position: absolute;
32
+      right: 150px;
33
+      top: 12px;  
34
+      .v1{
35
+        width: 0;
36
+        height: 0;
37
+        border: 15px solid transparent;
38
+        border-left-color: #274291;
39
+      }
40
+      .v2{
41
+        width: 0;
42
+        height: 0;
43
+        border: 15px solid transparent;
44
+        border-left-color: #fff;
45
+        position: absolute;
46
+        bottom: 0;
47
+        left: -5px;
48
+      }
49
+    }
50
+   }
51
+  .cancel{
52
+    color: #274290;
53
+    display: inline-block;
54
+    margin: 20px 20px 0 0;
55
+    width: 236px;
56
+    height: 78px;
57
+    line-height: 78px;
58
+    border: 2px solid #274190;
59
+    border-radius: 12px;
60
+  }
61
+  .btn {
62
+    width: 236px;
63
+    height: 78px;
64
+    line-height: 78px;
65
+    background: #274291;
66
+    border-radius: 12px;
67
+    display: inline-block;
68
+    color: #fff;
69
+  }
70
+}
71
+
72
+  
73
+  

+ 10
- 0
src/pages/Travel/customizedTravel/index.config.js Ver arquivo

@@ -0,0 +1,10 @@
1
+export default {
2
+  navigationBarTitleText: '定制行程',
3
+  navigationStyle: 'custom',
4
+  styleIsolation: 'shared',
5
+  enableShareAppMessage: true,
6
+  disableScroll: true,
7
+  usingComponents: {
8
+    "mp-dialog": "weui-miniprogram/dialog/dialog"
9
+  }
10
+}

+ 80
- 0
src/pages/Travel/customizedTravel/index.jsx Ver arquivo

@@ -0,0 +1,80 @@
1
+import Taro from '@tarojs/taro'
2
+import { Image, Button, View, Text } from '@tarojs/components'
3
+import React, { useState } from 'react'
4
+import CustomNav from '@/components/CustomNav'
5
+import oneDay from '@/assets/icons/Travel/oneDay.png'
6
+import twoDay from '@/assets/icons/Travel/twoDay.png'
7
+import threeDay from '@/assets/icons/Travel/threeDay.png'
8
+import custom from '@/assets/icons/Travel/custom.png'
9
+import CustomDay from './components/CustomDay/index.jsx'
10
+import TipModel from './components/TipModel/index.jsx'
11
+import TwoModel from './components/TwoModel/index.jsx'
12
+import ThreeModel from './components/ThreeModel/index.jsx'
13
+import './style.less'
14
+
15
+export default (props) => {
16
+  const [showCutover, setShowCutover] = useState(false)
17
+  const [showCutoverTip, setShowCutoverTip] = useState(false)
18
+  const [showCutoverTwo, setShowCutoverTwo] = useState(false)
19
+  const [showCutoverThree, setShowCutoverThree] = useState(false)
20
+  const onClose = () => {
21
+    setShowCutover(false)
22
+  }
23
+  const handleFinish = (val) => {
24
+
25
+  }
26
+
27
+  const handleFinish2 = (val) => {
28
+
29
+  }
30
+  const handelCustom = () => {
31
+    setShowCutover(true)
32
+  }
33
+  const onCloseTip = () => {
34
+    //关闭一日游
35
+    setShowCutoverTip(false)
36
+  }
37
+  const handelDay = () => {
38
+    //打开一日游
39
+    setShowCutoverTip(true)
40
+  }
41
+  // ------------------
42
+  const onCloseTwo = () => {
43
+    //关闭二日游
44
+    setShowCutoverTwo(false)
45
+  }
46
+  const handelTowDay = () => {
47
+    //打开二日游
48
+    setShowCutoverTwo(true)
49
+  }
50
+  // ------------------
51
+
52
+  const onCloseThree = () => {
53
+    //关闭三日游
54
+    setShowCutoverThree(false)
55
+  }
56
+  const handelThreeDay = () => {
57
+    //打开三日游
58
+    setShowCutoverThree(true)
59
+  }
60
+  return (
61
+    <View className='page-index'>
62
+      <View className='index-navbar'>
63
+        <CustomNav title='定制行程' />
64
+      </View>
65
+      <CustomDay showCutover={showCutover} onClose={onClose} onFinish={handleFinish} />
66
+      <TipModel showCutover={showCutoverTip} onClose={onCloseTip} />
67
+      <TwoModel showCutover={showCutoverTwo} onClose={onCloseTwo} />
68
+      <ThreeModel showCutover={showCutoverThree} onClose={onCloseThree} />
69
+
70
+      <View className='index-container custom'>
71
+        <View className='selectbtn'>
72
+          <Image src={oneDay} className='img' onClick={handelDay}></Image>
73
+          <Image src={twoDay} className='img' onClick={handelTowDay}></Image>
74
+          <Image src={threeDay} className='img' onClick={handelThreeDay}></Image>
75
+          <Image src={custom} className='img' onClick={handelCustom}></Image>
76
+        </View>
77
+      </View>
78
+    </View>
79
+  )
80
+}

+ 15
- 0
src/pages/Travel/customizedTravel/style.less Ver arquivo

@@ -0,0 +1,15 @@
1
+.custom{
2
+  background-image: url('https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20211101150410.png');
3
+  background-size: 100% 100%;
4
+  .selectbtn{
5
+    display: flex;
6
+    flex-direction: column;
7
+    margin: 16.89vh 10.35% 0 10.35%;
8
+    height: 46.75vh;
9
+    .img{
10
+      width: 30vw;
11
+      height: 8vw;
12
+      margin: 4.7vw auto;
13
+    }
14
+  }
15
+}

+ 9
- 0
src/pages/details/NoteDetails/index.config.js Ver arquivo

@@ -0,0 +1,9 @@
1
+export default {
2
+  navigationBarTitleText: '笔记详情',
3
+  disableScroll: true,
4
+  navigationStyle: 'custom',
5
+  usingComponents: {
6
+    // "add-tipsFood": "../../../components/add-tipsFood/index"
7
+
8
+  }
9
+}

+ 199
- 0
src/pages/details/NoteDetails/index.jsx Ver arquivo

@@ -0,0 +1,199 @@
1
+import CustomNav from '@/components/CustomNav'
2
+import ax from '@/assets/icons/housemantj/onlove.png'
3
+import dw from '@/assets/icons/housemantj/loc-o.png'
4
+import TextMentioned from '@/assets/icons/housemantj/TextMentioned.png'
5
+import NoteasICO from '@/assets/icons/housemantj/NoteasICO.png'
6
+
7
+import share from '@/assets/icons/housemantj/touristShare.png'
8
+import good from '@/assets/icons/housemantj/touristGood.png'
9
+import baozan from '@/assets/icons/housemantj/bgood.png'
10
+import weibaozan from '@/assets/icons/housemantj/unLike.png'
11
+import zhuandao from "@/assets/icons/housemantj/backTop.png";
12
+import withLayout from '@/layouts'
13
+import SpinBox from "@/components/Spin/SpinBox";
14
+import { getNoteList, getNoteID } from '@/services/note'
15
+import { getTravelMine } from '@/services/travel'
16
+
17
+import TabIcon from '@/components/HorTabbar/TabIcon'
18
+import { useState, useEffect } from 'react'
19
+import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
20
+import logo from "@/assets/icons/UserCenter/laba.png"
21
+import { Swiper, SwiperItem, Button, View, Ad, Video } from '@tarojs/components';
22
+import useSave from "@/utils/hooks/useSave"
23
+import useLike from "@/utils/hooks/useLike"
24
+import ShopNoteCard from '@/components/foodCards/ShopNoteCard/index'
25
+import Taro, { useShareAppMessage } from '@tarojs/taro'
26
+import Extend from '../components/Extend/extend'
27
+import ImageList from "../components/ImageList";
28
+
29
+import './index.less'
30
+
31
+
32
+
33
+export default withLayout((props) => {
34
+  const { router, person } = props
35
+  const { id } = props.router.params
36
+  const [detail, setDetail] = useState({})
37
+  const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
38
+  const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
39
+  const [loading, setLoading] = useState(false)
40
+  const [travelMine, setTravelMine] = useState()
41
+  //banner图集数组
42
+  const [imglist, setimglist] = useState([])
43
+  const [index, setIndex] = useState(0)
44
+  const handchange = (e) => {
45
+    setIndex(e.detail.current)
46
+  }
47
+
48
+  //本店指南
49
+  const [extend, setExtend] = useState([])
50
+
51
+  // 推荐套餐列表
52
+  const [recommend, setRecommend] = useState([])
53
+
54
+
55
+  //引导显隐
56
+  const [guidance, setGuidance] = useState('shareOff')
57
+  useEffect(() => {
58
+    if (router.params.enterType === "share") {
59
+      setGuidance('shareOn')
60
+    }
61
+  }, [router.params.enterType])
62
+  const resourceList = () => {
63
+    getNoteID(id).then((res) => {
64
+      setDetail(res)
65
+      setimglist(res.imageList || [])
66
+      setRecommend(res.wxResourceList || [])
67
+
68
+
69
+    }).catch(e => {
70
+      console.error("getNoteID错误", e)
71
+      setLoading(false)
72
+
73
+    })
74
+
75
+  }
76
+  const handelNoteList = () => {
77
+    getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
78
+      setTravelMine(e)
79
+
80
+    })
81
+
82
+  }
83
+
84
+  useEffect(() => {
85
+    //获取我的行程。
86
+
87
+    getTravelMine({ pageNum: 1, pageSize: 99, simple: true }).then(e => {
88
+      setTravelMine(e)
89
+
90
+    })
91
+
92
+    if (id) {
93
+      setLoading(true)
94
+      getNoteID(id).then((res) => {
95
+        setDetail(res)
96
+        setimglist(res.imageList || [])
97
+        setRecommend(res.wxResourceList || [])
98
+
99
+        setLoading(false)
100
+
101
+      }).catch(e => {
102
+        console.error("getNoteID错误", e)
103
+        setLoading(false)
104
+
105
+      })
106
+      getExtendContent('note', id, { pageSize: 500 }).then((res) => {
107
+        setExtend(res.records || [])
108
+        setLoading(false)
109
+
110
+      })
111
+    }
112
+  }, [id])
113
+  // 分享
114
+  useShareAppMessage(() => {
115
+    return {
116
+      title: detail.touristName,
117
+      path: `/pages/details/NoteDetails/index?id=${id}&enterType=share`,
118
+      imageUrl: detail.poster,
119
+    }
120
+  })
121
+
122
+
123
+  return (
124
+    <view className='page-index'>
125
+      {
126
+        guidance === 'shareOn' ? <view className='index-navbar'>
127
+          <add-tipsFood logo={logo} custom duration={-1} />
128
+          <CustomNav title='十公里' noback />
129
+        </view> :
130
+          <view className='index-navbar'>
131
+            <CustomNav title='十公里' />
132
+          </view>
133
+      }
134
+
135
+
136
+      <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
137
+        <scroll-view scrollY style={{ height: '100%' }}>
138
+          <view className='storeDetails'>
139
+            <View className='huadong'>
140
+              {
141
+                detail.noteType === 'image' ?
142
+                  <ImageList imglist={imglist} />
143
+                  :
144
+                  <Video
145
+                    controls
146
+                    autoplay={false}
147
+                    loop={false}
148
+                    muted={false} style={{ width: "100%", height: '200px' }} src={detail.videoUrl}
149
+                  >
150
+                  </Video>
151
+              }
152
+            </View>
153
+
154
+
155
+          </view>
156
+          <view className='jdjs'>
157
+            <view>{detail.summary}</view>
158
+            <view className='line'></view>
159
+            <view className='sc' onClick={toggleSave}>
160
+              {/* <image className='scTip' src={isSaved > 0 ? ax : good} /><text>{isSaved > 0 ? '已收藏' : '加入收藏'}</text> */}
161
+            </view>
162
+          </view>
163
+          <view class='adContainer'>
164
+            <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
165
+          </view>
166
+          <view style={{ position: 'relative', display: extend == '' ? 'none' : '' }}>
167
+            <view className='title'>
168
+              <image src={NoteasICO} />笔记详情
169
+            </view>
170
+            <View style={{ background: '#FFF' }}>
171
+              {(extend || []).map((item) => <Extend key={item} item={item} />)}
172
+            </View>
173
+          </view>
174
+          <view style={{ display: recommend == '' ? 'none' : '' }}>
175
+            <view className='title'>
176
+              <image src={TextMentioned} />文中提及
177
+            </view>
178
+            {(recommend || []).map((item) => <ShopNoteCard resourceList={resourceList} editable='1' travelMine={travelMine} key={item} item={item} det={item} handelNoteList={handelNoteList} />)}
179
+          </view>
180
+          <view className='botton'>这是我的底线</view>
181
+        </scroll-view>
182
+      </SpinBox>
183
+
184
+      <view className='index-tabber weui-tabbar' style={{ background: '#fff' }}>
185
+        <view className='weui-tabbar__item'>
186
+          <Button openType='share' className='purebtn'><TabIcon icon={share} text='分享' /></Button>
187
+        </view>
188
+        <view className='weui-tabbar__item' onClick={toggleLike}>
189
+          <TabIcon icon={isLike > 0 ? baozan : weibaozan} text={isLike > 0 ? "已爆赞" : "爆赞"} />
190
+        </view>
191
+        <view className='weui-tabbar__item' onClick={toggleSave}>
192
+          <TabIcon icon={isSaved > 0 ? ax : good} text={isSaved > 0 ? "已收藏" : "加入收藏"} />
193
+        </view>
194
+      </view>
195
+    </view>
196
+  )
197
+})
198
+
199
+

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

@@ -0,0 +1,133 @@
1
+.storeDetails {
2
+  background-color: #fff;
3
+  border-radius: 12px;
4
+  .huadong {
5
+    position: relative;
6
+    .swiper {
7
+      height: calc((100vw - 60px) * 0.6);
8
+      .storeImage {
9
+        border-radius: 22px;
10
+        width: 100%;
11
+        height: 100%;
12
+      }
13
+    }
14
+    .tpPage {
15
+      position: absolute;
16
+      right: 20px;
17
+      bottom: 20px;
18
+      background: #000000;
19
+      border-radius: 16px;
20
+      font-size: 24px;
21
+      color: #ffffff;
22
+      padding: 0 7px;
23
+      opacity: 0.4;
24
+      line-height: 32px;
25
+      padding: 7px 8px 8px 7px;
26
+      text {
27
+        opacity: 0.64;
28
+      }
29
+    }
30
+  }
31
+  .storeJs {
32
+    padding: 22px;
33
+    .introduce {
34
+      display: inline-block;
35
+      .storeName {
36
+        font-size: 32px;
37
+        font-weight: bold;
38
+        color: #020200;
39
+      }
40
+    }
41
+    .bz {
42
+      float: right;
43
+      .bzRight {
44
+        font-size: 24px;
45
+        color: #202020;
46
+        line-height: 34px;
47
+        height: 23px;
48
+      }
49
+    }
50
+    .wz {
51
+      font-size: 24px;
52
+      padding: 30rpx 0 32rpx 0;
53
+      font-weight: bold;
54
+      color: #404040;
55
+    }
56
+    .dpPosition {
57
+      position: relative;
58
+      .dwTip {
59
+        width: 48px;
60
+        height: 48px;
61
+        top: -8px;
62
+        left: -8px;
63
+        position: absolute;
64
+      }
65
+      .distance {
66
+        padding-left: 38px;
67
+        font-size: 24px;
68
+        color: #c0c8d3;
69
+        .zhuandao {
70
+          width: 14px;
71
+          height: 24px;
72
+          transform: rotate(180deg);
73
+          position: relative;
74
+          left: 8px;
75
+          top: 5px;
76
+        }
77
+      }
78
+    }
79
+  }
80
+}
81
+.jdjs {
82
+  background: #fff;
83
+  border-radius: 12px 12px 0px 0px;
84
+  padding: 30px 20px 43px 20px;
85
+  text-align: justify;
86
+  font-size: 24px;
87
+  font-weight: bold;
88
+  color: #202020;
89
+  line-height: 54px;
90
+  overflow: hidden;
91
+  margin-bottom: 20px;
92
+  .line {
93
+    height: 1px;
94
+    background: #000;
95
+    opacity: 0.1;
96
+    margin: 57px 0 42px 0;
97
+  }
98
+  .sc {
99
+    font-size: 20px;
100
+    font-weight: bold;
101
+    color: #333;
102
+    float: right;
103
+    line-height: 0;
104
+    margin-right: 4px;
105
+    .scTip {
106
+      width: 20px;
107
+      height: 20px;
108
+      margin-right: 8px;
109
+    }
110
+  }
111
+}
112
+.title {
113
+  margin: 40px 0 40px 0;
114
+  font-size: 34px;
115
+  font-weight: bold;
116
+  color: #202020;
117
+  display: flex;
118
+  align-items: center;
119
+  image {
120
+    width: 35px;
121
+    height: 35px;
122
+    margin-right: 10px;
123
+  }
124
+}
125
+
126
+.botton {
127
+  font-size: 28px;
128
+  color: #c0c8d3;
129
+  line-height: 34px;
130
+  text-align: center;
131
+  padding: 40px 0;
132
+  background-color: #f8f8f8;
133
+}

+ 62
- 0
src/pages/details/components/ImageList/index.jsx Ver arquivo

@@ -0,0 +1,62 @@
1
+import Taro from "@tarojs/taro";
2
+import { Image, Swiper, SwiperItem, View, Text } from "@tarojs/components";
3
+import { useState} from "react";
4
+import { compressImage } from '@/utils'
5
+import './style.less'
6
+
7
+//详情页面上面的滑动图集
8
+export default (props) => {
9
+  const { imglist } = props
10
+  const [swiperHeight, setSwiperHeight] = useState()
11
+  const [swiperImgHeightList, setSwiperImgHeightList] = useState([])
12
+  const [swiperImgWidthList, setSwiperImgWidthList] = useState([])
13
+  const handleImageOnLoad = (e, inx) => {
14
+    const { detail } = e;
15
+    const { height, width } = detail || {}
16
+    if (height) {
17
+      const heightList = swiperImgHeightList.slice()
18
+      heightList[inx] = height
19
+      setSwiperImgHeightList(heightList)
20
+      const widthList = swiperImgWidthList.slice()
21
+      widthList[inx] = width
22
+      setSwiperImgWidthList(widthList)
23
+      if (!swiperHeight && inx === 0) {
24
+        let { screenWidth } = Taro.getSystemInfoSync()
25
+        let nowHeight = (screenWidth - 30) * height / width
26
+        setSwiperHeight(`${nowHeight}px`)
27
+      }
28
+    }
29
+  }
30
+
31
+  const [index, setIndex] = useState(0);
32
+  const handchange = (e) => {
33
+    const inx = e.detail.current
34
+    setIndex(inx);
35
+    const height = swiperImgHeightList[inx]
36
+    const width = swiperImgWidthList[inx]
37
+    let { screenWidth } = Taro.getSystemInfoSync()
38
+    let nowHeight = (screenWidth - 30) * height / width
39
+    setSwiperHeight(nowHeight ? `${nowHeight}px` : 'auto')
40
+  };
41
+  return (
42
+    <View className='huadong'>
43
+      <Swiper
44
+        circular
45
+        className='swiper'
46
+        onChange={handchange}
47
+        style={{ height: swiperHeight }}
48
+      >
49
+        {imglist.map((item, inx) => (
50
+          <SwiperItem key={inx}>
51
+            <Image src={compressImage(item.url)} mode='widthFix' className='storeImage' onLoad={(e) => handleImageOnLoad(e, inx)} />
52
+          </SwiperItem>
53
+        ))}
54
+      </Swiper>
55
+      <View className='tpPage'>
56
+        <Text>
57
+          {index + 1}/{imglist.length}
58
+        </Text>
59
+      </View>
60
+    </View>
61
+  )
62
+}

+ 27
- 0
src/pages/details/components/ImageList/style.less Ver arquivo

@@ -0,0 +1,27 @@
1
+.huadong{    
2
+  position: relative;
3
+  .swiper {
4
+    transition: all 0.3s linear;
5
+    .storeImage {
6
+      border-radius: 22px;
7
+      width: 100%;
8
+      height: 100%;
9
+    }
10
+  }
11
+  .tpPage {
12
+    position: absolute;
13
+    right: 20px;
14
+    bottom: 20px;
15
+    background: #000000;
16
+    border-radius: 16px;
17
+    font-size: 24px;
18
+    color: #ffffff;
19
+    padding: 0 7px;
20
+    opacity: 0.4;
21
+    line-height: 32px;
22
+    padding: 7px 8px 8px 7px;
23
+    text {
24
+      opacity: 0.64;
25
+    }
26
+  }  
27
+}

+ 11
- 35
src/pages/details/foodDetails/foodDetails.jsx Ver arquivo

@@ -8,8 +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, Swiper, SwiperItem, View, Ad } from "@tarojs/components";
12
-import { compressImage } from '@/utils'
11
+import { Button, View, Ad } from "@tarojs/components";
13 12
 import Star from "@/components/Star/Star.jsx";
14 13
 import NoData from '@/components/NoData'
15 14
 import Cards from "@/components/foodCards/foodCards.jsx";
@@ -25,18 +24,18 @@ import share from "@/assets/icons/housemantj/touristShare.png";
25 24
 import good from "@/assets/icons/housemantj/touristGood.png";
26 25
 import baozan from "@/assets/icons/housemantj/bgood.png";
27 26
 import weibaozan from "@/assets/icons/housemantj/unLike.png";
27
+import logo from "@/assets/icons/UserCenter/laba.png"
28
+
28 29
 import useSave from "@/utils/hooks/useSave";
29 30
 import useLike from "@/utils/hooks/useLike";
30 31
 import Extend from "../components/Extend/extend";
31
-import logo from "./laba.png";
32
-
32
+import ImageList from "../components/ImageList";
33 33
 import "./foodDetails.less";
34 34
 
35 35
 export default withLayout((props) => {
36 36
   const { router, person, location } = props;
37 37
   const { id, subOrderId, scene } = props.router.params;
38 38
 
39
-
40 39
   useEffect(() => {
41 40
     if (id && (scene || subOrderId)) {
42 41
       getVerifyTargetList({
@@ -60,10 +59,6 @@ export default withLayout((props) => {
60 59
   const [spackage, setPackage] = useState([]);
61 60
   //banner图集数组
62 61
   const [imglist, setimglist] = useState([]);
63
-  const [index, setIndex] = useState(0);
64
-  const handchange = (e) => {
65
-    setIndex(e.detail.current);
66
-  };
67 62
 
68 63
   const [isSaved, toggleSave] = useSave(detail.isSaved, "shop", id);
69 64
   const [isLike, toggleLike] = useLike(detail.isLike, "shop", id);
@@ -143,7 +138,6 @@ export default withLayout((props) => {
143 138
   const [isScroll, setScroll] = useState(true)
144 139
   return (
145 140
     <view className='page-index'>
146
-
147 141
       {
148 142
         guidance === 'shareOn' ? <view className='index-navbar'>
149 143
           <add-tipsFood logo={logo} custom duration={-1} />
@@ -153,31 +147,13 @@ export default withLayout((props) => {
153 147
             <CustomNav title='十公里' />
154 148
           </view>
155 149
       }
156
-
157 150
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx', background: '#F8F8F8' }}>
158 151
         <scroll-view
159 152
           scrollY={isScroll}
160 153
           style={{ height: '100%' }}
161 154
         >
162 155
           <view className='storeDetails'>
163
-            <View className='huadong'>
164
-              <Swiper
165
-                circular
166
-                className='swiper'
167
-                onChange={handchange}
168
-              >
169
-                {imglist.map((item, inx) => (
170
-                  <SwiperItem key={inx}>
171
-                    <image src={compressImage(item.url)} mode='aspectFit' className='storeImage' />
172
-                  </SwiperItem>
173
-                ))}
174
-              </Swiper>
175
-              <view className='tpPage'>
176
-                <text>
177
-                  {index + 1}/{imglist.length}
178
-                </text>
179
-              </view>
180
-            </View>
156
+            <ImageList imglist={imglist} />
181 157
             <view className='storeJs'>
182 158
               <view style={{ overflow: "hidden" }}>
183 159
                 <view className='storeName'>{detail.shopName}</view>
@@ -242,8 +218,8 @@ export default withLayout((props) => {
242 218
                     <Cards scene={scene} id={id} setScroll={setScroll} subOrderId={subOrderId} key={item.packageId} editable='1' st={star} goshop='1' item={item} det={detail} />
243 219
                   ))}
244 220
                 </view>
245
-                <view class="adContainer">
246
-                  <Ad unit-id="adunit-a0f97bb7ec8ec7bb" ad-intervals="30" />
221
+                <view class='adContainer'>
222
+                  <Ad unit-id='adunit-a0f97bb7ec8ec7bb' ad-intervals='30' />
247 223
                 </view>
248 224
                 <view
249 225
                   style={{
@@ -254,10 +230,10 @@ export default withLayout((props) => {
254 230
                     <image src={titlezs} />
255 231
                     <text>本店指南</text>
256 232
                   </view>
257
-                  <View style={{background:'#FFF'}}>
258
-                  {(extend || []).map((item) => (
259
-                    <Extend key={item.extId} item={item} />
260
-                  ))}
233
+                  <View style={{ background: '#FFF' }}>
234
+                    {(extend || []).map((item) => (
235
+                      <Extend key={item.extId} item={item} />
236
+                    ))}
261 237
                   </View>
262 238
                 </view>
263 239
                 <view

+ 0
- 27
src/pages/details/foodDetails/foodDetails.less Ver arquivo

@@ -2,33 +2,6 @@
2 2
   background-color: #fff;
3 3
   border-radius: 12px;
4 4
   margin-bottom: 20px;
5
-  .huadong{    
6
-    position: relative;
7
-    .swiper {
8
-      height: calc((100vw - 60px) * 0.6);
9
-      .storeImage {
10
-        border-radius: 22px;
11
-        width: 100%;
12
-        height: 100%;
13
-      }
14
-    }
15
-    .tpPage {
16
-      position: absolute;
17
-      right: 20px;
18
-      bottom: 20px;
19
-      background: #000000;
20
-      border-radius: 16px;
21
-      font-size: 24px;
22
-      color: #ffffff;
23
-      padding: 0 7px;
24
-      opacity: 0.4;
25
-      line-height: 32px;
26
-      padding: 7px 8px 8px 7px;
27
-      text {
28
-        opacity: 0.64;
29
-      }
30
-    }  
31
-  }
32 5
   .storeJs {
33 6
     padding: 20px;
34 7
     .storeName {

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

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

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

@@ -1,34 +1,7 @@
1 1
 .storeDetails {
2 2
   background-color: #fff;
3 3
   border-radius: 12px;
4
-  margin-bottom: 20px;
5
-  .huadong{    
6
-    position: relative;
7
-    .swiper {
8
-      height: calc((100vw - 60px) * 0.6);
9
-      .storeImage {
10
-        border-radius: 22px;
11
-        width: 100%;
12
-        height: 100%;
13
-      }
14
-    }
15
-    .tpPage {
16
-      position: absolute;
17
-      right: 20px;
18
-      bottom: 20px;
19
-      background: #000000;
20
-      border-radius: 16px;
21
-      font-size: 24px;
22
-      color: #ffffff;
23
-      padding: 0 7px;
24
-      opacity: 0.4;
25
-      line-height: 32px;
26
-      padding: 7px 8px 8px 7px;
27
-      text {
28
-        opacity: 0.64;
29
-      }
30
-    }  
31
-  }
4
+  margin-bottom: 20px;  
32 5
   .storeJs {
33 6
     padding: 22px;
34 7
     .introduce {

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

@@ -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}>

+ 63
- 0
src/pages/index/components/Customized/index.jsx Ver arquivo

@@ -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
+}

+ 172
- 0
src/pages/index/components/Customized/style.less Ver arquivo

@@ -0,0 +1,172 @@
1
+.CustomizedEntrance {
2
+  width: 345px;
3
+  height: 440px;
4
+  position: relative;
5
+  top: 50px;
6
+  animation: CustomizedEntrance 3s ease 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 2.2s ease 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: 20px;
29
+}
30
+
31
+.BigPink {
32
+  width: 321px;
33
+  height: 250px;
34
+  position: relative;
35
+  left: 54px;
36
+  animation: BigPink 2.4s ease 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: -30px;
56
+  animation: LtineraryEntrance 3.5s ease-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: 80px;
68
+  top: 50px;
69
+
70
+  z-index: -1;
71
+  animation: BigYellow 2.4s ease infinite;
72
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
73
+  background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/BigYellow.png")
74
+    no-repeat;
75
+  background-size: 100% 100%;
76
+  bottom: 10px;
77
+  animation-fill-mode: both; /*播放后的状态*/
78
+}
79
+.MiniPink {
80
+  width: 135px;
81
+  height: 184px;
82
+
83
+  position: relative;
84
+  left: 0px;
85
+  animation: MiniPink 2.4s ease infinite;
86
+  animation-iteration-count: infinite; /*动作循环的次数:infinite 无限循环*/
87
+  // background: url("https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/GuideCheck/MiniPink.png")
88
+  //   no-repeat;
89
+  // background-size: 100% 100%;
90
+  animation-fill-mode: both; /*播放后的状态*/
91
+}
92
+
93
+@keyframes CustomizedEntrance {
94
+  0% {
95
+    transform: translateY(-3px);
96
+  }
97
+
98
+  50% {
99
+    transform: translateY(-50px);
100
+  }
101
+
102
+  100% {
103
+    transform: translateY(-3px);
104
+  }
105
+}
106
+
107
+@keyframes MiniYellow {
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
+@keyframes BigPink {
121
+  0% {
122
+    transform: translateX(-3px);
123
+  }
124
+
125
+  50% {
126
+    transform: translateX(-50px);
127
+  }
128
+
129
+  100% {
130
+    transform: translateX(-3px);
131
+  }
132
+}
133
+
134
+@keyframes LtineraryEntrance {
135
+  0% {
136
+    transform: translatey(-0px);
137
+  }
138
+
139
+  50% {
140
+    transform: translatey(80px);
141
+  }
142
+
143
+  100% {
144
+    transform: translatey(0px);
145
+  }
146
+}
147
+@keyframes BigYellow {
148
+  0% {
149
+    transform: translateX(-3px);
150
+  }
151
+
152
+  50% {
153
+    transform: translateX(-30px);
154
+  }
155
+
156
+  100% {
157
+    transform: translateX(-3px);
158
+  }
159
+}
160
+@keyframes MiniPink {
161
+  0% {
162
+    transform: translateY(-3px);
163
+  }
164
+
165
+  50% {
166
+    transform: translateY(-50px);
167
+  }
168
+
169
+  100% {
170
+    transform: translateY(-3px);
171
+  }
172
+}

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

@@ -0,0 +1,45 @@
1
+
2
+import { useMemo } from 'react'
3
+import Taro from '@tarojs/taro'
4
+import useSave from "@/utils/hooks/useSave"
5
+import { compressImage, random } from '@/utils'
6
+import msTip from '@/assets/icons/housemantj/foodtip.png'
7
+import mjTip from '@/assets/icons/housemantj/mjtip.png'
8
+import location from '@/assets/icons/housemantj/location.png'
9
+import onlove from '@/assets/icons/housemantj/onlove.png'
10
+import love from '@/assets/icons/housemantj/bheart.png'
11
+import VideoStart from '@/assets/icons/housemantj/VideoStart.png'
12
+
13
+import './style.less'
14
+
15
+export default (props) => {
16
+
17
+  const { className, item, style, } = props
18
+
19
+  const uqClass = useMemo(() => random('f'), [])
20
+
21
+  // const cls = useMemo(() => [className, 'contentCard', uqClass].filter(Boolean).join(' '), [className, uqClass])
22
+
23
+  const [isSaved, toggleSave] = useSave(item.isSaved, 'note', item.noteId)
24
+  const Detail = () => {
25
+
26
+    Taro.navigateTo({ url: `/pages/details/NoteDetails/index?id=${item.noteId}` });
27
+
28
+
29
+  }
30
+  return (
31
+    <view className={uqClass} style={{ overflow: 'hidden' }}>
32
+      <view className='contentCard' style={style}>
33
+        <view className='cardTop'>
34
+          <image mode='widthFix' onClick={Detail} src={compressImage(item.poster)} className='cCardimg' />
35
+          <image className='lefttips' src={item.noteType == 'video' ? VideoStart : ''} />
36
+          <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
37
+        </view>
38
+        <view className='bContent' onClick={Detail}>
39
+          <view className='cCword'>{(item.summary).toString().length > 35 ? (item.summary).substring(0, 35) + '...' : (item.summary)}</view>
40
+        </view>
41
+      </view>
42
+    </view>
43
+  )
44
+
45
+}

+ 76
- 0
src/pages/index/components/NoteCard/style.less Ver arquivo

@@ -0,0 +1,76 @@
1
+.contentCard {
2
+  background: #fff;
3
+  box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
4
+  border-radius: 24px;
5
+  overflow: hidden;
6
+  margin-bottom: 30px;
7
+  break-inside: avoid;
8
+  position: relative;
9
+  width: calc(100% - 30px);
10
+  box-sizing: border-box;
11
+  margin-left: 15px;
12
+  .cardTop {
13
+    border-radius: 24px 24px 0px 0px;
14
+    .cCardimg {
15
+      width: 100%;
16
+      border-radius: 24px 24px 0px 0px;
17
+    }
18
+    .lefttips {
19
+      width: 60px;
20
+      height: 50px;
21
+
22
+      position: absolute;
23
+      left: 40%;
24
+      top: 30%;
25
+    }
26
+    .loveharde {
27
+      width: 28px;
28
+      height: 26px;
29
+      position: absolute;
30
+      right: 20px;
31
+      top: 10px;
32
+    }
33
+  }
34
+  .bContent {
35
+    padding: 20px;
36
+    .cCword {
37
+      font-size: 24px;
38
+      font-weight: bold;
39
+      color: #404040;
40
+      text-align: justify;
41
+      padding-bottom: 40px;
42
+    }
43
+    .cCBottom {
44
+      display: flex;
45
+      .cCleft {
46
+        flex: 3;
47
+        position: relative;
48
+        padding: 40px 0 30px 0;
49
+        .cCicon {
50
+          width: 17px;
51
+          height: 21px;
52
+          position: absolute;
53
+          left: 0;
54
+          top: 48px;
55
+        }
56
+        .distance {
57
+          padding-left: 24px;
58
+          font-size: 24px;
59
+          color: #c0c8d3;
60
+        }
61
+      }
62
+      .cCright {
63
+        flex: 2;
64
+        position: relative;
65
+        padding: 40px 0 30px 0;
66
+        .price {
67
+          font-size: 24px;
68
+          color: #ff3434;
69
+          .money {
70
+            font-size: 20px;
71
+          }
72
+        }
73
+      }
74
+    }
75
+  }
76
+}

+ 0
- 1
src/pages/index/index.config.js Ver arquivo

@@ -1,7 +1,6 @@
1 1
 export default {
2 2
   navigationBarTitleText: '十公里',
3 3
   navigationStyle: 'custom',
4
-
5 4
   styleIsolation: 'shared',
6 5
   enableShareAppMessage: true,
7 6
   disableScroll: true,

+ 1
- 1
src/pages/index/tabbar.js Ver arquivo

@@ -6,7 +6,7 @@ const tabbar = [
6 6
     selectedIconPath: require('@/assets/icons/tabbar/recommend_active.png'),
7 7
   },
8 8
   {
9
-    text: '入住指引',
9
+    text: '我的指引',
10 10
     iconPath: require('@/assets/icons/tabbar/guide.png'),
11 11
     selectedIconPath: require('@/assets/icons/tabbar/guide_active.png'),
12 12
   },

+ 8
- 18
src/pages/index/tabs/Guide.jsx Ver arquivo

@@ -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' && (
@@ -169,7 +161,7 @@ export default (props) => {
169 161
               </view>
170 162
               {/* --------停车场-------- */}
171 163
               {
172
-                !taRoomContent.parkingLocation ?null:
164
+                !taRoomContent.parkingLocation ? null :
173 165
                   <view className='room-box-info-Parking'>
174 166
                     <view className='room-bi-name-Parking' >
175 167
                       <view className='room-bin-title-Parking'>停车位置</view>
@@ -185,7 +177,7 @@ export default (props) => {
185 177
               }
186 178
               {/* --------无线网-------- */}
187 179
               {
188
-                !taRoomContent.wifiName && !taRoomContent.wifiPassword ?null:
180
+                !taRoomContent.wifiName && !taRoomContent.wifiPassword ? null :
189 181
                   <view className='room-box-info-WIFIContent'>
190 182
                     <view className='room-bi-name-WIFIContent' >
191 183
                       <view className='room-bin-title-WIFIContent'>WiFi信息</view>
@@ -216,16 +208,14 @@ 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} />)}
213
+        <view className={`Guide-bottom-box ${ifroomId === 'reality' ? '' : 'Guide-bottom-two'}`}>
214
+          <Image mode='widthFix' style={{ width: '100%' }} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex} />
215
+
226 216
         </view>
227
-        <Image mode='widthFix' style={{ width: '100%' }} src='http://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/hotel_guide_help.png' onClick={goIndex} />
228 217
       </view>
218
+
229 219
     </scroll-view>
230 220
   )
231 221
 }

+ 11
- 3
src/pages/index/tabs/GuideCss/style.less Ver arquivo

@@ -3,7 +3,6 @@
3 3
 .Guide-Home-box {
4 4
   width: 94%;
5 5
   margin: auto;
6
-
7 6
   .room-box-info-ROOM {
8 7
     display: flex;
9 8
     padding: 10px;
@@ -262,7 +261,6 @@
262 261
     }
263 262
   }
264 263
   .Guide-Content-box {
265
-    margin-top: 2em;
266 264
     .title-image {
267 265
       display: flex;
268 266
       // width: 270px;
@@ -306,7 +304,17 @@
306 304
       }
307 305
     }
308 306
   }
309
-    
307
+  .Guide-bottom-box {
308
+    width: 100%;
309
+    position: absolute;
310
+    left: 0;
311
+    z-index: 9999;
312
+  }
313
+
314
+  .Guide-bottom-two {
315
+    bottom: 0vw;
316
+  }
317
+
310 318
   //攻略卡片.
311 319
   .Raiders-box-one {
312 320
     margin-bottom: 60px;

+ 0
- 0
src/pages/index/tabs/Mine.jsx Ver arquivo


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff