jufubao-base 1.0.77-beta6 → 1.0.77-beta8
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
CHANGED
|
@@ -14,7 +14,17 @@
|
|
|
14
14
|
</view>
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-entry__body" :style="bodyStyle">
|
|
17
|
-
<view class="entry_list" :style="entryStyle">
|
|
17
|
+
<view v-if="loadingList" class="entry_list skeleton-wrap" :style="entryStyle">
|
|
18
|
+
<view v-for="i in 5" :key="i"
|
|
19
|
+
:class="'row_num_'+rowNum"
|
|
20
|
+
class="entry_item"
|
|
21
|
+
>
|
|
22
|
+
<image v-if="rowNum == 1" style="height: 260rpx;"/>
|
|
23
|
+
<image v-if="rowNum == 2" style="height: 200rpx;"/>
|
|
24
|
+
<image v-if="rowNum == 3" style="height: 150rpx;"/>
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
27
|
+
<view v-else class="entry_list" :style="entryStyle">
|
|
18
28
|
<view v-for="(item,i) in entryList" :key="i"
|
|
19
29
|
class="entry_item"
|
|
20
30
|
:class="'row_num_'+rowNum"
|
|
@@ -52,6 +62,7 @@
|
|
|
52
62
|
bgcolor: "",
|
|
53
63
|
rowNum: 1,
|
|
54
64
|
paddingInput: 20,
|
|
65
|
+
loadingList: true,
|
|
55
66
|
}
|
|
56
67
|
},
|
|
57
68
|
computed: {
|
|
@@ -96,6 +107,7 @@
|
|
|
96
107
|
vm: this,
|
|
97
108
|
data: {}
|
|
98
109
|
}).then(res => {
|
|
110
|
+
this.loadingList = false;
|
|
99
111
|
this.$xdHideLoading();
|
|
100
112
|
this.entryList = res.list.map(item => {
|
|
101
113
|
const {dir, path, host} = item['redirect_data'];
|
|
@@ -160,9 +172,15 @@
|
|
|
160
172
|
&__body{
|
|
161
173
|
.entry_list{
|
|
162
174
|
display: grid;
|
|
175
|
+
&.skeleton-wrap{
|
|
176
|
+
.entry_item{
|
|
177
|
+
.skeleton-item(100%, auto);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
163
180
|
.entry_item{
|
|
164
181
|
width: 100%;
|
|
165
182
|
box-sizing: border-box;
|
|
183
|
+
|
|
166
184
|
image{
|
|
167
185
|
width: 100%;
|
|
168
186
|
display: block;
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
if(dir) jumpUrl = `//${window.location.host}/${dir}${path}`;
|
|
197
197
|
else jumpUrl = path;
|
|
198
198
|
//#endif
|
|
199
|
-
jumpUrl = `${jumpUrl}${bus}`;
|
|
199
|
+
jumpUrl = `${jumpUrl}${bus}}`;
|
|
200
200
|
return { name: item.name, path: jumpUrl, icon: item.icon, size: item.size }
|
|
201
201
|
}
|
|
202
202
|
})
|
|
@@ -37,25 +37,28 @@
|
|
|
37
37
|
<xd-font-icon :color="color" icon="iconwode_mian" size="100"></xd-font-icon>
|
|
38
38
|
</view>
|
|
39
39
|
</template>
|
|
40
|
-
<view class="no-image" :style="{borderColor: color}"
|
|
40
|
+
<view v-else class="no-image" :style="{borderColor: color}">
|
|
41
41
|
<xd-font-icon :color="color" icon="iconwode_mian" size="90"></xd-font-icon>
|
|
42
42
|
</view>
|
|
43
|
+
|
|
43
44
|
<view v-if="logined && textType ==='N'" :style="{color:color}">{{userInfo|getName}}</view>
|
|
44
45
|
<view class="vertical-user" v-if="logined && textType ==='Y'" :style="{color:color}">
|
|
45
46
|
<view>{{userInfo|getName}}</view>
|
|
46
|
-
<view @click="handleToLink()"
|
|
47
|
+
<view @click="handleToLink()">
|
|
47
48
|
<xd-font-icon :color="color" size="40" icon="iconshezhi_mian"></xd-font-icon>
|
|
48
49
|
</view>
|
|
49
50
|
</view>
|
|
50
51
|
</view>
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
<view @click="handleLogout()" v-if="logined" class="logout">
|
|
54
|
+
<view v-if="textType ==='N'">[退出登录]</view>
|
|
53
55
|
</view>
|
|
54
56
|
</view>
|
|
55
57
|
</view>
|
|
56
58
|
</view>
|
|
57
59
|
</template>
|
|
58
60
|
|
|
61
|
+
|
|
59
62
|
<script>
|
|
60
63
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
61
64
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
import extsMixins from "@/mixins/extsMixins"
|
|
65
68
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
66
69
|
import {mapState} from 'vuex';
|
|
70
|
+
import store from "@/store";
|
|
67
71
|
export default {
|
|
68
72
|
name: "JfbBaseUserInfo",
|
|
69
73
|
components: {
|
|
@@ -72,7 +76,7 @@
|
|
|
72
76
|
mixins: [componentsMixins,extsMixins,JfbBaseUserInfoMixin],
|
|
73
77
|
computed: {
|
|
74
78
|
...mapState(['jfbAuthorize']),
|
|
75
|
-
|
|
79
|
+
|
|
76
80
|
outMargin() {
|
|
77
81
|
let margin = `${this.margin.top !== null ? this.margin.top : 20}rpx`;
|
|
78
82
|
margin = `${margin} ${this.margin.right !== null ? this.margin.right : 20}rpx`;
|
|
@@ -106,24 +110,24 @@
|
|
|
106
110
|
logined: false,
|
|
107
111
|
userInfo: null,
|
|
108
112
|
address_url: '',
|
|
109
|
-
|
|
113
|
+
|
|
110
114
|
//基础
|
|
111
115
|
color: '#333',
|
|
112
116
|
backgroundColor: 'rgba(0,0,0,0)',
|
|
113
117
|
textType: 'N', //默认水平
|
|
114
118
|
radius: 0,
|
|
115
|
-
|
|
119
|
+
|
|
116
120
|
//投影
|
|
117
121
|
is_shadow: 'Y',
|
|
118
122
|
is_shadow_bg: 0,
|
|
119
123
|
is_shadow_w: 0,
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
|
|
125
|
+
|
|
122
126
|
//边框
|
|
123
127
|
is_border: 'Y',
|
|
124
128
|
is_border_w: 0,
|
|
125
129
|
is_border_c: '',
|
|
126
|
-
|
|
130
|
+
|
|
127
131
|
//其他
|
|
128
132
|
margin: {
|
|
129
133
|
top: 0,
|
|
@@ -137,7 +141,7 @@
|
|
|
137
141
|
right: 0,
|
|
138
142
|
bottom: 0
|
|
139
143
|
},
|
|
140
|
-
|
|
144
|
+
|
|
141
145
|
}
|
|
142
146
|
},
|
|
143
147
|
watch: {
|
|
@@ -154,8 +158,27 @@
|
|
|
154
158
|
url: '/pages/settings/settings'
|
|
155
159
|
})
|
|
156
160
|
},
|
|
161
|
+
|
|
162
|
+
async handleLogout(){
|
|
163
|
+
debugger
|
|
164
|
+
// #ifdef H5
|
|
165
|
+
if (this.$configProject.isPreview) return;
|
|
166
|
+
// #endif
|
|
167
|
+
|
|
168
|
+
if (this.jfbAuthorize !== null) {
|
|
169
|
+
this.$xdShowLoading({});
|
|
170
|
+
store.dispatch('logout').then(res=>{
|
|
171
|
+
this.$xdHideLoading();
|
|
172
|
+
this.jfbAuthorize.removeToken('card');
|
|
173
|
+
this.jfbAuthorize.jumpToUserLogin(this, false);
|
|
174
|
+
}).catch(err=>{
|
|
175
|
+
console.error(err);
|
|
176
|
+
})
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
|
|
157
180
|
async onJfbLoad(options) {
|
|
158
|
-
|
|
181
|
+
|
|
159
182
|
//预览模式
|
|
160
183
|
if(this.$configProject.isPreview) {
|
|
161
184
|
jfbRootExec('getBaseUserInfo', {
|
|
@@ -170,10 +193,10 @@
|
|
|
170
193
|
});
|
|
171
194
|
return;
|
|
172
195
|
}
|
|
173
|
-
|
|
196
|
+
|
|
174
197
|
this.logined = await this.jfbAuthorize.checkUserLogin(true, this, false);
|
|
175
198
|
if(!this.logined) return;
|
|
176
|
-
|
|
199
|
+
|
|
177
200
|
jfbRootExec('getBaseUserInfo', {
|
|
178
201
|
vm: this,
|
|
179
202
|
data: {}
|
|
@@ -194,16 +217,16 @@
|
|
|
194
217
|
this.address_url = getContainerPropsValue(container, 'content.address_url', {value: ''});
|
|
195
218
|
this.color = getContainerPropsValue(container, 'content.textColor', '#333');
|
|
196
219
|
this.backgroundColor = getContainerPropsValue(container, 'content.backgroundColor', 'rgba(0,0,0,0)');
|
|
197
|
-
this.textType = getContainerPropsValue(container, 'content.text_type', 'N');
|
|
198
|
-
|
|
220
|
+
this.textType = "N";//getContainerPropsValue(container, 'content.text_type', 'N');
|
|
221
|
+
|
|
199
222
|
this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
|
|
200
223
|
this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
|
|
201
224
|
this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
|
|
202
|
-
|
|
225
|
+
|
|
203
226
|
this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
|
|
204
227
|
this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
|
|
205
228
|
this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '10');
|
|
206
|
-
|
|
229
|
+
|
|
207
230
|
this.radius = getContainerPropsValue(container, 'content.radius', '0');
|
|
208
231
|
},
|
|
209
232
|
}
|
|
@@ -213,7 +236,7 @@
|
|
|
213
236
|
|
|
214
237
|
<style scoped lang="less">
|
|
215
238
|
@import "./JfbBaseUserInfoLess.less";
|
|
216
|
-
|
|
239
|
+
|
|
217
240
|
.vertical-user {
|
|
218
241
|
display: flex;
|
|
219
242
|
justify-content: center;
|
|
@@ -229,29 +252,29 @@
|
|
|
229
252
|
display: flex;
|
|
230
253
|
align-items: center;
|
|
231
254
|
justify-content: flex-start;
|
|
232
|
-
|
|
233
|
-
|
|
255
|
+
|
|
256
|
+
|
|
234
257
|
&-left {
|
|
235
258
|
display: flex;
|
|
236
259
|
align-items: center;
|
|
237
260
|
flex: 1;
|
|
238
|
-
|
|
261
|
+
|
|
239
262
|
&.vertical {
|
|
240
263
|
width: 100%;
|
|
241
264
|
flex-direction: column;
|
|
242
|
-
|
|
265
|
+
|
|
243
266
|
& > view:last-child {
|
|
244
267
|
width: 100%;
|
|
245
268
|
text-align: center;
|
|
246
269
|
flex-shrink: 0;
|
|
247
270
|
padding-top: unit(20, rpx);
|
|
248
271
|
}
|
|
249
|
-
|
|
272
|
+
|
|
250
273
|
& > image, .no-image {
|
|
251
274
|
margin-right: unit(0, rpx);
|
|
252
275
|
}
|
|
253
276
|
}
|
|
254
|
-
|
|
277
|
+
|
|
255
278
|
& > image, .no-image {
|
|
256
279
|
width: unit(140, rpx);
|
|
257
280
|
height: unit(140, rpx);
|
|
@@ -263,21 +286,28 @@
|
|
|
263
286
|
flex-shrink: 0;
|
|
264
287
|
overflow: hidden;
|
|
265
288
|
}
|
|
266
|
-
|
|
289
|
+
|
|
267
290
|
.no-image {
|
|
268
291
|
border: unit(4, rpx) solid #e5e5e5;
|
|
269
292
|
}
|
|
270
|
-
|
|
293
|
+
|
|
271
294
|
& > view {
|
|
272
295
|
color: #383838;
|
|
273
296
|
font-size: unit(32, rpx);
|
|
274
297
|
}
|
|
275
298
|
}
|
|
276
|
-
|
|
299
|
+
|
|
277
300
|
& > view:nth-child(2) {
|
|
278
301
|
flex-shrink: 0;
|
|
279
302
|
}
|
|
280
303
|
}
|
|
281
304
|
}
|
|
305
|
+
|
|
306
|
+
.logout {
|
|
307
|
+
font-size: unit(26, rpx);
|
|
308
|
+
& > view {
|
|
309
|
+
color: #333;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
282
312
|
}
|
|
283
313
|
</style>
|