| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <template>
- <view class="my-box flex-common-css">
- <Nav title="我的" :leftShow='false' titleColor="#333" bgckgroundBox='transparent'></Nav>
- <image class="bg-box" src="@/static/img/my/bg.png" mode=""></image>
- <view class="user-box align-items-center" @click="goToUrl(0)">
- <view class="user-img-box mr-24">
- <image v-if="userInfoData.head_img" class="user-img b-rad-50" :src="userInfoData.head_img" mode=""></image>
- <image v-else class="user-img b-rad-50" src="@/static/img/my/user-img.png" mode=""></image>
- <image class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
- </view>
- <view class="user-name text-overflow-ellipsis-one fs-34">
- {{ userInfoData.nickname }}
- </view>
- </view>
- <view class="function-one-box box-border-box">
- <view class="function-one b-rad-20 bgc-f box-border-box mb-24 align-items-center flex-justify-space">
- <view class="my-function-box flex-direction align-items-center" @click="goToUrl(1)">
- <image class="my-img" src="@/static/img/my/wdkq.png" mode=""></image>
- <view class="fs-26">
- 我的卡券
- </view>
- </view>
- <view class="my-function-box flex-direction align-items-center" @click="goToUrl(2)">
- <image class="my-img" src="@/static/img/my/wdfb.png" mode=""></image>
- <view class="fs-26">
- 我的发布
- </view>
- </view>
- <view class="my-function-box flex-direction align-items-center" @click="goToUrl(3)">
- <image class="my-img" src="@/static/img/my/wdpj.png" mode=""></image>
- <view class="fs-26">
- 我的评价
- </view>
- </view>
- <view class="my-function-box flex-direction align-items-center" @click="goToUrl(4)">
- <image class="my-img" src="@/static/img/my/dzgl.png" mode=""></image>
- <view class="fs-26">
- 地址管理
- </view>
- </view>
- </view>
- <view class="function-two b-rad-20 box-border-box flex-justify-space mb-22" @click="goToUrl(5)">
- <view class="function-two-left">
- <view class="align-items-center mb-12 p-t-10">
- <image class="lqzx-img" src="@/static/img/my/lqzx.png" mode=""></image>
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- <view class="fs-26 fc-9">
- 领券下单更优惠
- </view>
- </view>
- <image class="function-two-right" src="@/static/img/my/q.png" mode=""></image>
- </view>
- </view>
- <scroll-view class="" :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
- <view class="list-box function-one-box box-border-box">
- <view class="list bgc-f b-rad-20">
- <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(6)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/xxzx.png" mode=""></image>
- <view class="fs-32 fc-3">
- 消息中心
- </view>
- </view>
- <view class="item-right align-items-center">
- <view class="fs-24 fc-9" v-if="userInfoData.msg_count > 0">
- {{userInfoData.msg_count}}条未读消息
- </view>
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
-
- <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(12)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/gong-gao-icon.png" mode=""></image>
- <view class="fs-32 fc-3">
- 通知公告
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
-
- <view class="item-box align-items-center flex-justify-space mb-64">
- <button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
-
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/lxkf.png" mode=""></image>
- <view class="fs-32 fc-3">
- 联系客服
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
- <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(8)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/swhz.png" mode=""></image>
- <view class="fs-32 fc-3">
- 商务合作
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
- <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(9)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/qszp.png" mode=""></image>
- <view class="fs-32 fc-3">
- 骑手招聘
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
- <view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(10)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/wtfk.png" mode=""></image>
- <view class="fs-32 fc-3">
- 问题反馈
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
- <view class="item-box align-items-center flex-justify-space" @click="goToUrl(11)">
- <view class="item-left align-items-center">
- <image class="item-img" src="@/static/img/my/gywm.png" mode=""></image>
- <view class="fs-32 fc-3">
- 关于我们
- </view>
- </view>
- <view class="item-right align-items-center">
- <image class="to-right" src="@/static/img/toRight.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="p-b-20 b-rad-20"></view>
- </view>
- </template>
- <script>
- import {userInfo} from '@/api/member.js'
- export default {
- components: {},
- data() {
- return {
- userInfoData:{
- nickname:'',
- head_img:'',
- phone:'',
- sex:'',
- msg_count:'',
- },
- };
- },
- onShow() {
- let token = uni.getStorageSync('token');
- if(!token){
- this.userInfoData.nickname = '请先登录'
- }else{
- this.getUserInfo();
- }
- },
-
- methods: {
- handleContact(e){
- console.log(e);
- },
-
- getUserInfo(){
- userInfo().then((res)=>{
- if(res.code === 1){
- this.userInfoData = res.data;
- }
- })
- },
-
- scrolltolower() {
- console.log('触底');
- },
- goToUrl(type) {
- if (type == 0) {
- // 修改个人信息
- uni.navigateTo({
- url: '/pages-my/user-info'
- })
- } else if (type == 1) {
- // 我的卡券
- uni.navigateTo({
- url: '/pages-my/my-ticket'
- })
- } else if (type == 2) {
- // 我的发布
- uni.navigateTo({
- url: '/pages-my/my-publish'
- })
- } else if (type == 3) {
- // 我的评价
- uni.navigateTo({
- url: '/pages-my/my-appraise'
- })
- } else if (type == 4) {
- // 地址管理
- uni.navigateTo({
- url: '/pages-address/address'
- })
- } else if (type == 5) {
- // 领券中心
- uni.navigateTo({
- url: '/pages-my/ticket-centre'
- })
- } else if (type == 6) {
- // 消息中心
- uni.navigateTo({
- url: '/pages-my/info-centre'
- })
- }else if (type == 8) {
- // 商务合作
- uni.navigateTo({
- url: '/pages-my/cooperate'
- })
- } else if (type == 9) {
- // 骑手招聘
- uni.navigateTo({
- url: '/pages-my/rider-recruit'
- })
- } else if (type == 10) {
- // 问题反馈
- uni.navigateTo({
- url: '/pages-my/feedback'
- })
- } else if (type == 11) {
- // 关于我们
- uni.navigateTo({
- url: '/pages-my/about-us'
- })
- } else if (type == 12) {
- // 系统通知
- uni.navigateTo({
- url: '/pages-my/notice/list'
- })
- }
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .item-box{
- position: relative;
- .item-box-button{
- position: absolute;
- width: 100%;
- height: 54rpx;
- top: 0;
- left: 0;
- z-index: 100;
- background-color: transparent;
- border: none !important;
- }
- button::after{
- border: none !important;
- }
- }
-
- .my-box {}
- .bg-box {
- width: 100%;
- height: 476rpx;
- position: fixed;
- top: 0;
- z-index: -1;
- }
- .user-img-box {
- width: 112rpx;
- height: 112rpx;
- position: relative;
- }
- .user-box {
- padding: 54rpx 32rpx;
- }
- .user-img {
- width: 100%;
- height: 100%;
- }
- .set-iimg {
- position: absolute;
- right: 4rpx;
- bottom: 0;
- width: 33rpx;
- height: 33rpx;
- }
- .user-name {
- max-width: 388rpx;
- }
- .function-one-box {
- padding: 0 24rpx;
- }
- .function-one {
- padding: 24rpx 34rpx;
- }
- .function-two {
- padding: 22rpx 40rpx 22rpx 32rpx;
- background: linear-gradient(90deg, #FFFFFF 47%, #FFF7E5 100%);
- }
- .my-img {
- width: 80rpx;
- height: 80rpx;
- margin: 0 0 8rpx 0;
- }
- .function-two-right {
- width: 96rpx;
- height: 96rpx;
- }
- .lqzx-img {
- width: 137rpx;
- height: 30rpx;
- margin: 0 8rpx 0 0;
- }
- .to-right {
- width: 32rpx;
- height: 32rpx;
- }
- // .list-box{
- // padding: 0 24rpx 20rpx;
- // }
- .list {
- padding: 32rpx 28rpx 32rpx 32rpx;
- }
- .item-img {
- width: 48rpx;
- height: 48rpx;
- margin: 0 20rpx 0 0;
- }
- </style>
|