Procházet zdrojové kódy

refactor:我的页面调整

zhanghui před 2 roky
rodič
revize
32c86cbdab
5 změnil soubory, kde provedl 55 přidání a 28 odebrání
  1. 1 1
      pages.json
  2. 18 4
      pages/my/index.rpx.css
  3. 32 19
      pages/my/index.vue
  4. 4 4
      pages/qrCode/index.vue
  5. binární
      static/me/u5.png

+ 1 - 1
pages.json

@@ -21,7 +21,7 @@
 		{
 			"path": "pages/qrCode/index",
 			"style": {
-				"navigationStyle": "custom",
+				"navigationBarTitleText": "会员码",
 				"enablePullDownRefresh": false
 			}
 		},

+ 18 - 4
pages/my/index.rpx.css

@@ -2,7 +2,7 @@
     background: #F7F7F7;
     position: relative;
     width: 750rpx;
-    height: 1650rpx;
+    height: 1600rpx;
 }
 
 .tabBarLineHeight{
@@ -19,8 +19,7 @@
 .content{
     position: absolute;
     top: 138rpx;
-    width: 750rpx;
-    padding: 0 34rpx;
+    left: 32rpx;
 }
 .userInfo{
     width: 686rpx;
@@ -82,7 +81,7 @@
     text-align: center;
 }
 .num{
-    font-size: 36rpx;
+    font-size: 30rpx;
     font-family: DINAlternate-Bold, DINAlternate;
     font-weight: bold;
     color: #333333;
@@ -92,3 +91,18 @@
 .balance{
     margin-top: 16rpx;
 }
+.qrcodeView{
+    margin-right: 32rpx;
+}
+.qrcode{
+    width: 40rpx;
+    height: 40rpx;
+    margin-left: 16rpx;
+}
+.qrcodeTitle{
+    font-size: 24rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #333333;
+    margin-top: 8rpx;
+}

+ 32 - 19
pages/my/index.vue

@@ -6,17 +6,25 @@
 
 		<view class="content">
 
-				<view class="userInfo flex-row">
-					<view class="userPhoto">
-						<image class="userPhoto" src="/static/logo.png"></image>
-					</view>
-					<view class="userTitle flex-col justify-center">
-						<text class="nickName">HI,亲爱的{{ userInfo.ncikName }}</text>
-						<view class="flex-row">
-							<text class="xinxTitle">啊擦黄寺大街快乐崇拜哈少得可怜</text>
-							<u-icon name="arrow-right" color="#333333" size="16"></u-icon>
+				<view class="userInfo flex-row justify-between  ">
+					<view class="flex-row">
+						<view class="userPhoto" @click="navigateToPage('/myPages/userInfo/index')">
+							<image class="userPhoto" :src="userInfo.selfPhotoUrl || '/static/me/u4.png'"></image>
+						</view>
+						<view class="userTitle flex-col justify-center" @click="navigateToPage('/myPages/userInfo/index')">
+							<text class="nickName">HI,亲爱的{{ userInfo.ncikName }}</text>
+							<view class="flex-row">
+								<text class="xinxTitle">点击完善个人信息</text>
+								<u-icon name="arrow-right" color="#333333" size="16"></u-icon>
+							</view>
 						</view>
 					</view>
+
+					<view class="qrcodeView flex-col justify-center" @click="navigateToPage('/pages/qrCode/index')">
+						<image class="qrcode" src="/static/me/u5.png"></image>
+						<text class="qrcodeTitle">会员码</text>
+					</view>
+
 				</view>
 
 				<view class="sudoku flex-col">
@@ -24,7 +32,7 @@
 						<text>我的资产</text>
 					</view>
 					<view class="balance flex-row justify-around">
-						<view @click="goRecharge">
+						<view @click="navigateToPage('/myPages/recharge/index')">
 							<view class="icon flex-row justify-center">
 								<u-icon name="/static/me/u701.png" color="red" size="30"></u-icon>
 							</view>
@@ -46,7 +54,7 @@
 								<text>{{userInfo.integral|| 0}}</text>
 							</view>
 						</view>
-						<view @click="goCoupon">
+						<view @click="navigateToPage('/orderPages/myCoupon/index')">
 							<view class="icon flex-row justify-center">
 								<u-icon name="/static/me/u687.png" color="red" size="30"></u-icon>
 							</view>
@@ -140,27 +148,32 @@ export default {
 		}else {
 			this.group1[0].rightText = '未实名认证,去认证'
 		}
+
+		if (this.userInfo.selfPhoto){
+			this.getImgUrlByOssId(this.userInfo.selfPhoto)
+		}
+
 	},
 
 	methods: {
 
-		goRecharge(){
+		getImgUrlByOssId(Id){
+			this.$api.getImgUrlByOssId(Id).then(res=>{
+				this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
+			});
+		},
+		navigateToPage(url){
 			uni.navigateTo({
-				url:'/myPages/recharge/index'
+				url:url
 			})
 		},
 
-		goCoupon(){
-			uni.navigateTo({
-				url:'/orderPages/myCoupon/index'
-			})
-		}
+
 	}
 }
 </script>
 
 <style>
-
 	@import '/common/css/common.css';
 	@import './index.rpx.css';
 </style>

+ 4 - 4
pages/qrCode/index.vue

@@ -28,10 +28,10 @@
 
 		</view>
 
-		<view class="tabBarLineHeight"></view>
-		<view class="tabBarView">
-			<tab-bar :tabIndex="tabIndex"></tab-bar>
-		</view>
+<!--		<view class="tabBarLineHeight"></view>-->
+<!--		<view class="tabBarView">-->
+<!--			<tab-bar :tabIndex="tabIndex"></tab-bar>-->
+<!--		</view>-->
 	</view>
 </template>
 

binární
static/me/u5.png