jufubao-base 1.0.203 → 1.0.204

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.203",
3
+ "version": "1.0.204",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -410,9 +410,9 @@ export default {
410
410
  */
411
411
  reSelectCity(level) {
412
412
  //选择隔空城市不操作
413
- if (level - this.level > 1) {
414
- return;
415
- }
413
+ // if (level - this.level > 1) {
414
+ // return;
415
+ // }
416
416
  this.city_code = this.city_code.splice(0, level);
417
417
  this.city_name = this.city_name.splice(0, level);
418
418
  this.city_selected_data = this.city_selected_data.splice(0, level);
@@ -427,17 +427,18 @@ export default {
427
427
  },
428
428
 
429
429
  selectCity(item) {
430
+
430
431
  console.log(this.maxLevel,'this.maxLevel');
431
432
  if (this.level < this.maxLevel - 1) {
432
433
  this.level++;
433
434
  }
435
+ console.log(this.level,'this.city_title,this.city_name');
436
+
434
437
  //保存信息
435
438
  this.$set(this.city_name, this.level, item.label);
436
439
  this.$set(this.city_code, this.level, item.value);
437
440
  this.$set(this.city_selected_data, this.level, item);
438
- // this.city_name[this.level] = item.label;
439
- // this.city_code[this.level] = item.value;
440
- // this.city_selected_data[this.level] = item;
441
+ this.city_name.splice(this.level+1,this.city_name.length-this.level);
441
442
 
442
443
  //是否启动获取城市列表
443
444
  if (this.level < this.maxLevel - 1) {
@@ -466,7 +467,12 @@ export default {
466
467
  2、正确格式需包含(label,value)字段。
467
468
  例如: [{label: \'北京市\',value: 1},{label: \'广东省\',value: 2}]`);
468
469
  } else {
470
+ console.log(this.level,'this.levelthis.levelthis.level');
471
+
469
472
  this.cityList = this.$xdUniHelper.cloneDeep(cityList);
473
+ if(cityList.length === 1&&this.level===0) {
474
+ this.selectCity(cityList[0]);
475
+ }
470
476
  }
471
477
  } else {
472
478
  //选择完成操作