bayi 1 yıl önce
ebeveyn
işleme
0cb3109d31

+ 1 - 1
components/invite/index.js

@@ -1,4 +1,4 @@
-// components/invite/index.js
+
 Component({
     /**
      * 组件的属性列表

+ 2 - 1
components/invite/index.json

@@ -3,5 +3,6 @@
     "usingComponents": {
         "popUp": "/components/popUp/index",
         "createPoster": "/components/createPoster/index"
-    }
+    },
+    "styleIsolation": "apply-shared"
 }

+ 5 - 4
components/invite/index.less

@@ -35,9 +35,10 @@
         .shareType {
             display: flex;
             align-items: center;
-            justify-content: space-between;
-            margin-top: 65rpx;
-            width: 650rpx;
+            justify-content: space-around;
+            width:100%;
+            padding: 0 10rpx;
+            box-sizing: border-box;
 
             .box {
                 text-align: center;
@@ -55,7 +56,7 @@
         }
 
         .shareText {
-            margin: 54rpx auto 0;
+            margin: 54rpx auto 30rpx;
             padding: 42rpx 0rpx;
             box-sizing: border-box;
             width: 687rpx;

+ 18 - 18
components/invite/index.wxml

@@ -12,24 +12,6 @@
         <view class="tips">
             都属于您的用户资产,产生的订单和收益都会给到您佣金
         </view>
-        <view class="shareType">
-            <view class="box">
-                <image src="/static/wx.png" class="icon" />
-                <view class="label">微信好友</view>
-            </view>
-            <view class="box" bindtap="createPoster">
-                <image src="/static/hb.png" class="icon" />
-                <view class="label">生成海报</view>
-            </view>
-            <view class="box">
-                <image src="/static/pyq.png" class="icon" />
-                <view class="label">朋友圈</view>
-            </view>
-            <view class="box" bindtap="jump">
-                <image src="/static/gzh.png" class="icon" />
-                <view class="label">公众号</view>
-            </view>
-        </view>
         <view class="shareText">
             <view class="title">
                 分享时可选用文案
@@ -46,6 +28,24 @@
                 复制当前话术
             </view>
         </view>
+        <view class="shareType">
+            <button class="resetBtn box" open-type="share">
+                <image src="/static/wx.png" class="icon" />
+                <view class="label">微信好友</view>
+            </button>
+            <view class="box" bindtap="createPoster">
+                <image src="/static/hb.png" class="icon" />
+                <view class="label">生成海报</view>
+            </view>
+            <!--  <view class="box">
+                <image src="/static/pyq.png" class="icon" />
+                <view class="label">朋友圈</view>
+            </view> -->
+            <view class="box" bindtap="jump">
+                <image src="/static/gzh.png" class="icon" />
+                <view class="label">公众号</view>
+            </view>
+        </view>
     </scroll-view>
 </popUp>
 <createPoster id="createPoster"></createPoster>

+ 5 - 4
components/invite/index.wxss

@@ -32,9 +32,10 @@
 .popBox .shareType {
   display: flex;
   align-items: center;
-  justify-content: space-between;
-  margin-top: 65rpx;
-  width: 650rpx;
+  justify-content: space-around;
+  width: 100%;
+  padding: 0 10rpx;
+  box-sizing: border-box;
 }
 .popBox .shareType .box {
   text-align: center;
@@ -48,7 +49,7 @@
   font-size: 31rpx;
 }
 .popBox .shareText {
-  margin: 54rpx auto 0;
+  margin: 54rpx auto 30rpx;
   padding: 42rpx 0rpx;
   box-sizing: border-box;
   width: 687rpx;

+ 2 - 2
mixins/share.js

@@ -8,8 +8,8 @@ module.exports = Behavior({
             from,
             target
         }) {
-            if (from == 'button') {
-                let video = target.dataset.info
+            let video = target.dataset.info
+            if (from == 'button' && video) {
                 const promise = new Promise(resolve => {
                     this.creatShare(video).then(res => {
                         resolve(res)

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

@@ -1,14 +1,16 @@
+import share from '~/mixins/share'
 import reachBottom from '~/mixins/reachBottom';
 import {
     getSaleInvite
 } from '~/api/sale'
 Page({
-    behaviors: [reachBottom],
+    behaviors: [reachBottom,share],
     data: {
         dateTime: '2023-09',
     },
     onLoad(options) {
         this.resetData();
+        this.openInvite()
     },
     bindDateChange(e) {
         console.log('携带值为', e.detail.value)

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

@@ -26,11 +26,11 @@ Page({
     },
     async onShow() {
         let allIncome = await getSaleData()
-        let orderList = await getIncomeList()
-        console.log(allIncome,orderList);
+        let data = await getIncomeList({pageSize:1000})
+        console.log(allIncome,data);
         this.setData({
             allIncome,
-            orderList
+            orderList:data.list
         })
     },