dever 4 years ago
parent
commit
7912d339c6
2 changed files with 40 additions and 12 deletions
  1. 5 5
      pages/index/index.vue
  2. 35 7
      pages/user/index.vue

+ 5 - 5
pages/index/index.vue

@@ -13,9 +13,9 @@
 					<image :src="fetch.user.avatar" class="icon"></image>
 					<view class="title">{{fetch.user.username}}</view>
 				</view>
-				<view class="item" @tap="jiyi">
-					<image src="/static/images/index/wm.png" class="icon"></image>
-					<view class="title">记忆</view>
+				<view class="item">
+					<text class="title">{{fetch.score.name}}</text>
+					<text class="value">{{fetch.score.score}}</text>
 				</view>
 			</view>
 			<view class="entrance" v-if="fetch.user.id <= 0">
@@ -23,7 +23,7 @@
 					<view class="title">快速登录</view>
 				</view>
 			</view>
-			<view class="info">
+			<view class="info" style="display: none;">
 				<view class="integral_section">
 					<view class="top">
 						<text class="title">{{fetch.score.name}}</text>
@@ -126,7 +126,7 @@
 			},
 			
 			user : function() {
-				
+				this.Dever.location('user/index');
 			},
 			
 			invite : function() {

+ 35 - 7
pages/user/index.vue

@@ -3,8 +3,8 @@
 	
 		<view class="content">
 			<!-- 头部logo -->
-			<view class="header">
-				<image :src="fetch.avatar" @click="avatarSet(0)"></image>
+			<view class="header" style="border-radius:0%;">
+				<image :src="fetch.avatar" @click="avatarSet(0)"  style="border-radius:0%;"></image>
 				<avatar @upload="avatarUpload" ref="avatar"></avatar>
 			</view>
 			<!-- 主体 -->
@@ -39,9 +39,9 @@
 			
 			<!-- 底部信息 -->
 			<view class="footer">
-				<navigator url="forget" open-type="navigate" @click="shiming">关系伙伴</navigator>
+				<navigator url="forget" open-type="navigate" @click="index">返回首页</navigator>
 				<text>|</text>
-				<navigator url="register" open-type="navigate" @click="tixian">快速提现</navigator>
+				<navigator url="register" open-type="navigate" @click="tixian">余额提现</navigator>
 			</view>
 		</view>
 	</view>
@@ -81,10 +81,38 @@
 				this.Dever.get(this, 'app/user/?l=api.getBaseUser');
 			},
 			bind_weixin : function() {
-				this.Dever.alert('暂未开通');
+				var self = this;
+				this.Dever.confirm('即将开始微信授权,授权后您的微信信息将覆盖现有个人信息,但不会影响您已设置好的某个合小记中的个人信息。', function() {
+					if (self.Dever.source == 'h5') {
+						var host = self.Dever.api_host + 'package/oauth/?l=request.auth&account=1&system=1&system_source=' + self.Dever.source_id;
+						self.Dever.location(host);
+					} else if (self.Dever.source == 'wx_applet') {
+						uni.authorize({
+						    scope: 'scope.userInfo',
+						    success() {
+						        uni.login({
+						          provider: 'weixin',
+						          success: function (loginRes) {
+						            console.log(loginRes.authResult);
+						            // 获取用户信息
+						            uni.getUserInfo({
+						              provider: 'weixin',
+									  lang : 'zh_CN',
+						              success: function (infoRes) {
+						                console.log('用户昵称为:' + infoRes.userInfo.nickName);
+						              }
+						            });
+						          }
+						        });
+						    }
+						})
+					} else {
+						self.Dever.alert('暂时不支持app登录');
+					}
+				});
 			},
-			shiming : function() {
-				this.Dever.alert('敬请期待');
+			index : function() {
+				this.Dever.location('index/index');
 			},
 			tixian : function() {
 				this.Dever.alert('敬请期待');