Merge pull request '邓洁 : 招募合伙接口' (#73) from dj into master
Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/73
This commit is contained in:
@@ -1,90 +1,189 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-form>
|
<view v-if="member!=2">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<text class="text">名称</text>
|
<text class="text">名称</text>
|
||||||
<u-input v-model="form.name" placeholder="请输入姓名" placeholder-class="input-class" border="bottom" color="#A0A0A0"></u-input>
|
<u-input v-model="submitForm.real_name" placeholder="请输入姓名" placeholder-class="input-class" border="bottom"
|
||||||
</view>
|
color="#A0A0A0" :disabled="disabled" disabledColor="#ffffff"></u-input>
|
||||||
<view class="id">
|
</view>
|
||||||
<text class="text">身份证号</text>
|
<view class="id">
|
||||||
<u-input v-model="form.idcode" placeholder="请输入身份证号码" placeholder-class="input-class" border="bottom" color="#A0A0A0"></u-input>
|
<text class="text">身份证号</text>
|
||||||
</view>
|
<u-input v-model="submitForm.idcard" placeholder="请输入身份证号码" placeholder-class="input-class" border="bottom"
|
||||||
|
color="#A0A0A0" :disabled="disabled" disabledColor="#ffffff"></u-input>
|
||||||
<view class="payment" @click="show = true">
|
</view>
|
||||||
<view class="left-payment">
|
|
||||||
<text class="text">支付信息</text>
|
|
||||||
<text class="label">请选择支付方式</text>
|
|
||||||
</view>
|
|
||||||
<u-icon name="arrow-right" size="30px" top="10rpx"></u-icon>
|
|
||||||
</view>
|
|
||||||
<u-divider></u-divider>
|
|
||||||
<u-picker mode="region" :show="show" :closeOnClickOverlay="true" @close="show = false" :columns="columns" @confirm="confirmCheckWay"></u-picker>
|
|
||||||
|
|
||||||
</u-form>
|
|
||||||
<view class="submit-btn">
|
|
||||||
<u-button @click="submit" color="linear-gradient(to right, #E86262, #CC3333)" :size="normal" shape="circle" class="submit-btn">提交审核</u-button>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="member==2" class="hhr">
|
||||||
|
<image src="../../static/my/hz_bj.png" mode="aspectFit" style="width: 247rpx;height: 189rpx;"></image>
|
||||||
|
<view class="hhr-text">已是合伙人</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit-btn">
|
||||||
|
<button v-if="member==2" open-type="contact" session-from="sessionFrom" class="service-btn">
|
||||||
|
联系客服
|
||||||
|
</button>
|
||||||
|
<u-button v-else @click="submit" :color="color" :size="normal" shape="circle" class="submit-btn"
|
||||||
|
:disabled="btnDisabled">{{btnText}}</u-button>
|
||||||
|
</view>
|
||||||
|
<u-modal :show="show" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
||||||
|
<rich-text :nodes="content"></rich-text>
|
||||||
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import form from 'uview-ui/libs/config/props/form';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
color: '#CC3333',
|
||||||
|
btnText: '提交审核',
|
||||||
|
member: '',
|
||||||
show: false,
|
show: false,
|
||||||
submitForm:{
|
disabled: false,
|
||||||
name:'',
|
btnDisabled: false,
|
||||||
idcode:''
|
content: `申请已提交, 请等待后台审核`,
|
||||||
|
submitForm: {
|
||||||
|
real_name: '',
|
||||||
|
idcard: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit(){
|
getInfo() {
|
||||||
console.log('提交',form);
|
this.$api.getUser().then(res => {
|
||||||
|
var data = res.data.data
|
||||||
//this.$u.api.submit( this.form )
|
if (data) {
|
||||||
uni.$u.toast('提交成功')
|
this.member = data.member
|
||||||
|
if (data.member == 1) {
|
||||||
|
this.disabled = true
|
||||||
|
this.btnDisabled = true
|
||||||
|
this.color = "#C6C6C6"
|
||||||
|
this.btnText = "审核中…"
|
||||||
|
}
|
||||||
|
// else if (data.member == 2) {
|
||||||
|
// this.disabled = false
|
||||||
|
// this.btnDisabled = false
|
||||||
|
// this.color = "#CC3333"
|
||||||
|
// this.btnText = "联系客服"
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
confirmCheckWay(e){
|
confirm() {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/my/my'
|
||||||
|
})
|
||||||
|
// if (this.needAsk == 1) {
|
||||||
|
// uni.reLaunch({
|
||||||
|
// url: '/pages/index/index'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
if (this.member == 0) {
|
||||||
|
let reg =
|
||||||
|
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
||||||
|
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
||||||
|
this.$toast.warn('请输入正确的身份证号格式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name == "") {
|
||||||
|
this.$toast.warn('请完善数据')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name && this.submitForm.idcard) {
|
||||||
|
let data = {
|
||||||
|
...this.submitForm,
|
||||||
|
uid: uni.getStorageSync('uid')
|
||||||
|
}
|
||||||
|
console.log('成', data);
|
||||||
|
this.$api.toBePartner(data).then(res => {
|
||||||
|
if (res.data.msg == "提交成功") {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.member == 2) {
|
||||||
|
console.log('联系客服');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.input-class{
|
.service-btn {
|
||||||
font-weight:1rpx;
|
height: 40px;
|
||||||
color: #A0A0A0;
|
background-color: #CC3333;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 25px;
|
||||||
|
|
||||||
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.submit-btn{
|
|
||||||
|
.hhr {
|
||||||
|
margin-top: 50rpx;
|
||||||
|
margin-bottom: 50rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.hhr-text {
|
||||||
|
margin-top: 28rpx;
|
||||||
|
width: 186rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: PingFang-SC, PingFang-SC;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #F20C0C;
|
||||||
|
line-height: 50rpx;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.u-modal__button-group__wrapper--hover {
|
||||||
|
background: #0EBB5B !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-class {
|
||||||
|
font-weight: 1rpx;
|
||||||
|
color: #A0A0A0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-btn {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
translate: 10%;
|
translate: 10%;
|
||||||
}
|
}
|
||||||
.text{
|
|
||||||
margin-left: 20rpx;
|
.name,
|
||||||
|
.id {
|
||||||
|
padding: 10rpx;
|
||||||
}
|
}
|
||||||
.payment{
|
|
||||||
|
.text {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payment {
|
||||||
|
margin-top: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
}
|
}
|
||||||
.left-payment{
|
|
||||||
|
.left-payment {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.label{
|
|
||||||
|
.label {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
margin-left: 17rpx;
|
margin-left: 17rpx;
|
||||||
color: #c1c1c1;
|
color: #c1c1c1;
|
||||||
/* font-size: 27rpx; */
|
/* font-size: 27rpx; */
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
<u-avatar :src="src" size="100rpx"></u-avatar>
|
<u-avatar :src="src" size="100rpx"></u-avatar>
|
||||||
</view>
|
</view>
|
||||||
<view class="username">{{username}}</view>
|
<view class="username">{{username}}</view>
|
||||||
|
<image v-if="member==2" src="../../static/my/wo_icon_hhr.png" mode="aspectFit"
|
||||||
|
style="width: 115rpx;height: 34rpx;"></image>
|
||||||
<view class="account">账号:{{account}}
|
<view class="account">账号:{{account}}
|
||||||
<u-icon name="edit-pen" class="edit-icon" size="20" color="#fff" @click="toEdit"></u-icon>
|
<u-icon name="edit-pen" class="edit-icon" size="20" color="#fff" @click="toEdit"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -47,6 +49,7 @@
|
|||||||
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
|
src: 'https://cdn.uviewui.com/uview/album/2.jpg',
|
||||||
account: '',
|
account: '',
|
||||||
username: '',
|
username: '',
|
||||||
|
member: '',
|
||||||
isLoad: true
|
isLoad: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -102,19 +105,10 @@
|
|||||||
if (data) {
|
if (data) {
|
||||||
this.src = this.$api.imgUrl + data.avatar
|
this.src = this.$api.imgUrl + data.avatar
|
||||||
this.username = data.nickname
|
this.username = data.nickname
|
||||||
|
this.member = data.member
|
||||||
this.account = data.sn
|
this.account = data.sn
|
||||||
}
|
uni.setStorageSync("uid", data.user_id)
|
||||||
})
|
uni.setStorageSync("member", data.member)
|
||||||
}
|
|
||||||
//---------页面调用接口示例------------
|
|
||||||
getInfo() {
|
|
||||||
this.$api.getUser().then(res => {
|
|
||||||
var data = res.data.data
|
|
||||||
if (data) {
|
|
||||||
console.log(data);
|
|
||||||
this.src = this.$api.imgUrl + data.avatar
|
|
||||||
this.username = data.nickname
|
|
||||||
this.account = data.sn
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -132,7 +126,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10rpx;
|
// gap: 10rpx;
|
||||||
|
|
||||||
.profile-bgi {
|
.profile-bgi {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -2,17 +2,22 @@
|
|||||||
<view class="form">
|
<view class="form">
|
||||||
<u-form :model="form" ref="uForm">
|
<u-form :model="form" ref="uForm">
|
||||||
<view class="upload">
|
<view class="upload">
|
||||||
<u-upload max-count="5" upload-icon="photo" :preview-full-image="true" :file-list="image"></u-upload>
|
<view style="padding-left: 20rpx;margin-top: 20rpx;">
|
||||||
<text class="count">发布房源图片(0/5)</text>
|
<u-upload :fileList="fileList1" :auto-upload="false" @afterRead="afterRead" @delete="deletePic" name="1"
|
||||||
|
multiple :maxCount="5" :on-preview="preview"></u-upload>
|
||||||
|
</view>
|
||||||
|
<!-- <u-upload max-count="5" upload-icon="photo"></u-upload> -->
|
||||||
|
<text class="count">发布房源图片({{imageLength}}/5})</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
|
<u-form-item label="标题" label-position="top" border-bottom="true" prop="title" label-width="auto">
|
||||||
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.title" placeholder="请输入标题以便吸引人的注意哦" placeholder-class="input-class"
|
||||||
|
border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region" label-width="auto">
|
<u-form-item label="区域" label-position="top" border-bottom="true" right-icon="arrow-right" prop="region"
|
||||||
|
label-width="auto">
|
||||||
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
|
<text @click="show1 = true" class="checkedtext" v-if="form.region.length>0">{{form.region}}</text>
|
||||||
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
|
<text @click="show1 = true" class="checktext" v-else>请选择所属区域</text>
|
||||||
|
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,14 +28,15 @@
|
|||||||
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
||||||
@change="changeAddress"></u-input>
|
@change="changeAddress"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto" prop="business" >
|
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
||||||
|
prop="business">
|
||||||
<text @click="show2 = true" class="checkedtext" v-if="form.business.length>0">{{form.business}}</text>
|
<text @click="show2 = true" class="checkedtext" v-if="form.business.length>0">{{form.business}}</text>
|
||||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业</text>
|
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业</text>
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false" :columns="[Classcolumns]"
|
<u-picker mode="region" :show="show2" :closeOnClickOverlay="true" @close="show2 = false"
|
||||||
v-model="form.business" @confirm="tradeConfirm"></u-picker>
|
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="commercial">
|
<u-form-item label="业态" label-position="top" border-bottom="true" label-width="auto" prop="commercial">
|
||||||
<text @click="show3 = true" class="checkedtext" v-if="form.commercial.length>0">{{form.commercial}}</text>
|
<text @click="show3 = true" class="checkedtext" v-if="form.commercial.length>0">{{form.commercial}}</text>
|
||||||
@@ -38,8 +44,8 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show3 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false" :columns="[Karmacolumns]"
|
<u-picker mode="region" :show="show3" :closeOnClickOverlay="true" @close="show3 = false"
|
||||||
v-model="form.commercial" @confirm="karmaConfirm"></u-picker>
|
:columns="[Karmacolumns]" v-model="form.commercial" @confirm="karmaConfirm"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
||||||
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -48,7 +54,8 @@
|
|||||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
||||||
<u-input v-model="form.transferFee" placeholder="请输入店铺转让费" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.transferFee" placeholder="请输入店铺转让费" placeholder-class="input-class"
|
||||||
|
border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contact">
|
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contact">
|
||||||
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -71,6 +78,8 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
imageLength: '0',
|
||||||
|
fileList1: [],
|
||||||
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
||||||
|
|
||||||
form: {
|
form: {
|
||||||
@@ -84,16 +93,16 @@
|
|||||||
transferFee: '',
|
transferFee: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
content: '',
|
content: '',
|
||||||
images:[],
|
images: [],
|
||||||
longitude:'',
|
longitude: '',
|
||||||
latitude:'',
|
latitude: '',
|
||||||
id:'',
|
id: '',
|
||||||
|
|
||||||
},
|
},
|
||||||
Classcolumns: [],
|
Classcolumns: [],
|
||||||
ClassCheckId:'',
|
ClassCheckId: '',
|
||||||
Karmacolumns: [],
|
Karmacolumns: [],
|
||||||
pid:[],
|
pid: [],
|
||||||
show1: false,
|
show1: false,
|
||||||
show2: false,
|
show2: false,
|
||||||
show3: false,
|
show3: false,
|
||||||
@@ -148,32 +157,91 @@
|
|||||||
message: '请输入地址',
|
message: '请输入地址',
|
||||||
trigger: ['change', 'blur']
|
trigger: ['change', 'blur']
|
||||||
}],
|
}],
|
||||||
'mobile':[{
|
'mobile': [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入电话号码',
|
message: '请输入电话号码',
|
||||||
},
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if(value) {
|
|
||||||
return this.$u.test.mobile(value);
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
message: '号码不正确',
|
{
|
||||||
trigger: ['change','blur'],
|
validator: (rule, value, callback) => {
|
||||||
}]
|
if (value) {
|
||||||
|
return this.$u.test.mobile(value);
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
message: '号码不正确',
|
||||||
|
trigger: ['change', 'blur'],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除图片
|
||||||
|
deletePic(event) {
|
||||||
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
|
},
|
||||||
|
preview(e) {
|
||||||
|
console.log('预览', e);
|
||||||
|
},
|
||||||
|
// 新增图片
|
||||||
|
async afterRead(event) {
|
||||||
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
let lists = [].concat(event.file)
|
||||||
|
let fileListLen = this[`fileList${event.name}`].length
|
||||||
|
lists.map((item) => {
|
||||||
|
this[`fileList${event.name}`].push({
|
||||||
|
...item,
|
||||||
|
status: 'uploading',
|
||||||
|
message: '上传中'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
for (let i = 0; i < lists.length; i++) {
|
||||||
|
console.log('lists[i].url', lists[i].url);
|
||||||
|
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',
|
||||||
|
message: '',
|
||||||
|
url: result
|
||||||
|
}))
|
||||||
|
fileListLen++
|
||||||
|
this.imageLength = fileListLen
|
||||||
|
}
|
||||||
|
},
|
||||||
|
uploadFilePromise(filePath) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const token = uni.getStorageSync('loginToken')
|
||||||
|
const a = uni.uploadFile({
|
||||||
|
url: this.$api.uploadImgUrl,
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'file',
|
||||||
|
header: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
'Authorization': token
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
resolve(JSON.parse(res.data).data.url)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSearchAddress() {
|
handleSearchAddress() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/publish/chooseAddress/chooseAddress'
|
url: '/pages/publish/chooseAddress/chooseAddress'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
const temp = []
|
||||||
|
if (this.fileList1.length > 0) {
|
||||||
|
this.fileList1.map(item => {
|
||||||
|
const url = item.url
|
||||||
|
temp.push(url.replace(this.imgUrl + '/', ''))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('images---', temp.join(','));
|
||||||
this.$refs.uForm.validate().then(res => {
|
this.$refs.uForm.validate().then(res => {
|
||||||
console.log("提交表单信息:" + JSON.stringify(this.form))
|
console.log("提交表单信息:" + JSON.stringify(this.form))
|
||||||
uni.$u.toast('发布成功')
|
uni.$u.toast('发布成功')
|
||||||
@@ -206,32 +274,32 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tradeConfirm(e){
|
tradeConfirm(e) {
|
||||||
this.show2 = false
|
this.show2 = false
|
||||||
this.form.business = e.value[0]
|
this.form.business = e.value[0]
|
||||||
this.ClassCheckId = this.pid[e.indexs[0]]
|
this.ClassCheckId = this.pid[e.indexs[0]]
|
||||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
this.$api.getClassList(this.ClassCheckId).then(res => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
this.Karmacolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
karmaConfirm(e){
|
karmaConfirm(e) {
|
||||||
this.show3 = false
|
this.show3 = false
|
||||||
this.form.commercial = e.value[0]
|
this.form.commercial = e.value[0]
|
||||||
},
|
},
|
||||||
regionConfirm(e){
|
regionConfirm(e) {
|
||||||
this.show1 = false
|
this.show1 = false
|
||||||
this.form.region = e.value[0]
|
this.form.region = e.value[0]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.uForm.setRules(this.rules)
|
this.$refs.uForm.setRules(this.rules)
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.$api.getClassList().then(res =>{
|
this.$api.getClassList().then(res => {
|
||||||
// console.log(res.data.data.length);
|
// console.log(res.data.data.length);
|
||||||
this.Classcolumns = res.data.data.map((item) => {
|
this.Classcolumns = res.data.data.map((item) => {
|
||||||
return item = item.name
|
return item = item.name
|
||||||
@@ -239,15 +307,15 @@
|
|||||||
this.pid = res.data.data.map((item) => {
|
this.pid = res.data.data.map((item) => {
|
||||||
return item = item.id
|
return item = item.id
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
isChecked(index){
|
isChecked(index) {
|
||||||
if(index.length > 0)
|
if (index.length > 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,8 +342,12 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
height: 300rpx;
|
|
||||||
|
// height: 300rpx;
|
||||||
// margin-right: 20px;
|
// margin-right: 20px;
|
||||||
|
.count {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
@@ -297,12 +369,14 @@
|
|||||||
font-weight: 1px;
|
font-weight: 1px;
|
||||||
color: #c1c4c7;
|
color: #c1c4c7;
|
||||||
}
|
}
|
||||||
.checkedtext{
|
|
||||||
|
.checkedtext {
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 1px;
|
font-weight: 1px;
|
||||||
border-style: none;
|
border-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker {
|
.picker {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
BIN
static/my/hz_bj.png
Normal file
BIN
static/my/hz_bj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
static/my/wo_icon_hhr.png
Normal file
BIN
static/my/wo_icon_hhr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user