-
![]()
-
![]()
+
+
![]()
+
@@ -485,6 +484,5 @@ export default {
}
}
}
-
}
diff --git a/src/project/shandong10086/AppHome/AppHome.vue b/src/project/shandong10086/AppHome/AppHome.vue
index efe3f6b..ebacde8 100644
--- a/src/project/shandong10086/AppHome/AppHome.vue
+++ b/src/project/shandong10086/AppHome/AppHome.vue
@@ -11,7 +11,7 @@
-

+
@@ -54,7 +54,7 @@
@@ -81,6 +81,7 @@ export default {
appName: "首页",
data() {
return {
+ cdn: "https://cdn.cunwuyun.cn/wxmp",
areaName: '',
swiperList: [],
index: 0,
@@ -93,7 +94,7 @@ export default {
}
},
computed: {
- ...mapState(['global', 'user', 'token']),
+ ...mapState(['user', 'token']),
active() {
return {
fontSize: '22px',
@@ -102,8 +103,8 @@ export default {
},
noticeList() {
let {notices} = this
- return notices?.length > 0 ? notices?.map((e) => e.title) || ['暂无公告'] : ['暂无公告']
- },
+ return notices?.length > 0 ? notices?.map(e => e.title) || ['暂无公告'] : ['暂无公告']
+ }
},
onLoad() {
this.autoLogin().then(() => {
@@ -117,14 +118,12 @@ export default {
methods: {
...mapActions(['autoLogin', 'authCheck']),
getName() {
- this.$instance
- .post('/app/appcontentmoduleinfo/listByName', null, {
- params: {names: '新闻发布'},
- withoutToken: true,
- })
- .then((res) => {
- if (res?.data?.[0]?.categoryList?.length) {
- this.categorys = res.data[0]['categoryList']
+ this.$instance.post("/app/appcontentmoduleinfo/listByName", null, {
+ params: {names: "新闻发布"},
+ withoutToken: true
+ }).then(res => {
+ if (res?.data[0]?.categoryList?.length) {
+ this.categorys = res.data[0]["categoryList"];
this.search.moduleId = res.data[0]['id']
this.search.categoryId = res.data[0]['categoryList'][0]['id']
this.getCategoryList()
@@ -136,23 +135,20 @@ export default {
this.search.categoryId = this.categorys[idx]['id']
this.getCategoryList()
},
-
getCategoryList() {
- this.$instance
- .post('/app/appcontentinfo/list', null, {
- params: {...this.search, size: 100},
- })
- .then((res) => {
+ this.$instance.post("/app/appcontentinfo/list", null, {
+ params: {...this.search, size: 100}
+ }).then(res => {
if (res?.data) {
- this.categoryList = res.data.records
+ this.categoryList = res.data.records;
}
})
},
clickNotice(val) {
- const id = this.notices[val]['id']
+ const id = this.notices[val]["id"];
if (id) {
uni.navigateTo({
- url: '/mods/AppNotice/AppNotice?id=' + id,
+ url: "/mods/AppNotice/AppNotice?id=" + id
})
}
},
@@ -160,30 +156,26 @@ export default {
if (type == 0) {
uni.navigateToMiniProgram({appId})
} else if (type == 1) {
- this.$linkTo('/subPages/h5/webview?link=' + url)
+ this.$linkTo("/subPages/h5/webview?link=" + url);
}
},
getNotice() {
- this.$instance
- .post('/app/appmininotice/list', null, {
+ this.$instance.post("/app/appmininotice/list", null, {
params: {size: 999},
- withoutToken: true,
- })
- .then((res) => {
+ withoutToken: true
+ }).then(res => {
if (res?.data) {
- this.notices = res.data.records
+ this.notices = res.data.records;
}
})
},
getActive() {
- this.$instance
- .post('/app/appminitopicconfig/list', null, {
+ this.$instance.post("/app/appminitopicconfig/list", null, {
params: {size: 999},
- withoutToken: true,
- })
- .then((res) => {
+ withoutToken: true
+ }).then(res => {
if (res?.data) {
- this.activeList = res.data.records
+ this.activeList = res.data.records;
}
})
},
@@ -191,23 +183,19 @@ export default {
* 获取顶部九宫格
*/
getGrids() {
- this.$instance
- .post('/app/appminihomeconfig/list', null, {
+ this.$instance.post("/app/appminihomeconfig/list", null, {
params: {picked: 1},
- withoutToken: true,
- })
- .then((res) => {
+ withoutToken: true
+ }).then(res => {
if (res?.data) {
- this.grids = res.data.records
+ this.grids = res.data.records;
}
})
},
getSwiperList() {
- this.$instance
- .post('/app/appbanner/listForWx', null, {
- withoutToken: true,
- })
- .then((res) => {
+ this.$instance.post('/app/appbanner/listForWx', null, {
+ withoutToken: true
+ }).then((res) => {
if (res?.data) {
this.swiperList = res.data?.map((e) => ({...e, image: e.imgUrl})) || []
}
@@ -215,21 +203,21 @@ export default {
},
handleClick({type, appId, modulePath, url, checkType, corpId}) {
//先判读是不是系统应用
- if (type != '0') {
- if (type == '1') {
- uni.navigateToMiniProgram({appId})
- } else if (type == '2') {
- uni.navigateTo({url: '/subPages/h5/webview?link=' + url})
- } else if (type == '3') {
- this.$linkTo(url)
- } else if (type == '4') {
+ if (type != "0") {
+ if (type == "1") {
+ uni.navigateToMiniProgram({appId});
+ } else if (type == "2") {
+ uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
+ } else if (type == "3") {
+ this.$linkTo(url);
+ } else if (type == "4") {
uni.openCustomerServiceChat({
extInfo: {url: url},
corpId: corpId,
fail: () => {
- this.$u.toast('请使用普通微信打开小程序进行咨询')
- },
- })
+ this.$u.toast('请使用普通微信打开小程序进行咨询');
+ }
+ });
}
} else if (type && type == "0") {
uni.showLoading({title: '正在进入应用...'})
@@ -239,14 +227,13 @@ export default {
handleBannerClick(index) {
if (!this.swiperList[index].linkUrl) return
- if (this.swiperList[index].type == '0') {
- //0 h5链接; 1 小程序链接; 2外部小程序
+ if (this.swiperList[index].type == '0') { //0 h5链接; 1 小程序链接; 2外部小程序
this.$linkTo(`/subPages/h5/webview?link=${this.swiperList?.[index]?.linkUrl}&title=${this.swiperList?.[index]?.title}`)
} else if (this.swiperList[index].type == '1') {
this.$linkTo(`${this.swiperList?.[index]?.linkUrl}`)
} else {
wx.navigateToMiniProgram({
- appId: this.swiperList[index].linkUrl,
+ appId: this.swiperList[index].linkUrl
})
}
},
@@ -255,19 +242,19 @@ export default {
onShareAppMessage() {
return {
title: '欢迎使用数字乡村治理服务一体化平台~',
- path: `/pages/home/home`,
+ path: `/pages/home/home`
}
},
}