Forráskód Böngészése

各省平均销售数据

李天标 5 éve
szülő
commit
b03a76b2eb

+ 4 - 2
pages.json

@@ -68,8 +68,10 @@
             "path" : "pages/WeixinSwicth/WeixinSwicth",
             "style" : {
 				// "navigationStyle": "custom",
-				 "enablePullDownRefresh": true,
-				"disableScroll": true
+				"navigationBarTitleText": "微信绑定",
+				"menuSrc":"static/img/leftTriangle.png",
+				 "enablePullDownRefresh": true
+				// "disableScroll": true
 			}
         }
     ],

+ 2 - 2
pages/Charts/elseStatistics.vue

@@ -1,5 +1,5 @@
+<!-- 单一统计图表 -->
 <template>
-	<view>
 		<mainStatistics :pname="pnameData" :equipmentId="equipmentIdData" :adminId="adminIdData"></mainStatistics>
 	</view>
 </template>
@@ -38,7 +38,7 @@
 			this.equipmentId = option['equipmentId'];
 			this.adminId = option['adminId'];
 			this.pname = option['pname'];
-			console.log("option:",this.equipmentId,this.adminId)
+			// console.log("option:",this.equipmentId,this.adminId)
 			// this.mainStatistics.init();
 		},
 		mounted() {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 545 - 120
pages/Charts/equipmentStatistics.vue


+ 3 - 3
pages/Charts/mainStatistics.vue

@@ -226,7 +226,7 @@
 		// 	this.init();
 		// },
 		onShow() {
-			console.log("onShow");
+			// console.log("onShow");
 			var test = uni.getStorageSync('test');
 			//判断是不是初次登陆
 			if (test == 2) {
@@ -235,7 +235,7 @@
 			this.day();
 		},
 		mounted() {
-			console.log("mounted");
+			// console.log("mounted");
 			this.init();
 			this.day();
 		},
@@ -468,7 +468,7 @@
 				if (this.equipmentId) {
 					param['equipmentId'] = this.equipmentId;
 				}
-				console.log('getMainStatisticsData:{}', param);
+				// console.log('getMainStatisticsData:{}', param);
 				var adminId = param.adminId;
 				var equipmentId = this.equipmentId;
 				var serverurl = this.serverurl;

+ 0 - 2
pages/Login/Login.vue

@@ -97,8 +97,6 @@
 					success:(loginResult)=> {
 						// 获得微信登录的code:授权码
 						var code = loginResult.code;
-						var appid = "wx3844925af1740a7d";
-						var secret = "c1f0363a78d1c580388d6c4f14674733";
 						var openid = "";
 						uni.request({
 							url: serverUrl+"/TWeixin/getOpenid?code="+code,

+ 4 - 0
pages/Login/loginWeixin.vue

@@ -38,6 +38,10 @@
 					avatarUrl: "",
 					nickName: "",
 					openId: ""
+				},
+				keyEventBind: {
+					backbutton: false, //Boolean(默认truee)关闭back按键监听  
+					menubutton: false //Boolean(默认true)关闭menu按键监听  
 				}
 			};
 		},

+ 2 - 2
pages/User/equipmentSratisticsList.vue

@@ -76,11 +76,11 @@
 				return merchant.name?merchant.name:merchant.username;
 			},
 			getEquipmentListData(){
-				console.log('getEquipmentListData')
+				// console.log('getEquipmentListData')
 				this.getEquipmentListByUser(this.loginUser)
 				.then(data => {
 					this.merchantList = data;
-					console.log('merchantList2',this.merchantList.length)
+					// console.log('merchantList2',this.merchantList.length)
 					uni.stopPullDownRefresh();
 				}
 				, _ => void uni.stopPullDownRefresh());

+ 1 - 0
pages/User/equipmentStatusList.vue

@@ -1,3 +1,4 @@
+<!-- 机器状态页面 -->
 <template>
 	<view v-if="merchantList.length>1">
 		<uni-collapse :accordion="true">

+ 18 - 10
pages/User/user.vue

@@ -67,7 +67,7 @@
 				showOrNo: null,
 				avatarUrl: null,
 				weixinUp: false,
-				weixinDown:true
+				weixinDown: true
 			};
 		},
 		onPullDownRefresh() {
@@ -89,17 +89,20 @@
 				}
 			}
 			var newparm = uni.getStorageSync("newparm");
-			if (newparm.avatarUrl.length>1) {
-				this.avatarUrl = newparm.avatarUrl;
-				this.weixinUp = true;
-				this.weixinDown = false;
+			if (newparm.toString().length>1) {
+				if (newparm.avatarUrl.length > 1) {
+					this.avatarUrl = newparm.avatarUrl;
+					this.weixinUp = true;
+					this.weixinDown = false;
+				}
 			}
+
 		},
 		onLoad() {
 
 		},
 		methods: {
-			trant(){
+			trant() {
 				uni.reLaunch({
 					url: '../WeixinSwicth/WeixinSwicth',
 				});
@@ -189,7 +192,8 @@
 		border-radius: 50%;
 		flex-shrink: 0;
 	}
-	.face3{
+
+	.face3 {
 		/* border-left: 10upx; */
 		width: 120upx;
 		height: 120upx;
@@ -198,6 +202,7 @@
 		border-radius: 50%;
 		flex-shrink: 0;
 	}
+
 	.info-wapper {
 		width: 50%;
 		margin-left: 30upx;
@@ -320,6 +325,7 @@
 		font-size: 32upx;
 		color: #363D44;
 	}
+
 	.xiugai2 {
 		width: 100%;
 		height: 80upx;
@@ -328,9 +334,10 @@
 		margin: auto;
 		font-size: 50upx;
 		color: #363D44;
-		position:fixed;
-		bottom:0;
+		position: fixed;
+		bottom: 0;
 	}
+
 	.xiugai3 {
 		height: 80upx;
 		font-family: "PingFang-SC-Bold";
@@ -338,8 +345,9 @@
 		margin: auto;
 		font-size: 40upx;
 		color: #363D44;
-		
+
 	}
+
 	.body {
 		background-color: #FFFFFF;
 		padding: 10upx 10upx 10upx 10upx;

+ 52 - 8
pages/WeixinSwicth/WeixinSwicth.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view class="page">
 		<view class="xiugai">
 			微信绑定情况
 		</view>
@@ -9,11 +9,16 @@
 			</view>
 
 			<view class="button2">
-				<button type="primary" @click="delet(item.id,item.adminId)" class="button">
+				<button type="primary" @click="delet(item.id,item.nickName)" class="button">
 					<p class="p">解除绑定</p>
 				</button>
 			</view>
 		</view>
+		<view class="xiugai2">
+			<button type="primary" @click="backN()" class="xiugai2">
+				<p class="xiugai3">返回上一页</p>
+			</button>
+		</view>
 	</view>
 </template>
 
@@ -22,14 +27,25 @@
 		data() {
 			return {
 				adminId: '',
+				stated:'1',
 				title: "微信名:",
 				list: []
 			}
 		},
+		onUnload: function() {
+			var stated = uni.getStorageSync("stated");
+			if(stated!=2){
+				wx.switchTab({
+					url: '../User/user'
+				})
+			}
+				
+		},
 		onShow() {
 			var UserInfo = uni.getStorageSync("globalUser");
 			this.adminId = UserInfo.id;
 			var serverurl = this.serverurl;
+			uni.removeStorageSync('stated');
 			uni.request({
 				url: serverurl + "/TWeixin/weiXinSearch",
 				method: "POST",
@@ -44,8 +60,13 @@
 		},
 
 		methods: {
-			delet(id,adminid) {
-				console.log("id==" + id);
+			backN(){
+				uni.reLaunch({
+					url: '../User/user'
+				});
+			},
+			delet(id, nickName) {
+				// console.log("id==" + id);
 				var serverurl = this.serverurl;
 				uni.showModal({
 					title: '提示',
@@ -65,17 +86,17 @@
 											title: '提示',
 											content: '解绑成功',
 											success: function(res) {
-												var UserInfo = uni.getStorageSync("globalUser");
-												if (UserInfo.id == adminid) {
+												var UserInfo = uni.getStorageSync("newparm");
+												uni.setStorageSync("stated",2);
+												if (UserInfo.nickName == nickName) {
 													uni.reLaunch({
 														url: '../Login/Login',
 													});
-												}else{
+												} else {
 													uni.reLaunch({
 														url: '../User/user',
 													});
 												}
-
 											}
 										});
 									}
@@ -97,6 +118,9 @@
 </script>
 
 <style>
+	.page{
+		padding-bottom: 30upx;
+	}
 	.body {
 		background-color: #FFFFFF;
 		padding: 10upx 10upx 10upx 10upx;
@@ -167,4 +191,24 @@
 		font-size: 32upx;
 		color: #363D44;
 	}
+	.xiugai2 {
+		width: 100%;
+		height: 80upx;
+		font-family: "PingFang-SC-Bold";
+		font-weight: bold;
+		margin: auto;
+		font-size: 50upx;
+		color: #363D44;
+		position:fixed;
+		bottom:0;
+	}
+	.xiugai3 {
+		height: 80upx;
+		font-family: "PingFang-SC-Bold";
+		font-weight: bold;
+		margin: auto;
+		font-size: 40upx;
+		color: #363D44;
+		
+	}
 </style>

+ 1 - 1
store/index.js

@@ -32,7 +32,7 @@ const store = new Vuex.Store({
 	actions: {
 		login({ commit }, { username, password }) {
 			commit('setLoading', true);
-			console.log(`login actions: `, arguments);
+			// console.log(`login actions: `, arguments);
 			const encryptPwd = MD5(password);
 			const data = { username, password: encryptPwd };
 			return apis.sz.post('/TAdmin/userLogin', data)

+ 8 - 1
store/modules/chart.js

@@ -4,6 +4,13 @@ import { redirectToLogin, redirectTo } from '@/common/NavFuncs';
 export default {
 	namespaced: true,
 	actions: {
+		getProvince({ commit },param) {
+			return apis.sz.post('/TOrder/getProvince',param)
+				.then(res => {
+					const { data } = res;
+					return data;
+				});
+		},
 		getEquipmentStatistics({ commit },param) {
 			return apis.sz.post('/TOrder/getEquipmentStatistics',param)
 				.then(res => {
@@ -26,7 +33,7 @@ export default {
 				});
 		},
 		getEquipmentListByUser({ commit },param) {
-			console.log('getEquipmentListByUser')
+			// console.log('getEquipmentListByUser')
 			return apis.sz.post('/TEquipment/getEquipmentListByUser',param)
 				.then(res => {
 					const { data } = res;