jufubao-base 1.0.320-beta4 → 1.0.321-beta1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.320-beta4",
3
+ "version": "1.0.321-beta1",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -222,11 +222,16 @@
222
222
  doAddImage(){
223
223
  uni.chooseImage({
224
224
  count: 1,
225
- sourceType: ['camera'],
225
+ sourceType: ['camera','album'],
226
226
  success: async (res) => {
227
227
  console.log('chooseImage',res);
228
- // let filePath = res.tempFilePaths[0];
229
- let file = res.tempFiles[0];
228
+ let file
229
+ // #ifdef MP-WEIXIN
230
+ file = res.tempFilePaths[0];
231
+ // #endif
232
+ // #ifdef H5
233
+ file = res.tempFiles[0];
234
+ // #endif
230
235
  this.$xdShowLoading({});
231
236
  try{
232
237
  let image = await this.uploadImage(file);
@@ -239,7 +244,7 @@
239
244
  })
240
245
  },
241
246
  uploadImage(file){
242
- let fileName = file.name;
247
+ let fileName = file.name||'image.png';
243
248
  return new Promise((resolve, reject) => {
244
249
  jfbRootExec("getConOssSign", {
245
250
  vm: this,
@@ -251,7 +256,12 @@
251
256
  delete res['cdn_url']
252
257
  uni.uploadFile({
253
258
  url: res.action,
259
+ // #ifdef H5
254
260
  file: file,
261
+ // #endif
262
+ // #ifdef MP-WEIXIN
263
+ filePath: file, // 小程序图片临时路径
264
+ // #endif
255
265
  name: 'file',
256
266
  formData: {
257
267
  ...res,
@@ -25,6 +25,22 @@
25
25
  }"
26
26
  >
27
27
  <view v-if="showCode" class="jfb-base-con-phone__body-wrap-input">
28
+ <view v-if="showID">
29
+ <input
30
+ @input="filterSpaces"
31
+ v-model="staff_id_name"
32
+ :placeholder="holdID"
33
+ type="text"
34
+ />
35
+ </view>
36
+ <view v-if="showName">
37
+ <input
38
+ @input="filterSpaces"
39
+ v-model="staff_name_name"
40
+ :placeholder="holdName"
41
+ type="text"
42
+ />
43
+ </view>
28
44
  <view>
29
45
  <input
30
46
  @input="filterSpaces"
@@ -62,6 +78,22 @@
62
78
  >确认领取</xd-button>
63
79
  </view>
64
80
  <view v-else class="jfb-base-con-phone__body-wrap-input">
81
+ <view v-if="showID">
82
+ <input
83
+ @input="filterSpaces"
84
+ v-model="staff_id_name"
85
+ :placeholder="holdID"
86
+ type="text"
87
+ />
88
+ </view>
89
+ <view v-if="showName">
90
+ <input
91
+ @input="filterSpaces"
92
+ v-model="staff_name_name"
93
+ :placeholder="holdName"
94
+ type="text"
95
+ />
96
+ </view>
65
97
  <view class="jfb-base-con-phone__body-wrap-input-phone">
66
98
  <view class="jfb-base-con-phone__body-wrap-input-phone-change">
67
99
  <view>当前登录手机号</view>
@@ -211,6 +243,13 @@ export default {
211
243
  dialogShow: false,
212
244
  showSignatureRef: false,
213
245
 
246
+ //员工信息
247
+ showID: false,
248
+ showName: false,
249
+ staff_id_name:'',
250
+ staff_name_name:'',
251
+ holdID:'请输入员工工号',
252
+ holdName: '请输入员工姓名',
214
253
  };
215
254
  },
216
255
  watch: {
@@ -394,7 +433,18 @@ export default {
394
433
  this.background = getServiceUrl(res.background);
395
434
  this.used_background = getServiceUrl(res.used_background);
396
435
  this.errmessage = res.message;
436
+
437
+ //员工信息
438
+ this.showID = res['show_staff_id'] === 'Y';
439
+ this.showName = res['show_staff_name'] === 'Y';
440
+ this.holdID = res['staff_id_name'] || '请输入员工工号';
441
+ this.holdName = res['staff_name_name'] || '请输入员工姓名';
442
+ if(this.$configProject['isPreview']) {
443
+ this.showID = this.showName = false
444
+ }
445
+
397
446
  this.done = true;
447
+
398
448
  })
399
449
  .catch((err) => {
400
450
  console.log(err, "err");
@@ -440,6 +490,7 @@ export default {
440
490
  phone_number: this.phoneNumber,
441
491
  biz_name: "login",
442
492
  is_expire_time: 'Y',
493
+
443
494
  },
444
495
  }).then((res) => {
445
496
  this.startCountdown(res);
@@ -487,7 +538,12 @@ export default {
487
538
  phone: this.showCode ? this.phoneNumber : null,
488
539
  valid_code: this.showCode ? this.valid_code : null,
489
540
  biz_name: "login",
541
+ staff_id_name:this.staff_id_name,
542
+ staff_name_name:this.staff_name_name,
490
543
  }
544
+ if(this.showID) data['staff_id_name'] = this.staff_id_name;
545
+ if(this.showName) data['staff_name_name'] = this.staff_name_name;
546
+
491
547
  if(this.phone_signature === 'Y') data['phone_signature'] = this.phone_signature_url;
492
548
  this.$xdShowLoading({});
493
549
  jfbRootExec("getAllCouponPhone", {vm: this, data: data})