sunran 3 vuotta sitten
vanhempi
commit
9839c3030d
3 muutettua tiedostoa jossa 11 lisäystä ja 52 poistoa
  1. 5 8
      src/utils/vaildInterfacefn.js
  2. 6 6
      src/views/zhulao/main.js
  3. 0 38
      src/views/zhulao/views/home/index.vue

+ 5 - 8
src/utils/vaildInterfacefn.js

@@ -1,9 +1,5 @@
 let urlCreatesign = urldomaincreatesign
 let urlGateway = urldomaingateway
-console.log(urlCreatesign, 'urlCreatesign')
-console.log(urlGateway, 'urlGateway')
-// let urlCreatesign = localStorage.getItem('urlCreatesign')
-// let urlGateway = localStorage.getItem('urlGateway')
 export function serverAPI(serverName, data) {
     console.log(data)
     return new Promise(function (resolve, reject) {
@@ -23,11 +19,12 @@ export function serverAPI(serverName, data) {
                 } else {}
             })
         } catch (error) {
+            this.$dialog.alert({
+                    message: serverName + '--------' + error,
+                })
+                .then(() => {})
             reject(error)
-            // this.$dialog.alert({
-            //         message: serverName + '--------' + error,
-            //     })
-            //     .then(() => {})
+
         }
     })
 }

+ 6 - 6
src/views/zhulao/main.js

@@ -14,12 +14,12 @@ Vue.config.productionTip = false
 Vue.use(Vant)
 Vue.use(Lazyload)
 Vue.prototype.$echarts = echarts
-let urlCreatesign = localStorage.getItem('urlCreatesign')
-let urlGateway = localStorage.getItem('urlGateway')
-// let urlGateway = urldomaingateway
-Vue.prototype.$urlCreatesign = urlCreatesign
-Vue.prototype.$urlGateway = urlGateway
-Vue.prototype.$appId = 'zpylgzwgt'
+// let urlCreatesign = localStorage.getItem('urlCreatesign')
+// let urlGateway = localStorage.getItem('urlGateway')
+// // let urlGateway = urldomaingateway
+// Vue.prototype.$urlCreatesign = urlCreatesign
+// Vue.prototype.$urlGateway = urlGateway
+// Vue.prototype.$appId = 'zpylgzwgt'
 new Vue({
     router,
     store,

+ 0 - 38
src/views/zhulao/views/home/index.vue

@@ -115,48 +115,10 @@ export default {
         }
         this.loading = false
       }
-      console.log(res, '拿到的数据')
-      return
-      try {
-        vaildInterfacefn(
-          this.$appId,
-          'zpsmzjlbtcxjk',
-          JSON.stringify(data),
-          '2',
-          'https://' + this.$urlCreatesign,
-          'https://' + this.$urlGateway
-        ).then((value) => {
-          const res = JSON.parse(value)
-          console.log(res, 'res')
-          if (res.code == '200') {
-            if (type == 'image') {
-              this.banner = res.rows
-            } else if (type == 'dynamic') {
-              if (this.pageNum == 1) {
-                this.info = res.rows
-              } else {
-                this.info = this.info.concat(res.rows)
-              }
-              if (this.info.length >= res.total) {
-                this.finished = true
-              } else {
-                this.pageNum++
-              }
-              this.loading = false
-            }
-          } else {
-          }
-        })
-      } catch (error) {}
-      //   const res = await getArticleList(data)
     },
     onLoad() {
       this.getList('dynamic')
     },
-    async getTags() {
-      const res = await getTags({})
-      console.log(res)
-    },
   },
 }
 </script>