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.
 
 
 
 
 

656 lines
16 KiB

<template>
<view>
<far-bottom></far-bottom>
<!-- 个人中心 -->
<!-- <loadlogo v-if="!loadlogo" /> -->
<view class="container">
<view class="pages-header p-r" :style="{ 'background-image': ' url(' + imageRoot + 'merchantBg1.png)' }"></view>
<view class="merchantuserCenter p-r p-left-right-30">
<view class="usercenter-start dis-flex flex-x-between flex-y-center">
<view class="dis-flex">
<image class="usercenter-img" style="margin-top: 4%;" :src="userInfo.storelogo" />
<view class="dis-flex flex-dir-column f-24">
<view class="f-30 m-btm10 font-blod">{{ userInfo.storename }} </view>
<view class="f-30 m-btm10 font-blod">
<text style="color: #ffffff;">SID:{{storeid}}</text>
</view>
<view class="dis-flex">
<view>{{ userInfo.endtime }}到期</view>
<view class="dis-flex usercenter-xf flex-y-center">
<view @click="go('pages/mainPages/Settled/Settled?page=2')">续费</view>
<view class="i icon iconfont icon-jinrujiantou"></view>
</view>
</view>
</view>
</view>
<view>
<view class="f-24 dis-flex flex-y-center" @click="goSet">
<view>编辑店铺</view>
<view class="i icon iconfont icon-jinrujiantou usercenter-edit-icon"></view>
</view>
<!-- <view class="f-24 dis-flex flex-y-center" @click="gorest">
<view class="closeTheTtore">{{userInfo.temclose == 1?'开始营业':'打烊休息'}}</view>
</view> -->
</view>
</view>
<view class="userCenter-rest">
<text class="iconfont icon-time" style="font-size: 28upx;"></text>
<text style="padding: 0 15upx;" >{{'营业状态'}}</text>
<view class="businessing" v-if="userInfo.temclose != 1">
营业中
</view>
<view class="nobusinessing" v-else>
休息中
</view>
<view class="isrest" @click="gorest" v-if="userInfo.temclose != 1">
休息
</view>
<view class="isrest" @click="gorest" v-else>
营业
</view>
</view>
<view class="userCenter-header bor-radius-10upx b-f">
<view class="dis-flex flex-y-center">
<view class="dis-flex flex-dir-column" style="width: 50%;">
<view class="f-24 color-99 m-top4">店铺余额(元)</view>
<view class="f-50 font-blod price">{{ userInfo.nowmoney }}</view>
</view>
<view class="userCenter-header-income">
<view class="f-24 userCenter-header-btn dis-flex flex-x-center">
<view class="text" @click="goCash">提现</view>
<view class="i icon iconfont icon-jinrujiantou"></view>
</view>
</view>
</view>
</view>
<view class="tool-tab m-top20">
<view class="tool-list dis-flex flex-dir-column">
<view class="tool-item flex-box t-c dis-flex" v-for="(tool_item, index) in tab_list" :key="index" @click="navgateTo($event, tool_item.item_navType)">
<image class="tool-item-icon" :src="imgfixUrls + tool_item.item_icon" mode=""></image>
<view class="dis-flex flex-x-between flex-y-center tool-item-right">
<view class="f-28 color-33">{{ tool_item.item_name }}</view>
<view class="dis-flex flex-y-center flex-x-end">
<!-- <view class="badge">99+</view> -->
<view class="i icon iconfont icon-jinrujiantouxiao1"></view>
</view>
</view>
</view>
<view class="tool-item flex-box t-c dis-flex" @click="go('pages/subPages/attestationCenter/index?rzType=2')" v-if="userInfo.switch == 1">
<image class="tool-item-icon" :src="imgfixUrls + 'merchant/qyrk.png'" mode=""></image>
<view class="dis-flex flex-x-between flex-y-center tool-item-right">
<view class="f-28 color-33">企业认证</view>
<view class="dis-flex flex-y-center flex-x-end">
<view class="rztext">
{{
userInfo.attestation.attestation == 0
? '未认证'
: userInfo.attestation.attestation == 1
? '待审核'
: userInfo.attestation.attestation == 2
? '已审核'
: '被驳回'
}}
</view>
<view class="i icon iconfont icon-jinrujiantouxiao1"></view>
</view>
</view>
</view>
</view>
</view>
<view class="tool-tab m-top20">
<view class="tool-list dis-flex flex-dir-column">
<!-- <view class="tool-item flex-box t-c dis-flex" v-if="userInfo.oofflag" @click="navgateTo($event, 'yellow')">
<image class="tool-item-icon" :src="imgfixUrls + 'centerMerchant/shopmain.png'" alt="" />
<view class="dis-flex flex-x-between flex-y-center tool-item-right">
<view class="f-28 color-33">{{userInfo.oofflag == 1?'入驻黄页':userInfo.oofflag == 2?'查看黄页':'前往黄页'}}</view>
<view class="dis-flex flex-y-center flex-x-end"><view class="i icon iconfont icon-jinrujiantouxiao1"></view></view>
</view>
</view> -->
<view class="tool-item flex-box t-c dis-flex" style="padding-left: 8upx;" @click="navgateTo($event, 'store')">
<image class="tool-item-icon" style="width: 40upx;height: 40upx;margin-right: 30upx;margin-top: 10upx;" :src=" imgfixUrls + 'yhxy.png'" alt="" />
<view class="dis-flex flex-x-between flex-y-center tool-item-right" >
<view class="f-28 color-33">查看协议</view>
<view class="dis-flex flex-y-center flex-x-end"><view class="i icon iconfont icon-jinrujiantouxiao1"></view></view>
</view>
</view>
<view class="tool-item flex-box t-c dis-flex" @click="navgateTo($event,tool_item.item_navType)">
<image class="tool-item-icon" :src="imgfixUrls + 'centerMerchant/back.png'" alt="" />
<view class="dis-flex flex-x-between flex-y-center tool-item-right" @click="go('pages/mainPages/index/index')">
<view class="f-28 color-33">返回首页</view>
<view class="dis-flex flex-y-center flex-x-end"><view class="i icon iconfont icon-jinrujiantouxiao1"></view></view>
</view>
</view>
</view>
</view>
</view>
</view>
<navBar :tabBarAct="4" />
</view>
</template>
<script>
import App from '@/common/js/app.js';
import Loadlogo from '@/components/template/loadlogo';
import navBar from '@/components/template/navBar.vue';
export default {
data() {
return {
userInfo: {},
storeid: null,
monidata: 'ikik',
detalsData: null,
loadlogo: false,
shopShow: false,
tab_list: [
{
item_type: 'manager',
item_name: '店员管理',
item_icon: 'centerMerchant/manager.png',
item_navType: 'manager'
},
{
item_type: 'myuser',
item_name: '我的客户',
item_icon: 'centerMerchant/myuser.png',
item_navType: 'myuser'
},
{
item_type: 'invite',
item_name: '我的招聘',
item_icon: 'centerMerchant/wdzp.png',
item_navType: 'invite'
},
{
item_type: 'reserve',
item_name: '预约列表',
item_icon: 'centerMerchant/yuyue.png',
item_navType: 'reserve'
},
{
item_type: 'shopmain',
item_name: '店铺主页',
item_icon: 'centerMerchant/shopmain.png',
item_navType: 'shopmain'
},
{
item_type: 'changeshop',
item_name: '切换店铺',
item_icon: 'centerMerchant/changeshop.png',
item_navType: 'changeshop'
},
{
item_type: 'housekeepList',
item_name: '家政服务',
item_icon: 'centerMerchant/msguser.png',
item_navType: 'housekeepList'
}
]
};
},
components: {
Loadlogo,
navBar
},
onShow() {
let _this = this;
uni.getStorage({
key: 'checkStoreid',
success: function(res) {
_this.storeid = res.data;
_this.init(res.data);
}
});
},
computed: {},
mounted() {},
onLoad(e) {
let _this = this;
uni.getStorage({
key: 'checkStoreid',
success: function(res) {
_this.storeid = res.data;
_this.init(res.data);
}
});
},
methods: {
init(mid) {
let _this = this;
_this.getStoreMember(mid);
},
goCash() {
App.navigationTo({
url: 'pages/subPages/merchant/merchantCash/merchantCash'
});
},
go(url) {
App.navigationTo({
url: url
});
},
gorest(){
let _this = this;
let data = {
sid: _this.storeid
};
App._post_form('&p=store&do=temCloseApi', data, res => {
//
if(res.message == '营业成功'){
_this.userInfo.temclose = 0;
}else{
_this.userInfo.temclose = 1;
}
uni.showToast({
title:res.message
});
});
},
goSet() {
App.navigationTo({
url: 'pages/subPages/merchant/set/set'
});
},
getStoreMember(mid) {
let _this = this;
let data = {
storeid: mid
};
App._post_form('&p=store&do=storeMember', data, res => {
_this.userInfo = res.data;
_this.tab_list.map((item,index)=>{
if(item.item_navType == 'invite' && _this.userInfo.recruit_switch == 0){
_this.tab_list.splice(index,1);
}
if(item.item_navType == 'housekeepList' && _this.userInfo.housekeepstatus != 1){
_this.tab_list.splice(index,1);
}
})
});
},
// 跳转商家
goStore() {
App.navigationTo({
url: 'pages/subPages/dealer/myStore/myStore'
});
},
navgateTo(e, navType) {
let _this = this;
switch (navType) {
case 'changeshop':
App.navigationTo({
url: 'pages/subPages/merchant/merchantChangeShop/merchantChangeShop'
});
break;
case 'withdraw':
App.navigationTo({
url: 'pages/subPages/dealer/withdraw/withdraw'
});
break;
case 'setshop':
App.navigationTo({
url: 'pages/subPages/dealer/setshop/setshop'
});
break;
case 'order':
App.navigationTo({
url: 'pages/subPages/merchant/merchantUserCenter/merchantUserCenter'
});
break;
case 'manager':
App.navigationTo({
url: 'pages/subPages/merchant/merchantClerkList/merchantClerkList'
});
break;
case 'level':
App.navigationTo({
url: 'pages/subPages/dealer/level/level'
});
break;
case 'client':
App.navigationTo({
url: 'pages/subPages/dealer/client/client'
});
break;
case 'help':
App.navigationTo({
url: 'pages/subPages/dealer/richtext/setrich'
});
break;
case 'myuser':
App.navigationTo({
url: 'pages/subPages/merchant/merchantChat/merchantChat'
});
break;
case 'gener':
App.navigationTo({
url: 'pages/subPages/dealer/gener/gener'
});
break;
case 'shopmain':
App.navigationTo({
url: 'pages/mainPages/store/index?sid=' + _this.storeid
});
break;
case 'yellow':
if(_this.userInfo.oofflag == 2){
App.navigationTo({
url: 'pages/subPages2/phoneBook/logistics/logistics?sid=' + _this.storeid
});
}else{
App.navigationTo({
url: 'pages/subPages2/phoneBook/enterForm/enterForm?sid=' + _this.storeid
});
}
break;
case 'poster':
// #ifdef H5
location.href = e.currentTarget.dataset.url;
// #endif
break;
case 'shops':
// #ifdef H5
location.href = e.currentTarget.dataset.url;
// #endif
break;
case 'store':
App.navigationTo({
url: 'pages/mainPages/agreement/agreement?agremType=store'
});
break;
case 'invite':
App.navigationTo({
url: 'pages/subPages2/hirePlatform/recruitmentEnter/recruitmentEnter?sid=' + _this.storeid
});
break;
case 'reserve':
App.navigationTo({
url: 'pages/subPages2/booked/reservationList/reservationList?sid=' + _this.storeid
});
break;
case 'housekeepList':
App.navigationTo({
url: `pages/subPages2/homemaking/myServiceList/myServiceList?type=1&sid=${_this.storeid}`
});
break;
}
}
}
};
</script>
<style lang="scss">
.rztext {
font-size: 24upx;
color: rgba(153, 153, 153, 1);
}
.qiun-charts {
width: 750upx;
height: 500upx;
background-color: #ffffff;
}
.closeTheTtore{
width: 120upx;
height: 50upx;
line-height: 50upx;
border-radius: 60upx;
text-align: center;
color: #FFFFFF;
background-color: #FF4444;
margin-top: 20upx;
}
.charts {
width: 750upx;
height: 500upx;
background-color: #ffffff;
}
page {
background-color: #f6f6f6;
font-size: 0;
}
.container {
.usercenter-start {
color: #ffffff;
background-color: transparent;
margin-bottom: 40upx;
.usercenter-img {
width: 90upx;
height: 90upx;
border-radius: 50%;
margin-right: 20upx;
}
.iconfont.icon-right {
margin-left: 14upx;
}
.usercenter-edit-icon {
font-size: 24upx;
}
.usercenter-xf {
color: rgba(254, 198, 33, 1);
margin-left: 21upx;
.icon {
margin-left: 4upx;
font-size: 24upx;
}
}
}
.color-33 {
color: #333333;
}
.color-99 {
color: #999999;
}
.color-f4 {
color: #ff4444;
}
.color-cc {
color: #cccccc;
}
.font-blod {
font-weight: bold;
}
.select-box {
color: #999999;
.iconfont {
font-size: 24upx;
margin-left: 6upx;
}
}
// 头部内容
.pages-header {
width: 100%;
height: 319upx;
background-repeat: no-repeat;
background-size: 100% 319upx;
//个人-邀请人信息
.person-content {
padding: 94upx 40upx 0;
.user-avatar {
width: 100upx;
height: 100upx;
border-radius: 50%;
background-repeat: no-repeat;
background-size: 100upx 100upx;
}
.user-referrer-name {
.level-label {
background-color: #e7d4aa;
border-radius: 18upx;
padding: 0 16upx;
}
.referrer-name {
color: #6b6e88;
}
}
}
}
// 详情内容
.merchantuserCenter {
margin-top: -258upx;
padding-bottom: 120upx;
.userCenter-rest{
display: flex;
width: 570upx;
height: 80upx;
background-color: rgba(105,168,255,1);
// color: #69A8FF;
color: #FFFFFF;
line-height: 80upx;
padding: 0 30upx;
font-size: 28upx;
border-radius: 10upx 10upx 0upx 0upx;
margin: auto;
.businessing{
// width: 70upx;
padding: 0 10upx;
height: 30upx;
font-size: 20upx;
background-color: #80be0c;
border-radius: 6upx;
line-height: 30upx;
text-align: center;
margin-top: 26upx;
// display: inline-block;
}
.nobusinessing{
// width: 70upx;
padding: 0 10upx;
height: 30upx;
font-size: 20upx;
background-color: #FEC621;
border-radius: 6upx;
line-height: 30upx;
text-align: center;
margin-top: 26upx;
// display: inline-block;
}
.isrest{
// padding: 8upx 15upx;
border: 1upx solid #FFFFFF;
height: 40upx;
width: 90upx;
border-radius: 60upx;
text-align: center;
line-height: 40upx;
margin-left: auto;
margin-top: 20upx;
}
}
// 导航
.userCenter-header {
padding: 42upx 40upx 40upx 40upx;
position: relative;
.price {
margin-top: 26upx;
color: #003333;
}
.userCenter-header-btn {
position: absolute;
right: 40upx;
bottom: 30upx;
width: 122upx;
height: 58upx;
color: #ffffff;
background: #3388ff;
border-radius: 30upx;
text-align: center;
line-height: 58upx;
.text {
margin-left: 10upx;
}
.icon {
font-size: 24upx;
}
}
.userCenter-header-income {
flex-shrink: 0;
width: 50%;
}
}
// 工具导航
.tool-tab {
padding: 0 30upx;
opacity: 0.97;
border-radius: 10px;
background: #ffffff;
.tool-item-right {
width: 100%;
padding: 30upx 0;
border-bottom: 1px solid #eeeeee;
}
.icon-jinrujiantouxiao1 {
color: #999999;
font-size: 24upx;
}
.tool-tab-title {
padding: 0 30upx;
}
.tool-item {
width: 100%;
flex-wrap: nowrap;
.badge {
width: 60upx;
height: 36upx;
line-height: 36upx;
background: rgba(255, 68, 68, 1);
opacity: 0.93;
border-radius: 18upx;
text-align: center;
font-size: 24upx;
color: rgba(255, 255, 255, 1);
margin-right: 16upx;
}
.tool-item-icon {
margin-right: 20upx;
padding: 20upx 0;
width: 54upx;
height: 54upx;
flex-shrink: 0;
}
}
.tool-item:last-child .tool-item-right {
border-bottom: none;
}
}
} } </style>