|
@@ -19,7 +19,7 @@
|
|
|
<text @click="morBtn">更多>></text>
|
|
|
</template>
|
|
|
<uni-card class="card card2" v-for="(item, index) in policyList" :key="index" @click="policyBtn(item)">
|
|
|
- <image class="cover" :src="item.cover"></image>
|
|
|
+ <image class="cover" :src="item.url"></image>
|
|
|
<h2>{{ item.title }}</h2>
|
|
|
<text class="cardText">{{ item.text }}</text>
|
|
|
</uni-card>
|
|
@@ -30,41 +30,30 @@
|
|
|
<script>
|
|
|
import request from '../../api/system.js';
|
|
|
import requestLogin from '../../api/login.js';
|
|
|
+ const appid = uni.getAccountInfoSync().miniProgram.appId;
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- list: [
|
|
|
- { url: '/static/h1.png', title: '核酸检测报备', path: '/pages/illness/index', isUser: true },
|
|
|
- { url: '/static/h3.png', title: '返(来)长报备' },
|
|
|
- { url: '/static/h2.png', title: '检测点查询', path: '/pages/illness/testingRoom' },
|
|
|
- { url: '/static/h4.png', title: '疫苗接种点查询' },
|
|
|
- ],
|
|
|
- policyList: [
|
|
|
- { title: '失业证', text: '失业证办理', cover: '/static/syz.png' },
|
|
|
- { title: '生育证', text: '生育证办理', cover: '/static/shengyu.png' },
|
|
|
- { title: '居住证', text: '居住证办理', cover: '/static/jzz.png' },
|
|
|
- { title: '老年公交卡', text: '公交卡办理', cover: '/static/gjk.png' },
|
|
|
- { title: '残疾证', text: '残疾证办理', cover: '/static/cjz.png' },
|
|
|
- { title: '困难群众', text: '困难群众帮扶', cover: '/static/knqz.png' },
|
|
|
- { title: '退役军人', text: '退役军人登记', cover: '/static/tyjr.png' },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
+ policyList: [],
|
|
|
notice: '通知公告',
|
|
|
autoplay: true,
|
|
|
interval: 3000,
|
|
|
duration: 500,
|
|
|
indicatorDots: false,
|
|
|
- bannerList: [
|
|
|
- '/static/1.jpg',
|
|
|
- '/static/2.jpg',
|
|
|
- '/static/3.jpg'
|
|
|
- ]
|
|
|
+ bannerList: []
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ const config = await requestLogin.getJson();
|
|
|
+ const { list, bannerList, policyList } = config.data;
|
|
|
+ this.list = list;
|
|
|
+ this.bannerList = bannerList;
|
|
|
+ this.policyList = policyList;
|
|
|
const _this = this;
|
|
|
wx.login({
|
|
|
success: async ({ code }) => {
|
|
|
- const res = await requestLogin.login({ code, appId: 'wx6cc481d94edbe039' });
|
|
|
+ const res = await requestLogin.login({ code, appId: appid });
|
|
|
if (res && res.code == 200) {
|
|
|
uni.setStorageSync('token', res.data.token);
|
|
|
uni.setStorageSync('userinfo', res.data.user);
|
|
@@ -98,13 +87,7 @@
|
|
|
uni.navigateTo({ url: e.path });
|
|
|
},
|
|
|
policyBtn(e) {
|
|
|
- uni.setStorage({
|
|
|
- key: 'policyItem',
|
|
|
- data: e.title,
|
|
|
- success: function () {
|
|
|
- uni.switchTab({ url: '/pages/policy/index' });
|
|
|
- }
|
|
|
- });
|
|
|
+ uni.navigateTo({ url: e.path });
|
|
|
},
|
|
|
// 查看更多
|
|
|
getMore() {
|