cmy 2 днів тому
батько
коміт
05a784684a
6 змінених файлів з 180 додано та 164 видалено
  1. 11 12
      library/Event/SocketEvent.js
  2. 7 7
      library/Request.js
  3. 2 2
      main.js
  4. 38 2
      manifest.json
  5. 121 140
      pages/index/index.nvue
  6. 1 1
      store/index.js

+ 11 - 12
library/Event/SocketEvent.js

@@ -7,20 +7,19 @@
 // +----------------------------------------------------------------------
 // | Author: Mr Table <admin@hjf.pw>
 // +----------------------------------------------------------------------
-// import store from "../../store";
 import md5 from "../vendor/md5.js";
 import Message from "../socket/Message.js";
-// #ifndef APP-PLUS-NVUE
+// #ifndef APP-PLUS
 import store from "@/store/index.js";
 //#endif
 class SocketEvent {
 	app = null;
-	// #ifdef APP-PLUS-NVUE
+	// #ifdef APP-PLUS
 	allApp = null;
 	//#endif
 	constructor(app) {
 	    this.app = app;
-		// #ifdef APP-PLUS-NVUE
+		// #ifdef APP-PLUS
 		this.allApp = getApp({allowDefault: true})
 		//#endif
 	}
@@ -30,10 +29,10 @@ class SocketEvent {
 	 */
 	onOpen(res) {
 		uni.$emit('socketOpen',res);
-		// #ifdef APP-PLUS-NVUE
+		// #ifdef APP-PLUS
 		let user = allApp.$store.state.user;
 		//#endif
-		// #ifndef APP-PLUS-NVUE
+		// #ifndef APP-PLUS
 		let user = store.state.user;
 		//#endif
 		if(user != null) {
@@ -51,10 +50,10 @@ class SocketEvent {
 				
 				this.app.request.get("chatBagenum").then(res=>{
 					if(res.code == 200) {
-						// #ifdef APP-PLUS-NVUE
+						// #ifdef APP-PLUS
 						allApp.$store.commit('setTxbagenum',res.data);
 						//#endif
-						// #ifndef APP-PLUS-NVUE
+						// #ifndef APP-PLUS
 						store.commit('setTxbagenum',res.data);
 						//#endif
 					}
@@ -69,13 +68,13 @@ class SocketEvent {
 	}
 	onMessage(res) {
 		if(res.code == 'chat' || res.code == 'group_chat') {
-			// #ifdef APP-PLUS-NVUE
+			// #ifdef APP-PLUS
 			let bagenum = allApp.$store.state.txbagenum;
 			//bagenum.count ++;
 			bagenum.chatCount ++;
 			allApp.$store.commit('setTxbagenum',bagenum);
 			//#endif
-			// #ifndef APP-PLUS-NVUE
+			// #ifndef APP-PLUS
 			let bagenum = store.state.txbagenum;
 			//bagenum.count ++;
 			bagenum.chatCount ++;
@@ -88,13 +87,13 @@ class SocketEvent {
 		if(res.code == 'friend_add') {
 			if(this.app.utils.isJSON(res.data)) {
 				var data= JSON.parse(res.data);
-				// #ifdef APP-PLUS-NVUE
+				// #ifdef APP-PLUS
 				//消息提示
 				let bagenumAr = allApp.$store.state.txbagenum;
 				bagenumAr.applyCount ++;
 				allApp.$store.commit('setTxbagenum',bagenumAr);
 				//#endif
-				// #ifndef APP-PLUS-NVUE
+				// #ifndef APP-PLUS
 				//消息提示
 				let bagenumAr = store.state.txbagenum;
 				bagenumAr.applyCount ++;

+ 7 - 7
library/Request.js

@@ -5,10 +5,10 @@ import Before from "./interceptors/Before.js";
 import Complete from "./interceptors/Complete.js";
 import Success from "./interceptors/Success.js";
 import Fail from "./interceptors/Fail.js";
-// #ifdef APP-PLUS-NVUE
-const app = getApp()
+// #ifdef APP-PLUS
+const app = getApp({allowDefault: true})
 //#endif
-// #ifndef APP-PLUS-NVUE
+// #ifndef APP-PLUS
 import store from "@/store/index.js";
 //#endif
 
@@ -28,10 +28,10 @@ let Request = {
 	 * @param {Object} name
 	 */
 	getApi:function(name){
-		// #ifdef APP-PLUS-NVUE
+		// #ifdef APP-PLUS
 		return app.$store.state.http + api[name];
 		// #endif
-		// #ifndef APP-PLUS-NVUE
+		// #ifndef APP-PLUS
 		return store.state.http + api[name];
 		// #endif
 	},
@@ -126,10 +126,10 @@ let Request = {
 			if(name.indexOf('http://') == 0 || name.indexOf("https://") == 0) {
 				url = name;
 			} else {
-				// #ifdef APP-PLUS-NVUE
+				// #ifdef APP-PLUS
 				url =  app.$store.state.http + api[name];
 				// #endif
-				// #ifndef APP-PLUS-NVUE
+				// #ifndef APP-PLUS
 				 url = store.state.http + api[name];
 				// #endif
 			}

+ 2 - 2
main.js

@@ -12,11 +12,11 @@ Vue.component('page-head',headers)
 //使用伪装容器  
 let $c = Container.getInstance();
 let base = new Base(Vue,$c);
-// #ifndef APP-PLUS-NVUE
 Vue.prototype.$store = store; //stroe  
+// #ifndef APP-PLUS
 store.commit("init",Vue.prototype);
-Vue.prototype.base = base;
 // #endif
+Vue.prototype.base = base;
 //设置为 false 以阻止 vue 在启动时生成生产提示
 Vue.config.productionTip = false;
 App.mpType = 'app';  

+ 38 - 2
manifest.json

@@ -2,11 +2,45 @@
     "name" : "长城易趣拍",
     "appid" : "__UNI__EFA020E",
     "description" : "一款电商App",
-    "versionName" : "3.4.2",
-    "versionCode" : 336,
+    "versionName" : "3.4.3",
+    "versionCode" : 343,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
+        "confusion" : {
+            "description" : "NVUE原生混淆",
+            "resources" : {
+                "pages/index/home.nvue" : {},
+                "pages/index/index.nvue" : {},
+                "config/api.js" : {},
+                "library/SocktEvent.js" : {},
+                "library/interceptors/After.js" : {},
+                "library/interceptors/Before.js" : {},
+                "library/interceptors/Complete.js" : {},
+                "library/interceptors/Fail.js" : {},
+                "library/interceptors/Success.js" : {},
+                "library/socket/Message.js" : {},
+                "library/socket/WebSokcet.js" : {},
+                "library/utils/Comm.js" : {},
+                "library/utils/Face.js" : {},
+                "library/utils/graceChecker.js" : {},
+                "library/vendor/base64.js" : {},
+                "library/vendor/cookie.js" : {},
+                "library/vendor/CryptoJS.js" : {},
+                "library/vendor/graceChecker.js" : {},
+                "library/vendor/IDCard.js" : {},
+                "library/vendor/md5.js" : {},
+                "library/vendor/uqrcode.js" : {},
+                "library/Base.js" : {},
+                "library/Container.js" : {},
+                "library/Http.js" : {},
+                "library/Request.js" : {},
+                "library/upapp.js" : {},
+                "store/modules/permission.js" : {},
+                "store/index.js" : {},
+                "main.js" : {}
+            }
+        },
         "usingComponents" : true,
         "nvueStyleCompiler" : "uni-app",
         "compilerVersion" : 3,
@@ -258,3 +292,5 @@
         }
     }
 }
+/* 模块配置 */
+

+ 121 - 140
pages/index/index.nvue

@@ -85,7 +85,6 @@
 								总监:{{ guData.nickname }}
 							</text>
 						</view>
-
 					</view>
 				</view>
 			</view>
@@ -93,10 +92,9 @@
 			<view class="goods">
 				<view class="top">
 					<image class="topBgImg" src="@/static/img/index_item_bg.png" mode="widthFix"></image>
-					<view class="goodsTitle">
-						<image class="icon" src="/static/img/goods-icon.png"></image>
+					<image class="icon" src="/static/img/goods-icon.png"></image>
+					<view class="topTitle">
 						<text class="label">货款提货</text>
-						<view class="fx-g1"></view>
 						<view class="more" @tap="tapOpen" data-url="../goods/list">
 							<text class="text">查看更多></text>
 						</view>
@@ -111,7 +109,7 @@
 						</text>
 						<view class="iview">
 							<view class="score">
-								<text>
+								<text class='goods-name'>
 									{{ item.commission }}
 								</text>
 								<text class="tag" v-if="sysData.is_audit == 0">积分</text>
@@ -126,25 +124,25 @@
 			<!--最新门店-->
 			<view class="shop" v-if="sysData.is_audit == 0">
 				<view class="top">
+					<image class="topBgImg" src="@/static/img/index_item_bg.png" mode="widthFix"></image>
 					<image class="icon" src="/static/img/shop-icon.png"></image>
-					<text class="label">易趣C果园({{merchantCount}}家)</text>
-					<view class="fx-g1"></view>
-					<view class="more" @tap="tapOpen" data-url="../merchant/list">
-						<text class="text">查看更多></text>
-						<image class="prv" src="/static/img/ic-pev.png"></image>
+					<view class="topTitle">
+						<text class="label">易趣C果园({{merchantCount}}家)</text>
+						<view class="more" @tap="tapOpen" data-url="../merchant/list">
+							<text class="text">查看更多></text>
+						</view>
 					</view>
 				</view>
 				<view class="shop-items">
-					<view class="item fx-r" @tap="tapOpen" :data-url="'../merchant/index?id=' + item.id"
+					<view class="item" @tap="tapOpen" :data-url="'../merchant/index?id=' + item.id"
 						v-for="item in merchantData">
 						<image :src="item.logo" class="img" mode="aspectFill"></image>
 						<view class="info">
-							<view class="iview-top fx-r">
+							<view class="iview-top">
 								<text class="title">{{ item.name }}</text>
-								<view class="fx-g1"></view>
 								<view class="ii">
-									<image src="/static/img/shop-small-location.png"></image>
-									<text>
+									<image class="shopTipIcon" src="/static/img/shop-small-location.png"></image>
+									<text class="iiText">
 										距离{{ item.dis_km }}
 									</text>
 								</view>
@@ -158,18 +156,19 @@
 								<image src="/static/img/tel-shop.png" class="icon"></image>
 								<text class="value">{{ item.tel }}</text>
 							</view>
-
 							<view class="business">
-								营业时间: {{ item.business }}
+								<text class='businessText'>
+									营业时间: {{ item.business }}
+								</text>
 							</view>
 
 							<view class="wiget">
 								<view class="witem" @tap.stop="tapTel(item)">
-									<image src="/static/img/shop-tel.png"></image>
+									<image class="witeIcon" src="/static/img/shop-tel.png"></image>
 									<text class="text">电话</text>
 								</view>
 								<view class="witem" @tap.stop="tapLbs(item)">
-									<image src="/static/img/shop-location.png"></image>
+									<image class="witeIcon" src="/static/img/shop-location.png"></image>
 									<text class="text">导航</text>
 								</view>
 							</view>
@@ -373,7 +372,7 @@
 						if (res.code == 200) {
 							this.title = res.data.title;
 							this.content = res.data.content;
-							console.log(this.content, 'this.content')
+							// console.log(this.content, 'this.content')
 							this.isGg = true;
 
 						}
@@ -701,7 +700,7 @@
 
 	//抢货通道
 	.team-buy {
-		margin: 15rpx 10rpx 20rpx 30rpx;
+		margin: 15rpx 10rpx 0rpx 30rpx;
 		height: 240rpx;
 		width: 690rpx;
 
@@ -712,13 +711,13 @@
 
 		.team-show {
 			color: #fff;
-			padding-top: 70rpx;
-			margin-top: -240rpx;
+			padding-top: 40rpx;
+			margin-top: -200rpx;
 			align-items: center;
 			justify-content: center;
 
 			.labelBox {
-				padding-top: 30rpx;
+				padding-top: 20rpx;
 
 				.label {
 					line-height: 45rpx;
@@ -746,98 +745,103 @@
 
 	}
 
-	//产品中心
-	.goods {
-		padding: 20rpx 30rpx;
-
-		.goodsTitle {
-			margin-top: -60rpx;
-			flex:1;
-			position: relative;
-			flex-direction: row;
-			padding-left: 86rpx;
-			padding-right: 50rpx;
-		}
+	.top {
+		padding-top: 30rpx;
+		position: relative;
+		height: 123rpx;
 
 		.topBgImg {
 			width: 690rpx;
 			height: 74rpx;
 		}
 
-		.top {
-			height: 74rpx;
-			.icon {
-				width: 96rpx;
-				height: 123rpx;
-				position: absolute;
-				top: -24rpx;
-				left: 0;
-			}
+		.icon {
+			width: 96rpx;
+			height: 110rpx;
+			position: absolute;
+			top: 0rpx;
+			left: 0;
+			z-index: 999;
+		}
+
+		.topTitle {
+			margin-top: -60rpx;
+			flex: 1;
+			position: relative;
+			flex-direction: row;
+			padding-left: 86rpx;
+			padding-right: 50rpx;
+			justify-content: space-between;
 
 			.label {
 				color: #fff;
 				font-weight: bold;
 				font-size: 34rpx;
 				margin-left: 12rpx;
-				align-self: self-start;
-				padding-top: 16rpx;
+				padding-top: 10rpx;
 			}
 
 			.more {
-				align-self: self-start;
-				padding-top: 30rpx;
+				padding-top: 20rpx;
 
 				.text {
 					color: #FFF;
 					font-size: 24rpx;
 				}
-
-				.prv {
-					width: 10rpx;
-					height: 20rpx;
-					margin-left: 8rpx;
-				}
 			}
-
 		}
+	}
+
+	//产品中心
+	.goods {
+		padding: 0rpx 30rpx 30rpx;
 
 		.goods-items {
 			border: 2px solid rgba(255, 51, 44, 1);
 			border-bottom-left-radius: 20rpx;
 			border-bottom-right-radius: 20rpx;
 			padding: 20rpx;
+			margin-top: -24rpx;
+			flex-direction: row;
+			flex-wrap: wrap;
+			justify-content: space-between;
 
 			.item {
-				// width: calc(50% - 10rpx);
-				margin-right: 10rpx;
+				width: 310rpx;
 				margin-bottom: 20rpx;
 				box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.1);
 				border-radius: 20rpx;
 				background-color: #FFF;
 
 				.nimg {
-					// width: 100%;
-					// height: calc(50vw - 20rpx - 10rpx);
+					flex: 1;
+					height: 310rpx;
 					border-radius: 20rpx 20rpx 0 0;
 				}
 
 				.title {
-					padding: 20rpx;
-					height: 80rpx;
+					padding: 20rpx 20rpx 0;
 					text-overflow: ellipsis;
-					lines: 1;
+					lines: 2;
 					color: #333333;
 					font-weight: bold;
 					font-size: 30rpx;
 				}
 
 				.iview {
-					padding: 20rpx;
+					padding: 20rpx 20rpx;
+					flex-direction: row;
+					justify-content: space-between;
 
 					.score {
-						color: #FF4C4C;
-						font-weight: bold;
-						font-size: 36rpx;
+						flex-direction: row;
+						align-items: flex-end;
+
+						.goods-name {
+							color: #FF4C4C;
+							font-weight: bold;
+							font-size: 36rpx;
+						}
 
 						.tag {
 							font-weight: bold;
@@ -862,47 +866,6 @@
 	.shop {
 		padding: 20rpx 30rpx;
 
-		.top {
-			height: 74rpx;
-			padding-left: 86rpx;
-			padding-right: 50rpx;
-
-
-			.icon {
-				width: 96rpx;
-				height: 123rpx;
-				position: absolute;
-				top: -24rpx;
-				left: 0;
-			}
-
-			.label {
-				color: #fff;
-				font-weight: bold;
-				font-size: 34rpx;
-				margin-left: 12rpx;
-				align-self: self-start;
-				padding-top: 16rpx;
-			}
-
-			.more {
-				align-self: self-start;
-				padding-top: 30rpx;
-
-				.text {
-					color: #FFF;
-					font-size: 24rpx;
-				}
-
-				.prv {
-					width: 10rpx;
-					height: 20rpx;
-					margin-left: 8rpx;
-				}
-			}
-
-		}
-
 		.shop-items {
 			border: 2px solid rgba(255, 51, 44, 1);
 			border-bottom-left-radius: 20rpx;
@@ -911,6 +874,7 @@
 
 			.item {
 				margin-top: 30rpx;
+				flex-direction: row;
 
 				.img {
 					width: 180rpx;
@@ -921,48 +885,60 @@
 				.info {
 					position: relative;
 					margin-left: 20rpx;
-					// width: calc(100% - 200rpx);
+					width: 440rpx;
 					border-bottom: 1px solid #F8F8F8;
+					align-items: flex-start;
+					.iview-top {
+						flex-direction: row;
+						justify-content: space-between;
+						align-items: center;
+						.title {
+							font-weight: bold;
+							font-size: 34rpx;
+							color: #333333;
+							width: 300rpx;
+							text-overflow: ellipsis;
+							lines: 1;
+						}
 
-					.title {
-						font-weight: bold;
-						font-size: 34rpx;
-						color: #333333;
-						// width: calc(60%);
-						text-overflow: ellipsis;
-						lines: 1;
-					}
-
-					.ii {
-						// image {
-						// 	width: 20rpx;
-						// 	height: 28rpx;
-						// 	margin-right: 8rpx
-						// }
-
-						font-weight: 400;
-						font-size: 22rpx;
-						color: #666666;
+						.ii {
+							flex-direction: row;
+							.shopTipIcon {
+								width: 20rpx;
+								height: 28rpx;
+								margin-right: 8rpx
+							}
 
+							.iiText {
+								font-weight: 400;
+								font-size: 22rpx;
+								color: #666666;
+							}
+						}
 					}
 
 					.address {
+						flex-direction: row;
+						margin-top: 20rpx;
 						.icon {
 							width: 28rpx;
 							height: 28rpx;
 						}
 
 						.value {
+							width: 400rpx;
+							text-overflow: ellipsis;
+							lines: 1;
 							font-size: 22rpx;
 							color: #666666;
 							opacity: 0.5;
-							margin-left: 10rpx;
+							padding-left: 10rpx;
 						}
 
-						margin-top: 20rpx;
 					}
 
 					.tel {
+						flex-direction: row;
 						margin-top: 16rpx;
 
 						.icon {
@@ -979,20 +955,25 @@
 					}
 
 					.business {
-						font-weight: bold;
-						font-size: 24rpx;
-						color: #FF6F0F;
 						background: rgba(252, 243, 240, 0.8);
 						border-radius: 16rpx 16rpx 16rpx 0px;
 						padding: 10rpx 10rpx;
 						margin-bottom: 20rpx;
+
+						.businessText {
+							font-weight: bold;
+							font-size: 24rpx;
+							color: #FF6F0F;
+						}
 					}
 
 					.wiget {
 						position: absolute;
+						flex-direction: row;
+						justify-content: space-between;
 						right: 0;
 						bottom: 20rpx;
-
+						width: 120rpx;
 						.wline {
 							margin: 0px 24rpx;
 							height: 40rpx;
@@ -1002,13 +983,14 @@
 						}
 
 						.witem {
-							// image {
-							// 	width: 46rpx;
-							// 	height: 46rpx;
-							// }
+							align-items: center;
+							.witeIcon {
+								width: 46rpx;
+								height: 46rpx;
+							}
 
 							.text {
-								font-size: 14px;
+								font-size: 28rpx;
 								color: #666666;
 								margin-top: 8rpx;
 							}
@@ -1018,7 +1000,6 @@
 				}
 			}
 		}
-
 	}
 
 

+ 1 - 1
store/index.js

@@ -130,7 +130,7 @@ const store = new Vuex.Store({
 			app.webSocket.ttClose();
 		},
 		setSys(store, data) {
-			console.log(store,data,'data')
+			// console.log(store,data,'data')
 			store.sysData = data;
 		},
 		/**