Parcourir la source

处理图片问题

shish il y a 1 an
Parent
commit
8801897dc2

+ 5 - 1
ReadMe.txt

@@ -1 +1,5 @@
- 
+使用http方式需要:
+
+1、开启本地host
+2、开启小程序,本地设置,不校验合法域名、web-view、TLS版本以及HTTPS证书
+3、开启小程序,本地设置,预览及真机调试时主包、分包体积上限调整为4M

+ 48 - 48
ghsApp/src/admin/home/apply.vue

@@ -43,89 +43,89 @@ export default {
                 {
                     title:'花材',
                     list:[
-                        {name: "花材",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/item/list2"},
-                        {name: "分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
-                        {name: "改价",img: `${this.$constant.imgUrl}/ghs/home/gj.png`,url: "/admin/changePrice/list2"},
-                        {name: "批量改价",img: `${this.$constant.imgUrl}/ghs/home/gj.png`,url:"/admin/changePrice/batchChange"},
-                        {name: "批量移动",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/changePrice/changeClass"},
-                        {name: "加价管理",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/add"},
-                        {name: "花材排序",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/itemClass/sort"},
-                        {name: "已下架",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/changePrice/outList"},
-                        {name: "已删除",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/changePrice/stopList"},
-                        {name: "采购人管理",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/changePrice/changeCgStaff"},
+                        {name: "花材",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/item/list2"},
+                        {name: "分类",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/itemClass/list"},
+                        {name: "改价",img: `${this.$constant.hostUrl}/image/ghs/home/gj.png`,url: "/admin/changePrice/list2"},
+                        {name: "批量改价",img: `${this.$constant.hostUrl}/image/ghs/home/gj.png`,url:"/admin/changePrice/batchChange"},
+                        {name: "批量移动",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/changeClass"},
+                        {name: "加价管理",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/itemClass/add"},
+                        {name: "花材排序",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/itemClass/sort"},
+                        {name: "已下架",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/outList"},
+                        {name: "已删除",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/stopList"},
+                        {name: "采购人管理",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/changePrice/changeCgStaff"},
                     ]
                 },
                 {
                     title:'统计',
                     list:[
-                        {name: "利润表",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/profit"},
-                        {name: "收入统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/kdIncome"},
-                        {name: "花材销量",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/productSale"},
-                        {name: "客户业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/customSale"},
-                        {name: "收支分类",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/classProfit"},
-                        {name: "供货业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgStat"},
-                        {name: "采购人业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgYj"},
-                        {name: "采购花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgItem"},
-                        {name: "采购运费",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgFreight"},
-                        {name: "库存总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/stock"},
-                        {name: "损耗花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/wastage"},
-                        {name: "损耗总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/waste"},
-                        {name: "结账跟踪",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/clear"},
-                        {name: "配送业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/sendYj"},
+                        {name: "利润表",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/profit"},
+                        {name: "收入统计",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/kdIncome"},
+                        {name: "花材销量",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/productSale"},
+                        {name: "客户业绩",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/customSale"},
+                        {name: "收支分类",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/classProfit"},
+                        {name: "供货业绩",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/cgStat"},
+                        {name: "采购人业绩",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/cgYj"},
+                        {name: "采购花材",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/cgItem"},
+                        {name: "采购运费",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/cgFreight"},
+                        {name: "库存总览",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/stock"},
+                        {name: "损耗花材",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/wastage"},
+                        {name: "损耗总览",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/waste"},
+                        {name: "结账跟踪",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/clear"},
+                        {name: "配送业绩",img: `${this.$constant.hostUrl}/image/ghs/home/jyzk.png`,url: "/admin/stat/sendYj"},
                     ]
                 },
                 {
                     title:'产品',
                     list:[
-                        {name: "产品列表",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/cp/list"},
-                        {name: "产品分类",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/cp/class"},
-                        {name: "已删除",img: `${this.$constant.imgUrl}/ghs/home/hcgl.png`,url: "/admin/cp/delList"},
+                        {name: "产品列表",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/cp/list"},
+                        {name: "产品分类",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/cp/class"},
+                        {name: "已删除",img: `${this.$constant.hostUrl}/image/ghs/home/hcgl.png`,url: "/admin/cp/delList"},
                     ]
                 },
                 {
                     title:'订单与销售',
                     list:[
-                        {name: "运费设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/freight"},
-                        {name: "物流",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
-                        {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/customList"},
-                        {name: "售后记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/pagesOrder/refundAllList"},
-                        {name: "预订汇总",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
-                        {name: "预订客户",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/book/custom"},
-                        {name: "预订明细",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/book/itemCustom"}
+                        {name: "运费设置",img: `${this.$constant.hostUrl}/image/ghs/home/shop.png`,url: "/admin/order/freight"},
+                        {name: "物流",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
+                        {name: "结账记录",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/clear/customList"},
+                        {name: "售后记录",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/pagesOrder/refundAllList"},
+                        {name: "预订汇总",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
+                        {name: "预订客户",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/book/custom"},
+                        {name: "预订明细",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/book/itemCustom"}
                     ]
                 },
                 {
                     title:'门店与员工',
                     list:[
-                        {name: "员工",img: `${this.$constant.imgUrl}/ghs/home/yggl.png`,url: "/admin/staff/list"},
-                        {name: "员工业绩",img: `${this.$constant.imgUrl}/ghs/home/icon_ygyj.png`,url: "/admin/staff/achieve"},
-                        {name: "门店",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/shop/list"}
+                        {name: "员工",img: `${this.$constant.hostUrl}/image/ghs/home/yggl.png`,url: "/admin/staff/list"},
+                        {name: "员工业绩",img: `${this.$constant.hostUrl}/image/ghs/home/icon_ygyj.png`,url: "/admin/staff/achieve"},
+                        {name: "门店",img: `${this.$constant.hostUrl}/image/ghs/home/shop.png`,url: "/admin/shop/list"}
                     ]
                 },
                 {
                     title:'采购与供货商',
                     list:[
-                        {name: "供货商",img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`,url: "/pagesPurchase/supplier"},
-                        {name: "采购记录",img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`,url: "/pagesPurchase/order"},
-                        {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/list"}
+                        {name: "供货商",img: `${this.$constant.hostUrl}/image/ghs/home/icon_ghs.png`,url: "/pagesPurchase/supplier"},
+                        {name: "采购记录",img: `${this.$constant.hostUrl}/image/ghs/home/icon_caigou.png`,url: "/pagesPurchase/order"},
+                        {name: "结账记录",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/clear/list"}
                     ]
                 },
                 {
                     title:'库存管理',
                     list:[
-                        {name: "调拨出库",img: `${this.$constant.imgUrl}/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
-                        {name: "调拨入库",img: `${this.$constant.imgUrl}/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"},
-                        {name: "库存预警",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/item/list?warning=1"},
-                        {name: "盘点",img: `${this.$constant.imgUrl}/ghs/home/pandian.png`,url: "/pagesStorehouse/inventory/list"},
-                        {name: "损耗",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/breakage/list"},
-                        {name: "改库存",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/changePrice/changeStock"}
+                        {name: "调拨出库",img: `${this.$constant.hostUrl}/image/ghs/home/dbck.png`,url: "/pagesStorehouse/allot/allotEx"},
+                        {name: "调拨入库",img: `${this.$constant.hostUrl}/image/ghs/home/dbrk.png`,url: "/pagesStorehouse/allot/allotPut"},
+                        {name: "库存预警",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/item/list?warning=1"},
+                        {name: "盘点",img: `${this.$constant.hostUrl}/image/ghs/home/pandian.png`,url: "/pagesStorehouse/inventory/list"},
+                        {name: "损耗",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/breakage/list"},
+                        {name: "改库存",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/changePrice/changeStock"}
                     ]
                 },
                 {
                     title:'支出',
                     list:[
-                        {name: "工资",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/expend/salary"},
-                        {name: "支出",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/expend/list"},
+                        {name: "工资",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/expend/salary"},
+                        {name: "支出",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/expend/list"},
                     ]
                 },
             ]

+ 7 - 7
ghsApp/src/admin/home/workbench.vue

@@ -163,7 +163,7 @@
 				<view class="tabs-list" v-for="(item, index) in tabsData" :key="index">
 					<view @click="goPage(item)">
 						<view class="tabs-img">
-							<image :src="`${constant.imgUrl}/${item.img}`" alt mode="widthFix" ></image>
+							<image :src="`${constant.hostUrl}/image/${item.img}`" alt mode="widthFix" ></image>
 							<view v-if="item.remindNum && item.remindNum>0" 
 								style="border-radius:30upx;background-color:red;color:white;top:-20upx;left:-30upx;font-size:24upx;position:absolute;text-align:center;
 								display:flex;align-items:center;justify-content:center;width:40upx;height:40upx;">
@@ -274,12 +274,12 @@ export default {
 				{name : "盘点", img : "/ghs/home/pandian.png", url : "/pagesStorehouse/inventory/list"},
 				{name : "库存预警", img : "/ghs/home/kcyjs.png", url : "/admin/item/list?warning=1"},
 			],
-			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,
-			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,
-			skSrc3: `${this.$constant.imgUrl}/ghs/home/sk33.jpg`,
-			pfSrc3: `${this.$constant.imgUrl}/ghs/home/pf3.jpg`,
-			ydd: `${this.$constant.imgUrl}/ghs/home/ydd.jpg`,
-			ydhz: `${this.$constant.imgUrl}/ghs/home/ydhz.jpg`,
+			skSrc: `${this.$constant.hostUrl}/image/ghs/home/kj.png`,
+			pfSrc: `${this.$constant.hostUrl}/image/ghs/home/pf.jpg`,
+			skSrc3: `${this.$constant.hostUrl}/image/ghs/home/sk33.jpg`,
+			pfSrc3: `${this.$constant.hostUrl}/image/ghs/home/pf3.jpg`,
+			ydd: `${this.$constant.hostUrl}/image/ghs/home/ydd.jpg`,
+			ydhz: `${this.$constant.hostUrl}/image/ghs/home/ydhz.jpg`,
 			isScanEnv:false,
 			isMini:0,
 			todayDebt:0,

+ 1 - 1
ghsApp/src/admin/item/list2.vue

@@ -83,7 +83,7 @@
 		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
-				<image :src="showClassImg ? item.cover : `${constant.imgUrl}/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+				<image :src="showClassImg ? item.cover : `${constant.hostUrl}/image/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
 				<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
 				</view>
 			</view>

+ 3 - 3
ghsApp/src/components/app-wrapper-empty.vue

@@ -82,11 +82,11 @@ export default {
 			if (this.img) {
 				return this.img
 			} else if (this.type == 'search') {
-				return `${this.$constant.imgUrl}/retail/common/img_noorder.png`
+				return `${this.$constant.hostUrl}/image/retail/common/img_noorder.png`
 			} else if (this.type == 'billing') {
-				return `${this.$constant.imgUrl}/common/no_data_hua.png`
+				return `${this.$constant.hostUrl}/image/common/no_data_hua.png`
 			} else {
-				return `${this.$constant.imgUrl}/common/no_data_hua.png`
+				return `${this.$constant.hostUrl}/image/common/no_data_hua.png`
 			}
 		}
 	},

+ 1 - 1
ghsApp/src/components/empty.vue

@@ -2,7 +2,7 @@
 	<div class="app-empty">
 		<div class="app-empty-center">
 			<div class="app_empty_img">
-				<image :src="`${constant.imgUrl}/common/no_data_hua.png`" mode="widthFix"></image>
+				<image :src="`${constant.hostUrl}/image/common/no_data_hua.png`" mode="widthFix"></image>
 			</div>
 			<div class="app-empty-title">
 				<span class="empty_no_data">{{title}}</span>

+ 1 - 1
ghsApp/src/constant/index.js

@@ -14,7 +14,7 @@ const envVal = {
 	imgUrl: extConfig.imgHost,
 	env: process.env.NODE_ENV,
 	// 本地连接地址
-	hostUrl: null,
+	hostUrl: extConfig.apiHost,
 	// 请求接口地址
 	formal: null,
 	// 项目来源

+ 1 - 1
hdApp/src/components/app-wrapper-empty.vue

@@ -2,7 +2,7 @@
 	<div class="app-empty">
 		<div class="app-empty-center">
 			<div class="app_empty_img">
-				<image :src="`${constant.imgUrl}/common/no_data_hua.png`" mode="widthFix"></image>
+				<image :src="`${constant.hostUrl}/image/common/no_data_hua.png`" mode="widthFix"></image>
 			</div>
 			<div class="app-empty-title">
 				<span class="empty_noData">{{ title }}</span>

+ 1 - 1
hdApp/src/components/empty.vue

@@ -2,7 +2,7 @@
 	<div class="app-empty">
 		<div class="app-empty-center">
 			<div class="app_empty_img">
-				<image :src="`${constant.imgUrl}/common/no_data_hua.png`" mode="widthFix"></image>
+				<image :src="`${constant.hostUrl}/image/common/no_data_hua.png`" mode="widthFix"></image>
 			</div>
 			<div class="app-empty-title">
 				<span class="empty_no_data">{{title}}</span>

+ 1 - 1
hdApp/src/components/none-hd.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="model" v-if="show">
     <image
-      :src="`${constant.imgUrl}/ghs/home/deserve.png`"
+      :src="`${constant.hostUrl}/image/ghs/home/deserve.png`"
       class="noData_img"
     ></image>
     <view class="no_data_text">{{title}}</view>

+ 2 - 2
hdApp/src/pagesPurchase/components/wangCg.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="model" v-if="hasNoShop">
-    <image :src="`${constant.imgUrl}/ghs/home/deserve.png`" class="noData_img"></image>
+    <image :src="`${constant.hostUrl}/image/ghs/home/deserve.png`" class="noData_img"></image>
     <view style="margin:45upx 0;color:white;font-size:35upx;">首次下单,请填写门店信息</view>
     <view class="freeApply" @click="apply">填写</view>
     <view style="margin:65upx 0 0 0;color:white;font-size:40upx;" @click="goLogin()">
@@ -10,7 +10,7 @@
   </view>
   <block v-else>
     <view class="model-pass" v-if="check == false">
-      <image :src="`${constant.imgUrl}/ghs/home/deserve.png`" class="noData_img"></image>
+      <image :src="`${constant.hostUrl}/image/ghs/home/deserve.png`" class="noData_img"></image>
       <view style="margin:80upx 0;color:white;font-size:34upx;">审核中</view>
       <view class="freeApply" @click="refresh">刷新</view>
       <view style="margin:80upx 0 0 0;text-decoration:underline;color:white;font-size:34upx;" @click="contactShop()">联系商家</view>

+ 1 - 1
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -172,7 +172,7 @@
 		<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 
 			<view v-for="(item, index) in filterProductInfo" :key="index" @tap.stop="changeClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
-			<image :src="showClassImg ? item.classCover : `${constant.imgUrl}/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+			<image :src="showClassImg ? item.classCover : `${constant.hostUrl}/image/hhb_small.png`" style="width:120upx;height:120upx;border-radius:10upx;"></image>
 			<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.className}}</view>
 			</view>