12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466 |
- <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.jpg" 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.couponAmount}}
- </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="carImg" v-if="!personInfo||personInfo&&personInfo.userType!=2">
- <img @click="toData" src="@/assets/img/gologin/img.png">
- </view>
- <!-- 优惠 -->
- <view class="discounts" 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">
- <view class="item" @click="toRecharge">
- <view class="item-icon">
- <img src="@/assets/img/gologin/img4.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 快速充值
- </view>
- </view>
- <view class="item" @click="chargingRecord">
- <view class="item-icon">
- <img src="@/assets/img/gologin/img3.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/gologin/img1.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/gologin/img6.svg">
- </view>
- <view class="item-name " oldstyle="font-size: 16px;">
- 我的订单
- </view>
- </view>
- </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 v-if="indexStyle.spring" class="springClass" bgColor="" inColor="#fff"
- acColor="#f9d79e" :current="3"
- ref="tabbarMain" ></Tabbar>
-
- <Tabbar v-else :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 {
- 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: [],
- 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,
- }
- }
- },
- 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.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: {
- spring() {
- this.springShow=false;
- try{
- if(this.carhelp.getConfig().spring2024){
- var spring2024=this.carhelp.getConfig().spring2024
- var sz=spring2024.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'
- })
- }
- },
- toSearchPile() {
- uni.navigateTo({
- url: '/pages/searchPile/searchPile'
- })
- },
- 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'
- })
- }
- },
- 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;
- }
- }
- /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;
- }
- }
- // 菜单
- .menu {
- background-color: #fff;
- width: 91.4%;
- margin: 24rpx auto 0;
- 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;
- }
- /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;
- }
- /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%;
- }
- </style>
|