guhongwei 2 年之前
父節點
當前提交
3d4c025cab
共有 1 個文件被更改,包括 80 次插入4 次删除
  1. 80 4
      pagesMy/integral/index.vue

+ 80 - 4
pagesMy/integral/index.vue

@@ -1,6 +1,23 @@
 <template>
 	<mobile-frame>
-		我的积分
+		<view class="main">
+			<view class="one">
+				<view class="one_1">
+					<text>{{user.integral||0}}</text><text>分</text>
+				</view>
+				<view class="one_2">
+					<button type="default" size="mini">礼品兑换记录</button>
+				</view>
+			</view>
+			<view class="two">
+				<view class="two_1" v-if="list&&list.length>0">
+					数据列表
+				</view>
+				<view class="two_2" v-else>
+					已加载完全部
+				</view>
+			</view>
+		</view>
 	</mobile-frame>
 </template>
 
@@ -8,16 +25,75 @@
 	export default {
 		data() {
 			return {
-
+				user: {},
+				list: []
 			};
 		},
-		onShow: function() {},
-		methods: {
+		onLoad: function(e) {
 
+		},
+		onShow: function() {
+			const that = this;
+			that.watchLogin()
+		},
+		methods: {
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						that.$set(that, `user`, user)
+					}
+				})
+			}
 		}
 	}
 </script>
 
 <style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			background-color: var(--fFB1Color);
+			padding: 5vw 2vw;
+			display: flex;
+			justify-content: space-between;
+
+			.one_1 {
+				color: #fff;
+				font-size: 25px;
+				font-weight: bold;
 
+				text:last-child {
+					padding: 0 0 0 2vw;
+					font-size: 15px;
+				}
+			}
+
+			.one_2 {
+				button {
+					background: #fff;
+					color: #ff0000;
+					border-radius: 25px;
+					font-size: 14px;
+				}
+			}
+
+		}
+
+		.two {
+			.two_2 {
+				text-align: center;
+				color: #858585;
+				font-size: 14px;
+				margin: 5vw 0;
+			}
+
+		}
+	}
 </style>