Quellcode durchsuchen

城市筛选update

duanshenglang vor 5 Monaten
Ursprung
Commit
71872a027b
1 geänderte Dateien mit 13 neuen und 2 gelöschten Zeilen
  1. 13 2
      lottery/lottery.html

+ 13 - 2
lottery/lottery.html

@@ -606,6 +606,8 @@
             phone: '',
             province: '',
             city: '',
+            area: '',
+            store: '',
             intenModel: '',
             car: '',
           },
@@ -920,6 +922,8 @@
             this.getInfoForm.phone = ''
             this.getInfoForm.province = ''
             this.getInfoForm.city = ''
+            this.getInfoForm.area = ''
+            this.getInfoForm.store = ''
             this.getInfoForm.intenModel = ''
           }
           fetch(this.httpUrl + '/scrm/v1/wxcp-raffle/p/submitPreForm', {
@@ -931,6 +935,8 @@
               phone: this.getInfoForm.phone,
               province: this.getInfoForm.province,
               city: this.getInfoForm.city,
+              area: this.getInfoForm.area,
+              store: this.getInfoForm.store,
               intenModel: this.getInfoForm.intenModel,
               mpOpenId: this.getQueryParam('openId') || this.localStorage.getItem('openId'),
             }),
@@ -952,11 +958,14 @@
         },
         // 获取城市数据
         getCityLevel() {
-          fetch('https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/1000/1720161853377/pc-code.json')
+          fetch(this.httpUrl + `//scrm/v1/tenancy-prov-city-area/p/lotteryArea?bid=${this.bId}`)
             .then(res => {
               return res.json()
             }).then(result => {
-              this.transformedData = this.transformData(result)
+              let { data, code, msg } = result
+              if (code === 1) {
+                this.transformedData = this.transformData(data)
+              }
             })
         },
         // 获取全部车型
@@ -978,6 +987,8 @@
         handleInfoCity(value) {
           this.getInfoForm.province = value[0]
           this.getInfoForm.city = value[1]
+          this.getInfoForm.area = value[2] || ''
+          this.getInfoForm.store = value[3] || ''
         },
         // 点击抽奖
         handleLottery() {