Pārlūkot izejas kodu

Merge branch 'master' of http://git.ycjcjy.com/xiangsong/miniapp

张延森 4 gadus atpakaļ
vecāks
revīzija
a8e55cc952

+ 1
- 1
project.config.json Parādīt failu

@@ -28,7 +28,7 @@
28 28
 		},
29 29
 		"bundle": false,
30 30
 		"useIsolateContext": true,
31
-		"useCompilerModule": true,
31
+		"useCompilerModule": false,
32 32
 		"userConfirmedUseCompilerModuleSwitch": false,
33 33
 		"useMultiFrameRuntime": false,
34 34
 		"useApiHook": true,

+ 5
- 2
src/assets/css/iconfont.css
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 10
- 6
src/assets/css/iconfont.less
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


+ 42
- 0
src/components/PrizeChangeListItem/index.css Parādīt failu

@@ -0,0 +1,42 @@
1
+.PrizeChangeListItem {
2
+  width: 100%;
3
+  position: relative;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  border-radius: 12px;
7
+  padding: 30px 0;
8
+  align-items: center;
9
+}
10
+.PrizeChangeListItem > .Img {
11
+  width: 180px;
12
+  height: 180px;
13
+  position: relative;
14
+  overflow: hidden;
15
+  background: #eee;
16
+  margin-left: 30px;
17
+  margin-right: 30px;
18
+}
19
+.PrizeChangeListItem > .Img > image {
20
+  width: 100%;
21
+  height: 100%;
22
+}
23
+.PrizeChangeListItem > .flex-item {
24
+  margin-right: 30px;
25
+}
26
+.PrizeChangeListItem > .flex-item > text {
27
+  display: block;
28
+  font-size: 24px;
29
+  overflow: hidden;
30
+  line-height: 40px;
31
+  color: #999;
32
+}
33
+.PrizeChangeListItem > .flex-item > text:first-child {
34
+  font-size: 28px;
35
+  font-weight: bold;
36
+  overflow: hidden;
37
+  text-overflow: ellipsis;
38
+  display: -webkit-box;
39
+  -webkit-box-orient: vertical;
40
+  -webkit-line-clamp: 2;
41
+  color: #333;
42
+}

+ 24
- 0
src/components/PrizeChangeListItem/index.jsx Parādīt failu

@@ -0,0 +1,24 @@
1
+import React, { } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import toolclass from '@/utils/toolclass.js'
4
+import '@/assets/css/reset.less'
5
+import '@/assets/css/iconfont.less'
6
+import './index.less'
7
+
8
+export default function PrizeChangeListItem (props) {
9
+
10
+  const { Data } = props
11
+
12
+  return (
13
+    <view className='PrizeChangeListItem flex-h'>
14
+      <view className='Img'>
15
+        <image mode='aspectFill' src={Data.image}></image>
16
+      </view>
17
+      <view className='flex-item'>
18
+        <text>{Data.targetName}</text>
19
+        <text>{Data.points}积分</text>
20
+        <text>兑换时间:{toolclass.FormatDate(Data.createDate)}</text>
21
+      </view>
22
+    </view>
23
+  )
24
+}

+ 47
- 0
src/components/PrizeChangeListItem/index.less Parādīt failu

@@ -0,0 +1,47 @@
1
+.PrizeChangeListItem {
2
+  width: 100%;
3
+  position: relative;
4
+  overflow: hidden;
5
+  background: #fff;
6
+  border-radius: 12px;
7
+  padding: 30px 0;
8
+  align-items: center;
9
+
10
+  >.Img {
11
+    width: 180px;
12
+    height: 180px;
13
+    position: relative;
14
+    overflow: hidden;
15
+    background: #eee;
16
+    margin-left: 30px;
17
+    margin-right: 30px;
18
+
19
+    >image {
20
+      width: 100%;
21
+      height: 100%;
22
+    }
23
+  }
24
+
25
+  >.flex-item {
26
+    margin-right: 30px;
27
+
28
+    >text {
29
+      display: block;
30
+      font-size: 24px;
31
+      overflow: hidden;
32
+      line-height: 40px;
33
+      color: #999;
34
+
35
+      &:first-child {
36
+        font-size: 28px;
37
+        font-weight: bold;
38
+        overflow: hidden;
39
+        text-overflow: ellipsis;
40
+        display: -webkit-box;
41
+        -webkit-box-orient: vertical;
42
+        -webkit-line-clamp: 2;
43
+        color: #333;
44
+      }
45
+    }
46
+  }
47
+}

+ 1
- 1
src/components/WuYeJiaoFei/index.jsx Parādīt failu

@@ -155,7 +155,7 @@ export default function WuYeJiaoFei () {
155 155
                     <Checkbox className='CheckBoxItem' key={`WuYeJiaoFeiItem-${index}`} value={item.id} disabled={item.billStatus !== '0'}>
156 156
                       {/* <WuYeJiaoFeiItem Data={item}></WuYeJiaoFeiItem> */}
157 157
                       <view className='flex-h'>
158
-                        <view className='flex-item'>{item.billName}</view>
158
+                        <view className='flex-item'>{item.billInvoiceExplain}</view>
159 159
                         <view className='Price'>{`${item.payPrice} 元`}</view>
160 160
                       </view>
161 161
                     </Checkbox>

+ 9
- 0
src/pages.js Parādīt failu

@@ -325,6 +325,15 @@ const Other = [
325 325
       eventType: 'other',
326 326
     }
327 327
   },
328
+  {
329
+    name: '我的-我的订单',
330
+    page: 'pages/WoDe/WoDeDingDan/index',
331
+    auth: ['avatar', 'phone'],
332
+    track: {
333
+      event: 'list',
334
+      eventType: 'other',
335
+    }
336
+  },
328 337
 ]
329 338
 
330 339
 module.exports = [

+ 24
- 23
src/pages/FuLi/ShangPinDuiHuan/index.jsx Parādīt failu

@@ -35,6 +35,7 @@ export default function ShangPinDuiHuan () {
35 35
     setDataLock(true)
36 36
     request({ ...apis.exchangeGoods, args: { id: CurrnetId } }).then(() => {
37 37
       Taro.showToast({ title: `兑换成功`, icon: 'none' })
38
+      Taro.navigateTo({ url: `/pages/WoDe/WoDeDingDan/index` })
38 39
       setDataLock(false)
39 40
     }).catch((res) => {
40 41
       Taro.showToast({ title: res, icon: 'none' })
@@ -45,35 +46,35 @@ export default function ShangPinDuiHuan () {
45 46
   return (
46 47
     <Page>
47 48
       <view className='ShangPinDuiHuan'>
48
-      <view className='Info'>
49
-        <view className='Item flex-h'>
50
-          <view className='Img'>
51
-            <image mode='aspectFill' src={GoodsDetail === null ? null : GoodsDetail.imgUrl} className='centerLabel'></image>
52
-          </view>
53
-          <view className='flex-item'>
54
-            <text>{GoodsDetail === null ? '' : GoodsDetail.goodsName}</text>
55
-            <view className='Num'>
56
-              <text>{GoodsDetail === null ? '' : GoodsDetail.totalNum}</text>
57
-              <text>人已兑换</text>
49
+        <view className='Info'>
50
+          <view className='Item flex-h'>
51
+            <view className='Img'>
52
+              <image mode='aspectFill' src={GoodsDetail === null ? null : GoodsDetail.imgUrl} className='centerLabel'></image>
58 53
             </view>
59
-            <view className='flex-h'>
60
-              <text>{GoodsDetail === null ? '' : GoodsDetail.pointPrice}</text>
61
-              <text>积分</text>
62
-              <view className='flex-item'></view>
63
-              <view className='EditNum flex-h'>
64
-                <text className='iconfont iconjian' onClick={() => { setCount(Count > 1 ? Count - 1 : 1) }}></text>
65
-                <Input type='number' value={Count} onInput={CountChange}></Input>
66
-                <text className='iconfont iconjia1' onClick={() => { setCount(Count - 0 + 1) }}></text>
54
+            <view className='flex-item'>
55
+              <text>{GoodsDetail === null ? '' : GoodsDetail.goodsName}</text>
56
+              <view className='Num'>
57
+                <text>{GoodsDetail === null ? '' : GoodsDetail.totalNum}</text>
58
+                <text>人已兑换</text>
59
+              </view>
60
+              <view className='flex-h'>
61
+                <text>{GoodsDetail === null ? '' : GoodsDetail.pointPrice}</text>
62
+                <text>积分</text>
63
+                <view className='flex-item'></view>
64
+                <view className='EditNum flex-h'>
65
+                  <text className='iconfont iconjian' onClick={() => { setCount(Count > 1 ? Count - 1 : 1) }}></text>
66
+                  <Input type='number' value={Count} onInput={CountChange}></Input>
67
+                  <text className='iconfont iconjia1' onClick={() => { setCount(Count - 0 + 1) }}></text>
68
+                </view>
67 69
               </view>
68 70
             </view>
69 71
           </view>
72
+          <view className='InfoBottom'></view>
73
+        </view>
74
+        <view className='BottomBtn'>
75
+          <text className={DataLock ? '' : 'active'} onClick={Submit}>{DataLock ? '正在提交...' : '确认兑换'}</text>
70 76
         </view>
71
-        <view className='InfoBottom'></view>
72
-      </view>
73
-      <view className='BottomBtn'>
74
-        <text className={DataLock ? '' : 'active'} onClick={Submit}>{DataLock ? '正在提交...' : '确认兑换'}</text>
75 77
       </view>
76
-    </view>
77 78
     </Page>
78 79
   )
79 80
 }

+ 9
- 6
src/pages/FuLi/ShangPinXiangQing/index.css Parādīt failu

@@ -1,9 +1,10 @@
1 1
 .ShangPinXiangQing {
2
-  width: 100%;
2
+  width: calc(100% -32rpx);
3 3
   min-height: 100%;
4 4
   position: relative;
5 5
   overflow: hidden;
6 6
   background: #f8f8f8;
7
+  padding: 0 16rpx;
7 8
 }
8 9
 .ShangPinXiangQing > .Info {
9 10
   position: relative;
@@ -12,14 +13,9 @@
12 13
 }
13 14
 .ShangPinXiangQing > .Info > .Img {
14 15
   width: 100%;
15
-  padding-bottom: 50%;
16
-  background: #ccc;
17
-  position: relative;
18
-  overflow: hidden;
19 16
 }
20 17
 .ShangPinXiangQing > .Info > .Img > image {
21 18
   width: 100%;
22
-  height: 100%;
23 19
 }
24 20
 .ShangPinXiangQing > .Info > .Title {
25 21
   padding: 20px 30px;
@@ -85,6 +81,13 @@
85 81
   color: #666;
86 82
   position: relative;
87 83
 }
84
+.ShangPinXiangQing > .Detail .Tips {
85
+  font-size: 24px;
86
+  color: #999;
87
+  line-height: 36px;
88
+  display: block;
89
+  padding: 40px 0;
90
+}
88 91
 .ShangPinXiangQing > .Detail > .BottomBtn {
89 92
   padding: 30px;
90 93
   position: relative;

+ 1
- 0
src/pages/FuLi/ShangPinXiangQing/index.jsx Parādīt failu

@@ -55,6 +55,7 @@ export default function ShangPinXiangQing () {
55 55
             <text>产品详情</text>
56 56
           </view>
57 57
           <image mode='aspectFit' src={GoodsDetail === null ? null : GoodsDetail.detailImgUrl} style={{ width: `100%` }}></image>
58
+          <text className='Tips'>免责申明:本站商品信息均来自于合作方,其真实性、准确性和合法性由信息拥有者(合作方)负责。本站不提供任何保证,并不承担任何法律责任</text>
58 59
           <view className='BottomBtn'>
59 60
             <text className='active' onClick={() => { Taro.navigateTo({ url: `/pages/FuLi/ShangPinDuiHuan/index?id=${CurrnetId}` }) }}>立即兑换</text>
60 61
           </view>

+ 9
- 0
src/pages/FuLi/ShangPinXiangQing/index.less Parādīt failu

@@ -98,6 +98,14 @@
98 98
       }
99 99
     }
100 100
 
101
+    .Tips {
102
+      font-size: 24px;
103
+      color: #999;
104
+      line-height: 36px;
105
+      display: block;
106
+      padding: 40px 0;
107
+    }
108
+
101 109
     >.BottomBtn {
102 110
       padding: 30px;
103 111
       position: relative;
@@ -112,6 +120,7 @@
112 120
         border-radius: 98px;
113 121
         text-align: center;
114 122
         display: block;
123
+
115 124
         &.active {
116 125
           background: #F35844;
117 126
         }

+ 1
- 1
src/pages/HuoDong/HuoDongSign/index.jsx Parādīt failu

@@ -29,7 +29,7 @@ export default function HuoDongDetail () {
29 29
   return (
30 30
     <Page>
31 31
       <view className='HuoDongSign'>
32
-        <image mode='widthFix' src={null}></image>
32
+        <image mode='widthFix' src='https://zhiyun-image.oss-cn-shanghai.aliyuncs.com/xiangsong/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20201218165430-min.jpg'></image>
33 33
         <view className={HasSign ? 'SignBtn' : 'SignBtn active'}>
34 34
           <view>
35 35
             <text className='centerLabel' onClick={ToSign}>{HasSign ? '已签到' : '签到'}</text>

+ 3
- 0
src/pages/WoDe/WoDeDingDan/index.config.js Parādīt failu

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '我的订单'
3
+}

+ 20
- 0
src/pages/WoDe/WoDeDingDan/index.css Parādīt failu

@@ -0,0 +1,20 @@
1
+.WoDeDingDan {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+}
8
+.WoDeDingDan .Content {
9
+  padding: 0 30px;
10
+  position: relative;
11
+  overflow: hidden;
12
+}
13
+.WoDeDingDan .Content > .ListItem {
14
+  position: relative;
15
+  overflow: hidden;
16
+  margin-bottom: 30px;
17
+}
18
+.WoDeDingDan .Content > .ListItem:first-child {
19
+  margin-top: 30px;
20
+}

+ 45
- 0
src/pages/WoDe/WoDeDingDan/index.jsx Parādīt failu

@@ -0,0 +1,45 @@
1
+import React, { useState } from 'react'
2
+import PrizeChangeListItem from '@/components/PrizeChangeListItem'
3
+import ScrollPageRefresh from '@/components/ScrollPageRefresh'
4
+import Page from '@/layouts'
5
+import '@/assets/css/reset.less'
6
+import '@/assets/css/iconfont.less'
7
+import './index.less'
8
+
9
+export default function WoDeDingDan () {
10
+
11
+  const [PageList, setPageList] = useState([])
12
+  const [IsEmpty, setIsEmpty] = useState(false)
13
+
14
+  const Refresh = (e) => { // 下拉刷新
15
+    if (e.length > 0) {
16
+      setIsEmpty(false)
17
+      setPageList(e)
18
+    } else {
19
+      setIsEmpty(true)
20
+    }
21
+  }
22
+
23
+  const Push = (e) => { // 上拉加载
24
+    setPageList(PageList.concat(e))
25
+  }
26
+
27
+
28
+  return (
29
+    <Page>
30
+      <view className='WoDeDingDan'>
31
+        <ScrollPageRefresh IsEmpty={IsEmpty} ApiName={`getUserChangePrizeList`} Refresh={Refresh} Push={Push}>
32
+          <view className='Content'>
33
+            {
34
+              PageList.map((item, index) => (
35
+                <view className='ListItem' key={`PrizeItem-${index}`}>
36
+                  <PrizeChangeListItem Data={item}></PrizeChangeListItem>
37
+                </view>
38
+              ))
39
+            }
40
+          </view>
41
+        </ScrollPageRefresh>
42
+      </view>
43
+    </Page>
44
+  )
45
+}

+ 22
- 0
src/pages/WoDe/WoDeDingDan/index.less Parādīt failu

@@ -0,0 +1,22 @@
1
+.WoDeDingDan {
2
+  width: 100%;
3
+  height: 100%;
4
+  position: relative;
5
+  background: #f8f8f8;
6
+  overflow: hidden;
7
+
8
+  .Content {
9
+    padding: 0 30px;
10
+    position: relative;
11
+    overflow: hidden;
12
+
13
+    >.ListItem {
14
+      position: relative;
15
+      overflow: hidden;
16
+      margin-bottom: 30px;
17
+      &:first-child {
18
+        margin-top: 30px;
19
+      }
20
+    }
21
+  }
22
+}

+ 2
- 1
src/pages/WoDe/index.jsx Parādīt failu

@@ -24,7 +24,8 @@ const menuGroup = [
24 24
   [
25 25
     { icon: 'iconerweima', name: '推荐二维码', id: 5, router: '/pages/WoDe/TuiJianErWeiMa/index' },
26 26
     // { icon: 'iconfenxiang', name: '推荐分享', id: 6, router: '/pages/WoDe/TuiJianFenXiang/index' },
27
-    { icon: 'iconhuodong', name: '参与活动', id: 7, router: '/pages/WoDe/WoDeHuoDong/index' }
27
+    { icon: 'iconhuodong', name: '参与活动', id: 7, router: '/pages/WoDe/WoDeHuoDong/index' },
28
+    { icon: 'icondingdan', name: '我的订单', id: 7, router: '/pages/WoDe/WoDeDingDan/index' }
28 29
   ]
29 30
 ]
30 31
 

+ 4
- 0
src/utils/api.js Parādīt failu

@@ -1,6 +1,10 @@
1 1
 const prefix = `${HOST}/api/wx`
2 2
 
3 3
 const $api = {
4
+  getUserChangePrizeList: { // 兑换商品记录
5
+    method: 'get',
6
+    url: `${prefix}/taPointsExchange`
7
+  },
4 8
   PostOwnerScore: { // 用户给生活管家评分
5 9
     method: 'post',
6 10
     url: `${prefix}/tpLifeConsultantEvaluate`