cuiyalong 3 tahun lalu
induk
melakukan
5319bbdcdd

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

@@ -260,11 +260,11 @@
                             area: JSON.stringify(area)
                         },
                         success: function (res) {
-                            if (res && res.error_code === 0) {
+                            if (res && res.success) {
                                 history.back()           
                             } else {
-                                if (res.error_msg) {
-                                    _this.$toast(res.error_msg)
+                                if (res.errMsg) {
+                                    _this.$toast(res.errMsg)
                                 }
                             }
                         }
@@ -278,7 +278,7 @@
                     if (this.moreThanSubCount) {
                         this.popupTip = true
                     } else {
-                        this.userUpdate(initData)
+                        this.userUpdate(area)
                     }
                 },
                 hideTips: function () {
@@ -291,7 +291,7 @@
                     var areaJSON = encodeURIComponent(JSON.stringify(area))
                     this.savePageState()
                     if (this.userType) {
-                        location.href = urlBase + '?type=renew&area=' +  areaJSON
+                        location.href = urlBase + '?type=upgrade&area=' +  areaJSON
                     } else {
                         location.href = urlBase +  '?type=buy&area=' +  areaJSON
                     }

+ 5 - 5
src/web/templates/areaPack/wx/page_set_area.html

@@ -260,11 +260,11 @@
                             area: JSON.stringify(area)
                         },
                         success: function (res) {
-                            if (res && res.error_code === 0) {
+                            if (res && res.success) {
                                 history.back()           
                             } else {
-                                if (res.error_msg) {
-                                    _this.$toast(res.error_msg)
+                                if (res.errMsg) {
+                                    _this.$toast(res.errMsg)
                                 }
                             }
                         }
@@ -278,7 +278,7 @@
                     if (this.moreThanSubCount) {
                         this.popupTip = true
                     } else {
-                        this.userUpdate(initData)
+                        this.userUpdate(area)
                     }
                 },
                 hideTips: function () {
@@ -291,7 +291,7 @@
                     var areaJSON = encodeURIComponent(JSON.stringify(area))
                     this.savePageState()
                     if (this.userType) {
-                        location.href = urlBase + '?type=renew&area=' +  areaJSON
+                        location.href = urlBase + '?type=upgrade&area=' +  areaJSON
                     } else {
                         location.href = urlBase +  '?type=buy&area=' +  areaJSON
                     }