ソースを参照

feat: 免费版选择省份逻辑调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 9 ヶ月 前
コミット
2ebde3ae70

+ 9 - 2
src/jfw/modules/app/src/web/templates/areaPack/page_set_area.html

@@ -160,7 +160,8 @@
                 backTipShowCount: 0, // 离开页面展示弹窗次数
                 successBack: false,
                 keywords: '',
-                wordsMode: ''
+                wordsMode: '',
+                isNeedApi: true
             },
             computed: {
                 moreThanSubCount: function () {
@@ -218,9 +219,12 @@
             mounted: function () {
                 var type = utils.getParam('type')
                 var url = utils.getParam('url')
-
+                var sub = utils.getParam('sub')
                 var keywords = utils.getParam('keywords')
                 this.wordsMode = utils.getParam('wordsMode')
+                if (sub === 'simple') {
+                  this.isNeedApi = false
+                }
                 if (url) {
                   this.params.url = decodeURIComponent(url)
                 }
@@ -366,6 +370,9 @@
                     this.setAreaSelected(area)
                     if (this.moreThanSubCount) {
                         this.popupTip = true
+                    } else if(!this.isNeedApi) {
+                      sessionStorage.setItem('freeSelectArea', JSON.stringify(area))
+                      history.back()
                     } else {
                         this.userUpdate(area)
                     }

+ 9 - 1
src/web/templates/areaPack/wx/page_set_area.html

@@ -160,7 +160,8 @@
                 backTipShowCount: 0, // 离开页面展示弹窗次数
                 successBack: false,
                 keywords: '',
-                wordsMode: ''
+                wordsMode: '',
+                isNeedApi: true
             },
             computed: {
                 moreThanSubCount: function () {
@@ -218,8 +219,12 @@
             mounted: function () {
                 var type = utils.getParam('type')
                 var url = utils.getParam('url')
+                var sub = utils.getParam('sub')
                 var keywords = utils.getParam('keywords')
                 this.wordsMode = utils.getParam('wordsMode')
+                if (sub === 'simple') {
+                  this.isNeedApi = false
+                }
                 if (url) {
                   this.params.url = decodeURIComponent(url)
                 }
@@ -371,6 +376,9 @@
                     this.setAreaSelected(area)
                     if (this.moreThanSubCount) {
                         this.popupTip = true
+                    } else if(!this.isNeedApi) {
+                      sessionStorage.setItem('freeSelectArea', JSON.stringify(area))
+                      history.back()
                     } else {
                         this.userUpdate(area)
                     }