wzh 2 rokov pred
rodič
commit
129f082236

+ 2 - 1
locale/en.json

@@ -170,7 +170,8 @@
     "忘记密码?": "Forget password?",
     "请输入邮箱": "Please enter your email.",
     "请查看邮箱进行操作": "Please check your email for instructions on what to do next.",
-    "邮箱不能为空": "The email can not be empty."
+    "邮箱不能为空": "The email can not be empty.",
+    "功能开发中..": "Under development... "
 
   },
   "locale.auto": "System",

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "WeGoodCharger",
+    "name" : "Techtron",
     "appid" : "__UNI__60E8019",
     "description" : "",
     "versionName" : "1.1.6",

+ 1 - 17
pages.json

@@ -191,23 +191,7 @@
     "borderStyle": "white",
     "backgroundColor": "#000000",
 	"iconWidth": "50px",
-    "list": [{
-      "pagePath": "pages/index",
-      "iconPath": "static/images/new/starts/tabbar/one_off.png",
-      "selectedIconPath": "static/images/new/starts/tabbar/one_on.png",
-      "text": "%index%"
-    }, 
-	{
-		"pagePath": "pages/weitiandi/deviceList",
-		"iconPath": "static/images/new/starts/tabbar/two_off.png",
-		"selectedIconPath": "static/images/new/starts/tabbar/two_on.png"
-	},
-	{
-      "pagePath": "pages/mine/index",
-      "iconPath": "static/images/new/starts/tabbar/three_off.png",
-      "selectedIconPath": "static/images/new/starts/tabbar/three_on.png",
-      "text": "%mine%"
-    }
+    "list": [
     ]
   },
   "globalStyle": {

+ 32 - 1
pages/index.vue

@@ -21,7 +21,7 @@
 						<view style="font-size: 20rpx;">Charge up quickly & easily to enjoy a smarter life!</view>
 					</view>
 		<view
-			style="margin:0 5vw;left:0px;right:0px;text-align: center;top:55vh;position: absolute;display: flex;flex-direction: rows;justify-content: space-evenly;">
+			style="margin:0 5vw;left:0px;right:0px;text-align: center;top:45vh;position: absolute;display: flex;flex-direction: rows;justify-content: space-evenly;">
 			<!-- <view style="color:white;width:80px;">
    					设备编号
    				</view> -->
@@ -43,7 +43,23 @@
    							style="background: #505086;color:white;border-radius: 100vh;width: 120px;margin-right: -10px;">绑 定</u-button>
    					</u--input> -->
 			</view>
+      <view style="position:fixed;bottom:10px;display: flex;align-items: center;justify-content: center;">
+        <view @click="skip(0)" style="margin:0px 10px;">
+          <image src="@/static/images/new/starts/tabbar/one_on.png"
+                 style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+        </view>
+        <view @click="skip(1)" style="margin:0px 10px;">
+          <image src="@/static/images/new/starts/tabbar/two_off.png"
+                 style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+        </view>
+        <view @click="skip(2)" style="margin:0px 10px;">
+          <image src="@/static/images/new/starts/tabbar/three_off.png"
+                 style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+        </view>
+      </view>
+
 		</view>
+
 		<!-- <view class="container">
       <view class="item" @click="buleTeeth">
         <image :src = "imgUrl+'/index/bluetooth.png'"/>
@@ -94,6 +110,21 @@
 			})
 		},
 		methods: {
+      skip(type){
+        if(type==0){
+          uni.navigateTo({
+            url:'/pages/index'
+          })
+        }else if(type==1){
+          uni.navigateTo({
+            url:'/pages/weitiandi/deviceList'
+          })
+        }else if(type==2){
+          uni.navigateTo({
+            url:'/pages/mine/index'
+          })
+        }
+      },
 			devicelist() {
 				uni.navigateTo({
 					url: '/pages/weitiandi/deviceList'

+ 34 - 12
pages/mine/index.vue

@@ -9,9 +9,9 @@
 				src="../../static/images/new/starts/login/backImg2.png"></image>
 			<text @click="clickRight()" style="color: #ffffff;font-size: 15px;margin: 0 0 0 31vh;font-weight: bold;">· · ·</text>
 			<view>
-				<uni-drawer @change="changeDrawer" width="250" style="top:20vh;height: 24vh" ref="showRight" mode="right"
+				<uni-drawer @change="changeDrawer" width="300" style="top:20vh;height: 100vh" ref="showRight" mode="right"
 					:mask-click="true">
-					<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;" scroll-y="true">
+					<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;height: 100%" scroll-y="true">
 						<view class="prop-item" @click="handleLogout()">
 							<!-- <view class="prop-item-image">
 														<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
@@ -50,9 +50,6 @@
 		<view style="margin-top: 5vh;justify-content: center;align-items: center;justify-content: center;display: grid;align-content: center;justify-items: center;line-height: 30px;">
 			<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
 			</image>
-			<view style="font-size: 20px;font-weight: bold;color: #d0d0d0;">
-			  {{ name }}
-			</view>
 			<view >
 			 <image style="width: 40rpx;height: 40rpx;" src="../../static/images/new/starts/mine/start_light.png"></image>
 			 <image style="width: 40rpx;height: 40rpx;" src="../../static/images/new/starts/mine/start_light.png"></image>
@@ -85,6 +82,20 @@
 		    </view>
 		  </view>
 		  </view>
+    <view style="position:fixed;bottom:10px;display: flex;align-items: center;justify-content: center;text-align: center;left:0px;right:0px;">
+      <view @click="skipPage(0)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/one_off.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+      <view @click="skipPage(1)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/two_off.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+      <view @click="skipPage(2)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/three_on.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+    </view>
 		<!--顶部个人信息栏-->
 		<!-- <view class="header-section">
       <view class="flex padding justify-between">
@@ -188,6 +199,24 @@
 			})
 		},
 		methods: {
+      skipPage(type){
+        if(type==0){
+          uni.navigateTo({
+            url:'/pages/index'
+          })
+        }else if(type==1){
+          uni.navigateTo({
+            url:'/pages/weitiandi/deviceList'
+          })
+        }else if(type==2){
+          uni.navigateTo({
+            url:'/pages/mine/index'
+          })
+        }
+      },
+      skip(){
+        this.$modal.showToast("功能开发中..");
+      },
 			handleLogout() {
 			  this.$modal.confirm('确定注销并退出系统吗?').then(() => {
 			    this.$store.dispatch('LogOut').then(() => {
@@ -271,13 +300,6 @@
 			handleToLogin() {
 				this.$tab.reLaunch('/pages/login')
 			},
-			handleLogout() {
-				this.$modal.confirm('确定注销并退出系统吗?').then(() => {
-					this.$store.dispatch('LogOut').then(() => {
-						this.$tab.reLaunch('/pages/index')
-					})
-				})
-			},
 			handleAbout() {
 				this.$tab.navigateTo('/pages/weitiandi/device/chargerecord')
 			},

+ 27 - 20
pages/weitiandi/bluetooth/status.vue

@@ -154,9 +154,9 @@
 			<text @click.stop="clickRight()"
 				style="color: #ffffff;font-size: 15px;margin: 0 0 0 31vh;font-weight: bold;">· · ·</text>
 			<view>
-				<uni-drawer @change="changeDrawer"  style="top:20vh;height: 23vh" ref="showRight" mode="right"
+				<uni-drawer @change="changeDrawer" :width="300" style="top:20vh;height: 23vh;height: 100vh" ref="showRight" mode="right"
 					:mask-click="true">
-	  			<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;" scroll-y="true">
+	  			<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;height: 100%" scroll-y="true">
 	  				<view class="prop-item" @click="handleLogout()">
 	  					<!-- <view class="prop-item-image">
 	  											<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
@@ -191,8 +191,8 @@
 	  		</uni-drawer>
 	  	</view>
 	  </view>
-	  <view style=";position: relative;top: 10vh;margin-top:2vh;">
-	  	<view class="progress_box">
+    <view style=";position: relative;top: 10vh;margin-top:4vh;text-align: center;padding:0 30%;">
+      <view class="progress_box" style="text-align: center">
 	  		<canvas class="progress_bg" canvas-id="cpbg"></canvas>
 	  		<canvas class="progress_bar" canvas-id="cpbar"></canvas>
 	  		<canvas class="progress_line" canvas-id="cpline"></canvas>
@@ -248,9 +248,9 @@
 		
 		<view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 3vh;">
 			<view
-				style="justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 40vh;}">
-				<view span="3" style="width: 12vh;">
-					<view style="margin-left: 1vh;">
+          style="position:relative;justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 100%;height: 30px;}">
+        <view  style="width: 5vh;left:10%;position: absolute">
+					<view style="margin-left: 1vh;;width: 100px">
 						<view><span v-if="portDetail.portStatus == 6">{{i18('剩余时间')}}</span>
 							<span  v-else>{{$t('charge.chargetime')}}</span></view>
 						<view class="demo-layout bg-purple"
@@ -260,16 +260,16 @@
 						</view>
 					</view>
 				</view>
-				<view span="3" style="width: 16vh;">
+        <view span="2" style="width: 100px;left:36%;position: absolute">
 					<view v-if="portDetail.portStatus == 2"
 						style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
-						<u-button @click="trigger()" shape="circle"
-							style="background: #ec3e41;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('停止充电') }}</u-button>
+						<u-button @click="toPage()" shape="circle"
+							style="background: #ec3e41;color:white;width: 100vm;border: 0ch;height: 6vh;">Charge</u-button>
 					</view>
 					<view v-if="portDetail.portStatus != 2"
 						style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
-						<u-button @click="trigger()" shape="circle"
-							style="background: #57B03D;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('立即充电') }}</u-button>
+						<u-button @click="toPage()" shape="circle"
+							style="background: #57B03D;color:white;width: 100vm;border: 0ch;height: 6vh;">Charge</u-button>
 					</view>
 					<!-- <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
 										  <image class="btn-image" src="/static/images/new/start/stop.png" >
@@ -283,7 +283,7 @@
 										  <view>{{ i18('立即充电') }}</view>
 										</view> -->
 				</view>
-				<view span="3" style="width: 12vh;">
+        <view span="3" style="width: 80px;left:65%;position: absolute">
 					<view style="margin-left: 1vh;">
 						<view> Ampere</view>
 						<view class="demo-layout bg-purple"
@@ -591,18 +591,20 @@ export default {
 	  },
 	  skip(type){
 	  	if(type==0){
-	  		uni.switchTab({
+	  		uni.navigateTo({
 	  			url:'/pages/index'
 	  		})
 	  	}else if(type==1){
-	  		uni.switchTab({
+	  		uni.navigateTo({
 	  			url:'/pages/weitiandi/deviceList'
 	  		})
 	  		}else if(type==2){
-	  			uni.switchTab({
+	  			uni.navigateTo({
 	  				url:'/pages/mine/index'
 	  			})
-	  			}
+	  			}else{
+        this.$modal.showToast("功能开发中..");
+      }
 	  },
 	  handleLogout() {
 	  	this.$modal.confirm('确定注销并退出系统吗?').then(() => {
@@ -656,6 +658,13 @@ export default {
         url: '/pages/weitiandi/bluetooth/index'
       });
     },
+    toSetting(){
+      let imei = this.deviceInfo.deviceId;
+      let ccid = this.deviceInfo.ccid;
+      uni.navigateTo({
+        url: '/pages/weitiandi/bluetooth/setting'
+      });
+    },
     cancel(){
       this.showPwd = false;
     },
@@ -1234,8 +1243,6 @@ export default {
 		/* position: relative; */
 		width: 35vh;
 		height: 35vh;
-		margin-left: 13vh;
-		margin-top: 10vh;
 		/* background-color: red; */
 		display: inline-block;
 		align-items: center;
@@ -1259,7 +1266,7 @@ export default {
 		position: absolute;
 		font-size: 28upx;
 		margin-top: 54px;
-		margin-left: 74px;
+		margin-left: 86px;
 		color: #999999;
 	}
 

+ 35 - 27
pages/weitiandi/device/status.vue

@@ -6,9 +6,9 @@
 			<text @click.stop="clickRight()"
 				style="color: #ffffff;font-size: 15px;margin: 0 0 0 31vh;font-weight: bold;">· · ·</text>
 			<view>
-				<uni-drawer @change="changeDrawer" width="300"  style="top:20vh;height: 23vh" ref="showRight" mode="right"
+				<uni-drawer @change="changeDrawer" width=300 style="top:20vh;height: 100vh" ref="showRight" mode="right"
 					:mask-click="true">
-					<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;" scroll-y="true">
+					<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;height: 100%;" scroll-y="true">
 						<view class="prop-item" @click="handleLogout()">
 							<!-- <view class="prop-item-image">
 	  												<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
@@ -19,7 +19,7 @@
 							</view>
 						</view>
 						<u-divider />
-						<view class="prop-item" @click="skip(3)">
+						<view class="prop-item" @click="skipPage(3)">
 							<!-- <view class="prop-item-image">
 	  												<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
 	  											</view> -->
@@ -29,7 +29,7 @@
 							</view>
 						</view>
 						<u-divider />
-						<view class="prop-item" @click="skip(4)">
+						<view class="prop-item" @click="skipPage(4)">
 							<!-- <view class="prop-item-image">
 	  												<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
 	  											</view> -->
@@ -43,8 +43,8 @@
 				</uni-drawer>
 			</view>
 		</view>
-		<view style=";position: relative;top: 10vh;margin-top:2vh;">
-			<view class="progress_box">
+		<view style=";position: relative;top: 10vh;margin-top:4vh;text-align: center;padding:0 32%;">
+			<view class="progress_box" style="text-align: center">
 				<canvas class="progress_bg" canvas-id="cpbg"></canvas>
 				<canvas class="progress_bar" canvas-id="cpbar"></canvas>
 				<canvas class="progress_line" canvas-id="cpline"></canvas>
@@ -143,9 +143,9 @@
 
 		<view style="display: flex;align-items: center;flex-direction: column;color: aliceblue;margin-top: 3vh;">
 			<view
-				style="justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 40vh;}">
-				<view span="3" style="width: 12vh;">
-					<view style="margin-left: 1vh;">
+				style="position:relative;justify-content: center;display: flex;justify-items: center;flex-direction: row;text-align: center;width: 100%;height: 30px;}">
+				<view  style="width: 5vh;left:10%;position: absolute">
+					<view style="margin-left: 1vh;width: 100px">
 						<view><span v-if="portDetail.portStatus == 6">{{i18('剩余时间')}}</span>
 							<span  v-else>{{$t('charge.chargetime')}}</span></view>
 						<view class="demo-layout bg-purple"
@@ -155,16 +155,16 @@
 						</view>
 					</view>
 				</view>
-				<view span="3" style="width: 16vh;">
+				<view span="2" style="width: 100px;left:36%;position: absolute">
 					<view v-if="portDetail.portStatus == 2"
 						style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
-						<u-button @click="trigger()" shape="circle"
-							style="background: #ec3e41;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('停止充电') }}</u-button>
+						<u-button @click="toPage()" shape="circle"
+							style="background: #ec3e41;color:white;width: 100vm;border: 0ch;height: 6vh;">Charge</u-button>
 					</view>
 					<view v-if="portDetail.portStatus != 2"
 						style="text-align: center;position: absolute;margin:-1vh 5vw;border: 0ch;height: 20vh;">
-						<u-button @click="trigger()" shape="circle"
-							style="background: #57B03D;color:white;width: 100vm;border: 0ch;height: 6vh;">{{ i18('立即充电') }}</u-button>
+						<u-button @click="toPage()" shape="circle"
+							style="background: #57B03D;color:white;width: 80px;border: 0ch;height: 6vh;">Charge</u-button>
 					</view>
 					<!-- <view class="control-btn" @click="trigger()" v-if="portDetail.portStatus == 2">
 										  <image class="btn-image" src="/static/images/new/start/stop.png" >
@@ -178,7 +178,7 @@
 										  <view>{{ i18('立即充电') }}</view>
 										</view> -->
 				</view>
-				<view span="3" style="width: 12vh;">
+				<view span="3" style="width: 80px;left:65%;position: absolute">
 					<view style="margin-left: 1vh;">
 						<view> Ampere</view>
 						<view class="demo-layout bg-purple"
@@ -191,8 +191,8 @@
 			</view>
 		</view>
 
-		<view style="display: flex;align-items: center;justify-content: center;margin-top: 5vh;">
-			<view @click="toPage">
+		<view style="display: flex;align-items: center;justify-content: center;margin-top: 0vh;">
+			<view @click="toSetting">
 				<image src="../../../static/images/new/starts/status/Setting.png"
 					style="width: 60px;height: 60px;margin: 2vh 2vh;"></image>
 			</view>
@@ -215,15 +215,15 @@
 		</view>
 
 		<view style="display: flex;align-items: center;justify-content: center;">
-			<view @click="skip(0)">
+			<view @click="skipPage(0)">
 				<image src="../../../static/images/new/starts/tabbar/one_off.png"
 					style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
 			</view>
-			<view @click="skip(1)">
+			<view @click="skipPage(1)">
 				<image src="../../../static/images/new/starts/tabbar/two_off.png"
 					style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
 			</view>
-			<view @click="skip(2)">
+			<view @click="skipPage(2)">
 				<image src="../../../static/images/new/starts/tabbar/three_off.png"
 					style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
 			</view>
@@ -390,20 +390,22 @@
 			    },5000)
 			  })
 			},
-			skip(type){
+			skipPage(type){
 				if(type==0){
-					uni.switchTab({
+					uni.navigateTo({
 						url:'/pages/index'
 					})
 				}else if(type==1){
-					uni.switchTab({
+					uni.navigateTo({
 						url:'/pages/weitiandi/deviceList'
 					})
 					}else if(type==2){
-						uni.switchTab({
+						uni.navigateTo({
 							url:'/pages/mine/index'
 						})
-						}
+						}else{
+          this.$modal.showToast("功能开发中..");
+        }
 			},
 			handleLogout() {
 				this.$modal.confirm('确定注销并退出系统吗?').then(() => {
@@ -547,6 +549,14 @@
 					url: '/pages/weitiandi/device/index?id=' + imei + '&ccid=' + ccid
 				});
 			},
+      toSetting(){
+        let imei = this.deviceInfo.deviceId;
+        let ccid = this.deviceInfo.ccid;
+        this.closeSocket();
+        uni.navigateTo({
+          url: '/pages/weitiandi/device/setting?id=' + imei + '&ccid=' + ccid
+        });
+      },
 			i18(text) {
 				return i18(text)
 			},
@@ -930,8 +940,6 @@
 		/* position: relative; */
 		width: 35vh;
 		height: 35vh;
-		margin-left: 13vh;
-		margin-top: 10vh;
 		/* background-color: red; */
 		display: inline-block;
 		align-items: center;

+ 36 - 3
pages/weitiandi/deviceList.vue

@@ -5,9 +5,9 @@
 	  		src="../../static/images/new/starts/login/backImg2.png"></image>
 	  	<text @click="clickRight()" style="color: #ffffff;font-size: 15px;margin: 0 0 0 31vh;font-weight: bold;">· · ·</text>
 	  	<view>
-	  		<uni-drawer @change="changeDrawer"  style="top:20vh;height: 23vh" ref="showRight" mode="right"
+	  		<uni-drawer @change="changeDrawer"  width="300" style="top:20vh;height: 100vh" ref="showRight" mode="right"
 	  			:mask-click="true">
-	  			<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;" scroll-y="true">
+	  			<scroll-view  style="background: linear-gradient(#000000, #5a5a58);font-size: 20px;height: 100%" scroll-y="true">
 	  				<view class="prop-item" @click="handleLogout()">
 	  					<!-- <view class="prop-item-image">
 	  												<image :src="imgUrl+'/logout.png'" style="width: 30%;height:100%;" />
@@ -70,6 +70,20 @@
         </view>
       </view>
     </view>
+    <view style="position:fixed;bottom:10px;display: flex;align-items: center;justify-content: center;text-align: center;left:0px;right:0px;">
+      <view @click="skipPage(0)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/one_off.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+      <view @click="skipPage(1)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/two_on.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+      <view @click="skipPage(2)" style="margin:0px 10px;">
+        <image src="@/static/images/new/starts/tabbar/three_off.png"
+               style="width: 60px;height: 60px;margin: 2vh 0.2vh;"></image>
+      </view>
+    </view>
   </view>
 </template>
 
@@ -98,8 +112,27 @@ export default {
     uni.setNavigationBarTitle({
       title: this.$t('page.deviceList')
     })
+    this.deviceList();
   },
   methods: {
+    skipPage(type){
+      if(type==0){
+        uni.navigateTo({
+          url:'/pages/index'
+        })
+      }else if(type==1){
+        uni.navigateTo({
+          url:'/pages/weitiandi/deviceList'
+        })
+      }else if(type==2){
+        uni.navigateTo({
+          url:'/pages/mine/index'
+        })
+      }
+    },
+    skip(){
+      this.$modal.showToast("功能开发中..");
+    },
 	  changeDrawer(event) {
 	  	if (event) {
 	  		// 抽屉打开时的逻辑
@@ -164,7 +197,7 @@ export default {
     },
   },
   created() {
-    this.deviceList();
+
   },
 };
 </script>

BIN
static/images/icon.png