|
@@ -43,7 +43,13 @@
|
|
|
<span>5%</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <button class="party-btn" @click="toApply">党员申请</button>
|
|
|
+ <button
|
|
|
+ class="party-btn"
|
|
|
+ :class="{ 'is-member': userInfo.isdangyuan === 1 }"
|
|
|
+ @click="userInfo.isdangyuan === 0 && toApply()"
|
|
|
+ >
|
|
|
+ {{ userInfo.isdangyuan === 1 ? '已是党员' : '党员申请' }}
|
|
|
+ </button>
|
|
|
</div>
|
|
|
<div class="news-title">新闻中心</div>
|
|
|
<div
|
|
@@ -51,24 +57,35 @@
|
|
|
v-if="newsList[2]"
|
|
|
v-html="newsList[2].content"
|
|
|
></div>
|
|
|
- <!-- <iframe
|
|
|
- class="news-iframe"
|
|
|
- src="https://www.nongfuspring.com/en/aboutus/management.html"
|
|
|
- frameborder="0"
|
|
|
- ></iframe> -->
|
|
|
+ <van-dialog
|
|
|
+ v-model="showAuthDialog"
|
|
|
+ :show-confirm-button="false"
|
|
|
+ :show-cancel-button="false"
|
|
|
+ :close-on-click-overlay="true"
|
|
|
+ class="auth-dialog"
|
|
|
+ v-if="userInfo.if_real === 0"
|
|
|
+ >
|
|
|
+ <div class="close-icon-wrapper">
|
|
|
+ <van-icon name="cross" class="close-icon" @click="showAuthDialog = false" />
|
|
|
+ </div>
|
|
|
+ <div class="auth-content">
|
|
|
+ <p class="auth-text">你还未进行实名认证</p>
|
|
|
+ <button class="auth-btn" @click="toAuth">去认证</button>
|
|
|
+ </div>
|
|
|
+ </van-dialog>
|
|
|
<van-dialog
|
|
|
v-model="showDialog"
|
|
|
:show-confirm-button="false"
|
|
|
:show-cancel-button="false"
|
|
|
:close-on-click-overlay="true"
|
|
|
class="welcome-dialog"
|
|
|
+ v-if="userInfo.gonggao"
|
|
|
>
|
|
|
<div class="close-icon-wrapper">
|
|
|
<van-icon name="cross" class="close-icon" @click="showDialog = false" />
|
|
|
</div>
|
|
|
<div class="dialog-title">{{userInfo.gonggao.title}}</div>
|
|
|
- <div class="dialog-content" v-html="userInfo.gonggao.value">
|
|
|
- </div>
|
|
|
+ <div class="dialog-content" v-html="userInfo.gonggao.value"></div>
|
|
|
</van-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -83,9 +100,14 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
banners: [],
|
|
|
- userInfo: {},
|
|
|
+ userInfo: {
|
|
|
+ gonggao: null,
|
|
|
+ if_real: 0,
|
|
|
+ link: []
|
|
|
+ },
|
|
|
newsList: [],
|
|
|
showDialog: true,
|
|
|
+ showAuthDialog: false,
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -105,12 +127,15 @@ export default {
|
|
|
async getUserInfo() {
|
|
|
const res = await getUserInfo();
|
|
|
this.userInfo = res.data;
|
|
|
+ if (this.userInfo.if_real === 0) {
|
|
|
+ this.showAuthDialog = true;
|
|
|
+ }
|
|
|
},
|
|
|
async getBanners() {
|
|
|
const formData = new FormData();
|
|
|
formData.append('cid', 5);
|
|
|
const res = await getBanners(formData);
|
|
|
- this.banners = res.data.map(url => url.replace(/^https:/, 'http:'));
|
|
|
+ this.banners = res.data
|
|
|
},
|
|
|
async getNewsDetail() {
|
|
|
const res = await getNews()
|
|
@@ -130,6 +155,10 @@ export default {
|
|
|
},
|
|
|
toApply(){
|
|
|
this.$router.push('/Apply');
|
|
|
+ },
|
|
|
+ toAuth() {
|
|
|
+ this.$router.push('/user-center');
|
|
|
+ this.showAuthDialog = false;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -247,10 +276,20 @@ export default {
|
|
|
font-weight: 500;
|
|
|
margin-left: 12px;
|
|
|
cursor: pointer;
|
|
|
- transition: background 0.2s;
|
|
|
+ transition: all 0.2s;
|
|
|
+
|
|
|
&:hover {
|
|
|
background: #c9301c;
|
|
|
}
|
|
|
+
|
|
|
+ &.is-member {
|
|
|
+ background: #999;
|
|
|
+ cursor: not-allowed;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #999;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -312,4 +351,41 @@ export default {
|
|
|
color: #333;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.auth-dialog {
|
|
|
+ :deep(.van-dialog__content) {
|
|
|
+ padding: 30px 20px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.auth-content {
|
|
|
+ text-align: center;
|
|
|
+ height: 120px;
|
|
|
+
|
|
|
+ .auth-text {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ margin-top:12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .auth-btn {
|
|
|
+ width: 83%;
|
|
|
+ height: 36px;
|
|
|
+ background: #ed4b39;
|
|
|
+ color: #fff;
|
|
|
+ border: none;
|
|
|
+ border-radius: 18px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: background 0.2s;
|
|
|
+ margin-top:20px;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #c9301c;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|