liujd 6 éve
szülő
commit
19899828ca
29 módosított fájl, 152 hozzáadás és 46 törlés
  1. 4 0
      mobile-code/src/admin/home/workbench.vue
  2. 1 0
      mobile-code/src/admin/interest/invite.vue
  3. 1 0
      mobile-code/src/admin/interest/my-invite.vue
  4. 5 0
      mobile-code/src/admin/order/components/card-name.vue
  5. 1 0
      mobile-code/src/admin/setting/wx-menu.vue
  6. 3 1
      mobile-code/src/admin/template/index.vue
  7. 1 0
      mobile-code/src/components/app-coupon-sel.vue
  8. 13 5
      mobile-code/src/components/app-img.vue
  9. 3 1
      mobile-code/src/components/module/app-activily-coupon.vue
  10. 3 1
      mobile-code/src/components/module/app-share-mask.vue
  11. 6 1
      mobile-code/src/components/module/app-trademark.vue
  12. 23 0
      mobile-code/src/constant/index.js
  13. 1 0
      mobile-code/src/official/callback.vue
  14. 1 0
      mobile-code/src/official/pay.vue
  15. 1 0
      mobile-code/src/pages/callback/index.vue
  16. 1 0
      mobile-code/src/pages/chat/index.vue
  17. 1 0
      mobile-code/src/pages/coupon/list.vue
  18. 7 2
      mobile-code/src/pages/home/components/goods-list-big.vue
  19. 7 2
      mobile-code/src/pages/home/components/goods-list-middle.vue
  20. 28 26
      mobile-code/src/pages/home/components/goods-list-small.vue
  21. 5 0
      mobile-code/src/pages/home/components/login-popup.vue
  22. 4 0
      mobile-code/src/pages/home/index.vue
  23. 4 0
      mobile-code/src/pages/home/shop.vue
  24. 12 7
      mobile-code/src/pages/home/user.vue
  25. 1 0
      mobile-code/src/pages/interest/invite.vue
  26. 1 0
      mobile-code/src/pages/interest/level.vue
  27. 6 0
      mobile-code/src/static/css/reset.scss
  28. 4 0
      mobile-code/src/utils/auth.js
  29. 4 0
      mobile-code/src/utils/util.js

+ 4 - 0
mobile-code/src/admin/home/workbench.vue

@@ -230,7 +230,11 @@ export default {
 		},
 		// 跳转
 		pageToFn(item) {
+			// #ifdef H5
 			location.href = item.url
+			// #endif
+			// #ifndef H5
+			// #endif
 		}
 	}
 }

+ 1 - 0
mobile-code/src/admin/interest/invite.vue

@@ -120,6 +120,7 @@ export default {
 	mixins: [list],
 	data() {
 		return {
+			constant: this.$constant,
 			form: {
 				status: 0,
 				search: ''

+ 1 - 0
mobile-code/src/admin/interest/my-invite.vue

@@ -72,6 +72,7 @@ export default {
 	mixins: [list],
 	data() {
 		return {
+			constant: this.$constant,
 			data: {},
 			tabIndex: 0,
 			tabs: [

+ 5 - 0
mobile-code/src/admin/order/components/card-name.vue

@@ -17,6 +17,11 @@ export default {
 			type: Object,
 			default: () => {}
 		}
+	},
+	data() {
+		return {
+			constant: this.$constant
+		}
 	}
 }
 </script>

+ 1 - 0
mobile-code/src/admin/setting/wx-menu.vue

@@ -89,6 +89,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			form: {
 				name: '',
 				menuOption: 0,

+ 3 - 1
mobile-code/src/admin/template/index.vue

@@ -37,7 +37,9 @@
 export default {
 	name: 'sel-template',
 	data() {
-		return {}
+		return {
+			constant: this.$constant
+		}
 	}
 }
 </script>

+ 1 - 0
mobile-code/src/components/app-coupon-sel.vue

@@ -73,6 +73,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			memberCheck: false,
 			selIndex: null,
 			couponSelInx: null,

+ 13 - 5
mobile-code/src/components/app-img.vue

@@ -1,10 +1,10 @@
 <template>
 	<block>
-		<!-- #ifdef APP-PLUS -->
-		<img :lazy-load="true" :src="src" :alt="alt" :title="title" />
-		<!-- #endif -->
 		<!-- #ifdef H5 -->
-		<img v-lazy="src" :alt="alt" :title="title" />
+		<img class="app-img" v-lazy="src" :alt="alt" :title="title" :mode="mode" :style="{height: height + 'rpx'}" />
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<image class="app-img" :src="src" :alt="alt" :title="title"  :lazy-load="true" :mode="mode" :style="{height: height + 'rpx'}" ></image>
 		<!-- #endif -->
 	</block>
 </template>
@@ -27,10 +27,18 @@ export default {
 		title: {
 			type: String,
 			default: ''
+		},
+		mode: {
+			type: String,
+			default: 'widthFix'
+		},
+		height: {
+			type: Number,
+			default: 346
 		}
 	}
 }
 </script>
 
-<style>
+<style lang="scss" scoped>
 </style>

+ 3 - 1
mobile-code/src/components/module/app-activily-coupon.vue

@@ -44,7 +44,9 @@ export default {
 		}
 	},
 	data() {
-		return {}
+		return {
+			constant: this.$constant
+		}
 	},
 	methods: {
 		receive() {

+ 3 - 1
mobile-code/src/components/module/app-share-mask.vue

@@ -28,7 +28,9 @@ export default {
 		}
 	},
 	data() {
-		return {}
+		return {
+			constant: this.$constant
+		}
 	},
 	methods: {
 		handleClick() {

+ 6 - 1
mobile-code/src/components/module/app-trademark.vue

@@ -9,7 +9,12 @@
 
 <script>
 export default {
-	name: 'app-trademark'
+	name: 'app-trademark',
+	data() {
+		return {
+			constant: this.$constant
+		}
+	}
 }
 </script>
 

+ 23 - 0
mobile-code/src/constant/index.js

@@ -2,7 +2,12 @@ import { ProjectName } from '@/config'
 
 // 常量索引
 const envVal = {
+	// #ifdef H5
 	imgUrl: `${window.location.protocol}//img.${getFirstHost()}.com`,
+	// #endif
+	// #ifndef H5
+	imgUrl: `http://img.huaml.com`,
+	// #endif
 	env: process.env.NODE_ENV,
 	// 本地连接地址
 	hostUrl: null,
@@ -14,18 +19,36 @@ const envVal = {
 
 // 项目配置
 if (ProjectName == 'mobile') {
+	// #ifdef H5
 	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://m.huaml.com' : `${window.location.protocol}//${window.location.host}`
 	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.m.huaml.com` : `${window.location.protocol}//api.${window.location.host}`
+	// #endif
+	// #ifndef H5
+	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://m.huaml.com' : `https://m.huaml.com`
+	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.m.huaml.com` : `https://api.m.huaml.com`
+	// #endif
 
 	uni.setStorageSync('source', 'mobile')
 } else if (ProjectName == 'business') {
+	// #ifdef H5
 	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://b.huaml.com' : `${window.location.protocol}//${window.location.host}`
 	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.b.huaml.com` : `${window.location.protocol}//api.${window.location.host}`
+	// #endif
+	// #ifndef H5
+	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://b.huaml.com' : `https://b.huaml.com`
+	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.b.huaml.com` : `https://api.b.huaml.com`
+	// #endif
 
 	uni.setStorageSync('source', 'business')
 } else {
+	// #ifdef H5
 	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://w.huaml.com' : `${window.location.protocol}//${window.location.host}`
 	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.w.huaml.com` : `${window.location.protocol}//api.w.${getFirstHost()}.com`
+	// #endif
+	// #ifndef H5
+	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://w.huaml.com' : `https://w.huaml.com`
+	envVal.hostUrl = process.env.NODE_ENV == 'development' ? `http://api.w.huaml.com` : `https://api.w.huaml.com`
+	// #endif
 
 	uni.setStorageSync('source', 'www')
 }

+ 1 - 0
mobile-code/src/official/callback.vue

@@ -86,6 +86,7 @@ export default {
 	name: 'callback',
 	data() {
 		return {
+			constant: this.$constant,
 			data: {},
 			pageStatus: '2',
 			promptData: [

+ 1 - 0
mobile-code/src/official/pay.vue

@@ -47,6 +47,7 @@ export default {
 	name: 'pay-page',
 	data() {
 		return {
+			constant: this.$constant,
 			detail: {},
 			funcitonData: []
 		}

+ 1 - 0
mobile-code/src/pages/callback/index.vue

@@ -111,6 +111,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			pageTit: '',
 			pagestatus: 1,
 			contentClass: '',

+ 1 - 0
mobile-code/src/pages/chat/index.vue

@@ -62,6 +62,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			linkShow: false
 		}
 	},

+ 1 - 0
mobile-code/src/pages/coupon/list.vue

@@ -72,6 +72,7 @@ export default {
 	mixins: [list],
 	data() {
 		return {
+			constant: this.$constant,
 			tabIndex: 0,
 			tabs: [
 				{

+ 7 - 2
mobile-code/src/pages/home/components/goods-list-big.vue

@@ -4,13 +4,13 @@
 			<div class="title-text">{{ info.categoryName }}</div>
 			<div class="title-img">
 				<!-- <img :src="`${constant.imgUrl}/retail/home/goods-small-tit.png`" alt /> -->
-				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt />
+				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt mode="widthFix" />
 			</div>
 		</div>
 		<div class="goods-wrap">
 			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
-					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" />
+					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" :height="534" />
 				</div>
 				<div class="goods-det">
 					<div class="goods-left">
@@ -37,6 +37,11 @@ export default {
 			default: () => {}
 		}
 	},
+	data() {
+		return {
+			constant: this.$constant
+		}
+	},
 	methods: {}
 }
 </script>

+ 7 - 2
mobile-code/src/pages/home/components/goods-list-middle.vue

@@ -3,13 +3,13 @@
 		<div class="title-tag">
 			<div class="title-text">{{ info.categoryName }}</div>
 			<div class="title-img">
-				<img :src="`${constant.imgUrl}/retail/home/goods-middle-tit.png`" alt />
+				<img :src="`${constant.imgUrl}/retail/home/goods-middle-tit.png`" alt mode="widthFix" />
 			</div>
 		</div>
 		<div class="goods-wrap">
 			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
-					<img :src="item.img" alt="商品图片" mode="aspectFit" />
+					<img :src="item.img" alt="商品图片" mode="aspectFit" :height="346" />
 				</div>
 				<div class="goods-det">
 					<div class="goods-left">
@@ -31,6 +31,11 @@ export default {
 			type: Object,
 			default: () => {}
 		}
+	},
+	data() {
+		return {
+			constant: this.$constant
+		}
 	}
 }
 </script>

+ 28 - 26
mobile-code/src/pages/home/components/goods-list-small.vue

@@ -1,15 +1,15 @@
 <template>
-	<div class="goods-list-big-module">
+	<div class="goods-list-small-module">
 		<div class="title-tag">
 			<div class="title-text">{{ info.categoryName }}</div>
 			<div class="title-img">
-				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt />
+				<img :src="`${constant.imgUrl}/retail/home/goods-big-tit.png`" alt mode="widthFix" />
 			</div>
 		</div>
 		<div class="goods-wrap">
 			<div class="goods-list" v-for="(item, index) in info.goodsInfoList" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 				<div class="goods-img">
-					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" />
+					<app-img :src="item.smallImgList[0]" alt="商品图片" mode="aspectFit" :height="246" />
 				</div>
 				<div class="goods-det">
 					<div class="goods-left">
@@ -35,36 +35,41 @@ export default {
 			type: Object,
 			default: () => {}
 		}
+	},
+	data() {
+		return {
+			constant: this.$constant
+		}
 	}
 }
 </script>
 
 <style lang="scss" scoped>
-	.goods-list-big-module {
+	.goods-list-small-module {
 		// .title-tag {
 		// 	.title-text {
-        //         font-size: 38px;
-        //         text-align: center;
-        //     }
-        //     .title-img {
-        //         width: 296px;
-        //         margin: 10px auto 48px;
-        //     }
+		//         font-size: 38px;
+		//         text-align: center;
+		//     }
+		//     .title-img {
+		//         width: 296px;
+		//         margin: 10px auto 48px;
+		//     }
 		// }
 		.title-tag {
-            position: relative;
+			position: relative;
 			.title-text {
-                position: absolute;
-                left: 0;
-                right: 0;
-                font-size: 34px;
-                text-align: center;
-            }
-            .title-img {
-                width: 94%;
-                margin: 0 auto 30px;
-            }
-        }
+				position: absolute;
+				left: 0;
+				right: 0;
+				font-size: 34px;
+				text-align: center;
+			}
+			.title-img {
+				width: 94%;
+				margin: 0 auto 30px;
+			}
+		}
 		.goods-wrap {
 			@include disFlex(flex-start, space-between);
 			flex-wrap: wrap;
@@ -80,9 +85,6 @@ export default {
 			.goods-img {
 				width: 346px;
 				height: 346px;
-				img {
-					height: 100%;
-				}
 			}
 			.goods-det {
 				@include disFlex(flex-end, space-between);

+ 5 - 0
mobile-code/src/pages/home/components/login-popup.vue

@@ -69,6 +69,11 @@ export default {
 			default: false
 		}
 	},
+	data() {
+		return {
+			constant: this.$constant
+		}
+	},
 	methods: {
 		hidePopup() {
 			this.$emit('hide')

+ 4 - 0
mobile-code/src/pages/home/index.vue

@@ -67,7 +67,11 @@ export default {
 		},
 		// operate
 		adDetailFn(item) {
+			// #ifdef H5
 			location.href = item.url
+			// #endif
+			// #ifndef H5
+			// #endif
 		}
 	}
 }

+ 4 - 0
mobile-code/src/pages/home/shop.vue

@@ -86,7 +86,11 @@ export default {
 		},
 		// operate
 		adDetailFn(item) {
+			// #ifdef H5
 			location.href = item.url
+			// #endif
+			// #ifndef H5
+			// #endif
 		},
 		phoneCall() {
 			uni.makePhoneCall({

+ 12 - 7
mobile-code/src/pages/home/user.vue

@@ -10,21 +10,21 @@
 					<button class="button-com" @click="showPopup">申请会员</button>
 				</div>
 			</template>
-			<!-- 登录 -->
+			<!-- 登录 -->
 			<template v-else>
 				<div class="is-login-attr">
 					<div class="user-wrap-top">
 						<div class="user-blo-left">
 							<div class="user-name">{{ shopUser.userName }}</div>
 							<div class="user-level">
-								<div class="user-level-icon">
-									<img src alt />
-								</div>
+								<!-- <div class="user-level-icon">
+									<img src="" alt />
+								</div> -->
 								<div>成长值 {{ shopUser.userAsset.growth }}/{{ shopUser.userAsset.nextLevelGrowth }}</div>
 							</div>
 						</div>
 						<div class="user-blo-right login-attr-wrap">
-							<img :src="shopUser.avatarUrl | default_avatar" alt="头像" />
+							<img :src="shopUser.smallAvatarUrl | default_avatar" alt="头像" />
 						</div>
 					</div>
 					<div class="user-wrap-bottom">
@@ -55,7 +55,7 @@
 			</div>
 		</div>
 		<div class="list-content">
-			<tui-list-view title class="tui-list-view">
+			<tui-list-view class="tui-list-view">
 				<tui-list-cell class="tui-list" :arrow="true" @click="$util.pageTo('/pages/order/list')">
 					<div class="list-wrap">
 						<div class="list-label">我的订单</div>
@@ -86,7 +86,7 @@
 			</tui-list-view>
 		</div>
 		<div class="list-content">
-			<tui-list-view title class="tui-list-view">
+			<tui-list-view class="tui-list-view">
 				<tui-list-cell class="tui-list" :last="true" @click="logoutFn()">
 					<div class="list-wrap">
 						<div class="list-label">退出登录</div>
@@ -122,6 +122,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			popupShow: false,
 			stepIndex: 0
 		}
@@ -144,7 +145,11 @@ export default {
 		},
 		logoutFn() {
 			uni.clearStorageSync()
+			// #ifdef H5
 			location.reload()
+			// #endif
+			// #ifndef H5
+			// #endif
 		}
 	}
 }

+ 1 - 0
mobile-code/src/pages/interest/invite.vue

@@ -107,6 +107,7 @@ export default {
 	data() {
 		return {
 			data: {
+				constant: this.$constant,
 				stat: {},
 				asset: {}
 			},

+ 1 - 0
mobile-code/src/pages/interest/level.vue

@@ -55,6 +55,7 @@ export default {
 	},
 	data() {
 		return {
+			constant: this.$constant,
 			list: []
 		}
 	},

+ 6 - 0
mobile-code/src/static/css/reset.scss

@@ -90,6 +90,12 @@ img {
     display: block;
 }
 
+image {
+    width: 100%;
+    height: auto;
+    display: block;
+}
+
 .datetime-picker {
     .picker-body {
         font-size: 32px !important;

+ 4 - 0
mobile-code/src/utils/auth.js

@@ -167,7 +167,11 @@ export async function getCheckLogin() {
 	if (token) {
 		status = true
 	} else {
+		// #ifdef H5
 		location.href = `${CONSTANT.hostUrl}/auth/prepare?url=${encodeURIComponent(getMiniAppUrl(this.option, true))}`
+		// #endif
+		// #ifndef H5
+		// #endif
 	}
 	// await checkLogin().then((res) => {
 	//   if (res.status === 'success') {

+ 4 - 0
mobile-code/src/utils/util.js

@@ -76,7 +76,11 @@ export const getCheckLogin = () => {
 	if (token) {
 		status = true
 	} else {
+		// #ifdef H5
 		location.href = `${CONSTANT.hostUrl}/auth/prepare?url=${encodeURIComponent(getMiniAppUrl(this.option, true))}`
+		// #endif
+		// #ifndef H5
+		// #endif
 	}
 	return status
 }