Browse Source

上传跳转预约订单

master
前端-胡立永 6 months ago
parent
commit
9eac9a041b
2 changed files with 82 additions and 43 deletions
  1. +7
    -3
      pages_order/order/orderSubscribe.vue
  2. +75
    -40
      pages_order/service/help.vue

+ 7
- 3
pages_order/order/orderSubscribe.vue View File

@ -64,7 +64,7 @@
<view class="line"
@click="$refs.picker.open()">
<view class="">
08:00
{{ form.orderTime[0] || '请选择' }}
<view class="icon">
<uv-icon
name="arrow-down"
@ -74,7 +74,7 @@
</view>
<view class="">
14:00
{{ form.orderTime[1] || '请选择' }}
<view class="icon">
<uv-icon
name="arrow-down"
@ -159,6 +159,7 @@
form : {
name : '',
phone : '',
orderTime : [],
},
selectDate : this.$dayjs().format('YYYY-MM-DD'),
timeColumns : [],
@ -229,7 +230,10 @@
},
//
confirmTime(e){
console.log(e);
this.form.orderTime = []
e.value.forEach((n, i) => {
this.form.orderTime.push(n && n.timeDot)
})
},
}
}


+ 75
- 40
pages_order/service/help.vue View File

@ -1,28 +1,29 @@
<template>
<!-- 我要帮助 -->
<!-- 帮助与反馈 -->
<view class="help">
<navbar title="我要帮助" leftClick @leftClick="$utils.navigateBack" />
<navbar title="帮助与反馈" leftClick @leftClick="$utils.navigateBack" />
<view class="help-box">
<view>
<view class="help-issue">
<text>问题和意见</text>
<text style="color: #BD3624;">*</text>
</view>
<uv-textarea v-model="value" :count="true" border="none" height="400"
placeholder="请把游览中发现的问题提交给我们,感谢您的参与(必填)" :text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
<uv-textarea v-model="form.question" :count="true" border="none" height="400"
placeholder="请把发现的问题提交给我们,感谢您的参与(必填)"
:text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
</view>
<view>
<view class="help-issue">
<text>问题截图</text>
<text style="color: #BD3624;">*</text>
<!-- <text style="color: #BD3624;">*</text> -->
</view>
<view class="help-screenshot">
<uv-upload :fileList="fileList1" accept="all " name="1" multiple :maxCount="3" width="220"
height="220" multiple @afterRead="afterRead" @delete="deletePic">
<image src="../static/help/uploading.png" mode="aspectFit"
style="width: 220rpx;height: 220rpx;" />
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx"
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
<image src="../static/help/uploading.png" mode="aspectFill"
style="width: 180rpx;height: 180rpx;" />
</uv-upload>
</view>
</view>
@ -32,22 +33,22 @@
<text>联系方式</text>
<text style="color: #BD3624;">*</text>
</view>
<uv-input placeholder="请输入联系方式" fontSize="24rpx" border="bottom"
:custom-style="{backgroundColor: '#fff'}">
<template #prefix>
<uv-text text="联系姓名" size="24rpx" margin="20rpx 10rpx 20rpx 10rpx" />
</template>
</uv-input>
<uv-input placeholder="请输入联系姓名" border="none" fontSize="24rpx"
:custom-style="{backgroundColor: '#fff'}">
<template #prefix>
<uv-text text="联系方式" size="24rpx" margin="20rpx 10rpx 20rpx 10rpx" />
</template>
</uv-input>
<view class="form-sheet-cell">
<view>
联系姓名
</view>
<input placeholder="请输入联系姓名" v-model="form.name" />
</view>
<view class="form-sheet-cell">
<view>
联系电话
</view>
<input placeholder="请输入联系电话" v-model="form.phone" />
</view>
</view>
<view class="help-button">
<view>历史反馈</view>
<view>确认</view>
<!-- <view>历史提交</view> -->
<view @click="submit">确认</view>
</view>
</view>
</view>
@ -57,29 +58,57 @@
export default {
data() {
return {
value: "",
fileList1: []
form : {
question : '',
phone : '',
name : '',
image : '',
},
fileList: []
}
},
onLoad(args) {
},
methods: {
//
deletePic(e) {
deleteImage(e){
this.fileList.splice(e.index, 1)
},
//
afterRead(e) {
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url=>{
self.fileList.pust({
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
submit(){
let data = JSON.parse(JSON.stringify(this.form))
if(this.$utils.verificationAll(this.form, {
question : '请输入你的问题和意见',//
// image : '',//
name : '请输入姓名',//
phone : '请输入手机号码',//
})){
return
}
data.image = this.fileList.map((item) => item.url).join(",")
this.$api('addAdvice', data, res => {
if(res.code == 200){
uni.showToast({
title: res.message,
icon:'none'
})
setTimeout(uni.navigateBack, 800, -1)
}
})
},
}
}
@ -102,16 +131,23 @@
display: flex;
align-items: center;
background-color: #fff;
image {
padding: 60rpx;
padding: 20rpx;
}
.form-sheet-cell{
display: flex;
background-color: #fff;
padding: 20rpx 30rpx;
font-size: 24rpx;
align-items: center;
view{
width: 150rpx;
}
}
.help-button {
display: flex;
justify-content: space-between;
justify-content: center;
font-size: 24rpx;
flex-shrink: 0;
margin-top: 60rpx;
@ -122,9 +158,8 @@
}
view:nth-child(1) {
color: #C8C8C8;
background-color: #FFFDF6;
border: 2rpx solid #C8C8C8;
background: $uni-color;
color: #fff;
}
view:nth-child(2) {


Loading…
Cancel
Save