diff --git a/backend/app/http/posts.go b/backend/app/http/posts.go index 465c49f..0b0b871 100644 --- a/backend/app/http/posts.go +++ b/backend/app/http/posts.go @@ -166,6 +166,9 @@ type PlayUrl struct { // @Bind user local func (ctl *posts) Play(ctx fiber.Ctx, id int64, user *model.Users) (*PlayUrl, error) { log := log.WithField("PlayPostID", strconv.FormatInt(id, 10)) + // return &PlayUrl{ + // Url: "https://github.com/mediaelement/mediaelement-files/raw/refs/heads/master/big_buck_bunny.mp4", + // }, nil log.Infof("Fetching play URL for post ID: %d", id) post, err := models.Posts.GetByID(ctx.Context(), id) diff --git a/backend/frpc.toml b/backend/frpc.toml index f1d6f67..522abf9 100644 --- a/backend/frpc.toml +++ b/backend/frpc.toml @@ -6,5 +6,5 @@ name = "test-http" type = "tcp" localIP = "127.0.0.1" #localPort = 8088 -localPort = 3000 +localPort = 8088 remotePort = 1423 diff --git a/frontend/wechat/bun.lockb b/frontend/wechat/bun.lockb index b4ae202..3fb4616 100755 Binary files a/frontend/wechat/bun.lockb and b/frontend/wechat/bun.lockb differ diff --git a/frontend/wechat/package.json b/frontend/wechat/package.json index c544a0c..5532b20 100644 --- a/frontend/wechat/package.json +++ b/frontend/wechat/package.json @@ -21,7 +21,9 @@ "vue-icons-plus": "^0.1.8", "vue-router": "^4.5.0", "wechat-js-sdk": "^1.3.3", - "weixin-js-sdk": "^1.6.5" + "weixin-js-sdk": "^1.6.5", + "xgplayer": "^3.0.22", + "xgplayer-mp4": "^3.0.22" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.2", diff --git a/frontend/wechat/src/hooks/useWxSDK.js b/frontend/wechat/src/hooks/useWxSDK.js index c476224..3113596 100644 --- a/frontend/wechat/src/hooks/useWxSDK.js +++ b/frontend/wechat/src/hooks/useWxSDK.js @@ -40,12 +40,12 @@ export function useWxSDK() { title: shareInfo.title, // 分享标题 link: shareInfo.link, // 分享链接,可以不是当前页面,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: shareInfo.imgUrl, - success: function () { + success: function (e) { console.log("分享朋友圈成功", e); // 用户确认分享后执行的回调函数 onSuccess(); }, - cancel: function () { + cancel: function (e) { console.log("分享朋友圈取消", e); onCancel(); // 用户取消分享后执行的回调函数 diff --git a/frontend/wechat/src/views/ArticleDetail.vue b/frontend/wechat/src/views/ArticleDetail.vue index 4775042..6d95b37 100644 --- a/frontend/wechat/src/views/ArticleDetail.vue +++ b/frontend/wechat/src/views/ArticleDetail.vue @@ -1,6 +1,11 @@