123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017 |
- <template>
- <view class="my-page">
- <!-- 自定义导航栏 -->
- <view class="custom-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
- <view class="navbar-content">
- <view class="back-btn">
- <!-- <image src="@/static/icons/back.png" class="back-icon"></image> -->
- </view>
- <view class="title">我的</view>
- </view>
- </view>
- <!-- 页面内容 -->
- <view class="page-content">
- <view>
- <view class="head" style="background: linear-gradient(to bottom, #ffb289, #fff); padding-top: 30rpx;position: relative;">
- <view class="flex align-center justify-between padding-lr">
- <view class="flex align-center justify-center" @tap="binduser()">
- <image :src="image_url" style="width: 100rpx;height: 100rpx;border-radius: 100rpx;"></image>
- <view>
- <view class="text-lg text-bold margin-left-sm">{{ mobile ? mobile : '登录' }} <text style="background: #f56c6c; margin-left: 20rpx; font-size: 24rpx; padding: 10rpx 20rpx;border-radius: 30rpx;font-weight: 200;color: #fff;">未实名</text></view>
- <view style="padding: 15rpx 15rpx;display: flex; line-height: 50rpx;">
- <u-rate :allow-half="false" :disabled="true" active-color="#fe6b01" :is-fill="false" :value="3.5" style="margin-right: 15rpx;" /> <text>信用分: 86</text>
- </view>
- <view class="text-sm margin-left-sm margin-top-xs" style="font-weight: 200;color: #fff;"
- v-if="mobile">
- <text style="background: #fe6b01; padding: 10rpx 20rpx;border-radius: 30rpx;">ID: {{userId}}</text>
- </view>
- </view>
- </view>
- <view style="position: absolute;top: 32rpx; right: 75rpx; height: 100%;" v-if="mobile">
- <image @click="goNav('/my/setting/message')" v-if="globalImages" :src="globalImages + 'images/my/msg.png'"
- style="width: 44rpx;height: 43rpx;margin-right: 20rpx;" mode=""></image>
- <view class="weinumber" style="right: 0rpx; top: -10rpx;" v-if="xxCount">{{xxCount}}</view>
- </view>
- <view style="position: absolute;top: 32rpx; right: 5rpx; height: 100%;" v-if="mobile">
- <image @click="goNav('/my/setting/message')" v-if="globalImages" :src="globalImages + 'images/my/shezhi.png'"
- style="width: 44rpx;height: 43rpx;margin-right: 20rpx;" mode=""></image>
- <view class="weinumber" style="right: 0rpx; top: -10rpx;" v-if="xxCount">{{xxCount}}</view>
- </view>
- </view>
-
- <!-- <view class="vip">
- <view class="flex align-center">
- <image src="../../static/image/my/huiyuan.png" style="width: 66rpx;height: 60rpx;"></image>
- <view class="text-bold margin-left-xs" style="color: #512C19;font-size: 30rox;">钻石会员卡享3大权益</view>
- </view>
- <view class="flex align-center" @click="goNav('/my/vip/index')">
- <view class="margin-right-xs">立即开通</view>
- <image src="../../static/image/my/vipright.png" style="width: 11rpx;height: 20rpx;"></image>
- </view>
- </view> -->
-
- <!-- v-if="xcxSelect!='否'" -->
- <view class="tabbox margin-top">
- <view class="leftbox" @click="goNav('/my/wallet/index')">
- <view>我的钱包</view>
- <view class="tit">余额:¥{{money?money:'0'}}</view>
- <view class="image">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/money.png'" style="width: 139rpx;height: 124rpx;"></image>
- </view>
- </view>
- <view class="rightbox" @click="goNav('/my/youhui/index')">
- <view>我的优惠券</view>
- <view class="tit">{{couponCount?couponCount:'0'}}张优惠券</view>
- <view class="image">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/youhui.png'" style="width: 140rpx;height:96rpx;"></image>
- </view>
- </view>
- </view>
- </view>
- <!-- 列表 -->
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">我的订单</view>
- <!-- <text>立即查看</text> -->
- <!-- <view class="flex text-gray" @click="goSwt(0)">
- <u-icon name="arrow-right" width='11rpx' height='18rpx' color="#1A1A1A"></u-icon>
- </view> -->
- </view>
-
- <view class="margin-tb"></view>
- <view class="flex justify-around">
- <view class="text-center" @click="goSwt(2)" style="position: relative;">
- <image v-if="globalImages" :src="globalImages + 'images/my/order1.png'" style="width: 52rpx;height: 52rpx;" mode=""></image>
- <view class="text-sm">待接单</view>
- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view>
- </view>
- <view class="text-center" @click="goSwt(3)" style="position: relative;">
- <image v-if="globalImages" :src="globalImages + 'images/my/order2.png'" style="width: 52rpx;height: 52rpx;" mode=""></image>
- <view class="text-sm">已接单</view>
- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view>
- </view>
- <view class="text-center" @click="goSwt(4)" style="position: relative;">
- <image v-if="globalImages" :src="globalImages + 'images/my/order3.png'" style="width: 52rpx;height: 52rpx;" mode=""></image>
- <view class="text-sm">进行中</view>
- <view class="weinumber" v-if="order&&order.jxzOrders">{{order.jxzOrders}}</view>
- </view>
- <view class="text-center" @click="goSwt(1)" style="position: relative;">
- <image v-if="globalImages" :src="globalImages + 'images/my/order4.png'" style="width: 52rpx;height: 52rpx;" mode=""></image>
- <view class="text-sm">待支付</view>
- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view>
- </view>
- <view class="text-center" @click="goSwt(5)">
- <image v-if="globalImages" :src="globalImages + 'images/my/order5.png'" style="width: 52rpx;height: 52rpx;" mode=""></image>
- <view class="text-sm">已完成</view>
- </view>
- </view>
- </view>
-
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">常用功能</view>
- </view>
-
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/realName/authentication')">
- <image v-if="globalImages" :src="globalImages + 'images/my/shiming.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">实名认证</view>
- <!-- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view> -->
- </view>
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/fuli.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">我的福利</view>
- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view>
- </view> -->
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pages/my/invitationUser')">
- <image v-if="globalImages" :src="globalImages + 'images/my/yaoqing.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">邀请好友</view>
- <!-- <view class="weinumber" v-if="order&&order.jxzOrders">{{order.jxzOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/setting/index')">
- <image v-if="globalImages" :src="globalImages + 'images/my/shezhis.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">设置</view>
- <!-- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/classes/PassengerList')">
- <image v-if="globalImages" :src="globalImages + 'images/my/chengcheren.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">乘车人</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/exchange/shoppingMall')">
- <image v-if="globalImages" :src="globalImages + 'images/my/duihuan.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">兑换商城</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/echarts/setting/xyf')">
- <image v-if="globalImages" :src="globalImages + 'images/my/xinyong.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">信用分明细</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" v-if="mobile" @click="goNav('/my/setting/message')">
- <image v-if="globalImages" :src="globalImages + 'images/my/xiaoxi.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">消息中心</view>
- <view class="weinumber" style="right: 0rpx; top: -10rpx;" v-if="xxCount">{{xxCount}}</view>
- </view>
- </view>
- </view>
-
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">安全服务</view>
- </view>
-
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/anqvans.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">安全中心</view>
- <!-- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/xvzhi.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">安全须知</view>
- <!-- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/setting/index')">
- <image v-if="globalImages" :src="globalImages + 'images/my/jinji.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">紧急联系人</view>
- <!-- <view class="weinumber" v-if="order&&order.jxzOrders">{{order.jxzOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/shiwu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">失物招领</view>
- <!-- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view> -->
- </view>
- </view>
- </view>
-
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">出行服务</view>
- </view>
-
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/zhinan.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">使用指南</view>
- <!-- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/help/trainingList')">
- <image v-if="globalImages" :src="globalImages + 'images/my/wenda.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">常见问答</view>
- <!-- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="changekefu">
- <image v-if="globalImages" :src="globalImages + 'images/my/dianhua.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">客服电话</view>
- <!-- <view class="weinumber" v-if="order&&order.jxzOrders">{{order.jxzOrders}}</view> -->
- </view>
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/shoucang.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">我的收藏</view>
- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view>
- </view> -->
- </view>
- </view>
-
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">合作加盟</view>
- </view>
-
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/setting/recruit')">
- <image v-if="globalImages" :src="globalImages + 'images/my/zhaomu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">招募车主</view>
- <!-- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goRider()">
- <image v-if="globalImages" :src="globalImages + 'images/my/chengwei.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">成为车主</view>
- <!-- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view> -->
- </view>
- </view>
- </view>
-
- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">关于顺风车</view>
- </view>
-
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;">
- <image v-if="globalImages" :src="globalImages + 'images/my/guanyu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">关于我们</view>
- <!-- <view class="weinumber" v-if="order&&order.djdOrders">{{order.djdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="bindTo('/my/setting/xieyi')">
- <image v-if="globalImages" :src="globalImages + 'images/my/fuwu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">服务协议</view>
- <!-- <view class="weinumber" v-if="order&&order.yjdOrders">{{order.yjdOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/feedback/feedback')"
- v-if="xcxSelect!='否'">
- <image v-if="globalImages" :src="globalImages + 'images/my/yijian.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">意见反馈</view>
- <!-- <view class="weinumber" v-if="order&&order.jxzOrders">{{order.jxzOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="bindTo('/my/setting/logOff')">
- <image v-if="globalImages" :src="globalImages + 'images/my/zhuxiao.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">注销账号</view>
- <!-- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view> -->
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="bindOut()">
- <image v-if="globalImages" :src="globalImages + 'images/my/zhuxiao.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">退出登录</view>
- <!-- <view class="weinumber" v-if="order&&order.dzfOrders">{{order.dzfOrders}}</view> -->
- </view>
- </view>
- </view>
-
- <!-- <view class="margin padding-tb bg-white " style="border-radius: 24rpx;">
- <view class="flex justify-between align-center padding-lr-sm">
- <view class="text-lg text-bold text-black">推荐工具</view>
- </view>
- <view class="flex flex-wrap margin-top-sm">
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="changekefu">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/kefu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">客服中心</view>
- </view>
-
- <view class="text-center margin-tb-sm" style="width: 25%;"
- @click="divideScale!=null && divideScale!=0?goNav('/pageA/extension/team'):goNav('/pageA/extension/extension')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/fx.png'" style="width: 46rpx;height: 46rpx;" mode=""></image>
- <view class="text-sm">我的分销</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goRider()">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/ruzhu.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">司机入驻</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pages/my/invitationUser')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/share.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm ">分享好友</view>
- </view>
-
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/echarts/setting/xyf')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/xyf.png'" style="width: 46rpx;height: 46rpx;" mode=""></image>
- <view class="text-sm">信用分明细</view>
- </view> -->
- <!-- #ifndef H5 -->
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/setting/jinji')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/jg.png'" style="width: 46rpx;height: 46rpx;" mode=""></image>
- <view class="text-sm">紧急报警</view>
- </view> -->
- <!-- #endif -->
- <!-- v-if="xcxSelect!='否'" -->
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pageA/extension/team')"
- >
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/team.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm" style="margin-top: 2rpx;">我的团队</view>
- </view> -->
- <!-- v-if="FPxcxSelect!='否'" -->
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pageA/invoice/invoice')"
- >
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/fapiao.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">申请发票</view>
- </view>
-
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/help/trainingList')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/yijian.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">帮助中心</view>
- </view> -->
- <!-- v-if="xcxSelect!='否'" -->
- <!-- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/feedback/feedback')"
- >
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/help.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">意见反馈</view>
- </view>
-
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/my/setting/index')">
- <image v-if="globalImages" :src="globalImages + 'images/static/image/my/set.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
- <view class="text-sm">系统设置</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pageA/attract/attract')"> -->
- <!-- <image src="../../static/image/my/5.png" style="width: 55rpx;height: 55rpx;" mode=""></image> -->
- <!-- <view class="text-sm">成为代理商</view>
- </view>
- <view class="text-center margin-tb-sm" style="width: 25%;" @click="goNav('/pageA/address/address')"> -->
- <!-- <image src="../../static/image/my/9.png" style="width: 55rpx;height: 55rpx;" mode=""></image> -->
- <!-- <view class="text-sm">地址管理</view>
- </view>
- </view>
- </view> -->
-
- <view class="margin" v-if="divideScale==0" @click="goNav(bgurl)">
- <image :src="bgImg" mode="scaleToFill" style="width:100%;height:246upx;"></image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { waitForGlobalImages } from '@/utils/globalImageLoader'
- export default {
- data() {
- return {
- xxCount: 0,
- userId: '',
- divideScale: '',
- image_url: '../../static/image/logo.png',
- mobile: '',
- checkCertification: -1,
- arr: [],
- showModal: true,
- xcxSelect: '是',
- tuiguang: '',
- tuiguangImg: '',
- appID: '',
- bgImg: '',
- bgurl: '',
- order: [], //订单角标
- timer: '',
- isLogin: false,
- couponCount: 0,
- money: 0,
- checkCertification: 0,
- creditScore: 0,
- FPxcxSelect: '否',
- statusBarHeight: 20, // 默认状态栏高度
- globalImages: ''
- }
- },
- onLoad() {
- waitForGlobalImages().then((path) => {
- console.log('✅ 全局图片路径:', path)
- this.globalImages = path
- })
- const sysInfo = uni.getSystemInfoSync();
- this.statusBarHeight = sysInfo.statusBarHeight || 20;
- this.xcxSelect = uni.getStorageSync('xcxSelect')
- // this.$Request.getT('/app/common/type/310').then(res => { // 我的页面活动图片 310
- // if (res.code === 0) {
- // this.bgImg = res.data.value;
- // }
- // });
- // this.$Request.getT('/app/common/type/311').then(res => { // 我的页面活动跳转地址 311
- // if (res.code === 0) {
- // this.bgurl = res.data.value;
- // }
- // });
- // let token = this.$queue.getData("token");
- // if (token) {
- this.getZiZhi()
- this.$Request.getT('/app/common/type/248').then(res => { //跑腿师傅端微信小程序APPID 248
- if (res.code === 0) {
- this.appID = res.data.value;
- }
- });
- this.$Request.getT('/app/common/type/22').then(res => { //师傅端域名配置 22
- if (res.code === 0 && res.data && res.data.value) {
- this.url = res.data.value;
- }
- });
- // this.timer = setInterval(() => {
- // }, 3000);
- // }
- },
- onHide() {
- // clearInterval(this.timer)
- },
- onShow() {
- this.$Request.getT('/app/common/type/427').then(res => { //订单状态通知 427
- if (res.code == 0) {
- if (res.data && res.data.value) {
- this.arr.push(res.data.value)
- }
- }
- })
- this.FPxcxSelect = this.$queue.getData('FPxcxSelect')
- let token = this.$queue.getData("token");
- if (token) {
- this.isLogin = true
- this.getXXDetailNum();
- this.getUserInfo();
- this.ordernumber() //订单角标
- if (this.showModal) {
- // #ifdef MP-WEIXIN
- this.openMsg()
- // #endif
- }
- } else {
- this.xxCount = 0;
- this.image_url = '../../static/image/logo.png';
- this.mobile = '';
- this.userId = '';
- this.order = []
- this.couponCount = 0
- this.money = 0
- this.isLogin = false
- this.checkCertification = 0
- this.creditScore = 0
- }
- },
- onShareAppMessage(res) { //发送给朋友
- return {
- title: this.tuiguang,
- path: '/pages/index/index',
- imageUrl: this.tuiguangImg,
- }
- },
- onShareTimeline(res) { //分享到朋友圈
- return {
- title: this.tuiguang,
- path: '/pages/index/index',
- imageUrl: this.tuiguangImg,
- }
- },
- methods: {
- // 退出登录
- bindOut() {
- uni.showModal({
- title: '退出登录',
- content: '是否退出登录',
- success: function(res) {
- if (res.confirm) {
- uni.setStorageSync('weixinPhone', false)
- uni.removeStorageSync('sendDataList')
- uni.removeStorageSync('sessionkey')
- uni.removeStorageSync("image_url")
- uni.removeStorageSync("userId")
- uni.removeStorageSync("status")
- uni.removeStorageSync("nickName")
- uni.removeStorageSync("token")
- uni.removeStorageSync("mobile")
- // uni.showModal({
- // showCancel: false,
- // title: '退出登录',
- // content: res.msg,
- // });
- uni.navigateBack()
- // uni.navigateBack({
- // success: () => {
- // let page = getCurrentPages().pop(); //跳转页面成功之后
- // if (page) {
- // let e = {};
- // page.onShow(); //执行上个页面的方法
- // };
- // }
- // })
- // console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- // 用户注销 协议
- bindTo(name) {
- let token = this.$queue.getData("token");
- if (token) {
- uni.navigateTo({
- url: name
- })
- }
-
- },
- getXXDetailNum() {
- this.$Request.getT('/app/message/getUserMessageCount').then(res => {
- if (res.code == 0) {
- this.xxCount = res.data ? res.data : 0;
- }
- });
- },
- // 开启订阅消息
- openMsg() {
- var that = this
- wx.getSetting({
- withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
- success(ret) {
- if (ret.subscriptionsSetting.itemSettings) {
- uni.setStorageSync('sendorderMsg', true)
- uni.openSetting({ // 打开设置页
- success(rea) {
- console.log(rea.authSetting)
- }
- });
- } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
- uni.setStorageSync('sendorderMsg', false)
- uni.showModal({
- title: '提示',
- content: '为了更好的体验,请绑定消息推送',
- confirmText: '确定',
- cancelText: '取消',
- success: function(res) {
- if (res.confirm) {
- uni.requestSubscribeMessage({
- tmplIds: that.arr,
- success(re) {
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- that.showModal = false
- } else if (res.cancel) {
- that.showModal = true
- }
- }
- })
- }
- }
- })
- },
- ordernumber() {
- this.$Request.getT('/app/orders/getOrderSubscript').then(res => {
- if (res.code === 0) {
- // djdOrders: 0
- // dzfOrders: 0
- // jxzOrders: 0
- // yddOrders: 0
- // yjdOrders: 0
- // yqxOrders: 0
- //状态 1待支付 2待接单 3已接单 4进行中 5已抵达 6已取消
- this.order = res.data
- }
- uni.hideLoading()
- });
- },
- //联系客服
- changekefu() {
- let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信
- let kefuPhone = this.$queue.getData('kefuPhone');
- if (kefu == 1) {
- uni.makePhoneCall({
- phoneNumber: kefuPhone //仅为示例
- });
- } else if (kefu == 2) {
- // #ifdef MP-WEIXIN
- let that = this
- try {
- wx.openCustomerServiceChat({
- extInfo: {
- url: that.$queue.getData('kefuUrl')
- },
- corpId: that.$queue.getData('kefuAppId'),
- success(res) {},
- fail(res) {
- console.error(res)
- }
- })
- } catch (error) {
- console.error("catchcatch" + error)
- uni.showToast({
- title: '请更新至微信最新版本'
- });
- }
- // #endif
- // #ifndef MP-WEIXIN
- let url = this.$queue.getData('kefuUrl');
- if (url.indexOf('/pages/') !== -1 || url.indexOf('/pageA/') !== -1 || url.indexOf('/my/') !== -1) {
- uni.navigateTo({
- url
- });
- } else {
- //#ifndef H5
- uni.navigateTo({
- url: '/pages/index/webView?url=' + url
- });
- //#endif
- //#ifdef H5
- window.location.href = url;
- //#endif
- }
- // #endif
- } else if (kefu == 3) {
- uni.navigateTo({
- url: '/my/kefu/index'
- });
- }
- },
- // 分享文案和图片
- getZiZhi() {
- this.$Request.getT('/app/common/type/276').then(res => {
- if (res.code === 0) {
- this.tuiguang = res.data.value;
- }
- });
- this.$Request.getT('/app/common/type/277').then(res => {
- if (res.code === 0) {
- this.tuiguangImg = res.data.value;
- }
- });
- },
- goSwt(e) {
- uni.setStorageSync('current', e)
- setTimeout(function() {
- uni.switchTab({
- url: '/pages/order/order',
- })
- }, 10)
- },
- goRider() { //司机入驻
- let that = this
- let token = that.$queue.getData("token");
- if (token) {
- // #ifdef MP-WEIXIN
- uni.navigateToMiniProgram({
- appId: that.appID,
- path: '/pages/index/index',
- extraData: {
- 'data1': 'test'
- },
- success(res) {
- // 打开成功
- console.log("打开成功")
- }
- })
- // #endif
- // #ifdef H5
- window.location.href = that.url;
- // #endif
- // #ifdef APP
- plus.runtime.openURL(that.url);
- // #endif
- } else {
- that.bindlogin();
- }
- },
- goNav(url) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendorderMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re);
- if (datas.indexOf("accept") != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- let token = this.$queue.getData("token");
- if (token) {
- uni.navigateTo({
- url: url
- })
- } else {
- this.bindlogin();
- }
- },
- getUserInfo() {
- this.$Request.getT('/app/user/selectUserById').then(res => {
- console.log(res)
- if (res.code == 0) {
- if (parseInt(res.data.checkCertification)) {
- this.checkCertification = parseInt(res.data.checkCertification)
- } else {
- this.checkCertification = -1;
- }
- // this.money = res.data.money
- this.creditScore = res.data.creditScore
- this.userId = res.data.userId;
- this.$queue.setData("userId", res.data.userId);
- this.$queue.setData("mobile", res.data.phone);
- this.$queue.setData("invitationCode", res.data.invitationCode ? res.data.invitationCode :
- '0');
- this.$queue.setData("status", res.data.status);
- this.$queue.setData("nickName", res.data.nickName ? res.data.nickName : res
- .data.userName);
- this.image_url = res.data.avatar ? res.data.avatar : '../../static/image/logo.png';
- this.$queue.setData("image_url", this.image_url);
- this.mobile = res.data.nickName ? res.data.nickName : res.data.userName
- this.divideScale = res.data.divideScale
- }
- });
- this.$Request.getT('/app/couponUser/getMyCouponList?page=1&limit=10&status=0').then(res => {
- console.log(res)
- if (res.code === 0 && res.data) {
- this.couponCount = res.data.total
- }
- });
- this.$Request.getT('/app/userMoney/selectMyMoney').then(res => {
- if (res.code == 0) {
- if (res.data) {
- this.money = res.data.money
- }
- }
- });
- },
- bindlogin() {
- let token = this.$queue.getData("token");
- if (!token) {
- uni.navigateTo({
- url: './register'
- })
- }
- },
- bindapprove() {
- let token = this.$queue.getData("token");
- if (token) {
- uni.navigateTo({
- url: '/pages/my/approve/approve'
- })
- } else {
- this.bindlogin();
- }
- },
- binduser() {
- let token = this.$queue.getData('token');
- if (!token) {
- this.bindlogin();
- return;
- }
- uni.navigateTo({
- url: '/pages/my/userinfo'
- });
- },
- }
- }
- </script>
- <style lang="less">
- .my-page {
- height: 100%;
- background: #f5f5f5;
- }
-
- /* 自定义导航栏整体容器 */
- .custom-navbar {
- width: 100%;
- background: linear-gradient(to bottom, #f98e55, #ffb289);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 999;
- }
-
- /* 导航栏内容区域 */
- .navbar-content {
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- }
-
- /* 返回按钮 */
- .back-btn {
- position: absolute;
- left: 32rpx;
- top: 0;
- bottom: 0;
- display: flex;
- align-items: center;
- }
-
- .back-icon {
- width: 48rpx;
- height: 48rpx;
- }
-
- /* 标题 */
- .title {
- font-size: 34rpx;
- color: #fff;
- font-weight: 500;
- }
-
- /* 页面内容要往下偏移导航栏高度 */
- .page-content {
- padding-top: calc(88rpx + 92rpx); /* 导航栏 + 状态栏 */
- }
- page {
- background: #F5F5F5;
- }
- .btn {
- font-size: 28upx;
- /* width: 95%; */
- text-align: center;
- background: #FFFFFF;
- margin-top: 6rpx;
- }
- .head {
- background: #ffffff;
- /* #ifdef H5 */
- padding-top: 50rpx;
- /* #endif */
- }
- .head_image image {
- width: 90rpx;
- height: 90rpx;
- }
- .head_name {
- flex: 4;
- position: relative;
- }
- .name {
- position: absolute;
- top: 75rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- .approve {
- position: absolute;
- top: 100rpx;
- font-size: 24rpx;
- color: #999999;
- }
- /* 列表 */
- .use_list {
- width: 100%;
- background: #ffffff;
- margin-top: 20rpx;
- }
- .list_box {
- width: 90%;
- margin: 0 auto;
- display: flex;
- height: 110rpx;
- }
- .box_left {
- flex: 1;
- display: flex;
- justify-content: left;
- align-items: center;
- }
- .box_right {
- flex: 1;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- color: #808080;
- }
- .use_name {
- margin-left: 30rpx;
- font-size: 32rpx;
- }
- .use_image image {
- width: 50rpx;
- height: 50rpx;
- }
- .weinumber {
- width: 30upx;
- height: 30upx;
- background: red;
- color: #fff;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 24rpx;
- border-radius: 35upx;
- position: absolute;
- top: 0upx;
- right: -10upx;
- z-index: 99;
- }
- .vip {
- margin: 50rpx 30rpx 30rpx;
- height: 110rpx;
- background: linear-gradient(95deg, #FFE9BC 0%, #F5D49A 99%);
- border-radius: 22rpx;
- padding: 0 30rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- color: #512C19;
- }
- .tabbox {
- display: flex;
- justify-content: space-between;
- padding: 0rpx 30rpx 0rpx;
- .leftbox {
- width: 333rpx;
- height: 170rpx;
- background: #ffffff;
- border-radius: 24rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- // color: #346EF6;
- position: relative;
- padding: 30rpx 30rpx;
- .tit {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 400;
- // color: #346EF6;
- margin-top: 17rpx;
- position: relative;
- z-index: 999;
- }
- .image {
- position: absolute;
- bottom: 9rpx;
- right: 0;
- z-index: 9;
- }
- }
- .rightbox {
- width: 333rpx;
- height: 170rpx;
- background: #fff;
- border-radius: 24rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- // color: #FF6956;
- position: relative;
- padding: 30rpx 30rpx;
- .tit {
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 400;
- // color: #FF6956;
- margin-top: 17rpx;
- }
- .image {
- position: absolute;
- bottom: 37rpx;
- right: 14rpx;
- z-index: 9;
- }
- }
- }
- </style>
|