Browse Source

更换域名

306132416@qq.com 4 years ago
parent
commit
eacc6518b5

+ 2 - 1
App.vue

@@ -3,7 +3,8 @@ import md5 from '@/common/md5.js';
 export default {
   globalData: {
     //shareUrl: 'https://gdoctor.xazhima.com/api/v1.0/api.php', //开发环境全局接口域名 线上:https://guolu.xazhima.com/
-    shareUrl: "https://kiq.xazhima.com/",
+   // shareUrl: "https://kiq.xazhima.com/",
+	shareUrl:"https://kgwxxcx.xixianxinqu.gov.cn/1026airqt/",
     globalTimestamp: Date.now().toString(),
     secret: "AirQK_weichat_app_zhima",
     selectedIndex:0,

+ 2 - 1
pages/appeal/appeal_detail.vue

@@ -8,7 +8,7 @@
         </div>
         <div class="attach_list">
           <img
-            :src="'https://kiq.xazhima.com' + attach.url" @click="showLarge('https://kiq.xazhima.com' + attach.url)" v-for="(attach, idx) in info.attach_list"
+            :src="globalUrl + attach.url" @click="showLarge( globalUrl + attach.url)" v-for="(attach, idx) in info.attach_list"
             :key="idx"/>
         </div>
       </div>
@@ -57,6 +57,7 @@ export default {
   data() {
     return {
       isLoad: false,
+	  globalUrl:getApp().globalData.shareUrl,
       info: {
         // name: "樊**",
         // phone: "153753****",

+ 14 - 6
pages/attract/attract_deatil.vue

@@ -31,12 +31,20 @@ export default {
       let result = html.replace(
         /<img [^>]*src=['"]([^'"]+)[^>]*>/gi,
         function (match, capture) {
-          return (
-            "<img src=" +
-            getApp().globalData.shareUrl +
-            capture +
-            ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
-          );
+		  if(capture.includes('http')){
+			  return (
+				"<img src=" +
+				capture +
+				' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			  );
+		  }else {
+			return (
+			  "<img src=" +
+			  getApp().globalData.shareUrl +
+			  capture +
+			  ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			);
+		  }	
         }
       );
       return result;

+ 1 - 1
pages/enterprise/enterprise_detail.vue

@@ -251,7 +251,7 @@ export default {
             };
             getApp().globalData.company_name = name;
             getApp().globalData.company_logo =
-              "https://kiq.xazhima.com" + pic_url;
+              getApp().globalData.shareUrl + pic_url;
             this.isShow = true;
           }
         },

+ 2 - 1
pages/enterprise/index.vue

@@ -21,7 +21,7 @@
         <view class="title">
           <view class="logo">
             <image
-              :src="'https://kiq.xazhima.com' + company.pic_url"
+              :src="globalUrl + company.pic_url"
               alt=""
               class="logo-img"
               mode="aspectFit"
@@ -62,6 +62,7 @@ export default {
       companyList: [],
       isShow: false,
       searchVal: "",
+	  globalUrl:getApp().globalData.shareUrl,
       // new Array(5).fill({
       //   logo: "/static/enterprise/logo.png",
       //   name: "康拓科技有限责任公司",

+ 1 - 1
pages/enterprise/product_detail.vue

@@ -68,7 +68,7 @@ export default {
     },
     getRich(ids) {
       uni.request({
-        url: `https://kiq.xazhima.com/content/company_product/${Math.floor(
+        url: `${getApp().globalData.shareUrl}/content/company_product/${Math.floor(
           ids / 1000
         )}/${ids}.html`,
         method: "GET",

+ 25 - 17
pages/policy/policy_deatil.vue

@@ -305,7 +305,7 @@ export default {
     },
     getRich1(ids) {
       uni.request({
-        url: `https://kiq.xazhima.com/content/policy/${Math.floor(
+        url: `${getApp().globalData.shareUrl}/content/policy/${Math.floor(
           ids / 1000
         )}/${ids}_1.html`,
         method: "GET",
@@ -324,7 +324,7 @@ export default {
     },
     getRich2(ids) {
       uni.request({
-        url: `https://kiq.xazhima.com/content/policy/${Math.floor(
+        url: `${getApp().globalData.shareUrl}/content/policy/${Math.floor(
           ids / 1000
         )}/${ids}_2.html`,
         method: "GET",
@@ -357,7 +357,7 @@ export default {
 	},
     getRich3(ids) {
       uni.request({
-        url: `https://kiq.xazhima.com/content/policy/${Math.floor(
+        url: `${getApp().globalData.shareUrl}/content/policy/${Math.floor(
           ids / 1000
         )}/${ids}_3.html`,
         method: "GET",
@@ -376,7 +376,7 @@ export default {
     },
     getRich4(ids) {
       uni.request({
-        url: `https://kiq.xazhima.com/content/policy/${Math.floor(
+        url: `${getApp().globalData.shareUrl}/content/policy/${Math.floor(
           ids / 1000
         )}/${ids}_4.html`,
         method: "GET",
@@ -395,7 +395,7 @@ export default {
     },
 	getRich5(ids) {
 	  uni.request({
-	    url: `https://kiq.xazhima.com/content/policy/${Math.floor(
+	    url: `${getApp().globalData.shareUrl}/content/policy/${Math.floor(
 	      ids / 1000
 	    )}/${ids}_5.html`,
 	    method: "GET",
@@ -413,18 +413,26 @@ export default {
 	  });
 	},
 	replaceImg(html) {
-	  let result = html.replace(
-	    /<img [^>]*src=['"]([^'"]+)[^>]*>/gi,
-	    function (match, capture) {
-	      return (
-	        "<img src=" +
-	        getApp().globalData.shareUrl +
-	        capture +
-	        ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
-	      );
-	    }
-	  );
-	  return result;
+      let result = html.replace(
+        /<img [^>]*src=['"]([^'"]+)[^>]*>/gi,
+        function (match, capture) {
+		  if(capture.includes('http')){
+			  return (
+				"<img src=" +
+				capture +
+				' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			  );
+		  }else {
+			return (
+			  "<img src=" +
+			  getApp().globalData.shareUrl +
+			  capture +
+			  ' style="max-width:100%;height:auto;display:block;margin:10px 0;"/>'
+			);
+		  }	
+        }
+      );
+      return result;
 	},
     collectionPage() {
 		if(!getApp().globalData.user_name){