Compare commits
No commits in common. "f6d44a6d33f477cfd2638df8346363aa297ad93f" and "7bbe58a0d01121972cccbd0810b0bd47ae8666b3" have entirely different histories.
f6d44a6d33
...
7bbe58a0d0
4
app.json
4
app.json
@ -25,9 +25,7 @@
|
|||||||
"pages/workBench/index",
|
"pages/workBench/index",
|
||||||
"pages/webPage/index",
|
"pages/webPage/index",
|
||||||
"pages/aid/finance/index",
|
"pages/aid/finance/index",
|
||||||
"pages/aid/law/index",
|
"pages/aid/law/index"
|
||||||
"pages/aid/detail/index",
|
|
||||||
"pages/aid/consult/index"
|
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
import { getAidList } from "../../service/system";
|
|
||||||
import { alertInfo, alertSuccess, loadingFunc } from "../../utils/index";
|
|
||||||
import request from '../../utils/request'
|
|
||||||
|
|
||||||
const { OK } = request;
|
|
||||||
|
|
||||||
// components/aid/index.js
|
// components/aid/index.js
|
||||||
Component({
|
Component({
|
||||||
|
|
||||||
@ -11,79 +5,20 @@ Component({
|
|||||||
* 组件的属性列表
|
* 组件的属性列表
|
||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
type: Number,
|
|
||||||
bannerType: Number,
|
|
||||||
|
|
||||||
},
|
|
||||||
lifetimes: {
|
|
||||||
attached() {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件的初始数据
|
* 组件的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
park: {},
|
|
||||||
list: [],
|
|
||||||
total: 0,
|
|
||||||
page: 1,
|
|
||||||
size: 20,
|
|
||||||
},
|
|
||||||
lifetimes: {
|
|
||||||
attached() {
|
|
||||||
loadingFunc(async () => {
|
|
||||||
await this.init();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件的方法列表
|
* 组件的方法列表
|
||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
async init() {
|
|
||||||
const { type, page, size } = this.data;
|
|
||||||
const { code, message, data = [], total } = await getAidList(page, size, type);
|
|
||||||
if (code !== OK) {
|
|
||||||
alertInfo(message)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.setData({
|
|
||||||
list: data,
|
|
||||||
total,
|
|
||||||
totalPage: Math.ceil(total / size)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onRefresh() {
|
|
||||||
const that = this;
|
|
||||||
this.setData({
|
|
||||||
page: 1,
|
|
||||||
}, () => {
|
|
||||||
that.init();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
jumpToDetail(e) {
|
|
||||||
const { id = "" } = e.currentTarget.dataset;
|
|
||||||
const { type } = this.data;
|
|
||||||
wx.navigateTo({
|
|
||||||
url: `/pages/aid/detail/index?id=${id}&type=${type}`,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
consult(e) {
|
|
||||||
const { id = "" } = e.currentTarget.dataset;
|
|
||||||
const { type } = this.data;
|
|
||||||
wx.navigateTo({
|
|
||||||
url: `/pages/aid/consult/index?id=${id}&type=${type}`,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async onChangePage(e) {
|
|
||||||
const page = e.detail.currentIndex;
|
|
||||||
const that = this;
|
|
||||||
this.setData({
|
|
||||||
page
|
|
||||||
}, () => {
|
|
||||||
that.init();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -1,10 +1,4 @@
|
|||||||
{
|
{
|
||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {
|
"usingComponents": {}
|
||||||
"Banner": "/components/banner/index",
|
|
||||||
"van-image": "@vant/weapp/image/index",
|
|
||||||
"empty": "/components/empty/index",
|
|
||||||
"van-icon": "@vant/weapp/icon/index",
|
|
||||||
"pagination": "/components/pagination/index"
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,34 +1,2 @@
|
|||||||
<!--components/aid/index.wxml-->
|
<!--components/aid/index.wxml-->
|
||||||
<Banner park="{{park.id}}" type="{{bannerType}}" />
|
<text>components/aid/index.wxml</text>
|
||||||
<div class="title">行业精英</div>
|
|
||||||
<view wx:if="{{list.length}}">
|
|
||||||
<view wx:for="{{list}}" wx:key="id" >
|
|
||||||
<view class="userInfoItem" bind:tap="jumpToDetail" data-id="{{item.id}}">
|
|
||||||
<view class="content">
|
|
||||||
<van-image
|
|
||||||
width="200rpx"
|
|
||||||
height="200rpx"
|
|
||||||
lazy-load
|
|
||||||
src="{{item.avatar}}"
|
|
||||||
/>
|
|
||||||
<view class="userInfo">
|
|
||||||
<view style="display: flex;font-size: 30rpx;">
|
|
||||||
<view class="userName"> {{ item.name }} </view>
|
|
||||||
<view class="userLevel"> {{ item.level }} </view>
|
|
||||||
</view>
|
|
||||||
<view class="synopsis"> {{item.synopsis}}{{item.synopsis}} {{item.synopsis}} </view>
|
|
||||||
<view class="connect" catch:tap="consult" data-id="{{item.id}}">
|
|
||||||
<van-icon name="service-o" color="#1989fa" />
|
|
||||||
<view style="margin-left: 10rpx;color: #1989fa;"> 在线咨询 </view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<pagination
|
|
||||||
currentIndex="{{page}}"
|
|
||||||
totalPage="{{totalPage}}"
|
|
||||||
bind:pagingChange="onChangePage"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<empty wx:else bind:refresh="onRefresh" />
|
|
@ -1,58 +1 @@
|
|||||||
/* components/aid/index.wxss */
|
/* components/aid/index.wxss */
|
||||||
|
|
||||||
.title {
|
|
||||||
padding-top: 30rpx;
|
|
||||||
padding-left: 30rpx;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfoItem {
|
|
||||||
padding: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfoItem .content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1rpx solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo {
|
|
||||||
height: 200rpx;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userLevel {
|
|
||||||
margin-left: 30rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.synopsis {
|
|
||||||
height: 80rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
.connect {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userName {
|
|
||||||
width: 150rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userLevel {
|
|
||||||
width: 250rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
// components/discountCoupon/index.js
|
|
||||||
Component({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件的属性列表
|
|
||||||
*/
|
|
||||||
properties: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件的方法列表
|
|
||||||
*/
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"component": true,
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
<!--components/discountCoupon/index.wxml-->
|
|
||||||
<text>components/discountCoupon/index.wxml</text>
|
|
@ -1 +0,0 @@
|
|||||||
/* components/discountCoupon/index.wxss */
|
|
@ -1,117 +0,0 @@
|
|||||||
import { askAid } from "../../../service/system";
|
|
||||||
import dayjs from "../../../utils/dayjs";
|
|
||||||
import { alertInfo, alertSuccess, isValidPhoneNumber, loadingFunc } from "../../../utils/index";
|
|
||||||
import request from '../../../utils/request'
|
|
||||||
const { OK } = request
|
|
||||||
|
|
||||||
// pages/aid/consult/index.js
|
|
||||||
Page({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
form: {}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
|
||||||
const { id, type } = options;
|
|
||||||
this.setData({ type: Number(type), id });
|
|
||||||
},
|
|
||||||
onChange(e) {
|
|
||||||
const data = e.detail;
|
|
||||||
const { name } = e.currentTarget.dataset
|
|
||||||
const { form } = this.data;
|
|
||||||
form[name] = data;
|
|
||||||
this.setData({
|
|
||||||
form,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
wx.navigateBack()
|
|
||||||
},
|
|
||||||
async submit() {
|
|
||||||
const { form } = this.data;
|
|
||||||
const { name, phone, detail } = form;
|
|
||||||
if (!name) {
|
|
||||||
alertInfo("请输入名字")
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!phone) {
|
|
||||||
alertInfo("请输入手机号")
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (phone && !isValidPhoneNumber(phone)) {
|
|
||||||
alertInfo("手机号格式不正确")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!detail) {
|
|
||||||
alertInfo("请输入详情")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const that = this;
|
|
||||||
loadingFunc(async () => {
|
|
||||||
const { type, id } = that.data;
|
|
||||||
const { code, message } = await askAid({ ...form, type, createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), connectId: id })
|
|
||||||
if (code !== OK) {
|
|
||||||
alertInfo(message)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
alertSuccess("创建成功")
|
|
||||||
setTimeout(() => {
|
|
||||||
wx.navigateBack();
|
|
||||||
}, 500)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {
|
|
||||||
"navigator": "/components/navigator/index",
|
|
||||||
"van-field": "@vant/weapp/field/index",
|
|
||||||
"van-button": "@vant/weapp/button/index"
|
|
||||||
},
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
<!--pages/aid/consult/index.wxml-->
|
|
||||||
<navigator title="填写咨询信息" canBack="{{true}}" />
|
|
||||||
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field
|
|
||||||
value="{{form.name}}"
|
|
||||||
label="名字"
|
|
||||||
placeholder="请输入名字"
|
|
||||||
bind:change="onChange"
|
|
||||||
data-name="name"
|
|
||||||
title-width="140rpx"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{form.phone}}"
|
|
||||||
label="手机号"
|
|
||||||
bind:change="onChange"
|
|
||||||
data-name="phone"
|
|
||||||
placeholder="请输入手机号"
|
|
||||||
required
|
|
||||||
title-width="140rpx"
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{form.email}}"
|
|
||||||
label="邮箱"
|
|
||||||
bind:change="onChange"
|
|
||||||
data-name="email"
|
|
||||||
placeholder="请输入邮箱"
|
|
||||||
title-width="140rpx"
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{form.detail}}"
|
|
||||||
label="咨询内容"
|
|
||||||
bind:change="onChange"
|
|
||||||
data-name="detail"
|
|
||||||
required
|
|
||||||
type="textarea"
|
|
||||||
autosize="{{true}}"
|
|
||||||
placeholder="请输入咨询内容"
|
|
||||||
title-width="140rpx"
|
|
||||||
/>
|
|
||||||
<view style="margin-top: 20rpx; margin-left: 30rpx;">
|
|
||||||
<mp-html content="{{detail.detail}}" />
|
|
||||||
</view>
|
|
||||||
</van-cell-group>
|
|
||||||
|
|
||||||
<view class="submit">
|
|
||||||
<van-button block class="cancelEdit" bind:click="back">返回</van-button>
|
|
||||||
<van-button type="info" block class="save" bind:click="submit">保存</van-button>
|
|
||||||
</view>
|
|
@ -1,17 +0,0 @@
|
|||||||
/* pages/aid/consult/index.wxss */
|
|
||||||
|
|
||||||
.submit {
|
|
||||||
margin: 40rpx;
|
|
||||||
margin-bottom: 50rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.cancelEdit, .save {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cancelEdit {
|
|
||||||
margin-right: 40rpx;
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
import { getAidDetail } from "../../../service/system";
|
|
||||||
import { alertInfo, loadingFunc } from "../../../utils/index";
|
|
||||||
import request from "../../../utils/request"
|
|
||||||
const { OK } = request;
|
|
||||||
// pages/aid/detail/index.js
|
|
||||||
Page({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
detail: {},
|
|
||||||
id: "",
|
|
||||||
type: undefined,
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
|
||||||
const that = this;
|
|
||||||
const { type, id } = options;
|
|
||||||
this.setData({ type, id }, () => {
|
|
||||||
loadingFunc(async () => {
|
|
||||||
that.init();
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
|
||||||
async init() {
|
|
||||||
const { id, type } = this.data;
|
|
||||||
const { code, message, data = {} } = await getAidDetail(id);
|
|
||||||
if (code !== OK) {
|
|
||||||
alertInfo(message)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.setData({
|
|
||||||
detail: data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
connect() {
|
|
||||||
const { type, id } = this.data;
|
|
||||||
wx.navigateTo({
|
|
||||||
url: `/pages/aid/consult/index?type=${type}&id=${id}`,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {
|
|
||||||
"aid": "/components/aid/index",
|
|
||||||
"navigator": "/components/navigator/index",
|
|
||||||
"mp-html": "/components/mp-html/index",
|
|
||||||
"van-field": "@vant/weapp/field/index",
|
|
||||||
"van-button": "@vant/weapp/button/index"
|
|
||||||
},
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
<!--pages/aid/detail/index.wxml-->
|
|
||||||
<navigator title="详情" canBack="{{true}}" />
|
|
||||||
|
|
||||||
<van-cell-group>
|
|
||||||
<van-field
|
|
||||||
value="{{detail.name}}"
|
|
||||||
label="名字"
|
|
||||||
readonly
|
|
||||||
autosize="{{true}}"
|
|
||||||
type="textarea"
|
|
||||||
border="{{ false }}"
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{detail.level}}"
|
|
||||||
label="职称"
|
|
||||||
readonly
|
|
||||||
autosize="{{true}}"
|
|
||||||
type="textarea"
|
|
||||||
border="{{ false }}"
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{detail.company}}"
|
|
||||||
label="所在单位"
|
|
||||||
readonly
|
|
||||||
autosize="{{true}}"
|
|
||||||
type="textarea"
|
|
||||||
border="{{ false }}"
|
|
||||||
/>
|
|
||||||
<van-field
|
|
||||||
value="{{detail.synopsis}}"
|
|
||||||
label="简介"
|
|
||||||
readonly
|
|
||||||
autosize="{{true}}"
|
|
||||||
type="textarea"
|
|
||||||
border="{{ false }}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<van-field
|
|
||||||
use-input-slot
|
|
||||||
label="详细"
|
|
||||||
readonly
|
|
||||||
border="{{ false }}"
|
|
||||||
>
|
|
||||||
|
|
||||||
</van-field>
|
|
||||||
<view style="margin-top: 20rpx; margin-left: 30rpx;">
|
|
||||||
<mp-html content="{{detail.detail}}" />
|
|
||||||
</view>
|
|
||||||
</van-cell-group>
|
|
||||||
<view style="margin-top: 40rpx;margin-left: 30rpx;margin-bottom: 30rpx;margin-right: 30rpx;">
|
|
||||||
<van-button type="info" block class="save" bind:click="connect">去联系</van-button>
|
|
||||||
</view>
|
|
@ -1 +0,0 @@
|
|||||||
/* pages/aid/detail/index.wxss */
|
|
@ -1,7 +1,3 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {}
|
||||||
"aid": "/components/aid/index",
|
|
||||||
"navigator": "/components/navigator/index"
|
|
||||||
},
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
}
|
@ -1,3 +1,2 @@
|
|||||||
<!--pages/aid/finance/index.wxml-->
|
<!--pages/aid/finance/index.wxml-->
|
||||||
<navigator title="财税援助" canBack="{{true}}" />
|
<text>pages/aid/finance/index.wxml</text>
|
||||||
<aid bannerType="{{2}}" type="{{1}}" />
|
|
@ -1,7 +1,3 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {}
|
||||||
"aid": "/components/aid/index",
|
|
||||||
"navigator": "/components/navigator/index"
|
|
||||||
},
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
}
|
@ -1,3 +1,2 @@
|
|||||||
<!--pages/aid/law/index.wxml-->
|
<!--pages/aid/law/index.wxml-->
|
||||||
<navigator title="法律援助" canBack="{{true}}" />
|
<text>pages/aid/law/index.wxml</text>
|
||||||
<aid bannerType="{{3}}" type="{{2}}" />
|
|
@ -1,10 +1,8 @@
|
|||||||
import { getBannerList } from "../../service/system"
|
import { getBannerList } from "../../../../service/system"
|
||||||
import { alertInfo } from "../../utils/index";
|
import { alertInfo } from "../../../../utils/index";
|
||||||
import request from '../../utils/request'
|
import request from '../../../../utils/request'
|
||||||
|
|
||||||
const { OK } = request;
|
const { OK } = request;
|
||||||
const result = wx.getAccountInfoSync();
|
|
||||||
const { envVersion } = result.miniProgram;
|
|
||||||
|
|
||||||
// pages/home/components/home-swiper/index.js
|
// pages/home/components/home-swiper/index.js
|
||||||
Component({
|
Component({
|
||||||
@ -14,14 +12,10 @@ Component({
|
|||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
park: String,
|
park: String,
|
||||||
type: Number,
|
|
||||||
},
|
},
|
||||||
observers: {
|
observers: {
|
||||||
'park,type': function(newPark, newType) {
|
'park': function(newValue) {
|
||||||
if ((!newPark && newType === 0) || (!newType && newType !== 0)) {
|
this.init(newValue)
|
||||||
return
|
|
||||||
}
|
|
||||||
this.init(newPark, newType)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -30,8 +24,8 @@ Component({
|
|||||||
data: {
|
data: {
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
vertical: false,
|
vertical: false,
|
||||||
autoplay: true,
|
autoplay: false,
|
||||||
interval: 6000,
|
interval: 2000,
|
||||||
duration: 500,
|
duration: 500,
|
||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
@ -39,11 +33,11 @@ Component({
|
|||||||
* 组件的方法列表
|
* 组件的方法列表
|
||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
async init(park, type) {
|
async init(park) {
|
||||||
const { code, message, data = [] } = await getBannerList(park, type);
|
const { code, message, data = [] } = await getBannerList(park, 1);
|
||||||
if (code !== OK) {
|
if (code !== OK) {
|
||||||
alertInfo(message);
|
alertInfo(message);
|
||||||
this.setData({ list: [], park, type })
|
this.setData({ list: [] })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setData({ list: data })
|
this.setData({ list: data })
|
||||||
@ -53,9 +47,9 @@ Component({
|
|||||||
switch(data.jumpType) {
|
switch(data.jumpType) {
|
||||||
case 1:
|
case 1:
|
||||||
wx.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
appId: data.appid,
|
appId: data.appId,
|
||||||
path: data.wxPath,
|
path: data.wxPath,
|
||||||
envVersion: envVersion
|
envVersion: "trial"
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
@ -1,14 +1,12 @@
|
|||||||
<!--pages/home/components/home-swiper/index.wxml-->
|
<!--pages/home/components/home-swiper/index.wxml-->
|
||||||
<swiper
|
<swiper
|
||||||
indicator-dots="{{list.length > 1}}"
|
indicator-dots="{{indicatorDots}}"
|
||||||
autoplay="{{autoplay}}"
|
autoplay="{{autoplay}}"
|
||||||
interval="{{interval}}"
|
interval="{{interval}}"
|
||||||
duration="{{duration}}"
|
duration="{{duration}}"
|
||||||
circular="{{true}}"
|
|
||||||
wx:if="{{list.length}}"
|
wx:if="{{list.length}}"
|
||||||
style="height: 288rpx"
|
|
||||||
>
|
>
|
||||||
<block wx:for="{{list}}" wx:key="id" wx:item="item">
|
<block wx:for="{{list}}" wx:key="{{item.id}}" wx:item="item">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<van-image
|
<van-image
|
||||||
width="100%"
|
width="100%"
|
@ -10,7 +10,7 @@
|
|||||||
"van-grid": "@vant/weapp/grid/index",
|
"van-grid": "@vant/weapp/grid/index",
|
||||||
"van-grid-item": "@vant/weapp/grid-item/index",
|
"van-grid-item": "@vant/weapp/grid-item/index",
|
||||||
"van-action-sheet": "@vant/weapp/action-sheet/index",
|
"van-action-sheet": "@vant/weapp/action-sheet/index",
|
||||||
"banner": "/components/banner/index"
|
"home-swiper": "./components/home-swiper/index"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
<!-- <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view> -->
|
<!-- <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<banner type="{{1}}" wx:if="{{park.id}}" park="{{park.id}}" />
|
<home-swiper wx:if="{{park.id}}" park="{{park.id}}" />
|
||||||
<view class="rechargeWrapper">
|
<view class="rechargeWrapper">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="cardTop">
|
<view class="cardTop">
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
height: 46px;
|
height: 46px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 24rpx;
|
padding: 0 32rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
.notLoginWrapper, .logined {
|
.notLoginWrapper, .logined {
|
||||||
padding: 16rpx 32rpx;
|
padding: 16rpx 32rpx;
|
||||||
padding-left: 28rpx;
|
padding-left: 50rpx;
|
||||||
background-color: var(--middle-green);
|
background-color: var(--middle-green);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -67,9 +67,9 @@
|
|||||||
|
|
||||||
.card {
|
.card {
|
||||||
margin-top: 0rpx;
|
margin-top: 0rpx;
|
||||||
margin-left: 24rpx;
|
margin-left: 46rpx;
|
||||||
margin-right: 24rpx;
|
margin-right: 46rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 30rpx;
|
||||||
padding: 22rpx 30rpx;
|
padding: 22rpx 30rpx;
|
||||||
/* background-color: rgb(173, 217, 203); */
|
/* background-color: rgb(173, 217, 203); */
|
||||||
background: linear-gradient(to bottom right, rgb(212, 240, 231), rgb(145, 206, 185));
|
background: linear-gradient(to bottom right, rgb(212, 240, 231), rgb(145, 206, 185));
|
||||||
@ -116,10 +116,10 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
margin-left: 24rpx;
|
margin-left: 46rpx;
|
||||||
margin-right: 24rpx;
|
margin-right: 46rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.operate {
|
.operate {
|
||||||
@ -159,10 +159,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.others {
|
.others {
|
||||||
margin-left: 24rpx;
|
margin-left: 46rpx;
|
||||||
margin-right: 24rpx;
|
margin-right: 46rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
border-radius: 16rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
@ -13,7 +13,6 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
user: {},
|
user: {},
|
||||||
tenement: {},
|
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -63,8 +62,6 @@ Page({
|
|||||||
}
|
}
|
||||||
this.init()
|
this.init()
|
||||||
this.getUnReadNumber()
|
this.getUnReadNumber()
|
||||||
const tenement = wx.getStorageSync('tenement')
|
|
||||||
this.setData({ tenement })
|
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
const tenement = wx.getStorageSync('tenement')
|
const tenement = wx.getStorageSync('tenement')
|
||||||
@ -134,15 +131,5 @@ Page({
|
|||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/aid/finance/index',
|
url: '/pages/aid/finance/index',
|
||||||
})
|
})
|
||||||
},
|
|
||||||
jumpToLaw() {
|
|
||||||
wx.navigateTo({
|
|
||||||
url: '/pages/aid/law/index',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
jumpToEncyclopedia() {
|
|
||||||
wx.navigateTo({
|
|
||||||
url: '/pages/encyclopedia/index',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -7,7 +7,6 @@
|
|||||||
"dot": "/components/dot/index",
|
"dot": "/components/dot/index",
|
||||||
"navigator": "/components/navigator/index",
|
"navigator": "/components/navigator/index",
|
||||||
"van-grid": "@vant/weapp/grid/index",
|
"van-grid": "@vant/weapp/grid/index",
|
||||||
"avatar": "/components/avatar/index",
|
|
||||||
"van-grid-item": "@vant/weapp/grid-item/index"
|
"van-grid-item": "@vant/weapp/grid-item/index"
|
||||||
},
|
},
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的",
|
||||||
|
@ -1,41 +1,25 @@
|
|||||||
<!--pages/my/index.wxml-->
|
<!--pages/my/index.wxml-->
|
||||||
|
|
||||||
<navigator title="我的" />
|
<navigator title="我的" />
|
||||||
|
<van-grid column-num="3">
|
||||||
<view class="pageWrapper">
|
<van-grid-item icon="friends-o" text="财税援助" bind:click="jumpToFinance" />
|
||||||
<view class="userInfo">
|
<van-grid-item icon="envelop-o" text="法律援助" />
|
||||||
<avatar text="{{ user.nickName }}" />
|
<van-grid-item icon="notes-o" text="电力百科" />
|
||||||
<view class="info">
|
</van-grid>
|
||||||
<view class="nickName"> {{ user.nickName }} </view>
|
<van-cell title="联系客服" value="" is-link bind:tap="connect" />
|
||||||
<view class="tenement"> {{ tenement.name }} </view>
|
<van-cell wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" />
|
||||||
<view class="integration"> 积分: - </view>
|
<van-cell wx:if="{{!!user.isAdmin}}" is-link bind:click="jumpToMember">
|
||||||
|
<view slot="title">
|
||||||
|
<view class="cellWrapper">
|
||||||
|
<view class="text"> 成员管理 </view>
|
||||||
|
<dot wx:if="{{dot > 0}}" number="{{dot}}" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-bottom: 20rpx;border-radius: 16rpx; overflow: hidden;">
|
</van-cell>
|
||||||
<van-grid column-num="3">
|
<van-cell title="发票抬头" value="" is-link bind:tap="jumpToUpdateInvoice" />
|
||||||
<van-grid-item icon="friends-o" text="财税援助" bind:click="jumpToFinance" />
|
<van-cell title="绑定企业" value="" is-link bind:tap="bindTenement" />
|
||||||
<van-grid-item icon="envelop-o" text="法律援助" bind:click="jumpToLaw" />
|
<van-cell title="常见问题" value="" is-link bind:tap="jumpToQuestions" />
|
||||||
<van-grid-item icon="notes-o" text="电力百科" bind:click="jumpToEncyclopedia" />
|
<van-cell title="工作台" wx:if="{{user.workStatus}}" value="" is-link bind:tap="jumpToWorkBench" />
|
||||||
</van-grid>
|
<van-cell title="退出登录" value="" is-link bind:tap="logout" />
|
||||||
</view>
|
|
||||||
<view style="border-radius: 16rpx; overflow: hidden;">
|
|
||||||
<van-cell title="联系客服" value="" is-link bind:tap="connect" icon="service-o" />
|
|
||||||
<van-cell icon="qr" wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" />
|
|
||||||
<van-cell icon="friends-o" wx:if="{{!!user.isAdmin}}" is-link bind:click="jumpToMember">
|
|
||||||
<view slot="title">
|
|
||||||
<view class="cellWrapper">
|
|
||||||
<view class="text"> 成员管理 </view>
|
|
||||||
<dot wx:if="{{dot > 0}}" number="{{dot}}" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</van-cell>
|
|
||||||
<van-cell title="发票抬头" icon="discount-o" value="" is-link bind:tap="jumpToUpdateInvoice">
|
|
||||||
</van-cell>
|
|
||||||
<van-cell title="绑定企业" icon="exchange" value="" is-link bind:tap="bindTenement" />
|
|
||||||
<van-cell title="常见问题" icon="question-o" value="" is-link bind:tap="jumpToQuestions" />
|
|
||||||
<van-cell title="工作台" icon="records-o" wx:if="{{user.workStatus}}" value="" is-link bind:tap="jumpToWorkBench" />
|
|
||||||
<van-cell title="退出登录" icon="revoke" value="" is-link bind:tap="logout" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<van-dialog id="van-dialog" />
|
<van-dialog id="van-dialog" />
|
||||||
</view>
|
|
@ -4,39 +4,3 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pageWrapper {
|
|
||||||
padding: 24rpx;
|
|
||||||
min-height: 80vh;
|
|
||||||
background: linear-gradient(to bottom, var(--middle-green), #fff );
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 24rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo .info {
|
|
||||||
margin-left: 30rpx;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo .info .nickName {
|
|
||||||
font-size: 34rpx;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
.userInfo .info .tenement {
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 6rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.integration {
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 6rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -10,20 +10,6 @@
|
|||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
|
||||||
"name": "pages/aid/consult/index",
|
|
||||||
"pathName": "pages/aid/consult/index",
|
|
||||||
"query": "",
|
|
||||||
"launchMode": "default",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pages/aid/law/index",
|
|
||||||
"pathName": "pages/aid/law/index",
|
|
||||||
"query": "",
|
|
||||||
"launchMode": "default",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "pages/my/index",
|
"name": "pages/my/index",
|
||||||
"pathName": "pages/my/index",
|
"pathName": "pages/my/index",
|
||||||
|
@ -51,22 +51,7 @@ export const getEncyclopediaDetail = async function(id) {
|
|||||||
return await GET(`/wx/getEncyclopediaDetail/${id}`);
|
return await GET(`/wx/getEncyclopediaDetail/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取banner列表
|
// 获取分类列表
|
||||||
export const getBannerList = async function(park = "", address = "") {
|
export const getBannerList = async function(park = "", address = "") {
|
||||||
return await GET(`/wx/getBannerList?park=${park}&address=${address}`);
|
return await GET(`/wx/getBannerList?park=${park}&address=${address}`);
|
||||||
}
|
|
||||||
|
|
||||||
// 获取财务/律师援助列表
|
|
||||||
export const getAidList = async function(page = 1, size = 10, type = 0) {
|
|
||||||
return await GET(`/aid/getList?page=${page}&size=${size}&type=${type}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取财务/律师援助详情
|
|
||||||
export const getAidDetail = async function(id) {
|
|
||||||
return await GET(`/aid/detail/${id}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提交财务/律师援助
|
|
||||||
export const askAid = async function(data) {
|
|
||||||
return await POST(`/wx/aid/approve`, data);
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user