liuf 1 年之前
父节点
当前提交
d19ef619c9
共有 4 个文件被更改,包括 203 次插入165 次删除
  1. 158 160
      manifest.json
  2. 6 0
      pages.json
  3. 25 0
      pages/auth/auth.vue
  4. 14 5
      pages/index/index.vue

+ 158 - 160
manifest.json

@@ -1,161 +1,159 @@
 {
-	"name": "WeGoodCharger",
-	"appid": "__UNI__60E8019",
-	"description": "",
-	"versionName": "1.0.9",
-	"versionCode": 109,
-	"transformPx": false,
-	"app-plus": {
-		"usingComponents": true,
-		"nvueCompiler": "uni-app",
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		"compatible":{
-			  "ignoreVersion" : true
-		},
-		"modules": {
-			"Bluetooth": {},
-			"Barcode": {},
-			"Geolocation": {},
-			"Camera": {},
-			"Payment": {}
-		},
-		"distribute": {
-			"android": {
-				"schemes": {
-
-				},
-				"permissions": [
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
-					"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			"ios": {
-				"dSYMs": false,
-				"idfa": false,
-				"privacyDescription": {
-					"NSLocationWhenInUseUsageDescription": "To connect the charging cable",
-					"NSLocationAlwaysUsageDescription": "To connect the charging cable",
-					"NSLocationAlwaysAndWhenInUseUsageDescription": "To connect the charging cable",
-					"NSBluetoothPeripheralUsageDescription": "To connect the charging cable",
-					"NSBluetoothAlwaysUsageDescription": "To connect the charging cable",
-					"NSPhotoLibraryUsageDescription": "To link the charging gun to your account",
-					"NSPhotoLibraryAddUsageDescription": "To link the charging gun to your account",
-					"NSCameraUsageDescription": "To link the charging gun to your account"
-				}
-			},
-			"sdkConfigs": {
-				"ad": {},
-				"geolocation": {
-					"system": {
-						"__platform__": ["ios", "android"]
-					}
-				},
-				"payment": {
-					"alipay": {
-						"__platform__": ["ios", "android"]
-					}
-				}
-			},
-			"icons": {
-				"android": {
-					"hdpi": "unpackage/res/icons/72x72.png",
-					"xhdpi": "unpackage/res/icons/96x96.png",
-					"xxhdpi": "unpackage/res/icons/144x144.png",
-					"xxxhdpi": "unpackage/res/icons/192x192.png"
-				},
-				"ios": {
-					"appstore": "unpackage/res/icons/1024x1024.png",
-					"ipad": {
-						"app": "unpackage/res/icons/76x76.png",
-						"app@2x": "unpackage/res/icons/152x152.png",
-						"notification": "unpackage/res/icons/20x20.png",
-						"notification@2x": "unpackage/res/icons/40x40.png",
-						"proapp@2x": "unpackage/res/icons/167x167.png",
-						"settings": "unpackage/res/icons/29x29.png",
-						"settings@2x": "unpackage/res/icons/58x58.png",
-						"spotlight": "unpackage/res/icons/40x40.png",
-						"spotlight@2x": "unpackage/res/icons/80x80.png"
-					},
-					"iphone": {
-						"app@2x": "unpackage/res/icons/120x120.png",
-						"app@3x": "unpackage/res/icons/180x180.png",
-						"notification@2x": "unpackage/res/icons/40x40.png",
-						"notification@3x": "unpackage/res/icons/60x60.png",
-						"settings@2x": "unpackage/res/icons/58x58.png",
-						"settings@3x": "unpackage/res/icons/87x87.png",
-						"spotlight@2x": "unpackage/res/icons/80x80.png",
-						"spotlight@3x": "unpackage/res/icons/120x120.png"
-					}
-				}
-			}
-		}
-	},
-	"quickapp": {},
-	"mp-weixin": {
-		"appid": "wx22f05b8b2eb23678",
-		"setting": {
-			"urlCheck": false,
-			"es6": false,
-			"minified": true,
-			"postcss": true
-		},
-		"optimization": {
-			"subPackages": true
-		},
-		"usingComponents": true
-	},
-	"vueVersion": "2",
-	"h5": {
-		"template": "static/index.html",
-		"devServer": {
-			"port": 443,
-			"https": false
-		},
-		"title": "charger",
-		"router": {
-			"mode": "hash",
-			"base": "./"
-		},
-		"sdkConfigs": {
-			"maps": {}
-		}
-	},
-	"locale": "zh-Hans",
-	"fallbackLocale": "zh-Hans",
-	"mp-alipay": {
-		"appid": "2021004132627013",
-		"usingComponents": true,
-		"plugins": {
-			"xlightPlugin": {
-				"version": "*",
-				"provider": "2021003196619202"
-			},
-			"couponPlugin": {
-				"version": "*",
-				"provider": "2021002172680015"
-			}
-		}
-	}
-}
+    "name" : "WeGoodCharger",
+    "appid" : "__UNI__60E8019",
+    "description" : "",
+    "versionName" : "1.0.9",
+    "versionCode" : 109,
+    "transformPx" : false,
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "compatible" : {
+            "ignoreVersion" : true
+        },
+        "modules" : {
+            "Bluetooth" : {},
+            "Barcode" : {},
+            "Geolocation" : {},
+            "Camera" : {},
+            "Payment" : {}
+        },
+        "distribute" : {
+            "android" : {
+                "schemes" : {},
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            "ios" : {
+                "dSYMs" : false,
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSLocationWhenInUseUsageDescription" : "To connect the charging cable",
+                    "NSLocationAlwaysUsageDescription" : "To connect the charging cable",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "To connect the charging cable",
+                    "NSBluetoothPeripheralUsageDescription" : "To connect the charging cable",
+                    "NSBluetoothAlwaysUsageDescription" : "To connect the charging cable",
+                    "NSPhotoLibraryUsageDescription" : "To link the charging gun to your account",
+                    "NSPhotoLibraryAddUsageDescription" : "To link the charging gun to your account",
+                    "NSCameraUsageDescription" : "To link the charging gun to your account"
+                }
+            },
+            "sdkConfigs" : {
+                "ad" : {},
+                "geolocation" : {
+                    "system" : {
+                        "__platform__" : [ "ios", "android" ]
+                    }
+                },
+                "payment" : {
+                    "alipay" : {
+                        "__platform__" : [ "ios", "android" ]
+                    }
+                }
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
+        }
+    },
+    "quickapp" : {},
+    "mp-weixin" : {
+        "appid" : "wx22f05b8b2eb23678",
+        "setting" : {
+            "urlCheck" : false,
+            "es6" : false,
+            "minified" : true,
+            "postcss" : true
+        },
+        "optimization" : {
+            "subPackages" : true
+        },
+        "usingComponents" : true
+    },
+    "vueVersion" : "2",
+    "h5" : {
+        "template" : "static/index.html",
+        "devServer" : {
+            "port" : 443,
+            "https" : false
+        },
+        "title" : "charger",
+        "router" : {
+            "mode" : "hash",
+            "base" : "./"
+        },
+        "sdkConfigs" : {
+            "maps" : {}
+        }
+    },
+    "locale" : "zh-Hans",
+    "fallbackLocale" : "zh-Hans",
+    "mp-alipay" : {
+        "appid" : "2021004132627013",
+        "usingComponents" : true,
+        "plugins" : {
+            "xlightPlugin" : {
+                "version" : "*",
+                "provider" : "2021003196619202"
+            },
+            "couponPlugin" : {
+                "version" : "*",
+                "provider" : "2021002172680015"
+            }
+        }
+    }
+}

+ 6 - 0
pages.json

@@ -13,6 +13,12 @@
 				"navigationBarTitleText": "反馈问题"
 			}
 		},
+		{
+			"path": "pages/auth/auth",
+			"style": {
+				"navigationBarTitleText": "个人中心"
+			}
+		},
 		{
 			"path": "pages/myfeedback/myfeedback",
 			"style": {

+ 25 - 0
pages/auth/auth.vue

@@ -0,0 +1,25 @@
+<template>
+	<view class="page">
+		<web-view :src="src"></web-view>
+	</view>
+</template>
+
+<script>
+import config from '../../config'
+	export default {
+		data() {
+			return {
+				src:''
+			}
+		},
+		onLoad(option) {
+			//http://wetiandi.com/app/index.php?i=1&j=1&c=auth&a=usercenter&do=mycenter&oid=1&wxref=mp.weixin.qq.com#wechat_redirect
+			this.src=config.baseUrl+ "app/index.php?i=1&j=1&c=auth&a=usercenter&do=mycenter&oid=1"
+			console.log('target',this.src);
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 14 - 5
pages/index/index.vue

@@ -466,7 +466,7 @@
 		},
 		onReady() {
 			if (this.device_sn == '') {
-				console.log("");
+			
 				this.mycenter();
 				//this.$refs.popupclose.open("center")
 			}
@@ -523,7 +523,7 @@
 			_this.device_sn = uni.getStorageSync("device_sn")
 			_this.title = uni.getStorageSync("title")
 			_this.sessionId = 'we7sid-' + uni.getStorageSync("sessionId")
-			// _this.device_sn = 'GD1B406633'
+			 // _this.device_sn = 'GD1B406633'
 			// _this.sessionId = 'we7sid-' + '9908b0533fb8af82dba4cd59daa93870';
 			uni.setNavigationBarTitle({
 				title: _this.title
@@ -782,6 +782,7 @@
 			},
 			payOrder(recharge, award) {
 				if (this.sessionId == 'we7sid-' || this.sessionId == '') {
+					
 					this.$refs.popupclose.open("center")
 					return;
 				}
@@ -915,8 +916,10 @@
 				this.$refs.popup.close()
 			},
 			port_refresh() {
+				
 				if (this.sessionId == 'we7sid-' || this.sessionId == '') {
-					this.$refs.popupclose.open("center")
+					this.mycenter();
+					// this.$refs.popupclose.open("center")
 					return;
 				}
 				//刷新
@@ -968,7 +971,8 @@
 			},
 			port_status_req() {
 				if (this.sessionId == 'we7sid-' || this.sessionId == '') {
-					this.$refs.popupclose.open("center")
+					this.mycenter();
+					//this.$refs.popupclose.open("center")
 					return;
 				}
 				const url = config.baseUrl + "api/devstate.php?do=dev_state_req_id&dev_id=" + this.dev.id + '&state=' +
@@ -1179,7 +1183,12 @@
 			},
 			mycenter() {
 				if (this.sessionId == 'we7sid-' || this.sessionId == '') {
-					this.$refs.popupclose.open("center")
+					console.log("not login 进入登录页面");
+					//this.mycenter();
+					// this.$refs.popupclose.open("center")
+					uni.redirectTo({
+						url: '/pages/auth/auth'
+					})
 					return;
 				}
 				let oid = 1