提现,师傅入驻页面开发
This commit is contained in:
parent
90d85ca1b7
commit
ed03a373dd
|
|
@ -71,29 +71,14 @@ export default {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:调用小程序服务端确认是否是授权登录过的用户
|
|
||||||
let loginRes = {
|
|
||||||
logined: false,
|
|
||||||
userInfo: {}
|
|
||||||
};
|
|
||||||
// 未登录过的获取微信用户信息
|
|
||||||
if (!loginRes.logined) {
|
|
||||||
userInfo = await wx.getUserProfile({
|
userInfo = await wx.getUserProfile({
|
||||||
desc: '用于小程序登录'
|
desc: '用于小程序登录'
|
||||||
});
|
});
|
||||||
|
console.log("从微信获取基本用户信息:" + userInfo);
|
||||||
// 获取微信登录凭证
|
// 获取微信登录凭证
|
||||||
const wxLoginRes = await wx.login();
|
const wxLoginRes = await wx.login();
|
||||||
console.log(wxLoginRes)
|
console.log(wxLoginRes)
|
||||||
// 再次请求小程序服务端存储用户,服务端添加附加用户信息后返回
|
// 获取openid
|
||||||
loginRes = {
|
|
||||||
logined: true,
|
|
||||||
userInfo: {
|
|
||||||
...userInfo,
|
|
||||||
userId: 1,
|
|
||||||
wxLoginCode: wxLoginRes.code
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const wxAuthRes = await uni.request({
|
const wxAuthRes = await uni.request({
|
||||||
url: '/wx/auth',
|
url: '/wx/auth',
|
||||||
header: {
|
header: {
|
||||||
|
|
@ -101,11 +86,32 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(wxAuthRes)
|
console.log(wxAuthRes)
|
||||||
loginRes.userInfo.openId = wxAuthRes[1].data.data.openid;
|
const openId = wxAuthRes[1].data.data.openid;
|
||||||
|
// 第一次从服务端获取用户信息
|
||||||
|
let wxGetUserRes = await this.qryUserInfo(openId);
|
||||||
|
// 获取失败则获取微信信息再调用注册接口
|
||||||
|
if (!wxGetUserRes.data) {
|
||||||
|
// 注册完成后再次从服务端获取用户信息
|
||||||
|
let registerRes = await this.registerUser({
|
||||||
|
openId: openId,
|
||||||
|
name: userInfo.userInfo.nickName,
|
||||||
|
customerLogoUrl: userInfo.userInfo.avatarUrl,
|
||||||
|
status: 0
|
||||||
|
});
|
||||||
|
if (registerRes.code === 0) {
|
||||||
|
wxGetUserRes = await this.qryUserInfo(openId);
|
||||||
}
|
}
|
||||||
userInfo = loginRes.userInfo;
|
}
|
||||||
|
if (!wxGetUserRes.data) {
|
||||||
if (!userInfo) {
|
userInfo = null;
|
||||||
|
} else {
|
||||||
|
userInfo = {
|
||||||
|
...wxGetUserRes.data,
|
||||||
|
wxLoginCode: wxLoginRes.code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log("通过后台服务获取用户信息:" + userInfo);
|
||||||
|
if (!userInfo || userInfo.customerId == null || userInfo.customerId == undefined) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: '微信用户信息获取失败,请退出小程序重试'
|
title: '微信用户信息获取失败,请退出小程序重试'
|
||||||
|
|
@ -116,6 +122,24 @@ export default {
|
||||||
uni.setStorageSync('userProfile', userInfo);
|
uni.setStorageSync('userProfile', userInfo);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
async registerUser(params = {}) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/wx/addUser',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
|
},
|
||||||
|
async qryUserInfo(openId) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/wx/getUserInfo',
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
openId: openId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
|
},
|
||||||
getCurUserInfo() {
|
getCurUserInfo() {
|
||||||
let userProfile = uni.getStorageSync('userProfile');
|
let userProfile = uni.getStorageSync('userProfile');
|
||||||
return userProfile;
|
return userProfile;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<text>{{label}}</text>
|
<text>{{label}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="uni-combox__input-box">
|
<view class="uni-combox__input-box">
|
||||||
<input class="uni-combox__input" type="text" :placeholder="placeholder"
|
<input class="uni-combox__input" type="text" :placeholder="placeholder" @click="toggleSelector" disabled
|
||||||
placeholder-class="uni-combox__input-plac" v-model="inputVal[showField]" @input="onInput" @focus="onFocus"
|
placeholder-class="uni-combox__input-plac" v-model="inputVal[showField]" @input="onInput" @focus="onFocus"
|
||||||
@blur="onBlur" />
|
@blur="onBlur" />
|
||||||
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
|
||||||
|
|
|
||||||
31
pages.json
31
pages.json
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"pages": [{
|
"pages": [{
|
||||||
// "path": "pages/index/index"
|
"path": "pages/index/index"
|
||||||
"path": "pages/my/master-occupancy"
|
|
||||||
}],
|
}],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
"root": "pages/area-proxy/",
|
"root": "pages/area-proxy/",
|
||||||
|
|
@ -22,22 +21,24 @@
|
||||||
"pages": [{
|
"pages": [{
|
||||||
"path": "order-manage"
|
"path": "order-manage"
|
||||||
}, {
|
}, {
|
||||||
"path":"serv-detail"
|
"path": "serv-detail"
|
||||||
}, {
|
}, {
|
||||||
"path": "finish-order"
|
"path": "finish-order"
|
||||||
}]
|
}]
|
||||||
}
|
}, {
|
||||||
// {
|
"root": "pages/my/",
|
||||||
// "root": "pages/my/",
|
"pages": [{
|
||||||
// "pages": [{
|
"path": "new-serv"
|
||||||
// "path": "new-serv"
|
}, {
|
||||||
// }, {
|
"path": "goods-manage"
|
||||||
// "path": "goods-manage"
|
}, {
|
||||||
// }, {
|
"path": "master-occupancy"
|
||||||
// "path": "master-occupancy"
|
}, {
|
||||||
// }]
|
"path": "withdraw"
|
||||||
// }
|
}, {
|
||||||
],
|
"path": "bank-account-bind"
|
||||||
|
}]
|
||||||
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "black"
|
"navigationBarTextStyle": "black"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="padding bg-main-color" :style="'padding-top: ' + pageContentTop + 'px; padding-bottom: 100rpx;'">
|
<view class="padding bg-gradual-color" :style="'padding-top: ' + pageContentTop + 'px; padding-bottom: 100rpx;'">
|
||||||
<!-- 个人信息栏 -->
|
<!-- 个人信息栏 -->
|
||||||
<view class="flex justify-between padding-bottom align-center solid-bottom">
|
<view class="flex justify-between padding-bottom align-center solid-bottom">
|
||||||
<view class="flex justify-start align-center">
|
<view class="flex justify-start align-center">
|
||||||
<view class="cu-avatar round"
|
<view class="cu-avatar round"
|
||||||
:style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.userInfo.avatarUrl + ');'"></view>
|
:style="'width: 120rpx; height: 120rpx; background-image:url(' + curUserInfo.customerLogoUrl + ');'"></view>
|
||||||
<view class="margin-lr-sm">
|
<view class="margin-lr-sm">
|
||||||
<view class="text-xl margin-bottom-xs">{{curUserInfo.userInfo.nickName}}</view>
|
<view class="text-xl margin-bottom-xs">{{curUserInfo.name}}</view>
|
||||||
<!-- <view class="padding-xs text-sm">
|
<!-- <view class="padding-xs text-sm">
|
||||||
<view class='cu-tag bg-white radius'>编辑</view>
|
<view class='cu-tag bg-white radius'>编辑</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
this.curUserInfo = uni.getStorageSync('userProfile');
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
console.log(this.curUserInfo)
|
console.log(this.curUserInfo)
|
||||||
this.isAuthWxLoginModal = this.curUserInfo ? false : true;
|
this.isAuthWxLoginModal = this.curUserInfo ? false : true;
|
||||||
if (!this.isAuthWxLoginModal) {
|
if (!this.isAuthWxLoginModal) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="bg-main-color padding text-center"
|
<view class="bg-gradual-color padding text-center"
|
||||||
:style="'padding-top: ' + pageContentTop + 'px; padding-bottom: 100rpx;'">
|
:style="'padding-top: ' + pageContentTop + 'px; padding-bottom: 100rpx;'">
|
||||||
<view class="cu-avatar round"
|
<view class="cu-avatar round"
|
||||||
:style="'width: 150rpx; height: 150rpx; background-image:url(' + curUserInfo.userInfo.avatarUrl + ');'">
|
:style="'width: 150rpx; height: 150rpx; background-image:url(' + curUserInfo.customerLogoUrl + ');'">
|
||||||
</view>
|
</view>
|
||||||
<view class="text-xl margin-sm">{{curUserInfo.userInfo.nickName}}</view>
|
<view class="text-xl margin-sm">{{curUserInfo.name}}</view>
|
||||||
<view class="cu-list grid no-border col-2" style="background-color: inherit;">
|
<view class="cu-list grid no-border col-2" style="background-color: inherit;">
|
||||||
<view class="cu-item">
|
<view class="cu-item">
|
||||||
<view class="margin-bottom-xs text-xxl">{{myInfo.balance}}</view>
|
<view class="margin-bottom-xs text-xxl">{{myInfo.balance}}</view>
|
||||||
|
|
@ -65,7 +65,8 @@
|
||||||
myInfo: {},
|
myInfo: {},
|
||||||
menuList: [{
|
menuList: [{
|
||||||
name: '提现',
|
name: '提现',
|
||||||
icon: 'moneybag'
|
icon: 'moneybag',
|
||||||
|
pageUrl: '/pages/my/withdraw'
|
||||||
}, {
|
}, {
|
||||||
name: '交易明细',
|
name: '交易明细',
|
||||||
icon: 'form'
|
icon: 'form'
|
||||||
|
|
@ -74,7 +75,8 @@
|
||||||
icon: 'calendar'
|
icon: 'calendar'
|
||||||
}, {
|
}, {
|
||||||
name: '师傅入驻',
|
name: '师傅入驻',
|
||||||
icon: 'profile'
|
icon: 'profile',
|
||||||
|
pageUrl: '/pages/my/master-occupancy'
|
||||||
}, {
|
}, {
|
||||||
name: '商品管理',
|
name: '商品管理',
|
||||||
icon: 'goods',
|
icon: 'goods',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 顶部操作条 -->
|
||||||
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">帐号绑定/修改</block>
|
||||||
|
</cu-custom>
|
||||||
|
<view class="margin-lr-sm margin-tb-lg shadow-warp">
|
||||||
|
<view class="bg-gray flex justify-start align-center text-xl padding-lr padding-top-xs">
|
||||||
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '0' ? 'curTab' : ''" data-type="0" @click="changAccountType">支付宝</view>
|
||||||
|
<view class="padding-lr padding-tb-sm" :class="curAccountType === '1' ? 'curTab' : ''" data-type="1" @click="changAccountType">银行卡</view>
|
||||||
|
</view>
|
||||||
|
<!-- 支付宝 -->
|
||||||
|
<view v-if="curAccountType == '0'" class="bg-white padding text-lg">
|
||||||
|
<view>
|
||||||
|
<view class="margin-bottom-sm">开户人姓名</view>
|
||||||
|
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||||
|
</view>
|
||||||
|
<view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">支付宝账户</view>
|
||||||
|
<input type="digit" placeholder="请输入支付宝账户" placeholder-style="color:#989898" v-model="formData.account">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 银行卡 -->
|
||||||
|
<view v-else-if="curAccountType === '1'" class="bg-white padding text-lg">
|
||||||
|
<view>
|
||||||
|
<view class="margin-bottom-sm">开户人姓名</view>
|
||||||
|
<input type="digit" placeholder="请输入开户人姓名" placeholder-style="color:#989898" v-model="formData.name">
|
||||||
|
</view>
|
||||||
|
<view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">银行名称</view>
|
||||||
|
<input type="digit" placeholder="请输入银行名称" placeholder-style="color:#989898" v-model="formData.bankName">
|
||||||
|
</view>
|
||||||
|
<view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">银行卡号</view>
|
||||||
|
<input type="digit" placeholder="请输入银行卡号" placeholder-style="color:#989898" v-model="formData.bankCardNum">
|
||||||
|
</view>
|
||||||
|
<view class="margin-top">
|
||||||
|
<view class="margin-bottom-sm">银行卡号开户城市</view>
|
||||||
|
<view class="flex">
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="provinceList"
|
||||||
|
:showField="'areaName'" placeholder="选择省份" v-model="formData.provinceObj"
|
||||||
|
@input="chooseRegion($event)"></my-uni-combox>
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="cityList"
|
||||||
|
:showField="'areaName'" placeholder="选择城市" v-model="formData.cityObj"></my-uni-combox>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<view class="cu-bar tabbar border shop">
|
||||||
|
<button class="bg-main-color long-btn margin-lr" @click="submit">提交</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
myUniCombox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
curAccountType: '0',
|
||||||
|
provinceList: [],
|
||||||
|
cityList: [],
|
||||||
|
formData: {
|
||||||
|
provinceObj: {},
|
||||||
|
cityObj: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async loadData() {
|
||||||
|
let res = await this.$request.areaListByStep();
|
||||||
|
this.provinceList = res.data;
|
||||||
|
},
|
||||||
|
async chooseRegion(e) {
|
||||||
|
let res = await this.$request.areaListByStep({
|
||||||
|
parentCode: e.areaCode
|
||||||
|
});
|
||||||
|
this.cityList = res.data;
|
||||||
|
this.formData.cityObj = {}
|
||||||
|
},
|
||||||
|
changAccountType(e) {
|
||||||
|
this.curAccountType = e.currentTarget.dataset.type;
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
console.log(this.formData)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.curTab {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #0081ff;
|
||||||
|
border-radius: 15rpx 15rpx 0 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 服务区域 -->
|
||||||
<view v-if="curStep === 0">
|
<view v-if="curStep === 0">
|
||||||
<view class="margin-bottom-with-bar">
|
<view class="margin-bottom-with-bar">
|
||||||
<view class="bg-white margin-top-sm" v-for="(item, index) in servArea">
|
<view class="bg-white margin-top-sm" v-for="(item, index) in servArea">
|
||||||
|
|
@ -39,7 +40,9 @@
|
||||||
</view>
|
</view>
|
||||||
<checkbox-group @change="checkStreet($event, index)" class="grid col-2 margin-top-xs">
|
<checkbox-group @change="checkStreet($event, index)" class="grid col-2 margin-top-xs">
|
||||||
<view v-for="(item0, index0) in servArea[index].streetList" class="margin-tb-xs">
|
<view v-for="(item0, index0) in servArea[index].streetList" class="margin-tb-xs">
|
||||||
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="item0.areaCode" :checked="servArea[index].streetIds.indexOf(item0.areaCode) !== -1 ? true : false">
|
<checkbox style="transform:scale(1)" class="main-color margin-right-xs"
|
||||||
|
:value="item0.areaCode"
|
||||||
|
:checked="servArea[index].streetIds.indexOf(String(item0.areaCode)) !== -1 ? true : false">
|
||||||
</checkbox>
|
</checkbox>
|
||||||
<text>{{item0.areaName}}</text>
|
<text>{{item0.areaName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -55,14 +58,137 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 下一步 -->
|
<!-- 下一步 -->
|
||||||
<view class="cu-bar tabbar border shop fixed-bottom-bar bg-back">
|
<view class="cu-bar tabbar border shop fixed-bottom-bar bg-back">
|
||||||
<button class="bg-main-color long-btn margin-lr" form-type="submit">下一步</button>
|
<button class="bg-main-color long-btn margin-lr" @click="nextStep">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 服务技能 -->
|
||||||
<view v-if="curStep === 1" class="margin-top-sm">
|
<view v-if="curStep === 1" class="margin-top-sm">
|
||||||
|
<view class="margin-bottom-with-bar">
|
||||||
|
<view class="bg-white margin-top-sm" v-for="(item, index) in servSkill">
|
||||||
|
<view class="cu-bar padding-lr solid-bottom">
|
||||||
|
<view class="text-lg">
|
||||||
|
<text class="cuIcon-titles"></text>
|
||||||
|
<text>服务技能{{index + 1}}(将按服务技能派单)</text>
|
||||||
|
</view>
|
||||||
|
<view @click="delServSkill(index)">
|
||||||
|
<text class="text-main-color">删除</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding">
|
||||||
|
<view class="flex">
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="typeList"
|
||||||
|
:showField="'goodsCategoryName'" placeholder="请选择" v-model="servSkill[index].typeObj"
|
||||||
|
@input="chooseType($event, 0, index)"></my-uni-combox>
|
||||||
|
<my-uni-combox class="flex-sub" :candidates="servSkill[index].subTypeList"
|
||||||
|
:showField="'goodsCategoryName'" placeholder="请选择" v-model="servSkill[index].subTypeObj"
|
||||||
|
@input="chooseType($event, 1, index)"></my-uni-combox>
|
||||||
|
</view>
|
||||||
|
<checkbox-group @change="checkGoodType($event, index)" class="grid col-3 margin-top-xs">
|
||||||
|
<view v-for="(item0, index0) in servSkill[index].subSubTypeList" class="margin-tb-xs">
|
||||||
|
<checkbox style="transform:scale(1)" class="main-color margin-right-xs"
|
||||||
|
:value="item0.goodsCategoryId"
|
||||||
|
:checked="servSkill[index].subSubTypeIds.indexOf(String(item0.goodsCategoryId)) !== -1 ? true : false">
|
||||||
|
</checkbox>
|
||||||
|
<text>{{item0.goodsCategoryName}}</text>
|
||||||
|
</view>
|
||||||
|
</checkbox-group>
|
||||||
|
<view>
|
||||||
|
<input type="text" class="radius-input" placeholder="输入其他服务,用“,”隔开。"
|
||||||
|
v-model="servSkill[index].otherServSkill">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-center margin-top">
|
||||||
|
<button class="cu-btn bg-main-color light" @click="addServSkill">
|
||||||
|
<text class="margin-right-xs"><text class="cuIcon-add"></text></text>
|
||||||
|
<text>继续添加服务技能</text>
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 下一步 -->
|
||||||
|
<view class="cu-bar tabbar border shop fixed-bottom-bar bg-back">
|
||||||
|
<button class="bg-white long-btn margin-lr" @click="preStep">上一步</button>
|
||||||
|
<button class="bg-main-color long-btn margin-lr" @click="nextStep">下一步</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="curStep === 2" class="margin-top-sm">
|
<view v-if="curStep === 2" class="margin-top-sm">
|
||||||
|
<view class="margin-bottom-with-bar">
|
||||||
|
<view class="bg-white margin-top-sm" v-for="(item, index) in specialSkill">
|
||||||
|
<view class="cu-bar padding-lr solid-bottom">
|
||||||
|
<view class="text-lg">
|
||||||
|
<text class="cuIcon-titles"></text>
|
||||||
|
<text>特殊技能{{index + 1}}(特殊工种如空调安装等请上传)</text>
|
||||||
|
</view>
|
||||||
|
<view @click="delSpecialSkill(index)">
|
||||||
|
<text class="text-main-color">删除</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="padding">
|
||||||
|
<view class="flex align-center">
|
||||||
|
<text>特殊技能:</text>
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs" :candidates="specialTypeList"
|
||||||
|
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||||
|
v-model="specialSkill[index].specialTypeObj" @input="chooseSpecialSkill($event, 0, index)">
|
||||||
|
</my-uni-combox>
|
||||||
|
<my-uni-combox class="flex-sub margin-right-xs"
|
||||||
|
:candidates="specialSkill[index].specialSubTypeList" :showField="'goodsCategoryName'"
|
||||||
|
placeholder="请选择" v-model="specialSkill[index].specialSubTypeObj"
|
||||||
|
@input="chooseSpecialSkill($event, 1, index)"></my-uni-combox>
|
||||||
|
<my-uni-combox class="flex-sub" :candidates="specialSkill[index].specialSubSubTypeList"
|
||||||
|
:showField="'goodsCategoryName'" placeholder="请选择"
|
||||||
|
v-model="specialSkill[index].specialSubSubTypeObj"
|
||||||
|
@input="chooseSpecialSkill($event, 2, index)"></my-uni-combox>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start align-center margin-top-sm">
|
||||||
|
<view>技能证书:</view>
|
||||||
|
<view class="grid col-1 upload-pic-grid grid-square flex-sub">
|
||||||
|
<view class="bg-img" v-for="(url, index0) in specialSkill[index].skillCert" :key="index0"
|
||||||
|
@tap="viewImage($event, specialSkill[index].skillCert)" :data-url="url">
|
||||||
|
<image :src="url" mode="aspectFill"></image>
|
||||||
|
<view class="cu-tag bg-red" @tap.stop="delImg($event, specialSkill[index].skillCert)" :data-index="index0">
|
||||||
|
<text class='cuIcon-close'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="solids" @tap="chooseImage($event, specialSkill[index].skillCert)" v-if="specialSkill[index].skillCert.length < 2">
|
||||||
|
<text class='cuIcon-cameraadd'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start align-center margin-top-sm">
|
||||||
|
<view>保险证明:</view>
|
||||||
|
<view class="grid col-1 upload-pic-grid grid-square flex-sub">
|
||||||
|
<view class="bg-img" v-for="(url, index0) in specialSkill[index].insurCert" :key="index0"
|
||||||
|
@tap="viewImage($event, specialSkill[index].insurCert)" :data-url="url">
|
||||||
|
<image :src="url" mode="aspectFill"></image>
|
||||||
|
<view class="cu-tag bg-red" @tap.stop="delImg($event, specialSkill[index].insurCert)" :data-index="index0">
|
||||||
|
<text class='cuIcon-close'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="solids" @tap="chooseImage($event, specialSkill[index].insurCert)" v-if="specialSkill[index].insurCert.length < 2">
|
||||||
|
<text class='cuIcon-cameraadd'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex justify-start align-center">
|
||||||
|
<view>保险日期:</view>
|
||||||
|
<uni-datetime-picker style="width: 75%;"
|
||||||
|
:value="[specialSkill[index].insurStartDate, specialSkill[index].insurEndDate]"
|
||||||
|
type="datetimerange" rangeSeparator="~" @change="changeInsurDate($event, index)" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-center margin-top">
|
||||||
|
<button class="cu-btn bg-main-color light" @click="addSpecialSkill">
|
||||||
|
<text class="margin-right-xs"><text class="cuIcon-add"></text></text>
|
||||||
|
<text>继续添加特殊技能</text>
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 下一步 -->
|
||||||
|
<view class="cu-bar tabbar border shop fixed-bottom-bar bg-back">
|
||||||
|
<button class="bg-white long-btn margin-lr" @click="preStep">上一步</button>
|
||||||
|
<button class="bg-main-color long-btn margin-lr" @click="submit">提交</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -90,34 +216,46 @@
|
||||||
cityObj: {},
|
cityObj: {},
|
||||||
districtObj: {},
|
districtObj: {},
|
||||||
streetIds: []
|
streetIds: []
|
||||||
}]
|
}],
|
||||||
|
typeList: [],
|
||||||
|
servSkill: [{
|
||||||
|
subTypeList: [],
|
||||||
|
subSubTypeList: [],
|
||||||
|
typeObj: {},
|
||||||
|
subTypeObj: {},
|
||||||
|
subSubTypeIds: [],
|
||||||
|
otherServSkill: null
|
||||||
|
}],
|
||||||
|
specialTypeList: [],
|
||||||
|
specialSkill: [{
|
||||||
|
specialSubTypeList: [],
|
||||||
|
specialSubSubTypeList: [],
|
||||||
|
specialTypeObj: {},
|
||||||
|
specialSubTypeObj: {},
|
||||||
|
specialSubSubTypeObj: {},
|
||||||
|
skillCert: [],
|
||||||
|
insurCert: [],
|
||||||
|
insurStartDate: '',
|
||||||
|
insurEndDate: ''
|
||||||
|
}],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData() {
|
loadData() {
|
||||||
this.loadProvinceList();
|
this.loadProvinceList();
|
||||||
|
this.loadTypeList();
|
||||||
|
this.loadSpecialSkill();
|
||||||
},
|
},
|
||||||
|
/* 服务区域 start */
|
||||||
async loadProvinceList() {
|
async loadProvinceList() {
|
||||||
let res = await this.$request.areaListByStep();
|
let res = await this.$request.areaListByStep();
|
||||||
this.provinceList = res.data;
|
this.provinceList = res.data;
|
||||||
},
|
},
|
||||||
async chooseRegion(e, type, index) {
|
async chooseRegion(e, type, index) {
|
||||||
let that = this;
|
|
||||||
let res = await this.$request.areaListByStep({
|
let res = await this.$request.areaListByStep({
|
||||||
parentCode: e.areaCode
|
parentCode: e.areaCode
|
||||||
});
|
});
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// if (index > this.servArea.length - 1) {
|
|
||||||
// this.servArea.push({
|
|
||||||
// cityList: [],
|
|
||||||
// districtList: [],
|
|
||||||
// streetList: [],
|
|
||||||
// provinceObj: e,
|
|
||||||
// cityObj: {},
|
|
||||||
// districtObj: {},
|
|
||||||
// streetIds: []
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0: {
|
case 0: {
|
||||||
this.servArea[index].cityList = res.data;
|
this.servArea[index].cityList = res.data;
|
||||||
|
|
@ -146,16 +284,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkStreet(e, index) {
|
checkStreet(e, index) {
|
||||||
// let that = this;
|
|
||||||
let checkedIndexArr = e.detail.value;
|
let checkedIndexArr = e.detail.value;
|
||||||
// let streetIds = [];
|
|
||||||
// checkedIndexArr.forEach((checkedIndex) => {
|
|
||||||
// console.log("areaCode:" + that.servArea[index].streetList[checkedIndex].areaCode);
|
|
||||||
// streetIds.push(that.servArea[index].streetList[checkedIndex].areaCode)
|
|
||||||
// });
|
|
||||||
console.log(checkedIndexArr)
|
|
||||||
this.servArea[index].streetIds = checkedIndexArr;
|
this.servArea[index].streetIds = checkedIndexArr;
|
||||||
console.log(this.servArea[index].streetIds)
|
|
||||||
},
|
},
|
||||||
addServArea() {
|
addServArea() {
|
||||||
this.servArea.push({
|
this.servArea.push({
|
||||||
|
|
@ -170,14 +300,149 @@
|
||||||
},
|
},
|
||||||
delServArea(index) {
|
delServArea(index) {
|
||||||
this.servArea.splice(index, 1);
|
this.servArea.splice(index, 1);
|
||||||
console.log(this.servArea)
|
|
||||||
},
|
},
|
||||||
|
/* 服务区域 end */
|
||||||
|
/* 服务技能 start */
|
||||||
|
async loadTypeList() {
|
||||||
|
let res = await this.$request.listByStep();
|
||||||
|
this.typeList = res.data;
|
||||||
|
},
|
||||||
|
async chooseType(e, type, index) {
|
||||||
|
let res = await this.$request.listByStep({
|
||||||
|
goodsCategoryId: e.goodsCategoryId
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
switch (type) {
|
||||||
|
case 0: {
|
||||||
|
this.servSkill[index].subTypeList = res.data;
|
||||||
|
this.servSkill[index].subSubTypeList = [];
|
||||||
|
this.servSkill[index].subTypeObj = {};
|
||||||
|
this.servSkill[index].subSubTypeIds = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1: {
|
||||||
|
this.servSkill[index].subSubTypeList = res.data;
|
||||||
|
this.servSkill[index].subSubTypeIds = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkGoodType(e, index) {
|
||||||
|
let checkedIndexArr = e.detail.value;
|
||||||
|
this.servSkill[index].subSubTypeIds = checkedIndexArr;
|
||||||
|
},
|
||||||
|
addServSkill() {
|
||||||
|
this.servSkill.push({
|
||||||
|
subTypeList: [],
|
||||||
|
subSubTypeList: [],
|
||||||
|
typeObj: {},
|
||||||
|
subTypeObj: {},
|
||||||
|
subSubTypeIds: [],
|
||||||
|
otherServSkill: null
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delServSkill(index) {
|
||||||
|
this.servSkill.splice(index, 1);
|
||||||
|
},
|
||||||
|
/* 服务技能 end */
|
||||||
|
/* 特殊技能 start */
|
||||||
|
async loadSpecialSkill() {
|
||||||
|
let res = await this.$request.listByStep();
|
||||||
|
this.specialTypeList = res.data;
|
||||||
|
},
|
||||||
|
async chooseSpecialSkill(e, type, index) {
|
||||||
|
let res = await this.$request.listByStep({
|
||||||
|
goodsCategoryId: e.goodsCategoryId
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
switch (type) {
|
||||||
|
case 0: {
|
||||||
|
this.specialSkill[index].specialSubTypeList = res.data;
|
||||||
|
this.specialSkill[index].specialSubSubTypeList = [];
|
||||||
|
this.specialSkill[index].specialSubTypeObj = {};
|
||||||
|
this.specialSkill[index].specialSubSubTypeObj = {};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1: {
|
||||||
|
this.specialSkill[index].specialSubSubTypeList = res.data;
|
||||||
|
this.specialSkill[index].specialSubSubTypeObj = {};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addSpecialSkill() {
|
||||||
|
this.specialSkill.push({
|
||||||
|
specialSubTypeList: [],
|
||||||
|
specialSubSubTypeList: [],
|
||||||
|
specialTypeObj: {},
|
||||||
|
specialSubTypeObj: {},
|
||||||
|
specialSubSubTypeObj: {},
|
||||||
|
skillCert: [],
|
||||||
|
insurCert: [],
|
||||||
|
insurStartDate: '',
|
||||||
|
insurEndDate: ''
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delSpecialSkill(index) {
|
||||||
|
this.specialSkill.splice(index, 1);
|
||||||
|
},
|
||||||
|
changeInsurDate(e, index) {
|
||||||
|
this.specialSkill[index].insurStartDate = e[0];
|
||||||
|
this.specialSkill[index].insurEndDate = e[1];
|
||||||
|
},
|
||||||
|
async chooseImage(e, imgList) {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 2, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['album'], //从相册选择
|
||||||
|
success: (res) => {
|
||||||
|
// 上传图片
|
||||||
|
this.$request.uploadFile(res.tempFilePaths[0]).then((uploadRes) => {
|
||||||
|
// 成功后才存入缓存
|
||||||
|
if (uploadRes.code === 0) {
|
||||||
|
imgList.push(uploadRes.url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
viewImage(e, imgList) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: imgList,
|
||||||
|
current: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delImg(e, imgList) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: '确定要删除这张图片吗?',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确定',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
imgList.splice(e.currentTarget.dataset.index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/* 特殊技能 end */
|
||||||
nextStep() {
|
nextStep() {
|
||||||
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep
|
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep;
|
||||||
|
console.log(this.servSkill)
|
||||||
},
|
},
|
||||||
preStep() {
|
preStep() {
|
||||||
this.curStep = this.curStep === 0 ? 0 : --this.curStep
|
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
|
||||||
|
console.log(this.servSkill)
|
||||||
},
|
},
|
||||||
|
submit() {
|
||||||
|
console.log(this.specialSkill)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -186,4 +451,18 @@
|
||||||
/deep/ .uni-combox__selector {
|
/deep/ .uni-combox__selector {
|
||||||
z-index: 99 !important;
|
z-index: 99 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid.col-1.grid-square.upload-pic-grid>view {
|
||||||
|
padding-bottom: 35%;
|
||||||
|
height: 0;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid.col-1.upload-pic-grid>view {
|
||||||
|
width: 35%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-date__x-input {
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 顶部操作条 -->
|
||||||
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">我的钱包</block>
|
||||||
|
</cu-custom>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 顶部操作条 -->
|
||||||
|
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
<block slot="content">提现</block>
|
||||||
|
</cu-custom>
|
||||||
|
<view class="margin-lr-sm margin-tb-lg shadow-warp">
|
||||||
|
<view class="bg-gray flex justify-between align-center text-xl padding" @click="bindAccount">
|
||||||
|
<view>提现帐号绑定</view>
|
||||||
|
<view><text class="cuIcon-right"></text></view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white padding solid-bottom">
|
||||||
|
<view class="text-right text-lg">
|
||||||
|
<text>可提现金额:</text>
|
||||||
|
<text class="text-red text-price">{{balance}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="text-lg margin-bottom-sm">提现金额</view>
|
||||||
|
<view class="text-xxl solid-bottom flex justify-start align-baseline">
|
||||||
|
<text class="margin-right-xs text-bold">¥</text>
|
||||||
|
<input type="digit" placeholder="请输入金额" placeholder-style="color:#989898" style="height: 80rpx;">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white padding">
|
||||||
|
<view class="text-lg margin-bottom-sm">发票凭证(电子票)</view>
|
||||||
|
<view class="grid col-3 grid-square flex-sub">
|
||||||
|
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
|
||||||
|
@tap="viewImage($event)" :data-url="item">
|
||||||
|
<image :src="item" mode="aspectFill"></image>
|
||||||
|
<view class="cu-tag bg-red" @tap.stop="delImg($event)" :data-index="index">
|
||||||
|
<text class='cuIcon-close'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="solids" @tap="chooseImage" v-if="imgList.length < 9">
|
||||||
|
<text class='cuIcon-cameraadd'></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 操作按钮 -->
|
||||||
|
<view class="cu-bar tabbar border shop">
|
||||||
|
<button class="bg-main-color long-btn margin-lr" @click="withdraw">提现</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
balance: '0.00',
|
||||||
|
imgList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
bindAccount() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/my/bank-account-bind'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
chooseImage(e) {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 9, //默认9
|
||||||
|
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||||
|
sourceType: ['album'], //从相册选择
|
||||||
|
success: (res) => {
|
||||||
|
if (this.imgList.length != 0) {
|
||||||
|
this.imgList = this.imgList.concat(res.tempFilePaths)
|
||||||
|
} else {
|
||||||
|
this.imgList = res.tempFilePaths
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
viewImage(e) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: this.imgList,
|
||||||
|
current: e.currentTarget.dataset.url
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delImg(e) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '',
|
||||||
|
content: '确定要删除这张图片吗?',
|
||||||
|
cancelText: '取消',
|
||||||
|
confirmText: '确定',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.imgList.splice(e.currentTarget.dataset.index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
withdraw() {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue