flat: 3.4
This commit is contained in:
16
api/content.js
Normal file
16
api/content.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import {
|
||||||
|
request
|
||||||
|
} from '@/untils/AxiosUtils.js';
|
||||||
|
|
||||||
|
//轮播图
|
||||||
|
export const getConsultMailboxInfo = (type) => request({
|
||||||
|
url: '/api/jobslink-api/content/consultMailboxInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const consultMailboxInfoQueryById = (params) => request({
|
||||||
|
url: 'api/jobslink-api/content/consultMailboxInfo/queryById',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
|
||||||
101
pageMy/setUserBase/mailbox.vue
Normal file
101
pageMy/setUserBase/mailbox.vue
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
|
||||||
|
<view class="u-page">
|
||||||
|
<u-list
|
||||||
|
@scrolltolower="getList('add')"
|
||||||
|
>
|
||||||
|
<u-list-item
|
||||||
|
v-for="(item, index) in recordList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<u-cell @click="navTo(`/pageMy/setUserBase/subPage/mailboxDetail?id=${item.id}`)" isLink center>
|
||||||
|
<view slot="title" class="title_style pro_warp2"> {{item.consultTopic}} </view>
|
||||||
|
<view slot="label" class="label_style pro_warp2"> {{item.consultContent}} </view>
|
||||||
|
</u-cell>
|
||||||
|
</u-list-item>
|
||||||
|
</u-list>
|
||||||
|
</view>
|
||||||
|
<view class="btn_add" >
|
||||||
|
<u-button type="primary" size="large" text="添加信件" @click="addConsult"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getConsultMailboxInfo } from '@/api/content.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
recordList: [],
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
this.getList("refresh")
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
console.log('触底了')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addConsult() {
|
||||||
|
this.navTo(`/pageMy/setUserBase/subPage/mailboxDetail`)
|
||||||
|
},
|
||||||
|
async getList(type) {
|
||||||
|
if (type === "refresh") {
|
||||||
|
this.pageNumber = 1;
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
page: this.pageNumber,
|
||||||
|
size: 10,
|
||||||
|
};
|
||||||
|
if (this.status) {
|
||||||
|
}
|
||||||
|
uni.showLoading({ title: '加载中' })
|
||||||
|
let resData = await getConsultMailboxInfo({})
|
||||||
|
uni.hideLoading()
|
||||||
|
if (resData.data?.code === 200) {
|
||||||
|
const { records, total, current, size } = resData.data.data;
|
||||||
|
if (!records.length) {
|
||||||
|
return this.$Api.msg("没有更多");
|
||||||
|
}
|
||||||
|
switch (type) {
|
||||||
|
case "add":
|
||||||
|
this.recordList = [...this.recordList, ...records];
|
||||||
|
break;
|
||||||
|
case "refresh":
|
||||||
|
this.recordList = records;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
console.log(this.recordList)
|
||||||
|
this.pageNumber += 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.label_style{
|
||||||
|
width: 440rpx;
|
||||||
|
}
|
||||||
|
.title_style{
|
||||||
|
width: 400rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
.btn_add{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 110rpx;
|
||||||
|
background-color: $uni-bg-color-grey;
|
||||||
|
padding: 24rpx 24rpx calc(10px + env(safe-area-inset-bottom) / 2) 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 110rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
178
pageMy/setUserBase/subPage/mailboxDetail.vue
Normal file
178
pageMy/setUserBase/subPage/mailboxDetail.vue
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app_cotainer">
|
||||||
|
<u--form
|
||||||
|
labelPosition="left"
|
||||||
|
:model="model"
|
||||||
|
ref="uForm"
|
||||||
|
>
|
||||||
|
<u-form-item
|
||||||
|
label="咨询题目:"
|
||||||
|
prop="consultTopic"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.consultTopic" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="咨询部门:"
|
||||||
|
prop="consultDeptName"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.consultDeptName" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="咨询日期:"
|
||||||
|
prop="consultTime"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
v-if="isSeeDetail"
|
||||||
|
>
|
||||||
|
<u-datetime-picker
|
||||||
|
:show="show"
|
||||||
|
v-model="model.consultTime"
|
||||||
|
mode="date"
|
||||||
|
@cancel="show = false"
|
||||||
|
@confirm="show = false"
|
||||||
|
></u-datetime-picker>
|
||||||
|
<u-button class="picker_flag" @click="show = true">{{model.consultTime && dateFormat(model.consultTime )}}</u-button>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="咨询内容:"
|
||||||
|
prop="consultContent"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.consultContent" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<view class="reply_info" v-if="isSeeDetail">
|
||||||
|
<hr></hr>
|
||||||
|
<u-form-item
|
||||||
|
label="答复部门:"
|
||||||
|
prop="replyDeptName"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.replyDeptName" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="答复人员:"
|
||||||
|
prop="replySubmitName"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.replySubmitName" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="答复时间:"
|
||||||
|
prop="DreplyTime"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.DreplyTime" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="答复内容:"
|
||||||
|
prop="replyContent"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.replyContent" :border="isShowBorder"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<hr></hr>
|
||||||
|
<u-form-item
|
||||||
|
label="应答人:"
|
||||||
|
prop="replyName"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.replyName" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item
|
||||||
|
label="应答电话:"
|
||||||
|
prop="replyPhone"
|
||||||
|
labelWidth="80"
|
||||||
|
borderBottom
|
||||||
|
ref="item1"
|
||||||
|
>
|
||||||
|
<u--input v-model="model.replyPhone" :border="isShowBorder" ></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
</u--form>
|
||||||
|
<view class="btn_add" >
|
||||||
|
<u-button type="primary" size="large" text="发送信件" @click="addConsult"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { consultMailboxInfoQueryById } from '@/api/content.js'
|
||||||
|
import { dateFormat } from '@/untils/format.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isSeeDetail: null,
|
||||||
|
model: {},
|
||||||
|
show: false,
|
||||||
|
dateFormat
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad({ id }) {
|
||||||
|
if(id) {
|
||||||
|
this.isSeeDetail = id
|
||||||
|
this.getDetail({id})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isShowBorder() {
|
||||||
|
return this.isSeeDetail ? 'none': 'surround'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getDetail(params) {
|
||||||
|
let resData = await consultMailboxInfoQueryById(params)
|
||||||
|
if(resData.data?.code === 200){
|
||||||
|
const { data, msg } = resData.data
|
||||||
|
data.consultTime = new Date('2022-10-22').getTime()
|
||||||
|
console.log(data)
|
||||||
|
this.model = data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.app_cotainer{
|
||||||
|
padding: 24rpx;
|
||||||
|
.picker_flag{
|
||||||
|
border: 0;
|
||||||
|
height: auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.reply_info{
|
||||||
|
}
|
||||||
|
.btn_add{
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 110rpx;
|
||||||
|
background-color: $uni-bg-color-grey;
|
||||||
|
padding: 24rpx 24rpx calc(10px + env(safe-area-inset-bottom) / 2) 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 110rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
17
pages.json
17
pages.json
@@ -469,6 +469,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "setUserBase/mailbox",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "信箱列表",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "setUserBase/subPage/mailboxDetail",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "信件详情",
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
|
"enablePullDownRefresh" : true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "apply/rights",
|
"path": "apply/rights",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
认证信息
|
认证信息
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="btnList" @click="go('')">
|
<view class="btnList" @click="navTo('/pageMy/setUserBase/mailbox')">
|
||||||
<image src="../../static/img/evaluate.png" mode=""></image>
|
<image src="../../static/img/evaluate.png" mode=""></image>
|
||||||
咨询信箱
|
咨询信箱
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
|
|||||||
15
uni.scss
15
uni.scss
@@ -74,4 +74,17 @@ $uni-font-size-title:40upx;
|
|||||||
$uni-color-subtitle: #555555; // 二级标题颜色
|
$uni-color-subtitle: #555555; // 二级标题颜色
|
||||||
$uni-font-size-subtitle:36upx;
|
$uni-font-size-subtitle:36upx;
|
||||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||||
$uni-font-size-paragraph:30upx;
|
$uni-font-size-paragraph:30upx;
|
||||||
|
|
||||||
|
.pro_warp{
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.pro_warp2{
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2; /* 设置行数 */
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ module.exports = {
|
|||||||
port: 1887,
|
port: 1887,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://192.168.3.104:8000', // 本地服务接口地址
|
// target: 'http://192.168.3.104:8000', // 本地服务接口地址
|
||||||
// target: "http://39.98.184.58:8000", // 阿里云后台地址
|
// target: "http://39.98.184.58:8000", // 阿里云后台地址
|
||||||
// target: "http://192.168.0.101:8000", // 本地网关
|
// target: "http://192.168.0.101:8000", // 本地网关
|
||||||
|
target: 'http://192.168.3.111:8000', // 本地服务接口地址
|
||||||
ws: true,
|
ws: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/api': '/'
|
'^/api': '/'
|
||||||
|
|||||||
Reference in New Issue
Block a user