Browse Source

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

zlisen 3 years ago
parent
commit
4293ac8a92

+ 0
- 47
src/components/CollectList/AttractionsCollect/index.jsx View File

1
-import Taro from "@tarojs/taro";
2
-import { useState } from "react";
3
-import image from '@/assets/icons/ProCard/8kb.jpg'
4
-import Pay from '@/assets/icons/GuideCheck/Pay_logo.png'
5
-import SeeDetails from '@/assets/icons/GuideCheck/SeeDetails.png'
6
-
7
-import Attractions from '@/assets/icons/GuideCheck/Attractions.png'
8
-import food from '@/assets/icons/ProCard/food.png'
9
-import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
10
-import position from '@/assets/icons/GuideCheck/position_logo.png'
11
-
12
-import starOn from '@/assets/icons/housemantj/onlove.png'
13
-import starOff from '@/assets/icons/housemantj/景点爆赞.png'
14
-import './style.less'
15
-
16
-
17
-export default (props) => {
18
-
19
-  return (
20
-    <view class='wrapper'>
21
-      <view class='left-complete-one' style='padding-top: 20px;'>
22
-        <view className='title-image'>
23
-          <image className='image-1' mode='scaleToFill' src={image}></image>
24
-          <image className='image-2' src={Attractions}></image>
25
-        </view>
26
-        <view className='title-content'>
27
-          <view className='Pro-title'>
28
-            <view className='title-text'>【橘里橘啊换行啊啊啊气咖啡店】新鲜出炉啦!</view>
29
-          </view>
30
-          <text className='title-money' >¥6990元<text className='title-money-2'>门市价78元</text></text>
31
-          <view className='title-position-on'>
32
-            <image className='title-position' src={position} />
33
-            <text className='title-position-image'>南京市/秦淮区</text>
34
-            <image className='title-on' src={starOn} />
35
-          </view>
36
-        </view>
37
-      </view>
38
-      <view class='right-complete-two'>
39
-        <view className='right-content'>
40
-          <image className='right-image' src={SeeDetails} />
41
-          <view className='right-title'>查看详情</view>
42
-        </view>
43
-      </view>
44
-    </view>
45
-  )
46
-}
47
-

+ 0
- 228
src/components/CollectList/AttractionsCollect/style.less View File

1
-@whiteColor: #fff;
2
-
3
-.wrapper-tourist {
4
-  margin-top: 40px;
5
-  display: flex;
6
-  position: relative;
7
-  // margin-top: 600px;
8
-  // margin: 30px auto;
9
-  width: 700px;
10
-
11
-  // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
12
-  // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
13
-  filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
14
-  .card-box-star {
15
-    position: absolute;
16
-    width: auto;
17
-    height: 44.3px;
18
-    position: absolute;
19
-    left: 200px;
20
-    top: 28px;
21
-    font-size: 20px;
22
-    color: @whiteColor;
23
-    .card-star-image {
24
-      padding-left: 6px;
25
-      width: 21px;
26
-      height: 21px;
27
-    }
28
-    .card-star-text {
29
-      padding-left: 10px;
30
-      font-size: 20px;
31
-      color: #333;
32
-      font-weight: 700;
33
-    }
34
-  }
35
-
36
-  .left-complete-one {
37
-    padding-top: 85px;
38
-    padding-bottom: 43px;
39
-    position: relative;
40
-    display: flex;
41
-    background: @whiteColor;
42
-    background: radial-gradient(
43
-          circle at top right,
44
-          transparent 15px,
45
-          @whiteColor 0
46
-        )
47
-        top right,
48
-      radial-gradient(circle at bottom right, transparent 15px, @whiteColor 0)
49
-        bottom right;
50
-    background-size: 100% 60%;
51
-    background-repeat: no-repeat;
52
-
53
-    width: 573px;
54
-    border-radius: 15px 0px 0px 15px;
55
-    // border-radius: 12px;
56
-
57
-    align-items: center;
58
-    .left-image-1 {
59
-      width: 145px;
60
-      height: 44px;
61
-      position: absolute;
62
-      top: 22px;
63
-    }
64
-    .left-viewText {
65
-      // background-image: url(@Image-ProCard_hot);
66
-      // width: 287px;
67
-      width: auto;
68
-      height: 44.3px;
69
-      position: absolute;
70
-      left: 1px;
71
-      top: 28px;
72
-      font-size: 20px;
73
-      color: @whiteColor;
74
-    }
75
-    //图片
76
-    .title-image {
77
-      width: 145px;
78
-      margin-left: 20px;
79
-      border-radius: 24px;
80
-      overflow: hidden;
81
-      position: relative;
82
-      .image-1 {
83
-        width: 100%;
84
-        height: 145px;
85
-      }
86
-      .image-2 {
87
-        width: 89px;
88
-        height: 34px;
89
-        position: absolute;
90
-        left: 0;
91
-        top: 0;
92
-      }
93
-    }
94
-    // 商品标题
95
-    .title-content {
96
-      // padding: 84px 0 56px 20px;
97
-      padding-left: 18px;
98
-
99
-      .Pro-title {
100
-        .title-text {
101
-          width: 375px;
102
-          overflow: hidden;
103
-          text-overflow: ellipsis;
104
-          // display: -webkit-box; //必须要
105
-          -webkit-line-clamp: 1;
106
-          -webkit-box-orient: vertical;
107
-          // word-break: break-all; /* 多出文本省略号代替 */
108
-          text-align: left;
109
-          font-size: 24px;
110
-          // padding-bottom: 10px;
111
-        }
112
-      }
113
-      .title-money {
114
-        // padding-top: 34px;
115
-        font-size: 24px;
116
-        // color: red;
117
-        font-weight: 800;
118
-      }
119
-      .title-money-2 {
120
-        font-size: 18px;
121
-        color: #666;
122
-        padding-left: 10px;
123
-        text-decoration: line-through;
124
-      }
125
-
126
-      .title-time {
127
-        font-size: 24px;
128
-        // padding-top: 20px;
129
-        color: #c0c8d3;
130
-      }
131
-      .title-position-on {
132
-        display: flex;
133
-        font-size: 20px;
134
-        .title-position {
135
-          width: 18px;
136
-          height: 24px;
137
-          padding-right: 10px;
138
-          padding-top: 5px;
139
-        }
140
-        .title-position-image {
141
-          align-items: center;
142
-          font-size: 20px;
143
-          color: #333;
144
-        }
145
-        .title-on {
146
-          // margin-bottom: 10px;
147
-          padding-top: 5px;
148
-          padding-left: 40px;
149
-          width: 21px;
150
-          height: 21px;
151
-          padding-right: 10px;
152
-        }
153
-        .title-on-text {
154
-          align-items: center;
155
-
156
-          font-size: 20px;
157
-          color: #333;
158
-        }
159
-      }
160
-    }
161
-  }
162
-  // .left-complete-one:nth-child(2) {
163
-  //   background: rgb(182, 0, 0);
164
-  //   padding-top: 10px;
165
-  // }
166
-}
167
-
168
-.right-complete-two {
169
-  background: @whiteColor;
170
-  background: radial-gradient(
171
-        circle at top left,
172
-        transparent 15px,
173
-        @whiteColor 0
174
-      )
175
-      top left,
176
-    radial-gradient(circle at bottom left, transparent 15px, @whiteColor 0)
177
-      bottom left;
178
-  background-size: 100% 60%;
179
-  background-repeat: no-repeat;
180
-  width: 129px;
181
-  border-radius: 0 15px 15px 0;
182
-  position: relative;
183
-  //右面部分
184
-  .right-content {
185
-    // width: 100px;
186
-    height: 120px;
187
-    position: absolute;
188
-    top: 50%;
189
-    left: 50%;
190
-    transform: translate(-50%, -50%);
191
-    // border: 1px solid red;
192
-
193
-    .right-number {
194
-      // width: 32px;
195
-      // font-size: 20px;
196
-      // border-radius: 4px;
197
-      // border: 2px solid #999;
198
-      // margin: auto;
199
-      // text-align: center;
200
-    }
201
-    .right-image {
202
-      // float: convert();
203
-      width: 35px;
204
-      height: 34px;
205
-      margin: 0 auto;
206
-      align-items: center;
207
-      margin: auto;
208
-      padding-left: 8px;
209
-      // text-align: center;
210
-    }
211
-
212
-    .right-title {
213
-      font-weight: 700;
214
-      font-size: 24px;
215
-      padding-top: 15px;
216
-      text-align: center;
217
-    }
218
-  }
219
-}
220
-//线条
221
-.right-complete-two::after {
222
-  content: "";
223
-  position: absolute;
224
-  top: 15px;
225
-  margin: 26px auto;
226
-  height: 70%;
227
-  border-left: 1px dashed #595959;
228
-}

+ 24
- 15
src/components/List/index.jsx View File

31
     }
31
     }
32
   }
32
   }
33
 
33
 
34
-  // 联动状态, 设置查询参数
35
-  useEffect(() => {
36
-    setPayload({
37
-      ...params,
38
-      pageNum: 1,
39
-      pageSize,
40
-    })
41
-  }, [pageSize, params])
34
+  const fetchList = (queryParams) => {
35
+    if (!request) return;
42
 
36
 
43
-  // 请求数据
44
-  useEffect(() => {
45
     Taro.showLoading()
37
     Taro.showLoading()
46
     loadingRef.current = true
38
     loadingRef.current = true
47
-    request(payload).then((res) => {
39
+    request(queryParams).then((res) => {
48
       const { records, ...pageInfo } = res || {}
40
       const { records, ...pageInfo } = res || {}
49
       const lst = pageInfo.current === 1 ? records || [] : list.concat(records || [])
41
       const lst = pageInfo.current === 1 ? records || [] : list.concat(records || [])
50
       setList(lst)
42
       setList(lst)
63
         onError(err)
55
         onError(err)
64
       }
56
       }
65
     })
57
     })
58
+  }
59
+
60
+  const fetchRef = useRef()
61
+  fetchRef.current = fetchList
62
+
63
+  // 联动状态, 设置查询参数
64
+  useEffect(() => {
65
+    setPayload({
66
+      ...params || {},
67
+      pageNum: 1,
68
+      pageSize,
69
+    })
70
+  }, [pageSize, params])
71
+
72
+  // 请求数据
73
+  useEffect(() => {
74
+    fetchRef.current(payload)
66
   }, [payload])
75
   }, [payload])
67
 
76
 
68
   return (
77
   return (
71
       onScrollToLower={handleScrollToLower}
80
       onScrollToLower={handleScrollToLower}
72
       {...leftProps}
81
       {...leftProps}
73
     >
82
     >
74
-      { !render
75
-          ? props.children
76
-          : list.map((item, index) => render({ item, index }))
83
+      {!render
84
+        ? props.children
85
+        : list.map((item, index) => render({ item, index }))
77
       }
86
       }
78
-      <view className='botton' style={{display:hasMore?'none':''}}>已经到底了~</view>
87
+      <view className='botton' style={{ display: hasMore ? 'none' : '' }}>已经到底了~</view>
79
     </ScrollView>
88
     </ScrollView>
80
   )
89
   )
81
 }
90
 }

+ 2
- 2
src/components/Popup/index.jsx View File

3
 
3
 
4
 export default (props) => {
4
 export default (props) => {
5
   const { show, mask = true, onClose, maskClosable } = props
5
   const { show, mask = true, onClose, maskClosable } = props
6
-  const onClose3=()=>{
6
+  const onClose3 = () => {
7
     console.log('3333333333333333333333')
7
     console.log('3333333333333333333333')
8
   }
8
   }
9
   return (
9
   return (
10
-    <mp-dialog extClass='x-popup' buttons={[]} show={show} mask={mask} maskClosable={maskClosable} onClose={onClose3}>
10
+    <mp-dialog extClass='x-popup' buttons={[]} show={show} mask={mask} maskClosable={maskClosable} onClose={onClose}>
11
       {props.children}
11
       {props.children}
12
     </mp-dialog>
12
     </mp-dialog>
13
   )
13
   )

+ 6
- 2
src/components/ShopUnused/index.jsx View File

4
 import iconsearch from '@/assets/icons/housemantj/search.png'
4
 import iconsearch from '@/assets/icons/housemantj/search.png'
5
 import ms from '@/assets/icons/housemantj/ms3.jpg'
5
 import ms from '@/assets/icons/housemantj/ms3.jpg'
6
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
6
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
7
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
8
+
7
 import './style.less'
9
 import './style.less'
8
 
10
 
9
 
11
 
12
 
14
 
13
 
15
 
14
 
16
 
15
-  useEffect(() => {
17
+  // useEffect(() => {
18
+  //   getVerifiedOrder({ phone: '18082043755' }).then((res) => {
16
 
19
 
17
-  }, [])
20
+  //   })
21
+  // }, [])
18
 
22
 
19
   return (
23
   return (
20
     <view className='orderCard'>
24
     <view className='orderCard'>

+ 5
- 4
src/components/ShopUsed/index.jsx View File

29
   }
29
   }
30
 
30
 
31
 
31
 
32
-  useEffect(() => {
33
 
32
 
34
-  }, [])
35
 
33
 
36
   return (
34
   return (
37
     <View className='orderCard'>
35
     <View className='orderCard'>
38
       <View style={{ overflow: 'hidden' }}>
36
       <View style={{ overflow: 'hidden' }}>
39
         <View className='orderId'>订单编号:{item.orderId}</View>
37
         <View className='orderId'>订单编号:{item.orderId}</View>
40
-        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss')}</View>
38
+        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss') || ''}</View>
41
       </View>
39
       </View>
42
       <View className='order'>
40
       <View className='order'>
43
         <Image className='orderImg' src={item.poster} mode='aspectFit' />
41
         <Image className='orderImg' src={item.poster} mode='aspectFit' />
47
         </View>
45
         </View>
48
         <View className='line' />
46
         <View className='line' />
49
         <View className='phone'>客户手机:<Text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</Text>
47
         <View className='phone'>客户手机:<Text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</Text>
50
-          <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button> </View>
48
+          {
49
+            !item.isConfirmVerified && <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button>
50
+          }
51
+        </View>
51
       </View>
52
       </View>
52
     </View>
53
     </View>
53
   )
54
   )

+ 2
- 2
src/components/toggleRole/ToggleRole.jsx View File

13
 
13
 
14
 
14
 
15
 export default (props) => {
15
 export default (props) => {
16
-  const { showCutover, onClose, role } = props
16
+  const { showCutover, onClose, maskClosable, role } = props
17
   const { getRole } = useModel('person')
17
   const { getRole } = useModel('person')
18
   const goToPerson = () => {
18
   const goToPerson = () => {
19
     getRole('normal')
19
     getRole('normal')
29
     // console.log('2222222222222222222')
29
     // console.log('2222222222222222222')
30
   }
30
   }
31
   return (
31
   return (
32
-    <Popup show={showCutover} onClose={onClose2}>
32
+    <Popup show={showCutover} maskClosable={maskClosable} onClose={onClose}>
33
       <view className='User-box-sths' >
33
       <view className='User-box-sths' >
34
         <view className='User-box-selectUser'>请选择身份:</view>
34
         <view className='User-box-selectUser'>请选择身份:</view>
35
         <view className='User-box-tourist' onClick={goToPerson}>
35
         <view className='User-box-tourist' onClick={goToPerson}>

+ 0
- 6
src/pages/MineUserAll/Collect/index.jsx View File

15
 import position from '@/assets/icons/GuideCheck/position_logo.png'
15
 import position from '@/assets/icons/GuideCheck/position_logo.png'
16
 import starOn from '@/assets/icons/GuideCheck/starOn.png'
16
 import starOn from '@/assets/icons/GuideCheck/starOn.png'
17
 import starOff from '@/assets/icons/GuideCheck/starOff.png'
17
 import starOff from '@/assets/icons/GuideCheck/starOff.png'
18
-import AttractionsCollect from '@/components/CollectList/AttractionsCollect'
19
 import FoodCollect from '@/components/CollectList/FoodCollect'
18
 import FoodCollect from '@/components/CollectList/FoodCollect'
20
 
19
 
21
 
20
 
57
 
56
 
58
 
57
 
59
       </view>
58
       </view>
60
-      {/* {
61
-        collectContent.map((item, index) => {
62
-          return <AttractionsCollect key={(index)} item={item} />
63
-        })
64
 
59
 
65
-      } */}
66
       <view className='foot'>
60
       <view className='foot'>
67
         已经到底了~
61
         已经到底了~
68
       </view>
62
       </view>

+ 8
- 3
src/pages/details/mjDetails/sceneryDetails.jsx View File

24
 
24
 
25
 export default withLayout((props) => {
25
 export default withLayout((props) => {
26
   const { router, person ,location } = props
26
   const { router, person ,location } = props
27
-  const { id, distance, location2 } = props.router.params
27
+  const { id, distance, loc } = props.router.params
28
   const [detail, setDetail] = useState({})
28
   const [detail, setDetail] = useState({})
29
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
29
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
30
   const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
30
   const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
66
   }
66
   }
67
   const log = useRef('')
67
   const log = useRef('')
68
   const lat = useRef('')
68
   const lat = useRef('')
69
-
69
+  const [queryParams, setQueryParams] = useState({ location: location, pageNum: 1, pageSize: 10, typeId: '',targetId:id  })
70
+  const [nloction,setNLoction]=useState()
70
 
71
 
71
   useEffect(() => {
72
   useEffect(() => {
72
     getTouristDetail(id).then((res) => {
73
     getTouristDetail(id).then((res) => {
81
       setAllextNum(res.total)
82
       setAllextNum(res.total)
82
       setNewextNum(res.records.length)
83
       setNewextNum(res.records.length)
83
     })
84
     })
84
-    getRecommendList({ location: location }).then((res) => {
85
+    getRecommendList({ location: loc }).then((res) => {
85
       setRecommend(res || [])
86
       setRecommend(res || [])
86
     })
87
     })
88
+    getResourceList(queryParams).then((res)=>{
89
+      console.log(queryParams)
90
+      console.log(res)
91
+    })
87
   }, [])
92
   }, [])
88
   
93
   
89
   // 分享
94
   // 分享

+ 1
- 1
src/pages/index/components/Card.js View File

16
   const Detail = () => {
16
   const Detail = () => {
17
     if (item.targetType == 'tourist') {
17
     if (item.targetType == 'tourist') {
18
       let loc = item.lng + ',' + item.lat
18
       let loc = item.lng + ',' + item.lat
19
-      Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}&distance=${(item.distance / 1000).toFixed(2)}&location=${loc}` });
19
+      Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}&distance=${(item.distance / 1000).toFixed(2)}&loc=${loc}` });
20
     }
20
     }
21
     else {
21
     else {
22
       Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
22
       Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })

+ 4
- 6
src/pages/index/tabs/Mine.jsx View File

31
   const hasAvatar = !!person.avatar
31
   const hasAvatar = !!person.avatar
32
   const [orderNum, setOrderNum] = useState([])
32
   const [orderNum, setOrderNum] = useState([])
33
 
33
 
34
-  console.log('--------DefaultImage-----', DefaultImage)
35
 
34
 
36
   const ShowMoldeOn = () => {
35
   const ShowMoldeOn = () => {
37
     setShowCutover(true)
36
     setShowCutover(true)
46
   }, [])
45
   }, [])
47
 
46
 
48
 
47
 
49
-
50
   // 通过getUserProfile获取微信用户信息
48
   // 通过getUserProfile获取微信用户信息
51
   const handleGetUserProfile = () => {
49
   const handleGetUserProfile = () => {
52
     if (hasAvatar) return;
50
     if (hasAvatar) return;
115
 
113
 
116
       <view className='User-box'>
114
       <view className='User-box'>
117
         {/* 身份切换 */}
115
         {/* 身份切换 */}
118
-        <ToggleRole showCutover={showCutover} onClose={onClose} role='normal' />
116
+        <ToggleRole showCutover={showCutover} maskClosable={showCutover} onClose={onClose} role='normal' />
119
         <view className='User-info'>
117
         <view className='User-info'>
120
           <view className='User-photos-box'>
118
           <view className='User-photos-box'>
121
             <image src={person.avatar || DefaultImage} className='User-photos' />
119
             <image src={person.avatar || DefaultImage} className='User-photos' />
135
             <view className='buy-list-Paybox' onClick={handleTobePaid} >
133
             <view className='buy-list-Paybox' onClick={handleTobePaid} >
136
               <image className='buy-list-PayLogo' src={awaitPay} />
134
               <image className='buy-list-PayLogo' src={awaitPay} />
137
               <view className='buy-list-goPay'>待支付</view>
135
               <view className='buy-list-goPay'>待支付</view>
138
-              <view className='buy-list-OrderNumber'>{orderNum?.unPayNum}笔订单</view>
136
+              <view className='buy-list-OrderNumber'>{orderNum?.unPayNum || '0'}笔订单</view>
139
             </view>
137
             </view>
140
             <view className='buy-list-Paybox ' onClick={handleTobeWritten} >
138
             <view className='buy-list-Paybox ' onClick={handleTobeWritten} >
141
               <image className='buy-list-PayLogo' src={ToShop} />
139
               <image className='buy-list-PayLogo' src={ToShop} />
142
               <view className='buy-list-goPay'>待核销</view>
140
               <view className='buy-list-goPay'>待核销</view>
143
-              <view className='buy-list-OrderNumber'>{orderNum?.unVerifiedNum}个订单</view>
141
+              <view className='buy-list-OrderNumber'>{orderNum?.unVerifiedNum || '0'}个订单</view>
144
             </view>
142
             </view>
145
             <view className='buy-list-Paybox ' onClick={handleAllOrder} >
143
             <view className='buy-list-Paybox ' onClick={handleAllOrder} >
146
               <image className='buy-list-PayLogo' src={AllOrder} />
144
               <image className='buy-list-PayLogo' src={AllOrder} />
150
             <view className='buy-list-Paybox ' onClick={handleRefund} >
148
             <view className='buy-list-Paybox ' onClick={handleRefund} >
151
               <image className='buy-list-PayLogo' src={Refund} />
149
               <image className='buy-list-PayLogo' src={Refund} />
152
               <view className='buy-list-goPay'>退款/售后</view>
150
               <view className='buy-list-goPay'>退款/售后</view>
153
-              <view className='buy-list-OrderNumber'>{orderNum?.refundNum}笔订单</view>
151
+              <view className='buy-list-OrderNumber'>{orderNum?.refundNum || '0'}笔订单</view>
154
             </view>
152
             </view>
155
           </view>
153
           </view>
156
           <view className='Badge-box'>
154
           <view className='Badge-box'>

+ 1
- 1
src/pages/index/tabs/Recommend.jsx View File

76
       </view>
76
       </view>
77
 
77
 
78
       <List
78
       <List
79
-        style={{ height: 'calc(100% - 160px)' }}
79
+        style={{ height: 'calc(100% - 145px)' }}
80
         request={getResourceList}
80
         request={getResourceList}
81
         params={queryParams}
81
         params={queryParams}
82
         onDataChange={setAllList}
82
         onDataChange={setAllList}

+ 1
- 1
src/pages/searchResult/searchResult.jsx View File

79
           </mp-tabs>
79
           </mp-tabs>
80
         </view>
80
         </view>
81
         <List
81
         <List
82
-          style={{ height: 'calc(100% - 160px)' }}
82
+          style={{ height: 'calc(100% - 90px)' }}
83
           request={getResourceList}
83
           request={getResourceList}
84
           params={queryParams}
84
           params={queryParams}
85
           onDataChange={setAllList}
85
           onDataChange={setAllList}

+ 1
- 1
src/services/shopBoss.js View File

23
  * @param {*} 
23
  * @param {*} 
24
  * @returns 
24
  * @returns 
25
  */
25
  */
26
-export const getAccount = (id,) => request(`/shop/account/${id}/log`, { id })
26
+export const getAccount = (id, params) => request(`/shop/account/${id}/log`, { params })
27
 
27
 
28
 
28
 
29
 /**
29
 /**

+ 67
- 16
src/shop/components/ShopKeeper/shopKeeper.jsx View File

6
 import ShopUsed from '@/components/ShopUsed' //已核销
6
 import ShopUsed from '@/components/ShopUsed' //已核销
7
 import ShopUnused from '@/components/ShopUnused' //未核销
7
 import ShopUnused from '@/components/ShopUnused' //未核销
8
 import SearchBar from '@/components/SearchBar'
8
 import SearchBar from '@/components/SearchBar'
9
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
10
+import List from '@/components/List';
9
 
11
 
10
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
12
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
11
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
13
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
12
 import iconsearch from '@/assets/icons/housemantj/search.png'
14
 import iconsearch from '@/assets/icons/housemantj/search.png'
13
 import ms from '@/assets/icons/housemantj/ms3.jpg'
15
 import ms from '@/assets/icons/housemantj/ms3.jpg'
16
+import ToggleRole from '@/components/toggleRole/ToggleRole'
17
+
14
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
18
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
15
 import touristON from '@/assets/icons/UserCenter/touristON.png'
19
 import touristON from '@/assets/icons/UserCenter/touristON.png'
16
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
20
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
19
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
23
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
20
 import shopBossOFF from '@/assets/icons/UserCenter/shopBossOFF.png'
24
 import shopBossOFF from '@/assets/icons/UserCenter/shopBossOFF.png'
21
 import './shopKeeper.less'
25
 import './shopKeeper.less'
22
-import ToggleRole from '@/components/toggleRole/ToggleRole'
23
 
26
 
24
 
27
 
25
 export default (props) => {
28
 export default (props) => {
26
-  const { shopList, shop, onHotelChange, shopMoney, verifiedOrder, onVarified, onVarifiedTwo } = props
29
+  const { shopList, shop, onHotelChange, shopMoney, isVerified, verifiedOrder, onVarified, onVarifiedTwo, setVer } = props
27
   const shopId = shop?.shopId
30
   const shopId = shop?.shopId
28
   const [activeTab, setActiveTab] = useState(0)
31
   const [activeTab, setActiveTab] = useState(0)
29
   const { params } = useRouter()
32
   const { params } = useRouter()
30
   const { tabJump } = params || {}
33
   const { tabJump } = params || {}
31
 
34
 
35
+  const [queryParams, setQueryParams] = useState({ isVerified: isVerified, pageNum: 1, pageSize: 10, shopId: '' })
36
+
37
+
38
+
39
+
40
+  // 获取资源表信息
41
+  const [alllist, setAllList] = useState([])
42
+
32
   const [isyear, setYear] = useState(true)
43
   const [isyear, setYear] = useState(true)
33
   const [isMomth, setMonth] = useState(false)
44
   const [isMomth, setMonth] = useState(false)
34
   //小眼睛开关
45
   //小眼睛开关
72
   ]
83
   ]
73
 
84
 
74
 
85
 
86
+  //给父组件传val
75
   const handleVarified = () => {
87
   const handleVarified = () => {
76
     onVarified()
88
     onVarified()
77
   }
89
   }
78
 
90
 
79
 
91
 
80
   const onSearch = (e) => {
92
   const onSearch = (e) => {
81
-    console.log('eeeeeeeeeeeeeeeeee', e.detail.value);
93
+    const val = e.detail.value
94
+    if (val !== '') {
95
+      getVerifiedOrder({
96
+        phone: val,
97
+        pageNum: 1,
98
+        pageSize: 10,
99
+
100
+      }).then((res) => {
101
+        setVer(res)
102
+
103
+      })
104
+    } else {
105
+      getVerifiedOrder({
106
+        shopId: shopId,
107
+        pageNum: 1,
108
+        pageSize: 10,
109
+
110
+      }).then((res) => {
111
+        setVer(res)
112
+
113
+      })
114
+    }
115
+
82
   }
116
   }
83
 
117
 
84
   const [showCutover, setShowCutover] = useState(false)
118
   const [showCutover, setShowCutover] = useState(false)
135
             >
169
             >
136
             </mp-tabs>
170
             </mp-tabs>
137
           </view>
171
           </view>
138
-          {
139
-            verifiedOrder.map
140
-
141
-          }
142
           <view>
172
           <view>
143
             {/* 未核销 */}
173
             {/* 未核销 */}
144
             {activeTab === 0 &&
174
             {activeTab === 0 &&
145
               <>
175
               <>
146
-                {
147
-                  verifiedOrder.map((item, index) => {
148
-
149
-                    return <ShopUnused key={(index)} item={item} />
150
-                  })
151
-                }
176
+                <List
177
+                  style={{ height: 'calc(100% - 145px)' }}
178
+                  request={getVerifiedOrder}
179
+                  params={queryParams}
180
+                  onDataChange={setAllList}
181
+                >
182
+                  {
183
+                    alllist.map((item, index) => {
184
+
185
+                      return <ShopUnused key={(index)} item={item} />
186
+                    })
187
+                  }
188
+                </List>
152
               </>
189
               </>
190
+
153
             }
191
             }
154
             {/* 已核销 */}
192
             {/* 已核销 */}
155
             {activeTab === 1 &&
193
             {activeTab === 1 &&
156
               <>
194
               <>
157
-                {
195
+                <List
196
+                  style={{ height: 'calc(100% - 145px)' }}
197
+                  request={getVerifiedOrder}
198
+                  params={queryParams}
199
+                  onDataChange={setAllList}
200
+                >
201
+                  {
202
+                    alllist.map((item, index) => {
203
+
204
+                      return <ShopUsed verifiedOrder={verifiedOrder} key={(index)} item={item} />
205
+                    })
206
+                  }
207
+                </List>
208
+                {/* {
158
                   verifiedOrder.map((item, index) => {
209
                   verifiedOrder.map((item, index) => {
159
 
210
 
160
                     return <ShopUsed verifiedOrder={verifiedOrder} key={(index)} item={item} />
211
                     return <ShopUsed verifiedOrder={verifiedOrder} key={(index)} item={item} />
161
                   })
212
                   })
162
-                }
213
+                } */}
163
 
214
 
164
 
215
 
165
 
216
 
166
               </>
217
               </>
167
             }
218
             }
168
           </view>
219
           </view>
169
-          <view className='botton'>已经到底了~</view>
220
+          {/* <view className='botton'>已经到底了~</view> */}
170
         </scroll-view>
221
         </scroll-view>
171
       </view>
222
       </view>
172
     </view>
223
     </view>

+ 17
- 4
src/shop/components/Sparead/spreadMoney.jsx View File

2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
 import CustomNav from '@/components/CustomNav'
3
 import CustomNav from '@/components/CustomNav'
4
 import Popup from '@/components/Popup'
4
 import Popup from '@/components/Popup'
5
+import List from '@/components/List';
5
 import Picker from '@/components/Picker'
6
 import Picker from '@/components/Picker'
7
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
6
 import ShopCommission from '@/components/ShopCommission'
8
 import ShopCommission from '@/components/ShopCommission'
7
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
9
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
8
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
10
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
10
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
12
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
11
 import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
13
 import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
12
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
14
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
13
-import { getAccount } from '@/services/shopBoss'
14
 import ToggleRole from '@/components/toggleRole/ToggleRole'
15
 import ToggleRole from '@/components/toggleRole/ToggleRole'
15
 
16
 
16
 
17
 
17
 import './spreadMoney.less'
18
 import './spreadMoney.less'
18
 
19
 
20
+const getList = (id) => (params) => getAccount(id, params)
21
+
19
 export default (props) => {
22
 export default (props) => {
20
   const { shopList, shop, onHotelChange, shopMoney } = props
23
   const { shopList, shop, onHotelChange, shopMoney } = props
21
   const [showCutover, setShowCutover] = useState(false)
24
   const [showCutover, setShowCutover] = useState(false)
25
   const acc = shopMoney?.acc
28
   const acc = shopMoney?.acc
26
   const { accountId } = acc
29
   const { accountId } = acc
27
 
30
 
31
+  const reqestAPI = getList(accountId)
32
+
28
 
33
 
34
+  // 获取资源表信息
35
+  const [alllist, setAllList] = useState([])
29
 
36
 
30
 
37
 
31
 
38
 
92
             </view>
99
             </view>
93
           </view>
100
           </view>
94
           <view className='title'>推广收入记录</view>
101
           <view className='title'>推广收入记录</view>
95
-          {
102
+          <List
103
+            style={{ height: 'calc(100% - 145px)' }}
104
+            request={reqestAPI}
105
+            render={({ item, index }) => <ShopCommission key={(index)} item={item} />}
106
+          >
107
+          </List>
108
+          {/* {
96
             shopAccount.map((item, index) => {
109
             shopAccount.map((item, index) => {
97
               return (
110
               return (
98
                 <ShopCommission key={(index)} item={item} />
111
                 <ShopCommission key={(index)} item={item} />
99
 
112
 
100
               )
113
               )
101
             })
114
             })
102
-          }
103
-          <view className='botton'>已经到底了~</view>
115
+          } */}
116
+          {/* <view className='botton'>已经到底了~</view> */}
104
         </scroll-view>
117
         </scroll-view>
105
       </view>
118
       </view>
106
 
119
 

+ 12
- 1
src/shop/pages/spread/spreadIndex.jsx View File

39
 
39
 
40
   useEffect(() => {
40
   useEffect(() => {
41
     getShopList().then((res) => {
41
     getShopList().then((res) => {
42
+      console.log("🚀 ~ file: spreadIndex.jsx ~ line 42 ~ getShopList ~ res", res)
42
       const { shopList: list, shop: current } = res
43
       const { shopList: list, shop: current } = res
43
       setShopList(list)
44
       setShopList(list)
44
       setShop(current)
45
       setShop(current)
47
   }, [])
48
   }, [])
48
 
49
 
49
 
50
 
51
+  // 搜索核销手机号
52
+  const setVer = (e) => {
53
+    setVerifiedOrder(e.records)
54
+
55
+
56
+
57
+  }
58
+
59
+
50
   //未核销订单列表
60
   //未核销订单列表
51
   useEffect(() => {
61
   useEffect(() => {
52
     getVerifiedOrder({
62
     getVerifiedOrder({
77
   useEffect(() => {
87
   useEffect(() => {
78
     if (shopId) {
88
     if (shopId) {
79
       getShopMoney(shopId, amountType).then((e) => {
89
       getShopMoney(shopId, amountType).then((e) => {
90
+
80
         setShopMoney(e)
91
         setShopMoney(e)
81
 
92
 
82
       })
93
       })
107
     <view className='page-index'>
118
     <view className='page-index'>
108
       <CustomNav title={shop?.shopName} />
119
       <CustomNav title={shop?.shopName} />
109
       <view className='index-container'>
120
       <view className='index-container'>
110
-        {currentTab === 0 && <ShopKeeper onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
121
+        {currentTab === 0 && <ShopKeeper isVerified={isVerified} setVer={setVer} onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
111
         }
122
         }
112
         {currentTab === 1 && <Sparead shopList={shopList} shop={shop} verifiedOrder={verifiedOrder} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
123
         {currentTab === 1 && <Sparead shopList={shopList} shop={shop} verifiedOrder={verifiedOrder} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
113
       </view>
124
       </view>