Browse Source

开发全局邀新弹窗

bayi 1 year ago
parent
commit
51da018f86

+ 5 - 0
components/invite/index.js

@@ -9,6 +9,11 @@ Component({
     data: {
 
     },
+    lifetimes:{
+        attached(){
+            this.openInvite()
+        }
+    },
     methods: {
         openInvite() {
             this.selectComponent("#popUp").showModal()

+ 83 - 1
components/invite/index.less

@@ -1 +1,83 @@
-/* components/invite/index.wxss */
+    .popBox {
+        width: 100%;
+        height: 100%;
+        padding: 22rpx 32rpx;
+        box-sizing: border-box;
+        border-top-left-radius: 20rpx;
+        border-top-right-radius: 20rpx;
+        padding-bottom: 30rpx;
+        background-color: white;
+
+        .header {
+            position: relative;
+            margin-bottom: 18rpx;
+            font-size: 36rpx;
+            color: #000000;
+            text-align: center;
+
+            .close {
+                position: absolute;
+                right: 10rpx;
+                top: -16rpx;
+                line-height: 60rpx;
+                font-size: 60rpx;
+                color: #979797;
+            }
+        }
+
+        .tips {
+            margin-bottom: 14rpx;
+            font-size: 26rpx;
+            text-align: center;
+            color: #666666;
+        }
+
+        .shareType {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            margin-top: 65rpx;
+            width: 650rpx;
+
+            .box {
+                text-align: center;
+
+                .icon {
+                    width: 84rpx;
+                    height: 84rpx;
+                    border-radius: 50%;
+                }
+
+                .label {
+                    font-size: 31rpx;
+                }
+            }
+        }
+
+        .shareText {
+            margin: 54rpx auto 0;
+            padding: 42rpx 0rpx;
+            box-sizing: border-box;
+            width: 687rpx;
+            background: #F2F6FC;
+            border-radius: 20rpx;
+
+            .title {
+                margin-bottom: 46rpx;
+                font-size: 36rpx;
+                text-align: center;
+                color: #000000;
+            }
+
+            .swiper {
+                height: 300rpx;
+                .content {
+                    padding: 0 80rpx;
+                    font-size: 30rpx;
+                    color: #7B7B7B;
+                    line-height: 52rpx;
+                    margin-bottom: 20rpx;
+                }
+            }
+        }
+    }

+ 49 - 2
components/invite/index.wxml

@@ -1,3 +1,50 @@
 <popUp id="popUp">
-
-</popUp>
+    <scroll-view class="popBox" scroll-y="true" enhanced show-scrollbar="{{false}}">
+        <view class="header">
+            分享
+            <view class="close" bindtap="closeInvite">
+                ×
+            </view>
+        </view>
+        <view class="tips">
+            通过下面分享都带有您的专属标签,邀请成功的用户,
+        </view>
+        <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">
+                <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">
+                <image src="/static/gzh.png" class="icon" />
+                <view class="label">公众号</view>
+            </view>
+        </view>
+        <view class="shareText">
+            <view class="title">
+                分享时可选用文案
+            </view>
+            <swiper class="swiper" circular indicator-dots="{{true}}" indicator-active-color="#B2B8C3"
+                indicator-color='#E5E5E5'>
+                <swiper-item wx:for="{{3}}" wx:key="index">
+                    <view class="content">
+                        新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育
+                    </view>
+                </swiper-item>
+            </swiper>
+            <!--   <view class="content">
+                新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育 新课标语文素养培育,新课标语文素养培育
+            </view> -->
+        </view>
+    </scroll-view>
+</popUp>

+ 73 - 1
components/invite/index.wxss

@@ -1 +1,73 @@
-/* components/invite/index.wxss */
+.popBox {
+  width: 100%;
+  height: 100%;
+  padding: 22rpx 32rpx;
+  box-sizing: border-box;
+  border-top-left-radius: 20rpx;
+  border-top-right-radius: 20rpx;
+  padding-bottom: 30rpx;
+  background-color: white;
+}
+.popBox .header {
+  position: relative;
+  margin-bottom: 18rpx;
+  font-size: 36rpx;
+  color: #000000;
+  text-align: center;
+}
+.popBox .header .close {
+  position: absolute;
+  right: 10rpx;
+  top: -16rpx;
+  line-height: 60rpx;
+  font-size: 60rpx;
+  color: #979797;
+}
+.popBox .tips {
+  margin-bottom: 14rpx;
+  font-size: 26rpx;
+  text-align: center;
+  color: #666666;
+}
+.popBox .shareType {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-top: 65rpx;
+  width: 650rpx;
+}
+.popBox .shareType .box {
+  text-align: center;
+}
+.popBox .shareType .box .icon {
+  width: 84rpx;
+  height: 84rpx;
+  border-radius: 50%;
+}
+.popBox .shareType .box .label {
+  font-size: 31rpx;
+}
+.popBox .shareText {
+  margin: 54rpx auto 0;
+  padding: 42rpx 0rpx;
+  box-sizing: border-box;
+  width: 687rpx;
+  background: #F2F6FC;
+  border-radius: 20rpx;
+}
+.popBox .shareText .title {
+  margin-bottom: 46rpx;
+  font-size: 36rpx;
+  text-align: center;
+  color: #000000;
+}
+.popBox .shareText .swiper {
+  height: 300rpx;
+}
+.popBox .shareText .swiper .content {
+  padding: 0 80rpx;
+  font-size: 30rpx;
+  color: #7B7B7B;
+  line-height: 52rpx;
+  margin-bottom: 20rpx;
+}

BIN
static/gzh.png


BIN
static/hb.png


BIN
static/pyq.png


BIN
static/wx.png


+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-/* if (envVersion == 'develop') {
+if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else { */
+} else {
     baseUrl = 'https://reader-api.ai160.com/wx'
     oldUrl = 'https://reader-api.ai160.com'
-// }
+}
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {