|
@@ -6,9 +6,9 @@
|
|
|
<view class="backDiv"></view>
|
|
|
<view class="title">分享好房 · 躺平赚钱</view>
|
|
|
<view class="subTitle" @click="setEnv">新手赚钱帮助 ></view>
|
|
|
- <view class="levelDiv" v-if="userInfo.ownersUnion"
|
|
|
+ <view class="levelDiv"
|
|
|
style="background: url('https://dm.static.elab-plus.com/yezhu/h5/icon_line_back.png') center/100% 100% no-repeat;">
|
|
|
- <view class="level_top">
|
|
|
+ <view class="level_top" v-if="token">
|
|
|
<image class="level_icon" src="https://dm.static.elab-plus.com/yezhu/h5/icon_Level.png" mode="">
|
|
|
</image>
|
|
|
<view class="level_text">{{userInfo.curlevel}}</view>
|
|
@@ -19,19 +19,33 @@
|
|
|
src="https://dm.static.elab-plus.com/yezhu/h5/icon_right.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="level_bottom">
|
|
|
- <levelView :currentLevel='userInfo.curIncome' :nextLevel='userInfo.nextIncome' :currentLevelTxt='userInfo.curlevel' nextLevelTxt='userInfo.nextLevel'>
|
|
|
+ <view class="level_top" v-else @click="toLogin">
|
|
|
+ <image class="level_icon" src="https://dm.static.elab-plus.com/yezhu/h5/icon_Level.png" mode="">
|
|
|
+ </image>
|
|
|
+ <view class="level_text_login">登录</view>
|
|
|
+ <view class="level_des"></view>
|
|
|
+ <view class="level_update">
|
|
|
+ <text>立即登录</text>
|
|
|
+ <image class="level_right_icon"
|
|
|
+ src="https://dm.static.elab-plus.com/yezhu/h5/icon_right.png" mode=""></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="level_bottom" v-if="token">
|
|
|
+ <levelView :currentLevel='userInfo.curIncome' :nextLevel='userInfo.nextIncome' :currentLevelTxt='userInfo.curlevel' :nextLevelTxt='userInfo.nextLevel'>
|
|
|
</levelView>
|
|
|
</view>
|
|
|
+ <view class="level_bottom_login" v-else >
|
|
|
+ 点此进行登录注册,开始赚钱吧
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content_body" :style="{background:color4}">
|
|
|
- <view class="content_beginner_guide">
|
|
|
+ <view class="content_beginner_guide" v-if="showGuide">
|
|
|
<view class="title">
|
|
|
<text class="title_txt">- 新手引导 -</text>
|
|
|
<view class="title_right">
|
|
|
- <text class="title_right_txt">收起</text>
|
|
|
+ <text class="title_right_txt" @click="upLoadView(false)">收起</text>
|
|
|
<image class="title_right_cion" src="https://dm.static.elab-plus.com/yezhu/icon_shouqi.png"
|
|
|
mode=""></image>
|
|
|
</view>
|
|
@@ -63,6 +77,11 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
+ <view class="content_beginner_guide_" v-else @click="upLoadView(true)">
|
|
|
+ <text class="title_txt">展开新手引导</text>
|
|
|
+ <image class="title_right_cion" src="../../static/icons/icon_down_.png"
|
|
|
+ mode=""></image>
|
|
|
+ </view>
|
|
|
<view class="content_tab">
|
|
|
<view class="tab_item" @click="toYezhu">
|
|
|
<image class="icon_tab" src="https://dm.static.elab-plus.com/yezhu/icon_zcyz.png" mode=""></image>
|
|
@@ -153,6 +172,8 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
+ <login-notice></login-notice>
|
|
|
+ <login></login>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -179,26 +200,28 @@
|
|
|
"totalIncome": null,
|
|
|
"taskCount": null,
|
|
|
"surplusTaskAmount": null
|
|
|
- }
|
|
|
+ },
|
|
|
+ showGuide:false,
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.color4 = app.globalData.color4;
|
|
|
let token = this.$cache.get('_token_owner_union');
|
|
|
- let userId = this.$cache.get('_user_id');
|
|
|
- if(userId){
|
|
|
- app.globalData.userId = userId;
|
|
|
- }
|
|
|
- if (!token) {
|
|
|
- this.regist();
|
|
|
- } else {
|
|
|
- app.globalData.token = token;
|
|
|
- this.getUserInfo();
|
|
|
+ this.token = token;
|
|
|
+ if(token){
|
|
|
+ this.getData();
|
|
|
}
|
|
|
- this.color4 = app.globalData.color4;
|
|
|
- this.getHomePage();
|
|
|
-
|
|
|
+ uni.$on("request",()=>{
|
|
|
+ let token2 = this.$cache.get('_token_owner_union');
|
|
|
+ this.token = token2;
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
+ getData(){
|
|
|
+ this.getUserInfo();
|
|
|
+ this.getHomePage();
|
|
|
+ },
|
|
|
async getHomePage() {
|
|
|
let ret = await this.$myRequest({
|
|
|
url: "/project/homePage",
|
|
@@ -214,44 +237,6 @@
|
|
|
this.houseList = pageModel.resultSet || [];
|
|
|
}
|
|
|
},
|
|
|
- async regist() {
|
|
|
- let ret = await this.$myRequest({
|
|
|
- url: "/regist",
|
|
|
- data: {
|
|
|
- "code": "o08gpwOfRgwnhh1WCBYGLbaszur8",
|
|
|
- "shareToken": ""
|
|
|
- }
|
|
|
- });
|
|
|
- if (ret.data.success) {
|
|
|
- this.userId = ret.data.single.userId;
|
|
|
- this.$cache.set("_user_id",this.userId);
|
|
|
- app.globalData.userId = this.userId;
|
|
|
- if (ret.data.single.authed == 1) {
|
|
|
- this.token = ret.data.single.token;
|
|
|
- this.$cache.set('_token_owner_union', this.token);
|
|
|
- app.globalData.token = this.token
|
|
|
- this.getUserInfo()
|
|
|
- } else {
|
|
|
- this.getToken()
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- async getToken() {
|
|
|
- let ret = await this.$myRequest({
|
|
|
- url: "/authorizedPhone",
|
|
|
- data: {
|
|
|
- "code": (new Date()).getTime(),
|
|
|
- "phone": "18721775127",
|
|
|
- "userId": this.userId
|
|
|
- }
|
|
|
- });
|
|
|
- if (ret.data.success) {
|
|
|
- this.token = ret.data.single;
|
|
|
- this.$cache.set('_token_owner_union', this.token);
|
|
|
- app.globalData.token = this.token
|
|
|
- this.getUserInfo()
|
|
|
- }
|
|
|
- },
|
|
|
async getUserInfo() {
|
|
|
let ret = await this.$myRequest({
|
|
|
url: "/user/userInfo",
|
|
@@ -311,6 +296,12 @@
|
|
|
uni.navigateTo({
|
|
|
url:'../shareCardPage/shareCardPage?page='+item.xcxPage+"&projectId="+item.projectId+"&type="+type
|
|
|
})
|
|
|
+ },
|
|
|
+ toLogin(){
|
|
|
+ uni.$emit('login')
|
|
|
+ },
|
|
|
+ upLoadView(isShow){
|
|
|
+ this.showGuide = isShow;
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -399,6 +390,7 @@
|
|
|
flex-wrap: nowrap;
|
|
|
align-items: center;
|
|
|
margin-top: 5rpx;
|
|
|
+
|
|
|
|
|
|
.level_icon {
|
|
|
width: 37rpx;
|
|
@@ -421,6 +413,14 @@
|
|
|
margin-right: 8rpx;
|
|
|
margin-top: -7rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .level_text_login{
|
|
|
+ font-size: 40rpx;
|
|
|
+ font-family: FontName, FontName-Regular;
|
|
|
+ font-weight: 400;
|
|
|
+ text-align: left;
|
|
|
+ color: #f5c8a8;
|
|
|
+ }
|
|
|
|
|
|
.level_des {
|
|
|
font-size: 22rpx;
|
|
@@ -450,6 +450,14 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .level_bottom_login{
|
|
|
+ font-size: 22rpx;
|
|
|
+ font-family: Verdana, Verdana-Regular;
|
|
|
+ font-weight: 400;
|
|
|
+ text-align: left;
|
|
|
+ color: #f5c8a8;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -461,6 +469,8 @@
|
|
|
z-index: 102;
|
|
|
position: relative;
|
|
|
padding: 1rpx;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
.content_beginner_guide {
|
|
|
height: 354rpx;
|
|
@@ -559,6 +569,33 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+ .content_beginner_guide_{
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ margin-left: 30rpx;
|
|
|
+ margin-right: 30rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .title_txt {
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: FontName, FontName-Regular;
|
|
|
+ font-weight: 400;
|
|
|
+ text-align: left;
|
|
|
+ color: #b1b1b1;
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title_right_cion {
|
|
|
+ width: 10rpx;
|
|
|
+ height: 6rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
.content_tab {
|
|
|
display: flex;
|
|
|
box-sizing: border-box;
|
|
@@ -931,5 +968,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</style>
|