bayi 1 yıl önce
ebeveyn
işleme
c1dd30e846

+ 17 - 3
components/invite/index.js

@@ -7,10 +7,10 @@ Component({
 
     },
     data: {
-
+        current: 1
     },
-    lifetimes:{
-        attached(){
+    lifetimes: {
+        attached() {
             this.openInvite()
         }
     },
@@ -21,5 +21,19 @@ Component({
         closeInvite() {
             this.selectComponent("#popUp").hideModal()
         },
+        clipboar() {
+            wx.setClipboardData({
+                data: '132131231231',
+                success: function (res) { //成功回调函数
+                    wx.showToast({
+                        title: '已复制',
+                        icon: "none"
+                    })
+                },
+                fail(res) {
+                    console.log(res, 'rrr');
+                }
+            })
+        },
     }
 })

+ 13 - 0
components/invite/index.less

@@ -71,6 +71,7 @@
 
             .swiper {
                 height: 300rpx;
+
                 .content {
                     padding: 0 80rpx;
                     font-size: 30rpx;
@@ -79,5 +80,17 @@
                     margin-bottom: 20rpx;
                 }
             }
+
+            .copy {
+                margin: 20rpx auto 0;
+                width: 330rpx;
+                padding: 14rpx 0;
+                text-align: center;
+                background: #FFFFFF;
+                border-radius: 35rpx;
+                border: 1rpx solid #FF924C;
+                font-size: 30rpx;
+                color: #FF924C;
+            }
         }
     }

+ 4 - 4
components/invite/index.wxml

@@ -34,7 +34,7 @@
             <view class="title">
                 分享时可选用文案
             </view>
-            <swiper class="swiper" circular indicator-dots="{{true}}" indicator-active-color="#B2B8C3"
+            <swiper class="swiper" current="{{current}}" circular indicator-dots="{{true}}" indicator-active-color="#B2B8C3"
                 indicator-color='#E5E5E5'>
                 <swiper-item wx:for="{{3}}" wx:key="index">
                     <view class="content">
@@ -42,9 +42,9 @@
                     </view>
                 </swiper-item>
             </swiper>
-            <!--   <view class="content">
-                新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育
-            </view> -->
+            <view class="copy" bindtap="clipboar">
+                复制当前话术
+            </view>
         </view>
     </scroll-view>
 </popUp>

+ 11 - 0
components/invite/index.wxss

@@ -71,3 +71,14 @@
   line-height: 52rpx;
   margin-bottom: 20rpx;
 }
+.popBox .shareText .copy {
+  margin: 20rpx auto 0;
+  width: 330rpx;
+  padding: 14rpx 0;
+  text-align: center;
+  background: #FFFFFF;
+  border-radius: 35rpx;
+  border: 1rpx solid #FF924C;
+  font-size: 30rpx;
+  color: #FF924C;
+}