parent
c0bbb94045
commit
7b67dfec8b
2
App.vue
2
App.vue
|
|
@ -94,7 +94,7 @@
|
|||
// 蓝色 blue #1677ff
|
||||
// 棕色 brown #8B4513
|
||||
// 紫色 purple #623cec
|
||||
default_theme: 'yellow'
|
||||
default_theme: 'yellow',
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@
|
|||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.margin-xsss {
|
||||
margin: 2rpx;
|
||||
}
|
||||
|
||||
.margin-xss {
|
||||
margin: 4rpx;
|
||||
}
|
||||
|
||||
.margin-xs {
|
||||
margin: 6rpx;
|
||||
}
|
||||
|
|
@ -34,6 +42,14 @@
|
|||
margin: 48rpx;
|
||||
}
|
||||
|
||||
.margin-top-xsss {
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
|
||||
.margin-top-xss {
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.margin-top-xs {
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
|
@ -63,6 +79,14 @@
|
|||
margin-top: 48rpx;
|
||||
}
|
||||
|
||||
.margin-right-xsss {
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.margin-right-xss {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.margin-right-xs {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
|
@ -92,6 +116,14 @@
|
|||
margin-right: 48rpx;
|
||||
}
|
||||
|
||||
.margin-left-xsss {
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
|
||||
.margin-left-xss {
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.margin-left-xs {
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
|
@ -121,6 +153,14 @@
|
|||
margin-left: 48rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-xsss {
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-xss {
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.margin-bottom-xs {
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
|
@ -155,6 +195,16 @@
|
|||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.margin-vertical-xsss {
|
||||
margin-top: 2rpx;
|
||||
margin-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.margin-vertical-xss {
|
||||
margin-top: 4rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.margin-vertical-xs {
|
||||
margin-top: 6rpx;
|
||||
margin-bottom: 6rpx;
|
||||
|
|
@ -196,6 +246,16 @@
|
|||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.margin-horizontal-xsss {
|
||||
margin-left: 2rpx;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
.margin-horizontal-xss {
|
||||
margin-left: 4rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.margin-horizontal-xs {
|
||||
margin-left: 6rpx;
|
||||
margin-right: 6rpx;
|
||||
|
|
@ -236,6 +296,14 @@
|
|||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.padding-xsss {
|
||||
padding: 2rpx;
|
||||
}
|
||||
|
||||
.padding-xss {
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.padding-xs {
|
||||
padding: 6rpx;
|
||||
}
|
||||
|
|
@ -265,6 +333,14 @@
|
|||
padding: 48rpx;
|
||||
}
|
||||
|
||||
.padding-top-xsss {
|
||||
padding-top: 2rpx;
|
||||
}
|
||||
|
||||
.padding-top-xss {
|
||||
padding-top: 4rpx;
|
||||
}
|
||||
|
||||
.padding-top-xs {
|
||||
padding-top: 6rpx;
|
||||
}
|
||||
|
|
@ -294,6 +370,14 @@
|
|||
padding-top: 48rpx;
|
||||
}
|
||||
|
||||
.padding-right-xsss {
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.padding-right-xss {
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.padding-right-xs {
|
||||
padding-right: 6rpx;
|
||||
}
|
||||
|
|
@ -323,6 +407,14 @@
|
|||
padding-right: 48rpx;
|
||||
}
|
||||
|
||||
.padding-left-xsss {
|
||||
padding-left: 2rpx;
|
||||
}
|
||||
|
||||
.padding-left-xss {
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
|
||||
.padding-left-xs {
|
||||
padding-left: 6rpx;
|
||||
}
|
||||
|
|
@ -352,6 +444,14 @@
|
|||
padding-left: 48rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-xsss {
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-xss {
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.padding-bottom-xs {
|
||||
padding-bottom: 6rpx;
|
||||
}
|
||||
|
|
@ -386,6 +486,16 @@
|
|||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.padding-vertical-xsss {
|
||||
padding-top: 2rpx;
|
||||
padding-bottom: 2rpx;
|
||||
}
|
||||
|
||||
.padding-vertical-xss {
|
||||
padding-top: 4rpx;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.padding-vertical-xs {
|
||||
padding-top: 6rpx;
|
||||
padding-bottom: 6rpx;
|
||||
|
|
@ -427,6 +537,16 @@
|
|||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.padding-horizontal-xsss {
|
||||
padding-left: 2rpx;
|
||||
padding-right: 2rpx;
|
||||
}
|
||||
|
||||
.padding-horizontal-xss {
|
||||
padding-left: 4rpx;
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
|
||||
.padding-horizontal-xs {
|
||||
padding-left: 6rpx;
|
||||
padding-right: 6rpx;
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ button:before {
|
|||
}
|
||||
|
||||
.opacity {
|
||||
opacity: 0.5;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.opacity-max {
|
||||
|
|
@ -430,23 +430,23 @@ button:before {
|
|||
* 边框 灰色(四边)、红色、黄色、绿色、灰色、无边线
|
||||
*/
|
||||
.br {
|
||||
border: 1px solid #f7f7f7 !important;
|
||||
border: 1px solid #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-b {
|
||||
border-bottom: 1px solid #f7f7f7 !important;
|
||||
border-bottom: 1px solid #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-t {
|
||||
border-top: 1px solid #f7f7f7 !important;
|
||||
border-top: 1px solid #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-l {
|
||||
border-left: 1px solid #f7f7f7 !important;
|
||||
border-left: 1px solid #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-r {
|
||||
border-right: 1px solid #f7f7f7 !important;
|
||||
border-right: 1px solid #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-red {
|
||||
|
|
@ -482,23 +482,23 @@ button:before {
|
|||
* 虚线边框、灰色(四边)、红色、黄色、绿色、灰色
|
||||
*/
|
||||
.br-dashed {
|
||||
border: dashed 1px #f7f7f7 !important;
|
||||
border: dashed 1px #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-b-dashed {
|
||||
border-bottom: dashed 1px #f7f7f7 !important;
|
||||
border-bottom: dashed 1px #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-t-dashed {
|
||||
border-top: dashed 1px #f7f7f7 !important;
|
||||
border-top: dashed 1px #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-l-dashed {
|
||||
border-left: dashed 1px #f7f7f7 !important;
|
||||
border-left: dashed 1px #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-r-dashed {
|
||||
border-right: dashed 1px #f7f7f7 !important;
|
||||
border-right: dashed 1px #EEEEEE !important;
|
||||
}
|
||||
|
||||
.br-dashed-red {
|
||||
|
|
@ -773,8 +773,8 @@ button[disabled].bg-gray {
|
|||
*/
|
||||
.notice-content {
|
||||
color: #666;
|
||||
line-height: 28rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 42rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.notice-content-blue {
|
||||
|
|
@ -824,8 +824,7 @@ button[disabled].bg-gray {
|
|||
* 导航分割
|
||||
*/
|
||||
.spacing-nav-title {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx
|
||||
}
|
||||
|
||||
.spacing-nav-title .text-wrapper {
|
||||
|
|
@ -1103,10 +1102,22 @@ button[disabled].bg-gray {
|
|||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.jc-e {
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.align-c {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.align-e {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.align-b {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.flex-warp {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
|
@ -1119,6 +1130,18 @@ button[disabled].bg-gray {
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
.self-c {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.self-b {
|
||||
align-self: baseline;
|
||||
}
|
||||
|
||||
.self-e {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.flex-width {
|
||||
width: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@
|
|||
.plugins-blog-rolling-list .item .blog-title {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: calc(100% - 36rpx);
|
||||
width: calc(100% - 26rpx);
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
|
|
@ -277,18 +277,25 @@
|
|||
* 多商户 - 数据列表
|
||||
*/
|
||||
.plugins-shop-data-list .item .logo {
|
||||
width: 120rpx;
|
||||
height: 120rpx !important;
|
||||
width: 100rpx;
|
||||
height: 100rpx !important;
|
||||
}
|
||||
|
||||
.plugins-shop-data-list .item .item-right-icon {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.plugins-shop-data-list .item .right-content {
|
||||
width: calc(100% - 190rpx);
|
||||
padding-left: 14rpx;
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
|
||||
.plugins-shop-data-list .item .auth-icon .icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx !important;
|
||||
width: 28rpx;
|
||||
height: 28rpx !important;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,69 +3,65 @@
|
|||
<view v-if="(propConfig || null) != null && (propData || null) != null && propData.length > 0">
|
||||
<block v-for="(floor, index) in propData" :key="index">
|
||||
<block v-if="floor.blog_list.length > 0 && floor.home_data_location == propLocation">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.vice_title}}</text>
|
||||
<navigator :url="floor.more_url" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="wh-auto oh pr">
|
||||
<view v-if="floor.keywords_arr.length > 0" class="word-list scroll-view-horizontal margin-bottom-lg">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in floor.keywords_arr" :key="ki">
|
||||
<navigator :url="'/pages/plugins/blog/search/search?keywords=' + kv" hover-class="none" class="word-icon dis-inline-block text-size-xss">{{kv}}
|
||||
</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<block v-if="floor.blog_list.length > 0">
|
||||
<!-- 默认图文 -->
|
||||
<block v-if="(floor.style_type || 0) == 0">
|
||||
<view class="plugins-blog-list">
|
||||
<view v-for="(item, index) in floor.blog_list" :key="index" class="item oh padding-main border-radius-main bg-white spacing-mb">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img fl radius" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="base fr">
|
||||
<view class="single-text text-size">{{item.title}}</view>
|
||||
<view class="cr-grey margin-top-sm">{{item.add_time_date_cn}}</view>
|
||||
<view class="cr-base text-size-sm multi-text margin-top-sm">{{item.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 九方格 -->
|
||||
<block v-else-if="floor.style_type == 1">
|
||||
<view class="plugins-blog-grid-list">
|
||||
<view v-for="(item, index) in floor.blog_list" :key="index" class="item oh border-radius-main bg-white spacing-mb">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img dis-block" :src="item.cover" mode="aspectFit"></image>
|
||||
<view class="base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm">{{item.title}}</view>
|
||||
<view class="cr-grey">{{item.add_time_date_cn}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 滚动 -->
|
||||
<view v-else-if="floor.style_type == 2" class="rolling-horizontal border-radius-main oh spacing-mb">
|
||||
<view class="plugins-blog-rolling-list scroll-view-horizontal">
|
||||
<swiper :vertical="false" :autoplay="(propConfig.is_home_hot_auto_play || 0) == 1" :circular="false"
|
||||
:display-multiple-items="floor.blog_list.length < 3 ? floor.blog_list.length : 3" interval="3000">
|
||||
<block v-for="(item, index) in floor.blog_list" :key="index">
|
||||
<swiper-item>
|
||||
<view class="item bg-white border-radius-main margin-right-main oh pr ht-auto pr">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img dis-block wh-auto" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="blog-title pa single-text cr-white padding-horizontal-main padding-top-sm padding-bottom-sm">{{item.title}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="plugins-blog" :class="floor.style_type == 2 ? 'bg-white border-radius-main padding-main spacing-mb' : ''">
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper" :class="floor.style_type == 2 ? '' : 'title-left-border'" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-sm cr-grey-9">{{floor.vice_title}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<navigator :url="floor.more_url" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<view class="wh-auto oh pr">
|
||||
<block v-if="floor.blog_list.length > 0">
|
||||
<!-- 默认图文 -->
|
||||
<block v-if="(floor.style_type || 0) == 0">
|
||||
<view class="plugins-blog-list">
|
||||
<view v-for="(item, index) in floor.blog_list" :key="index" class="item oh padding-main border-radius-main bg-white spacing-mb">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img fl radius" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="base fr">
|
||||
<view class="single-text text-size">{{item.title}}</view>
|
||||
<view class="cr-grey-9 margin-top-sm text-size-xs">{{item.add_time_date_cn}}</view>
|
||||
<view class="cr-base multi-text margin-top-sm text-size-xs">{{item.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 九方格 -->
|
||||
<block v-else-if="floor.style_type == 1">
|
||||
<view class="plugins-blog-grid-list">
|
||||
<view v-for="(item, index) in floor.blog_list" :key="index" class="item oh border-radius-main bg-white spacing-mb">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img dis-block" :src="item.cover" mode="aspectFit"></image>
|
||||
<view class="base padding-horizontal-sm margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm text-size-xs">{{item.title}}</view>
|
||||
<view class="cr-grey text-size-xs">{{item.add_time_date_cn}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 滚动 -->
|
||||
<view v-else-if="floor.style_type == 2" class="rolling-horizontal border-radius-main oh spacing-mb">
|
||||
<view class="plugins-blog-rolling-list scroll-view-horizontal">
|
||||
<swiper :vertical="false" :autoplay="(propConfig.is_home_hot_auto_play || 0) == 1" :circular="false"
|
||||
:display-multiple-items="floor.blog_list.length < 3 ? floor.blog_list.length : 3" interval="3000">
|
||||
<block v-for="(item, index) in floor.blog_list" :key="index">
|
||||
<swiper-item>
|
||||
<view class="item bg-white border-radius-main margin-right-main oh pr ht-auto pr">
|
||||
<navigator :url="item.url" hover-class="none">
|
||||
<image class="blog-img dis-block wh-auto" :src="item.cover" mode="aspectFill"></image>
|
||||
<view class="blog-title pa single-text cr-white padding-sm text-size-xs">{{item.title}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,20 +1,16 @@
|
|||
<template>
|
||||
<view>
|
||||
<view v-if="(data || null) != null && (data.goods_list || null) != null && data.goods_list.length > 0">
|
||||
<view v-if="(data.title || null) != null || (data.vice_title || null) != null" class="spacing-nav-title">
|
||||
<text v-if="(data.title || null) != null" class="text-wrapper" :style="'color:'+(data.color || '#333')+';'">{{data.title}}</text>
|
||||
<text v-if="(data.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{data.vice_title}}</text>
|
||||
<navigator v-if="(data[propMoreUrlKey] || null) != null" :url="data[propMoreUrlKey]" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
<view class="plugins-goods" :class="data.style_type == 2 ? 'bg-white border-radius-main padding-main spacing-mb' : ''"
|
||||
v-if="(data || null) != null && (data.goods_list || null) != null && data.goods_list.length > 0">
|
||||
<view v-if="(data.title || null) != null || (data.vice_title || null) != null" class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text v-if="(data.title || null) != null" class="text-wrapper" :class="data.style_type == 2 ? '' : 'title-left-border'"
|
||||
:style="'color:'+(data.color || '#333')+';'">{{data.title}}</text>
|
||||
<text v-if="(data.vice_title || null) != null" class="vice-name margin-left-sm cr-grey-9">{{data.vice_title}}</text>
|
||||
</view>
|
||||
<navigator v-if="(data[propMoreUrlKey] || null) != null" :url="data[propMoreUrlKey]" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<view class="wh-auto oh pr goods-list">
|
||||
<view v-if="(data.keywords_arr || null) != null && data.keywords_arr.length > 0" class="word-list scroll-view-horizontal margin-bottom-lg">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in data.keywords_arr" :key="ki">
|
||||
<navigator v-if="(kv || null) != null" :url="propKeywordsUrl + kv" hover-class="none"
|
||||
class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">{{kv}}</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 默认图文 -->
|
||||
<block v-if="(data.style_type || 0) == 0">
|
||||
<view class="goods-data-list">
|
||||
|
|
@ -25,7 +21,7 @@
|
|||
<view v-if="(item.is_error || 0) == 1" class="error-msg pa cr-gray tc radius">{{item.error_msg}}</view>
|
||||
<view class="base fr">
|
||||
<view class="multi-text">{{item.title}}</view>
|
||||
<view v-if="(item.simple_desc || null) != null" class="cr-grey single-text margin-top-sm">{{item.simple_desc}}</view>
|
||||
<view v-if="(item.simple_desc || null) != null" class="cr-grey single-text margin-top-sm text-size-sm">{{item.simple_desc}}</view>
|
||||
<view class="base-bottom pa">
|
||||
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null"
|
||||
class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{item.price_icon}}</text>
|
||||
|
|
@ -33,7 +29,7 @@
|
|||
<text class="sales-price va-m">{{item[propPriceField]}}</text>
|
||||
</view>
|
||||
<view v-if="(item.is_error || 0) == 0 && is_show_cart" class="pa bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<uni-icons type="plus" size="46rpx" color="#1AAD19"></uni-icons>
|
||||
<iconfont name="icon-icon-index-smbg-tj" size="40rpx" :color="themeColor"></iconfont>
|
||||
<view class="cart-badge-icon pa">
|
||||
<component-badge :propNumber="item.user_cart_count || 0"></component-badge>
|
||||
</view>
|
||||
|
|
@ -67,7 +63,7 @@
|
|||
<view v-if="(item.is_error || 0) == 1" class="error-msg pa cr-gray tc radius wh-auto">{{item.error_msg}}</view>
|
||||
<view class="base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text">{{item.title}}</view>
|
||||
<view class="margin-top-xs">
|
||||
<view class="margin-top-sm">
|
||||
<view class="fl">
|
||||
<text v-if="propIsShowPriceIcon && (item.price_icon || null) != null"
|
||||
class="bg-red br-red cr-white text-size-xs padding-left-sm padding-right-sm round va-m margin-right-xs">{{item.price_icon}}</text>
|
||||
|
|
@ -75,7 +71,7 @@
|
|||
<text class="sales-price va-m">{{item[propPriceField]}}</text>
|
||||
</view>
|
||||
<view v-if="(item.is_error || 0) == 0 && is_show_cart" class="pa bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<uni-icons type="plus" size="46rpx" color="#1AAD19"></uni-icons>
|
||||
<iconfont name="icon-icon-index-smbg-tj" size="40rpx" :color="themeColor"></iconfont>
|
||||
<view class="cart-badge-icon pa">
|
||||
<component-badge :propNumber="item.user_cart_count || 0"></component-badge>
|
||||
</view>
|
||||
|
|
@ -101,7 +97,7 @@
|
|||
</view>
|
||||
</block>
|
||||
<!-- 滚动 -->
|
||||
<view v-else-if="data.style_type == 2" class="rolling-horizontal border-radius-main oh spacing-mb">
|
||||
<view v-else-if="data.style_type == 2" class="rolling-horizontal border-radius-main oh">
|
||||
<view class="goods-data-rolling-list scroll-view-horizontal">
|
||||
<swiper class="swiper" :vertical="false" :autoplay="propIsAutoPlay" :circular="false"
|
||||
:display-multiple-items="((data.multiple_items || null) == null) ? (data.goods_list.length < 3 ? data.goods_list.length : 3) : (data.goods_list.length < data.multiple_items ? data.goods_list.length : data.multiple_items)"
|
||||
|
|
@ -123,7 +119,7 @@
|
|||
<text class="sales-price va-m">{{item[propPriceField]}}</text>
|
||||
</view>
|
||||
<view v-if="(item.is_error || 0) == 0 && is_show_cart" class="pa bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<uni-icons type="plus" size="46rpx" color="#1AAD19"></uni-icons>
|
||||
<iconfont name="icon-icon-index-smbg-tj" size="40rpx" :color="themeColor"></iconfont>
|
||||
<view class="cart-badge-icon pa">
|
||||
<component-badge :propNumber="item.user_cart_count || 0"></component-badge>
|
||||
</view>
|
||||
|
|
@ -171,6 +167,7 @@
|
|||
return {
|
||||
data: null,
|
||||
is_show_cart: false,
|
||||
themeColor: app.globalData.get_theme_color()
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<view v-if="propData.length > 0" class="icon-nav-list" :class="propData.length > 5 ? 'swiper-height-max' : 'swiper-height-min'">
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" mode="default" :dots-styles="dotsStyles" @clickItem="click_item" :info="swiperData" :current="current">
|
||||
<swiper class="swiper-box" :indicator-dots="swiperData.length > 2" :autoplay="autoplay" :duration="duration" @change="swiper_change" :current="swiperDotIndex">
|
||||
<swiper class="swiper-box" :autoplay="autoplay" :duration="duration" @change="swiper_change" :current="swiperDotIndex">
|
||||
<swiper-item v-for="(swiperItemData, i) in swiperData" :key="i">
|
||||
<view class="swiper-item" :class="'swiper-item' + i">
|
||||
<view v-for="(item, j) in swiperItemData" :key="j" class="swiper-item item">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
<view>
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="plugins-realstore-data-list oh">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view class="item bg-white padding-vertical-xl padding-horizontal-main border-radius-main pr spacing-mb" :data-value="item.url" @tap="url_event">
|
||||
<view class="item bg-white padding-vertical-xl padding-horizontal-main border-radius-main pr spacing-mb" :class="item.status_info.type===2 ? 'opacity' :''" :data-value="item.url"
|
||||
@tap="url_event">
|
||||
<view class="base oh flex-row">
|
||||
<!-- 基础内容 -->
|
||||
<image :src="item.logo" mode="widthFix" class="logo circle br"></image>
|
||||
|
|
@ -15,7 +16,8 @@
|
|||
<view class="margin-top-sm padding-top-xs text-size-xs cr-grey">
|
||||
<view v-if="(item.status_info.time || null) != null" class="flex-row align-c">
|
||||
<iconfont name="icon-icon-index-zxmd-time pr top-xs cr-grey-9"></iconfont>
|
||||
<view :class="'status-icon text-size-xs divider-r padding-left-xs padding-right-sm margin-right-sm '+((item.status_info.status == 1) ? 'cr-green' : 'cr-gray')">
|
||||
<view
|
||||
:class="'status-icon text-size-xs divider-r padding-left-xs padding-right-sm margin-right-sm '+((item.status_info.status == 1) ? 'cr-green' : (item.status_info.type == 1) ? 'cr-red' : 'cr-grey-c')">
|
||||
{{item.status_info.msg}}
|
||||
</view>
|
||||
{{item.status_info.time}}
|
||||
|
|
|
|||
|
|
@ -116,11 +116,9 @@
|
|||
swiperData = app.globalData.groupArry(item.d, 2);
|
||||
}
|
||||
}
|
||||
console.log(swiperData);
|
||||
item.d = swiperData
|
||||
|
||||
})
|
||||
console.log(this.hotData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,78 +1,81 @@
|
|||
<template>
|
||||
<view>
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="plugins-shop-data-list oh">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view class="item oh border-radius-main padding-main bg-white arrow-right spacing-mb">
|
||||
<view :data-value="item.url" @tap="url_event">
|
||||
<image :src="item.logo" mode="aspectFit" class="logo circle fl br"></image>
|
||||
<view class="right-content fr">
|
||||
<view class="title single-text">
|
||||
<!-- 认证信息 -->
|
||||
<view v-if="(config.is_enable_auth || 0) == 1 && ((item.auth_type != -1 && (item.auth_type_msg || null) != null) || ((item.bond_status || 0) == 1 && (item.bond_status_msg || null) != null))" class="auth-icon dis-inline-block">
|
||||
<!-- 实名认证 -->
|
||||
<block v-if="item.auth_type != -1 && (item.auth_type_msg || null) != null">
|
||||
<block v-if="item.auth_type == 0">
|
||||
<image :src="config.shop_auth_personal_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
<block v-if="item.auth_type == 1">
|
||||
<image :src="config.shop_auth_company_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 保证金认证 -->
|
||||
<block v-if="(item.bond_status || 0) == 1 && (item.bond_status_msg || null) != null">
|
||||
<image :src="config.shop_auth_bond_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 标题 -->
|
||||
<text class="fw-b text-size va-m">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="desc multi-text cr-base text-size-xs margin-top-sm">{{item.describe}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="plugins-shop-data-list oh">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<view class="item oh border-radius-main padding-vertical-xl padding-horizontal-main bg-white spacing-mb pr">
|
||||
<iconfont name="icon-icon-index-morejiantou" class="item-right-icon" color="#ccc"></iconfont>
|
||||
<view class="flex-row align-c" :data-value="item.url" @tap="url_event">
|
||||
<image :src="item.logo" mode="aspectFit" class="logo border-radius-xs fl br"></image>
|
||||
<view class="right-content fr flex-1 flex-width">
|
||||
<view class="title single-text">
|
||||
<!-- 认证信息 -->
|
||||
<view
|
||||
v-if="(config.is_enable_auth || 0) == 1 && ((item.auth_type != -1 && (item.auth_type_msg || null) != null) || ((item.bond_status || 0) == 1 && (item.bond_status_msg || null) != null))"
|
||||
class="auth-icon dis-inline-block">
|
||||
<!-- 实名认证 -->
|
||||
<block v-if="item.auth_type != -1 && (item.auth_type_msg || null) != null">
|
||||
<block v-if="item.auth_type == 0">
|
||||
<image :src="config.shop_auth_personal_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
<block v-if="item.auth_type == 1">
|
||||
<image :src="config.shop_auth_company_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 保证金认证 -->
|
||||
<block v-if="(item.bond_status || 0) == 1 && (item.bond_status_msg || null) != null">
|
||||
<image :src="config.shop_auth_bond_icon" class="icon va-m" mode="aspectFill"></image>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 标题 -->
|
||||
<text class="fw-b text-size va-m">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="desc multi-text cr-base text-size-xs margin-top-sm padding-top-xs">{{item.describe}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config: {},
|
||||
data_list: []
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
props: {
|
||||
propConfig: {
|
||||
type: [String,Object],
|
||||
default: null
|
||||
},
|
||||
propDataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
||||
},
|
||||
// 页面被展示
|
||||
created: function(e) {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.shop.data') : this.propConfig) || {};
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: this.propDataList
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
config: {},
|
||||
data_list: []
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
props: {
|
||||
propConfig: {
|
||||
type: [String, Object],
|
||||
default: null
|
||||
},
|
||||
propDataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
||||
},
|
||||
// 页面被展示
|
||||
created: function(e) {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.shop.data') : this.propConfig) || {};
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: this.propDataList
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -151,10 +151,6 @@
|
|||
height: 506rpx;
|
||||
}
|
||||
|
||||
.plugins-salerecords swiper-item {
|
||||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.plugins-salerecords image {
|
||||
width: 40rpx !important;
|
||||
height: 40rpx !important;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@
|
|||
<!-- 限时秒杀 - 插件 -->
|
||||
<view
|
||||
v-if="pv.plugins == 'seckill' && (plugins_seckill_data || null) != null && (plugins_seckill_data.data || null) != null && (plugins_seckill_data.data.goods || null) != null && plugins_seckill_data.data.goods.length > 0"
|
||||
class="plugins-seckill-data border-radius-main padding-horizontal-main spacing-mb" :style="'background-image: url('+plugins_seckill_data.data.home_bg+');'">
|
||||
class="plugins-seckill-data border-radius-main padding-horizontal-main padding-top-main spacing-mb"
|
||||
:style="'background-image: url('+plugins_seckill_data.data.home_bg+');'">
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="flex-row align-c">
|
||||
<image class="icon" :src="plugins_seckill_data.data.home_title_icon" mode="widthFix"></image>
|
||||
|
|
@ -163,22 +164,14 @@
|
|||
<!-- 自动+手动 -->
|
||||
<view v-for="(floor, index) in data_list" :key="index" class="floor">
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border" :style="'color:'+(floor.bg_color || '#333')+';'">{{floor.name}}</text>
|
||||
<text v-if="(floor.describe || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.describe}}</text>
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper title-left-border" :style="'color:'+(floor.bg_color || '#333')+';'">{{floor.name}}</text>
|
||||
<text v-if="(floor.describe || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.describe}}</text>
|
||||
</view>
|
||||
<navigator :url="'/pages/goods-search/goods-search?category_id=' + floor.id" hover-class="none" class="arrow-right padding-right cr-grey">更多
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="floor-list wh-auto oh pr">
|
||||
<view v-if="floor.items.length > 0" class="word-list scroll-view-horizontal margin-bottom-lg">
|
||||
<scroll-view :scroll-x="true">
|
||||
<block v-for="(icv, icx) in floor.items" :key="icx">
|
||||
<navigator :url="'/pages/goods-search/goods-search?category_id=' + icv.id" hover-class="none"
|
||||
class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">
|
||||
{{icv.name}}
|
||||
</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<block v-if="floor.goods.length > 0">
|
||||
<component-goods-list :propData="{style_type: 1, goods_list: floor.goods}" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol"
|
||||
:propIsCartParaCurve="true" propSource="index"></component-goods-list>
|
||||
|
|
@ -205,13 +198,15 @@
|
|||
<!--- 底部购买记录 - 插件 -->
|
||||
<view
|
||||
v-if="pv.plugins == 'salerecords' && (plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0"
|
||||
class="spacing-mb plugins-salerecords">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
|
||||
<text v-if="(plugins_salerecords_data.base || null) != null && (plugins_salerecords_data.base.home_bottom_desc || null) != null"
|
||||
class="vice-name margin-left-lg cr-gray">{{plugins_salerecords_data.base.home_bottom_desc}}</text>
|
||||
class="plugins-salerecords bg-white border-radius-main padding-main spacing-mb">
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
|
||||
<text v-if="(plugins_salerecords_data.base || null) != null && (plugins_salerecords_data.base.home_bottom_desc || null) != null"
|
||||
class="vice-name margin-left-sm cr-grey-9">{{plugins_salerecords_data.base.home_bottom_desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white padding-horizontal-main border-radius-main oh">
|
||||
<view class="oh">
|
||||
<swiper :vertical="true" :autoplay="true" :circular="true" :display-multiple-items="plugins_salerecords_data.data.length < 6 ? plugins_salerecords_data.data.length : 6"
|
||||
interval="3000" :style="plugins_salerecords_data.data.length < 6 ? 'height:'+(plugins_salerecords_data.data.length*84.33)+'rpx;' : ''">
|
||||
<block v-for="(item, index) in plugins_salerecords_data.data" :key="index">
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,110 +1,157 @@
|
|||
/**
|
||||
* 顶部内容
|
||||
*/
|
||||
.top-content {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部
|
||||
*/
|
||||
.head-base {
|
||||
padding-top: 35rpx;
|
||||
}
|
||||
/* #ifdef H5 || APP */
|
||||
.head-base {
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
/* #endif */
|
||||
.head-avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx !important;
|
||||
/**
|
||||
* 顶部内容
|
||||
*/
|
||||
.top-content {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部导航
|
||||
/**
|
||||
* 头部
|
||||
*/
|
||||
.head-nav-item {
|
||||
width: 25%;
|
||||
.head-base {
|
||||
padding: 40rpx 40rpx 22rpx 40rpx;
|
||||
/* #ifdef MP */
|
||||
padding-top: 120rpx;
|
||||
/* #endif */
|
||||
}
|
||||
.head-nav-item .nav-value,
|
||||
.head-nav-item .nav-name {
|
||||
line-height: 46rpx;
|
||||
|
||||
.head-base .head-id {
|
||||
background: linear-gradient(90deg, #FFE3DC 0%, #FF9F67 100%);
|
||||
}
|
||||
/**
|
||||
* 头部右上角
|
||||
|
||||
.head-avatar {
|
||||
width: 116rpx;
|
||||
height: 116rpx !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部右上角
|
||||
*/
|
||||
.head-right {
|
||||
z-index: 10;
|
||||
right: 30rpx;
|
||||
top: 110rpx;
|
||||
}
|
||||
.head-right .item .icon {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
.head-right .item .badge-icon {
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/**
|
||||
* 行内导航列表
|
||||
.head-right .item .badge-icon {
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员码
|
||||
*/
|
||||
.qrcode-content {
|
||||
background-size: 100% 100%;
|
||||
color: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode-content.divider-r::after {
|
||||
right: 50%;
|
||||
height: 30%;
|
||||
background: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode .icon {
|
||||
width: 48rpx;
|
||||
margin-right: 18rpx;
|
||||
position: relative;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.qrcode .iconfont {
|
||||
top: 50%;
|
||||
right: 48rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部内容
|
||||
*/
|
||||
.user-bottom {
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 行内导航列表
|
||||
*/
|
||||
.nav-content .nav-all-order-goods {
|
||||
width: 138rpx;
|
||||
padding: 16rpx 16rpx 16rpx 12rpx;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods::before {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 59px;
|
||||
background-color: #fff;
|
||||
box-shadow: -2px 0px 3px 3px rgba(0, 0, 0, 0.03);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.nav-list .nav-item {
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-desc {
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
}
|
||||
|
||||
.nav-list .nav-item .item-arrow {
|
||||
width: 25rpx;
|
||||
width: 25rpx;
|
||||
}
|
||||
|
||||
.nav-list-sub {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.nav-list-sub .item {
|
||||
width: 20%;
|
||||
padding: 16rpx 16rpx 16rpx 0;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods .item .item-icon,
|
||||
.nav-list-sub .item .item-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
|
||||
.nav-list-sub .item .badge-icon {
|
||||
top: -2px;
|
||||
left: calc(50% + 35rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 聚合导航
|
||||
*/
|
||||
top: -2px;
|
||||
left: calc(50% + 35rpx);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 聚合导航
|
||||
*/
|
||||
.nav-box .nav-item {
|
||||
box-sizing: border-box;
|
||||
width: 25%;
|
||||
box-sizing: border-box;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.nav-box .nav-item .item-icon {
|
||||
width: 45rpx;
|
||||
height: 45rpx !important;
|
||||
width: 52rpx;
|
||||
height: 52rpx !important;
|
||||
}
|
||||
|
||||
.nav-box .nav-item .item-desc {
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
}
|
||||
margin-right: 50rpx;
|
||||
margin-top: 2rpx;
|
||||
width: calc(100% - 300rpx);
|
||||
}
|
||||
|
||||
.service-nav .show-type-submit {
|
||||
width: 50rpx;
|
||||
height: 50rpx !important;
|
||||
top: 18rpx;
|
||||
right: 20rpx;
|
||||
width: 50rpx;
|
||||
height: 50rpx !important;
|
||||
top: 18rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
|
@ -1,450 +1,511 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 顶部内容 -->
|
||||
<view class="top-content" :style="top_content_style">
|
||||
<!-- 内容 -->
|
||||
<view class="content padding-horizontal-main">
|
||||
<view class="head-base pr oh">
|
||||
<!-- 左侧头像 -->
|
||||
<view class="padding-bottom-xxl oh tc fl">
|
||||
<image @tap="preview_event" @error="user_avatar_error" class="head-avatar circle bg-white va-m" :src="avatar" mode="widthFix"></image>
|
||||
<view class="va-m dis-inline-block cr-white margin-left-lg tl">
|
||||
<view data-value="/pages/personal/personal" @tap="url_event">
|
||||
<view>
|
||||
<text class="va-m">{{nickname}}</text>
|
||||
<view class="dis-inline-block va-m margin-left-sm">
|
||||
<uni-icons type="compose" size="14" color="#fff"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="(user_id || null) != null" class="br round tc padding-left-lg padding-right-lg margin-top-xs dis-inline-block">ID {{user_id}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 右上角 -->
|
||||
<view class="head-right pa">
|
||||
<view v-if="(qrcode_page_url || null) != null" class="item pr dis-inline-block" :data-value="qrcode_page_url" @tap="url_event">
|
||||
<image class="icon" :src="common_static_url+'qrcode-icon.png'" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="item pr dis-inline-block margin-left-xxl" data-value="/pages/setup/setup" @tap="url_event">
|
||||
<image class="icon" :src="common_static_url+'gear-icon.png'" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="item pr dis-inline-block margin-left-xxl" data-value="/pages/message/message" @tap="url_event">
|
||||
<image class="icon" :src="common_static_url+'notification-icon.png'" mode="widthFix"></image>
|
||||
<view class="badge-icon pa">
|
||||
<component-badge :propNumber="message_total"></component-badge>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 副导航 -->
|
||||
<view v-if="common_app_is_head_vice_nav == 1 && head_nav_list.length > 0" class="head-nav oh bg-white padding-main border-radius-main spacing-mb">
|
||||
<block v-for="(item, index) in head_nav_list" :key="index">
|
||||
<navigator :url="'/pages/' + item.url + '/' + item.url" hover-class="none">
|
||||
<view class="head-nav-item tc fl">
|
||||
<view class="nav-value fw-b text-size">{{item.count}}</view>
|
||||
<view class="nav-name cr-gray">{{item.name}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 订单导航 -->
|
||||
<view v-if="(navigation_order || null) != null" class="nav-list bg-white bg-white padding-main border-radius-main spacing-mb">
|
||||
<!-- 主导航 -->
|
||||
<view :data-value="navigation_order.event_value" :data-type="navigation_order.event_type" @tap="navigation_event" class="nav-item br-b cp padding-main">
|
||||
<view class="arrow-right">
|
||||
<image :src="navigation_order.images_url" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm">{{navigation_order.name}}</text>
|
||||
<text v-if="(navigation_order.desc || null) != null" class="item-desc fr tr single-text cr-grey">{{navigation_order.desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单自定义副导航 -->
|
||||
<view class="nav-list-sub oh margin-top-sm">
|
||||
<block v-for="(items, index) in user_order_status_list" :key="index">
|
||||
<navigator :url="items.url" hover-class="none">
|
||||
<view class="item pr fl tc">
|
||||
<view class="badge-icon pa">
|
||||
<component-badge :propNumber="items.count"></component-badge>
|
||||
</view>
|
||||
<image class="item-icon margin-bottom-xs" :src="static_url+'order-icon-' + items.status + '.png'" mode="aspectFill"></image>
|
||||
<view class="item-name cr-base">{{items.name}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 聚合导航 -->
|
||||
<view class="service-nav padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="padding-main pr">
|
||||
<text class="fw-b text-size">我的服务</text>
|
||||
<image class="show-type-submit pa cp" :src="common_static_url+'show-'+(nav_show_model_type == 0 ? 'list' : 'grid')+'-icon.png'" mode="aspectFill" @tap="nav_show_type_event"></image>
|
||||
</view>
|
||||
<!-- 列表模式 -->
|
||||
<view v-if="nav_show_model_type == 1" class="nav-list">
|
||||
<block v-for="(item, index) in navigation" :key="index">
|
||||
<!-- 这里不展示订单导航 -->
|
||||
<block v-if="item.event_value != '/pages/user-order/user-order'">
|
||||
<view :data-value="item.event_value" :data-type="item.event_type" @tap="navigation_event" class="nav-item br-t cp padding-main margin-top-sm">
|
||||
<view class="arrow-right">
|
||||
<image :src="item.images_url" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm">{{item.name}}</text>
|
||||
<text v-if="(item.desc || null) != null" class="item-desc fr tr single-text cr-grey">{{item.desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 清除缓存 -->
|
||||
<view class="nav-item br-t cp padding-main" @tap="remove_user_cache_event">
|
||||
<view class="arrow-right">
|
||||
<image :src="common_static_url+nav_logout_data.icon+'-icon.png'" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm">{{nav_logout_data.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 联系客服 -->
|
||||
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item br-t cp padding-main" @tap="call_event">
|
||||
<view class="arrow-right">
|
||||
<image :src="common_static_url+'customer-service-icon.png'" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm">联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 默认九方格模式 -->
|
||||
<view v-else class="nav-box oh br-t margin-top-sm">
|
||||
<block v-for="(item, index) in navigation" :key="index">
|
||||
<!-- 这里不展示订单导航 -->
|
||||
<block v-if="item.event_value != '/pages/user-order/user-order'">
|
||||
<view :data-value="item.event_value" :data-type="item.event_type" @tap="navigation_event" class="nav-item padding-main fl tc cp">
|
||||
<image :src="item.images_url" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base">{{item.name}}</view>
|
||||
<view>
|
||||
<!-- 顶部内容 -->
|
||||
<view class="top-content">
|
||||
<!-- 内容 -->
|
||||
<view class="content">
|
||||
<view class="user-top bg-white">
|
||||
<view class="head-base pr flex-row jc-sb align-c">
|
||||
<!-- 左侧头像 -->
|
||||
<view class="head-left">
|
||||
<image data-value="/pages/personal/personal" @tap="url_event" @error="user_avatar_error" class="head-avatar circle bg-white va-m" :src="avatar" mode="widthFix"></image>
|
||||
<view class="va-m dis-inline-block margin-left-lg">
|
||||
<view class="flex-col align-b" data-value="/pages/personal/personal" @tap="url_event">
|
||||
<text class="va-m fw-b text-size">{{nickname}}</text>
|
||||
<view v-if="(user_id || null) != null" class="head-id border-radius-sm padding-vertical-xsss padding-horizontal-sm margin-top-sm dis-inline-block fw-b">
|
||||
<text class="text-size-sm">ID </text>
|
||||
<text class="text-size-xs padding-left-xs">{{user_id}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 清除缓存 -->
|
||||
<view class="nav-item padding-main fl tc cp" @tap="remove_user_cache_event">
|
||||
<image :src="common_static_url+nav_logout_data.icon+'-icon.png'" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base">{{nav_logout_data.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 联系客服 -->
|
||||
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item padding-main fl tc cp" @tap="call_event">
|
||||
<image :src="common_static_url+'customer-service-icon.png'" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base">联系客服</view>
|
||||
<!-- 右上角 -->
|
||||
<view class="head-right cr-black">
|
||||
<view class="item pr dis-inline-block margin-left-xxl" data-value="/pages/setup/setup" @tap="url_event">
|
||||
<iconfont name="icon-icon-applet-me-settings-acquiesce" size="46rpx"></iconfont>
|
||||
</view>
|
||||
<view class="item pr dis-inline-block margin-left-xxl" data-value="/pages/message/message" @tap="url_event">
|
||||
<iconfont name="icon-icon-applet-me-message-acquiesce" size="46rpx"></iconfont>
|
||||
<view class="badge-icon pa">
|
||||
<component-badge :propNumber="message_total"></component-badge>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 副导航 -->
|
||||
<view v-if="common_app_is_head_vice_nav == 1 && head_nav_list.length > 0" class="head-nav oh padding-main flex-row align-c jc-sa tc">
|
||||
<block v-for="(item, index) in head_nav_list" :key="index">
|
||||
<navigator :url="'/pages/' + item.url + '/' + item.url" hover-class="none" class="flex-1 flex-width">
|
||||
<view class="head-nav-item">
|
||||
<view class="nav-value fw-b text-size margin-bottom-sm">{{item.count}}</view>
|
||||
<view class="nav-name text-size-sm">{{item.name}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 会员码 付款码 -->
|
||||
<view v-if="((payment_page_url || null) !== null) || ((membership_page_url || null) !== null)" class="qrcode padding-horizontal-main pr">
|
||||
<view class="qrcode-content flex-row align-c padding-main text-size-md" style="background-image:url(/static/images/common/qrcod-bg.png)"
|
||||
:class="(((payment_page_url || null) == null) || ((membership_page_url || null) == null)) ? 'jc-sb':'jc-sa divider-r'">
|
||||
<view class="qrcode-left flex-row jc-sa align-c" v-if="(membership_page_url || null) != null">
|
||||
<view class="item pr dis-inline-block" :data-value="membership_page_url" @tap="url_event">
|
||||
<image class="icon" src="@/static/images/common/membership-code.png" mode="widthFix"></image>
|
||||
</view>
|
||||
会员码
|
||||
</view>
|
||||
<view class="qrcode-right flex-row jc-sa align-c" v-if="(payment_page_url || null) != null">
|
||||
<view class="item pr dis-inline-block" :data-value="payment_page_url" @tap="url_event">
|
||||
<image class="icon" src="@/static/images/common/payment-code.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<text>付款码</text>
|
||||
</view>
|
||||
</view>
|
||||
<iconfont v-if="((payment_page_url || null) == null) || ((membership_page_url || null) == null)" name="icon-icon-index-morejiantou pa" color="#FEF6CF"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户中心公告 -->
|
||||
<view v-if="(common_user_center_notice || null) != null" class="padding-horizontal-main padding-bottom-main">
|
||||
<view class="notice-content">{{common_user_center_notice}}</view>
|
||||
</view>
|
||||
<view class="user-bottom padding-horizontal-main"
|
||||
:style="((payment_page_url || null) !== null) || ((membership_page_url || null) !== null) ? 'box-shadow: 0px -8px 8px 2px rgba(0, 0, 0, 0.2);' : '' ">
|
||||
<!-- 订单导航 -->
|
||||
<view v-if="(navigation_order || null) != null" class="nav-list bg-white bg-white padding-vertical-main border-radius-main spacing-mb">
|
||||
<!-- 订单导航 -->
|
||||
<view class="nav-content flex-row jc-sb align-c">
|
||||
<!-- 主导航 -->
|
||||
<!-- <view :data-value="navigation_order.event_value" :data-type="navigation_order.event_type" @tap="navigation_event" class="nav-item br-b cp padding-main">
|
||||
<view class="arrow-right">
|
||||
<image :src="navigation_order.images_url" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm">{{navigation_order.name}}</text>
|
||||
<text v-if="(navigation_order.desc || null) != null" class="item-desc fr tr single-text cr-grey">{{navigation_order.desc}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="nav-list-sub oh flex-row jc-sa align-c flex-1">
|
||||
<!-- 订单自定义副导航 -->
|
||||
<block v-for="(items, index) in user_order_status_list" :key="index">
|
||||
<navigator :url="items.url" hover-class="none" class="flex-1">
|
||||
<view class="item pr tc">
|
||||
<view class="badge-icon pa">
|
||||
<component-badge :propNumber="items.count"></component-badge>
|
||||
</view>
|
||||
<image class="item-icon margin-bottom-xs" :src="static_url+'order-icon-' + items.status + '.png'" mode="aspectFill"></image>
|
||||
<view class="item-name cr-base text-size-sm">{{items.name}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<navigator :url="navigation_order.event_value" hover-class="none" class="nav-all-order-goods pr">
|
||||
<view class="item pr tc">
|
||||
<image class="item-icon margin-bottom-xs" :src="navigation_order.images_url" mode="aspectFill"></image>
|
||||
<view class="item-name cr-base text-size-sm">{{navigation_order.name}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 在线客服 -->
|
||||
<component-online-service :propIsNav="true" :propIsBar="true"></component-online-service>
|
||||
<!-- 聚合导航 -->
|
||||
<view class="service-nav padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="padding-main pr">
|
||||
<text class="fw-b text-size">我的服务</text>
|
||||
<image class="show-type-submit pa cp" :src="common_static_url+'show-'+(nav_show_model_type == 0 ? 'list' : 'grid')+'-icon.png'" mode="aspectFill"
|
||||
@tap="nav_show_type_event">
|
||||
</image>
|
||||
</view>
|
||||
<!-- 列表模式 -->
|
||||
<view v-if="nav_show_model_type == 1" class="nav-list">
|
||||
<block v-for="(item, index) in navigation" :key="index">
|
||||
<!-- 这里不展示订单导航 -->
|
||||
<block v-if="item.event_value != '/pages/user-order/user-order'">
|
||||
<view :data-value="item.event_value" :data-type="item.event_type" @tap="navigation_event" class="nav-item br-t cp padding-main">
|
||||
<view class="arrow-right">
|
||||
<image :src="item.images_url" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm text-size-sm">{{item.name}}</text>
|
||||
<text v-if="(item.desc || null) != null" class="item-desc fr tr single-text cr-grey-9 text-size-sm">{{item.desc}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 清除缓存 -->
|
||||
<view class="nav-item br-t cp padding-main" @tap="remove_user_cache_event">
|
||||
<view class="arrow-right">
|
||||
<image :src="common_static_url+nav_logout_data.icon+'-icon.png'" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm text-size-sm">{{nav_logout_data.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 联系客服 -->
|
||||
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item br-t cp padding-main" @tap="call_event">
|
||||
<view class="arrow-right">
|
||||
<image :src="common_static_url+'customer-service-icon.png'" class="item-icon va-m" mode="widthFix"></image>
|
||||
<text class="item-name va-m cr-base margin-left-sm text-size-sm">联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 默认九方格模式 -->
|
||||
<view v-else class="nav-box oh br-t margin-top-sm">
|
||||
<block v-for="(item, index) in navigation" :key="index">
|
||||
<!-- 这里不展示订单导航 -->
|
||||
<block v-if="item.event_value != '/pages/user-order/user-order'">
|
||||
<view :data-value="item.event_value" :data-type="item.event_type" @tap="navigation_event" class="nav-item padding-main fl tc cp">
|
||||
<image :src="item.images_url" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base text-size-sm">{{item.name}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 清除缓存 -->
|
||||
<view class="nav-item padding-main fl tc cp" @tap="remove_user_cache_event">
|
||||
<image :src="common_static_url+nav_logout_data.icon+'-icon.png'" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base text-size-sm">{{nav_logout_data.name}}</view>
|
||||
</view>
|
||||
<!-- 联系客服 -->
|
||||
<view v-if="(common_app_customer_service_tel || null) != null" class="nav-item padding-main fl tc cp" @tap="call_event">
|
||||
<image :src="common_static_url+'customer-service-icon.png'" class="item-icon" mode="widthFix"></image>
|
||||
<view class="item-name single-text cr-base text-size-sm">联系客服</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<component-quick-nav :propIsNav="true" :propIsBar="true"></component-quick-nav>
|
||||
|
||||
<!-- 用户基础 -->
|
||||
<component-user-base ref="user_base"></component-user-base>
|
||||
<!-- 用户中心公告 -->
|
||||
<component-notice v-if="(common_user_center_notice || null) != null" :propData="common_user_center_notice"></component-notice>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<component-copyright></component-copyright>
|
||||
</view>
|
||||
<!-- 在线客服 -->
|
||||
<component-online-service :propIsNav="true" :propIsBar="true"></component-online-service>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<component-quick-nav :propIsNav="true" :propIsBar="true"></component-quick-nav>
|
||||
|
||||
<!-- 用户基础 -->
|
||||
<component-user-base ref="user_base"></component-user-base>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<component-copyright></component-copyright>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentBadge from "../../components/badge/badge";
|
||||
import componentCopyright from "../../components/copyright/copyright";
|
||||
import componentOnlineService from "../../components/online-service/online-service";
|
||||
import componentUserBase from "../../components/user-base/user-base";
|
||||
const app = getApp();
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentBadge from "../../components/badge/badge";
|
||||
import componentCopyright from "../../components/copyright/copyright";
|
||||
import componentOnlineService from "../../components/online-service/online-service";
|
||||
import componentUserBase from "../../components/user-base/user-base";
|
||||
import componentNotice from "@/components/notice/notice"
|
||||
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
var static_url = app.globalData.get_static_url('user');
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
var static_url = app.globalData.get_static_url('user');
|
||||
var client_value = app.globalData.application_client();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
static_url: static_url,
|
||||
avatar: app.globalData.data.default_user_head_src,
|
||||
user_id: '',
|
||||
nickname: "用户名",
|
||||
message_total: 0,
|
||||
nav_logout_data: {
|
||||
name: (client_value == 'mp') ? '清除缓存' : '退出账号',
|
||||
icon: (client_value == 'mp') ? 'cache' : 'logout',
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
static_url: static_url,
|
||||
avatar: app.globalData.data.default_user_head_src,
|
||||
user_id: '',
|
||||
nickname: "用户名",
|
||||
message_total: 0,
|
||||
nav_logout_data: {
|
||||
name: (client_value == 'mp') ? '清除缓存' : '退出账号',
|
||||
icon: (client_value == 'mp') ? 'cache' : 'logout',
|
||||
},
|
||||
head_nav_list: [
|
||||
{ name: "订单总数", url: "user-order", count: 0 },
|
||||
{ name: "商品收藏", url: "user-favor", count: 0 },
|
||||
{ name: "我的足迹", url: "user-goods-browse", count: 0 },
|
||||
{ name: "我的积分", url: "user-integral", count: 0 },
|
||||
],
|
||||
user_order_status_list: [
|
||||
{ name: "待付款", status: 1, count: 0, url: "/pages/user-order/user-order?status=1" },
|
||||
{ name: "待发货", status: 2, count: 0, url: "/pages/user-order/user-order?status=2" },
|
||||
{ name: "待收货", status: 3, count: 0, url: "/pages/user-order/user-order?status=3" },
|
||||
{ name: "已完成", status: 4, count: 0, url: "/pages/user-order/user-order?status=4" },
|
||||
{ name: "退款/售后", status: 101, count: 0, url: "/pages/user-orderaftersale/user-orderaftersale" },
|
||||
],
|
||||
navigation_order: null,
|
||||
// 远程自定义导航
|
||||
navigation: [],
|
||||
// 基础配置
|
||||
common_app_customer_service_tel: null,
|
||||
common_user_center_notice: null,
|
||||
common_app_is_online_service: 0,
|
||||
common_app_is_head_vice_nav: 0,
|
||||
// 顶部样式配置
|
||||
top_content_style: 'background-image: url("'+static_url+'nav-top.png");'+'padding-top:'+(parseInt(app.globalData.get_system_info('statusBarHeight', 0))+5)+'px;',
|
||||
// 付款码地址
|
||||
qrcode_page_url: null,
|
||||
// 用户中心菜单展示模式
|
||||
head_nav_list: [{
|
||||
name: "订单总数",
|
||||
url: "user-order",
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: "商品收藏",
|
||||
url: "user-favor",
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: "我的足迹",
|
||||
url: "user-goods-browse",
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: "我的积分",
|
||||
url: "user-integral",
|
||||
count: 0
|
||||
},
|
||||
],
|
||||
user_order_status_list: [{
|
||||
name: "待付款",
|
||||
status: 1,
|
||||
count: 0,
|
||||
url: "/pages/user-order/user-order?status=1"
|
||||
},
|
||||
{
|
||||
name: "待发货",
|
||||
status: 2,
|
||||
count: 0,
|
||||
url: "/pages/user-order/user-order?status=2"
|
||||
},
|
||||
{
|
||||
name: "待收货",
|
||||
status: 3,
|
||||
count: 0,
|
||||
url: "/pages/user-order/user-order?status=3"
|
||||
},
|
||||
{
|
||||
name: "退款/售后",
|
||||
status: 4,
|
||||
count: 0,
|
||||
url: "/pages/user-orderaftersale/user-orderaftersale"
|
||||
},
|
||||
],
|
||||
navigation_order: null,
|
||||
// 远程自定义导航
|
||||
navigation: [],
|
||||
// 基础配置
|
||||
common_app_customer_service_tel: null,
|
||||
common_user_center_notice: null,
|
||||
common_app_is_online_service: 0,
|
||||
common_app_is_head_vice_nav: 0,
|
||||
// 会员码地址
|
||||
membership_page_url: null,
|
||||
// 付款码地址
|
||||
payment_page_url: null,
|
||||
// 用户中心菜单展示模式
|
||||
nav_show_model_type: app.globalData.data.user_center_nav_show_model_type
|
||||
};
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentQuickNav,
|
||||
componentBadge,
|
||||
componentCopyright,
|
||||
componentOnlineService,
|
||||
componentUserBase
|
||||
},
|
||||
props: {},
|
||||
components: {
|
||||
componentQuickNav,
|
||||
componentBadge,
|
||||
componentCopyright,
|
||||
componentOnlineService,
|
||||
componentUserBase,
|
||||
componentNotice
|
||||
},
|
||||
props: {},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
},
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(e) {
|
||||
this.init();
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(e) {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
// 会员码及付款码入口
|
||||
var qrcode_page_url = null;
|
||||
if(app.globalData.get_config('plugins_base.wallet', null) != null) {
|
||||
qrcode_page_url = '/pages/plugins/wallet/payment-code/payment-code';
|
||||
}
|
||||
if(app.globalData.get_config('plugins_base.membershiplevelvip', null) != null) {
|
||||
qrcode_page_url = '/pages/plugins/membershiplevelvip/member-code/member-code';
|
||||
}
|
||||
this.setData({
|
||||
common_app_customer_service_tel: app.globalData.get_config('config.common_app_customer_service_tel'),
|
||||
common_user_center_notice: app.globalData.get_config('config.common_user_center_notice'),
|
||||
common_app_is_online_service: app.globalData.get_config('config.common_app_is_online_service'),
|
||||
common_app_is_head_vice_nav: app.globalData.get_config('config.common_app_is_head_vice_nav'),
|
||||
qrcode_page_url: qrcode_page_url
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
// 会员码及付款码入口
|
||||
var membership_page_url = null;
|
||||
var payment_page_url = null;
|
||||
if (app.globalData.get_config('plugins_base.wallet', null) != null) {
|
||||
payment_page_url = '/pages/plugins/wallet/payment-code/payment-code';
|
||||
}
|
||||
if (app.globalData.get_config('plugins_base.membershiplevelvip', null) != null) {
|
||||
membership_page_url = '/pages/plugins/membershiplevelvip/member-code/member-code';
|
||||
}
|
||||
this.setData({
|
||||
common_app_customer_service_tel: app.globalData.get_config('config.common_app_customer_service_tel'),
|
||||
common_user_center_notice: app.globalData.get_config('config.common_user_center_notice'),
|
||||
common_app_is_online_service: app.globalData.get_config('config.common_app_is_online_service'),
|
||||
common_app_is_head_vice_nav: app.globalData.get_config('config.common_app_is_head_vice_nav'),
|
||||
membership_page_url: membership_page_url,
|
||||
payment_page_url: payment_page_url
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.stopPullDownRefresh();
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '绑定手机号码',
|
||||
confirmText: '确认',
|
||||
cancelText: '暂不',
|
||||
success: result => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (result.confirm) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
}
|
||||
this.set_user_base(user);
|
||||
}
|
||||
});
|
||||
// 获取数据
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.stopPullDownRefresh();
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '绑定手机号码',
|
||||
confirmText: '确认',
|
||||
cancelText: '暂不',
|
||||
success: result => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (result.confirm) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login?event_callback=init"
|
||||
});
|
||||
}
|
||||
this.set_user_base(user);
|
||||
}
|
||||
});
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
} else {
|
||||
// 获取基础数据
|
||||
this.set_user_base(user);
|
||||
this.get_data();
|
||||
|
||||
// 用户头像和昵称设置提示
|
||||
if((this.$refs.user_base || null) != null) {
|
||||
this.$refs.user_base.init('user');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
} else {
|
||||
// 获取基础数据
|
||||
this.set_user_base(user);
|
||||
this.get_data();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
}
|
||||
},
|
||||
|
||||
// 设置用户基础信息
|
||||
set_user_base(user) {
|
||||
if((user.id || null) != null) {
|
||||
this.setData({user_id: user.id});
|
||||
}
|
||||
if((user.avatar || null) != null) {
|
||||
this.setData({avatar: user.avatar});
|
||||
}
|
||||
if((user.user_name_view || null) != null) {
|
||||
this.setData({nickname: user.user_name_view});
|
||||
}
|
||||
},
|
||||
// 用户头像和昵称设置提示
|
||||
if ((this.$refs.user_base || null) != null) {
|
||||
this.$refs.user_base.init('user');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.stopPullDownRefresh();
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("center", "user"),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
// 订单状态
|
||||
var temp_user_order_status_list = this.user_order_status_list;
|
||||
if ((data.user_order_status || null) != null && data.user_order_status.length > 0) {
|
||||
for (var i in temp_user_order_status_list) {
|
||||
for (var t in data.user_order_status) {
|
||||
if (temp_user_order_status_list[i]['status'] == data.user_order_status[t]['status']) {
|
||||
temp_user_order_status_list[i]['count'] = data.user_order_status[t]['count'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
}
|
||||
},
|
||||
|
||||
// 头部导航总数
|
||||
var temp_head_nav_list = this.head_nav_list;
|
||||
temp_head_nav_list[0]['count'] = (data.user_order_count || 0) == 0 ? 0 : data.user_order_count;
|
||||
temp_head_nav_list[1]['count'] = (data.user_goods_favor_count || 0) == 0 ? 0 : data.user_goods_favor_count;
|
||||
temp_head_nav_list[2]['count'] = (data.user_goods_browse_count || 0) == 0 ? 0 : data.user_goods_browse_count;
|
||||
temp_head_nav_list[3]['count'] = (data.integral || 0) == 0 ? 0 : data.integral;
|
||||
// 设置用户基础信息
|
||||
set_user_base(user) {
|
||||
if ((user.id || null) != null) {
|
||||
this.setData({
|
||||
user_id: user.number_code
|
||||
});
|
||||
}
|
||||
if ((user.avatar || null) != null) {
|
||||
this.setData({
|
||||
avatar: user.avatar
|
||||
});
|
||||
}
|
||||
if ((user.user_name_view || null) != null) {
|
||||
this.setData({
|
||||
nickname: user.user_name_view
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 数据设置
|
||||
var upd_data = {
|
||||
user_order_status_list: temp_user_order_status_list,
|
||||
message_total: parseInt(data.message_total || 0),
|
||||
head_nav_list: temp_head_nav_list,
|
||||
navigation: data.navigation || []
|
||||
}
|
||||
// 是否存在配置订单导航
|
||||
var temp_nav_order = null;
|
||||
if(upd_data.navigation.length > 0) {
|
||||
for(var i in upd_data.navigation) {
|
||||
var url = app.globalData.get_url_main_part(upd_data.navigation[i]['event_value']);
|
||||
if(url == '/pages/user-order/user-order') {
|
||||
temp_nav_order = upd_data.navigation[i];
|
||||
upd_data.navigation.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
upd_data['navigation_order'] = temp_nav_order;
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("center", "user"),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
// 订单状态
|
||||
var temp_user_order_status_list = this.user_order_status_list;
|
||||
if ((data.user_order_status || null) != null && data.user_order_status.length > 0) {
|
||||
for (var i in temp_user_order_status_list) {
|
||||
for (var t in data.user_order_status) {
|
||||
if (temp_user_order_status_list[i]['status'] == data.user_order_status[t]['status']) {
|
||||
temp_user_order_status_list[i]['count'] = data.user_order_status[t]['count'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 用户基础信息处理
|
||||
if((data.avatar || null) != null) {
|
||||
upd_data['avatar'] = data.avatar;
|
||||
}
|
||||
if((data.user_name_view || null) != null) {
|
||||
upd_data['nickname'] = data.user_name_view;
|
||||
}
|
||||
this.setData(upd_data);
|
||||
// 头部导航总数
|
||||
var temp_head_nav_list = this.head_nav_list;
|
||||
temp_head_nav_list[0]['count'] = (data.user_order_count || 0) == 0 ? 0 : data.user_order_count;
|
||||
temp_head_nav_list[1]['count'] = (data.user_goods_favor_count || 0) == 0 ? 0 : data.user_goods_favor_count;
|
||||
temp_head_nav_list[2]['count'] = (data.user_goods_browse_count || 0) == 0 ? 0 : data.user_goods_browse_count;
|
||||
temp_head_nav_list[3]['count'] = (data.integral || 0) == 0 ? 0 : data.integral;
|
||||
|
||||
// 导航购物车处理
|
||||
var cart_total = data.cart_total.buy_number || 0;
|
||||
if (cart_total <= 0) {
|
||||
app.globalData.set_tab_bar_badge(2, 0);
|
||||
} else {
|
||||
app.globalData.set_tab_bar_badge(2, 1, cart_total);
|
||||
}
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
// 分享菜单处理、延时执行,确保基础数据已加载完成
|
||||
setTimeout(function() {
|
||||
app.globalData.page_share_handle();
|
||||
}, 3000);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 数据设置
|
||||
var upd_data = {
|
||||
user_order_status_list: temp_user_order_status_list,
|
||||
message_total: parseInt(data.message_total || 0),
|
||||
head_nav_list: temp_head_nav_list,
|
||||
navigation: data.navigation || []
|
||||
}
|
||||
// 是否存在配置订单导航
|
||||
var temp_nav_order = null;
|
||||
if (upd_data.navigation.length > 0) {
|
||||
for (var i in upd_data.navigation) {
|
||||
var url = app.globalData.get_url_main_part(upd_data.navigation[i]['event_value']);
|
||||
if (url == '/pages/user-order/user-order') {
|
||||
temp_nav_order = upd_data.navigation[i];
|
||||
upd_data.navigation.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
upd_data['navigation_order'] = temp_nav_order;
|
||||
|
||||
// 清除缓存
|
||||
remove_user_cache_event(e) {
|
||||
app.globalData.remove_user_cache_event();
|
||||
},
|
||||
// 用户基础信息处理
|
||||
if ((data.avatar || null) != null) {
|
||||
upd_data['avatar'] = data.avatar;
|
||||
}
|
||||
if ((data.user_name_view || null) != null) {
|
||||
upd_data['nickname'] = data.user_name_view;
|
||||
}
|
||||
this.setData(upd_data);
|
||||
|
||||
// 客服电话
|
||||
call_event() {
|
||||
if (this.common_app_customer_service_tel == null) {
|
||||
app.globalData.showToast('客服电话有误');
|
||||
} else {
|
||||
app.globalData.call_tel(this.common_app_customer_service_tel);
|
||||
}
|
||||
},
|
||||
// 导航购物车处理
|
||||
var cart_total = data.cart_total.buy_number || 0;
|
||||
if (cart_total <= 0) {
|
||||
app.globalData.set_tab_bar_badge(2, 0);
|
||||
} else {
|
||||
app.globalData.set_tab_bar_badge(2, 1, cart_total);
|
||||
}
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
|
||||
// 头像查看
|
||||
preview_event() {
|
||||
if (app.globalData.data.default_user_head_src != this.avatar) {
|
||||
uni.previewImage({
|
||||
current: this.avatar,
|
||||
urls: [this.avatar]
|
||||
});
|
||||
}
|
||||
},
|
||||
// 分享菜单处理、延时执行,确保基础数据已加载完成
|
||||
setTimeout(function() {
|
||||
app.globalData.page_share_handle();
|
||||
}, 3000);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 头像加载错误
|
||||
user_avatar_error(e) {
|
||||
this.setData({
|
||||
avatar: app.globalData.data.default_user_head_src
|
||||
});
|
||||
},
|
||||
// 清除缓存
|
||||
remove_user_cache_event(e) {
|
||||
app.globalData.remove_user_cache_event();
|
||||
},
|
||||
|
||||
// 远程自定义导航事件
|
||||
navigation_event(e) {
|
||||
app.globalData.operation_event(e);
|
||||
},
|
||||
// 客服电话
|
||||
call_event() {
|
||||
if (this.common_app_customer_service_tel == null) {
|
||||
app.globalData.showToast('客服电话有误');
|
||||
} else {
|
||||
app.globalData.call_tel(this.common_app_customer_service_tel);
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 数据展示类型
|
||||
nav_show_type_event(e) {
|
||||
this.setData({nav_show_model_type: this.nav_show_model_type == 0 ? 1 : 0});
|
||||
}
|
||||
}
|
||||
};
|
||||
// 头像加载错误
|
||||
user_avatar_error(e) {
|
||||
this.setData({
|
||||
avatar: app.globalData.data.default_user_head_src
|
||||
});
|
||||
},
|
||||
|
||||
// 远程自定义导航事件
|
||||
navigation_event(e) {
|
||||
app.globalData.operation_event(e);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 数据展示类型
|
||||
nav_show_type_event(e) {
|
||||
this.setData({
|
||||
nav_show_model_type: this.nav_show_model_type == 0 ? 1 : 0
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './user.css';
|
||||
@import './user.css';
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Loading…
Reference in New Issue