Explorar o código

Merge branch 'master' of http://git.cc-lotus.info/pointToNetwork/point-app

guhongwei %!s(int64=2) %!d(string=hai) anos
pai
achega
c6132aacc5

+ 1 - 1
components/upload/index.vue

@@ -41,7 +41,7 @@
 					sourceType: ['album', 'camera'],
 					success: async function(res) {
 						let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
-						const arr = await that.$apifile(`/live/upload`, 'file', tempFile[0], 'file');
+						const arr = await that.$apifile(`/point/upload`, 'file', tempFile[0], 'file');
 						that.$emit('uplSuc', {
 							data: {
 								name: arr.name,

+ 3 - 2
pagesMy/account/index.vue

@@ -29,7 +29,7 @@
 				</view>
 			</view>
 			<view class="two">
-				<button type="default" @click="toOut()">退出当前登录</button>
+				<button type="default" size="mini" @click="toOut()">退出当前登录</button>
 			</view>
 		</view>
 	</mobile-frame>
@@ -116,7 +116,8 @@
 		}
 
 		.two {
-			margin: 1vw 3vw;
+			margin: 5vw 3vw;
+			text-align: center;
 
 			button {
 				border-radius: 20px;

+ 22 - 9
pagesMy/account/upBasic.vue

@@ -3,8 +3,8 @@
 		<view class="info">
 			<view class="one">
 				<uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
-					<uni-forms-item label="头像" name="logo">
-						<upload :list="logo" name="logo" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
+					<uni-forms-item label="头像" name="icon">
+						<upload :list="icon" name="icon" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
 					</uni-forms-item>
 					<uni-forms-item label="真实姓名" name="name">
 						<uni-easyinput type="text" v-model="form.name" placeholder="请输入真实姓名" />
@@ -21,9 +21,6 @@
 							<view class="uni-input">{{form.date||'请选择日期'}}</view>
 						</picker>
 					</uni-forms-item>
-					<uni-forms-item label="QQ号" name="QQ">
-						<uni-easyinput type="text" v-model="form.qq" placeholder="请输入QQ号" />
-					</uni-forms-item>
 					<uni-forms-item label="昵称" name="Nname">
 						<uni-easyinput type="text" v-model="form.Nname" placeholder="请输入昵称" />
 					</uni-forms-item>
@@ -77,14 +74,32 @@
 						value: '2'
 					},
 				],
-				logo: []
+				icon: []
 			};
 		},
 		onLoad: function(e) {
-
+			const that = this;
+			that.watchLogin();
 		},
 		onShow: function() {},
 		methods: {
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: (res) => {
+						let user = that.$jwt(res.data);
+						if (user) {
+							console.log(user);
+							// that.$set(that, `form`, {
+							// 	id: user.id,
+							// 	phone: user.phone
+							// })
+						}
+					},
+					fail: (err) => {}
+				})
+			},
 			toPath(e) {
 				if (e && e.route) uni.redirectTo({
 					url: `/${e.route}`
@@ -93,13 +108,11 @@
 			// 图片上传
 			uplSuc(e) {
 				const that = this;
-				console.log(e);
 				that.$set(that, `${e.name}`, [...that[e.name], e.data]);
 			},
 			// 图片删除
 			uplDel(e) {
 				const that = this;
-				console.log(e);
 				let data = that[e.name];
 				let arr = data.filter((i, index) => index != e.data.index);
 				that.$set(that, `${e.name}`, arr)

+ 0 - 1
pagesMy/account/upPassword.vue

@@ -59,7 +59,6 @@
 								phone: user.phone
 							})
 						}
-
 					},
 					fail: (err) => {}
 				})