// před 1 rokem
rodič
revize
18dfefa992

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 638 - 622
component/yeyouzi-cropper/yeyouzi-cropper.js


+ 26 - 21
component/yeyouzi-cropper/yeyouzi-cropper.wxml

@@ -1,30 +1,35 @@
 <!--components/yeyouzi-cropper/yeyouzi-cropper.wxml-->
 <!-- <view class="Container{{img.path != '' ? '-show' : ''}}"> -->
 <view class="Container-show" wx:if="{{img.path != ''}}">
-  <view class="imgContainer">
-    <canvas type="2d" id="cutCanvas" style="width: 100%;height: 100%;z-index:9999;" bindtouchstart="_touchStart" bindtouchend="_touchEnd" bindtouchmove="_touchMove" ></canvas>
+    <view class="imgContainer">
+        <canvas type="2d" id="cutCanvas" style="width: 100%;height: 100%;z-index:9999;" bindtouchstart="_touchStart"
+            bindtouchend="_touchEnd" bindtouchmove="_touchMove"></canvas>
 
-    <view style="position: absolute;top:{{imageTop}}px;left: {{imageLeft}}px;transform: rotateY({{imgMirror}}deg);transform-origin:{{originWidthShow * 100}}% {{originHeightShow * 100}}%;">
-      <image src="{{img.path}}" style="width:{{imageWidth}}px;height:{{imageHeight}}px;transform: rotateZ({{imgMirror == 180 ? -imgRotate : imgRotate}}deg);transform-origin:{{originWidthShow * 100}}% {{originHeightShow * 100}}%;"></image>
-    </view>
+        <view
+            style="position: absolute;top:{{imageTop}}px;left: {{imageLeft}}px;transform: rotateY({{imgMirror}}deg);transform-origin:{{originWidthShow * 100}}% {{originHeightShow * 100}}%;">
+            <image src="{{img.path}}"
+                style="width:{{imageWidth}}px;height:{{imageHeight}}px;transform: rotateZ({{imgMirror == 180 ? -imgRotate : imgRotate}}deg);transform-origin:{{originWidthShow * 100}}% {{originHeightShow * 100}}%;">
+            </image>
+        </view>
 
-  </view>
-  <view class="settingContainer">
-    <view class="rotate" style="color: #fff;width: 100%;text-align: center;">{{imgRotate}}°</view>
-    <view class="rotateContainer">
-      <text style="color: #fff;font-size: 20px;" bindtap="_imageMirror">⇌</text>
-      <slider style="width: 100%;" min="-180" max="180" value="{{imgRotate}}" block-size="18px" selected-color="#fff" bindchanging="_rotateChange"></slider>
-      <text style="color: #fff;font-size: 22px;" bindtap="_rotateNinety">⊙</text>
     </view>
+    <view class="settingContainer">
+        <view class="rotate" style="color: #fff;width: 100%;text-align: center;">{{imgRotate}}°</view>
+        <view class="rotateContainer">
+            <text style="color: #fff;font-size: 20px;" bindtap="_imageMirror">⇌</text>
+            <slider style="width: 100%;" min="-180" max="180" value="{{imgRotate}}" block-size="18px"
+                selected-color="#fff" bindchanging="_rotateChange"></slider>
+            <text style="color: #fff;font-size: 22px;" bindtap="_rotateNinety">⊙</text>
+        </view>
+
+        <view class="btnContainer">
+            <text style="color: #fff;font-size: 24px;" bindtap="_cancelCut">×</text>
+            <!--    <text style="color: #fff;font-size: 16px;text-align:center;align-self: center;" bindtap="_imgRestore">还原</text> -->
+            <text style="color: #fff;font-size: 24px;" bindtap="_confirmCut">✓</text>
+        </view>
 
-    <view class="btnContainer">
-      <text style="color: #fff;font-size: 24px;" bindtap="_cancelCut">×</text>
-      <text style="color: #fff;font-size: 16px;text-align:center;align-self: center;" bindtap="_imgRestore">还原</text>
-      <text style="color: #fff;font-size: 24px;" bindtap="_confirmCut">✓</text>
     </view>
-    
-  </view>
 
-  <canvas type="2d" id="imgCanvas" style="width: 0;height: 0;"></canvas>
-  
-</view>
+    <canvas type="2d" id="imgCanvas" style="width: 0;height: 0;"></canvas>
+
+</view>

+ 5 - 16
pages/activityDet/index.js

@@ -32,20 +32,7 @@ Page({
         greeting: [],
         // 是否更改过头像
         changeAvatarFlag: false,
-        greetingCard: {
-            audioPath: "https://reader-wx.ai160.com/reader/resource/20230111/1673407488488535.mp3",
-            cardUrl: "https://reader-wx.ai160.com/reader/resource/20230111/1673407490510737.png",
-            duration: 6,
-            gmtCreated: null,
-            gmtModified: null,
-            id: 1673407492033889,
-            likeAmount: null,
-            playAmount: null,
-            status: null,
-            templateId: 50,
-            templateName: "",
-            uid: "9db2bedb2b9b47c5b0358bb9bec39145"
-        },
+        greetingCard: null,
         userAudioState: false,
         // 当前音频播放时长
         playTime: '00:00',
@@ -254,12 +241,12 @@ Page({
     bindKeyInput(e) {
         if (e.currentTarget.dataset.type == 'from') {
             this.setData({
-                fromWidth: e.detail.cursor * this.data.configure.fromFontSize,
+                fromWidth: e.detail.value.length * this.data.configure.fromFontSize,
                 'configure.fromText': e.detail.value
             })
         } else if (e.currentTarget.dataset.type == 'to') {
             this.setData({
-                toWidth: e.detail.cursor * this.data.configure.toFontSize,
+                toWidth: e.detail.value.length * this.data.configure.toFontSize,
                 'configure.toText': e.detail.value
             })
         }
@@ -315,8 +302,10 @@ Page({
                         bgImg.src = this.data.configure.bgImg
                         bgImg.onload = () => {
                             ctx.drawImage(bgImg, 0, 0, 375, 300);
+                            ctx.fillStyle = `${this.data.configure.toColor}`;
                             ctx.font = `${this.data.configure.fromFontSize/2}px PingFang`;
                             ctx.fillText(this.data.configure.toText, this.data.configure.templateBase.toLeft / 2, this.data.configure.templateBase.toTop / 2 + this.data.configure.fromFontSize / 2)
+                            ctx.fillStyle = `${this.data.configure.fromColor}`;
                             ctx.fillText(this.data.configure.fromText, this.data.configure.templateBase.fromLeft / 2, this.data.configure.templateBase.fromTop / 2 + this.data.configure.toFontSize / 2)
                             console.log(this.data.configure.toText, this.data.configure.templateBase.toLeft / 2, this.data.configure.templateBase.toTop / 2);
                             console.log(this.data.configure.fromText, this.data.configure.templateBase.fromLeft / 2, this.data.configure.templateBase.fromTop / 2);

+ 195 - 191
pages/activityDet/index.less

@@ -1,206 +1,210 @@
 .activityDet {
-  width: 100vw;
-  min-height: 100vh;
-  background-color: #f2f6fc;
-
-  .header {
-    position: relative;
-    width: 100%;
-    height: 600rpx;
-    overflow: hidden;
-
-    .templateImg {
-      position: relative;
-      width: 100%;
-      height: 100%;
-      z-index: 2;
-    }
-
-    .toBox {
-      position: absolute;
-      display: flex;
-      align-items: center;
-      z-index: 3;
-
-      .text {
-        min-width: 80rpx;
-        color: white;
-        padding: 0rpx 4rpx;
-        z-index: 0rpx;
-        border: 2rpx dashed white;
-      }
-
-      image {
-        width: 22rpx;
-        height: 26rpx;
-        margin-left: 8rpx;
-        z-index: 1;
-      }
-    }
-
-    .avatar {
-      position: absolute;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: flex-end;
-      z-index: 3;
-
-      .tips {
-        width: 150rpx;
-        font-size: 24rpx;
-        padding: 4rpx 20rpx;
-        border-radius: 50rpx;
-        color: white;
-        background-color: rgba(0, 0, 0, 0.4);
-      }
-    }
-
-    .avatarImg {
-      position: absolute;
-      display: block;
-    }
+    width: 100vw;
+    min-height: 100vh;
+    background-color: #f2f6fc;
 
-    .progressBox {
-      position: absolute;
-      bottom: 0px;
-      left: 0px;
-      padding: 20rpx 40rpx;
-      box-sizing: border-box;
-      width: 100%;
-      background-color: rgba(0, 0, 0, 0.5);
-      z-index: 2;
-      display: flex;
-      align-items: center;
-      color: white;
-      font-size: 24rpx;
-
-      .progress {
-        flex: 1;
-        margin: 0px 30rpx;
-        border-radius: 25rpx;
+    .header {
+        position: relative;
+        width: 100%;
+        height: 600rpx;
         overflow: hidden;
-      }
-    }
-  }
-
-  .btnsBox {
-    margin-top: 40rpx;
-    position: relative;
-    text-align: center;
-    font-size: 0rpx;
-
-    .recordingBox {
-      position: relative;
-      display: inline-block;
-      margin: 0 auto;
-
-      .readingNow {
-        position: absolute;
-        left: 66rpx;
-        top: 26rpx;
-        width: 40rpx;
-        height: 30rpx;
-      }
-    }
 
-    .send {
-      width: 313rpx;
-      height: 88rpx;
+        .templateImg {
+            position: relative;
+            width: 100%;
+            height: 100%;
+            z-index: 2;
+        }
+
+        .toBox {
+            position: absolute;
+            display: flex;
+            align-items: center;
+            z-index: 3;
+
+            .text {
+                min-width: 80rpx;
+                color: white;
+                padding: 0rpx 4rpx;
+                z-index: 0rpx;
+                border: 2rpx dashed white;
+            }
+
+            image {
+                width: 22rpx;
+                height: 26rpx;
+                margin-left: 8rpx;
+                z-index: 1;
+            }
+        }
+
+        .avatar {
+            position: absolute;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: flex-end;
+            z-index: 3;
+
+            .tips {
+                width: 150rpx;
+                font-size: 24rpx;
+                padding: 4rpx 20rpx;
+                border-radius: 50rpx;
+                color: white;
+                background-color: rgba(0, 0, 0, 0.4);
+            }
+        }
+
+        .avatarImg {
+            position: absolute;
+            display: block;
+        }
+
+        .progressBox {
+            position: absolute;
+            bottom: 0px;
+            left: 0px;
+            padding: 20rpx 40rpx;
+            box-sizing: border-box;
+            width: 100%;
+            background-color: rgba(0, 0, 0, 0.5);
+            z-index: 2;
+            display: flex;
+            align-items: center;
+            color: white;
+            font-size: 24rpx;
+
+            .progress {
+                flex: 1;
+                margin: 0px 30rpx;
+                border-radius: 25rpx;
+                overflow: hidden;
+            }
+        }
     }
 
-    .countDown {
-      position: absolute;
-      right: 20rpx;
-      top: 0px;
-      bottom: 0px;
-      margin: auto;
-      display: flex;
-      align-items: center;
-      color: #FD3545;
-      font-size: 22rpx;
-      font-weight: bold;
-
-      .countBox {
-        padding: 10rpx;
-        border-radius: 10rpx;
-        margin: 0rpx 4rpx;
-        color: white;
-        background-image: linear-gradient(180deg, #FF7079 0%, #FE3D44 100%);
-      }
-    }
-  }
-
-  .music {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    margin-top: 40rpx;
-    padding: 0rpx 20rpx;
-    font-size: 0rpx;
-    box-sizing: border-box;
-
-    .playAuido {
-      width: 214rpx;
-      height: 87rpx;
+    .btnsBox {
+        margin-top: 40rpx;
+        position: relative;
+        text-align: center;
+        font-size: 0rpx;
+
+        .recordingBox {
+            position: relative;
+            display: inline-block;
+            margin: 0 auto;
+
+            .readingNow {
+                position: absolute;
+                left: 66rpx;
+                top: 26rpx;
+                width: 40rpx;
+                height: 30rpx;
+            }
+        }
+
+        .send {
+            width: 313rpx;
+            height: 88rpx;
+        }
+
+        .countDown {
+            position: absolute;
+            right: 20rpx;
+            top: 0px;
+            bottom: 0px;
+            margin: auto;
+            display: flex;
+            align-items: center;
+            color: #FD3545;
+            font-size: 22rpx;
+            font-weight: bold;
+
+            .countBox {
+                padding: 10rpx;
+                border-radius: 10rpx;
+                margin: 0rpx 4rpx;
+                color: white;
+                background-image: linear-gradient(180deg, #FF7079 0%, #FE3D44 100%);
+            }
+        }
     }
 
-    .share {
-      width: 500rpx;
-      height: 87rpx;
-      line-height: 87rpx;
-      color: white;
-      font-size: 30rpx;
-      background: url('http://reader-wx.ai160.com/images/reader/card/share.png')no-repeat;
-      background-size: 100% 100%;
+    .music {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 40rpx;
+        padding: 0rpx 20rpx;
+        font-size: 0rpx;
+        box-sizing: border-box;
+
+        .playAuido {
+            width: 214rpx;
+            height: 87rpx;
+        }
+
+        .share {
+            width: 500rpx;
+            height: 87rpx;
+            line-height: 87rpx;
+            color: white;
+            font-size: 30rpx;
+            background: url('http://reader-wx.ai160.com/images/reader/card/share.png')no-repeat;
+            background-size: 100% 100%;
+        }
     }
-  }
 
-  .blessing {
-    margin-top: 30rpx;
-    font-size: 36rpx;
+    .blessing {
+        margin-top: 30rpx;
+        font-size: 36rpx;
+
+        .content {
+            height: 38rpx;
+            width: 600rpx;
+            text-align: center;
+            margin: 20rpx auto 0rpx;
+        }
 
-    .content {
-      height: 38rpx;
-      width: 600rpx;
-      text-align: center;
-      margin: 20rpx auto 0rpx;
+        .content:first-child {
+            opacity: .7;
+        }
     }
-  }
 
-  .mask {
-    position: fixed;
-    left: 0px;
-    top: 0px;
-    width: 100vw;
-    height: 100vh;
-    background-color: rgba(0, 0, 0, 0.2);
-    z-index: 999;
-
-    .maskBox {
-      position: fixed;
-      top: 0rpx;
-      right: 0rpx;
-      bottom: 0rpx;
-      left: 0rpx;
-      margin: auto;
-      padding: 71rpx 30rpx 30rpx;
-      box-sizing: border-box;
-      width: 290rpx;
-      height: 290rpx;
-      border-radius: 30rpx;
-      color: white;
-      background-color: rgba(0, 0, 0, 0.8);
-      text-align: center;
-      font-size: 30rpx;
-      z-index: 10;
-
-      .img {
-        width: 110rpx;
-        height: 110rpx;
-        margin-bottom: 20rpx;
-        animation: identifier 2.6s infinite linear;
-      }
+    .mask {
+        position: fixed;
+        left: 0px;
+        top: 0px;
+        width: 100vw;
+        height: 100vh;
+        background-color: rgba(0, 0, 0, 0.2);
+        z-index: 999;
+
+        .maskBox {
+            position: fixed;
+            top: 0rpx;
+            right: 0rpx;
+            bottom: 0rpx;
+            left: 0rpx;
+            margin: auto;
+            padding: 71rpx 30rpx 30rpx;
+            box-sizing: border-box;
+            width: 290rpx;
+            height: 290rpx;
+            border-radius: 30rpx;
+            color: white;
+            background-color: rgba(0, 0, 0, 0.8);
+            text-align: center;
+            font-size: 30rpx;
+            z-index: 10;
+
+            .img {
+                width: 110rpx;
+                height: 110rpx;
+                margin-bottom: 20rpx;
+                animation: identifier 2.6s infinite linear;
+            }
+        }
     }
-  }
 }

+ 3 - 0
pages/activityDet/index.wxss

@@ -147,6 +147,9 @@
   text-align: center;
   margin: 20rpx auto 0rpx;
 }
+.activityDet .blessing .content:first-child {
+  opacity: 0.7;
+}
 .activityDet .mask {
   position: fixed;
   left: 0px;

+ 1 - 1
pages/activityList/index.less

@@ -4,7 +4,7 @@
 
     .headImg {
         width: 750rpx;
-        height: 600rpx;
+        height: 240rpx;
     }
 
     .body {

+ 1 - 1
pages/activityList/index.wxss

@@ -4,7 +4,7 @@
 }
 .aDet .headImg {
   width: 750rpx;
-  height: 600rpx;
+  height: 240rpx;
 }
 .aDet .body {
   display: flex;

+ 5 - 5
utils/request.js

@@ -6,13 +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) {