bayi 1 jaar geleden
bovenliggende
commit
ce2528a021

+ 5 - 2
components/createPoster/index.js

@@ -10,9 +10,10 @@ Component({
     methods: {
         async open() {
             let qrCode = await createWxCode({
-                page: "/pages/index/index",
-                scene: `?uid=${wx.getStorageSync('uid')}`
+                page: "pages/index/index",
+                scene: wx.getStorageSync('uid')
             })
+            console.log(qrCode);
             this.setData({
                 state: true,
                 qrCode
@@ -42,8 +43,10 @@ Component({
                     pic.onload = () => {
                         ctx.drawImage(pic, 0, 0, 646, 959);
                         let pl = canvas.createImage();
+                        console.log(this.data.qrCode);
                         pl.src = this.data.qrCode
                         pl.onload = async () => {
+                            console.log('11');
                             ctx.drawImage(pl, 29, 756, 170, 170)
                             let {
                                 tempFilePath

+ 2 - 1
components/createPoster/index.json

@@ -1,4 +1,5 @@
 {
     "component": true,
-    "usingComponents": {}
+    "usingComponents": {},
+    "styleIsolation": "apply-shared"
 }

+ 4 - 2
components/createPoster/index.wxml

@@ -2,10 +2,12 @@
     <view class="poster">
         <image src="/static/lollipop.png" class="close" catchtap="closeMediaBox" />
         <image src="https://reader-wx.ai160.com/images/reader/pay/shareBg.jpg" class="img" />
-        <image src="{{qrCode}}" class="qrCode"/>
+        <image src="{{qrCode}}" class="qrCode" />
     </view>
     <view class="btns">
-        <view class="btn" bindtap="open">立即分享</view>
+        <button class="resetBtn btn" open-type="share">
+            立即分享
+        </button>
         <view class="btn" bindtap="savePoster" style="background: linear-gradient(180deg, #FFB382 0%, #FFA45D 100%);">
             保存海报
         </view>

+ 8 - 5
pages/my/index.less

@@ -164,13 +164,10 @@
     }
 
     .scrollViewBox {
-        height: 330rpx;
-
+        position: relative;
+        width: 100vw;
         .goodsList {
-            position: absolute;
             margin-top: 40rpx;
-            left: 0;
-            padding-left: 20rpx;
             width: 100%;
             height: 310rpx;
             white-space: nowrap;
@@ -236,6 +233,12 @@
             }
 
         }
+        .goodsTips{
+            position: absolute;
+            font-size: 24rpx;
+            color: #555;
+            bottom: 0;
+        }
     }
 
     .longpressBox {

+ 1 - 0
pages/my/index.wxml

@@ -56,6 +56,7 @@
                 </view>
             </view>
         </scroll-view>
+        <view class="goodsTips">虚拟产品不支持退货</view>
     </view>
     <!-- ios -->
     <view class="longpressBox" wx:if="{{isIos}}">

+ 8 - 4
pages/my/index.wxss

@@ -138,13 +138,11 @@
   border: none;
 }
 .container .scrollViewBox {
-  height: 330rpx;
+  position: relative;
+  width: 100vw;
 }
 .container .scrollViewBox .goodsList {
-  position: absolute;
   margin-top: 40rpx;
-  left: 0;
-  padding-left: 20rpx;
   width: 100%;
   height: 310rpx;
   white-space: nowrap;
@@ -199,6 +197,12 @@
 .container .scrollViewBox .goodsList .pbbg3 .pay {
   background: linear-gradient(325deg, #FFBD96 0%, #FFF1E7 100%);
 }
+.container .scrollViewBox .goodsTips {
+  position: absolute;
+  font-size: 24rpx;
+  color: #555;
+  bottom: 0;
+}
 .container .longpressBox {
   position: relative;
 }

+ 8 - 2
salesperson/pages/saleOffice/index.js

@@ -1,7 +1,6 @@
 import {
     getMyInfo,
 } from '~/api/user'
-import share from '~/mixins/share'
 import event from '~/mixins/event'
 import {
     getSaleData
@@ -13,7 +12,7 @@ import {
     store
 } from '~/store/index'
 Page({
-    behaviors: [share,event],
+    behaviors: [event],
     data: {
         allIncome: {}
     },
@@ -42,4 +41,11 @@ Page({
     openInvite() {
         this.selectComponent("#InvitePop").openInvite()
     },
+    onShareAppMessage() {
+        return {
+            title: '这个小程序太赞了!孩子朗读能力蹭蹭上涨,推荐你试试!',
+            path: `/pages/index/index?uid=${wx.getStorageSync('uid')}`,
+            imageUrl: 'http://reader-wx.ai160.com/images/reader/v3/375-300.png',
+        }
+    }
 })