Fly 1 년 전
부모
커밋
9dd518518b
3개의 변경된 파일19개의 추가작업 그리고 15개의 파일을 삭제
  1. 5 5
      config/global.config.js
  2. 5 4
      manifest.json
  3. 9 6
      utils/tool.js

+ 5 - 5
config/global.config.js

@@ -2,12 +2,12 @@ const CONFIG = {
 	assetsPath: 'https://yigefuwuapp.ycbrain.com/ycimg', // 静态资源路径
 	// assetsPath: 'https://shop.songhe1688.com/ycimg', // 静态资源路径
 	staticUrl: 'https://yigefuwuapp.ycbrain.com/ycimg', // 所有图片服务器地址 192.168.154.191:8196
-	baseUrl: 'http://192.168.0.151:8196/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
-  // baseUrl: 'https://yigefuwuapp.ycbrain.com/prod-api/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
-	baseShopUrl: 'http://192.168.0.151:9020/baseshop/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
-	// baseShopUrl: 'https://yigefuwuapp.ycbrain.com/shop-api/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
+	// baseUrl: 'http://192.168.0.151:8196/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
+	baseUrl: 'https://yigefuwuapp.ycbrain.com/prod-api/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
+	// baseShopUrl: 'http://192.168.0.151:9020/baseshop/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
+	baseShopUrl: 'https://yigefuwuapp.ycbrain.com/shop-api/api', // 后台接、口请求地址  // baseUrl: 'https://xshop.songlanyun.com/baseshop/api', // 后台接、口请求地址
 	//baseUrl: process.env.NODE_ENV == 'production'?'https://www.app.xjqcwd.cn/lida/api':'https://www.app.xjqcwd.cn/lida/api', //'https://test.lidashine.com:444/lida/api', // 后台接口请求地址
-	hostUrl: 'https://yigefuwuapp.ycbrain.com/yige-h5/#',  // H5分享地址(前端运行地址)
+	hostUrl: 'https://yigefuwuapp.ycbrain.com/yige-h5/#', // H5分享地址(前端运行地址)
 	telRegex: "^[1]([3-9])[0-9]{9}$", //手机正则
 	telIdentity: "^[1-9][0-9]{5}(19[0-9]{2}|200[0-9]|2010)(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])[0-9]{3}[0-9xX]$", //身份证的正则表达式
 	twoMinNum: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,

+ 5 - 4
manifest.json

@@ -29,7 +29,8 @@
             "Geolocation" : {},
             "iBeacon" : {},
             "Camera" : {},
-            "Barcode" : {}
+            "Barcode" : {},
+            "Push" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -139,9 +140,9 @@
                     "unipush" : {
                         "icons" : {
                             "small" : {
-                                "ldpi" : "logo.png",
-                                "mdpi" : "logo.png",
-                                "hdpi" : "logo.png"
+                                "ldpi" : "static/aaa.png",
+                                "mdpi" : "static/aaa.png",
+                                "hdpi" : "static/aaa.png"
                             }
                         }
                     }

+ 9 - 6
utils/tool.js

@@ -70,12 +70,15 @@ export const getPhotograph = () => {
 
 
 export const distanceCalculate = (num) => {
-	if (num < 1000) {
-		return `${num.toFixed(1)}米`
-	} else {
-		const n = (num / 1000).toFixed(1);
-		return `${n}公里`
-	};
+	if (typeof num === 'number') {
+		if (num < 1000) {
+			return `${num.toFixed(1)}米`
+		} else {
+			const n = (num / 1000).toFixed(1);
+			return `${n}公里`
+		};
+	}
+	return num
 }
 
 export const uploadImage = (num = 1, type = 'img') => {