暂存我的页面修改
This commit is contained in:
67
pages/aid/consult/index.js
Normal file
67
pages/aid/consult/index.js
Normal file
@@ -0,0 +1,67 @@
|
||||
// pages/aid/consult/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
form: {}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const { type } = options;
|
||||
this.setData({ type });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
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"
|
||||
}
|
51
pages/aid/consult/index.wxml
Normal file
51
pages/aid/consult/index.wxml
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--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.name}}"
|
||||
label="手机号"
|
||||
bind:change="onChange"
|
||||
data-name="phone"
|
||||
placeholder="请输入手机号"
|
||||
required
|
||||
title-width="140rpx"
|
||||
/>
|
||||
<van-field
|
||||
value="{{form.email}}"
|
||||
label="邮箱"
|
||||
bind:change="onChange"
|
||||
data-name="email"
|
||||
required
|
||||
placeholder="请输入邮箱"
|
||||
title-width="140rpx"
|
||||
/>
|
||||
<van-field
|
||||
value="{{form.detail}}"
|
||||
label="咨询内容"
|
||||
bind:change="onChange"
|
||||
data-name="email"
|
||||
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" wx:if="{{editType === 'edit'}}">
|
||||
<van-button block class="cancelEdit" bind:click="cancelEdit">取消编辑</van-button>
|
||||
<van-button type="info" block class="save" bind:click="submit">保存</van-button>
|
||||
</view>
|
8
pages/aid/consult/index.wxss
Normal file
8
pages/aid/consult/index.wxss
Normal file
@@ -0,0 +1,8 @@
|
||||
/* pages/aid/consult/index.wxss */
|
||||
|
||||
.submit {
|
||||
margin: 32rpx;
|
||||
margin-bottom: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
87
pages/aid/detail/index.js
Normal file
87
pages/aid/detail/index.js
Normal file
@@ -0,0 +1,87 @@
|
||||
import { getAidDetail } from "../../../service/system";
|
||||
import { alertInfo } 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 }, () => {
|
||||
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
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
9
pages/aid/detail/index.json
Normal file
9
pages/aid/detail/index.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"aid": "/components/aid/index",
|
||||
"navigator": "/components/navigator/index",
|
||||
"mp-html": "/components/mp-html/index",
|
||||
"van-field": "@vant/weapp/field/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
42
pages/aid/detail/index.wxml
Normal file
42
pages/aid/detail/index.wxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--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.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>
|
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-->
|
||||
<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-->
|
||||
<text>pages/aid/law/index.wxml</text>
|
||||
<navigator title="法律援助" canBack="{{true}}" />
|
||||
<aid bannerType="{{3}}" type="{{2}}" />
|
Reference in New Issue
Block a user