@jx3box/jx3box-common-ui 9.0.4 → 9.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/Author.vue +1 -1
- package/src/Header.vue +17 -3
- package/src/author/AuthorRss.vue +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.6",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@jx3box/jx3box-comment-ui": "^1.9.9",
|
|
34
|
-
"@jx3box/jx3box-common": "^8.4.
|
|
34
|
+
"@jx3box/jx3box-common": "^8.4.9",
|
|
35
35
|
"@jx3box/jx3box-data": "^3.7.0",
|
|
36
36
|
"@jx3box/jx3box-editor": "^2.2.16",
|
|
37
37
|
"@jx3box/reporter": "^0.0.4",
|
package/src/Author.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<template v-if="data">
|
|
5
5
|
<div class="u-interact">
|
|
6
6
|
<!-- <AuthorFollow style="margin-right: 8px" :uid="uid" /> -->
|
|
7
|
-
<AuthorRss style="margin-right: 8px" :uid="uid" />
|
|
7
|
+
<AuthorRss style="margin-right: 8px" :uid="uid" :data="data" />
|
|
8
8
|
<!-- <AuthorGift :uid="uid" /> -->
|
|
9
9
|
<el-button class="u-btn" size="mini" @click="onMessage">
|
|
10
10
|
<img class="u-msg-icon" svg-inline :src="src" />
|
package/src/Header.vue
CHANGED
|
@@ -42,6 +42,7 @@ import nav from "./header/nav.vue";
|
|
|
42
42
|
import user from "./header/user.vue";
|
|
43
43
|
import Box from "../src/Box.vue";
|
|
44
44
|
import { isMiniProgram, miniprogramHack } from "@jx3box/jx3box-common/js/utils";
|
|
45
|
+
import miniprogram from "@jx3box/jx3box-common/data/miniprogram.json";
|
|
45
46
|
// import gameSwitch from "./header/gameSwitch.vue";
|
|
46
47
|
|
|
47
48
|
export default {
|
|
@@ -66,10 +67,23 @@ export default {
|
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
if (isMiniProgram()) {
|
|
69
|
-
document.documentElement.classList.add("wechat-miniprogram");
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
72
|
+
const appid = urlParams.get("appid");
|
|
73
|
+
const item = miniprogram?.find((item) => item.appid === appid);
|
|
74
|
+
|
|
75
|
+
if (appid && item) {
|
|
76
|
+
document.documentElement.classList.add("env-miniprogram" + item.id);
|
|
77
|
+
|
|
78
|
+
window.JX3BOX_ENV = item.id?.toUpperCase() + "_MINIPROGRAM";
|
|
79
|
+
} else {
|
|
80
|
+
document.documentElement.classList.add("wechat-miniprogram");
|
|
81
|
+
|
|
82
|
+
window.JX3BOX_ENV = "MINIPROGRAM";
|
|
83
|
+
|
|
84
|
+
// 微信小程序hack
|
|
85
|
+
miniprogramHack();
|
|
86
|
+
}
|
|
73
87
|
}
|
|
74
88
|
},
|
|
75
89
|
|
package/src/author/AuthorRss.vue
CHANGED
|
@@ -26,6 +26,10 @@ export default {
|
|
|
26
26
|
type: Number,
|
|
27
27
|
default: 0,
|
|
28
28
|
},
|
|
29
|
+
data: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: () => {},
|
|
32
|
+
},
|
|
29
33
|
},
|
|
30
34
|
data() {
|
|
31
35
|
return {
|
|
@@ -80,9 +84,10 @@ export default {
|
|
|
80
84
|
if (this.subscribed) {
|
|
81
85
|
this.unsubscribe({ id: this.uid });
|
|
82
86
|
} else {
|
|
83
|
-
subscribeAuthor({ id: this.uid })
|
|
87
|
+
subscribeAuthor({ id: this.uid, data: { title: this.data?.display_name } })
|
|
84
88
|
.then((res) => {
|
|
85
89
|
this.subscribed = true;
|
|
90
|
+
this.$message.success("订阅成功");
|
|
86
91
|
})
|
|
87
92
|
.catch((err) => {
|
|
88
93
|
console.log(err);
|