@jx3box/jx3box-common-ui 9.2.7 → 9.2.9

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.
@@ -62,37 +62,44 @@ a{
62
62
  .c-main{margin:0;.w(100%);}
63
63
  }
64
64
 
65
- @media screen and (max-width:@phone){
66
- .env-app{
67
- .c-main{
68
- .mt(0);
69
- }
65
+ .env-app{
66
+ .c-main{
67
+ .mt(0);
70
68
  }
69
+ }
71
70
 
72
- .v-miniprogram {
73
- &.from-seasun {
74
- .c-wiki-comments {
75
- .none;
76
- }
77
-
78
- .m-single-comment {
79
- .none;
80
- }
71
+ .v-miniprogram {
72
+ // 针对seasun
73
+ &.from-seasun {
74
+ .c-wiki-comments {
75
+ .none;
81
76
  }
82
77
  }
83
78
 
84
- .v-miniprogram {
85
- .w-share2,.w-boxcoin-admin {
79
+ .w-share2,.w-boxcoin-admin {
80
+ .none;
81
+ }
82
+
83
+ .w-thx-records {
84
+ .u-client {
86
85
  .none;
87
86
  }
87
+ .u-delete {
88
+ .none;
89
+ }
90
+ }
91
+
92
+ .m-single-comment {
93
+ .none;
94
+ }
95
+
96
+ .c-comment-box {
97
+ .none;
98
+ }
88
99
 
89
- .w-thx-records {
90
- .u-client {
91
- .none;
92
- }
93
- .u-delete {
94
- .none;
95
- }
100
+ &.is-comment-show {
101
+ .m-single-comment {
102
+ .db;
96
103
  }
97
104
  }
98
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "9.2.7",
3
+ "version": "9.2.9",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -279,7 +279,7 @@ export default {
279
279
  tab: "post",
280
280
 
281
281
  post: {},
282
- post_id: "96614",
282
+ post_id: "68836",
283
283
 
284
284
  author: "",
285
285
  wikiPost: null,
package/src/Header.vue CHANGED
@@ -19,7 +19,7 @@
19
19
  <slot></slot>
20
20
 
21
21
  <!-- user -->
22
- <header-user ref="user" :client="client" />
22
+ <header-user ref="user" :client="client" :asset="asset" />
23
23
  </div>
24
24
  <Box class="c-header-jx3box" :overlayEnable="overlayEnable" :client="client" />
25
25
  </header>
@@ -48,6 +48,8 @@ export default {
48
48
  return {
49
49
  isOverlay: false,
50
50
  isApp: isApp(),
51
+
52
+ asset: {},
51
53
  };
52
54
  },
53
55
  computed: {
@@ -100,6 +102,10 @@ export default {
100
102
 
101
103
  token && localStorage.setItem("__token", token);
102
104
 
105
+ if (User.isLogin()) {
106
+ this.loadAsset();
107
+ }
108
+
103
109
  // 获取全局配置
104
110
  getGlobalConfig().then(async (res) => {
105
111
  const global_token_version = res.token_version;
@@ -135,6 +141,18 @@ export default {
135
141
  var r = window.location.search.substr(1).match(reg);
136
142
  return r ? decodeURIComponent(r[2]) : null;
137
143
  },
144
+ // 资产
145
+ loadAsset: function () {
146
+ User.getAsset().then((data) => {
147
+ this.asset = data;
148
+
149
+ const level = User.getLevel(this.asset?.experience);
150
+
151
+ if (level > 2) {
152
+ document.documentElement.classList.add("is-comment-show");
153
+ }
154
+ });
155
+ },
138
156
  },
139
157
  created: function () {
140
158
  this.init();
@@ -52,6 +52,22 @@ import userInfo from "./userInfo.vue";
52
52
  // import langSwitch from "./langSwitch.vue";
53
53
  import shop from "./shop.vue";
54
54
  export default {
55
+ props: {
56
+ asset: {
57
+ type: Object,
58
+ default: () => {
59
+ return {
60
+ expire_date: "2022-03-07T00:00:00+08:00",
61
+ total_day: 395,
62
+ was_vip: 0,
63
+
64
+ pro_expire_date: "2022-03-07T00:00:00+08:00",
65
+ pro_total_day: 366,
66
+ was_pro: 0,
67
+ };
68
+ },
69
+ }
70
+ },
55
71
  components: {
56
72
  message,
57
73
  publish,
@@ -69,17 +85,6 @@ export default {
69
85
  user: User.getInfo(),
70
86
  isLogin: User.isLogin(),
71
87
 
72
- // VIP
73
- asset: {
74
- expire_date: "2022-03-07T00:00:00+08:00",
75
- total_day: 395,
76
- was_vip: 0,
77
-
78
- pro_expire_date: "2022-03-07T00:00:00+08:00",
79
- pro_total_day: 366,
80
- was_pro: 0,
81
- },
82
-
83
88
  // 链接
84
89
  login_url: __Links.account.login + "?redirect=" + location.href,
85
90
  register_url: __Links.account.register + "?redirect=" + location.href,
@@ -125,16 +130,9 @@ export default {
125
130
  console.log(e);
126
131
  }
127
132
  },
128
- // 资产
129
- loadAsset: function () {
130
- User.getAsset().then((data) => {
131
- this.asset = data;
132
- });
133
- },
134
133
  // 初始化
135
134
  init: function () {
136
135
  if (this.isLogin) {
137
- this.loadAsset();
138
136
  this.signIn();
139
137
  }
140
138
  },
@@ -46,6 +46,7 @@ export default {
46
46
  show: true,
47
47
  visible: false,
48
48
  commit_hash: "",
49
+ isMobile: window.innerWidth < 768,
49
50
  };
50
51
  },
51
52
  computed: {
@@ -91,6 +92,9 @@ export default {
91
92
  });
92
93
  },
93
94
  handleContrast(item) {
95
+ if (this.isMobile) {
96
+ return;
97
+ }
94
98
  this.commit_hash = item.commit_hash;
95
99
  this.visible = true;
96
100
  },
@@ -165,6 +169,9 @@ export default {
165
169
 
166
170
  .u-compare {
167
171
  .db;
172
+ @media screen and (max-width: @phone) {
173
+ .none;
174
+ }
168
175
  }
169
176
  }
170
177
  .pointer;