Compare commits
4 Commits
7bbe58a0d0
...
f6d44a6d33
Author | SHA1 | Date | |
---|---|---|---|
f6d44a6d33 | |||
a164ec227b | |||
3ad21ea708 | |||
520f44a25f |
4
app.json
4
app.json
@ -25,7 +25,9 @@
|
|||||||
"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,3 +1,9 @@
|
|||||||
|
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({
|
||||||
|
|
||||||
@ -5,20 +11,79 @@ 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,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
"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,2 +1,34 @@
|
|||||||
<!--components/aid/index.wxml-->
|
<!--components/aid/index.wxml-->
|
||||||
<text>components/aid/index.wxml</text>
|
<Banner park="{{park.id}}" type="{{bannerType}}" />
|
||||||
|
<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 +1,58 @@
|
|||||||
/* 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,8 +1,10 @@
|
|||||||
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({
|
||||||
@ -12,10 +14,14 @@ Component({
|
|||||||
*/
|
*/
|
||||||
properties: {
|
properties: {
|
||||||
park: String,
|
park: String,
|
||||||
|
type: Number,
|
||||||
},
|
},
|
||||||
observers: {
|
observers: {
|
||||||
'park': function(newValue) {
|
'park,type': function(newPark, newType) {
|
||||||
this.init(newValue)
|
if ((!newPark && newType === 0) || (!newType && newType !== 0)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.init(newPark, newType)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -24,8 +30,8 @@ Component({
|
|||||||
data: {
|
data: {
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
vertical: false,
|
vertical: false,
|
||||||
autoplay: false,
|
autoplay: true,
|
||||||
interval: 2000,
|
interval: 6000,
|
||||||
duration: 500,
|
duration: 500,
|
||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
@ -33,11 +39,11 @@ Component({
|
|||||||
* 组件的方法列表
|
* 组件的方法列表
|
||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
async init(park) {
|
async init(park, type) {
|
||||||
const { code, message, data = [] } = await getBannerList(park, 1);
|
const { code, message, data = [] } = await getBannerList(park, type);
|
||||||
if (code !== OK) {
|
if (code !== OK) {
|
||||||
alertInfo(message);
|
alertInfo(message);
|
||||||
this.setData({ list: [] })
|
this.setData({ list: [], park, type })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.setData({ list: data })
|
this.setData({ list: data })
|
||||||
@ -47,9 +53,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: "trial"
|
envVersion: envVersion
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
@ -1,12 +1,14 @@
|
|||||||
<!--pages/home/components/home-swiper/index.wxml-->
|
<!--pages/home/components/home-swiper/index.wxml-->
|
||||||
<swiper
|
<swiper
|
||||||
indicator-dots="{{indicatorDots}}"
|
indicator-dots="{{list.length > 1}}"
|
||||||
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="{{item.id}}" wx:item="item">
|
<block wx:for="{{list}}" wx:key="id" wx:item="item">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<van-image
|
<van-image
|
||||||
width="100%"
|
width="100%"
|
24
components/discountCoupon/index.js
Normal file
24
components/discountCoupon/index.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// components/discountCoupon/index.js
|
||||||
|
Component({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
4
components/discountCoupon/index.json
Normal file
4
components/discountCoupon/index.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
2
components/discountCoupon/index.wxml
Normal file
2
components/discountCoupon/index.wxml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<!--components/discountCoupon/index.wxml-->
|
||||||
|
<text>components/discountCoupon/index.wxml</text>
|
1
components/discountCoupon/index.wxss
Normal file
1
components/discountCoupon/index.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* components/discountCoupon/index.wxss */
|
117
pages/aid/consult/index.js
Normal file
117
pages/aid/consult/index.js
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
8
pages/aid/consult/index.json
Normal file
8
pages/aid/consult/index.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {
|
||||||
|
"navigator": "/components/navigator/index",
|
||||||
|
"van-field": "@vant/weapp/field/index",
|
||||||
|
"van-button": "@vant/weapp/button/index"
|
||||||
|
},
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
50
pages/aid/consult/index.wxml
Normal file
50
pages/aid/consult/index.wxml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<!--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>
|
17
pages/aid/consult/index.wxss
Normal file
17
pages/aid/consult/index.wxss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* pages/aid/consult/index.wxss */
|
||||||
|
|
||||||
|
.submit {
|
||||||
|
margin: 40rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cancelEdit, .save {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancelEdit {
|
||||||
|
margin-right: 40rpx;
|
||||||
|
}
|
95
pages/aid/detail/index.js
Normal file
95
pages/aid/detail/index.js
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
10
pages/aid/detail/index.json
Normal file
10
pages/aid/detail/index.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
53
pages/aid/detail/index.wxml
Normal file
53
pages/aid/detail/index.wxml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<!--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
pages/aid/detail/index.wxss
Normal file
1
pages/aid/detail/index.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
/* pages/aid/detail/index.wxss */
|
@ -1,3 +1,7 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {
|
||||||
|
"aid": "/components/aid/index",
|
||||||
|
"navigator": "/components/navigator/index"
|
||||||
|
},
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
@ -1,2 +1,3 @@
|
|||||||
<!--pages/aid/finance/index.wxml-->
|
<!--pages/aid/finance/index.wxml-->
|
||||||
<text>pages/aid/finance/index.wxml</text>
|
<navigator title="财税援助" canBack="{{true}}" />
|
||||||
|
<aid bannerType="{{2}}" type="{{1}}" />
|
@ -1,3 +1,7 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {}
|
"usingComponents": {
|
||||||
|
"aid": "/components/aid/index",
|
||||||
|
"navigator": "/components/navigator/index"
|
||||||
|
},
|
||||||
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
@ -1,2 +1,3 @@
|
|||||||
<!--pages/aid/law/index.wxml-->
|
<!--pages/aid/law/index.wxml-->
|
||||||
<text>pages/aid/law/index.wxml</text>
|
<navigator title="法律援助" canBack="{{true}}" />
|
||||||
|
<aid bannerType="{{3}}" type="{{2}}" />
|
@ -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",
|
||||||
"home-swiper": "./components/home-swiper/index"
|
"banner": "/components/banner/index"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
<!-- <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view> -->
|
<!-- <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<home-swiper wx:if="{{park.id}}" park="{{park.id}}" />
|
<banner type="{{1}}" 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 32rpx;
|
padding: 0 24rpx;
|
||||||
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: 50rpx;
|
padding-left: 28rpx;
|
||||||
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: 46rpx;
|
margin-left: 24rpx;
|
||||||
margin-right: 46rpx;
|
margin-right: 24rpx;
|
||||||
border-radius: 30rpx;
|
border-radius: 16rpx;
|
||||||
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: 46rpx;
|
margin-left: 24rpx;
|
||||||
margin-right: 46rpx;
|
margin-right: 24rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
border-radius: 30rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.operate {
|
.operate {
|
||||||
@ -159,8 +159,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.others {
|
.others {
|
||||||
margin-left: 46rpx;
|
margin-left: 24rpx;
|
||||||
margin-right: 46rpx;
|
margin-right: 24rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
margin-bottom: 40rpx;
|
margin-bottom: 40rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
user: {},
|
user: {},
|
||||||
|
tenement: {},
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -62,6 +63,8 @@ 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')
|
||||||
@ -131,5 +134,15 @@ 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,6 +7,7 @@
|
|||||||
"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,25 +1,41 @@
|
|||||||
<!--pages/my/index.wxml-->
|
<!--pages/my/index.wxml-->
|
||||||
|
|
||||||
<navigator title="我的" />
|
<navigator title="我的" />
|
||||||
<van-grid column-num="3">
|
|
||||||
<van-grid-item icon="friends-o" text="财税援助" bind:click="jumpToFinance" />
|
<view class="pageWrapper">
|
||||||
<van-grid-item icon="envelop-o" text="法律援助" />
|
<view class="userInfo">
|
||||||
<van-grid-item icon="notes-o" text="电力百科" />
|
<avatar text="{{ user.nickName }}" />
|
||||||
</van-grid>
|
<view class="info">
|
||||||
<van-cell title="联系客服" value="" is-link bind:tap="connect" />
|
<view class="nickName"> {{ user.nickName }} </view>
|
||||||
<van-cell wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" />
|
<view class="tenement"> {{ tenement.name }} </view>
|
||||||
<van-cell wx:if="{{!!user.isAdmin}}" is-link bind:click="jumpToMember">
|
<view class="integration"> 积分: - </view>
|
||||||
<view slot="title">
|
|
||||||
<view class="cellWrapper">
|
|
||||||
<view class="text"> 成员管理 </view>
|
|
||||||
<dot wx:if="{{dot > 0}}" number="{{dot}}" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</van-cell>
|
<view style="margin-bottom: 20rpx;border-radius: 16rpx; overflow: hidden;">
|
||||||
<van-cell title="发票抬头" value="" is-link bind:tap="jumpToUpdateInvoice" />
|
<van-grid column-num="3">
|
||||||
<van-cell title="绑定企业" value="" is-link bind:tap="bindTenement" />
|
<van-grid-item icon="friends-o" text="财税援助" bind:click="jumpToFinance" />
|
||||||
<van-cell title="常见问题" value="" is-link bind:tap="jumpToQuestions" />
|
<van-grid-item icon="envelop-o" text="法律援助" bind:click="jumpToLaw" />
|
||||||
<van-cell title="工作台" wx:if="{{user.workStatus}}" value="" is-link bind:tap="jumpToWorkBench" />
|
<van-grid-item icon="notes-o" text="电力百科" bind:click="jumpToEncyclopedia" />
|
||||||
<van-cell title="退出登录" value="" is-link bind:tap="logout" />
|
</van-grid>
|
||||||
|
</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,3 +4,39 @@
|
|||||||
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,6 +10,20 @@
|
|||||||
"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,7 +51,22 @@ 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