暂存我的页面修改
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}}" />
|
@@ -1,68 +0,0 @@
|
||||
import { getBannerList } from "../../../../service/system"
|
||||
import { alertInfo } from "../../../../utils/index";
|
||||
import request from '../../../../utils/request'
|
||||
|
||||
const { OK } = request;
|
||||
|
||||
// pages/home/components/home-swiper/index.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
park: String,
|
||||
},
|
||||
observers: {
|
||||
'park': function(newValue) {
|
||||
this.init(newValue)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
indicatorDots: true,
|
||||
vertical: false,
|
||||
autoplay: false,
|
||||
interval: 2000,
|
||||
duration: 500,
|
||||
list: [],
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
async init(park) {
|
||||
const { code, message, data = [] } = await getBannerList(park, 1);
|
||||
if (code !== OK) {
|
||||
alertInfo(message);
|
||||
this.setData({ list: [] })
|
||||
return
|
||||
}
|
||||
this.setData({ list: data })
|
||||
},
|
||||
handleJump(e) {
|
||||
const { data = {} } = e.currentTarget.dataset;
|
||||
switch(data.jumpType) {
|
||||
case 1:
|
||||
wx.navigateToMiniProgram({
|
||||
appId: data.appId,
|
||||
path: data.wxPath,
|
||||
envVersion: "trial"
|
||||
})
|
||||
break;
|
||||
case 2:
|
||||
wx.navigateTo({
|
||||
url: data.value,
|
||||
})
|
||||
break;
|
||||
case 3:
|
||||
wx.navigateTo({
|
||||
url: '/pages/webPage/index?path=' + data.value,
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"van-image": "@vant/weapp/image/index"
|
||||
}
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
<!--pages/home/components/home-swiper/index.wxml-->
|
||||
<swiper
|
||||
indicator-dots="{{indicatorDots}}"
|
||||
autoplay="{{autoplay}}"
|
||||
interval="{{interval}}"
|
||||
duration="{{duration}}"
|
||||
wx:if="{{list.length}}"
|
||||
>
|
||||
<block wx:for="{{list}}" wx:key="{{item.id}}" wx:item="item">
|
||||
<swiper-item>
|
||||
<van-image
|
||||
width="100%"
|
||||
height="100%"
|
||||
lazy-load
|
||||
src="{{item.url}}"
|
||||
data-data="{{item}}"
|
||||
bind:click="handleJump"
|
||||
/>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
@@ -1 +0,0 @@
|
||||
/* pages/home/components/home-swiper/index.wxss */
|
@@ -10,7 +10,7 @@
|
||||
"van-grid": "@vant/weapp/grid/index",
|
||||
"van-grid-item": "@vant/weapp/grid-item/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index",
|
||||
"home-swiper": "./components/home-swiper/index"
|
||||
"banner": "/components/banner/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
@@ -33,7 +33,7 @@
|
||||
<!-- <view class="welcome"> 欢迎使用华昌宝能用电管理系统! </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="card">
|
||||
<view class="cardTop">
|
||||
|
Reference in New Issue
Block a user