|
@@ -1,37 +1,42 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<view class="banner">
|
|
|
- <image src="https://img-shop.qmimg.cn/s23107/2020/04/26/3eb7808bf105262604.jpg" mode="" class="bg"></image>
|
|
|
- <view class="intro">
|
|
|
- <view class="greet">您好,{{ isLogin ? member.nickname : '游客' }}</view>
|
|
|
- <view class="note">一杯奶茶,一口软欧包,在奈雪遇见两种美好</view>
|
|
|
+ <image :src="fetch.config.home_top" mode="" class="bg"></image>
|
|
|
+ <view class="intro" v-if="fetch.user.id <= 0">
|
|
|
+ <view class="greet">您好,{{fetch.user.username}}</view>
|
|
|
+ <view class="note">{{fetch.config.info}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
- <view class="entrance">
|
|
|
- <view class="item" @tap="takein">
|
|
|
- <image src="/static/images/index/zq.png" class="icon"></image>
|
|
|
- <view class="title">记忆</view>
|
|
|
+ <view class="entrance" v-if="fetch.user.id > 0">
|
|
|
+ <view class="item" @tap="user">
|
|
|
+ <image :src="fetch.user.avatar" class="icon"></image>
|
|
|
+ <view class="title">{{fetch.user.username}}</view>
|
|
|
</view>
|
|
|
- <view class="item" @tap="takeout">
|
|
|
+ <view class="item" @tap="jiyi">
|
|
|
<image src="/static/images/index/wm.png" class="icon"></image>
|
|
|
- <view class="title">事件</view>
|
|
|
+ <view class="title">记忆</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="entrance" v-if="fetch.user.id <= 0">
|
|
|
+ <view class="item" @tap="login">
|
|
|
+ <view class="title">登录</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info">
|
|
|
- <view class="integral_section" @tap="integrals">
|
|
|
+ <view class="integral_section">
|
|
|
<view class="top">
|
|
|
- <text class="title">我的余额</text>
|
|
|
- <text class="value">411</text>
|
|
|
+ <text class="title">{{fetch.score.name}}</text>
|
|
|
+ <text class="value">{{fetch.score.score}}</text>
|
|
|
</view>
|
|
|
- <view class="bottom">
|
|
|
- 进入商城兑换合小券及小记周边好礼
|
|
|
+ <view class="bottom" v-if="fetch.score.info">
|
|
|
+ {{fetch.score.info}}
|
|
|
<view class="iconfont iconarrow-right"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="qrcode_section" @tap="memberCode">
|
|
|
+ <view class="qrcode_section" @tap="invite">
|
|
|
<image src="/static/images/index/qrcode.png"></image>
|
|
|
- <text>邀请码</text>
|
|
|
+ <text>身份证明</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="navigators" style="display: none;">
|
|
@@ -67,12 +72,12 @@
|
|
|
<view class="member-news">
|
|
|
<view class="header">
|
|
|
<view class="title">小记宣传栏</view>
|
|
|
- <view class="iconfont iconRightbutton"></view>
|
|
|
+ <view class="iconfont iconRightbutton" style="display: none;"></view>
|
|
|
</view>
|
|
|
<view class="list">
|
|
|
- <view class="item">
|
|
|
- <image src="https://img-shop.qmimg.cn/s23107/2020/04/27/0039bf41c9ebd50a2c.jpg"></image>
|
|
|
- <view class="title">"梅"你不行 | 霸气杨梅清爽回归</view>
|
|
|
+ <view class="item" v-for="(v, k) in fetch.xuanchuan" :key="k" @click="xuanchuan(v.link)">
|
|
|
+ <image :src="v.pic"></image>
|
|
|
+ <view class="title">{{v.name}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -81,82 +86,52 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {mapState, mapGetters} from 'vuex'
|
|
|
-
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
fetch : {
|
|
|
user : {},
|
|
|
+ config : {
|
|
|
+ home_top : '',
|
|
|
+ },
|
|
|
+ score : {},
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState(['member']),
|
|
|
- },
|
|
|
onShow() {
|
|
|
- //this.Dever.checkLogin();
|
|
|
- this.getData(1);
|
|
|
+ this.getData();
|
|
|
},
|
|
|
// 重新加载
|
|
|
onPullDownRefresh: function() {
|
|
|
- this.getData(1);
|
|
|
- },
|
|
|
- //下拉加载
|
|
|
- onReachBottom() {
|
|
|
- this.getData(2);
|
|
|
+ this.getData();
|
|
|
},
|
|
|
methods: {
|
|
|
- getData : function(page) {
|
|
|
+ getData : function() {
|
|
|
this.Dever.get(this, 'app/collection/?l=api.home', {id:-1});
|
|
|
},
|
|
|
view : function(id) {
|
|
|
this.Dever.location('dream/index?id=' + id);
|
|
|
},
|
|
|
|
|
|
- takein() {
|
|
|
- this.$store.commit('SET_ORDER_TYPE', 'takein')
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/menu/menu'
|
|
|
- })
|
|
|
+ xuanchuan : function(link) {
|
|
|
+ this.Dever.location(link);
|
|
|
},
|
|
|
- takeout() {
|
|
|
- if(!this.isLogin) {
|
|
|
- uni.navigateTo({url: '/pages/login/login'})
|
|
|
- return
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/address/address?is_choose=true"
|
|
|
- })
|
|
|
+
|
|
|
+ login : function() {
|
|
|
+ this.Dever.location('user/login');
|
|
|
},
|
|
|
- integrals() {
|
|
|
- if(!this.isLogin) {
|
|
|
- uni.navigateTo({url: '/pages/login/login'})
|
|
|
- return
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/integrals/integrals'
|
|
|
- })
|
|
|
+
|
|
|
+ jiyi : function() {
|
|
|
+ this.Dever.alert('敬请期待');
|
|
|
},
|
|
|
- packages() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/packages/index'
|
|
|
- })
|
|
|
+
|
|
|
+ user : function() {
|
|
|
+
|
|
|
},
|
|
|
- memberCode() {
|
|
|
- if(!this.isLogin) {
|
|
|
- uni.navigateTo({url: '/pages/login/login'})
|
|
|
- return
|
|
|
- }
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/mine/member-code'
|
|
|
- })
|
|
|
+
|
|
|
+ invite : function() {
|
|
|
+ this.Dever.alert('敬请期待');
|
|
|
},
|
|
|
- invite() {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/activities/invite'
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|