jufubao-base 1.0.77-beta7 → 1.0.77

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