@jx3box/jx3box-common-ui 5.5.19 → 5.5.23

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/index.js CHANGED
@@ -5,7 +5,7 @@ import Breadcrumb from './src/Breadcrumb.vue'
5
5
  import LeftSidebar from './src/LeftSidebar.vue'
6
6
  import LeftSideToggle from './src/LeftSideToggle.vue'
7
7
  import Author from './src/Author.vue'
8
- import Avatar from './src/Avatar.vue'
8
+ import Avatar from './src/author/Avatar.vue'
9
9
  import RightSidebar from './src/RightSidebar.vue'
10
10
  import RightSideMsg from './src/RightSideMsg.vue'
11
11
  import Main from './src/Main.vue'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.5.19",
3
+ "version": "5.5.23",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,8 +30,8 @@
30
30
  "last 2 versions"
31
31
  ],
32
32
  "dependencies": {
33
- "@jx3box/jx3box-comment-ui": "^1.6.7",
34
- "@jx3box/jx3box-common": "^7.0.17",
33
+ "@jx3box/jx3box-comment-ui": "^1.6.8",
34
+ "@jx3box/jx3box-common": "^7.0.19",
35
35
  "@jx3box/jx3box-data": "^1.8.3",
36
36
  "@jx3box/jx3box-editor": "^1.2.4",
37
37
  "axios": "^0.19.2",
package/service/author.js CHANGED
@@ -39,7 +39,7 @@ function getUserMedals(uid) {
39
39
  }
40
40
 
41
41
  function getFrames() {
42
- return axios.get(__imgPath + "data/user_avatar_frame.json");
42
+ return axios.get(__imgPath + "avatar/index.json");
43
43
  }
44
44
 
45
45
  function getUserPublicTeams(uid) {
@@ -12,8 +12,9 @@
12
12
  src="../assets/img/bread/menu.svg"
13
13
  />
14
14
  </div>
15
- <a class="u-channel" :href="root" :class="{on:withoutLeft}">
15
+ <a class="u-channel" :href="rootLink" :class="{on:withoutLeft}">
16
16
  <i class="u-channel-logo">
17
+ <img :src="getAppIcon(slug)" v-if="!$slots.logo"/>
17
18
  <slot name="logo"></slot>
18
19
  </i>
19
20
  <span class="u-title">{{ name }}</span>
@@ -50,7 +51,7 @@
50
51
 
51
52
  <script>
52
53
  import _ from "lodash";
53
- import { publishLink } from "@jx3box/jx3box-common/js/utils";
54
+ import { publishLink,getAppIcon } from "@jx3box/jx3box-common/js/utils";
54
55
  import { __Links, feedback } from "@jx3box/jx3box-common/data/jx3box.json";
55
56
  import User from "@jx3box/jx3box-common/js/user";
56
57
  import Admin from "./bread/Admin";
@@ -87,13 +88,18 @@ export default {
87
88
  isApp: isApp(),
88
89
  };
89
90
  },
90
- computed: {},
91
+ computed: {
92
+ rootLink : function (){
93
+ return this.root || `/${this.slug}`
94
+ }
95
+ },
91
96
  methods: {
92
97
  toggleLeftSide: function () {
93
98
  let status = !this.isOpen;
94
99
  Bus.$emit("toggleLeftSide", status);
95
100
  },
96
101
  publishLink,
102
+ getAppIcon,
97
103
  },
98
104
  mounted: function () {
99
105
  Bus.$on("toggleLeftSide", (data) => {
@@ -14,7 +14,7 @@ import { __server, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
14
14
  import { getFrames } from "../../service/author";
15
15
  import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
16
16
  export default {
17
- name: "",
17
+ name: "Avatar",
18
18
  props: ["uid", "url", "size", "frame"],
19
19
  components: {},
20
20
  data: function() {
@@ -35,7 +35,7 @@ export default {
35
35
  frameUrl: function() {
36
36
  if (this.frameName) {
37
37
  let fileName = this.frames[this.frameName].files[this.style].file;
38
- return __imgPath + `image/avatar/${this.frameName}/${fileName}`;
38
+ return __imgPath + `avatar/images/${this.frameName}/${fileName}`;
39
39
  }
40
40
  return "";
41
41
  },
@@ -45,7 +45,7 @@ export default {
45
45
  style: function() {
46
46
  let style = ~~this.size;
47
47
  for(let [i,v] of this.styles.entries()){
48
- if(style < v){
48
+ if(style < v.size){
49
49
  return this.styles[i]['cls']
50
50
  }
51
51
  }
@@ -100,12 +100,13 @@ export default {
100
100
  message: "操作成功",
101
101
  type: "success",
102
102
  });
103
+ return res.data.data
103
104
  })
104
- .then(() => {
105
+ .then((data) => {
105
106
  // 1.扣除额度
106
107
  this.left -= this.count;
107
108
  // 2.将修改emit出去
108
- this.$emit('updateRecord', { count: this.count, remark: this.remark, is_user_gift: 0 });
109
+ this.$emit('updateRecord', data);
109
110
  })
110
111
  .finally(() => {
111
112
  this.visible = false;
@@ -109,9 +109,9 @@ export default {
109
109
  },
110
110
  cacheRecord: {
111
111
  deep: true,
112
- handler: function (val) {
113
- if (val) {
114
- this.list.push(val);
112
+ handler: function (data) {
113
+ if (data) {
114
+ this.list.push(data)
115
115
  // 清空父组件的cache
116
116
  this.$parent.cacheRecord = null;
117
117
  }
@@ -103,12 +103,13 @@ export default {
103
103
  message: "操作成功",
104
104
  type: "success",
105
105
  });
106
+ return res.data.data
106
107
  })
107
- .then(() => {
108
+ .then((data) => {
108
109
  // 1.扣除额度
109
110
  this.left -= this.count;
110
111
  // 2. 将新增emit出去
111
- this.$emit('updateRecord', { count: this.count, remark: this.remark, is_user_gift: 1 });
112
+ this.$emit('updateRecord', data);
112
113
  })
113
114
  .finally(() => {
114
115
  this.visible = false;
@@ -79,18 +79,8 @@ export default {
79
79
  })
80
80
  },
81
81
  // 用户打赏
82
- updateRecord: function ({ count, remark, is_user_gift }){
83
- this.cacheRecord = {
84
- count,
85
- remark,
86
- is_user_gift,
87
- operate_user_id: this.user.uid,
88
- created_at: Date.now(),
89
- ext_operate_user_info: {
90
- avatar: this.user.avatar_origin,
91
- display_name: this.user.name
92
- },
93
- }
82
+ updateRecord: function (data){
83
+ this.cacheRecord = data
94
84
  },
95
85
  },
96
86
  created: function () {},