Merge remote-tracking branch 'origin/master_dev' into master_dev
This commit is contained in:
20
api/mine/business_cooperation.js
Normal file
20
api/mine/business_cooperation.js
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 添加意向合作 /api/front/intended/cooperation/add
|
||||
export function addCooperationAPI(data) {
|
||||
return request({
|
||||
url: '/api/front/intended/cooperation/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 合作类目列表 /api/front/intended/category/Category/list
|
||||
// /api/front/intended/category/list
|
||||
export function categoryListAPI(){
|
||||
return request({
|
||||
url:`/api/front/intended/category/list`,
|
||||
method:'get'
|
||||
})
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export const mineMenu = [{
|
||||
}, {
|
||||
id: 12,
|
||||
name: '商务合作',
|
||||
url: ''
|
||||
url: '/pages/driver/mine/business_cooperation/business_cooperation'
|
||||
}
|
||||
// , {
|
||||
// id: 13,
|
||||
|
||||
17
pages.json
17
pages.json
@@ -1082,7 +1082,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
},
|
||||
{
|
||||
"path" : "pages/driver/mine/business_cooperation/business_cooperation",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "商务合作",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/driver/mine/business_cooperation/submit",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "提交结果",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/driver/serve/repair/re_create/select_store",
|
||||
"style": {
|
||||
"navigationBarTitleText": "常规保养",
|
||||
|
||||
206
pages/driver/mine/business_cooperation/business_cooperation.vue
Normal file
206
pages/driver/mine/business_cooperation/business_cooperation.vue
Normal file
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<view class="business-cooperation">
|
||||
<view class="f-36 c000 bus-coo-title">服务商入住</view>
|
||||
<u--form labelPosition="left" :model="model1" :rules="rules" ref="uForm">
|
||||
<view class="bus-coo-form-item">
|
||||
<u-form-item label="公司名称" prop="modelInfo.companyName" ref="item1" labelWidth="180rpx">
|
||||
<u-input v-model="model1.modelInfo.companyName" border="none" placeholder="请输入公司名称">
|
||||
<template slot="suffix">
|
||||
<view>/这是公司名</view>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bus-coo-form-item">
|
||||
<u-form-item label="入住类目" prop="modelInfo.category" ref="item1" labelWidth="180rpx" @click="openCategory" >
|
||||
<u-input v-model="category" border="none" placeholder="请选择入住类目">
|
||||
<template slot="suffix">
|
||||
<u-icon name="arrow-down-fill" color="#999" size="16"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bus-coo-form-item">
|
||||
<u-form-item label="开通板块" prop="modelInfo.plate" ref="item1" labelWidth="180rpx" @click="showPlate = true">
|
||||
<u-input v-model="plate" border="none" placeholder="请选择开通板块">
|
||||
<template slot="suffix">
|
||||
<u-icon name="arrow-down-fill" color="#999" size="16"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bus-coo-form-item">
|
||||
<u-form-item label="联系人" prop="modelInfo.contactName" ref="item1" labelWidth="180rpx">
|
||||
<u-input v-model="model1.modelInfo.contactName" border="none" placeholder="请输入联系人"> </u-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bus-coo-form-item">
|
||||
<u-form-item label="手机号码" prop="modelInfo.phone" ref="item1" labelWidth="180rpx">
|
||||
<u-input v-model="model1.modelInfo.phone" maxlength='11' border="none" placeholder="请输入手机号码"> </u-input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="bus-coo-form-butt">
|
||||
<u-button type="primary" shape="circle" text="提交" color="#333333" @click="submitFn"
|
||||
:customStyle='{height: "96rpx",fontSize: "28rpx"}'></u-button>
|
||||
</view>
|
||||
</u--form>
|
||||
<view class="bus-coo-annotation f-24 c999">
|
||||
<view>如果需要其他类型的商务合作,请联系我们</view>
|
||||
<view>400-1569-258</view>
|
||||
</view>
|
||||
<u-action-sheet
|
||||
:show="showPlate"
|
||||
:actions="actions"
|
||||
title="请选择开通板块"
|
||||
@close="showPlate = false"
|
||||
@select="plateSelect"
|
||||
>
|
||||
</u-action-sheet>
|
||||
<u-action-sheet
|
||||
:show="showCategory"
|
||||
:actions="actions1"
|
||||
title="请选择入住类目"
|
||||
@close="showCategory = false"
|
||||
@select="categorySelect"
|
||||
>
|
||||
</u-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addCooperationAPI,categoryListAPI} from '@/api/mine/business_cooperation.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
model1: {
|
||||
modelInfo: {
|
||||
companyName:'',
|
||||
category:'',
|
||||
plate:'',
|
||||
contactName:'',
|
||||
phone:'',
|
||||
},
|
||||
},
|
||||
category:'',
|
||||
plate:'',
|
||||
rules: {
|
||||
'userInfo.companyName': {
|
||||
required: true,
|
||||
message: '请填写',
|
||||
trigger: ['blur', 'change']
|
||||
},'userInfo.category': {
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: ['blur', 'change']
|
||||
},'userInfo.plate': {
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: ['blur', 'change']
|
||||
},'userInfo.contactName': {
|
||||
required: true,
|
||||
message: '请填写',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.phone': [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入手机号',
|
||||
trigger: ['change','blur'],
|
||||
},
|
||||
{
|
||||
// 自定义验证函数
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// uni.$u.test.mobile()就是返回true或者false的
|
||||
return uni.$u.test.mobile(value);
|
||||
},
|
||||
message: '手机号码不正确',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change','blur'],
|
||||
}
|
||||
]
|
||||
},
|
||||
showPlate:false,
|
||||
actions:[
|
||||
{id:1,name: '车商'},
|
||||
{id:2,name: '维修店'},
|
||||
],
|
||||
showCategory:false,
|
||||
actions1:[],
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.categoryList()
|
||||
},
|
||||
methods: {
|
||||
openCategory(){
|
||||
this.showCategory=true
|
||||
// console.log(this.actions1,'999999999999999999999');
|
||||
},
|
||||
categoryList(){
|
||||
categoryListAPI().then(res=>{
|
||||
// console.log(res,'1111');
|
||||
// this.actions1=res.data
|
||||
res.data.forEach(ele => {
|
||||
ele.name=ele.categoryName
|
||||
});
|
||||
this.actions1=res.data
|
||||
})
|
||||
},
|
||||
plateSelect(e) {
|
||||
// console.log(e,'开通板块');
|
||||
this.model1.modelInfo.plate = e.id
|
||||
this.plate=e.name
|
||||
this.$refs.uForm.validateField('plate')
|
||||
},
|
||||
categorySelect(e) {
|
||||
// console.log(e,'类目e');
|
||||
this.model1.modelInfo.category = e.id
|
||||
this.category=e.name
|
||||
this.$refs.uForm.validateField('category')
|
||||
},
|
||||
//提交
|
||||
submitFn(){
|
||||
addCooperationAPI(this.model1.modelInfo).then(res=>{
|
||||
uni.redirectTo({
|
||||
url:'/pages/driver/mine/business_cooperation/submit'
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
onReady() {
|
||||
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
||||
this.$refs.uForm.setRules(this.rules)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.business-cooperation {
|
||||
padding: 32rpx;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
.bus-coo-annotation{
|
||||
width: 686rpx;
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
text-align: center;
|
||||
view{
|
||||
margin: 10rpx auto;
|
||||
}
|
||||
}
|
||||
.bus-coo-title {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.bus-coo-form-item {
|
||||
height: 112rpx;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.bus-coo-form-butt{
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
45
pages/driver/mine/business_cooperation/submit.vue
Normal file
45
pages/driver/mine/business_cooperation/submit.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<view class="submit">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/serve/real_result_submit.png`" mode=""></image>
|
||||
<view>你的表单已提交成功,请耐心等待我们联系您!</view>
|
||||
<view class="submit-butt">
|
||||
<u-button type="primary" shape="circle" text="返回首页" color="#13AFA8" @click="navBackFn"
|
||||
:customStyle='{height: "80rpx",fontSize: "28rpx",width:"264rpx"}'></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navBackFn() {
|
||||
uni.switchTab({
|
||||
url: '/pages/driver/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.submit {
|
||||
text-align: center;
|
||||
|
||||
.submit-butt {
|
||||
margin-top: 96rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 148rpx;
|
||||
height: 148rpx;
|
||||
margin-top: 136rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -169,7 +169,7 @@
|
||||
})
|
||||
},
|
||||
tabMune(item) {
|
||||
// console.log(item);
|
||||
console.log(item,'123456789');
|
||||
this.$tab.navigateTo(item.url)
|
||||
},
|
||||
// 关注 粉丝
|
||||
|
||||
Reference in New Issue
Block a user