소스 검색

分包,添加分销系统

黎海 1 년 전
부모
커밋
73a070851f

+ 1 - 0
config/index.js

@@ -65,6 +65,7 @@ const config = {
65 65
   h5: {
66 66
     publicPath: '/',
67 67
     staticDirectory: 'static',
68
+    esnextModules: ['taro-ui'],
68 69
     postcss: {
69 70
       autoprefixer: {
70 71
         enable: true,

+ 18 - 0
package-lock.json

@@ -7604,6 +7604,12 @@
7604 7604
                 "whatwg-url": "^7.0.0"
7605 7605
             }
7606 7606
         },
7607
+        "dayjs": {
7608
+            "version": "1.11.7",
7609
+            "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz",
7610
+            "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==",
7611
+            "dev": true
7612
+        },
7607 7613
         "de-indent": {
7608 7614
             "version": "1.0.2",
7609 7615
             "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
@@ -18473,6 +18479,18 @@
18473 18479
                 }
18474 18480
             }
18475 18481
         },
18482
+        "taro-ui": {
18483
+            "version": "3.0.0-alpha.9",
18484
+            "resolved": "https://registry.npmjs.org/taro-ui/-/taro-ui-3.0.0-alpha.9.tgz",
18485
+            "integrity": "sha512-o3M7AB9cySYvrI5KU0RFc35b3uHmRqNkIpMBEgaWY2sKB1QqpCbJLOSQFTVMe74DFLb/Ud4Kvxb9GcJ347LZOw==",
18486
+            "dev": true,
18487
+            "requires": {
18488
+                "classnames": "^2.2.6",
18489
+                "dayjs": "^1.7.7",
18490
+                "lodash": "^4.17.10",
18491
+                "prop-types": "^15.7.2"
18492
+            }
18493
+        },
18476 18494
         "term-size": {
18477 18495
             "version": "1.2.0",
18478 18496
             "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",

+ 1 - 0
package.json

@@ -75,6 +75,7 @@
75 75
         "eslint-plugin-react-hooks": "^4.2.0",
76 76
         "react-refresh": "^0.11.0",
77 77
         "stylelint": "^14.4.0",
78
+        "taro-ui": "^3.0.0-alpha.9",
78 79
         "webpack": "5.69.0"
79 80
     },
80 81
     "taroConfig": {

+ 2 - 2
project.tt.json

@@ -1,10 +1,10 @@
1 1
 {
2 2
     "miniprogramRoot": "./",
3
-    "projectname": "未来智囊",
3
+    "projectname": "AI绘画练习生",
4 4
     "appid": "tt6e291894f116667e01",
5 5
     "setting": {
6 6
         "es6": false,
7 7
         "minified": false
8 8
     },
9
-    "description": "未来智囊"
9
+    "description": "AI绘画练习生"
10 10
 }

+ 15 - 3
src/app.config.js

@@ -8,7 +8,19 @@ export default defineAppConfig({
8 8
     "pages/communityDetail/index",
9 9
     "pages/earnPoints/index",
10 10
     "pages/mine/index",
11
-
11
+    "pages/activity/index"
12
+  ],
13
+  subpackages: [
14
+    {
15
+      root: "moduleA",
16
+      name: "分包A",
17
+      pages: [
18
+        "pages/invite/index",
19
+        "pages/wallet/index",
20
+        "pages/shareCnt/index",
21
+      ]
22
+    },
23
+    
12 24
   ],
13 25
   window: {
14 26
     backgroundTextStyle: 'light',
@@ -37,10 +49,10 @@ export default defineAppConfig({
37 49
         text: "创作"
38 50
       },
39 51
       // {
40
-      //   pagePath: "pages/task/index",
52
+      //   pagePath: "pages/activity/index",
41 53
       //   iconPath: "images/nav/task.png",
42 54
       //   selectedIconPath: "images/nav/task_pin.png",
43
-      //   text: "任务"
55
+      //   text: "活动"
44 56
       // },
45 57
       {
46 58
         pagePath: "pages/mine/index",

+ 1 - 0
src/app.js

@@ -1,6 +1,7 @@
1 1
 import { Component } from 'react'
2 2
 import tool from './common/tool'
3 3
 import Taro, { getCurrentInstance } from '@tarojs/taro'
4
+// import 'taro-ui/dist/style/index.scss'
4 5
 import './app.less'
5 6
 
6 7
 class App extends Component {

BIN
src/images/nav/task.png


BIN
src/images/nav/task_pin.png


+ 5 - 0
src/moduleA/pages/invite/index.config.js

@@ -0,0 +1,5 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '邀请海报',
3
+  enableShareAppMessage: true,
4
+  enableShareTimeline: true ,
5
+})

+ 313 - 0
src/moduleA/pages/invite/index.jsx

@@ -0,0 +1,313 @@
1
+import { Component } from 'react'
2
+import { View, Swiper, SwiperItem, Image, Textarea, Canvas, Button } from '@tarojs/components'
3
+import Taro, { getCurrentInstance, CanvasContext } from '@tarojs/taro'
4
+import tool from '../../../common/tool'
5
+import TaroCanvasDrawer from '../../../component/taro-plugin-canvas';
6
+import * as api from '../../../service/index'
7
+import './index.less'
8
+
9
+export default class Task extends Component {
10
+  $instance = getCurrentInstance()
11
+  state = {
12
+
13
+    canvasImage: '',
14
+    qrCodeImg: '',
15
+    // 绘图配置文件
16
+    config: {},
17
+    // 绘制的图片
18
+    shareImage: '',
19
+    // TaroCanvasDrawer 组件状态
20
+    canvasStatus: false,
21
+    isFill: false,//是否画海报
22
+  }
23
+
24
+  componentDidMount () {
25
+
26
+  }
27
+
28
+  componentWillMount () {
29
+    this.getWxCodeImg()
30
+  }
31
+  getWxCodeImg () {
32
+    Taro.showLoading({
33
+      title: '加载中...'
34
+    })
35
+    api.getWxCodeImg({ code_from: 'bill' }).then(res => {
36
+      this.dataURLtoFile(res.data)
37
+    })
38
+  }
39
+  onShareAppMessage = (res) => {
40
+    let shareData = {
41
+      title: tool.shareTitle,
42
+      path: `/pages/index/index?c=${Taro.getStorageSync('user_id')}&s=rightTap`,
43
+      imageUrl: tool.shareImg
44
+    }
45
+    return shareData;
46
+  }
47
+
48
+  //base64转本地路径
49
+  dataURLtoFile (dataurl) {
50
+    let that = this
51
+    /// 获取到base64Data
52
+    var base64Data = dataurl;
53
+    /// 通过微信小程序自带方法将base64转为二进制去除特殊符号,再转回base64
54
+    base64Data = wx.arrayBufferToBase64(wx.base64ToArrayBuffer(base64Data));
55
+    /// 拼接请求头,data格式可以为image/png或者image/jpeg等,看需求
56
+    const base64ImgUrl = "data:image/png;base64," + base64Data;
57
+
58
+    const base64ImgData = base64ImgUrl.replace(/^data:image\/\w+;base64,/, '');
59
+    const buffer = new ArrayBuffer(base64ImgData.length);
60
+    const view = new Uint8Array(buffer);
61
+    for (let i = 0; i < base64ImgData.length; i++) {
62
+      view[i] = base64ImgData.charCodeAt(i);
63
+    }
64
+    const fileStream = wx.base64ToArrayBuffer(base64ImgData);
65
+    const filePath = wx.env.USER_DATA_PATH + '/test.png';
66
+    wx.getFileSystemManager().writeFile({
67
+      filePath: filePath,
68
+      data: fileStream,
69
+      encoding: 'binary',
70
+      success: function (res) {
71
+        console.log('writeFile success:', res, filePath);
72
+        that.setState({
73
+          qrCodeImg: filePath
74
+        }, () => {
75
+          that.canvasDrawFunc()
76
+        })
77
+      },
78
+      fail: function (res) {
79
+        console.log('保存失败')
80
+      }
81
+    })
82
+    /// 刷新数据
83
+    return base64ImgUrl;
84
+  }
85
+  download () {
86
+    this.downImg()
87
+  }
88
+  // 鉴权操作 判断是否有保存到相册的权限
89
+  // 有就直接下载 没有就弹窗提示给权限
90
+  downImg () {
91
+    Taro.getSetting({
92
+      success: res => {
93
+        if (!res.authSetting['scope.writePhotosAlbum']) {
94
+          Taro.authorize({
95
+            scope: 'scope.writePhotosAlbum',
96
+            success: () => {
97
+              this.doSaveImg()
98
+            },
99
+            fail: () => {
100
+              this.openConfirm()
101
+            }
102
+          })
103
+        } else {
104
+          this.doSaveImg()
105
+        }
106
+      }
107
+    })
108
+  }
109
+  // 生成临时路径 保存图片到手机
110
+  doSaveImg () {
111
+    Taro.downloadFile({
112
+      url: this.state.draw_infos[0].img,
113
+      success: res => {
114
+        Taro.saveImageToPhotosAlbum({
115
+          filePath: res.tempFilePath,
116
+          success: () => {
117
+            Taro.showToast({ title: '已保存到相册', icon: 'success' })
118
+          },
119
+          fail: () => {
120
+            Taro.showToast({ title: '保存失败', icon: 'none' })
121
+          }
122
+        })
123
+      }
124
+    })
125
+  }
126
+  // 权限弹窗
127
+  openConfirm () {
128
+    Taro.showModal({
129
+      content: '检测到您没有打开小程序相册权限,是否取设置打开?',
130
+      showCancel: true,
131
+      success: res => {
132
+        if (res.confirm) {
133
+          // 打开权限
134
+          Taro.openSetting({
135
+            success: res => {
136
+              this.doSaveImg()
137
+            }
138
+          })
139
+        }
140
+      }
141
+    })
142
+  }
143
+
144
+  copyPrompt () {
145
+    Taro.setClipboardData({
146
+      data: this.state.draw_data.prompt,
147
+      success: function (res) {
148
+      }
149
+    })
150
+  }
151
+
152
+  copyNegativePrompt () {
153
+    Taro.setClipboardData({
154
+      data: this.state.draw_data.negative_prompt,
155
+      success: function (res) {
156
+      }
157
+    })
158
+  }
159
+
160
+  componentDidMount () { }
161
+  //页面销毁之前调用
162
+  previewImage (item, index) {
163
+    Taro.previewImage({
164
+      current: item.img, // 当前显示图片的http链接  
165
+      urls: [`${item.img}`] // 需要预览的图片http链接列表  
166
+    })
167
+  }
168
+  // 调用绘画 => canvasStatus 置为true、同时设置config
169
+  canvasDrawFunc () {
170
+    let rssConfig = {
171
+      width: 352,
172
+      height: 526,
173
+      backgroundColor: 'rgba(255,255,255,0)',
174
+      debug: false,
175
+      pixelRatio: 3,
176
+      blocks: [
177
+      ],
178
+      images: [
179
+        {
180
+          url: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679730160667.png',
181
+          width: 352,
182
+          height: 526,
183
+          x: 0,
184
+          y: 0,
185
+          borderRadius: 12,
186
+          zIndex: 8,
187
+        },
188
+        {
189
+          url: this.state.qrCodeImg,
190
+          width: 156,
191
+          height: 156,
192
+          x: 97,
193
+          y: 131,
194
+          borderRadius: 12,
195
+          zIndex: 12,
196
+        },
197
+      ],
198
+    }
199
+    console.log('回执');
200
+    this.setState({
201
+      config: rssConfig,
202
+    }, () => {
203
+      this.setState({
204
+        isFill: true
205
+      })
206
+    })
207
+
208
+  }
209
+
210
+  // 绘制成功回调函数 (必须实现)=> 接收绘制结果、重置 TaroCanvasDrawer 状态
211
+  onCreateSuccess = (result) => {
212
+    console.log('成功', result);
213
+    const { tempFilePath, errMsg } = result;
214
+    Taro.hideLoading();
215
+
216
+    if (errMsg === 'canvasToTempFilePath:ok') {
217
+      this.setState({
218
+        shareImage: tempFilePath,
219
+        // 重置 TaroCanvasDrawer 状态,方便下一次调用
220
+        isFill: false,
221
+        config: {}
222
+      }, () => {
223
+
224
+      })
225
+      //画图成功之后打开分享
226
+      //  wx.downloadFile({
227
+      //   url: tempFilePath,
228
+      //   success: (res) => {
229
+      //     console.log('打开分享');
230
+      //     wx.showShareImageMenu({
231
+      //       path: res.tempFilePath
232
+      //     })
233
+      //   }
234
+      // })
235
+    } else {
236
+      // 重置 TaroCanvasDrawer 状态,方便下一次调用
237
+      this.setState({
238
+        isFill: false,
239
+        config: {}
240
+      })
241
+      Taro.showToast({ icon: 'none', title: errMsg || '出现错误' });
242
+      console.log(errMsg);
243
+    }
244
+    // 预览
245
+    // Taro.previewImage({
246
+    //   current: tempFilePath,
247
+    //   urls: [tempFilePath]
248
+    // })
249
+  }
250
+
251
+  // 绘制失败回调函数 (必须实现)=> 接收绘制错误信息、重置 TaroCanvasDrawer 状态
252
+  onCreateFail = (error) => {
253
+    console.log('失败');
254
+    Taro.hideLoading();
255
+    // 重置 TaroCanvasDrawer 状态,方便下一次调用
256
+    this.setState({
257
+      isFill: false,
258
+      config: {}
259
+    })
260
+    console.log(error);
261
+  }
262
+
263
+  // 保存图片至本地
264
+  saveToAlbum = () => {
265
+    const res = Taro.saveImageToPhotosAlbum({
266
+      filePath: this.state.shareImage,
267
+      success: () => {
268
+        Taro.showToast({ title: '已保存到相册', icon: 'success' })
269
+      },
270
+      fail: () => {
271
+        Taro.showToast({ title: '保存失败', icon: 'none' })
272
+      }
273
+    });
274
+  }
275
+  //分享
276
+  shareImage () {
277
+    wx.showShareImageMenu({
278
+      path: this.state.shareImage
279
+    })
280
+  }
281
+  openFill () {
282
+    this.canvasDrawFunc()
283
+  }
284
+
285
+
286
+  render () {
287
+    return (
288
+      <View className='mine'>
289
+        {
290
+          this.state.shareImage.length > 0 &&
291
+          <View className='content'>
292
+            <Image className='invite-image' src={this.state.shareImage}></Image>
293
+
294
+            <View className='console'>
295
+              <View className='inte-button' onClick={e => (this.saveToAlbum())}>保存</View>
296
+              <View className='inte-button' onClick={e => (this.shareImage())}>分享</View>
297
+            </View>
298
+          </View>
299
+        }
300
+        {
301
+          this.state.isFill &&
302
+          <View>
303
+            <TaroCanvasDrawer
304
+              config={this.state.config} // 绘制配置
305
+              onCreateSuccess={e => (this.onCreateSuccess(e))} // 绘制成功回调
306
+              onCreateFail={e => (this.onCreateFail(e))} // 绘制失败回调
307
+            />
308
+          </View>
309
+        }
310
+      </View>
311
+    )
312
+  }
313
+}

+ 25 - 0
src/moduleA/pages/invite/index.less

@@ -0,0 +1,25 @@
1
+.mine {
2
+  min-height: 100vh;
3
+  background-color: #000000;
4
+  padding: 24px;
5
+
6
+  .invite-image {
7
+    width: 100%;
8
+    height: 1052px;
9
+  }
10
+  .console{
11
+    display: flex;
12
+    justify-content: space-around;
13
+    .inte-button {
14
+      width: 216px;
15
+      height: 80px;
16
+      line-height: 80px;
17
+      background-image: linear-gradient(-45deg, #4EC3F8 0%, #0F84EC 100%);
18
+      border-radius: 40px;
19
+      font-family: PingFangSC-Regular;
20
+      font-size: 32px;
21
+      color: #FFFFFF;
22
+      text-align: center;
23
+    }
24
+  }
25
+}

+ 5 - 0
src/moduleA/pages/shareCnt/index.config.js

@@ -0,0 +1,5 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '分销明细',
3
+  enableShareAppMessage: true,
4
+  enableShareTimeline: true ,
5
+})

+ 98 - 0
src/moduleA/pages/shareCnt/index.jsx

@@ -0,0 +1,98 @@
1
+import { Component } from 'react'
2
+import { View, Text, Button, Image, scrollView, Input } from '@tarojs/components'
3
+import Taro, { } from '@tarojs/taro'
4
+import tool from '../../../common/tool'
5
+import * as api from '../../../service/index'
6
+import './index.less'
7
+
8
+export default class Mine extends Component {
9
+  state = {
10
+    all_coin: 0,
11
+    page: 1,
12
+    size: 20,
13
+    share:0,//邀请人数
14
+    total: true,
15
+    walletList: [],
16
+  }
17
+
18
+  componentDidShow () {
19
+    this.getUserShareCnt()
20
+  }
21
+  getUserShareCnt () {
22
+    api.getUserShareCnt({ page_size: this.state.size, page: this.state.page }).then(res => {
23
+      let total = true
24
+      if (res.data.data.length < this.state.size) {
25
+        total = false
26
+      }
27
+      let walletList = this.state.walletList.concat(res.data.data)
28
+      this.setState({
29
+        all_coin: res.data.all_coin,
30
+        walletList: walletList,
31
+        total: total,
32
+        share:res.data.share
33
+      })
34
+    })
35
+  }
36
+  onShareAppMessage = (res) => {
37
+    let shareData = {
38
+      title: tool.shareTitle,
39
+      path: `/pages/index/index?c=${Taro.getStorageSync('user_id')}&s=rightTap`,
40
+      imageUrl: tool.shareImg
41
+    }
42
+    return shareData;
43
+  }
44
+
45
+  onReachBottom () {
46
+    if (!this.state.total)return
47
+      this.setState({
48
+        page: this.state.page + 1
49
+      }, () => {
50
+        this.getUserShareCnt()
51
+      })
52
+  }
53
+  toBuyPage (e) {
54
+    Taro.navigateTo({
55
+      url: `/pages/earnPoints/index`
56
+    })
57
+  }
58
+
59
+  componentDidMount () { }
60
+
61
+  render () {
62
+    return (
63
+      <View className='wallet'>
64
+        <View className='user_info_div'>
65
+          <View className='user-info-top'>
66
+            <View className='user_info_txt_hit'>邀请人数</View>
67
+            <View className='user_info_money'>
68
+              <View className='user_info_txt_money'>{this.state.share}</View>
69
+              {/* <View className='user_info_btn' onClick={(e) => (this.toBuyPage(e))}  >充值点券</View> */}
70
+            </View>
71
+          </View>
72
+        </View>
73
+
74
+        <View className='wallet_detail_div'>
75
+          {
76
+            this.state.walletList.map((item, index) => (
77
+              <View className='wallet_item_list' key={index}>
78
+                <View className='wallet_item_list_left'>
79
+                  <Text className='wallet-item-title'>{item.user_name}</Text>
80
+                  {/* <Text className='wallet_item_list_hint'>{item.title}</Text> */}
81
+                </View>
82
+                <View className='wallet_item_list_right'>
83
+                  <Text className='wallet-item-title'>{item.time}</Text>
84
+                  {/* <Text className='wallet_item_list_hint'>{item.time}</Text> */}
85
+                </View>
86
+              </View>
87
+            ))
88
+          }
89
+
90
+        </View>
91
+        <View className='vallet-list-tips'>
92
+          暂无更多记录~
93
+        </View>
94
+
95
+      </View>
96
+    )
97
+  }
98
+}

+ 134 - 0
src/moduleA/pages/shareCnt/index.less

@@ -0,0 +1,134 @@
1
+.wallet {
2
+  min-height: 100vh;
3
+  // background: url('https://video-h5.fyshark.com/total_picture/1665727305169.png') no-repeat;
4
+  background-size: 100% 100%;
5
+  background-color: #041129;
6
+
7
+}
8
+
9
+.user_info_div {
10
+  width: 100%;
11
+  padding-top: 52px;
12
+  background-repeat: no-repeat;
13
+  display: flex;
14
+  background-image: url(https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679475362928.png);
15
+  // justify-content: center;
16
+  align-items: center;
17
+  position: relative;
18
+}
19
+
20
+.user-info-top {
21
+  width: 100%;
22
+  position: relative;
23
+  margin: 0 32px;
24
+  padding: 52px 52px;
25
+  margin-bottom: -12px;
26
+  // background: url('https://video-h5.fyshark.com/total_picture/1665727410365.png') no-repeat;
27
+  background-size: 100% 100%;
28
+
29
+}
30
+
31
+.wallet_detail_div {
32
+ 
33
+}
34
+
35
+.user_info_money {
36
+  width: 100%;
37
+  display: flex;
38
+  justify-content: space-between;
39
+  align-items: center;
40
+}
41
+
42
+.user_info_txt_money {
43
+  font-size: 104px;
44
+  font-family: DIN;
45
+  font-weight: bold;
46
+  color: #0F84EC;
47
+  line-height: 154px;
48
+}
49
+
50
+.user_info_txt_hit {
51
+  font-size: 28px;
52
+  font-family: PingFang SC;
53
+  font-weight: 400;
54
+  color: rgba(255, 255, 255, 0.75);;
55
+  opacity: 0.9;
56
+}
57
+
58
+.user_info_btn {
59
+  width: 200px;
60
+  height: 68px;
61
+  line-height: 68px;
62
+  text-align: center;
63
+  background-image: linear-gradient(-45deg, #4EC3F8 0%, #0F84EC 100%);
64
+  opacity: 0.8;
65
+  border-radius: 34px;
66
+  font-size: 34px;
67
+  font-family: PingFang SC;
68
+  font-weight: 400;
69
+  color: #FFFFFF;
70
+}
71
+
72
+.user_info_btn:active {
73
+  opacity: 0.6;
74
+}
75
+
76
+.wallet_item_list {
77
+  // margin: 0 26px;
78
+  width: 100%;
79
+  padding: 20px 0;
80
+  display: flex;
81
+  background: #0F1A2F;
82
+  justify-content: space-between;
83
+  margin-bottom: 2px;
84
+}
85
+
86
+.wallet_item_list_left {
87
+  margin-left: 32px;
88
+  margin-top: 8px;
89
+  display: flex;
90
+  flex-direction: column;
91
+  font-size: 24px;
92
+  color: rgba(255, 255, 255, 0.75);
93
+}
94
+
95
+.wallet-item-title {
96
+  font-size: 28px;
97
+  font-family: PingFang SC;
98
+  font-weight: 400;
99
+  color: #FFFFFF;
100
+  line-height: 36px;
101
+}
102
+
103
+.wallet_item_list_hint {
104
+  margin-top: 12px;
105
+  font-size: 24px;
106
+  font-family: PingFang SC;
107
+  font-weight: 400;
108
+  color: rgba(255, 255, 255, 0.75);
109
+  line-height: 36px;
110
+  opacity: 0.6;
111
+}
112
+
113
+.wallet_item_list_right {
114
+  margin-top: 8px;
115
+  margin-right: 32px;
116
+  display: flex;
117
+  flex-direction: column;
118
+  font-size: 24px;
119
+  color: rgba(255, 255, 255, 0.75);
120
+  text-align: right;
121
+}
122
+
123
+.vallet-list-tips {
124
+  margin-top: 60px;
125
+  padding-bottom: 100px;
126
+  width: 100%;
127
+  text-align: center;
128
+  font-size: 24px;
129
+  font-family: PingFang SC;
130
+  font-weight: 400;
131
+  color: rgba(255, 255, 255, 0.75);
132
+  line-height: 36px;
133
+  opacity: 0.6;
134
+}

+ 5 - 0
src/moduleA/pages/wallet/index.config.js

@@ -0,0 +1,5 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '点券明细',
3
+  enableShareAppMessage: true,
4
+  enableShareTimeline: true ,
5
+})

+ 99 - 0
src/moduleA/pages/wallet/index.jsx

@@ -0,0 +1,99 @@
1
+import { Component } from 'react'
2
+import { View, Text, Button, Image, scrollView, Input } from '@tarojs/components'
3
+import Taro, { } from '@tarojs/taro'
4
+import tool from '../../../common/tool'
5
+import * as api from '../../../service/index'
6
+import './index.less'
7
+
8
+export default class Mine extends Component {
9
+  state = {
10
+    all_coin: 0,
11
+    page: 1,
12
+    size: 20,
13
+    total: true,
14
+    walletList: [],
15
+  }
16
+
17
+  componentDidShow () {
18
+    this.getUserCoinDetail()
19
+  }
20
+  getUserCoinDetail () {
21
+    api.getUserCoinDetail({ page_size: this.state.size, page: this.state.page }).then(res => {
22
+      let total = true
23
+      if (res.data.data.length < this.state.size) {
24
+        total = false
25
+      }
26
+      let walletList = this.state.walletList.concat(res.data.data)
27
+      this.setState({
28
+        all_coin: res.data.all_coin,
29
+        walletList: walletList,
30
+        total: total
31
+      })
32
+    })
33
+  }
34
+  onShareAppMessage = (res) => {
35
+    let shareData = {
36
+      title: tool.shareTitle,
37
+      path: `/pages/index/index?c=${Taro.getStorageSync('user_id')}&s=rightTap`,
38
+      imageUrl: tool.shareImg
39
+    }
40
+    return shareData;
41
+  }
42
+
43
+  onReachBottom () {
44
+    if (!this.state.total)return
45
+      this.setState({
46
+        page: this.state.page + 1
47
+      }, () => {
48
+        this.getUserCoinDetail()
49
+      })
50
+  }
51
+  toBuyPage (e) {
52
+    Taro.navigateTo({
53
+      url: `/pages/earnPoints/index`
54
+    })
55
+  }
56
+
57
+  componentDidMount () { }
58
+
59
+  render () {
60
+    return (
61
+      <View className='wallet'>
62
+        <View className='user_info_div'>
63
+          <View className='user-info-top'>
64
+            <View className='user_info_txt_hit'>我的点券</View>
65
+            <View className='user_info_money'>
66
+              <View className='user_info_txt_money'>{this.state.all_coin}</View>
67
+              <View className='user_info_btn' onClick={(e) => (this.toBuyPage(e))}  >充值点券</View>
68
+            </View>
69
+          </View>
70
+        </View>
71
+
72
+        <View className='wallet_detail_div'>
73
+          {
74
+            this.state.walletList.map((item, index) => (
75
+
76
+              <View className='wallet_item_list' key={index}>
77
+                <View className='wallet_item_list_left'>
78
+                  <Text className='wallet-item-title'>{item.title}</Text>
79
+                  {/* <Text className='wallet_item_list_hint'>{item.title}</Text> */}
80
+                </View>
81
+                <View className='wallet_item_list_right'>
82
+                  <Text className='wallet-item-title'>{item.coin}</Text>
83
+                  <Text className='wallet_item_list_hint'>{item.time}</Text>
84
+                </View>
85
+
86
+              </View>
87
+
88
+            ))
89
+          }
90
+
91
+        </View>
92
+        <View className='vallet-list-tips'>
93
+          暂无更多记录~
94
+        </View>
95
+
96
+      </View>
97
+    )
98
+  }
99
+}

+ 134 - 0
src/moduleA/pages/wallet/index.less

@@ -0,0 +1,134 @@
1
+.wallet {
2
+  min-height: 100vh;
3
+  // background: url('https://video-h5.fyshark.com/total_picture/1665727305169.png') no-repeat;
4
+  background-size: 100% 100%;
5
+  background-color: #041129;
6
+
7
+}
8
+
9
+.user_info_div {
10
+  width: 100%;
11
+  padding-top: 52px;
12
+  background-repeat: no-repeat;
13
+  display: flex;
14
+  background-image: url(https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679475362928.png);
15
+  // justify-content: center;
16
+  align-items: center;
17
+  position: relative;
18
+}
19
+
20
+.user-info-top {
21
+  width: 100%;
22
+  position: relative;
23
+  margin: 0 32px;
24
+  padding: 52px 52px;
25
+  margin-bottom: -12px;
26
+  // background: url('https://video-h5.fyshark.com/total_picture/1665727410365.png') no-repeat;
27
+  background-size: 100% 100%;
28
+
29
+}
30
+
31
+.wallet_detail_div {
32
+ 
33
+}
34
+
35
+.user_info_money {
36
+  width: 100%;
37
+  display: flex;
38
+  justify-content: space-between;
39
+  align-items: center;
40
+}
41
+
42
+.user_info_txt_money {
43
+  font-size: 104px;
44
+  font-family: DIN;
45
+  font-weight: bold;
46
+  color: #0F84EC;
47
+  line-height: 154px;
48
+}
49
+
50
+.user_info_txt_hit {
51
+  font-size: 28px;
52
+  font-family: PingFang SC;
53
+  font-weight: 400;
54
+  color: rgba(255, 255, 255, 0.75);;
55
+  opacity: 0.9;
56
+}
57
+
58
+.user_info_btn {
59
+  width: 200px;
60
+  height: 68px;
61
+  line-height: 68px;
62
+  text-align: center;
63
+  background-image: linear-gradient(-45deg, #4EC3F8 0%, #0F84EC 100%);
64
+  opacity: 0.8;
65
+  border-radius: 34px;
66
+  font-size: 34px;
67
+  font-family: PingFang SC;
68
+  font-weight: 400;
69
+  color: #FFFFFF;
70
+}
71
+
72
+.user_info_btn:active {
73
+  opacity: 0.6;
74
+}
75
+
76
+.wallet_item_list {
77
+  // margin: 0 26px;
78
+  width: 100%;
79
+  padding: 20px 0;
80
+  display: flex;
81
+  background: #0F1A2F;
82
+  justify-content: space-between;
83
+  margin-bottom: 2px;
84
+}
85
+
86
+.wallet_item_list_left {
87
+  margin-left: 32px;
88
+  margin-top: 8px;
89
+  display: flex;
90
+  flex-direction: column;
91
+  font-size: 24px;
92
+  color: rgba(255, 255, 255, 0.75);
93
+}
94
+
95
+.wallet-item-title {
96
+  font-size: 28px;
97
+  font-family: PingFang SC;
98
+  font-weight: 400;
99
+  color: #FFFFFF;
100
+  line-height: 36px;
101
+}
102
+
103
+.wallet_item_list_hint {
104
+  margin-top: 12px;
105
+  font-size: 24px;
106
+  font-family: PingFang SC;
107
+  font-weight: 400;
108
+  color: rgba(255, 255, 255, 0.75);
109
+  line-height: 36px;
110
+  opacity: 0.6;
111
+}
112
+
113
+.wallet_item_list_right {
114
+  margin-top: 8px;
115
+  margin-right: 32px;
116
+  display: flex;
117
+  flex-direction: column;
118
+  font-size: 24px;
119
+  color: rgba(255, 255, 255, 0.75);
120
+  text-align: right;
121
+}
122
+
123
+.vallet-list-tips {
124
+  margin-top: 60px;
125
+  padding-bottom: 100px;
126
+  width: 100%;
127
+  text-align: center;
128
+  font-size: 24px;
129
+  font-family: PingFang SC;
130
+  font-weight: 400;
131
+  color: rgba(255, 255, 255, 0.75);
132
+  line-height: 36px;
133
+  opacity: 0.6;
134
+}

+ 5 - 0
src/pages/activity/index.config.js

@@ -0,0 +1,5 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '社区',
3
+  enableShareAppMessage: true,
4
+  enableShareTimeline: true ,
5
+})

+ 158 - 0
src/pages/activity/index.jsx

@@ -0,0 +1,158 @@
1
+import { Component } from 'react'
2
+import { View, Text, Button, Image, scrollView, Input } from '@tarojs/components'
3
+import * as api from '../../service/index'
4
+import tool from '../../common/tool'
5
+import Taro, { } from '@tarojs/taro'
6
+import './index.less'
7
+
8
+export default class collection extends Component {
9
+  state = {
10
+    tableIndex: 0,
11
+    total: false,
12
+    page: 1,
13
+    page_size: 20,
14
+    cardinalInfos: [],//基数
15
+    evenInfos: [],//偶数
16
+    type: 'hot',//hot:热门,time:最新
17
+  }
18
+
19
+  componentWillMount () {
20
+    // this.setInit(1, 'hot')
21
+  }
22
+  componentDidShow(){
23
+    this.setInit(1, 'hot')
24
+  }
25
+  setInit (page, type) {
26
+    this.setState({
27
+      total: false,//是否加载完
28
+      page: 1,
29
+      page_size: 20,
30
+      cardinalInfos: [],//基数
31
+      evenInfos: [],//偶数
32
+    })
33
+    this.getHubList(page, type)
34
+  }
35
+  onShareAppMessage = (res) => {
36
+    let shareData = {
37
+      title:tool.shareTitle,
38
+      path: `/pages/index/index?c=${Taro.getStorageSync('user_id')}&s=rightTap`,
39
+      imageUrl: tool.shareImg
40
+    }
41
+    return shareData;
42
+  }
43
+
44
+  getHubList (page, type) {
45
+    let params = {
46
+      page: page,
47
+      page_size: this.state.page_size,
48
+      otype: type
49
+    }
50
+    Taro.showLoading({
51
+      title: '加载中',
52
+    })
53
+    api.getHubList(params).then(res => {
54
+      if (res.code == 200) {
55
+        Taro.hideLoading()
56
+        let _evenInfos = res.data.filter((item, index) => {
57
+          return index % 2 == 1
58
+        })
59
+        let _cardinalInfos = res.data.filter((item, index) => {
60
+          return index % 2 == 0
61
+        })
62
+        console.log(_cardinalInfos, '_cardinalInfos');
63
+        let cardinalInfos = this.state.cardinalInfos.concat(_cardinalInfos)
64
+        let evenInfos = this.state.evenInfos.concat(_evenInfos)
65
+        this.setState({
66
+          cardinalInfos: cardinalInfos,//基数
67
+          evenInfos: evenInfos,//偶数
68
+          total: res.data.length < 20 ? true : false
69
+        })
70
+      }
71
+    })
72
+  }
73
+  onReachBottom () {
74
+    if (!this.state.total) {
75
+      this.setState({
76
+        page: this.state.page + 1
77
+      })
78
+      this.getHubList((this.state.page + 1), this.state.type)
79
+    }
80
+  }
81
+  componentDidHide () { }
82
+  changeTab (index) {
83
+    let _type = index == 0 ? 'hot' : 'time'
84
+    this.setState({
85
+      tableIndex: index,
86
+      type: _type
87
+    })
88
+    this.setInit(1, _type)
89
+  }
90
+  detail (item, index) {
91
+    console.log(item, 'item');
92
+    Taro.navigateTo({
93
+      url: `/pages/communityDetail/index?task_id=${item.id}`
94
+    })
95
+  }
96
+
97
+  render () {
98
+    return (
99
+      <View className='mine'>
100
+        <View className='table'>
101
+          <View className='table-info' onClick={e => (this.changeTab(0))} style={this.state.tableIndex == 0 ? 'font-size: 20px;color: #FFFFFF;border-bottom: 4px solid #0F84EC;' : ''}>热门</View>
102
+          <View className='table-info' onClick={e => (this.changeTab(1))} style={this.state.tableIndex == 1 ? 'font-size: 20px;color: #FFFFFF;border-bottom: 4px solid #0F84EC;' : ''}>最新</View>
103
+        </View>
104
+        <View className='image-list'>
105
+          <View className='list-left'>
106
+            {
107
+              this.state.cardinalInfos.map((item, index) => (
108
+                <View className='image-info' key={index} onClick={e => (this.detail(item, index))}>
109
+                  <View className='info-top'>
110
+                    <Image className='info-img' lazyLoad mode='widthFix' src={item.img}></Image>
111
+                  </View>
112
+                  <View className='info-bottom'>
113
+                    <View className='info-name'></View>
114
+                    <View className='info-tips'>
115
+                      <View className='info-tips-left'>
116
+                        <Image className='info-head-img' src={item.user_info.head_img}></Image>
117
+                        <View className='info-sampling'>{tool.ellipsis(item.user_info.user_name, 8)}</View>
118
+                      </View>
119
+                      <View className='info-tips-right'>
120
+                        <Image className='info-like-img' src={item.has_like == 0 ? 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679296882735.png' : 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679296893058.png'}></Image>
121
+                        <View className='like-num'>{item.like_cnt}</View>
122
+                      </View>
123
+                    </View>
124
+                  </View>
125
+                </View>
126
+              ))
127
+            }
128
+          </View>
129
+          <View className='list-right'>
130
+            {
131
+              this.state.evenInfos.map((item, index) => (
132
+                <View className='image-info' key={index} onClick={e => (this.detail(item, index))}>
133
+                  <View className='info-top'>
134
+                    <Image className='info-img' lazyLoad mode='widthFix' src={item.img}></Image>
135
+                  </View>
136
+                  <View className='info-bottom'>
137
+                    <View className='info-name'></View>
138
+                    <View className='info-tips'>
139
+                      <View className='info-tips-left'>
140
+                        <Image className='info-head-img' src={item.user_info.head_img}></Image>
141
+                        <View className='info-sampling'>{tool.ellipsis(item.user_info.user_name, 8)}</View>
142
+                      </View>
143
+                      <View className='info-tips-right'>
144
+                        <Image className='info-like-img' src={item.has_like == 0 ? 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679296882735.png' : 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679296893058.png'}></Image>
145
+                        <View className='like-num'>{item.like_cnt}</View>
146
+                      </View>
147
+                    </View>
148
+                  </View>
149
+                </View>
150
+              ))
151
+            }
152
+          </View>
153
+
154
+        </View>
155
+      </View>
156
+    )
157
+  }
158
+}

+ 95 - 0
src/pages/activity/index.less

@@ -0,0 +1,95 @@
1
+.mine {
2
+  padding: 48px 32px;
3
+  min-height: 100vh;
4
+  background-color: #041129;
5
+
6
+  .table {
7
+    display: flex;
8
+    .table-info {
9
+      font-family: PingFangSC-Regular;
10
+      font-size: 32px;
11
+      color: rgba(255, 255, 255, .75);
12
+      letter-spacing: 0;
13
+      height: 60px;
14
+      line-height: 60px;
15
+      padding: 0 10px;
16
+      margin-right: 20px;
17
+    }
18
+  }
19
+
20
+  .image-list {
21
+    margin-top: 50px;
22
+    display: flex;
23
+    justify-content: space-between;
24
+
25
+    .list-left {
26
+      width: 330px;
27
+    }
28
+
29
+    .list-right {
30
+      width: 330px;
31
+    }
32
+
33
+    .image-info {
34
+      margin-top: 20px;
35
+      border-radius: 8px;
36
+      border: 2px solid rgba(15, 132, 236, 1);
37
+
38
+      .info-top {
39
+        width: 100%;
40
+
41
+        .info-img {
42
+          width: 100%;
43
+          min-height: 360px;
44
+          display: block;
45
+        }
46
+      }
47
+
48
+      .info-bottom {
49
+        padding: 20px 22px;
50
+
51
+        .info-name {
52
+          font-family: PingFangSC-Medium;
53
+          font-size: 28px;
54
+          color: #FFFFFF;
55
+        }
56
+
57
+        .info-tips {
58
+          margin-top: 8px;
59
+          display: flex;
60
+          justify-content: space-between;
61
+          align-items: center;
62
+          font-family: PingFangSC-Regular;
63
+          font-size: 20px;
64
+          color: rgba(255, 255, 255, .75);
65
+
66
+          .info-tips-left {
67
+            display: flex;
68
+            align-items: center;
69
+          }
70
+
71
+          .info-tips-right {
72
+            display: flex;
73
+            align-items: center;
74
+          }
75
+
76
+          .info-head-img {
77
+            width: 32px;
78
+            height: 32px;
79
+          }
80
+
81
+          .info-sampling {
82
+            margin-left: 8px;
83
+          }
84
+
85
+          .info-like-img {
86
+            margin-left: 10px;
87
+            width: 28px;
88
+            height: 24px;
89
+            margin-right: 10px;
90
+          }
91
+        }
92
+      }
93
+    }
94
+  }
95
+}

+ 13 - 11
src/pages/communityDetail/index.jsx

@@ -338,10 +338,9 @@ export default class Task extends Component {
338 338
   }
339 339
 
340 340
   copyPrompt () {
341
-    Taro.setClipboardData({
342
-      data: this.state.task_info.prompt,
343
-      success: function (res) {
344
-      }
341
+    let routers = this.$instance.router.params
342
+    Taro.reLaunch({
343
+      url: `/pages/index/index?task_id=${routers.task_id}`
345 344
     })
346 345
   }
347 346
 
@@ -406,8 +405,7 @@ export default class Task extends Component {
406 405
             />
407 406
             <View className='copy'>
408 407
               <View className='copy-button' onClick={e => (this.copyPrompt())}>
409
-                <Image className='copy-icon' src='https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679017836200.png'></Image>
410
-                <View>复制</View>
408
+                <View>画同款</View>
411 409
               </View>
412 410
             </View>
413 411
 
@@ -425,10 +423,14 @@ export default class Task extends Component {
425 423
               <View className='info-title'>图片尺寸</View>
426 424
               <View className='info-text'>{this.state.task_info.img_size} </View>
427 425
             </View>
428
-            {/* <View className='draw-info'>
426
+            <View className='draw-info'>
429 427
               <View className='info-title'>图片质量</View>
430
-              <View className='info-text'>{} </View>
431
-            </View> */}
428
+              <View className='info-text'>{this.state.task_info.img_type==0?'普通':'高清'} </View>
429
+            </View>
430
+            <View className='draw-info'>
431
+              <View className='info-title'>采样方式</View>
432
+              <View className='info-text'>{this.state.task_info.sampler} </View>
433
+            </View>
432 434
           </View>
433 435
           <View className='draw-title'>绘画不要的元素</View>
434 436
           <View className='draw-text'>
@@ -440,12 +442,12 @@ export default class Task extends Component {
440 442
               maxlength='1000'
441 443
               disabled
442 444
             />
443
-            <View className='copy'>
445
+            {/* <View className='copy'>
444 446
               <View className='copy-button' onClick={e => (this.copyNegativePrompt())}>
445 447
                 <Image className='copy-icon' src='https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679017836200.png'></Image>
446 448
                 <View>复制</View>
447 449
               </View>
448
-            </View>
450
+            </View> */}
449 451
           </View>
450 452
         </View>
451 453
         <View className='func'>

+ 3 - 2
src/pages/communityDetail/index.less

@@ -18,6 +18,7 @@
18 18
     padding: 0 30px;
19 19
 
20 20
     .user-text {
21
+      margin-top: 30px;
21 22
       display: flex;
22 23
       justify-content: space-between;
23 24
       font-family: PingFangSC-Regular;
@@ -76,8 +77,8 @@
76 77
         .copy-button {
77 78
           display: flex;
78 79
           align-items: center;
79
-          border: 2px solid #0F84EC;
80
-          color: #0F84EC;
80
+          color: #FFFFFF;
81
+          background-image: linear-gradient(-45deg, #4EC3F8 0%, #0F84EC 100%);
81 82
           font-size: 24px;
82 83
           padding: 5px 20px;
83 84
           border-radius: 30px;

+ 8 - 4
src/pages/darwDetail/index.jsx

@@ -447,7 +447,7 @@ export default class Task extends Component {
447 447
           {
448 448
             this.state.draw_status != 2 &&
449 449
             <View className='banner-tips'>
450
-              预计等待{Math.floor((this.state.que_cnt - 1)*0.2+1)}分钟...
450
+              预计等待{Math.ceil((this.state.que_cnt - 1)*0.2+1)}分钟...
451 451
             </View>
452 452
           }
453 453
         </Swiper>
@@ -483,10 +483,14 @@ export default class Task extends Component {
483 483
               <View className='info-title'>图片尺寸</View>
484 484
               <View className='info-text'>{this.state.draw_data.img_size} </View>
485 485
             </View>
486
-            {/* <View className='draw-info'>
486
+            <View className='draw-info'>
487 487
               <View className='info-title'>图片质量</View>
488
-              <View className='info-text'>{} </View>
489
-            </View> */}
488
+              <View className='info-text'>{this.state.draw_data.img_type==0?'普通':'高清'} </View>
489
+            </View>
490
+            <View className='draw-info'>
491
+              <View className='info-title'>采样方式</View>
492
+              <View className='info-text'>{this.state.draw_data.sampler} </View>
493
+            </View>
490 494
           </View>
491 495
           <View className='draw-title'>绘画不要的元素</View>
492 496
           <View className='draw-text'>

+ 30 - 1
src/pages/earnPoints/index.jsx

@@ -63,6 +63,19 @@ export default class Task extends Component {
63 63
     })
64 64
   }
65 65
   finishTask (item, index) {
66
+    if (item.status != 0) return
67
+    if (item.btn_title == '去点赞') {
68
+      Taro.switchTab({
69
+        url: '/pages/collection/index'
70
+      })
71
+      return
72
+    }
73
+    if (item.btn_title == '邀请') {
74
+      Taro.navigateTo({
75
+        url: '/moduleA/pages/invite/index'
76
+      })
77
+      return
78
+    }
66 79
     api.finishTask({ task_id: item.id }).then(res => {
67 80
       if (res.code == 200) {
68 81
         this.getUserInfo()
@@ -70,6 +83,11 @@ export default class Task extends Component {
70 83
       }
71 84
     })
72 85
   }
86
+  toShareCnt () {
87
+    Taro.navigateTo({
88
+      url: '/moduleA/pages/shareCnt/index'
89
+    })
90
+  }
73 91
   //充值
74 92
   toOrder (item, index) {
75 93
     let that = this
@@ -161,7 +179,7 @@ export default class Task extends Component {
161 179
       <View className='mine'>
162 180
         <View className='banner'>
163 181
           <View className='banner-left'>
164
-            <View className='banner-title'>剩余积分:</View>
182
+            <View className='banner-title'>剩余点券:</View>
165 183
             <View className='banner-num'>{this.state.userInfo.total_coin}</View>
166 184
           </View>
167 185
           <View className='banner-right'>
@@ -181,6 +199,17 @@ export default class Task extends Component {
181 199
             ))
182 200
           }
183 201
           {
202
+            //分销用户
203
+            this.state.userInfo.p_user_id == 1 &&
204
+            <View className='register'>
205
+              <View className='register-left'>
206
+                <View className='register-title'><Image className='register-icon' src='http://video-img.fyshark.com/1680060033169%E5%88%86%E9%94%80.png' ></Image> 分销明细</View>
207
+                {/* <View className='register-tips'>{item.sub_title}</View> */}
208
+              </View>
209
+              <View className='register-right' onClick={e => (this.toShareCnt())}>查看</View>
210
+            </View>
211
+          }
212
+          {
184 213
             !this.state.isIos &&
185 214
             < View >
186 215
               <View className='contact-title'>

+ 313 - 55
src/pages/index/index.jsx

@@ -1,19 +1,21 @@
1 1
 import { Component } from 'react'
2
-import { View, Text, Button, Image, scrollView, Input, Textarea, Slider } from '@tarojs/components'
2
+import { View, Text, Button, Image, ScrollView, Input, Textarea, Slider, Block } from '@tarojs/components'
3 3
 import Taro, { getCurrentInstance } from '@tarojs/taro'
4 4
 import tool from '../../common/tool'
5
+import { AtFloatLayout } from 'taro-ui'
6
+import "taro-ui/dist/style/components/float-layout.scss";
5 7
 import * as api from '../../service/index'
6 8
 
7 9
 import './index.less'
8 10
 
9 11
 export default class Mine extends Component {
10
-
12
+  $instance = getCurrentInstance()
11 13
   state = {
12 14
     models: [],//模板
13 15
     imgSize: [],//图片尺寸
14 16
     sampling: [],//采样方式
15 17
     samplingIndex: 0,//当前选择的采样方式
16
-    loraIndex: 0,//当前选择的lora
18
+    loraIndex: 0,//当前选择的风格
17 19
     sizeIndex: 0,//当前选择的尺寸
18 20
     isOpen: false,
19 21
     value: '',//绘画描述
@@ -22,13 +24,39 @@ export default class Mine extends Component {
22 24
     sliderNum: 7,//色彩丰富度
23 25
     drawNum: 1,//图片数量
24 26
     mass: 0,//图片质量
27
+    tmplIds: [],//订阅列标
28
+    tags: [],//标签列表
29
+    tagsIndex: 0,//当前选择的主标签
30
+    isTags: false,//是否打开标签弹窗
31
+    consultImg: '',//参考图
25 32
   }
26 33
 
27 34
   componentDidShow () {
28 35
     this.getDrawIndex()
36
+    this.getWxTemplate()
37
+    this.getTagsDev()
29 38
   }
30 39
 
31
-  componentDidMount () { }
40
+  componentDidMount () {
41
+
42
+  }
43
+
44
+  getTagsDev () {
45
+    api.getTagsDev().then(res => {
46
+      if (res.code == 200) {
47
+        let _tags = res.data
48
+        _tags.forEach(item => {
49
+          item.tags.forEach(e => {
50
+            e['isSelect'] = false
51
+          })
52
+        })
53
+        console.log(_tags, '_tags');
54
+        this.setState({
55
+          tags: _tags
56
+        })
57
+      }
58
+    })
59
+  }
32 60
 
33 61
   onShareAppMessage = (res) => {
34 62
     let shareData = {
@@ -49,10 +77,65 @@ export default class Mine extends Component {
49 77
           models: res.data.models,
50 78
           imgSize: res.data.img_size,
51 79
           sampling: res.data.Sampler
80
+        }, () => {
81
+          let routers = this.$instance.router.params
82
+          console.log(routers, 'rou');
83
+          if (routers.task_id) {
84
+            Taro.showLoading({
85
+              title: '加载中',
86
+            })
87
+            this.getDrawTaskStatus()
88
+          }
52 89
         })
53 90
       }
54 91
     })
55 92
   }
93
+  //获取同款信息
94
+  getDrawTaskStatus () {
95
+    let routers = this.$instance.router.params
96
+    api.getImgDetail({ img_id: routers.task_id }).then(res => {
97
+      Taro.hideLoading()
98
+      if (res.code == 200) {
99
+        let model_id_index = 0
100
+        this.state.models.forEach((item, index) => {
101
+          if (item.id == res.data.task_info.model_id) {
102
+            model_id_index = index
103
+          }
104
+        });
105
+        let style_id_index = 0
106
+        this.state.models[model_id_index].lora_infos.forEach((item, index) => {
107
+          if (item.id == res.data.task_info.style_id) {
108
+            style_id_index = index
109
+          }
110
+        })
111
+        let _sizeIndex = 0
112
+        this.state.imgSize.forEach((item, index) => {
113
+          if (res.data.task_info.img_size == item.name) {
114
+            _sizeIndex = index
115
+          }
116
+        })
117
+        let _samplingIndex = 0
118
+        this.state.sampling.forEach((item, index) => {
119
+          if (item == res.data.task_info.sampler) {
120
+            _samplingIndex = index
121
+          }
122
+        })
123
+
124
+        //定时器不要轻易改,避免造成服务器攻击
125
+        if (res.code == 200) {
126
+          this.setState({
127
+            value: res.data.task_info.prompt,
128
+            negativeValue: res.data.task_info.negative_prompt,
129
+            modelIndex: model_id_index,
130
+            loraIndex: style_id_index,
131
+            sizeIndex: _sizeIndex,
132
+            mass: res.data.task_info.img_type,
133
+            samplingIndex: _samplingIndex
134
+          })
135
+        }
136
+      }
137
+    })
138
+  }
56 139
   getRadomPrompt () {
57 140
     api.getRadomPrompt().then(res => {
58 141
       if (res.code == 200) {
@@ -65,14 +148,14 @@ export default class Mine extends Component {
65 148
       }
66 149
     })
67 150
   }
68
-  deleteDrawText(){
151
+  deleteDrawText () {
69 152
     this.setState({
70
-      value:''
153
+      value: ''
71 154
     })
72 155
   }
73
-  deleteNegativeValue(){
156
+  deleteNegativeValue () {
74 157
     this.setState({
75
-      negativeValue:''
158
+      negativeValue: ''
76 159
     })
77 160
   }
78 161
   onInput (e) {
@@ -139,6 +222,56 @@ export default class Mine extends Component {
139 222
       mass: e
140 223
     })
141 224
   }
225
+  getWxTemplate () {
226
+    api.getWxTemplate().then(res => {
227
+      let tmplIds = []
228
+      res.data.forEach(item => {
229
+        tmplIds.push(item.template_id)
230
+      })
231
+      this.setState({
232
+        tmplIds: tmplIds
233
+      })
234
+    })
235
+  }
236
+  //订阅
237
+  subscribe (task_id) {
238
+    let that = this
239
+    console.log('订阅', this.state.tmplIds);
240
+    Taro.requestSubscribeMessage({
241
+      tmplIds: this.state.tmplIds,
242
+      success: function (item) {
243
+        console.log('订阅成功');
244
+        if (item.errMsg === 'requestSubscribeMessage:ok') {
245
+          let keys = Object.keys(item);
246
+          let tempids = [];
247
+
248
+          keys.forEach(element => {
249
+            if (item[element] == "accept") {
250
+              tempids.push(element)
251
+            }
252
+          });
253
+          console.log(tempids, 'tempidstempids');
254
+          let pramas = {
255
+            task_id: task_id,
256
+            template_ids: tempids
257
+          }
258
+          api.subscribeTemplate(pramas)
259
+        }
260
+        Taro.showToast({
261
+          title: '已订阅',
262
+          icon: 'none',
263
+          duration: 2000
264
+        })
265
+      },
266
+
267
+      complete: function (res) {
268
+      },
269
+
270
+      fail: function (res) {
271
+      }
272
+
273
+    })
274
+  }
142 275
   //生成图片
143 276
   generatePictures () {
144 277
     Taro.showLoading({
@@ -147,44 +280,124 @@ export default class Mine extends Component {
147 280
 
148 281
     console.log('生成图片');
149 282
     console.log();
150
-    setTimeout(() => {
151
-      if (this.state.value.length == 0) {
283
+    // setTimeout(() => {
284
+    if (this.state.value.length == 0) {
285
+      Taro.showToast({
286
+        title: `请填写绘画描述`,
287
+        icon: 'error',
288
+      });
289
+      return
290
+    }
291
+    let pramas = {
292
+      // model_name: this.state.models[this.state.modelIndex].model_name,
293
+      // file_name: this.state.models[this.state.modelIndex].lora_infos.length > 0 ? this.state.models[this.state.modelIndex].lora_infos[this.state.loraIndex].file_name : '',
294
+      model_id: this.state.models[this.state.modelIndex].id,
295
+      style_id: this.state.models[this.state.modelIndex].lora_infos.length > 0 ? this.state.models[this.state.modelIndex].lora_infos[this.state.loraIndex].id : 0,
296
+      img_size: this.state.imgSize[this.state.sizeIndex].name,
297
+      img_cnt: this.state.drawNum,
298
+      cfg_scale: this.state.sliderNum,
299
+      sampler: this.state.sampling[this.state.samplingIndex],
300
+      prompt: this.state.value,
301
+      negative_prompt: this.state.negativeValue,
302
+      img_type: this.state.mass,
303
+      img_url: this.state.consultImg
304
+    }
305
+    api.drawTxt2img(pramas).then(res => {
306
+      if (res.code == 200) {
307
+        Taro.hideLoading()
308
+        this.subscribe(res.data.task_id)
309
+        Taro.navigateTo({
310
+          url: `/pages/darwDetail/index?task_id=${res.data.task_id}`
311
+        })
312
+      } else {
313
+        Taro.hideLoading()
152 314
         Taro.showToast({
153
-          title: `请填写绘画描述`,
315
+          title: res.msg,
154 316
           icon: 'error',
155 317
         });
156
-        return
157 318
       }
158
-      let pramas = {
159
-        // model_name: this.state.models[this.state.modelIndex].model_name,
160
-        // file_name: this.state.models[this.state.modelIndex].lora_infos.length > 0 ? this.state.models[this.state.modelIndex].lora_infos[this.state.loraIndex].file_name : '',
161
-        model_id: this.state.models[this.state.modelIndex].id,
162
-        style_id: this.state.models[this.state.modelIndex].lora_infos.length > 0 ? this.state.models[this.state.modelIndex].lora_infos[this.state.loraIndex].id : 0,
163
-        img_size: this.state.imgSize[this.state.sizeIndex].name,
164
-        img_cnt: this.state.drawNum,
165
-        cfg_scale: this.state.sliderNum,
166
-        sampler: this.state.sampling[this.state.samplingIndex],
167
-        prompt: this.state.value,
168
-        negative_prompt: this.state.negativeValue,
169
-        img_type: this.state.mass
319
+    })
320
+    // }, 1000)
321
+  }
322
+  toChat (e) {
323
+  }
324
+  //选择标签
325
+  selectedLabel (item, index) {
326
+    this.setState({
327
+      tagsIndex: index,
328
+      isTags: true
329
+    })
330
+  }
331
+  //选择子标签
332
+  selectedSubtag (item, index) {
333
+    let tags = this.state.tags
334
+    tags[this.state.tagsIndex].tags[index].isSelect = !tags[this.state.tagsIndex].tags[index].isSelect
335
+    this.setState({
336
+      tags: tags
337
+    })
338
+  }
339
+  //确定标签
340
+  defineSubtag () {
341
+    console.log('defineSubtag');
342
+    let nowSelectTag = []
343
+    let value = this.state.value
344
+    let nowSelectTagObj = ''
345
+    this.state.tags[this.state.tagsIndex].tags.forEach(item => {
346
+      if (item.isSelect) {
347
+        nowSelectTag.push(item.zh_name)
170 348
       }
171
-      api.drawTxt2img(pramas).then(res => {
172
-        if (res.code == 200) {
173
-          Taro.hideLoading()
174
-          Taro.navigateTo({
175
-            url: `/pages/darwDetail/index?task_id=${res.data.task_id}`
176
-          })
177
-        } else {
178
-          Taro.hideLoading()
179
-          Taro.showToast({
180
-            title: res.msg,
181
-            icon: 'error',
182
-          });
183
-        }
349
+    })
350
+    nowSelectTagObj = nowSelectTag.toString()
351
+    let _value = value.length > 0 ? `${value},${nowSelectTagObj}` : nowSelectTagObj
352
+    this.setState({
353
+      value: _value,
354
+      isTags: !this.state.isTags
355
+    }, () => {
356
+      let _tags = this.state.tags
357
+      _tags.forEach(item => {
358
+        item.tags.forEach(e => {
359
+          e['isSelect'] = false
360
+        })
184 361
       })
185
-    }, 1000)
362
+      this.setState({
363
+        tags: _tags
364
+      })
365
+    })
186 366
   }
187
-  toChat (e) {
367
+  onClose (e) {
368
+    console.log('onClose');
369
+    this.setState({
370
+      isTags: false
371
+    })
372
+  }
373
+  //上传参考图
374
+  upLode () {
375
+    let that = this
376
+    Taro.chooseMedia({
377
+      count: 1, // 默认9
378
+      sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
379
+      sourceType: ['album', 'camera'],
380
+      success: function (res) {
381
+        console.log(res, 'res');
382
+        const file = res.tempFiles[0].tempFilePath
383
+        if (res.tempFiles[0].size > 2000000) {
384
+          Taro.showToast({ title: '图片大小不能超过2M', icon: 'none' })
385
+          return
386
+        }
387
+        Taro.showLoading({
388
+          title: '图片上传中',
389
+        })
390
+        let base64Img = Taro.getFileSystemManager().readFileSync(file, 'base64')
391
+        api.uploadImg({ img_data: base64Img }).then(res => {
392
+          if (res.code == 200) {
393
+            Taro.hideLoading()
394
+            that.setState({
395
+              consultImg: res.data
396
+            })
397
+          }
398
+        })
399
+      }
400
+    })
188 401
   }
189 402
 
190 403
   render () {
@@ -194,13 +407,6 @@ export default class Mine extends Component {
194 407
           <Image className='banner-image' src=''></Image>
195 408
         </View> */}
196 409
         <View className='draw-content'>
197
-          {/* <View className='draw-brack'>
198
-            <View className='draw-tab'>
199
-              <View className='tab-text' style={'background: #0F84EC;color: #FFFFFF;'}>AI绘画</View>
200
-              <View className='tab-text'>人物头像</View>
201
-              <View className='tab-text'>风景头像</View>
202
-            </View>
203
-          </View> */}
204 410
           <View className='draw-title'>绘画描述</View>
205 411
           <View className='draw-text'>
206 412
             <View className='recommend'>
@@ -221,6 +427,47 @@ export default class Mine extends Component {
221 427
             }
222 428
             <View className='textarea-num' id='textarea-num'>{this.state.value.length}/1000</View>
223 429
           </View>
430
+          <View className='draw-title'>选择标签</View>
431
+          <ScrollView
432
+            className='recharge'
433
+            scrollX
434
+          >
435
+            {
436
+              this.state.tags.map((item, index) => (
437
+                <View className='recharge-info'
438
+                  key={index}
439
+                  onClick={e => (this.selectedLabel(item, index))}>
440
+                  {item.name}
441
+                </View>
442
+              ))
443
+            }
444
+          </ScrollView>
445
+          <Block>
446
+            {
447
+              this.state.isTags &&
448
+              <AtFloatLayout isOpened scrollX title={this.state.tags[this.state.tagsIndex].name} onClose={e => (this.onClose(e))}>
449
+                <View className='layout-content'>
450
+                  {
451
+                    this.state.tags[this.state.tagsIndex].tags.map((item, index) => (
452
+                      <View className='layout-block'
453
+                        key={index}
454
+                        style={item.isSelect ? ' border: 2px solid #0F84EC;background: #0F84EC;color: #FFFFFF;' : 'border: 2px solid rgba(2, 2, 2, 0.75); color: rgba(2, 2, 2, 0.75);background: #FFFFFF;'}
455
+                        onClick={e => (this.selectedSubtag(item, index))}
456
+                      >
457
+                        {item.zh_name}
458
+                      </View>
459
+                    ))
460
+                  }
461
+                </View>
462
+
463
+                <View className='selection'>
464
+                  <View className='selection-botton' onClick={e => (this.defineSubtag())}>
465
+                    确定标签
466
+                  </View>
467
+                </View>
468
+              </AtFloatLayout>
469
+            }
470
+          </Block>
224 471
           <View className='draw-title'>选择模型</View>
225 472
           <View className='model-list'>
226 473
             {
@@ -248,13 +495,13 @@ export default class Mine extends Component {
248 495
             }
249 496
           </View>
250 497
           {
251
-            this.state.models.length>6&&
252
-          <View className='isOpen'>
253
-            <View className='open-content' onClick={e => (this.changeOpen())}>
254
-              <View className='open-title'>{!this.state.isOpen ? '展开' : '收起'}</View>
255
-              <Image className='open-img' src={!this.state.isOpen ? 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1678935050487.png' : 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1678935114571.png'}></Image>
498
+            this.state.models.length > 6 &&
499
+            <View className='isOpen'>
500
+              <View className='open-content' onClick={e => (this.changeOpen())}>
501
+                <View className='open-title'>{!this.state.isOpen ? '展开' : '收起'}</View>
502
+                <Image className='open-img' src={!this.state.isOpen ? 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1678935050487.png' : 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1678935114571.png'}></Image>
503
+              </View>
256 504
             </View>
257
-          </View>
258 505
           }
259 506
           {
260 507
             this.state.models[this.state.modelIndex] &&
@@ -273,6 +520,17 @@ export default class Mine extends Component {
273 520
               </View>
274 521
             </View>
275 522
           }
523
+          <View className='draw-title'>上传参考图</View>
524
+          <View className='consult'>
525
+            {
526
+              this.state.consultImg.length == 0 ?
527
+                <View className='consult-content' onClick={e => (this.upLode())}>
528
+                  +
529
+                </View>
530
+                :
531
+                <Image className='consult-img' mode='aspectFit' onClick={e => (this.upLode())} src={this.state.consultImg}></Image>
532
+            }
533
+          </View>
276 534
           <View className='draw-title'>色彩丰富度</View>
277 535
           <View className='components-page'>
278 536
             <Slider style={'margin: 10px 0;'} showValue step={1} max={15} min={1} activeColor='#0F84EC' value={this.state.sliderNum} />
@@ -282,7 +540,7 @@ export default class Mine extends Component {
282 540
             {
283 541
               this.state.imgSize.map((item, index) => (
284 542
                 <View className='measurement-info' style={this.state.sizeIndex == index ? 'border: 2px solid #0F84EC;' : ''} key={index} onClick={e => (this.changeMeasurement(item, index))}>
285
-                  <Image className='measurement-img' src=''></Image>
543
+                  <Image className='measurement-img' src={item.img}></Image>
286 544
                   <View className='measurement-title'>{item.name}</View>
287 545
                 </View>
288 546
               ))
@@ -317,7 +575,7 @@ export default class Mine extends Component {
317 575
               onInput={e => (this.onInputNegative(e))}
318 576
               onBlur={e => (this.onBlurNegative(e))}
319 577
               maxlength='1000' />
320
-              {
578
+            {
321 579
               this.state.negativeValue.length > 0 &&
322 580
               <Image className='delete-draw-text' src='https://we-spa.oss-cn-shenzhen.aliyuncs.com/total_picture/1679637370560.png' onClick={e => (this.deleteNegativeValue())}></Image>
323 581
             }
@@ -325,7 +583,7 @@ export default class Mine extends Component {
325 583
           </View>
326 584
         </View>
327 585
         <View className='generate-pictures' onClick={e => (this.generatePictures(e))} >
328
-          生成图片(消耗{this.state.drawNum * 2 * (this.state.mass + 1)}积分
586
+          生成图片(消耗{this.state.drawNum * 2 * (this.state.mass + 1)}点券
329 587
         </View>
330 588
       </View>
331 589
     )

+ 88 - 4
src/pages/index/index.less

@@ -46,6 +46,65 @@
46 46
       color: #FFFFFF;
47 47
     }
48 48
 
49
+    .recharge {
50
+      margin-top: 30px;
51
+      width: 100%;
52
+      white-space: nowrap;
53
+
54
+      .recharge-info {
55
+
56
+        padding: 0 38px;
57
+        height: 80px;
58
+        line-height: 80px;
59
+        display: inline-block;
60
+        margin-right: 24px;
61
+        border: 2px solid rgba(255, 255, 255, .75);
62
+        color: rgba(255, 255, 255, .75);
63
+        border-radius: 40px;
64
+        font-family: PingFangSC-Regular;
65
+        font-size: 28px;
66
+        text-align: center;
67
+      }
68
+    }
69
+
70
+    .layout-block {
71
+      margin-top: 20px;
72
+      padding: 0 38px;
73
+      height: 80px;
74
+      line-height: 80px;
75
+      display: inline-block;
76
+      margin-right: 24px;
77
+      border: 2px solid rgba(2, 2, 2, 0.75);
78
+      color: rgba(2, 2, 2, 0.75);
79
+      border-radius: 40px;
80
+      font-family: PingFangSC-Regular;
81
+      font-size: 28px;
82
+      text-align: center;
83
+
84
+    }
85
+    .layout-content{
86
+      padding-bottom: 120px;
87
+    }
88
+
89
+    .selection {
90
+      position: fixed;
91
+      bottom: 20px;
92
+      z-index: 1000;
93
+      transform: translateX(-50%);
94
+      left: 50%;
95
+      .selection-botton{
96
+        padding: 0 38px;
97
+        height: 80px;
98
+        line-height: 80px;
99
+        background: #0F84EC;
100
+        border-radius: 20px;
101
+        font-family: PingFangSC-Medium;
102
+        font-size: 28px;
103
+        color: #FFFFFF;
104
+
105
+      }
106
+    }
107
+
49 108
     .draw-text {
50 109
       margin-top: 30px;
51 110
       position: relative;
@@ -90,7 +149,8 @@
90 149
         text-align: end;
91 150
         color: rgba(255, 255, 255, .5);
92 151
       }
93
-      .delete-draw-text{
152
+
153
+      .delete-draw-text {
94 154
         position: absolute;
95 155
         right: 5px;
96 156
         bottom: 65px;
@@ -207,6 +267,7 @@
207 267
       flex-wrap: wrap;
208 268
 
209 269
       .measurement-info {
270
+        position: relative;
210 271
         margin: 0 20px;
211 272
         width: 116px;
212 273
         box-sizing: border-box;
@@ -216,8 +277,12 @@
216 277
       }
217 278
 
218 279
       .measurement-img {
219
-        width: 100px;
220
-        height: 60px;
280
+        margin-top: 22px;
281
+        position: relative;
282
+        left: 50%;
283
+        transform: translateX(-50%);
284
+        width: 48px;
285
+        height: 48px;
221 286
       }
222 287
 
223 288
       .measurement-title {
@@ -323,11 +388,30 @@
323 388
     position: fixed;
324 389
     bottom: 40px;
325 390
     left: 50%;
326
-    z-index: 1000;
391
+    z-index: 100;
327 392
     transform: translateX(-50%);
328 393
     background-image: linear-gradient(-49deg, #5D81FF 0%, #0F84EC 100%);
329 394
     font-family: PingFangSC-Regular;
330 395
     font-size: 28px;
331 396
     color: #FFFFFF;
332 397
   }
398
+  .consult{
399
+    margin-top: 20px;
400
+    .consult-content{
401
+      width: 222px;
402
+      height: 218px;
403
+      border: 1px dashed rgba(255,255,255,.4);
404
+      background: url(http://video-img.fyshark.com/1679900121628%E8%BE%B9%E8%A7%92.png);
405
+      background-size: 100% 100%;
406
+      display: flex;
407
+      justify-content: center;
408
+      align-items: center;
409
+      font-size: 48px;
410
+      color: rgba(15,132,236,1);
411
+    }
412
+    .consult-img{
413
+      width: 222px;
414
+      height: 218px;
415
+    }
416
+  }
333 417
 }

+ 7 - 1
src/pages/mine/index.jsx

@@ -232,6 +232,11 @@ export default class Mine extends Component {
232 232
       url: `/pages/earnPoints/index`
233 233
     })
234 234
   }
235
+  wallet(){
236
+    Taro.navigateTo({
237
+      url: `/moduleA/pages/wallet/index`
238
+    })
239
+  }
235 240
 
236 241
   componentDidMount () { }
237 242
 
@@ -246,8 +251,9 @@ export default class Mine extends Component {
246 251
                 <View className='info-top'>
247 252
                   <View className='user-name'>{this.state.userInfo.user_name}</View>
248 253
                 </View>
249
-                <View className='info-bottom'>
254
+                <View className='info-bottom' onClick={e=>(this.wallet())}>
250 255
                   <View className='integral'>点券:{this.state.userInfo.total_coin}</View>
256
+                  <Image className='integral-img' src='http://video-img.fyshark.com/1680055380074%E7%A7%AF%E5%88%86%E6%98%8E%E7%BB%86.png'></Image>
251 257
                 </View>
252 258
               </View>
253 259
             </View>

+ 8 - 0
src/pages/mine/index.less

@@ -39,12 +39,20 @@
39 39
 
40 40
         .info-bottom {
41 41
           display: flex;
42
+          align-items: center;
42 43
 
43 44
           .integral {
44 45
             font-family: PingFangSC-Regular;
45 46
             font-size: 28px;
46 47
             color: rgba(255, 255, 255, .75);
47 48
           }
49
+
50
+          .integral-img {
51
+            margin-left: 10px;
52
+            width: 28px;
53
+            height: 28px;
54
+            display: block;
55
+          }
48 56
         }
49 57
       }
50 58
     }

+ 47 - 1
src/service/index.js

@@ -121,6 +121,52 @@ export const userDelImg = data =>
121 121
     method: 'POST',
122 122
     data,
123 123
   });
124
- 
124
+//获取订阅模板
125
+export const getWxTemplate = data =>
126
+  Request({
127
+    url: '/api/get_wx_template',
128
+    method: 'POST',
129
+    data,
130
+  });
131
+
132
+//订阅上传
133
+export const subscribeTemplate = data =>
134
+  Request({
135
+    url: '/api/subscribe_template',
136
+    method: 'POST',
137
+    data,
138
+  });
139
+
140
+//获取标签
141
+export const getTagsDev = data =>
142
+  Request({
143
+    url: '/api/get_tags_dev',
144
+    method: 'POST',
145
+    data,
146
+  });
147
+//上传图片
148
+export const uploadImg = data =>
149
+  Request({
150
+    url: '/api/image2url',
151
+    method: 'POST',
152
+    data,
153
+  });
154
+//获取用户金币明细
155
+export const getUserCoinDetail = data =>
156
+  Request({
157
+    url: '/api/get_user_coin_detail',
158
+    method: 'POST',
159
+    data,
160
+  });
161
+  //获取用户分销明细
162
+export const getUserShareCnt = data =>
163
+Request({
164
+  url: '/api/get_user_share_cnt',
165
+  method: 'POST',
166
+  data,
167
+});
168
+
169
+
170
+
125 171
 
126 172