Browse Source

上传

master
前端-胡立永 6 months ago
parent
commit
10c8105d29
17 changed files with 114 additions and 45 deletions
  1. +1
    -1
      service-uniapp-client/.env
  2. +21
    -4
      service-uniapp-client/mixins/order.js
  3. +3
    -6
      service-uniapp-client/pages/index/index.vue
  4. +1
    -1
      service-uniapp-client/pages/index/order.vue
  5. +7
    -2
      service-uniapp-client/pages/index/technician.vue
  6. +9
    -2
      service-uniapp-client/pages/mine/distribution.vue
  7. +1
    -1
      service-uniapp-client/pages/mine/settled.vue
  8. +2
    -2
      service-uniapp-client/pages/mine/wallet.vue
  9. +1
    -1
      service-uniapp-client/pages/mine/withdraw.vue
  10. +8
    -6
      service-uniapp-client/pages/order/payOrder.vue
  11. +1
    -1
      service-uniapp-client/plugins/utils.js
  12. +1
    -1
      service-uniapp-technician/.env
  13. +2
    -3
      service-uniapp-technician/pages/login/mobile.vue
  14. +1
    -1
      service-uniapp-technician/pages/mine/settled.vue
  15. +53
    -13
      service-uniapp-technician/pages/mine/wallet.vue
  16. +2
    -0
      service-uniapp-technician/plugins/api.js
  17. BIN
      service-uniapp-technician/static/icons/icon7.png

+ 1
- 1
service-uniapp-client/.env View File

@ -1,7 +1,7 @@
# 开发环境
#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api
#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api-three
#VITE_REDIRECT_URI=http://tairoudj.natapp1.cc
# 生产环境


+ 21
- 4
service-uniapp-client/mixins/order.js View File

@ -1,4 +1,5 @@
import { showConfirmDialog } from 'vant';
import { showDialog } from 'vant';
export default {
@ -39,17 +40,33 @@ export default {
//立即支付
toPayOrder(item) {
this.$api('immediatelyPay', {
let data = {
addressId: item.addressId,
couponId: item.couponId,
orderId: item.id,
payType: item.payType,
remark: item.remark,
serviceTime: item.serviceTime
}, res => {
}
// if(item.couponId){
// data.couponId = couponId
// }
this.$api('immediatelyPay', data, res => {
if (res.code == 200) {
this.$wxPay(res, this.getOrderList, this.getOrderList)
if (item.payType == 1) { //余额支付
showDialog({
title: '支付成功',
message: '订单支付成功!请前往订单查看',
}).then(() => {
this.active = 2
});
}else{
this.$wxPay(res, this.getOrderList, this.getOrderList)
}
}
this.getOrderList()
})
},
}

+ 3
- 6
service-uniapp-client/pages/index/index.vue View File

@ -43,7 +43,7 @@
</van-swipe>
</view> -->
<view class="search">
<!-- <view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/home/address-icon.png"></image>
@ -63,7 +63,7 @@
</view>
</view>
</view>
</view> -->
<view v-if="projectList.length > 0" class="server-list">
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" ref="list"
@ -107,10 +107,7 @@
<van-empty v-else image="/static/empty/data.png" image-size="400rpx" description="暂无项目" />
<view class="copyToken"
@click="copyToken">
复制token
</view>
</view>
<selectArea :show="showAeraPro" @close="closeAreaPro" @select="selectArea"></selectArea>


+ 1
- 1
service-uniapp-client/pages/index/order.vue View File

@ -66,7 +66,7 @@
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3 && item.evaluated != 1">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">


+ 7
- 2
service-uniapp-client/pages/index/technician.vue View File

@ -14,7 +14,7 @@
<view class="center-area">
<image src="@/static/home/search-icon.png"></image>
<van-field v-model="queryParams.title" :clearable="true" @clear="clearKey" center placeholder="请输入技师" />
<van-field v-model="queryParams.title" :clearable="true" @clear="clearKey" center placeholder="请输入技师" />
</view>
<view class="right-area">
@ -63,8 +63,8 @@
}
},
onShow() {
this.getTechnicianList()
this.initUserArea()
this.getTechnicianList()
},
methods: {
//list
@ -102,8 +102,12 @@
this.area = area;
this.showAeraPro = false;
this.queryParams.county = area
//
this.updateSessionPositon(area)
this.getTechnicianList()
},
//
@ -124,6 +128,7 @@
if(!sessionStorage.getItem('position')) return this.getLocation() //()
let positionInfo = JSON.parse(sessionStorage.getItem('position'))
this.area = positionInfo.addressDetail.district
this.queryParams.county = this.area
},
//


+ 9
- 2
service-uniapp-client/pages/mine/distribution.vue View File

@ -21,8 +21,8 @@
<view @click="toNodes">
<text>粉丝</text>
</view>
<view @click="toWithdraw">
<text>提现</text>
<view>
<text v-if="userInfo.isDai =='Y'" @click="toWithdraw">提现</text>
</view>
<view @click="showQrcode">
<text>二维码</text>
@ -87,6 +87,13 @@
this.$api('getUserInfo', {}, res => {
if (res.code == 200) {
this.userInfo = res.result;
if(this.userInfo.isDai == 'Y'){
this.tabs = [
{ title : '费用明细' },
{ title : '提现记录' },
{ title : '收益记录' }
]
}
}
})
},


+ 1
- 1
service-uniapp-client/pages/mine/settled.vue View File

@ -142,7 +142,7 @@
}else if(phone.trim() == ''){
return { title : '请填写手机号' , auth : false }
}else if(phone){
if(!/^1(3|4[0-9]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9\d)\d{8}$/.test(phone)){
if(!/^1\d{10}$/.test(phone)){
return { title : '手机号格式不合法' , auth : false }
}
}else if(age){


+ 2
- 2
service-uniapp-client/pages/mine/wallet.vue View File

@ -12,9 +12,9 @@
</view>
<view class="font-menu flex flex-sb">
<view @click="toRunningWater(0)">充值记录</view>
<view @click="toRunningWater(1)">提现记录</view>
<view @click="toRunningWater(1)" v-if="userInfo.isDai =='Y'">提现记录</view>
<view @click="toRunningWater(2)">下单记录</view>
<view @click="toRunningWater(3)">佣金记录</view>
<view @click="toRunningWater(3)" v-if="userInfo.isDai =='Y'">佣金记录</view>
</view>
</view>


+ 1
- 1
service-uniapp-client/pages/mine/withdraw.vue View File

@ -75,7 +75,7 @@
uni.navigateTo({
url: '/pages/mine/distribution'
})
},
},
getConfig() { //
this.$api('getConfig', {}, res => {
if (res.code == 200) {


+ 8
- 6
service-uniapp-client/pages/order/payOrder.vue View File

@ -373,7 +373,7 @@
this.$wxPay(res,this.paySusscess,this.paySusscess)
}
}else{ //
this.paySusscess()
this.paySusscess(1)
}
})
},
@ -409,7 +409,7 @@
this.count = this.price - item.money
},
//
//
selectAddress(item) {
if(!item.latitude && !item.longitude){ //
this.selectAddressPopupShow = false
@ -454,8 +454,10 @@
// this.initPrice()
// }
// })
if(this.$route.query.setKmOpen=='Y'){ //
this.distance = this.$route.query.distance
if(this.technicianDetail.setKmOpen=='Y'){ //
this.distance = this.technicianDetail.setKm
}else{
this.distance = Position.calculateDistance(this.address.latitude, this.address.longitude, this.technicianDetail.latitude, this.technicianDetail.longitude)
}
@ -475,9 +477,9 @@
},
//()
paySusscess(){
paySusscess(index = 2){
uni.reLaunch({
url: '/pages/index/order?active=2'
url: '/pages/index/order?active=' + index
})
},


+ 1
- 1
service-uniapp-client/plugins/utils.js View File

@ -57,7 +57,7 @@ function verificationAll(data){
//验证手机号是否合法
function verificationPhone(phone){
if(!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(phone)){
if(!/^1\d{10}$/.test(phone)){
return false
}
return true


+ 1
- 1
service-uniapp-technician/.env View File

@ -1,7 +1,7 @@
# 开发环境
#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api
#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api-three
VITE_REDIRECT_URI=http://tairoudj.natapp1.cc


+ 2
- 3
service-uniapp-technician/pages/login/mobile.vue View File

@ -138,7 +138,8 @@
}
.input-m{
width: 96rpx;
width: 146rpx;
// width: 96rpx;
height: 136rpx;
background: #f8f8f8;
border-radius: 16rpx;
@ -153,8 +154,6 @@
}
.input-m.active{
width: 90rpx;
height: 130rpx;
border: 3rpx solid $uni-color;
}


+ 1
- 1
service-uniapp-technician/pages/mine/settled.vue View File

@ -143,7 +143,7 @@
}else if(phone.trim() == ''){
return { title : '请填写手机号' , auth : false }
}else if(phone){
if(!/^1(3|4[0-9]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9\d)\d{8}$/.test(phone)){
if(!/^1\d{10}$/.test(phone)){
return { title : '手机号格式不合法' , auth : false }
}
}else if(age){


+ 53
- 13
service-uniapp-technician/pages/mine/wallet.vue View File

@ -4,7 +4,7 @@
<view class="banner" />
<view class="b-relative center font-m">
<image src="/static/ms/w.png" />
<image src="/static/ms/1120.jpg" />
<view class="title" style="position: absolute; top: 40rpx; left: 40rpx">
<view style="line-height: 40rpx; font-size: 28rpx">账号余额</view>
<view style="line-height: 60rpx; font-size: 40rpx">{{ belece.money }}</view>
@ -20,19 +20,23 @@
<view class="from-body">
<view>我要提现</view>
<view class="from-line">
<input placeholder="请输入提现金额" />
<input placeholder="请输入提现金额" v-model="form.price"/>
</view>
<!-- <view class="from-line">
<input placeholder="请输入姓名" v-model="form.name"/>
</view> -->
<!-- <view class="from-line">
<input placeholder="请输入电话" v-model="form.phone"/>
</view> -->
<view class="from-line">
<input placeholder="请输入姓名" />
<input placeholder="请输入开户行" v-model="form.bank"/>
</view>
<view class="from-line">
<input placeholder="请输入开户行" />
<input placeholder="请输入银行卡卡号" v-model="form.card"/>
</view>
<view class="from-line">
<input placeholder="请输入银行卡卡号" />
</view>
<view class="mt56">提现说明</view>
<view style="line-height: 45rpx; font-size: 24rpx;color: #666666;" v-html="notice">
<!-- <view class="mt56">提现说明</view> -->
<view style="line-height: 45rpx; font-size: 24rpx;color: #666666;"
v-html="notice">
</view>
<!-- <p>1本次提现必须通过银行卡提现暂不支持其他途径</p>
<p>2如若遇到24小时提现未到账请联系客服</p> -->
@ -40,7 +44,8 @@
<view class="b-fiexd">
<view class="button-submit">提交</view>
<view class="button-submit"
@click="submit">提交</view>
</view>
</view>
@ -57,7 +62,7 @@
config : [],
notice : '',
form : {
type : 1
},
userInfo : {},
belece : {}
@ -86,7 +91,7 @@
this.$api('getConfig', {} ,res => {
if(res.code == 200){
res.result.forEach(n => {
if(n.keyValue == 'orderInstructions'){
if(n.keyValue == 'withdraw'){
this.notice = n.content
}
})
@ -94,8 +99,43 @@
}
})
},
submit(){
submit(){ //
let isOk = this.parameterVerification();
if(isOk && !isOk.auth){
return uni.showToast({
title : isOk.title,
icon : 'none'
})
}
this.$api('giveWithdrawal', this.form, res => {
if (res.code == 200) {
uni.showToast({
title: '提现成功',
icon: 'none'
})
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
parameterVerification(){ //
let { price , bank , card, phone } = this.form
// if(!phone){
// return { title : '' , auth : false }
// }
if(!price){
return { title : '请填写提现金额' , auth : false }
}else if(price <= 0){
return { title : '提现金额必须大于0' , auth : false }
}else if(price > this.belece.money){
return { title : '提现金额大于余额' , auth : false }
}else if(bank.trim() == ''){
return { title : '请填写开户行' , auth : false }
}else if(card.trim() == ''){
return { title : '请填写卡号' , auth : false }
}
return { title : '验证通过' , auth : true }
},
toRunningWater(status) { //
uni.navigateTo({


+ 2
- 0
service-uniapp-technician/plugins/api.js View File

@ -106,6 +106,8 @@ const config = {
updateTerProject : { url : '/ter/updateTerProject' , method : 'POST' , auth : true },
//查询技师上钟项目
queryTerProject : { url : '/ter/queryTerProject' , method : 'POST' , auth : true },
//技师端-提现
giveWithdrawal : { url : '/order/giveWithdrawal' , method : 'POST' , auth : true },
}


BIN
service-uniapp-technician/static/icons/icon7.png View File

Before After
Width: 29  |  Height: 32  |  Size: 1.3 KiB Width: 29  |  Height: 32  |  Size: 2.1 KiB

Loading…
Cancel
Save