123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533 |
- <template>
- <view>
- <view class="userHead">
- <view class="userHead-img">
- <u-avatar src="../../assets/img/head.png" size="140"></u-avatar>
- </view>
- <view class="userHead-text">
- <h3>{{info.merchantAccountName}}</h3>
- <view class="userHead-text-position">
- <u-icon name="account-pin-box-fill" custom-prefix="custom-icon" color="#fff" size="32"></u-icon>
- <p>{{getPhone(info.phone)}}</p>
- </view>
- </view>
- </view>
- <view class="userData" v-if="home">
- <view class="userData-item">
- <view class="userData-data">{{home.deviceNumbers}}台</view>
- <view class="userData-foot" @click="gotoUrl('pagesFinance/user/stationsList')" >我的设备<span style="color: #307af6; margin-left: 5px;">查看</span></view>
- </view>
- <u-line color="#d9e0ec" length="60" direction="col" margin="10px"/>
- <view class="userData-item">
- <view class="userData-name">银行账户</view>
-
- <view class="userData-foot" v-if="!home.bank" >未绑定</view>
-
- <view class="userData-foot" v-if="home.bank" @click="showModel" >提现账户<span style="color: #307af6; margin-left: 5px;">查看</span></view>
- </view>
- </view>
-
- <view class="userInfo" v-if="home">
- <view class="userInfo-head"><p>可提现金额</p></view>
- <view class="userInfo-main">
- <h2>{{home.accountBalance.toFixed(2)}}元
- <view class="withdraw" v-if="info.status" @click="gotoUrl('pagesFinance/user/applicationForWithdrawal')" >
- 账户提现
- </view>
- </h2>
- <!-- <view class="userInfo-btn" >帐户提现</view> -->
- </view>
- <view class="userInfo-foot">
- <!-- <view class="userInfo-item">
- <p>今日收益</p>
- <h4>{{home.todayAmount}}</h4>
- </view> -->
- <view class="userInfo-item">
- <p>冻结金额(提现中)</p>
- <h4>{{home.waitingAmount.toFixed(2)}}元</h4>
- </view>
- <view class="userInfo-item">
- <p>已提现</p>
- <h4>{{home.withdrawnAmount.toFixed(2)}}元</h4>
- </view>
- </view>
- </view>
- <!-- 功能菜单 -->
- <view class="function-menu">
- <view class="item" @click="gotoUrl('pagesFinance/user/withdrawRecord')">
- <view class="item-icon">
- <i data-v-7e5aa06e="" class="ri-todo-line"></i>
- </view>
- <view class="item-name">
- 提现记录
- </view>
-
- </view>
- <view class="item" @click="gotoUrl('pagesFinance/preengaged/preengaged')">
- <view class="item-icon">
- <i data-v-137d5072="" class="ri-map-pin-time-line"></i>
- </view>
- <view class="item-name">
- 我被预约
- </view>
-
- </view>
- <view class="item" @click="gotoUrl('pagesFinance/recordOfInvoice/recordOfInvoice')">
- <view class="item-icon">
- <i data-v-137d5072="" class="ri-ticket-line"></i>
- </view>
- <view class="item-name">
- 开票记录
- </view>
-
- </view>
- <view class="item" @click="gotoUrl('pagesFinance/user/stationsListLine')">
- <view class="item-icon">
- <i class="ri-webcam-line"></i>
- </view>
- <view class="item-name">
- 摄像头
- </view>
-
- </view>
- <view class="item"
- v-for="(item,i) in vipPlatformList" :key="i"
- @click="gotoUrl('pagesFinance/user/ownManagement?id='+item.id)" >
- <view class="item-icon">
- <i class="ri-folder-user-line"></i>
- </view>
- <view class="item-name">
- {{vipPlatformList.length==1?'车主管理':item.name}}
- </view>
-
- </view>
- <view class="item" @click="gotoUrl('pagesFinance/user/help')" v-if="false" >
- <view class="item-icon">
- <i data-v-137d5072="" class="ri-compass-3-line"></i>
- </view>
- <view class="item-name">
- 帮助中心
- </view>
-
- </view>
- <view class="item" @click="phone()" >
- <view class="item-icon">
- <i data-v-137d5072="" class="ri-customer-service-2-line"></i>
- </view>
- <view class="item-name">
- 联系客服
- </view>
-
- </view>
- <view class="item" @click="gotoUrl('pagesFinance/user/about')" v-if="false" >
- <view class="item-icon">
- <i data-v-137d5072="" class="ri-account-pin-box-line"></i>
- </view>
- <view class="item-name">
- 关于我们
- </view>
-
- </view>
-
- </view>
-
- <button class="logout-btn" @click="logout">退出账号</button>
-
- <!-- <view class="userCell">
- <view class="userCell-item" @click="gotoUrl('pagesFinance/preengaged/preengaged')">
- <view class="userCell-title">
- <img src="@/assets/img/booked.png" style="height:36rpx;width: 36rpx ;" >
- <p>我被预约</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
- <view class="userCell-item" @click="gotoUrl('pagesFinance/user/withdrawRecord')">
- <view class="userCell-title">
- <u-icon name="refund-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
- <p>提现记录</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
-
- <view class="userCell-item" @click="gotoUrl('pagesFinance/recordOfInvoice/recordOfInvoice')">
- <view class="userCell-title">
- <img src="@/assets/img/riFill-todo-fill.png" style="height:36rpx;width: 36rpx ;" >
- <p>开票申请记录</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
-
- <view class="userCell-item" v-if="info.allowShare" @click="gotoUrl('pagesFinance/user/stationsListLine')">
- <view class="userCell-title">
- <svg style="height:36rpx;width: 36rpx ;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
- <path fill="none" d="M0 0h24v24H0z"/><path fill="#9EAAC6" d="M11 21v-1.07A7.002 7.002 0 0 1 5 13V8a7 7 0 1 1 14 0v5a7.002 7.002 0 0 1-6 6.93V21h4v2H7v-2h4zm1-12a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 2a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg>
-
- <p>我的摄像头</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
-
-
- <view class="userCell-item" @click="gotoUrl('pagesFinance/user/help')" >
- <view class="userCell-title">
- <u-icon name="question-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
- <p>帮助中心</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
- <view class="userCell-item" @click="phone()" >
- <view class="userCell-title">
- <u-icon name="customer-service-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
- <p>联系客服</p>
- </view>
- <span>{{tel}}</span>
- </view>
- <!-- <view class="userCell-item" @click="gotoUrl('pagesFinance/user/about')">
- <view class="userCell-title">
- <u-icon name="information-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
- <p>关于小鹏管家</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view> -->
- <!-- <view class="userCell-item" @click="logout" >
- <view class="userCell-title">
- <u-icon name="logout-box-r-fill" custom-prefix="custom-icon" color="#9EAAC6" size="36"></u-icon>
- <p>帐号登出</p>
- </view>
- <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#B3B3B3" size="32"></u-icon>
- </view>
- </view> -->
-
- <Tabbar :current="3" ref="tabbarMain"></Tabbar>
- </view>
- </template>
- <script>
- import Tabbar from '@/components/TabbarFinance.vue'
- import * as API from '@/apis/finance.js'
- import {
- substrMb
- } from '@/utils'
-
- export default {
- data() {
- return {
-
- tel:'400-8899-619',
- role:{},
- info:{},
- home:null,
- current: 0,
- vipPlatformList:[],
- background:{
- background: 'none'
- },
- }
- },
- components: {
- Tabbar
-
- },
- onLoad() {
- this.info=this.carhelp.getPersonInfo("merchantUser")
-
-
-
- console.log(this.info)
- },
- onReady() {
- this.getHomePage()
-
- },
- onShow() {
- if(this.$refs.tabbarMain){
- this.$refs.tabbarMain.setcount(3);
- }
- this.query()
- this.getHomePage()
- },
- methods: {
- query(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
-
- API.findByOpenId({
-
- openId: this.carhelp.getOpenId(),
-
- }).then((response) => {
- //this.loginset(response)
- var token = response ? response.data.token : '';
- this.carhelp.setToken(token,"merchantUser");
- this.carhelp.setPersonInfo(response.data.user,"merchantUser");
- this.carhelp.setPersonInfoPlus(response.data, "merchantUser")
- this.info=response.data.user
- uni.hideLoading();
- }).catch(error => {
- uni.hideLoading();
-
- })
- },
- getPhone(phone){
- var backphone="";
- if(phone){
- backphone=substrMb(phone,0,3)+"****"+substrMb(phone,7,4)
- }
-
- return backphone;
- },
- showModel(){
- var bankCard="";
- var sss=""
- if(this.home.bankCard){
-
- bankCard=substrMb(this.home.bankCard,0,4)+"****"+substrMb(this.home.bankCard,this.home.bankCard.length-4,4)
- }
- var code=this.home.bank+":"+bankCard;
- if(this.home.bank==null&&this.home.bankCard==null){
- code="未绑定"
- }
- uni.showModal({
- showCancel:false,
- content:code,
-
- })
- },
- logoutApi(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- var data = {
-
- };
-
- API.logout(data).then((res) => {
- this.carhelp.setToken("","merchantUser");
- this.carhelp.set("merchantUser_token_tdate","")
- this.carhelp.setPersonInfo("","merchantUser");
- this.carhelp.setPersonInfoPlus("" ,"merchantUser" )
-
- uni.reLaunch({
- url:"/pagesFinance/login/index?phone="+this.info.phone
- })
-
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- logout(){
- uni.showModal({
- title: '提示',
- content: '确认是否退出?',
- success: res=> {
- if (res.confirm) {
- //付钱 改为组件
- this.logoutApi();
-
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- phone(){
- uni.makePhoneCall({
- phoneNumber:this.tel //仅为示例
- });
- },
- getHomePage(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.homePage().then((res) => {
- this.home = res.data
- if(res.data.vipPlatformList){
- this.vipPlatformList=res.data.vipPlatformList
- }
-
- uni.hideLoading()
-
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- }
- }
- }
- </script>
- <style>
- page{
- background:url(../../assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
- background-size: 100%;
- }
- </style>
- <style lang="scss" scoped>
- .userCell{
- background-color: #fff;
- border-radius: 8px;
- margin: 16px;
- .userCell-item{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px;
- .userCell-title{
- display: flex;
- align-items: center;
- p{
- margin-left: 8px;
- }
- }
- span{
- color:#999;
- }
- }
- }
- .userInfo{
- // background-color: #fff;
- background: linear-gradient(#fff2eb,#ffffff);
- margin: 16px;
- padding: 16px;
- border-radius: 8px;
- p{
- color:#637AA2;
- }
- .userInfo-main{
- display: flex;
- justify-content: space-between;
- margin-top: 4px;
- align-items: center;
- h2{
- flex: 1;
- font-size: 32px;
- display: flex;
- justify-content: space-between;
- .withdraw{
- margin: auto 0;
- width: 80px;
- height:30px;
- line-height: 28px;
- border-radius: 20px;
- background-color: rgba(255, 133, 1, 100);
- color: rgba(255, 255, 255, 100);
- font-size: 14px;
- text-align: center;
- }
- }
- }
- .userInfo-btn{
- padding: 6px 10px;
- background-color: #FF8501;
- color:#fff;
- border-radius: 15px;
- }
- .userInfo-foot{
- display: flex;
- justify-content: space-between;
- margin-top: 12px;
- .userInfo-item{
- flex: 1;
- h4{
- font-size: 16px;
- margin-top: 4px;
- }
- }
- }
- }
- .userHead{
- display: flex;
- align-items: center;
- padding:40px 20px 0;
- .userHead-img{
- }
- .userHead-text{
- margin-left: 12px;
- h3{
- font-size: 24px;
- color:#fff;
- font-weight: normal;
- }
- .userHead-text-position{
- display: flex;
- align-items: center;
- margin-top: 5px;
- p{
- color:#fff;
- margin-left: 4px;
- }
- }
- }
- }
- .userData{
- background-color: #fff;
- margin: 16px;
- padding: 16px;
- border-radius: 8px;
- display: flex;
- }
- .userData-item{
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content:space-between;
- .userData-data{
- font-size: 24px;
- font-weight: bold;
- }
- .userData-name{
- font-size: 16px;
- }
- .userData-foot{
- margin-top: 4px;
- color:#637AA2;
- }
- }
-
-
- //功能菜单
- .function-menu{
- margin: 12px 16px;
- background-color: #fff;
- border-radius: 8px;
- padding: 0 13px;
- display: flex;
- flex-wrap: wrap;
- }
- @media screen and (max-width: 375px) {
- .item {
- width: 33% !important;
- }
- }
- .item{
- width: 25%;
- margin-top: 20px;
- margin-bottom: 11px;
- display: flex;
- flex-direction: column;
- align-items: center;
- color: rgba(119, 119, 119, 100);
- i{
- font-size: 24px
- }
- .item-name{
- font-size: 16px;
- margin-top: 8px;
- }
- }
- .logout-btn{
- background-color: #fff;
- margin: 12px 16px;
- border: 8px;
- color: rgba(238, 49, 56, 100);
- font-size: 16px;
- line-height: 40px;
- }
- </style>
|