This commit is contained in:
lnn19986213 2022-07-18 15:44:07 +08:00
parent 29476e5f69
commit a637993e52
6 changed files with 727 additions and 761 deletions

View File

@ -530,7 +530,8 @@
"style" :
{
"navigationBarTitleText": "点单大厅",
"enablePullDownRefresh": false
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
{

View File

@ -1,9 +1,5 @@
<template>
<view>
<u--form :model="model1" ref="form1" labelPosition="top" labelWidth='auto' :labelStyle='{fontWeight:800}'>
<!-- 完善资料 -->
<!-- 这里加了 v-for 导致 ref 失效 -->
<view class="wanShan">
<view class="data_itm_box" style="padding: 32rpx ;">
@ -13,7 +9,7 @@
</view>
</view>
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="1">
@afterRead="afterRead" @delete="deletePic" name="3" multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
@ -22,7 +18,6 @@
<view class="operation">
<button type="default" class="next" @click="submit">确定</button>
</view>
</u--form>
<view class="zhan_w">
<!-- zhanwei -->
</view>
@ -34,269 +29,18 @@
export default {
data() {
return {
fileList4: [], //
fileList1: [], //
fileList2: [
[]
], //
fileList3: [], //
model1: {
userInfo: {
name: '',
sex: '',
birthday: "2000-01-01",
idCOde: '',
phoneNum: '',
meeting: '',
// meetingTime: '',
ServerName: '',
Address: '',
serverInstrutor: '', //
serveTime: '09:00',
serveTimeend: '17:00',
jionTime: '2000-01-01',
DutyPeopleName: '', //
// ServephoneNum: '', //
pasw: ''
},
},
rules: {
'userInfo.pasw': [{
required: true,
message: '请填写密码',
trigger: ['blur','change']
}, {
min: 6,
max: 20,
message: '密码长度应大于等于6个字符小于20个字符!',
trigger: ['blur','change']
}, {
trigger: ['blur','change'],
validator: (rule, value, callback) => {
var passwordreg =
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
if (!passwordreg.test(value)) {
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
} else {
callback()
}
}
}],
'userInfo.serverInstrutor': [{
type: 'string',
required: true,
message: '请填写服务内容介绍',
trigger: ['blur', 'change']
}],
'userInfo.Address': [{
type: 'string',
required: true,
message: '请填写地址',
trigger: ['blur', 'change']
}],
'userInfo.name': [{
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
'userInfo.meeting': [{
type: 'string',
required: true,
message: '请填写协会名',
trigger: ['blur', 'change']
}],
'userInfo.sex': {
type: 'string',
max: 1,
required: true,
message: '请选择男或女',
trigger: ['blur', 'change']
},
'userInfo.idCOde': [{
required: true,
message: '请输入身份证号号',
trigger: ['change', 'blur'],
},
{
//
validator: (rule, value, callback) => {
return uni.$u.test.idCard(value);
},
message: '身份证号码格式不正确',
trigger: ['change', 'blur'],
}
]
,
'userInfo.ServerName': [{
type: 'string',
required: true,
message: '请填写服务名称',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
'userInfo.DutyPeopleName': [{
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
},
id: '',
};
},
onLoad(option) {
console.log(option.id);
this.pageTypeId = option.id
this.id = option.id
},
onReady() {
this.$refs.form1.setRules(this.rules);
this.http.request('/association/list', {}, "GET").then((res) => {
res.data.records.map((v, i) => {
return this.xiehuiObj[v.name] = v.id
})
var xieList = res.data.records.map((v, i) => {
return v.name
})
this.xiecolumns.push(xieList)
console.log('this.xiehuiObj', this.xiehuiObj);
}).catch((error) => {
console.log("error", error);
})
},
methods: {
close(show) {
this[show] = false
},
AddItem(typNum) {
switch (typNum) {
case 0:
// this.$set(this.artlist, changeNum, null)
this.artlist.push("")
break;
case 1:
this.honorList.push('')
break;
case 2:
this.StandradList.push('')
this.fileList2.push([])
break;
}
},
delItem(typNum, num) {
switch (typNum) {
case 0:
this.artlist.splice(num, 1)
break;
case 1:
this.honorList.splice(num, 1)
break;
case 2:
this.StandradList.splice(num, 1)
break;
}
},
sexSelect(e) {
this.model1.userInfo.sex = e.name
// this.$refs.form1.validateField('userInfo.sex')
},
selectForm(sex) {
this.model1.userInfo.sex = sex
},
birthdayConfirm(e) {
this.showBirthday = false
this.model1.userInfo.birthday = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
// this.$refs.form1.validateField('userInfo.birthday')
},
ServeTimeConfirm(e) {
this.showServeTime = false
this.model1.userInfo.serveTime = e.value
},
ServeTimeConfirmend(e) {
this.showServeTimeend = false
this.model1.userInfo.serveTimeend = e.value
},
jionMeetConfirm(e) {
this.showJionmeet = false
this.model1.userInfo.jionTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
confimZu(e) {
this.zuShow = false
this.zuValue = e.value[0]
// console.log(e.value[0]);
},
confirmxie(e) {
this.xieShow = false
this.xieValue = e.value[0]
this.xiehuiId = this.xiehuiObj[this.xieValue]
console.log("xiehuiId", this.xiehuiId);
},
confimZheng(e) {
this.zhengzhiShow = false
this.zhengzhiValue = e.value[0]
},
confimRenCai(e) {
this.renCaiShow = false
this.renCaiValue = e.value[0]
},
confimJi(e) {
this.jigaunShow = false
this.jiguan = e.value[0]
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
deletePic1(event) {
this.fileList2[event.name].splice(event.index, 1)
},
//
async afterRead(event) {
// mutiple true , file
@ -311,9 +55,6 @@
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log("result", result);
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
@ -322,69 +63,42 @@
}))
fileListLen++
}
console.log("fileList", this[`fileList${event.name}`]);
},
//
async afterRead1(event) {
// mutiple true , file
let lists = [].concat(event.file)
console.log(this.fileList2[event.name])
let fileListLen = this.fileList2[event.name].length
lists.map((item) => {
this.fileList2[event.name].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log("result", result);
let item = this.fileList2[event.name][fileListLen]
this.fileList2[event.name].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
console.log("fileList", this.fileList2[event.name]);
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: http.config.baseUrl + '/upload/upload',
url: http.config.baseUrl + '/file/upload',
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
if (JSON.parse(res.data).code == 200) {
setTimeout(() => {
resolve(JSON.parse(res.data).data.path)
}, 1000)
} else {
uni.showToast({
title: JSON.parse(res.data).message,
icon: "none",
});
this.fileList3.pop()
}
}
});
})
},
submit() {
/*
this.$refs.form1.validate().then(res => {
this.http.request('/auth/init', data, "POST").then(res => {
if (res.code == 200) {
uni.navigateTo({
url: '/pages/pageHome/pageHome'
let image = []
this.fileList3.forEach(function(item) {
image.push(item.url)
})
uni.showToast({
title: "成功了",
icon: "none",
});
let data = image.join(',')
console.log(data)
this.http.request('/hall/addHall?id='+ this.id +'&image=' +data, {}, "POST").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
}).catch(e => {
uni.showToast({
@ -392,11 +106,6 @@
icon: "none",
});
})
}).catch(errors => {
uni.$u.toast('您的资料还未补充完整')
return
}) */
}
}
@ -464,8 +173,12 @@
font-weight: 600;
}
}
.xie {
display: flex;justify-content: space-between; align-items: center;margin-bottom: 16rpx;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
}

View File

@ -5,7 +5,8 @@
名称
</view>
<view class="form_right">
<u--input placeholder="请输入名称" v-model="name" clearable border="none" inputAlign="right" style="color: #251B1D;">
<u--input placeholder="请输入名称" v-model="name" clearable border="none" inputAlign="right"
style="color: #251B1D;">
</u--input>
</view>
</view>
@ -14,17 +15,16 @@
类型
</view>
<view class="form_right" @click="showType=true">
<u--input placeholder="请选择类型" clearable border="none" inputAlign="right" style="color: #251B1D;" suffixIcon="map-fill" readonly v-model="type" disabledColor="#ffffff">
<u--input placeholder="请选择类型" clearable border="none" inputAlign="right" style="color: #251B1D;"
suffixIcon="arrow-right" readonly v-model="type" disabledColor="#ffffff">
</u--input>
</view>
</view>
<u-popup :show="showType" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-popup :show="showType" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-radio-group @change="selectForm1" v-model="type" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist1" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
activeColor="#99241B ">
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showType=false">确认</u-button>
@ -51,7 +51,8 @@
截止时间
</view>
<view class="form_right" @click="chooseTime(0)">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;" suffixIcon="map-fill" readonly v-model="eTime" disabledColor="#ffffff">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;"
suffixIcon="calendar" readonly v-model="eTime" disabledColor="#ffffff">
</u--input>
</view>
</view>
@ -60,12 +61,13 @@
活动时间
</view>
<view class="form_right" @click="chooseTime(1)">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;" suffixIcon="map-fill" readonly v-model="wTime" disabledColor="#ffffff">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;"
suffixIcon="calendar" readonly v-model="wTime" disabledColor="#ffffff">
</u--input>
</view>
</view>
<u-datetime-picker :show="showTime" v-model="timeValue" value-format="yyyy-MM-dd" mode="date"
@close="close" @cancel="close" @confirm="sureTime"></u-datetime-picker>
<u-datetime-picker :show="showTime" v-model="timeValue" value-format="yyyy-MM-dd" mode="date" @close="close"
@cancel="close" @confirm="sureTime"></u-datetime-picker>
<view class="gap">
接单设置
</view>
@ -74,13 +76,22 @@
可接单用户选择
</view>
<view class="form_right" @click="showUser=true">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;" suffixIcon="map-fill" readonly v-model="userType" disabledColor="#ffffff">
<u--input placeholder="请选择" clearable border="none" inputAlign="right" style="color: #251B1D;"
suffixIcon="arrow-right" readonly v-model="userType" disabledColor="#ffffff">
</u--input>
</view>
</view>
<u-popup :show="showUser" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
<u-popup :show="showUser" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-radio-group @change="selectForm2" v-model="userType" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showUser=false">确认</u-button>
</u-radio-group>
<!-- <u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
iconPlacement="right">
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
@ -88,7 +99,7 @@
</u-checkbox>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showUser=false">确认</u-button>
</u-checkbox-group>
</u-checkbox-group> -->
</u-popup>
<view class="form_line">
<view class="form_left">
@ -109,6 +120,12 @@
<view class="gap">
附件上传
</view>
<view class="gap" style="line-height: 30rpx;font-size: 28rpx;">
可上传图片(png/jpg/jpeg/bmp/gif/tif/tiff)或pdf
</view>
<view class="gap" style="line-height: 30rpx;font-size: 28rpx;">
(若有图片请先上传图片)
</view>
<u-upload class="upload" accept="file" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
@ -129,20 +146,7 @@
typeId: '',
showType: false,
type: '',
radiolist1: [
{
label:'qwe',
id:'123',
},
{
label:'asd',
id:'124',
},
{
label:'zxc',
id:'125',
},
],
radiolist1: [],
text1: '',
text2: '',
showTime: false,
@ -152,34 +156,57 @@
timeValue: Number(new Date()),
showUser: false,
userType: '',
radiovalue2: [],
radiolist2: [
{
label:'qwe567',
id:'123',
},
{
label:'asd67',
id:'124',
},
{
label:'zxc67',
id:'125',
},
],
userTypeValue: '',
// radiovalue2: [],
radiolist2: [],
morePer: true,
perNumber: 0,
perNumber: 1,
fileList3: [],
}
},
onShow() {
this.getTypeList()
this.getUserList()
},
methods: {
//
getTypeList() {
this.http.request('/hallType/list', {}, "GET").then(res => {
if (res.code == 200) {
this.radiolist1 = res.data.records
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getUserList() {
this.http.request('/hall/yhlx', {}, "GET").then(res => {
if (res.code == 200) {
this.radiolist2 = res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
close() {
this.showType = false
this.showTime = false
this.showUser = false
},
selectForm1(form) {
this.typeId = form
let _this = this
this.radiolist1.forEach(function(item) {
if (item.name == form) {
_this.typeId = item.code
}
})
},
chooseTime(val) {
this.showTime = true
@ -194,8 +221,14 @@
this.showTime = false
},
selectForm2(form) {
let data = form
this.userType = data.join(',')
let _this = this
this.radiolist2.forEach(function(item) {
if (item.label == form) {
_this.userTypeValue = item.value
}
})
// let data = form
// this.userType = data.join(',')
},
changeTrue(e) {
console.log('change', e);
@ -240,7 +273,6 @@
user: 'test'
},
success: (res) => {
console.log(res)
if (JSON.parse(res.data).code == 200) {
setTimeout(() => {
resolve(JSON.parse(res.data).data.path)
@ -257,7 +289,32 @@
})
},
next() {
let image = []
this.fileList3.forEach(function(item) {
image.push(item.url)
})
let data = image.join(',')
this.http.request('/hall/addHall', {
activityTime: this.wTime,
content: this.text2,
deadline: this.eTime,
demand: this.text1,
isMultiple: this.morePer,
quantity: this.perNumber,
receiverType: this.userTypeValue,
title: this.name,
type: this.typeId,
enclosure: data
}, "POST").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
@ -297,7 +354,6 @@
.gap {
color: #AFADB0;
height: 50rpx;
background: #F5F5F5;
opacity: 1;
padding: 10rpx 32rpx;
@ -319,5 +375,4 @@
font-size: 36rpx;
font-weight: 600;
}
</style>

View File

@ -1,83 +1,36 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="page">
<view class="nav">
<view class="list" v-for="(item,index) in list" :key="item.text" @click="onNav(item.id,index)">
<view class="list" v-for="(item,index) in list" :key="index" @click="onNav(item.code,index)">
<view :class="['text',action == index?'on':'']">{{item.text}}</view>
</view>
</view>
<view class="main" v-if="isShow == 1">
<view class="mainList" v-for="item in mainList" :key="item.img">
<view class="mainListImg">
<img class='img' :src="item.img" alt="">
<view class="addIcon" @click="toAddOrder">
<image src="../../static/orderHall/addOrder.png"></image>
</view>
<view class="main" v-if="mainList.length > 0">
<view class="mainList" v-for="(item,i) in mainList" :key="i">
<view class="mainListImg" @click="toDetail(item.id)">
<img class='img' :src="item.cover" alt="">
</view>
<view class="text">
<view class="text1">象山县打造公益文化特色团队</view>
<view class="text2">这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需</view>
<view class="text1">{{item.title}}</view>
<view class="text2">{{item.content}}</view>
<view class="text3">
<img class='mainListTime' src="../../static/orderHall/mainListTime.png" alt="">
<view class="time">截止时间2022/06/19</view>
<view class="time">截止时间{{item.deadline}}</view>
</view>
</view>
</view>
</view>
<view class="main" v-if="isShow == 2">
<view class="mainList" v-for="item in mainList" :key="item.img">
<view class="mainListImg">
<img class='img' :src="item.img" alt="">
</view>
<view class="text">
<view class="text1">象山县队</view>
<view class="text2">这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需</view>
<view class="text3">
<img class='mainListTime' src="../../static/orderHall/mainListTime.png" alt="">
<view class="time">截止时间2022/06/19</view>
</view>
</view>
</view>
</view>
<view class="main" v-if="isShow == 3">
<view class="mainList" v-for="item in mainList" :key="item.img">
<view class="mainListImg">
<img class='img' :src="item.img" alt="">
</view>
<view class="text">
<view class="text1">象山县333333队</view>
<view class="text2">这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需</view>
<view class="text3">
<img class='mainListTime' src="../../static/orderHall/mainListTime.png" alt="">
<view class="time">截止时间2022/06/19</view>
</view>
</view>
</view>
</view>
<view class="main" v-if="isShow == 4">
<view class="mainList" v-for="item in mainList" :key="item.img">
<view class="mainListImg">
<img class='img' :src="item.img" alt="">
</view>
<view class="text">
<view class="text1">象山县444444444队</view>
<view class="text2">这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需</view>
<view class="text3">
<img class='mainListTime' src="../../static/orderHall/mainListTime.png" alt="">
<view class="time">截止时间2022/06/19</view>
</view>
</view>
</view>
</view>
<view class="main" v-if="isShow == 5">
<view class="mainList" v-for="item in mainList" :key="item.img">
<view class="mainListImg">
<img class='img' :src="item.img" alt="">
</view>
<view class="text">
<view class="text1">象山县555555队</view>
<view class="text2">这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需求清单这里是需</view>
<view class="text3">
<img class='mainListTime' src="../../static/orderHall/mainListTime.png" alt="">
<view class="time">截止时间2022/06/19</view>
</view>
</view>
<view v-else>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" >
</u-empty>
</view>
</view>
</view>
@ -87,60 +40,129 @@
export default {
data() {
return {
isShow: '1',
list:[
{
load:true,
list: [{
text: '全部',
id: 1
code: ''
},
{
text: '订购',
id: 2
code: 'order'
},
{
text: '公益',
id: 3
code: 'gy'
},
{
text: '演出',
id: 4
code: 'show'
},
{
text: '其他',
id: 5
code: 'other'
}
],
mainList:[
{
img:'../../static/RewardWork/fightVirus.png'
mainList: [],
action: 0,
pages: 1,
size: 20,
type: '',
}
},
{
img:'../../static/RewardWork/fightVirus.png'
}
],
action:0
}
//
onPullDownRefresh() {
this.pages = 1
this.mainList = []
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getData();
},
onShow() {
this.getData()
},
methods: {
getData() {
let _this = this
this.http.request('/hall/list', {
page: this.pages,
size: this.size,
type: this.type,
}, "GET").then(res => {
if (res.code == 200) {
if(res.data.records.length > 0){
res.data.records.forEach(function(item){
if (item.enclosure) {
let fileArr = item.enclosure.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.enclosure = fileArr[0]
}
else if (gs == 'pdf') {
item.enclosure = '../../static/fileImg/pdfS.png'
}
}
_this.mainList.push(item)
})
}else{
this.pages--
}
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
onNav(val, index) {
this.action = index
this.isShow = val
this.type = val
this.pages = 1
this.mainList = []
this.getData()
},
toDetail(val){
uni.navigateTo({
url: `/pages/orderHall/orderHallDetails?id=` + val
})
},
toAddOrder(){
uni.navigateTo({
url: `/pages/orderHall/addOrder`
})
}
}
}
</script>
<style lang="scss" scoped>
page{
background-color: #f8f8f8;
}
image{
width: 100%;
height: 100%;
}
.on {
font-weight: 600;
}
.page {
.nav {
display: flex;
.list {
width: 20%;
height: 76rpx;
background: #FFFFFF;
.text {
font-size: 28rpx;
font-weight: 400;
@ -148,6 +170,7 @@
line-height: 70rpx;
text-align: center;
position: relative;
&.on::after {
content: '';
position: absolute;
@ -161,43 +184,53 @@
}
}
}
.main {
padding: 32rpx;
background-color: #F4F5F7;
// background-color: #F4F5F7;
.mainList {
margin-bottom: 32rpx;
border-radius: 16rpx;
overflow: hidden;
.mainListImg {
height: 400rpx;
.img {
width: 100%;
height: 100%;
}
}
.text {
padding: 32rpx;
background-color: #FFF;
.text1 {
font-size: 28rpx;
font-weight: 600;
color: #251B1D;
margin-bottom: 5rpx;
}
.text2 {
font-size: 24rpx;
font-weight: 400;
color: #989898;
}
.text3 {
display: flex;
margin-top: 16rpx;
.mainListTime {
width: 26rpx;
height: 26rpx;
margin-top: 4rpx;
margin-right: 8rpx;
}
.time {
font-size: 24rpx;
font-weight: 400;
@ -207,5 +240,14 @@
}
}
}
.addIcon{
position: fixed;
right: 24rpx;
bottom: 242rpx;
width: 104rpx;
height: 104rpx;
border-radius: 50%;
}
}
</style>

View File

@ -1,53 +1,74 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="page">
<view class="return" @click="back">
<image src="../../static/orderLeftArrow.png" mode="scaleToFill"></image>
</view>
<view class="pageImg">
<img class='img' src="../../static/RewardWork/fightVirus.png" alt="">
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current"
indicatorStyle="right: 20px" height='440rpx'>
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
</view>
<view class="main">
<view class="mainTitle">善行象山走进晓塘文艺演出招募</view>
<view class="mainTitle">{{data.title}}</view>
<view class="textList">
<view class="type">
<img class='textImg' src="../../static/orderHall/text.png" alt="">
<view class="text1">需求清单</view>
</view>
<view class="text2">主持人2位歌手8位舞者5位志愿者10位</view>
<view class="text2">{{data.demand}}</view>
</view>
<view class="textList">
<view class="type">
<img class='textImg' src="../../static/orderHall/text.png" alt="">
<view class="text1">具体内容</view>
</view>
<view class="text2">为推动社会慈善事业发展弘扬行善美德关爱弱势群体为主题由象山县慈善总会主办县义工分会等承办晓塘乡总工会晓塘乡团委晓塘乡妇联协办的善行象山走进晓塘文艺演出活动招募演出人员与志愿者</view>
<view class="text2">
{{data.content}}
</view>
</view>
<view class="file_box" v-for="(item,index) in list2" :key="index" @click="downLoad(item.url)">
<view class="file_box_left">
<image :src="item.img" class="file_box_left_img"></image>
</view>
<view class="file_box_right">
<view class="file_box_name">
{{item.name}}
</view>
</view>
<view class="pdf">
<img class='pdfImg' src="../../static/fileImg/pdfS.png" alt="">
<view class="text3">演出节目表与日程安排.pdf</view>
</view>
</view>
<view class="line"></view>
<view class="form">
<view class="formList">
<view class="left">类型</view>
<view class="right">演出</view>
<view class="right">{{data.typeName}}</view>
</view>
<view class="formList">
<view class="left">可接单人数</view>
<view class="right"><text style="color: #99241B;">1</text>/5</view>
<view class="right"><text style="color: #99241B;">{{data.jdrs}}</text>/{{data.quantity}}</view>
</view>
<view class="formList">
<view class="left">截止时间</view>
<view class="right">2022-06-02</view>
<view class="right">{{data.deadline}}</view>
</view>
<view class="formList">
<view class="left">结束时间</view>
<view class="right">2022-06-27</view>
<view class="left">活动时间</view>
<view class="right">{{data.activityTime}}</view>
</view>
</view>
<view class="orderBtn">
<view class="btn">申请接单</view>
<view class="orderBtn" v-if="data.isBaoming">
<view class="btnQ" @click="baoQ">取消接单</view>
</view>
<view class="orderBtn" v-else>
<view class="btn" @click="bao">申请接单</view>
</view>
</view>
</view>
</template>
@ -56,12 +77,93 @@
export default {
data() {
return {
load: true,
id: '',
data: {},
list: [],
list2: [],
currentNum: 0,
}
},
onLoad(op) {
this.id = op.id
},
onShow() {
this.getData()
},
methods: {
getData() {
let _this = this
this.http.request('/hall/details', {
id: this.id,
}, "GET").then(res => {
if (res.code == 200) {
//
if (res.data.enclosure) {
let fileArr = res.data.enclosure.split(',')
fileArr.forEach(function(item) {
let gs = item.substr(item.lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
_this.list.push(item)
} else if (gs == 'pdf') {
_this.list2.push({
name: res.data.name + '.' + gs,
img: '../../static/fileImg/pdfS.png',
url: item,
})
}
})
}
this.data = res.data
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
back() {
uni.navigateBack()
},
//
downLoad(val) {
this.contractUrl = val
uni.navigateTo({
url: "/pages/ArtWorks/webView?url=" + this.contractUrl
})
},
bao() {
this.http.request('/hallUser/singUp?hallId='+this.id, {}, "POST").then(res => {
if (res.code == 200) {
this.getData()
this.load = true
this.list = []
this.list2 = []
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
baoQ(){
this.http.request('/hallUser/qxSingUp?hallId='+this.id, {}, "POST").then(res => {
if (res.code == 200) {
this.getData()
this.load = true
this.list = []
this.list2 = []
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
@ -73,45 +175,55 @@
position: fixed;
left: 24rpx;
top: 110rpx;
z-index: 10;
image {
width: 48rpx;
height: 48rpx;
}
}
.pageImg {
height: 440rpx;
.img {
width: 100%;
height: 100%;
}
}
.main {
padding: 32rpx;
.mainTitle {
font-size: 36rpx;
font-weight: 600;
color: #251B1D;
margin-bottom: 28rpx;
}
.textList {
margin-bottom: 24rpx;
.type {
display: flex;
height: 48rpx;
line-height: 48rpx;
.textImg {
width: 28rpx;
height: 28rpx;
margin-top: 10rpx;
margin-right: 8rpx;
}
.text1 {
font-size: 28rpx;
font-weight: 500;
color: #32333C;
}
}
.text2 {
font-size: 28rpx;
font-weight: 400;
@ -119,39 +231,68 @@
line-height: 48rpx;
}
}
.pdf{
display: flex;
padding: 24rpx 30rpx;
background: #F4F5F7;
border-radius: 12rpx;
.pdfImg{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
}
.text3{
.file_box {
width: 92%;
height: 64px;
margin: 10px 4%;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #251B1D;
background: #F4F5F7;
border-radius: 6px;
overflow: hidden;
.file_box_left {
width: 40px;
height: 40px;
margin-top: 12px;
margin-left: 12px;
float: left;
.file_box_left_img {
width: 40px;
height: 40px;
}
}
.file_box_right {
margin-left: 20px;
float: left;
.file_box_name {
height: 64px;
line-height: 64px;
font-size: 16px;
font-weight: 600;
color: #251B1D;
}
}
}
}
.line {
height: 16rpx;
background: #F4F5F7;
}
.form {
padding: 32rpx 32rpx 24rpx;
margin-bottom: 132rpx;
.formList {
display: flex;
justify-content: space-between;
height: 40rpx;
line-height: 40rpx;
margin-bottom: 40rpx;
.left {
font-size: 28rpx;
font-weight: 400;
color: #AFADB0;
}
.right {
font-size: 28rpx;
font-weight: 400;
@ -159,6 +300,7 @@
}
}
}
.orderBtn {
width: 100%;
height: 132rpx;
@ -166,6 +308,7 @@
position: fixed;
left: 0;
bottom: 0;
.btn {
width: calc(100% - 64rpx);
height: 96rpx;
@ -178,6 +321,18 @@
color: #FFFFFF;
margin: auto;
}
.btnQ {
width: calc(100% - 64rpx);
height: 96rpx;
line-height: 96rpx;
text-align: center;
background: #F9F2F2;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: 600;
color: #99241B;
margin: auto;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB