liujd 6 лет назад
Родитель
Сommit
71e2e3f3fc
1 измененных файлов с 20 добавлено и 13 удалено
  1. 20 13
      mobile-code/src/pages/home/user.vue

+ 20 - 13
mobile-code/src/pages/home/user.vue

@@ -33,7 +33,10 @@
 						</div>
 					</div>
 					<div class="user-wrap-bottom">
-						<div class="level-lint"></div>
+						<!-- <div class="level-lint"></div> -->
+						<div class="level-lint">
+							<progress :percent="percentNum" stroke-width="2" activeColor="#ffe4bd" backgroundColor="#FF2842" />
+						</div>
 						<div>ID {{ shopUser.id }}</div>
 					</div>
 				</div>
@@ -46,7 +49,7 @@
 					<div class="my-surplus">{{ shopUser.userAsset.balance || 0.00 }}</div>
 				</div>
 				<div class="surplus-right">
-					<button class="button-com" @click="showPopup">申请会员</button>
+					<button class="button-com" v-if="shopUser.subscribe != 1 || !shopUser.mobile" @click="showPopup">申请会员</button>
 					<!-- <button class="button-com" v-if="shopUser.isFull != 1" @click="showPopup">申请会员</button> -->
 					<!-- <button class="button-com mini-btn" open-type="getUserInfo" v-if="loginInfo.isFull != 1" @getuserinfo="getWxAvatar">申请会员</button> -->
 					<button class="button-com" @click="pageToFn({
@@ -153,6 +156,10 @@ export default {
 		// #endif
 		smallAvatarUrl() {
 			return this.shopUser.smallAvatarUrl || ''
+		},
+		percentNum() {
+			if (this.$util.isEmpty(this.shopUser)) return 0
+			return Math.round((this.shopUser.userAsset.growth / this.shopUser.userAsset.nextLevelGrowth) * 100)
 		}
 	},
 	onLoad(option) {
@@ -273,17 +280,17 @@ export default {
 					margin-top: 20px;
 					margin-bottom: 10px;
 					position: relative;
-					&::before {
-						position: absolute;
-						top: 0;
-						left: 0;
-						display: inline-block;
-						content: '';
-						background-color: #ffe4bd;
-						width: 200px;
-						height: 4px;
-						border-radius: 4px;
-					}
+					// &::before {
+					// 	position: absolute;
+					// 	top: 0;
+					// 	left: 0;
+					// 	display: inline-block;
+					// 	content: '';
+					// 	background-color: #ffe4bd;
+					// 	width: 200px;
+					// 	height: 4px;
+					// 	border-radius: 4px;
+					// }
 				}
 			}
 		}