Ver código fonte

分享图片

Silent 6 anos atrás
pai
commit
e6aa4806a3

+ 1 - 1
app/Http/Controllers/WeChat/ApiController.php

xqd
@@ -145,6 +145,6 @@ class ApiController extends Controller
             return response()->json(['status' => 'fail', 'info' => '分享文字位置错误或未设置!']);
         }
 
-        return response()->json(['status' => 'success', 'width' => $image->width(), 'height' => $image->height(), 'shareImage' => $image_url, 'shareText' => $text, 'shareTextPos' => $share_text_pos->value]);
+        return response()->json(['status' => 'success', 'width' => $image->width(), 'height' => $image->height(), 'shareImage' => $image_url, 'shareText' => $text, 'shareTextPosX' => $pos[0], 'shareTextPosY' => $pos[1]]);
     }
 }

+ 0 - 1
wechat/pages/index/index.js

xqd
@@ -41,7 +41,6 @@ Page({
       },
       success: res => {
         if(res.data.status == 'success') {
-          console.log(res)
           this.setData({
             shareCanvasWidth: res.data.width,
             shareCanvasHeight: res.data.height,