123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599 |
- <template>
- <view>
- <ujp-navbar title="用户页面" :show="false"></ujp-navbar>
- <view class="header">
- <!-- 用户信息 -->
- <view class="userinfo" :class="{
- userinfo2:personInfo&&personInfo.userType==2
- }">
- <view class="infos" @click="toData">
- <view class="head-portrait">
- <u-avatar :src="userId ? headImg : '../../assets/img/head.png'" size="96"></u-avatar>
- </view>
- <view class="username" v-if="personInfo&&personInfo.userType==1">
- <view class="name" style="font-size: 56rpx; width: 360rpx;line-height: 100rpx;">
- 游客模式
- </view>
- </view>
- <view class="" v-if="personInfo&&personInfo.userType==1">
- </view>
- <view class="username" v-else>
- <view class="name">
- {{userId ? nickName : '登录 / 注册'}}
- </view>
- <view class="change" :style="elderStatus ? 'font-size: 16px;' : ''">
- {{userId ? '点击修改个人信息' : '登录后享受更多优惠及服务'}}
- </view>
- </view>
- </view>
- <view class="right" v-if="personInfo&&personInfo.userType==2">
- <img src="@/assets/img/9-4/联盟会员.png"
- v-if="branchParameterBl()&&(personInfo.memberLevel==1||personInfo.memberLevel==null)">
- <img src="@/assets/img/9-4/联盟会员ud.png"
- v-if="branchParameterBl('ud')&&(personInfo.memberLevel==1||personInfo.memberLevel==null)">
- <img src="@/assets/img/9-4/白银会员.svg" v-if="personInfo.memberLevel==2">
- <img src="@/assets/img/9-4/黄金会员.svg" v-if="personInfo.memberLevel==3">
- <img src="@/assets/img/9-4/白金会员.svg" v-if="personInfo.memberLevel==4">
- <img src="@/assets/img/9-4/钻石会员.png" v-if="personInfo.memberLevel==5">
- <view class="rightText " :class="{
- rightTextA:personInfo.memberLevel==1||personInfo.memberLevel==null,
- rightTextB:personInfo.memberLevel==2,
- rightTextC:personInfo.memberLevel==3,
- rightTextD:personInfo.memberLevel==4,
- rightTextE:personInfo.memberLevel==5
- }">
- <view class="rightText1">{{personInfo.memberLevelStr}}</view>
- <view class="rightText2" @click="gotoUrl('pages/user/member/member')">查看详情 <u-icon
- name="arrow-right"></u-icon> </view>
- </view>
- </view>
- </view>
- <!-- 卡包入口 -->
- <view class="my-infos" v-if="(personInfo&&personInfo.userType==2)">
- <view class="item">
- <view class="item-value" v-if="personAccount.availableAmount||personAccount.chargingFunds ">
- {{personAccount.chargingFunds != null ? (personAccount.availableAmount+personAccount.chargingFunds).toFixed(2) : personAccount.availableAmount.toFixed(2)}}
- </view>
- <view class="item-value" v-else>
- 0.00
- </view>
- <view class="item-title" @click="toBalance">
- 余额<u-icon name="arrow-right" color="#B8BDC4" size="2"></u-icon>
- </view>
- </view>
- <view class="line">
- </view>
- <view class="item ">
- <view class="item-value">
- {{cardNum}}
- </view>
- <view class="item-title" @click="gotoUrl('pages/cardBag/cardBag')">
- 会员卡<u-icon name="arrow-right" color="#B8BDC4" size="2"></u-icon>
- </view>
- </view>
- <view class="line">
- </view>
- <view class="item">
- <view class="item-value">
- {{personAccount.couponNum}}
- </view>
- <view class="item-title" @click="toMyCoupon">
- 优惠券<u-icon name="arrow-right" color="#B8BDC4" size="2"></u-icon>
- </view>
- </view>
- </view>
- <!-- 卡片 -->
- <view v-for="(item,i) in businessVipList" :key="i" v-if="false"
- @click="gotoUrl('pages/user/company-vip?id='+item.platform)" class="card">
- <view class="card2">
- <view class="title">
- <text class="img">
- <img src="../../assets/img/riFill-building-fill@4x.png" alt="">
- </text>
- {{item.platformN}}
- </view>
- <view class="view">
- 查看<text class="iconfont"></text>
- </view>
- </view>
- <view class="cardspan" v-if="item.entAccountEnabled&&item.enterpriseAccount!=null">
- 企业余额:{{item.enterpriseAccount.totalAmount?item.enterpriseAccount.totalAmount.toFixed(2):'0.00'}}元
- </view>
- </view>
- <!-- 可用余额 -->
- <view class="balance" v-if="false&&(personInfo&&personInfo.userType==2)">
- <view class="item" @click="toBalance">
- <view class="num oldTextjp" oldstyle="font-size: 28px;">
- {{personAccount.availableAmount != null ? personAccount.availableAmount.toFixed(2) : '0.00'}}<span
- style="font-size: 16px;">元</span>
- </view>
- <view class="name" :style="elderStatus ? 'font-size: 16px;' : ''">
- 可用余额{{" "}}
- <span class="userData-foot-look">查看</span>
- </view>
- </view>
- <view class="item" @click="toMyCoupon">
- <view class="num oldTextjp" oldstyle="font-size: 28px;">
- {{personAccount.couponNum}}<span style="font-size: 16px; margin-right: 4px;">张</span>
- <!-- <text class="new">新券</text> -->
- <span style="font-size: 16px;">共</span>{{personAccount.couponAmount}}<span
- style="font-size: 16px;">元</span>
- </view>
- <view class="name" :style="elderStatus ? 'font-size: 16px;' : ''">
- 优惠券{{" "}}
- <span class="userData-foot-look">查看</span>
- </view>
- </view>
- </view>
- </view>
- <!-- 菜单 -->
- <view class="menu menuMain">
- <view class="item" @click="bindingHomePile()">
- <view class="item-icon">
- <img src="@/assets/img/user/2.png">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的家桩
- </view>
- </view>
- <view class="item" @click="toSearchPile(0)">
- <view class="item-icon">
- <img src="@/assets/img/spring/user1.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 附近站点
- </view>
- </view>
- <view class="item" @click="toSearchPile(1)">
- <view class="item-icon">
- <img src="@/assets/img/user/1.png">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 充电地图
- </view>
- </view>
- <view class="item" @click="chargingRecord">
- <view class="item-icon">
- <img src="@/assets/img/user/3.png">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 充电记录
- </view>
- </view>
- <view class="item" @click="myAppointment" v-if="0">
- <view class="item-icon">
- <img src="@/assets/img/spring/user2.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的预约
- </view>
- </view>
-
- <view class="item" @click="myAppointment2">
- <view class="item-icon">
- <img src="@/assets/img/spring/user2.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 预约充电
- </view>
- </view>
-
- <view class="item" @click="toInvoice">
- <view class="item-icon">
- <img src="@/assets/img/spring/user3.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的发票
- </view>
- </view>
- <view class="item" @click="toMyorder">
- <view class="item-icon">
- <img src="@/assets/img/spring/user4.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的订单
- </view>
- </view>
- </view>
- <view class="carImg" v-if="!personInfo||personInfo&&personInfo.userType!=2">
- <img @click="toData" src="@/assets/img/gologin/img.png">
- </view>
- <!-- 优惠 -->
- <view class="discounts" v-show="bannerList.length" v-else>
- <u-swiper bg-color="#fff" :img-mode="'scaleToFill'" height="160" :list="bannerList" mode="none"
- @click="clickBanner" :name="'picUrl'">
- </u-swiper>
- </view>
- <!-- 菜单 -->
- <view class="menu" style="margin-bottom:60px ;">
- <view class="item" @click="gotoUrl('pages/service/service')">
- <view class="item-icon">
- <i class="ri-customer-service-2-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 联系客服
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/user/sharePicc')" v-if="false">
- <view class="item-icon">
- <img src="@/assets/img/gologin/antOutline-insurance.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 车险报名
- </view>
- </view>
- <view class="item" @click="carClick">
- <view class="item-icon">
- <u-icon name="car" size="24px"></u-icon>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 车辆管理
- </view>
- </view>
- <view class="item" @click="feedback">
- <view class="item-icon">
- <i class="ri-feedback-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 意见反馈
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/user/help')">
- <view class="item-icon">
- <i class="ri-compass-3-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 操作指南
- </view>
- </view>
- <view class="item" @click="myAppointment">
- <view class="item-icon" style="line-height: 52rpx;">
- <u-icon name="hourglass" size="24px"></u-icon>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的预约
- </view>
- </view>
- <!-- <view class="item">
- <view class="item-icon">
- <i class="ri-tools-line"></i>
- </view>
- <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
- 我要报修
- </view>
- </view> -->
- <view class="item" @click="toFreeInstallation">
- <view class="item-icon">
- <i class="ri-file-add-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 免费安桩
- </view>
- </view>
- <view class="item" @click="toJoin">
- <view class="item-icon">
- <i class="ri-service-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我要加盟
- </view>
- </view>
- <view class="item" @click="gotoUrl('pages/user/about')">
- <view class="item-icon">
- <i class="ri-account-pin-box-line"></i>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 关于我们
- </view>
- </view>
- <view class="item" @click="Subscribe">
- <view class="item-icon" style="line-height: 52rpx;">
- <u-icon name="weixin-circle-fill" size="24px"></u-icon>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 公众号
- </view>
- </view>
- <view class="item" @click="setOld">
- <view class="item-icon" style="line-height: 52rpx;">
- <u-icon name="man-add" size="24px"></u-icon>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 长辈模式
- </view>
- </view>
- <view class="item" @click="setUp">
- <view class="item-icon" style="line-height: 52rpx;">
- <u-icon name="setting" size="24px"></u-icon>
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 设置
- </view>
- </view>
- <!-- <view class="item">
- <view class="item-icon">
- <i class="ri-shield-user-line"></i>
- </view>
- <view class="item-name oldTextjp" oldstyle="font-size: 16px;">
- 实名认证
- </view>
- </view> -->
- </view>
- <u-modal v-model="show1" @confirm="gotoGz" cancel-text="暂不关注" confirm-text="前往关注" confirm-color="#53b56b"
- :show-cancel-button="true" ref="uModal2" :asyncClose="true">
- <view style="padding: 15px; text-align: center; ">前往关注<span
- style=" color: #53b56b;">{{projectName}}</span>公众号</view>
- </u-modal>
- <u-mask :show="show2">
- <view class="wrap">
- <view class="shema" @tap.stop>
- <view class="title">
- 设置浏览模式
- </view>
- <view class="">
- <u-radio-group v-model="value">
- <u-radio v-for="(item, index) in list" :key="index" :name="item.name"
- :disabled="item.disabled" active-color="#00B962">
- {{item.name}}
- <p v-if="item.name == '长辈模式'">字体更大 看的清楚</p>
- <p v-if="item.name == '标准模式'">信息丰富 功能全面</p>
- </u-radio>
- </u-radio-group>
- </view>
- <view class="hint">可在 {{""}}我的-设置 {{""}}页面中切换</view>
- <view class="btn-box">
- <u-button class="choice-btn" type="success" shape="circle" @click="elderClick">我选好了</u-button>
- </view>
- </view>
- </view>
- </u-mask>
-
- <Tabbar :spring="indexStyle.spring" :current="3" ref="tabbarMain"></Tabbar>
- </view>
- </template>
- <script>
- import * as API from '@/apis/index.js'
- import * as userApi from '@/apis/user.js'
- import * as loginApi from '@/apis/login.js'
- import * as WxJsApi from '@/utils/wxJsApi.js'
- import Tabbar from '@/components/Tabbar.vue'
- import * as newsApi from '@/apis/news.js'
- import * as API_apply from '@/apis/apply.js'
-
- import {
- newDate
- } from '@/utils'
- export default {
- components: {
- Tabbar
- },
- data() {
- return {
- projectName: "",
- userCard: null,
- recordsTotal: 0,
- myCouponList: [],
- elderStatus: false,
- personAccount: {},
- userId: '',
- headImg: '',
- nickName: '',
- userPhone: '',
- personInfo: {},
- show: false,
- title: '联系客服',
- content: '400-8899-619',
- confirmText: '拨打电话',
- bannerList: [],
- businessVipList: [],
- bannerListTop: [],
- list: [{
- name: '长辈模式',
- disabled: false
- },
- {
- name: '标准模式',
- disabled: false
- },
- ],
- // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
- value: '标准模式',
- show1: false,
- show2: false,
- background: {
- background: 'none'
- },
- cardNum: 0,
- indexStyle: {
- noticeBarBgColor: "#fff",
- noticeBarColor: "#FF3D00",
- backgroundClass: "background",
- spring: false,
- },
- getBannerInfoTopBl: true,
- showTop: false,
- showTopImg: '',
- showTopIndex: 0,
- applyList:[],
- }
- },
- onShow() {
- if (this.bannerList.length == 0) {
- this.getBannerInfo("userinfo")
- }
- this.personInfo = this.carhelp.getPersonInfo()
- if (this.carhelp.getPersonInfo()) {
- this.userId = this.carhelp.getPersonInfo().id;
- this.getCarPersonAccount();
- this.getUserInfo();
- this.myApplyList()
- //this.getCouponList();
- }
- if (this.$refs.tabbarMain) {
- this.$refs.tabbarMain.setcount(3);
- }
- if (this.carhelp.get("getElderModeClass") == "长辈模式") {
- this.elderStatus = true;
- } else {
- this.elderStatus = false;
- }
- },
- computed: {
- userCardBool() {
- if (this.userCard) {
- var date = new Date().getTime()
- var reg = new RegExp('-', 'gi')
- var str = this.userCard.endTime;
- //console.log(str.replace(reg,'/'))
- var date2 = newDate(str).getTime();
- if (date < date2) {
- return true;
- }
- }
- return false
- }
- },
- onLoad() {
- this.spring()
- },
- onReady() {
- if (this.bannerList.length == 0) {
- this.getBannerInfo("userinfo")
- }
- WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
- // //(res)
- }).catch(error => {
- //(error)
- })
- var consumerPhone = "400-8899-619"
- // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
- if (consumerPhone) {
- this.content = consumerPhone
- }
- if (this.carhelp.get("getElderModeClass")) {
- this.value = this.carhelp.get("getElderModeClass");
- }
- },
- methods: {
- myApplyList(){
-
- API_apply.myApplyList({
-
- }).then((res) => {
- //this.obj = res.data
-
- this.applyList=res.data.applyList;
-
-
-
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- bindingHomePile(k) {
- if (!this.userId) {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }else if(this.applyList.length){
-
- var item=this.applyList[0]
- if(item.status==0){
-
- uni.navigateTo({
- url: '/pages/bindingHomePile/bindingHomePile'
- })
-
- }else{
- uni.navigateTo({
- url: '/pages/bindingHomePile/homeInfo'
- })
- // uni.navigateTo({
- // url:'/pages/searchPile/stationAndPile/chargingPileDetails?isback=1&id='+item.gunNo
- // })
- }
- }else{
- uni.navigateTo({
- url: '/pages/bindingHomePile/bindingHomePile'
- })
- }
-
- },
- toSearchPile(k) {
- uni.navigateTo({
- url: '/pages/searchPile/searchPile'+(k?'?map=1':'')
- })
- },
- spring() {
- this.springShow = false;
- try {
- if (this.carhelp.getConfig().spring2025) {
- var spring2025 = this.carhelp.getConfig().spring2025
- var sz = spring2025.split(',')
- if (sz && sz.length == 2) {
- var time1 = new Date(sz[0])
- var time2 = new Date(sz[1])
- var time0 = new Date()
- if (time0 > time1 && time0 < time2) {
- this.springShow = true;
- }
- }
- }
- this.$forceUpdate()
- } catch (e) {
- }
- if (!this.springShow) {
- return
- }
- this.indexStyle.noticeBarBgColor = "#C00000"
- this.indexStyle.noticeBarColor = "#FFD695"
- this.indexStyle.backgroundClass = "background-spring"
- this.indexStyle.spring = true;
- },
- getChargeList() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.personCardList({
- }).then((res) => {
- uni.hideLoading();
- this.cardNum = res.data.cardNum
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- carClick() {
- if (this.userId) {
- var url = '/pages/user/car/carDet'
- uni.navigateTo({
- url: url
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- elderClick() {
- if (this.value == "长辈模式") {
- this.elderStatus = true;
- this.carhelp.set("getElderModeClass", "长辈模式");
- this.fontMode = '1';
- } else {
- this.elderStatus = false;
- this.carhelp.set("getElderModeClass", "标准模式");
- this.fontMode = '0';
- }
- if (this.userId) {
- API.changeFont({
- fontMode: this.fontMode
- }).then((res) => {
- this.show2 = false;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- } else {
- this.show2 = false;
- }
- },
- gotoGz() {
- this.carhelp.setGzDate()
- var url = process.car.gzUrl;
- window.location.href = url
- },
- Subscribe() {
- this.projectName = process.car.ProjectName;
- this.show1 = true
- },
- setOld() {
- this.show2 = true;
- },
- personalCenter() {
- API.personalCenter().then((res2) => {
- var entRegList = res2.data.entRegList;
- for (var i in this.businessVipList) {
- var item1 = this.businessVipList[i]
- for (var j in entRegList) {
- var item2 = entRegList[j].vipUser;
- if (item1.id == item2.id) {
- item1.enterpriseAccount = entRegList[j].enterpriseAccount
- }
- }
- }
- this.$forceUpdate()
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- clickBanner(index) {
- var mod = this.bannerList[index]
- if (mod.linkUrl.indexOf('http') == 0) {
- window.location = mod.linkUrl;
- } else if (mod.linkUrl.indexOf('#/') == 0) {
- if (mod.linkUrl.indexOf("?") == -1) {
- mod.linkUrl += '?';
- }
- //window.location=mod.linkUrl;
- var url = mod.linkUrl.split("#")[1]
- //window.location = mod.clickUrl;
- uni.navigateTo({
- url: url
- })
- } else if (mod.linkUrl == '#' || mod.linkUrl == '') {
- } else {
- uni.navigateTo({
- url: mod.linkUrl
- })
- }
- },
- getBannerInfo(code) {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- newsApi.getBannerInfo(code).then((res) => {
- uni.hideLoading();
- this.bannerList = res.data;
- // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- getCouponList() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- userApi.couponList({
- status: '0'
- }).then((res) => {
- uni.hideLoading();
- this.myCouponList = res.data.data;
- this.recordsTotal = res.data.recordsTotal;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- //微信扫二维码
- getScanCode() {
- if (this.userId) {
- WxJsApi.scanQRCode(1).then(res => {
- if (res) {
- API.scanCode(res).then((response) => {
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- }
- }).catch(error => {
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toMyorder() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/discountCard/myOrder'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toInvoice() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/MyInvoice/invoiceManagement'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- chargingRecord() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/record/index'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
-
- getUserInfo() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- loginApi.findByOpenId({
- openId: this.carhelp.getOpenId()
- }).then((res) => {
- uni.hideLoading();
- this.getChargeList()
- //this.businessVipList = res.data.businessVipList;
- this.headImg = res.data.regUser.headImg;
- this.nickName = res.data.regUser.nickName;
- this.userCard = res.data.userCard;
- var phone = res.data.regUser.phone;
- if (phone) {
- var phone1 = phone.slice(0, 3);
- var phone2 = phone.slice(-4);
- this.userPhone = phone1 + '****' + phone2;
- }
- if (res.code == 200 && res.result) {
- var token = res ? res.data.token : '';
- this.personInfo = res.data.regUser
- this.carhelp.setPersonInfo(res.data.regUser);
- this.carhelp.setToken(token);
- this.carhelp.setPersonInfoPlus(res.data);
- console.log("setPersonInfoPlus")
- }
- }).catch(error => {
- this.carhelp.logoff()
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- toData() {
- if (this.personInfo && this.personInfo.userType == 1) {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- } else if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/dataSet'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toBalance() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/finance/balance'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toMyCoupon() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/coupon/myCoupon'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toRecharge() {
- if (this.userId) {
- if (this.personInfo.userType == 1) {
- uni.showToast({
- title: "游客模式只支持“先付后退”"
- })
- } else {
- uni.navigateTo({
- url: '/pages/user/finance/recharge'
- })
- }
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- carManage() {
- if (this.userId) {
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- myAppointment2() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/myReservation/chargingRe'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- myAppointment() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/myReservation/myReservation'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- toFreeInstallation() {
- uni.navigateTo({
- url: '/pages/user/freeInstallment?isback=1'
- })
- // if(this.userId) {
- // } else {
- // uni.navigateTo({
- // url: '/pages/login/login'
- // })
- // }
- },
- toJoin() {
- uni.navigateTo({
- url: '/pages/user/toJoin?isback=1'
- })
- // if(this.userId) {
- // } else {
- // uni.navigateTo({
- // url: '/pages/login/login'
- // })
- // }
- },
- feedback() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/message'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- setUp() {
- if (this.userId) {
- uni.navigateTo({
- url: '/pages/user/setting'
- })
- } else {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- },
- openModal() {
- this.show = true;
- },
- confirmPhone() {
- this.show = false;
- uni.makePhoneCall({
- phoneNumber: this.content //仅为示例
- });
- },
- getCarPersonAccount() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- userApi.carPersonAccount().then((res) => {
- uni.hideLoading();
- this.personAccount = res.data;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- }
- }
- }
- </script>
- <style>
- page {
- background-size: 100%;
- }
- </style>
- <style lang="scss" scoped>
- .carImg {
- margin: 0 40rpx;
- img {
- width: 100%;
- }
- }
- .btnuserType1 {
- width: 160rpx;
- height: 64rpx;
- line-height: 60rpx;
- border-radius: 50px;
- background-color: rgba(0, 185, 98, 1);
- color: #fff;
- font-size: 28rpx;
- text-align: center;
- font-family: -apple-system;
- margin-top: 20rpx;
- }
- .header {
- background: linear-gradient(#D6EEDC, #f3f4f4);
- .userinfo {
- display: flex;
- justify-content: space-between;
- padding: 40rpx 32rpx 32rpx 32rpx;
- .infos {
- display: flex;
- }
- .head-portrait {
- width: 48px;
- height: 48px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .username {
- margin-left: 8px;
- .name {
- color: rgba(51, 51, 51, 100);
- font-size: 40rpx;
- line-height: 48rpx;
- }
- .change {
- color: rgba(166, 180, 173, 100);
- line-height: 14px;
- margin-top: 8px;
- }
- }
- .right {
- display: flex;
- align-items: center;
- img {
- width: 96rpx;
- height: 96rpx;
- position: relative;
- left: 48rpx;
- }
- .rightText {
- padding-left: 28rpx;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- justify-content: space-evenly;
- align-content: center;
- width: 188rpx;
- //height: 72rpx;
- text-align: center;
- padding-top: 4rpx;
- }
- .rightTextA {
- background: linear-gradient(134.91deg, rgba(220, 255, 233, 1) 29.61%, rgba(176, 255, 209, 1) 99.85%);
- }
- .rightTextB {
- background: linear-gradient(134.91deg, rgba(220, 232, 255, 1) 29.61%, rgba(176, 202, 255, 1) 99.85%);
- //background: linear-gradient(134.91deg, rgba(255, 241, 187, 1) 29.61%, rgba(255, 215, 63, 1) 99.85%);
- }
- .rightTextC {
- background: linear-gradient(134.91deg, rgba(255, 241, 187, 1) 29.61%, rgba(255, 215, 63, 1) 99.85%);
- //background: linear-gradient(134.91deg, rgba(229, 234, 255, 1) 21.58%, rgba(180, 176, 255, 1) 98.85%);
- }
- .rightTextD {
- background: linear-gradient(134.91deg, rgba(229, 234, 255, 1) 21.58%, rgba(180, 176, 255, 1) 98.85%);
- //background: linear-gradient(154.07deg, rgba(0, 81, 255, 1) -7.68%, rgba(61, 122, 255, 1) 32.44%, rgba(159, 123, 255, 1) 106.96%);
- }
- .rightTextE {
- background: linear-gradient(154.07deg, rgba(0, 81, 255, 1) -7.68%, rgba(61, 122, 255, 1) 32.44%, rgba(159, 123, 255, 1) 106.96%);
- }
- .rightText1 {
- margin-top: 2px;
- font-size: 24rpx;
- color: rgba(16, 16, 16, 1);
- }
- .rightText2 {
- margin-bottom: 2px;
- //opacity: 0.7;
- color: #646464;
- font-size: 20rpx;
- }
- // .rightTextD {
- // .rightText1,
- // .rightText2 {
- // color: #fff;
- // }
- // }
- }
- }
- .userinfo2 {
- padding: 40rpx 0 32rpx 32rpx;
- }
- // 卡包入口
- .my-infos {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 96rpx;
- margin: 40rpx 0;
- .line {
- height: 56rpx;
- width: 1px;
- background-color: rgba(224, 224, 224, 1);
- }
- .item {
- text-align: center;
- .item-value {
- color: rgba(51, 51, 51, 1);
- font-size: 40rpx;
- font-weight: bold;
- }
- .item-title {
- color: rgba(85, 85, 85, 1);
- margin-top: 8rpx;
- }
- }
- ::v-deep .uicon-arrow-right {
- margin-left: 4rpx;
- }
- }
- // 卡片
- .card {
- background: linear-gradient(#405473, #536D96);
- border-radius: 8px;
- width: 91.4%;
- margin: 8rpx auto 0;
- padding: 24rpx 24rpx;
- .cardspan {
- margin-left: 48rpx;
- font-size: 24rpx;
- line-height: 40rpx;
- color: rgba(255, 255, 255, 100);
- }
- .card2 {
- display: flex;
- justify-content: space-between;
- .title {
- line-height: 72rpx;
- color: rgba(255, 255, 255, 100);
- font-size: 36rpx;
- .img {
- display: inline-block;
- // width: 48rpx;
- // height: 48rpx;
- vertical-align: middle;
- margin-right: 8rpx;
- img {
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- .view {
- line-height: 72rpx;
- color: rgba(208, 214, 226, 100);
- font-size: 36rpx;
- }
- .view2 {
- line-height: 144rpx !important;
- }
- }
- }
- // 立即开通
- .openlogin {
- border: 1px solid rgba(187, 226, 189, 1);
- background: #F4FFF3;
- width: 91.4%;
- padding: 30rpx 24rpx 24rpx 24rpx;
- margin: 8rpx auto 0;
- margin-bottom: 10px;
- display: flex;
- justify-content: space-between;
- border-radius: 8px;
- .title {
- line-height: 72rpx;
- color: #101010;
- font-size: 36rpx;
- .img {
- display: inline-block;
- // width: 48rpx;
- // height: 48rpx;
- vertical-align: middle;
- margin-right: 8rpx;
- img {
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- .open-btn {
- margin: auto;
- padding-left: 12px;
- padding-right: 4px;
- line-height: 28px;
- height: 32px;
- // text-align: center;
- color: #ffffff;
- border-radius: 10px;
- background: linear-gradient(to right, #34BC58, #00A39A);
- .iconfont {
- margin-left: 0px;
- }
- }
- }
- // 立即开通
- .open,
- .opened {
- background: linear-gradient(#4A4C62, #2C3145);
- width: 91.4%;
- padding: 30rpx 24rpx 24rpx 24rpx;
- margin: 8rpx auto 0;
- display: flex;
- justify-content: space-between;
- border-radius: 8px;
- .title {
- line-height: 72rpx;
- color: #E1C082;
- font-size: 36rpx;
- .img {
- display: inline-block;
- vertical-align: middle;
- margin-right: 8rpx;
- img {
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- .open-btn {
- padding-left: 28rpx;
- padding-right: 8rpx;
- line-height: 76rpx;
- // text-align: center;
- font-size: 32rpx;
- border-radius: 100rpx;
- background: linear-gradient(to right, #F0E1C6, #ECC194);
- .iconfont {
- margin-left: 0px;
- }
- }
- .date {
- color: #d1b37a;
- line-height: 24px;
- font-size: 32rpx;
- .iconfont {
- color: #867668
- }
- }
- }
- // 余额
- .balance {
- background-color: #fff;
- width: 91.4%;
- margin: 12px auto;
- padding: 16px;
- display: flex;
- // justify-content: space-between;
- justify-content: space-around;
- border-radius: 8px;
- .item {
- text-align: center;
- .num {
- line-height: 28px;
- color: rgba(51, 51, 51, 100);
- font-size: 24px;
- position: relative;
- .new {
- width: 40px;
- line-height: 20px;
- border-radius: 24px 24px 24px 0px;
- background-color: rgba(255, 94, 0, 100);
- color: rgba(255, 255, 255, 100);
- font-size: 12px;
- text-align: center;
- position: absolute;
- bottom: 20px;
- left: 36px;
- }
- }
- .name {
- height: 16px;
- color: rgba(134, 134, 134, 100);
- font-size: 14px;
- margin-top: 4px;
- .userData-foot-look {
- color: #00B962;
- }
- }
- }
- }
- }
- // 优惠
- .discounts {
- width: 91.4%;
- //height: 80px;
- margin: 0 auto;
- border-radius: 8px;
- overflow: hidden;
- img {
- width: 100%;
- height: 80px;
- }
- }
- .menuMain {
- .item-icon {
- img {
- width: 64rpx;
- height: 64rpx;
- }
- }
- }
- // 菜单
- .menu {
- background-color: #fff;
- width: 91.4%;
- margin: 24rpx auto;
- padding: 0 24rpx 18rpx 24rpx;
- border-radius: 8px;
- display: flex;
- flex-wrap: wrap;
- .item {
- width: 25%;
- margin-top: 40rpx;
- margin-bottom: 22rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- color: rgba(119, 119, 119, 100);
- i {
- font-size: 24px
- }
- .item-name {
- font-size: 14px;
- margin-top: 8px;
- }
- }
- }
- .shema {
- width: 70%;
- padding-bottom: 20px;
- border-radius: 16px;
- background-color: #fff;
- position: fixed;
- top: 100px;
- left: 0;
- right: 0;
- margin: 0 auto;
- z-index: 9999;
- .title {
- height: 33px;
- color: rgba(16, 16, 16, 100);
- font-size: 24px;
- text-align: center;
- padding: 16px 0;
- }
- .u-radio-group {
- margin: 16px 5vw;
- }
- ::v-deep .u-radio {
- width: 60vw !important;
- padding: 24px 24px 40px;
- line-height: 20px;
- border-radius: 16px;
- text-align: center;
- border: #101010 1px solid;
- margin-top: 12px;
- }
- ::v-deep .u-radio__label {
- text-align: left;
- height: 24px;
- // color: rgba(0, 185, 98, 100);
- font-size: 24px;
- }
- p {
- height: 22px;
- color: rgba(102, 102, 102, 100);
- font-size: 14px;
- margin-top: 12px;
- white-space: nowrap
- }
- .hint {
- text-align: center;
- }
- .btn-box {
- margin-top: 20px;
- .choice-btn {
- width: 80%;
- }
- }
- }
- .wrap {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- }
-
- ::v-deep .springclass{
- .u-tabbar__content__item{
- .u-icon__img {
- width:56rpx !important;
- height:56rpx !important
- }
- }
- .u-tabbar__content__item:nth-child(4){
- .u-icon__img {
- width:72rpx !important;
- height:72rpx !important
- }
- }
- }
- </style>
|