浏览代码

开发联调测试

bayi 1 年之前
父节点
当前提交
1792e51660

+ 2 - 0
api/sale.js

@@ -17,4 +17,6 @@ module.exports = {
     getIncomeList: data => request('/v3/sale/income/list', 'get', data),
     // 提现
     cashOut: data => request('/v3/sale/income/cash', 'get', data),
+    // 获取分销推广文案
+    getPromotionText: data => request('/v3/sale/copywriting', 'get', data),
 }

+ 3 - 4
components/createPoster/index.less

@@ -9,7 +9,7 @@
     height: 100vh;
     display: flex;
     justify-content: center;
-    background-color: rgba(0, 0, 0, 0.35);
+    background-color: rgba(0, 0, 0, 0.6);
 
     .poster {
         position: relative;
@@ -34,11 +34,10 @@
 
         .qrCode {
             position: absolute;
-            left: 40rpx;
-            bottom: 30rpx;
+            left: 38rpx;
+            bottom: 32rpx;
             width: 170rpx;
             height: 170rpx;
-            border-radius: 50%;
         }
     }
 

+ 3 - 4
components/createPoster/index.wxss

@@ -7,7 +7,7 @@
   height: 100vh;
   display: flex;
   justify-content: center;
-  background-color: rgba(0, 0, 0, 0.35);
+  background-color: rgba(0, 0, 0, 0.6);
 }
 .mediaBox .poster {
   position: relative;
@@ -30,11 +30,10 @@
 }
 .mediaBox .poster .qrCode {
   position: absolute;
-  left: 40rpx;
-  bottom: 30rpx;
+  left: 38rpx;
+  bottom: 32rpx;
   width: 170rpx;
   height: 170rpx;
-  border-radius: 50%;
 }
 .mediaBox .btns {
   position: absolute;

+ 19 - 10
components/invite/index.js

@@ -1,18 +1,22 @@
+import {
+    getPromotionText
+} from '~/api/sale'
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
 
     },
     data: {
-        current: 1
+        current: 0,
+        list: []
+    },
+    lifetimes: {
+        async attached() {
+            let list = await getPromotionText()
+            this.setData({
+                list
+            })
+        }
     },
-    // lifetimes: {
-    //     attached() {
-    //         this.openInvite()
-    //     }
-    // },
     methods: {
         openInvite() {
             this.selectComponent("#popUp").showModal()
@@ -20,9 +24,14 @@ Component({
         closeInvite() {
             this.selectComponent("#popUp").hideModal()
         },
+        swiperChange(e) {
+            this.setData({
+                current: e.detail.current
+            })
+        },
         clipboar() {
             wx.setClipboardData({
-                data: '132131231231',
+                data: this.data.list[this.data.current].text,
                 success: function (res) { //成功回调函数
                     wx.showToast({
                         title: '已复制',

+ 5 - 0
components/invite/index.less

@@ -81,6 +81,11 @@
                     color: #7B7B7B;
                     line-height: 52rpx;
                     margin-bottom: 20rpx;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    -webkit-line-clamp: 5;
+                    display: -webkit-box;
+                    -webkit-box-orient: vertical;
                 }
             }
 

+ 3 - 3
components/invite/index.wxml

@@ -17,10 +17,10 @@
                 分享时可选用文案
             </view>
             <swiper class="swiper" current="{{current}}" circular indicator-dots="{{true}}"
-                indicator-active-color="#B2B8C3" indicator-color='#E5E5E5'>
-                <swiper-item wx:for="{{3}}" wx:key="index">
+                indicator-active-color="#B2B8C3" indicator-color='#E5E5E5' bindchange="swiperChange">
+                <swiper-item wx:for="{{list}}" wx:key="id">
                     <view class="content">
-                        新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育
+                        {{item.text}}
                     </view>
                 </swiper-item>
             </swiper>

+ 5 - 0
components/invite/index.wxss

@@ -73,6 +73,11 @@
   color: #7B7B7B;
   line-height: 52rpx;
   margin-bottom: 20rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-line-clamp: 5;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
 }
 .popBox .shareText .copy {
   margin: 20rpx auto 0;

+ 3 - 3
salesperson/pages/history/index.js

@@ -5,7 +5,7 @@ import {
     getSaleInvite
 } from '~/api/sale'
 Page({
-    behaviors: [reachBottom,share,event],
+    behaviors: [reachBottom, share, event],
     data: {
         dateTime: '2023-09',
     },
@@ -13,7 +13,6 @@ Page({
         this.resetData();
     },
     bindDateChange(e) {
-        console.log('携带值为', e.detail.value)
         this.setData({
             dateTime: e.detail.value
         })
@@ -24,7 +23,8 @@ Page({
     },
     loadMore() {
         this.getData(getSaleInvite, {
-            dateTime: this.data.dateTime
+            dateTime: this.data.dateTime,
+            pageSize: 20,
         });
     },
 })