You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
988 lines
26 KiB
988 lines
26 KiB
<template>
|
|
<view class="serviceIn" v-if="loadlogo">
|
|
<view class="from">
|
|
<view class="title">基础信息</view>
|
|
<view class="fromItem">
|
|
<view class="fromName">
|
|
联系人
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
<view class="fromContent"><input type="text" class="inputs" v-model="artificer.name" value="" placeholder-class="col-9" placeholder="请输入姓名" /></view>
|
|
</view>
|
|
<view class="fromItem">
|
|
<view class="fromName">性别</view>
|
|
<view class="fromContent">
|
|
<radio-group class="dis-flex f-28" style="justify-content: flex-end;" @change="radioChange">
|
|
<label
|
|
class="uni-list-cell uni-list-cell-pd dis-flex"
|
|
:style="{ paddingRight: index != 1 ? '50rpx' : '0px' }"
|
|
v-for="(item, index) in items"
|
|
:key="item.value"
|
|
>
|
|
<view><radio color="#70A8FD" :value="item.value" :checked="index === current" /></view>
|
|
<view>{{ item.name }}</view>
|
|
</label>
|
|
</radio-group>
|
|
</view>
|
|
</view>
|
|
<view class="fromItem">
|
|
<view class="fromName">
|
|
手机号
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
<view class="fromContent">
|
|
<input type="number" maxlength="11" v-model="artificer.mobile" class="inputs" value="" placeholder-class="col-9" placeholder="请输入手机号码" />
|
|
</view>
|
|
</view>
|
|
<view class="fromItem">
|
|
<view class="fromName">
|
|
联系地址
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
<view class="fromContent" style="overflow: hidden;" @click="goLocation">
|
|
<input type="number" v-if="!artificer.address" maxlength="11" disabled class="inputLeft" value="" placeholder-class="col-9" placeholder="点击定位详细地址" />
|
|
<view v-else class="f-28 col-3">{{ artificer.address }}</view>
|
|
</view>
|
|
<view class="textbox t-r f-28 c-ff4444" @click="goLocation">
|
|
定位
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
</view>
|
|
<view class="fromItem" style="line-height: 0;height: auto;">
|
|
<view class="fromName" style="line-height: 110upx;">
|
|
服务类型
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
<view class="fromContent" style="padding: 30upx 0;" @click="showoccupation = true">
|
|
<input
|
|
type="number"
|
|
v-if="artificer.catearray.length == 0"
|
|
maxlength="11"
|
|
style="line-height: 40upx;height: 50upx;"
|
|
disabled
|
|
class="inputLeft"
|
|
value=""
|
|
placeholder-class="col-9"
|
|
placeholder="点击选择所属服务"
|
|
/>
|
|
<view v-else class="f-28 col-3">
|
|
<view class="check-item" v-for="(item, index) in artificer.catearray" :key="index">
|
|
{{ item.title }}
|
|
<image :src="imgfixUrls + 'homemakingImg/imgcolse.png'" mode="" @click.stop="deletcheck(item.id)"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="iconfont icon-right t-r f-28" style="font-size: 28upx;color: #999999;line-height: 110upx;" @click="showoccupation = true"></view>
|
|
</view>
|
|
<view class="fromItem" style="line-height: 0;height: auto;border: none;">
|
|
<view class="fromName" style="line-height: 110upx;">
|
|
服务区域
|
|
<text class="f-20 c-ff4444">*</text>
|
|
</view>
|
|
<view class="fromContent" style="padding: 30upx 0;" @click="showodistrict = true">
|
|
<input
|
|
type="number"
|
|
v-if="artificer.region.length == 0"
|
|
maxlength="11"
|
|
style="line-height: 40upx;height: 50upx;"
|
|
disabled
|
|
class="inputLeft"
|
|
value=""
|
|
placeholder-class="col-9"
|
|
placeholder="点击选择服务区域"
|
|
/>
|
|
<view v-else class="f-28 col-3">
|
|
<view class="check-item" v-for="(item, index) in artificer.region" :key="index">
|
|
{{ item.name }}
|
|
<!-- <image :src="imgfixUrls + 'homemakingImg/imgcolse.png'" mode="" @click.stop="deletcheck(item.id)"></image> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="iconfont icon-right t-r f-28" style="font-size: 28upx;color: #999999;line-height: 110upx;" @click="showodistrict = true"></view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="line"></view>
|
|
<view class="addTag">
|
|
<view class="f-32 col-3 f-w">添加标签</view>
|
|
<view class="tag">
|
|
<view class="tag-item" v-for="(item, index) in artificer.tagarray" :key="index" @click="deletTag(index)">
|
|
{{ item }}
|
|
<view class="iconfont icon-close icong"></view>
|
|
</view>
|
|
<view class="addbtn iconfont icon-add" @click="addshow = true"></view>
|
|
</view>
|
|
</view> -->
|
|
<view class="line"></view>
|
|
<view class="workingPhoto">
|
|
<view class="f-32 f-w">入驻头像</view>
|
|
<view class="f-24 col-9" style="padding-top: 20upx;">(上传真实的照片,更容易接单成功)</view>
|
|
<view class="imgs">
|
|
<view class="img-item" v-if="artificer.thumb">
|
|
<image :src="artificer.thumb" mode=""></image>
|
|
<image class="imgclise" @click="deletImg(1,index)" :src="imgfixUrls + 'homemakingImg/imgcolse.png'" mode=""></image>
|
|
</view>
|
|
<view class="img-item" @click="uploadFiles(1, 1)" v-else><image :src="imgfixUrls + 'homemakingImg/upload.png'" mode=""></image></view>
|
|
</view>
|
|
</view>
|
|
<view class="line"></view>
|
|
<view class="workingPhoto">
|
|
<view class="f-32 f-w">工作照片</view>
|
|
<view class="f-24 col-9" style="padding-top: 20upx;">(上传真实的照片,最多上传5张,推荐尺寸750x430)</view>
|
|
<view class="imgs">
|
|
<view class="img-item" v-for="(item, index) in artificer.thumbs" :key="index">
|
|
<image :src="item" mode=""></image>
|
|
<image class="imgclise" @click="deletImg(2,index)" :src="imgfixUrls + 'homemakingImg/imgcolse.png'" mode=""></image>
|
|
</view>
|
|
<view class="img-item" @click="uploadFiles(2, 5)" v-if="artificer.thumbs.length < 5"><image :src="imgfixUrls + 'homemakingImg/upload.png'" mode=""></image></view>
|
|
</view>
|
|
</view>
|
|
<view class="line"></view>
|
|
<view class="workingPhoto">
|
|
<view class="f-32 f-w">真实案例</view>
|
|
<view class="f-24 col-9" style="padding-top: 20upx;">(上传真实案例,最多上传9张照片)</view>
|
|
<view class="imgs">
|
|
<view class="img-item" v-for="(item, index) in artificer.casethumbs" :key="index">
|
|
<image :src="item" mode=""></image>
|
|
<image class="imgclise" @click="deletImg(3,index)" :src="imgfixUrls + 'homemakingImg/imgcolse.png'" mode=""></image>
|
|
</view>
|
|
<view class="img-item" @click="uploadFiles(3, 9)" v-if="artificer.casethumbs.length < 9">
|
|
<image :src="imgfixUrls + 'homemakingImg/upload.png'" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="line" v-if="meals"></view>
|
|
<view class="from" v-if="meals">
|
|
<view class="f-32 f-w">入驻套餐</view>
|
|
<view class="fromItem" style="border: none;">
|
|
<view class="fromName">套餐选择</view>
|
|
<view class="fromContent f-28">
|
|
<picker @change="Change" :value="index" :range="meals" range-key="name">
|
|
<view class="uni-input">{{ meals[index].name }}</view>
|
|
</picker>
|
|
<view class=" t-r iconfont icon-right" style="font-size: 24upx;color: #333333;"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="issue" @click="issueclick">立即入驻</view>
|
|
<PopManager :show="addshow" :type="'center'" :overlay="'false'" :showOverlay="'false'" @clickmask="addshow = false">
|
|
<view class="addbox">
|
|
<view class="addinput"><input type="text" v-model="newTag" class="input" value="" /></view>
|
|
<view class="dis-flex btnbox f-30">
|
|
<view class="btnleft" @click="closeAdd">取消</view>
|
|
<view class="btnright" @click="addtagItem">确定</view>
|
|
</view>
|
|
</view>
|
|
</PopManager>
|
|
<PopManager :show="showoccupation" :type="'bottom'" :overlay="'false'" :showOverlay="'false'" @clickmask="showoccupation = false">
|
|
<view class="cicupation">
|
|
<view class="cicupation-left">
|
|
<view :class="item.checked ? 'left-item' : 'left-nocheck'" v-for="(item, index) in cate" :key="index" @click="checkLeft(item.id)">{{ item.title }}</view>
|
|
</view>
|
|
<view class="cicupation-right">
|
|
<view :class="item.checked ? 'right-item' : 'right-nocheck'" v-for="(item, index) in rightList" :key="index" @click="checkRight(item.id)">
|
|
{{ item.title }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</PopManager>
|
|
<PopManager :show="showodistrict" :type="'bottom'" :overlay="'false'" :showOverlay="'false'" @clickmask="showodistrict = false">
|
|
<view class="district">
|
|
<view :class="item.checked ? 'district-item' : 'district-nocheck'" v-for="(item, index) in areas" :key="index" @click="checkCity(item.id)">{{ item.name }}</view>
|
|
</view>
|
|
</PopManager>
|
|
<!-- #ifdef H5 -->
|
|
<PopManager :show="isOpenLaction" :type="'bottom'" :overlay="'false'" :showOverlay="'false'">
|
|
<view class="iframe-wid-hgt" :style="{ height: phoneHight, width: phoneWidth }" v-if="latlngs.latitude">
|
|
<iframe
|
|
id="mapPage"
|
|
width="100%"
|
|
height="100%"
|
|
frameborder="0"
|
|
:src="
|
|
`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=KIQBZ-6OT3G-AOMQD-IHW6J-PEUDV-VCFAF&referer=myapp&coord=${latlngs.latitude},${
|
|
latlngs.longitude
|
|
}`
|
|
"
|
|
></iframe>
|
|
</view>
|
|
<view class="iframe-wid-hgt" :style="{ height: phoneHight, width: phoneWidth }" v-if="!latlngs.latitude">
|
|
<iframe
|
|
id="mapPage"
|
|
width="100%"
|
|
height="100%"
|
|
frameborder="0"
|
|
:src="`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=KIQBZ-6OT3G-AOMQD-IHW6J-PEUDV-VCFAF&referer=myapp`"
|
|
></iframe>
|
|
</view>
|
|
</PopManager>
|
|
<!-- <TabBars :tabBarAct="0" pageType="18"></TabBars> -->
|
|
<!-- #endif -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import App from '@/common/js/app.js';
|
|
import PopManager from '@/components/template/PopManager';
|
|
import TabBars from '@/components/template/tabBar.vue';
|
|
// #ifdef H5
|
|
import wxApi from '@/common/js/wxApi.js';
|
|
// #endif
|
|
export default {
|
|
data() {
|
|
return {
|
|
index: 0,
|
|
items: [
|
|
{
|
|
value: '1',
|
|
name: '男'
|
|
},
|
|
{
|
|
value: '2',
|
|
name: '女'
|
|
}
|
|
],
|
|
current: 0,
|
|
isOpenLaction: false,
|
|
phoneHight: null,
|
|
phoneWidth: null,
|
|
latlngs: {},
|
|
site: '',
|
|
loadlogo: false,
|
|
showoccupation: false,
|
|
areas: [],
|
|
artificer: {},
|
|
cate: [],
|
|
meals: [],
|
|
rightList: [],
|
|
showodistrict: false,
|
|
addshow: false,
|
|
newTag: '',
|
|
localIds: null,
|
|
uploadlength: 0,
|
|
id: '',
|
|
userInfo:{},
|
|
lblis:{},
|
|
islocation:false
|
|
};
|
|
},
|
|
components: {
|
|
PopManager,
|
|
TabBars
|
|
},
|
|
onLoad(e) {
|
|
let _this = this;
|
|
_this.id = e.id || '';
|
|
_this.latlngs = uni.getStorageSync('curLoction');
|
|
uni.getSystemInfo({
|
|
success(res) {
|
|
console.log(res);
|
|
_this.phoneHight = res.windowHeight + 'px';
|
|
_this.phoneWidth = res.windowWidth + 'px';
|
|
}
|
|
});
|
|
this.getinitialize();
|
|
},
|
|
onShow() {
|
|
let _this = this;
|
|
let lblis = {};
|
|
if(!this.islocation){
|
|
this.getinitialize();
|
|
}else{
|
|
this.islocation = false;
|
|
}
|
|
// #ifdef H5
|
|
window.addEventListener(
|
|
'message',
|
|
function(event) {
|
|
// 接收位置信息,用户选择确认位置点后选点组件会触发该事件,回传用户的位置信息
|
|
let loc = event.data;
|
|
_this.islocation = true;
|
|
if (loc && loc.module == 'locationPicker') {
|
|
lblis = {
|
|
lat: loc.latlng.lat,
|
|
lng: loc.latlng.lng,
|
|
detailed_address: loc.poiaddress
|
|
};
|
|
_this.artificer.address = loc.poiaddress;
|
|
_this.artificer.lat = loc.latlng.lat;
|
|
_this.artificer.lng = loc.latlng.lng;
|
|
_this.isOpenLaction = false;
|
|
}
|
|
},
|
|
false
|
|
);
|
|
|
|
// #endif
|
|
//#ifdef APP-PLUS
|
|
if(_this.userInfo.address){
|
|
let bilis = {
|
|
detailed_address: _this.userInfo.address,
|
|
lat: _this.userInfo.lat,
|
|
lng: _this.userInfo.lng
|
|
};
|
|
_this.artificer.address = _this.userInfo.address;
|
|
_this.artificer.lat = _this.userInfo.lat;
|
|
_this.artificer.lng = _this.userInfo.lng;
|
|
}
|
|
//#endif
|
|
},
|
|
methods: {
|
|
deletImg(type,index){
|
|
if(type == 1){
|
|
this.artificer.thumb = '';
|
|
}else if(type == 2){
|
|
this.artificer.thumbs.splice(index,1);
|
|
}else{
|
|
this.artificer.casethumbs.splice(index,1);
|
|
}
|
|
},
|
|
Change(e) {
|
|
console.log(e);
|
|
this.index = e.detail.value;
|
|
},
|
|
issueclick() {
|
|
let _this = this;
|
|
let artificer = JSON.parse(JSON.stringify(_this.artificer));
|
|
if (!artificer.name) {
|
|
uni.showToast({
|
|
title: '联系人不能为空',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (!artificer.mobile) {
|
|
uni.showToast({
|
|
title: '手机号不能为空',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (!artificer.address) {
|
|
uni.showToast({
|
|
title: '详细地址不能为空',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (artificer.region.length == 0) {
|
|
uni.showToast({
|
|
title: '请至少选择一个服务区域',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
if (artificer.catearray.length == 0) {
|
|
uni.showToast({
|
|
title: '请至少选择一个服务类型',
|
|
icon: 'none'
|
|
});
|
|
return;
|
|
}
|
|
let data = {
|
|
artificerinfo: null,
|
|
id:_this.id || artificer.id,
|
|
}
|
|
if (_this.meals) {
|
|
data = {
|
|
mealid: _this.meals[_this.index].id
|
|
};
|
|
}
|
|
|
|
artificer.gender = _this.items[_this.current].value;
|
|
let catearray = [];
|
|
let region = [];
|
|
|
|
artificer.catearray.map((item, index) => {
|
|
catearray.push(item.id);
|
|
});
|
|
artificer.region.map((item, index) => {
|
|
region.push(item.id);
|
|
});
|
|
artificer.region = region;
|
|
artificer.catearray = catearray;
|
|
console.log(artificer);
|
|
let storehours = JSON.stringify(artificer);
|
|
let base64 = new this.$util.Base64();
|
|
storehours = base64.encode(storehours);
|
|
data.artificerinfo = storehours;
|
|
App._post_form(
|
|
`&p=housekeep&do=editArtificerApi`,
|
|
data,
|
|
res => {
|
|
if(res.data.orderid == 0){
|
|
App.navigationTo({
|
|
url: 'pages/subPages2/homemaking/homeUser/homeUser',
|
|
navType:'reLaunch'
|
|
});
|
|
}else{
|
|
App.navigationTo({
|
|
url: 'pages/mainPages/payment/payment?orderid=' + res.data.orderid + '&plugin=housekeep',
|
|
navType:'reLaunch'
|
|
});
|
|
}
|
|
|
|
},
|
|
false,
|
|
() => {}
|
|
);
|
|
},
|
|
deletTag(index) {
|
|
this.artificer.tagarray.splice(index, 1);
|
|
},
|
|
uplodephone(length, localIds, type) {
|
|
let _this = this;
|
|
wxApi.uoloadIg(localIds[length], data => {
|
|
if (data.errMsg === 'uploadImage:ok') {
|
|
uni.showLoading({});
|
|
let requestData = {
|
|
upload_type: 2,
|
|
id: data.serverId
|
|
};
|
|
App._post_form(
|
|
'&do=uploadFiles',
|
|
requestData,
|
|
res => {
|
|
if (res.errno === 0) {
|
|
let num = length + 1;
|
|
if (type == 2) {
|
|
_this.artificer.thumbs.push(res.data.img);
|
|
} else if(type ==3){
|
|
_this.artificer.casethumbs.push(res.data.img);
|
|
}else{
|
|
_this.artificer.thumb = res.data.img;
|
|
}
|
|
|
|
if (num < _this.uploadlength) {
|
|
uni.setTimeout(_this.uplodephone(num, _this.localIds, type), 500);
|
|
}
|
|
}
|
|
},
|
|
false,
|
|
() => {
|
|
uni.hideLoading();
|
|
}
|
|
);
|
|
} else {
|
|
uni.hideLoading();
|
|
App.showError('上传失败');
|
|
}
|
|
});
|
|
},
|
|
// 文件上传接口
|
|
async uploadFiles(type, num) {
|
|
let _this = this;
|
|
_this.islocation = true;
|
|
// _this.uoloadIgs(i, 0, res, type);
|
|
// #ifdef H5
|
|
if(App.getClientType() == 2){
|
|
let res = await App.browser_upload(num);
|
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
|
let aa = await App._upLoad(res.tempFilePaths[i]);
|
|
if (type == 2) {
|
|
_this.artificer.thumbs.push(aa.data.img);
|
|
// _this.userInfo.thumbs.push(aa.data.image);
|
|
console.log(_this.artificer.thumbs, aa.data.img);
|
|
} else if(type == 3){
|
|
_this.artificer.casethumbs.push(aa.data.img);
|
|
}else{
|
|
_this.artificer.thumb = aa.data.img;
|
|
}
|
|
}
|
|
return
|
|
}
|
|
wxApi.choseImage(res => {
|
|
// let length
|
|
_this.localIds = res.localIds;
|
|
_this.uploadlength = res.localIds.length;
|
|
_this.uplodephone(0, _this.localIds, type);
|
|
}, num);
|
|
// #endif
|
|
// #ifndef H5
|
|
wx.chooseImage({
|
|
count: num,
|
|
sourceType: ['album', 'camera'],
|
|
success: async function(res) {
|
|
// console.log(_this.userInfo.havestore, _this.page, '-------');
|
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
|
let aa = await App._upLoad(res.tempFilePaths[i]);
|
|
if (type == 2) {
|
|
_this.artificer.thumbs.push(aa.data.img);
|
|
// _this.userInfo.thumbs.push(aa.data.image);
|
|
console.log(_this.artificer.thumbs, aa.data.img);
|
|
} else if(type == 3){
|
|
_this.artificer.casethumbs.push(aa.data.img);
|
|
}else{
|
|
_this.artificer.thumb = aa.data.img;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
// #endif
|
|
},
|
|
addtagItem() {
|
|
if (!this.newTag) {
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '新增标签不能为空'
|
|
});
|
|
return;
|
|
}
|
|
this.artificer.tagarray.push(this.newTag);
|
|
this.addshow = false;
|
|
this.newTag = '';
|
|
},
|
|
closeAdd() {
|
|
this.addshow = false;
|
|
this.newTag = '';
|
|
},
|
|
checkCity(id) {
|
|
let _this = this;
|
|
_this.areas.map((item, index) => {
|
|
if (item.id == id) {
|
|
item.checked = !item.checked;
|
|
if (item.checked) {
|
|
_this.artificer.region.push(item);
|
|
} else {
|
|
_this.artificer.region.map((items, indexs) => {
|
|
if (items.id == id) {
|
|
_this.artificer.region.splice(indexs, 1);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
_this.loadlogo = !_this.loadlogo;
|
|
_this.loadlogo = !_this.loadlogo;
|
|
},
|
|
deletcheck(id) {
|
|
let _this = this;
|
|
_this.cate.map((item, index) => {
|
|
item.list.map((items, indexs) => {
|
|
if (items.id == id) {
|
|
items.checked = false;
|
|
}
|
|
});
|
|
});
|
|
_this.artificer.catearray.map((items, indexs) => {
|
|
if (items.id == id) {
|
|
_this.artificer.catearray.splice(indexs, 1);
|
|
}
|
|
});
|
|
_this.rightList.map((items, indexs) => {
|
|
if (items.id == id) {
|
|
items.checked = false;
|
|
}
|
|
});
|
|
},
|
|
checkRight(id) {
|
|
let _this = this;
|
|
_this.rightList.map((item, index) => {
|
|
// item.checked = false;
|
|
if (item.id == id) {
|
|
item.checked = !item.checked;
|
|
|
|
if (item.checked) {
|
|
_this.artificer.catearray.push(item);
|
|
} else {
|
|
_this.artificer.catearray.map((items, indexs) => {
|
|
if (items.id == item.id) {
|
|
_this.artificer.catearray.splice(indexs, 1);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
_this.loadlogo = !_this.loadlogo;
|
|
_this.loadlogo = !_this.loadlogo;
|
|
},
|
|
checkLeft(id) {
|
|
let _this = this;
|
|
_this.cate.map((item, index) => {
|
|
item.checked = false;
|
|
if (item.id == id) {
|
|
item.checked = true;
|
|
_this.rightList = item.list;
|
|
}
|
|
});
|
|
_this.loadlogo = !_this.loadlogo;
|
|
_this.loadlogo = !_this.loadlogo;
|
|
},
|
|
getinitialize() {
|
|
let _this = this;
|
|
App._post_form(
|
|
`&p=housekeep&do=editArtificerPage`,
|
|
{ id: this.id },
|
|
res => {
|
|
console.log(res);
|
|
_this.areas = res.data.areas;
|
|
_this.artificer = res.data.artificer;
|
|
if (!_this.artificer.region) _this.artificer.region = [];
|
|
let region = [];
|
|
_this.areas.map((item, index) => {
|
|
item.checked = false;
|
|
});
|
|
_this.artificer.region.map((item,index)=>{
|
|
_this.areas.map((items,indexs)=>{
|
|
if(items.id == item){
|
|
items.checked = true;
|
|
region.push(items);
|
|
}
|
|
})
|
|
});
|
|
_this.artificer.region = region;
|
|
_this.cate = res.data.cate;
|
|
_this.meals = res.data.meals || null;
|
|
_this.items.map((item,index)=>{
|
|
if(item.value == _this.artificer.gender){
|
|
_this.current = index;
|
|
}
|
|
})
|
|
_this.cate.map((item, index) => {
|
|
item.checked = false;
|
|
item.list.map((items, indexs) => {
|
|
items.checked = false;
|
|
_this.artificer.catearray.map((itemis,index)=>{
|
|
if(items.id == itemis.id){
|
|
items.checked = true;
|
|
}
|
|
})
|
|
});
|
|
});
|
|
_this.loadlogo = true;
|
|
},fail=>{
|
|
if(fail.data.message == '认证后才能入驻成为服务者'){
|
|
App.navigationTo({
|
|
url: `pages/subPages/attestationCenter/index?rzType=1&type=1`,
|
|
navType:'reLaunch',
|
|
});
|
|
}
|
|
console.log(fail)
|
|
});
|
|
},
|
|
radioChange(e) {
|
|
console.log(e.target.value);
|
|
this.items.map((item, index) => {
|
|
if (item.value == e.target.value) {
|
|
this.current = index;
|
|
}
|
|
});
|
|
},
|
|
goLocation() {
|
|
let _this = this;
|
|
_this.upimg = true;
|
|
// #ifdef MP-WEIXIN
|
|
uni.chooseLocation({
|
|
keyword: '',
|
|
success: function(e) {
|
|
let bilis = {
|
|
detailed_address: e.address,
|
|
lat: e.latitude,
|
|
lng: e.longitude
|
|
};
|
|
_this.artificer.address = e.address;
|
|
_this.artificer.lat = e.latitude;
|
|
_this.artificer.lng = e.longitude;
|
|
_this.islocation = true;
|
|
}
|
|
});
|
|
// #endif
|
|
// #ifdef H5
|
|
_this.isOpenLaction = true;
|
|
// #endif
|
|
//#ifdef APP-PLUS
|
|
App.navigationTo({
|
|
url: 'pages/subPages2/map/index'
|
|
});
|
|
//#endif
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.serviceIn {
|
|
padding-bottom: 100upx;
|
|
.from {
|
|
padding: 30upx 30upx 0;
|
|
.title {
|
|
font-size: 32upx;
|
|
font-weight: bold;
|
|
color: #333333;
|
|
}
|
|
.fromItem {
|
|
display: flex;
|
|
height: 110upx;
|
|
line-height: 110upx;
|
|
border-bottom: 1upx solid #eeeeee;
|
|
.fromName {
|
|
width: 172upx;
|
|
font-size: 28upx;
|
|
color: #333333;
|
|
}
|
|
.fromContent {
|
|
flex: 1;
|
|
.inputs {
|
|
font-size: 28upx;
|
|
height: 110upx;
|
|
line-height: 110upx;
|
|
width: 100%;
|
|
text-align: right;
|
|
}
|
|
.inputLeft {
|
|
font-size: 28upx;
|
|
height: 110upx;
|
|
line-height: 110upx;
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
.check-item {
|
|
padding: 0 10upx;
|
|
border-radius: 10upx;
|
|
background-color: #ff4444;
|
|
color: #ffffff;
|
|
height: 40upx;
|
|
line-height: 40upx;
|
|
text-align: center;
|
|
display: inline-block;
|
|
margin-right: 10upx;
|
|
margin-bottom: 10upx;
|
|
position: relative;
|
|
image {
|
|
width: 30upx;
|
|
height: 30upx;
|
|
margin-top: 5upx;
|
|
vertical-align: top;
|
|
margin-left: 10upx;
|
|
}
|
|
}
|
|
}
|
|
.textbox {
|
|
width: 116upx;
|
|
border-left: 1upx solid #eeeeee;
|
|
margin: 20upx 0;
|
|
line-height: 70upx;
|
|
}
|
|
}
|
|
}
|
|
.workingPhoto {
|
|
padding: 30upx;
|
|
.imgs {
|
|
padding: 30upx 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-content: flex-center;
|
|
align-items: center;
|
|
justify-content: left;
|
|
.img-item {
|
|
height: 158upx;
|
|
border-radius: 20upx;
|
|
flex: auto;
|
|
margin: 10upx;
|
|
width: 158upx;
|
|
min-width: 158upx;
|
|
max-width: 158upx;
|
|
position: relative;
|
|
image {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 20upx;
|
|
}
|
|
.imgclise {
|
|
width: 30upx;
|
|
height: 30upx;
|
|
position: absolute;
|
|
right: 10upx;
|
|
top: 10upx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.line {
|
|
height: 20upx;
|
|
background-color: #f8f8f8;
|
|
}
|
|
.addTag {
|
|
padding: 30upx;
|
|
.tag {
|
|
padding: 30upx 0;
|
|
.tag-item {
|
|
padding: 0 70upx 0 30upx;
|
|
height: 50upx;
|
|
line-height: 50upx;
|
|
font-size: 24upx;
|
|
color: #333333;
|
|
border: 1upx solid #707070;
|
|
border-radius: 60upx;
|
|
display: inline-block;
|
|
position: relative;
|
|
margin-right: 30upx;
|
|
margin-bottom: 20upx;
|
|
.icong {
|
|
position: absolute;
|
|
right: 20upx;
|
|
top: -5upx;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
.addbtn {
|
|
font-size: 20upx;
|
|
width: 50upx;
|
|
background: linear-gradient(360deg, #6096fd 0%, #6ea6fd 100%);
|
|
height: 50upx;
|
|
line-height: 50upx;
|
|
border-radius: 50%;
|
|
text-align: center;
|
|
color: #ffffff;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
}
|
|
.issue {
|
|
width: 750upx;
|
|
height: 90upx;
|
|
background: linear-gradient(360deg, #6094fd 0%, #70a8fd 100%);
|
|
line-height: 90upx;
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
text-align: center;
|
|
font-size: 32upx;
|
|
color: #ffffff;
|
|
font-weight: bold;
|
|
border-radius: 30upx 30upx 0 0;
|
|
}
|
|
.addbox {
|
|
width: 630upx;
|
|
padding: 30upx;
|
|
background-color: #ffffff;
|
|
border-radius: 20upx;
|
|
box-sizing: border-box;
|
|
.addinput {
|
|
padding: 30upx;
|
|
border: 1upx solid #eeeeee;
|
|
border-radius: 20upx;
|
|
.input {
|
|
font-size: 28upx;
|
|
}
|
|
}
|
|
.btnbox {
|
|
.btnleft {
|
|
flex: 1;
|
|
margin: 30upx 30upx 0 0;
|
|
height: 60upx;
|
|
line-height: 60upx;
|
|
text-align: center;
|
|
border-radius: 60upx;
|
|
background-color: #ffffff;
|
|
border: 1upx solid #eeeeee;
|
|
color: #333333;
|
|
}
|
|
.btnright {
|
|
flex: 1;
|
|
margin: 30upx 0upx 0 30upx;
|
|
background-color: #ff4444;
|
|
height: 60upx;
|
|
line-height: 60upx;
|
|
text-align: center;
|
|
border-radius: 60upx;
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
}
|
|
.cicupation {
|
|
width: 750upx;
|
|
height: 550upx;
|
|
padding: 30upx;
|
|
box-sizing: border-box;
|
|
background-color: #ffffff;
|
|
border-radius: 30upx 30upx 0 0;
|
|
display: flex;
|
|
.cicupation-left {
|
|
padding-right: 10upx;
|
|
height: 450upx;
|
|
flex: 1;
|
|
overflow: auto;
|
|
.left-item {
|
|
line-height: 60upx;
|
|
font-size: 26upx;
|
|
text-align: center;
|
|
background-color: #ff4444;
|
|
color: #ffffff;
|
|
border-bottom: 1upx solid #eeeeee;
|
|
border-radius: 15upx;
|
|
margin-bottom: 20upx;
|
|
font-weight: bold;
|
|
}
|
|
.left-nocheck {
|
|
line-height: 60upx;
|
|
font-size: 26upx;
|
|
text-align: center;
|
|
background-color: #f8f8f8;
|
|
border-bottom: 1upx solid #eeeeee;
|
|
border-radius: 15upx;
|
|
margin-bottom: 20upx;
|
|
}
|
|
}
|
|
.cicupation-right {
|
|
flex: 1;
|
|
padding-left: 10upx;
|
|
height: 450upx;
|
|
overflow: auto;
|
|
.right-item {
|
|
line-height: 60upx;
|
|
font-size: 26upx;
|
|
text-align: center;
|
|
background-color: #ff4444;
|
|
border-bottom: 1upx solid #eeeeee;
|
|
border-radius: 15upx;
|
|
margin-bottom: 20upx;
|
|
color: #ffffff;
|
|
}
|
|
.right-nocheck {
|
|
line-height: 60upx;
|
|
font-size: 26upx;
|
|
text-align: center;
|
|
background-color: #f8f8f8;
|
|
border-bottom: 1upx solid #eeeeee;
|
|
border-radius: 15upx;
|
|
margin-bottom: 20upx;
|
|
}
|
|
}
|
|
}
|
|
.district {
|
|
width: 750upx;
|
|
height: 550upx;
|
|
padding: 30upx;
|
|
box-sizing: border-box;
|
|
border-radius: 30upx 30upx 0 0;
|
|
background-color: #ffffff;
|
|
.district-item {
|
|
height: 50upx;
|
|
line-height: 50upx;
|
|
padding: 0 20upx;
|
|
margin-right: 10upx;
|
|
margin-bottom: 10upx;
|
|
text-align: center;
|
|
font-size: 28upx;
|
|
color: #ffffff;
|
|
border-radius: 10upx;
|
|
background-color: #ff4444;
|
|
display: inline-block;
|
|
}
|
|
.district-nocheck {
|
|
height: 50upx;
|
|
line-height: 50upx;
|
|
padding: 0 20upx;
|
|
margin-right: 10upx;
|
|
margin-bottom: 10upx;
|
|
text-align: center;
|
|
font-size: 28upx;
|
|
color: #333333;
|
|
border-radius: 10upx;
|
|
background-color: #f8f8f8;
|
|
// border: 1upx solid #EEEEEE;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|