Browse Source

添加分享

lex-xin 4 months ago
parent
commit
a4abffe8c5

+ 4 - 5
miniprogram/app.ts

@@ -18,11 +18,6 @@ App<IAppOption>({
     // logs.unshift(Date.now())
     // wx.setStorageSync('logs', logs)
 
-    wx.showLoading({
-      mask: true,
-      title: "加载中...",
-    });
-
     this.setAppId();
 
     // 登录
@@ -53,6 +48,10 @@ App<IAppOption>({
   // }
   /** 微信登录 */
   async onLogin(code: string) {
+    wx.showLoading({
+      mask: true,
+      title: "加载中...",
+    });
     try {
       // 开始登录
       const { data } = await api_login({

+ 6 - 6
miniprogram/pages/download/download.ts

@@ -81,11 +81,11 @@ Page({
   onReachBottom() {
 
   },
-
-  /**
-   * 用户点击右上角分享
-   */
   onShareAppMessage() {
-
-  }
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
+  },
 })

+ 14 - 0
miniprogram/pages/index/index.ts

@@ -336,6 +336,20 @@ Page({
       scrollIntoViewType: true,
     })
   },
+  onShareAppMessage() {
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
+  },
+  onShareTimeline() {
+    return {
+      title: '/音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
+  }
   // onLookMore() {
   //   this.setData({
   //     popupShow: true

+ 5 - 5
miniprogram/pages/login/login.ts

@@ -131,11 +131,11 @@ Page({
   onReachBottom() {
 
   },
-
-  /**
-   * 用户点击右上角分享
-   */
   onShareAppMessage() {
-
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
   }
 })

+ 5 - 1
miniprogram/pages/orders/order-detail.ts

@@ -222,6 +222,10 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage() {
-
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
   }
 })

+ 8 - 1
miniprogram/pages/orders/order-result.ts

@@ -305,5 +305,12 @@ Page({
         });
       }
     })
-  }
+  },
+  onShareAppMessage() {
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
+  },
 })

+ 7 - 0
miniprogram/pages/orders/orders.ts

@@ -375,4 +375,11 @@ Page({
       })
     }, 1500);
   },
+  onShareAppMessage() {
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
+  },
 })

+ 5 - 1
miniprogram/pages/protocol/register.ts

@@ -96,6 +96,10 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage() {
-
+    return {
+      title: '音乐数字AI',
+      path: '/pages/index/index',
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1733309357691.png'
+    }
   }
 })