|
@@ -56,13 +56,28 @@
|
|
src="https://www.nongfuspring.com/en/aboutus/management.html"
|
|
src="https://www.nongfuspring.com/en/aboutus/management.html"
|
|
frameborder="0"
|
|
frameborder="0"
|
|
></iframe> -->
|
|
></iframe> -->
|
|
-
|
|
|
|
|
|
+ <van-dialog
|
|
|
|
+ v-model="showDialog"
|
|
|
|
+ :show-confirm-button="false"
|
|
|
|
+ :show-cancel-button="false"
|
|
|
|
+ :close-on-click-overlay="true"
|
|
|
|
+ class="welcome-dialog"
|
|
|
|
+ >
|
|
|
|
+ <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>
|
|
|
|
+ </van-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getBanners, getUserInfo,getNews } from '@/api/home';
|
|
|
|
-import { Swipe, SwipeItem } from 'vant';
|
|
|
|
|
|
+import { getBanners, getUserInfo, getNews } from '@/api/home';
|
|
|
|
+import { Swipe, SwipeItem, Dialog, Icon } from 'vant';
|
|
|
|
+import Vue from 'vue';
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "Home",
|
|
name: "Home",
|
|
data() {
|
|
data() {
|
|
@@ -70,11 +85,16 @@ export default {
|
|
banners: [],
|
|
banners: [],
|
|
userInfo: {},
|
|
userInfo: {},
|
|
newsList: [],
|
|
newsList: [],
|
|
|
|
+ showDialog: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
[Swipe.name]: Swipe,
|
|
[Swipe.name]: Swipe,
|
|
[SwipeItem.name]: SwipeItem,
|
|
[SwipeItem.name]: SwipeItem,
|
|
|
|
+ [Icon.name]: Icon,
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ Vue.use(Dialog);
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.getBanners();
|
|
this.getBanners();
|
|
@@ -250,4 +270,46 @@ export default {
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
background: #fff;
|
|
background: #fff;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.close-icon-wrapper {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 16px;
|
|
|
|
+ right: 16px;
|
|
|
|
+ z-index: 1;
|
|
|
|
+
|
|
|
|
+ .close-icon {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: #969799;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ padding: 4px;
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ color: #323233;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog-title {
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ padding: 16px 0;
|
|
|
|
+ margin-top: 8px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.welcome-dialog {
|
|
|
|
+ :deep(.van-dialog__content) {
|
|
|
|
+ padding: 20px;
|
|
|
|
+ position: relative;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog-content {
|
|
|
|
+ text-align: center;
|
|
|
|
+ p {
|
|
|
|
+ margin: 10px 0;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #333;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|