2022-05-15 01:46:26 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
2022-05-19 22:12:16 +08:00
|
|
|
|
<view class="bg-gradual-color padding text-center"
|
2022-05-15 01:46:26 +08:00
|
|
|
|
:style="'padding-top: ' + pageContentTop + 'px; padding-bottom: 100rpx;'">
|
|
|
|
|
|
<view class="cu-avatar round"
|
2022-05-23 17:38:52 +08:00
|
|
|
|
:style="'width: 150rpx; height: 150rpx; background-image:url(' + curUserInfo.workerLogoUrl + ');'">
|
2022-05-15 01:46:26 +08:00
|
|
|
|
</view>
|
2022-05-19 22:12:16 +08:00
|
|
|
|
<view class="text-xl margin-sm">{{curUserInfo.name}}</view>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
<view class="cu-list grid no-border col-2" style="background-color: inherit;">
|
2022-11-28 01:28:39 +08:00
|
|
|
|
<!-- <view class="cu-item" @click="clickMenuItem({pageUrl: '/pages/my/my-money-bag'})"> -->
|
|
|
|
|
|
<view class="cu-item">
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<view class="margin-bottom-xs text-xxl">0</view>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
<view>我的钱包</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item solid-left">
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<view class="margin-bottom-xs text-xxl">5.0</view>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
<view>服务评分</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="paper-drawer-bar margin-bottom-with-bar">
|
|
|
|
|
|
<view class="margin-lr-sm cu-list grid no-border col-4 shadow-warp">
|
|
|
|
|
|
<view class="cu-item">
|
|
|
|
|
|
<view class="cuIcon-remind margin-bottom-xs middle-icon"
|
|
|
|
|
|
:class="myInfo.door24h ? 'text-main-color' : 'text-gray'"></view>
|
|
|
|
|
|
<view :class="myInfo.door24h ? '' : 'text-gray'">24小时上门</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item solid-left">
|
|
|
|
|
|
<view class="cuIcon-safe margin-bottom-xs middle-icon"
|
|
|
|
|
|
:class="myInfo.warranty72h ? 'text-main-color' : 'text-gray'"></view>
|
|
|
|
|
|
<view :class="myInfo.warranty72h ? '' : 'text-gray'">72小时质保</view>
|
|
|
|
|
|
</view>
|
2022-07-07 15:38:30 +08:00
|
|
|
|
<view class="cu-item solid-left" @click="goToPage('/pages/my/certification')">
|
2022-05-15 01:46:26 +08:00
|
|
|
|
<view class="cuIcon-profile margin-bottom-xs middle-icon"
|
2022-07-07 15:38:30 +08:00
|
|
|
|
:class="curCertifyInfo && curCertifyInfo.status === 1 ? 'text-main-color' : 'text-gray'"></view>
|
|
|
|
|
|
<view :class="curCertifyInfo && curCertifyInfo.status === 1 ? '' : 'text-gray'">实名认证</view>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cu-item solid-left">
|
|
|
|
|
|
<view class="cuIcon-moneybag margin-bottom-xs middle-icon"
|
|
|
|
|
|
:class="myInfo.deposit ? 'text-main-color' : 'text-gray'"></view>
|
|
|
|
|
|
<view :class="myInfo.deposit ? '' : 'text-gray'">保证金</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="bg-white">
|
2022-07-10 19:58:22 +08:00
|
|
|
|
<view class="margin-top margin-lr-sm">
|
|
|
|
|
|
<view class="flex justify-between align-center solid-bottom padding padding-lr-lg text-lg"
|
2024-07-30 10:13:39 +08:00
|
|
|
|
v-for="(item, index) in menuList" :key="index" @click="clickMenuItem(item)"
|
2022-07-21 15:50:09 +08:00
|
|
|
|
v-if="item.show || (item.showByStatus ? curUserInfo.status != -1 : false)">
|
2022-05-23 17:38:52 +08:00
|
|
|
|
<view class="flex justify-start align-center">
|
|
|
|
|
|
<view class="margin-right-sm text-main-color text-xl"><view :class="'cuIcon-' + item.icon"></view></view>
|
|
|
|
|
|
<view>{{item.name}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="cuIcon-right"></view>
|
|
|
|
|
|
</view>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-07-30 10:13:39 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<confirm-modal ref="focusModal" :showCancel="false" :isAutoClose="false" confirmMsg="已关注" @confirm="checkIfFollow()">
|
|
|
|
|
|
<template #contentView>
|
|
|
|
|
|
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
|
|
|
|
|
|
<text style="font-size: 30rpx;margin-bottom: 30rpx;font-weight: 500;">先关注公众号,绑定订单通知!</text>
|
|
|
|
|
|
<image style="width: 400upx;height: 400upx;margin-bottom: 20upx;" :show-menu-by-longpress="true" src="http://gqz.opsoul.com/qrcode_for_gh_e1c9ac86741f_860.jpg" mode="aspectFill"></image>
|
|
|
|
|
|
<text style="margin-bottom: 20upx;">操作方式</text>
|
|
|
|
|
|
<text>长按二维码,前往公众号点关注</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</confirm-modal>
|
2022-05-15 01:46:26 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'my-home',
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
pageContentTop: this.CustomBar,
|
2022-07-07 15:38:30 +08:00
|
|
|
|
curUserInfo: {},
|
|
|
|
|
|
curCertifyInfo: null,
|
2022-05-23 17:38:52 +08:00
|
|
|
|
myInfo: {},
|
|
|
|
|
|
menuList: [{
|
2022-07-10 19:58:22 +08:00
|
|
|
|
name: '提现账户',
|
2022-05-23 17:38:52 +08:00
|
|
|
|
icon: 'moneybag',
|
2022-07-10 19:58:22 +08:00
|
|
|
|
pageUrl: '/pages/my/withdraw',
|
2022-07-21 15:50:09 +08:00
|
|
|
|
// show: true,
|
|
|
|
|
|
showByStatus: true
|
2022-05-23 17:38:52 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '交易明细',
|
|
|
|
|
|
icon: 'form',
|
2022-07-10 19:58:22 +08:00
|
|
|
|
pageUrl: '/pages/my/my-money-bag',
|
|
|
|
|
|
show: true
|
2022-05-23 17:38:52 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '服务明细',
|
|
|
|
|
|
icon: 'calendar'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '师傅入驻',
|
2022-06-17 16:43:49 +08:00
|
|
|
|
icon: 'profile',
|
2022-07-10 19:58:22 +08:00
|
|
|
|
pageUrl: '/pages/my/master-settled-info',
|
|
|
|
|
|
show: true
|
2024-07-30 10:13:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '订单通知绑定',
|
|
|
|
|
|
icon: 'roundcheck',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
prefixFun: 'showFollowBox'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '商家信息',
|
2022-05-23 17:38:52 +08:00
|
|
|
|
icon: 'lock',
|
2022-07-10 19:58:22 +08:00
|
|
|
|
pageUrl: '/pages/my/personal-info',
|
|
|
|
|
|
show: true
|
2022-05-23 17:38:52 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '法律声明',
|
|
|
|
|
|
icon: 'read'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '店铺认证',
|
|
|
|
|
|
icon: 'taoxiaopu'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '签约协议',
|
|
|
|
|
|
icon: 'punch'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '反馈到平台',
|
|
|
|
|
|
icon: 'comment'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '开放平台',
|
|
|
|
|
|
icon: 'community'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
name: '师傅缴费',
|
|
|
|
|
|
icon: 'sponsor',
|
|
|
|
|
|
pageUrl: '/pages/my/pay-deposit'
|
2022-08-25 14:26:12 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
name: '退出登录',
|
|
|
|
|
|
icon: 'exit',
|
|
|
|
|
|
pageUrl: '/pages/login/login',
|
|
|
|
|
|
show: true
|
2022-05-15 01:46:26 +08:00
|
|
|
|
}]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onReady() {
|
|
|
|
|
|
this.loadData();
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
async loadData() {
|
2024-07-30 10:13:39 +08:00
|
|
|
|
await this.$request.refreshCurUserCache();
|
2022-07-07 15:38:30 +08:00
|
|
|
|
this.curUserInfo = this.$request.getCurUserInfo();
|
|
|
|
|
|
let res = await this.$request.getWorkerCertify();
|
|
|
|
|
|
this.curCertifyInfo = res.data;
|
2022-05-15 01:46:26 +08:00
|
|
|
|
this.myInfo = await this.$api.data('myInfo');
|
2022-05-23 17:38:52 +08:00
|
|
|
|
},
|
2022-06-17 16:43:49 +08:00
|
|
|
|
clickMenuItem(menu) {
|
|
|
|
|
|
if (menu.prefixFun) {
|
|
|
|
|
|
this[menu.prefixFun]();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (menu.pageUrl) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: menu.pageUrl
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2022-07-05 23:58:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
goToPage(pageUrl) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: pageUrl
|
|
|
|
|
|
})
|
2024-07-30 10:13:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
async showFollowBox() {
|
|
|
|
|
|
const status = await this.checkBeforeFollow()
|
|
|
|
|
|
if(!status) {
|
|
|
|
|
|
this.$refs.focusModal.showModal();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '您已绑定消息通知',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async checkBeforeFollow() {
|
|
|
|
|
|
const wxLoginRes = await wx.login();
|
|
|
|
|
|
console.log(wxLoginRes);
|
|
|
|
|
|
const wxAuthRes = await uni.request({
|
|
|
|
|
|
url: '/wx/check',
|
|
|
|
|
|
header: {
|
|
|
|
|
|
code: wxLoginRes.code
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
// const wxAuthRes = await uni.request({
|
|
|
|
|
|
// url: '/wx/auth',
|
|
|
|
|
|
// header: {
|
|
|
|
|
|
// code: wxLoginRes.code
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
return wxAuthRes[1].data.data
|
|
|
|
|
|
},
|
|
|
|
|
|
async checkIfFollow() {
|
|
|
|
|
|
const status = await this.checkBeforeFollow()
|
|
|
|
|
|
// const wxLoginRes = await wx.login();
|
|
|
|
|
|
// const wxAuthRes = await uni.request({
|
|
|
|
|
|
// url: '/wx/check',
|
|
|
|
|
|
// header: {
|
|
|
|
|
|
// code: wxLoginRes.code
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
|
|
|
|
|
if(!status) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: '请完成公众号关注',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
|
// title: '感谢您的关注!',
|
|
|
|
|
|
// icon: 'success'
|
|
|
|
|
|
// })
|
|
|
|
|
|
this.$refs.focusModal.hideModal();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2022-05-15 01:46:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.cu-list.grid.no-border>.solid-left.cu-item:after {
|
|
|
|
|
|
border-left: 1upx solid rgba(255, 255, 255, 0.5);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.paper-drawer-bar {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
top: -100rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.paper-drawer-bar-back {
|
|
|
|
|
|
z-index: -1;
|
|
|
|
|
|
padding-top: 100rpx;
|
|
|
|
|
|
}
|
2022-05-23 17:38:52 +08:00
|
|
|
|
</style>
|