// 1 anno fa
parent
commit
d090e119c9

+ 1 - 1
component/activityPop/index.less

@@ -8,7 +8,7 @@
     flex-direction: column;
     align-items: center;
     z-index: 999;
-    background-color: rgba(0, 0, 0, 0.46);
+    background-color: rgba(0, 0, 0, 0.60);
 
     .closeImg {
         width: 46rpx;

+ 1 - 1
component/activityPop/index.wxml

@@ -1,4 +1,4 @@
-<view class="popBox" wx:if="{{state}}">
+<view class="popBox" wx:if="{{state}}" catchtouchmove='true'>
     <image src="/static/image/lollipop.png" class="closeImg" catchtap="close" />
     <image src="http://reader-wx.ai160.com/images/reader/card/dialog.png" class="activityImg" catchtap="jumpDet" />
 </view>

+ 1 - 1
component/activityPop/index.wxss

@@ -8,7 +8,7 @@
   flex-direction: column;
   align-items: center;
   z-index: 999;
-  background-color: rgba(0, 0, 0, 0.46);
+  background-color: rgba(0, 0, 0, 0.6);
 }
 .popBox .closeImg {
   width: 46rpx;

+ 24 - 1
pages/activityDet/index.js

@@ -25,6 +25,8 @@ Page({
         // 线上录音地址
         audioPath: '',
         uploadState: false,
+        focusTo: false,
+        focusFrom: false,
         // 此id保存模板使用
         id: '',
         greeting: [],
@@ -49,6 +51,7 @@ Page({
             bits: configure.bgMusicLength[1]
         })
         this.innerAudioContext = wx.createInnerAudioContext();
+        this.innerAudioContext.src = configure.bgMusic; // 这里可以是录音的临时路径
         // 录音授权
         wx.getSetting({
             success(res) {
@@ -73,6 +76,7 @@ Page({
         wx.chooseMedia({
             count: 1,
             mediaType: ['image'],
+            sizeType: ['compressed'], // 必须放在 数组里面才有效; original 原图;compressed 压缩图
             sourceType: ['album', 'camera'],
             camera: 'back',
             success: (res) => {
@@ -97,7 +101,6 @@ Page({
     },
     play() {
         if (this.data.state == 'before') {
-            this.innerAudioContext.src = this.data.configure.bgMusic; // 这里可以是录音的临时路径
             this.innerAudioContext.play();
             this.innerAudioContext.onEnded((res) => {
                 console.log('音频播放完毕');
@@ -239,6 +242,19 @@ Page({
             })
         }
     },
+    focusInput({
+        currentTarget
+    }) {
+        if (currentTarget.dataset.input == 'from') {
+            this.setData({
+                focusFrom: true
+            })
+        } else {
+            this.setData({
+                focusTo: true
+            })
+        }
+    },
     // 上传图片
     uploadFile(filePath) {
         return new Promise((resolve, reject) => {
@@ -353,6 +369,13 @@ Page({
             }
         }
     },
+    onShareTimeline() {
+        return {
+            title: '拜年还能这么玩?语音贺卡超有趣,点我开玩!',
+            query: `uid=${wx.getStorageSync('uid')}&id=${this.data.id}`,
+            imageUrl: 'http://reader-wx.ai160.com/images/reader/v3/xkx_logo.jpg'
+        }
+    },
     // 设置时间文案
     setDuration(label, s) {
         let t = '';

+ 2 - 2
pages/activityDet/index.less

@@ -159,10 +159,10 @@
 
     .blessing {
         margin-top: 30rpx;
-        font-size: 32rpx;
+        font-size: 36rpx;
 
         .content {
-            height: 66rpx;
+            height: 80rpx;
             width: 600rpx;
             text-align: center;
             margin: 0rpx auto;

+ 4 - 4
pages/activityDet/index.wxml

@@ -5,16 +5,16 @@
             style="top:{{configure.templateBase.fromTop}}rpx;left: {{configure.templateBase.fromLeft}}rpx;">
             <input value="{{configure.fromText}}" disabled="{{state=='process'}}" class="text" maxlength='8'
                 style="color:{{configure.fromColor}};font-size: {{configure.fromFontSize}}rpx;border-color: {{state=='before'?configure.fromColor+'60':'transparent'}};width: {{configure.templateBase.fromWidth}}rpx; text-align: {{configure.fromTextAlign}};"
-                bindinput="bindKeyInput" data-type='from' />
-            <view class="editBtn">
+                bindinput="bindKeyInput" data-type='from' focus="{{focusFrom}}" />
+            <view class="editBtn" bindtap="focusInput" data-input='from'>
                 <image src="/static/image/edit_new.png" wx:if="{{state!='process'}}" />
             </view>
         </view>
         <view class="toBox" style="top:{{configure.templateBase.toTop}}rpx;left: {{configure.templateBase.toLeft}}rpx;">
             <input value="{{configure.toText}}" disabled="{{state=='process'}}" class="text" maxlength='8'
                 style="color:{{configure.toColor}};font-size: {{configure.toFontSize}}rpx;border-color: {{state=='before'?configure.toColor+'60':'transparent'}};width: {{configure.templateBase.toWidth}}rpx;text-align:{{configure.toTextAlign}};"
-                bindinput="bindKeyInput" data-type='to' />
-            <view class="editBtn">
+                bindinput="bindKeyInput" data-type='to' focus="{{focusTo}}" />
+            <view class="editBtn" bindtap="focusInput" data-input='to'>
                 <image src="/static/image/edit_new.png" wx:if="{{state!='process'}}" />
             </view>
         </view>

+ 2 - 2
pages/activityDet/index.wxss

@@ -140,10 +140,10 @@
 }
 .activityDet .blessing {
   margin-top: 30rpx;
-  font-size: 32rpx;
+  font-size: 36rpx;
 }
 .activityDet .blessing .content {
-  height: 66rpx;
+  height: 80rpx;
   width: 600rpx;
   text-align: center;
   margin: 0rpx auto;

+ 5 - 6
utils/request.js

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