Browse Source

我的页面布局修改调整

master
dy-hu 11 months ago
parent
commit
be0efe3a66
  1. 8
      App.vue
  2. 5
      locale/en.json
  3. 5
      locale/zh-Hans.json
  4. 4
      pages/tabbar/category/index.vue
  5. 239
      pages/tabbar/user/index.data.js
  6. 185
      pages/tabbar/user/index.vue
  7. 506
      pages/tabbar/user/index2.vue

8
App.vue

@ -46,13 +46,13 @@ export default {
}
})
}
NET.request(API.GetAllForMap, {}, 'POST').then(res => {
i18n.mergeLocaleMessage('en',res.data.en);
i18n.mergeLocaleMessage('zh', res.data.zh);
})
uni.onTabBarMidButtonTap(() => {
uni.navigateTo({
url: '/pages_category_page1/search/index/index',
@ -719,7 +719,7 @@ uni-modal .uni-modal__btn {
}
.uni-tabbar .uni-tabbar__reddot {
background: #C5AA7B;
background: #F54639;
color: #FFFFFF;
}

5
locale/en.json

@ -605,5 +605,8 @@
"common.exportafterorder_filename":"afterorderdatadetail.xls",
"common.after-salestatus_info":"After-sale Info",
"common.own":"All",
"common.more":"More"
"common.more":"More",
"user.myserver": "My Service",
"user.otherserver": "Other Service",
"user.growthvalue": "Growth Value"
}

5
locale/zh-Hans.json

@ -605,5 +605,8 @@
"common.exportafterorder_filename":"售后订单数据明细表.xls",
"common.after-salestatus_info":"售后信息",
"common.own":"所有",
"common.more":"更多"
"common.more":"更多",
"user.myserver": "我的服务",
"user.otherserver": "其他服务",
"user.growthvalue": "成长值"
}

4
pages/tabbar/category/index.vue

@ -274,9 +274,9 @@
}
}
.emptyOrder-box{
margin-left: 180upx;
margin-left: 280upx;
.emptyOrder-img{
margin-top: -130upx;
margin-top: 310upx;
width: 113upx;
height: 98upx;
}

239
pages/tabbar/user/index.data.js

@ -7,158 +7,159 @@
*/
export const orderCardList = [
{
id:1,
label:'待付款',
labelkey:'page.due',
key:'waitPayOrderCount',
icon:'https://ceres.zkthink.com/static/img/user/daifukuan1.png',
jumpUrl:'../../../pages_category_page1/orderModule/index?type=1'
},
{
id:2,
label:'待发货',
labelkey:'page.goodswaitingtobesent',
key:'waitSendOrderCount',
icon:'https://ceres.zkthink.com/static/img/user/daifahuo1.png',
jumpUrl:'../../../pages_category_page1/orderModule/index?type=2'
},
{
id:3,
label:'待收货',
labelkey:'page.waittobereceived',
key:'waitReceiveOrderCount',
icon:'https://ceres.zkthink.com/static/img/user/daishouhuo.png',
jumpUrl:'../../../pages_category_page1/orderModule/index?type=3'
},
{
id:4,
label:'全部订单',
labelkey:'page.fullorder',
key:'',
icon:'https://ceres.zkthink.com/static/img/user/daifukuan1.png',
jumpUrl:'../../../pages_category_page1/orderModule/index'
id: 1,
label: '待付款',
labelkey: 'page.due',
key: 'waitPayOrderCount',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_daifukuan.png',
jumpUrl: '../../../pages_category_page1/orderModule/index?type=1'
},
{
id: 2,
label: '待发货',
labelkey: 'page.goodswaitingtobesent',
key: 'waitSendOrderCount',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_daifahuo.png',
jumpUrl: '../../../pages_category_page1/orderModule/index?type=2'
},
{
id: 3,
label: '待收货',
labelkey: 'page.waittobereceived',
key: 'waitReceiveOrderCount',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_daishouhuo.png',
jumpUrl: '../../../pages_category_page1/orderModule/index?type=3'
},
{
id: 4,
label: '全部订单',
labelkey: 'page.fullorder',
key: '',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_allorder.png',
jumpUrl: '../../../pages_category_page1/orderModule/index'
}
]
export const fastCardOneList = [
{
id:1,
label:'我的收藏',
labelkey:'page.mycollection',
icon:'https://ceres.zkthink.com/static/img/user/mycollectionIcon.png',
jumpUrl:'../../../pages_category_page2/userModule/collection'
id: 1,
label: '我的收藏',
labelkey: 'page.mycollection',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_collect.png',
jumpUrl: '../../../pages_category_page2/userModule/collection'
},
{
id:2,
label:'我的问答',
labelkey:'page.myquestionsandanswers',
icon:'https://ceres.zkthink.com/static/img/user/myQuestionIcon.png',
jumpUrl:'../../../pages_category_page2/userModule/questionList'
id: 2,
label: '我的问答',
labelkey: 'page.myquestionsandanswers',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_question.png',
jumpUrl: '../../../pages_category_page2/userModule/questionList'
},
{
id:3,
label:'浏览足迹',
labelkey:'page.browsingfootprint',
icon:'https://ceres.zkthink.com/static/img/user/myfootprintIcon.png',
jumpUrl:'../../../pages_category_page2/userModule/footprintList'
id: 3,
label: '浏览足迹',
labelkey: 'page.browsingfootprint',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_footprint.png',
jumpUrl: '../../../pages_category_page2/userModule/footprintList'
},
{
id:4,
label:'我的评价',
labelkey:'page.myassessment',
icon:'https://ceres.zkthink.com/static/img/user/pingjia.png',
jumpUrl:'../../../pages_category_page1/goodsModule/userEvaluate'
id: 4,
label: '我的评价',
labelkey: 'page.myassessment',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_evaluate.png',
jumpUrl: '../../../pages_category_page1/goodsModule/userEvaluate'
},
{
id:5,
label:'我的账户',
labelkey:'page.myaccount',
icon:'https://ceres.zkthink.com/static/img/user/account.png',
jumpUrl:'../../../pages_category_page2/userModule/memberAccount'
id: 5,
label: '我的账户',
labelkey: 'page.myaccount',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_account.png',
jumpUrl: '../../../pages_category_page2/userModule/memberAccount'
},
{
id:6,
label:'我的卡券',
labelkey:'page.mycardcoupon',
icon:'https://ceres.zkthink.com/static/img/user/kaquan.png',
jumpUrl:'../../../pages_category_page2/userModule/coupon'
}, {
id:7,
label:'分销中心',
labelkey:'page.distributioncenter',
icon:'https://ceres.zkthink.com/static/img/user/fenxiao.png',
jumpUrl:'../../../pages_category_page1/distributionModule/index'
},
{
id:8,
label:'商家入驻',
labelkey:'page.merchantsettlement',
icon:'https://ceres.zkthink.com/static/img/user/Settled.png',
jumpUrl:'function:handleApplySettle'
}
id: 6,
label: '我的卡券',
labelkey: 'page.mycardcoupon',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_card_coupon.png',
jumpUrl: '../../../pages_category_page2/userModule/coupon'
},
{
id: 7,
label: '我的积分',
labelkey: 'page.myintegral',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_integral.png',
jumpUrl: '../../../pages_category_page1/integral/index'
},
{
id: 8,
label: '我的售后',
labelkey: 'page.myaftersales',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_after_sale.png',
jumpUrl: '../../../pages_category_page2/orderModule/afterSale'
},
]
export const fastCardTwoList = [
{
id:1,
label:'地址管理',
labelkey:'page.addressmanager',
icon:'https://ceres.zkthink.com/static/img/user/dizhi1.png',
jumpUrl:'../../../pages_category_page2/userModule/address'
id: 1,
label: '分销中心',
labelkey: 'page.distributioncenter',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_distribution.png',
jumpUrl: '../../../pages_category_page1/distributionModule/index'
},
{
id:2,
label:'我的售后',
labelkey:'page.myaftersales',
icon:'https://ceres.zkthink.com/static/img/user/shouhou.png',
jumpUrl:'../../../pages_category_page2/orderModule/afterSale'
id: 2,
label: '商家入驻',
labelkey: 'page.merchantsettlement',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_merchant_settlement.png',
jumpUrl: 'function:handleApplySettle'
},
{
id:3,
label:'会员中心',
labelkey:'page.membercenter',
icon:'https://ceres.zkthink.com/static/img/user/VIP.png',
jumpUrl:'../../../pages_category_page1/memberCenter/index'
id: 3,
label: '会员中心',
labelkey: 'page.membercenter',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_vip.png',
jumpUrl: '../../../pages_category_page1/memberCenter/index'
},
{
id:4,
label:'银行卡',
labelkey:'page.bankcard',
icon:'https://ceres.zkthink.com/static/img/user/kaquan.png',
jumpUrl:'../../../pages_category_page2/userModule/bankcard'
id: 4,
label: '银行卡',
labelkey: 'page.bankcard',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_bank_card.png',
jumpUrl: '../../../pages_category_page2/userModule/bankcard'
},
{
id:5,
label:'我的积分',
labelkey:'page.myintegral',
icon:'https://ceres.zkthink.com/static/img/user/myIntegral.png',
jumpUrl:'../../../pages_category_page1/integral/index'
id: 5,
label: '地址管理',
labelkey: 'page.addressmanager',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_address_manager.png',
jumpUrl: '../../../pages_category_page2/userModule/address'
},
{
id:6,
label:'签到',
labelkey:'page.signin',
icon:'https://ceres.zkthink.com/static/img/user/signIcon.png',
jumpUrl:'../../../pages_category_page1/integral/sign'
id: 6,
label: '签到',
labelkey: 'page.signin',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_sign_in.png',
jumpUrl: '../../../pages_category_page1/integral/sign'
}, {
id:7,
label:'优惠券',
labelkey:'page.coupon',
icon:'https://ceres.zkthink.com/static/img/user/userCouponIcon.png',
jumpUrl:'../../../pages_category_page1/coupon/list'
id: 7,
label: '优惠券',
labelkey: 'page.coupon',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_coupon.png',
jumpUrl: '../../../pages_category_page1/coupon/list'
},
{
id:8,
label:'平台客服',
labelkey:'page.platformcustomerservice',
icon:'https://ceres.zkthink.com/static/img/user/service.png',
jumpUrl:'function:flyToService'
id: 8,
label: '平台客服',
labelkey: 'page.platformcustomerservice',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_customer_service.png',
jumpUrl: 'function:flyToService'
},
{
id:9,
label:'多语言',
labelkey:'page.language',
icon:'https://ceres.zkthink.com/static/img/user/service.png',
jumpUrl:'../../../pages_category_page2/userModule/language'
id: 9,
label: '多语言',
labelkey: 'page.language',
icon: 'https://wechat.hnthee.com/ceres-local-file/image/user_multilingual.png',
jumpUrl: '../../../pages_category_page2/userModule/language'
}
]

185
pages/tabbar/user/index.vue

@ -8,10 +8,11 @@
:animation="true"
></Skeleton>
<!-- 我的 -->
<image
<!-- <image
class="top-bg"
src="https://ceres.zkthink.com/static/img/user/topBg.png"
></image>
></image>-->
<view class="top-bg"></view>
<view class="page-content" >
<!-- 用户未登录 -->
<view
@ -30,7 +31,7 @@
</view>
<image
class="user-info-right"
src="https://ceres.zkthink.com/static/img/user/back.png"
src="https://wechat.hnthee.com/ceres-local-file/image/icon_cart_shop_forward.png"
></image>
<view class="notice">
<view
@ -70,7 +71,7 @@
class="experience flex-items"
@click="handleJump('../../../pages_category_page1/memberCenter/index')"
>
<label>成长值</label>
<label>{{$t('user.growthvalue')}}</label>
<view class="experienceValue">{{ userItem.growth || 0 }} / {{ userItem.nextLevelGrowth || 0 }}</view>
</view>
</view>
@ -86,67 +87,71 @@
</view>
</view>
<!-- 订单卡片 -->
<view class="order-box">
<view
<view class="order-content">
<view class="title">{{$t('client.myorder')}}</view>
<view class="order-box">
<view
class="order-item"
v-for="orderCardItem in orderCardList"
:key="orderCardItem.id"
@click="handleJump(orderCardItem.jumpUrl)"
>
<image
>
<image
class="order-item-image u-skeleton-circle"
:src="orderCardItem.icon"
mode="widthFix"
>
</image>
<view class="order-item-text u-skeleton-fillet">{{ orderCardItem.labelkey ? $t(orderCardItem.labelkey) : orderCardItem.label }}</view>
<view
>
</image>
<view class="order-item-text u-skeleton-fillet">{{ orderCardItem.labelkey ? $t(orderCardItem.labelkey) : orderCardItem.label }}</view>
<view
class="quan"
v-if="userItem[orderCardItem.key]>0"
>
{{ userItem[orderCardItem.key] }}
>
{{ userItem[orderCardItem.key] }}
</view>
</view>
</view>
</view>
<!-- 第一个卡片 -->
<view class="itemBox">
<view
<view class="service-box">
<view class="title">{{$t('user.myserver')}}</view>
<view class="itemBox">
<view
class="item-btn"
v-for="item in fastCardOneList"
:key="item.id"
@click="handleJump(item.jumpUrl)"
>
<image
>
<image
class="item-btn-icon u-skeleton-circle"
:src="item.icon"
mode="widthFix"
>
</image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
>
</image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
</view>
</view>
</view>
<!-- 第二个卡片 -->
<view class="itemBox">
<view
<view class="service-box">
<view class="title">{{$t('user.otherserver')}}</view>
<view class="itemBox">
<view
class="item-btn"
v-for="item in fastCardTwoList"
:key="item.id"
@click="handleJump(item.jumpUrl)"
>
<image
>
<image
class="item-btn-icon u-skeleton-circle"
:src="item.icon"
mode="widthFix"
></image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
></image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
</view>
</view>
<!-- <button open-type="contact"
class="item-btn btnNone">
<image class="item-btn-icon"
src="https://ceres.zkthink.com/static/img/user/service.png"
mode="widthFix"></image>
<view class="item-btn-text">平台客服</view>
</button>-->
</view>
</view>
<view class="copyright">
@ -262,19 +267,36 @@ export default {
<style lang="scss">
page {
background: #f8f8f8;
background: #FAFAFA;
}
.content {
height: 100%;
position: relative;
padding-bottom: 150rpx;
padding-bottom: 30rpx;
.service-box{
width: 690rpx;
//height: 196rpx !important;
display: flex;
flex-direction: column;
background: #FFFFFF;
border-radius: 30rpx;
margin-left: 30rpx;
margin-top: 28rpx;
.title{
color: #252744;
font-size: 32rpx;
margin-left: 30rpx;
margin-top: 36rpx;
}
}
.itemBox {
display: flex;
flex-flow: wrap;
padding-top: 30rpx;
background: #FFFFFF;
width: 690rpx;
margin: 30rpx auto 0 auto;
}
@ -282,7 +304,8 @@ page {
/* background-color: #f8f8f8; */
.top-bg {
width: 100%;
height: 400rpx;
height: 420rpx;
background: linear-gradient(0deg, #FAFAFA, #E5E6F6);
margin-top: -50rpx;
}
@ -304,16 +327,16 @@ page {
position: relative;
.notice {
width: 60rpx;
height: 60rpx;
width: 46rpx;
height: 46rpx;
position: absolute;
top: 0;
right: 50rpx;
background: url("https://ceres.zkthink.com/static/images/notice.png") no-repeat center center;
background: url("https://wechat.hnthee.com/ceres-local-file/image/notice.png") no-repeat center center;
background-size: contain;
.messNum {
background: #C83732;
background: #F54639;
border-radius: 50%;
color: #FFFFFF;
text-align: center;
@ -339,23 +362,23 @@ page {
z-index: 10;
.user-logoin-title {
font-size: 36upx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
font-size: 36rpx;
font-weight: bold;
color: #252744;
//color: rgba(255, 255, 255, 1);
}
.user-logoin-lable {
font-size: 24upx;
font-size: 24rpx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
margin-top: 20upx;
color: #252744;
margin-top: 20rpx;
}
.experience {
label {
font-size: 26rpx;
color: #FFFFFF;
opacity: 0.7;
font-size: 24rpx;
color: #252744;
}
.experienceValue {
@ -367,7 +390,7 @@ page {
border-radius: 25rpx;
line-height: 40rpx;
border: 2rpx solid rgba(0, 0, 0, 0);
background: linear-gradient(88deg, #C5AA7B 0%, #F5DEB2 100%);
background: linear-gradient(88deg, #252744 0%, #252744 100%);
font-size: 20rpx;
margin-left: 20rpx;
}
@ -375,22 +398,35 @@ page {
}
.user-info-right {
width: 30upx;
height: 30upx;
width: 14rpx;
height: 24rpx;
}
}
.order-content{
width: 690rpx;
//height: 196rpx !important;
display: flex;
flex-direction: column;
background: #FFFFFF;
border-radius: 30rpx;
margin-left: 30rpx;
z-index: 10;
.title{
color: #252744;
font-size: 32rpx;
margin-left: 30rpx;
margin-top: 36rpx;
}
}
.order-box {
width: 690upx;
height: 196upx !important;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10upx 0px rgba(51, 51, 51, 0.1);
width: 690rpx;
height: 196rpx !important;
//box-shadow: 0px 0px 10upx 0px rgba(51, 51, 51, 0.1);
display: flex;
flex-direction: row;
align-items: center;
margin-left: 30upx;
z-index: 10;
.order-item {
flex: 1;
display: flex;
@ -415,15 +451,15 @@ page {
}
.order-item-image {
width: 90upx;
height: 90upx;
width: 56rpx;
height: 56rpx;
}
.order-item-text {
font-size: 28upx;
margin-top: 10upx;
font-weight: 500;
color: rgba(102, 102, 102, 1);
font-size: 24rpx;
margin-top: 23rpx;
font-weight: 400;
color: #252744;
}
}
}
@ -431,20 +467,21 @@ page {
.item-btn {
width: 25%;
box-sizing: border-box;
background-color: #fff;
background-color: #FFFFFF;
text-align: center;
margin-bottom: 40rpx;
margin-bottom: 45rpx;
.item-btn-icon {
width: 90upx;
height: 90upx !important;
width: 48rpx;
height: 48rpx !important;
}
.item-btn-text {
font-size: 28upx;
font-weight: 500;
font-size: 24rpx;
font-weight: 400;
margin-top: 12rpx;
flex: 1;
color: rgba(102, 102, 102, 1);
color: #595B6B;
}
.messNum {

506
pages/tabbar/user/index2.vue

@ -0,0 +1,506 @@
<template>
<view class="content u-skeleton">
<!-- 骨架屏 -->
<Skeleton
el-color="#efefef"
bg-color="#fff"
:loading="loading && isFirstComeIn"
:animation="true"
></Skeleton>
<!-- 我的 -->
<image
class="top-bg"
src="https://ceres.zkthink.com/static/img/user/topBg.png"
></image>
<view class="page-content" >
<!-- 用户未登录 -->
<view
class="user-info-box"
@click="$jump('../../../pages_category_page2/userModule/login')"
v-if="userItem.name===undefined "
>
<image
class="user-image u-skeleton-circle"
src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
mode="widthFix"
></image>
<view class="user-info">
<view class="user-logoin-title u-skeleton-fillet">{{$t('common.clicktologin')}}</view>
<view class="user-logoin-lable u-skeleton-fillet">{{$t('common.clicklogintips')}}</view>
</view>
<image
class="user-info-right"
src="https://ceres.zkthink.com/static/img/user/back.png"
></image>
<view class="notice">
<view
class="messNum"
v-if="userItem.notRead>0"
>{{ userItem.notRead }}
</view>
</view>
</view>
<!-- 用户已登陆 -->
<view
class="user-info-box "
v-else
>
<image
class="user-image u-skeleton-fillet"
@click="handleJump('../../../pages_category_page2/userModule/personalDetails')"
v-if="userItem.headImage"
:src="userItem.headImage"
mode="widthFix"
style="border-radius: 50%;"
></image>
<image
class="user-image"
v-else
src="https://ceres.zkthink.com/static/img/user/morentouxiang.png"
mode="widthFix"
>
</image>
<view class="user-info">
<view
class="user-logoin-title"
v-if="userItem.name"
>{{ userItem.name }}
</view>
<view
class="experience flex-items"
@click="handleJump('../../../pages_category_page1/memberCenter/index')"
>
<label>成长值</label>
<view class="experienceValue">{{ userItem.growth || 0 }} / {{ userItem.nextLevelGrowth || 0 }}</view>
</view>
</view>
<view
class="notice"
@click="handleJump('../../../pages_category_page2/userModule/messageCenter')"
>
<view
class="messNum"
v-if="userItem.notRead>0"
>{{ userItem.notRead > 99 ? '99+' : userItem.notRead }}
</view>
</view>
</view>
<!-- 订单卡片 -->
<view class="order-box">
<view
class="order-item"
v-for="orderCardItem in orderCardList"
:key="orderCardItem.id"
@click="handleJump(orderCardItem.jumpUrl)"
>
<image
class="order-item-image u-skeleton-circle"
:src="orderCardItem.icon"
mode="widthFix"
>
</image>
<view class="order-item-text u-skeleton-fillet">{{ orderCardItem.labelkey ? $t(orderCardItem.labelkey) : orderCardItem.label }}</view>
<view
class="quan"
v-if="userItem[orderCardItem.key]>0"
>
{{ userItem[orderCardItem.key] }}
</view>
</view>
</view>
<!-- 第一个卡片 -->
<view class="itemBox">
<view
class="item-btn"
v-for="item in fastCardOneList"
:key="item.id"
@click="handleJump(item.jumpUrl)"
>
<image
class="item-btn-icon u-skeleton-circle"
:src="item.icon"
mode="widthFix"
>
</image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
</view>
</view>
<!-- 第二个卡片 -->
<view class="itemBox">
<view
class="item-btn"
v-for="item in fastCardTwoList"
:key="item.id"
@click="handleJump(item.jumpUrl)"
>
<image
class="item-btn-icon u-skeleton-circle"
:src="item.icon"
mode="widthFix"
></image>
<view class="item-btn-text u-skeleton-fillet">{{ item.labelkey ? $t(item.labelkey) : item.label }}</view>
</view>
<!-- <button open-type="contact"
class="item-btn btnNone">
<image class="item-btn-icon"
src="https://ceres.zkthink.com/static/img/user/service.png"
mode="widthFix"></image>
<view class="item-btn-text">平台客服</view>
</button>-->
</view>
</view>
<view class="copyright">
<text >中科鑫智 版权所有</text>
<text >粤ICP备19086489号-3</text>
</view>
</view>
</template>
<script>
import Skeleton from "../../../components/Skeleton";
import { fastCardOneList, fastCardTwoList, orderCardList } from "./index.data";
import { Services } from '../../../utils/services'
import { Encrypt } from '../../../utils/secret'
const NET = require('../../../utils/request')
const API = require('../../../config/api')
export default {
data() {
return {
isFirstComeIn: true,
loading: true,
orderCardList: orderCardList,
fastCardOneList: fastCardOneList,
fastCardTwoList: fastCardTwoList,
cacheUserItem: {},
userItem: {
headImage:'',
name:undefined
},
}
},
components:{Skeleton},
onShow() {
this.isFirstComeIn=true
if (uni.getStorageSync('storage_key')) {
this.cacheUserItem = uni.getStorageSync('storage_key');
}
this.handleGetUser()
},
methods: {
/**
* 处理跳转
* @param url
*/
handleJump(url) {
if (JSON.stringify(this.cacheUserItem) === '{}') {
return this.$jump('../../../pages_category_page2/userModule/login')
}
if (url.startsWith('function')) {
const [key, funcName] = url.split(':')
this[funcName]()
} else {
this.$jump(url)
}
},
/**
* 获取用户信息
*/
handleGetUser() {
this.loading = true
NET.request(API.GetUser, {}, 'GET').then(res => {
this.userItem = res.data
uni.setStorageSync('storage_userInfo', this.userItem);
this.isFirstComeIn=false
this.loading = true
})
},
/**
* 客服
* @return {Promise<void>}
*/
async flyToService() {
(await Services()).flyToService();
},
/**
* 商家入驻
*/
handleApplySettle() {
const res = uni.getStorageSync('storage_key');
let token = Encrypt(res.token)
let username = this.userItem.name
let url = null
// #ifdef H5
window.location.href = API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`
// #endif
// #ifdef APP-PLUS
plus.runtime.openURL(API.SettledMerchantPrefix + `/#/?username=${ username }&user=${ token }`, function (e) {
})
// #endif
// #ifdef MP-WEIXIN
url = API.SettledMerchantPrefix
uni.navigateTo({
url: `../../../pages_category_page1/linkOthers/index?url=${ url }&username=${ username }&user=${ token }`
// webviewurl
// url: '../../../pages_category_page1/linkOthers/index?url=' + encodeURIComponent(url)
// url:'../../../pages_category_page2/userModule/coupon'
})
// #endif
// #ifdef MP-ALIPAY
url = API.SettledMerchantPrefix
uni.navigateTo({
url: `../../../pages_category_page1/linkOthers/index?url=${ url }&username=${ username }&user=${ token }`
// webviewurl
// url: '../../../pages_category_page1/linkOthers/index?url=' + encodeURIComponent(url)
// url:'../../../pages_category_page2/userModule/coupon'
})
// #endif
},
}
}
</script>
<style lang="scss">
page {
background: #f8f8f8;
}
.content {
height: 100%;
position: relative;
padding-bottom: 150rpx;
.itemBox {
display: flex;
flex-flow: wrap;
padding-top: 30rpx;
background: #FFFFFF;
width: 690rpx;
margin: 30rpx auto 0 auto;
}
/* background-color: #f8f8f8; */
.top-bg {
width: 100%;
height: 400rpx;
margin-top: -50rpx;
}
.page-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
z-index: 10;
margin-top: -320upx;
.user-info-box {
width: 100%;
box-sizing: border-box;
padding: 30upx;
display: flex;
flex-direction: row;
align-items: center;
position: relative;
.notice {
width: 60rpx;
height: 60rpx;
position: absolute;
top: 0;
right: 50rpx;
background: url("https://ceres.zkthink.com/static/images/notice.png") no-repeat center center;
background-size: contain;
.messNum {
background: #C83732;
border-radius: 50%;
color: #FFFFFF;
text-align: center;
margin: 0rpx 0 0 30rpx;
width: 30rpx;
height: 30rpx;
line-height: 30rpx;
font-size: 20rpx;
}
}
.user-image {
width: 126upx;
height: 126upx;
}
.user-info {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20upx;
box-sizing: border-box;
z-index: 10;
.user-logoin-title {
font-size: 36upx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
}
.user-logoin-lable {
font-size: 24upx;
font-weight: 400;
color: rgba(255, 255, 255, 1);
margin-top: 20upx;
}
.experience {
label {
font-size: 26rpx;
color: #FFFFFF;
opacity: 0.7;
}
.experienceValue {
width: auto;
padding: 0 28rpx;
height: 40rpx;
font-weight: 400;
color: #FFFFFF;
border-radius: 25rpx;
line-height: 40rpx;
border: 2rpx solid rgba(0, 0, 0, 0);
background: linear-gradient(88deg, #C5AA7B 0%, #F5DEB2 100%);
font-size: 20rpx;
margin-left: 20rpx;
}
}
}
.user-info-right {
width: 30upx;
height: 30upx;
}
}
.order-box {
width: 690upx;
height: 196upx !important;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10upx 0px rgba(51, 51, 51, 0.1);
display: flex;
flex-direction: row;
align-items: center;
margin-left: 30upx;
z-index: 10;
.order-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
.quan {
position: absolute;
right: 40upx;
top: 10upx;
border: 1px solid red;
color: #FFFFFF;
background-color: red;
border-radius: 50%;
font-size: 16rpx;
width: 30upx;
height: 30upx;
line-height: 30upx;
text-align: center;
}
.order-item-image {
width: 90upx;
height: 90upx;
}
.order-item-text {
font-size: 28upx;
margin-top: 10upx;
font-weight: 500;
color: rgba(102, 102, 102, 1);
}
}
}
.item-btn {
width: 25%;
box-sizing: border-box;
background-color: #fff;
text-align: center;
margin-bottom: 40rpx;
.item-btn-icon {
width: 90upx;
height: 90upx !important;
}
.item-btn-text {
font-size: 28upx;
font-weight: 500;
flex: 1;
color: rgba(102, 102, 102, 1);
}
.messNum {
margin-left: 10rpx;
font-size: 16rpx;
background-color: red;
color: #FFFFFF;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
margin-top: -5rpx;
line-height: 30rpx;
text-align: center;
}
.item-btn-right {
width: 24upx;
height: 24upx;
}
}
.btnNone {
margin: 0;
padding: 0;
line-height: normal;
&::after {
display: none;
}
}
.mt20 {
margin-top: 20upx;
}
.mt1 {
margin-top: 1upx;
}
}
.copyright {
text-align: center;
padding: 30rpx 0 20rpx;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
display: none;
text {
display: block;
font-size: 20rpx;
line-height: 30rpx;
color: #C5CACF;
}
}
}
</style>
Loading…
Cancel
Save