mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-07-07 06:15:24 +08:00
1.我的—会员码点击区域优化
This commit is contained in:
2
App.vue
2
App.vue
@ -1731,7 +1731,7 @@
|
||||
// 蓝色 blue #1677ff
|
||||
// 棕色 brown #8B4513
|
||||
// 紫色 purple #623cec
|
||||
var default_theme = 'blue';
|
||||
var default_theme = 'purple';
|
||||
return uni.getStorageSync('theme') || default_theme;
|
||||
},
|
||||
// 设置主题
|
||||
|
||||
@ -670,6 +670,10 @@ button:before {
|
||||
background-color: #dddddd !important;
|
||||
}
|
||||
|
||||
.bg-grey-e {
|
||||
background-color: #eeeeee !important;
|
||||
}
|
||||
|
||||
.bg-grey-f5 {
|
||||
background-color: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
<view>
|
||||
<view class="countdown" v-if="is_show && !is_end">
|
||||
<block v-if="propMsecShow">
|
||||
<view class="time" :style="time_style">{{msec}}</view>
|
||||
<view class="ds" :style="ds_style">{{propSecondDs}}</view>
|
||||
<view class="time" :style="time_style">{{ msec }}</view>
|
||||
<view class="ds" :style="ds_style">{{ propSecondDs }}</view>
|
||||
</block>
|
||||
<view class="time" :style="time_style">{{second}}</view>
|
||||
<view class="ds" :style="ds_style">{{propMinuteDs}}</view>
|
||||
<view class="time" :style="time_style">{{minute}}</view>
|
||||
<view class="ds" :style="ds_style">{{propHourDs}}</view>
|
||||
<view class="time" :style="time_style">{{hour}}</view>
|
||||
<view class="time" :style="time_style">{{ second }}</view>
|
||||
<view class="ds" :style="ds_style">{{ propMinuteDs }}</view>
|
||||
<view class="time" :style="time_style">{{ minute }}</view>
|
||||
<view class="ds" :style="ds_style">{{ propHourDs }}</view>
|
||||
<view class="time" :style="time_style">{{ hour }}</view>
|
||||
</view>
|
||||
<view v-if="is_show && is_end" class="timer-title">{{propMsg}}</view>
|
||||
<view v-if="is_show && is_end" class="timer-title">{{ propMsg }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@ -32,90 +32,89 @@
|
||||
props: {
|
||||
propHour: {
|
||||
type: [String, Number],
|
||||
default: '00'
|
||||
default: '00',
|
||||
},
|
||||
propMinute: {
|
||||
type: [String, Number],
|
||||
default: '00'
|
||||
default: '00',
|
||||
},
|
||||
propSecond: {
|
||||
type: [String, Number],
|
||||
default: '00'
|
||||
default: '00',
|
||||
},
|
||||
propEndShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
propMsecShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
propMsg: {
|
||||
type: String,
|
||||
default: '已结束'
|
||||
default: '已结束',
|
||||
},
|
||||
propHourDs: {
|
||||
type: String,
|
||||
default: ':'
|
||||
default: ':',
|
||||
},
|
||||
propMinuteDs: {
|
||||
type: String,
|
||||
default: ':'
|
||||
default: ':',
|
||||
},
|
||||
propSecondDs: {
|
||||
type: String,
|
||||
default: ':'
|
||||
default: ':',
|
||||
},
|
||||
propTimePadding: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
default: 0,
|
||||
},
|
||||
propTimeSize: {
|
||||
type: [Number, String],
|
||||
default: 24
|
||||
default: 24,
|
||||
},
|
||||
propTimeBackgroundColor: {
|
||||
type: String,
|
||||
default: 'linear-gradient(180deg, #FF601B 0%, #FE1B33 100%);'
|
||||
default: 'linear-gradient(180deg, #FF601B 0%, #FE1B33 100%);',
|
||||
},
|
||||
propTimeColor: {
|
||||
type: String,
|
||||
default: '#FFF'
|
||||
default: '#FFF',
|
||||
},
|
||||
propTimeWeight: {
|
||||
type: [Number, String],
|
||||
default: '400'
|
||||
default: '400',
|
||||
},
|
||||
propDsColor: {
|
||||
type: String,
|
||||
default: '#4B5459'
|
||||
default: '#4B5459',
|
||||
},
|
||||
propDsSize: {
|
||||
type: [Number, String],
|
||||
default: 24
|
||||
default: 24,
|
||||
},
|
||||
propDsWeight: {
|
||||
type: [Number, String],
|
||||
default: '400'
|
||||
}
|
||||
default: '400',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
time_style() {
|
||||
return 'padding: 0 ' + this.propTimePadding + 'rpx;background-color:' + this.propTimeBackgroundColor + ';color:' + this.propTimeColor + ';font-size:' + this.propTimeSize +
|
||||
'rpx;font-weight:' + this.propTimeWeight
|
||||
return 'padding: 0 ' + this.propTimePadding + 'rpx;background:' + this.propTimeBackgroundColor + ';color:' + this.propTimeColor + ';font-size:' + this.propTimeSize + 'rpx;font-weight:' + this.propTimeWeight;
|
||||
},
|
||||
ds_style() {
|
||||
return 'color:' + this.propDsColor + ';font-size:' + this.propDsSize + 'rpx;font-weight:' + this.propDsWeight
|
||||
}
|
||||
return 'color:' + this.propDsColor + ';font-size:' + this.propDsSize + 'rpx;font-weight:' + this.propDsWeight;
|
||||
},
|
||||
},
|
||||
created: function(e) {
|
||||
created: function (e) {
|
||||
// 参数处理
|
||||
this.hour = this.propHour;
|
||||
this.minute = this.propMinute;
|
||||
this.second = this.propSecond;
|
||||
|
||||
// 定时处理
|
||||
this.countdown()
|
||||
this.countdown();
|
||||
},
|
||||
// #ifndef VUE2
|
||||
destroyed() {
|
||||
@ -141,7 +140,7 @@
|
||||
var hour = parseInt(self.hour);
|
||||
var minute = parseInt(self.minute);
|
||||
var second = parseInt(self.second);
|
||||
self.timer = setInterval(function() {
|
||||
self.timer = setInterval(function () {
|
||||
if (second <= 0) {
|
||||
if (minute > 0) {
|
||||
minute--;
|
||||
@ -173,7 +172,7 @@
|
||||
|
||||
// 毫秒
|
||||
var count = 0;
|
||||
self.timers = setInterval(function() {
|
||||
self.timers = setInterval(function () {
|
||||
count++;
|
||||
self.msec = count;
|
||||
if (count > 9) {
|
||||
@ -183,11 +182,11 @@
|
||||
clearInterval(self.timers);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.countdown {
|
||||
line-height: 38rpx;
|
||||
}
|
||||
@ -211,7 +210,7 @@
|
||||
}
|
||||
|
||||
.countdown .ds {
|
||||
color: #4B5459;
|
||||
color: #4b5459;
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -25,12 +25,14 @@
|
||||
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
|
||||
<text class="sales-price va-m">{{ item[propPriceField] }}</text>
|
||||
</view>
|
||||
<view v-if="(item.is_error || 0) == 0 && is_show_cart" class="bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<iconfont name="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>
|
||||
<block v-if="(item.is_error || 0) == 0 && is_show_cart">
|
||||
<view v-if="propOpenCart" class="bg-white right-cart-icon 123" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<iconfont name="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>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -88,12 +90,14 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view v-if="(item.is_error || 0) == 0 && is_show_cart" class="bg-white pr" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<iconfont name="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>
|
||||
<block v-if="(item.is_error || 0) == 0 && is_show_cart">
|
||||
<view v-if="propOpenCart" class="bg-white pr" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<iconfont name="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>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@ -141,12 +145,15 @@
|
||||
<text class="sales-price va-m text-size-xss va-b">{{ propCurrencySymbol }}</text>
|
||||
<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">
|
||||
<iconfont name="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>
|
||||
|
||||
<block v-if="(item.is_error || 0) == 0 && is_show_cart">
|
||||
<view v-if="propOpenCart" class="pa bg-white right-cart-icon" :data-index="index" @tap.stop="goods_cart_event">
|
||||
<iconfont name="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>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -279,6 +286,11 @@
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 是否开启购物车按钮 ------ 滚动使用
|
||||
propOpenCart: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
||||
@ -3,38 +3,38 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: "",
|
||||
export default {
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: '28rpx',
|
||||
},
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "28rpx",
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* iconfont.css全局注册需要将src切换成绝对路径 */
|
||||
/* @/static/icon/ */
|
||||
@import url("@/static/icon/iconfont.css");
|
||||
/* @import url("https://at.alicdn.com/t/c/font_4227145_oenqrj26mug.css"); */
|
||||
/* iconfont.css全局注册需要将src切换成绝对路径 */
|
||||
/* @/static/icon/ */
|
||||
/* @import url("@/static/icon/iconfont.css"); */
|
||||
@import url('https://at.alicdn.com/t/c/font_4227145_ezq1taohcms.css');
|
||||
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
overflow: hidden;
|
||||
/* 因icon大小被设置为和字体大小一致,而span等标签的下边缘会和字体的基线对齐,故需设置一个往下的偏移比例,来纠正视觉上的未对齐效果 */
|
||||
vertical-align: -0.15em;
|
||||
outline: none;
|
||||
/* 定义元素的颜色,currentColor是一个变量,这个变量的值就表示当前元素的color值,如果当前元素未设置color值,则从父元素继承 */
|
||||
fill: currentcolor;
|
||||
}
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
overflow: hidden;
|
||||
/* 因icon大小被设置为和字体大小一致,而span等标签的下边缘会和字体的基线对齐,故需设置一个往下的偏移比例,来纠正视觉上的未对齐效果 */
|
||||
vertical-align: -0.15em;
|
||||
outline: none;
|
||||
/* 定义元素的颜色,currentColor是一个变量,这个变量的值就表示当前元素的color值,如果当前元素未设置color值,则从父元素继承 */
|
||||
fill: currentcolor;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<view :class="(plugins_mourning_data_is_app ? ' grayscale' : '') + (is_single_page == 1 ? ' single-page-top' : '')">
|
||||
<!-- 顶部内容 -->
|
||||
<view v-if="load_status == 1" class="home-top-nav-content" :style="banner_list.length > 0 ? slider_bg : top_content_style">
|
||||
<image class="wh-auto pa top-0 left-0 right-0" mode="widthFix" :src="static_url + 'nav-top.png'"></image>
|
||||
<!-- logo/标题 -->
|
||||
<!-- #ifndef MP-TOUTIAO -->
|
||||
<view class="home-top-nav-logo">
|
||||
@ -17,7 +18,7 @@
|
||||
|
||||
<!-- 搜索 -->
|
||||
<view v-if="search_is_fixed == 1" class="search-fixed-seat"></view>
|
||||
<view v-if="load_status == 1" :class="'pr ' + (search_is_fixed == 1 ? 'search-content-fixed bg-main' : '')" :style="search_is_fixed == 1 ? top_content_style : ''">
|
||||
<view v-if="load_status == 1" :class="'pr ' + (search_is_fixed == 1 ? 'search-content-fixed' : '')" :style="search_is_fixed == 1 ? top_content_title_style : ''">
|
||||
<view v-if="common_app_is_enable_search == 1" :style="search_style">
|
||||
<view class="margin-horizontal-main">
|
||||
<component-search propPlaceholder="输入商品名称搜索" :propIsBtn="true" propBgColor="#fff"></component-search>
|
||||
@ -44,7 +45,7 @@
|
||||
<component-banner :propData="banner_list" @changeBanner="changeBanner"></component-banner>
|
||||
</view>
|
||||
<!-- 导航 -->
|
||||
<view v-if="navigation.length > 0">
|
||||
<view v-if="navigation.length > 0" class="spacing-mt">
|
||||
<view class="padding-horizontal-main">
|
||||
<view class="bg-white border-radius-main">
|
||||
<component-icon-nav :propData="navigation"></component-icon-nav>
|
||||
@ -97,7 +98,7 @@
|
||||
</view>
|
||||
<navigator url="/pages/plugins/seckill/index/index" hover-class="none" class="arrow-right padding-right cr-grey text-size-xs">更多</navigator>
|
||||
</view>
|
||||
<component-goods-list :propData="{ style_type: 2, goods_list: plugins_seckill_data.data.goods }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true" propSource="index"></component-goods-list>
|
||||
<component-goods-list :propData="{ style_type: 2, goods_list: plugins_seckill_data.data.goods }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true" propSource="index" :prop-open-cart="false"></component-goods-list>
|
||||
</view>
|
||||
|
||||
<!-- 活动配置-楼层顶部 - 插件 -->
|
||||
@ -192,7 +193,7 @@
|
||||
<view v-if="pv.plugins == 'salerecords' && (plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0" 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 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>
|
||||
@ -273,341 +274,352 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentIconNav from "../../components/icon-nav/icon-nav";
|
||||
import componentBanner from "../../components/slider/slider";
|
||||
import componentCountdown from "../../components/countdown/countdown";
|
||||
import componentLayout from "../../components/layout/layout";
|
||||
import componentBadge from "../../components/badge/badge";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
import componentCopyright from "../../components/copyright/copyright";
|
||||
import componentOnlineService from "../../components/online-service/online-service";
|
||||
import componentActivityList from "../../components/activity-list/activity-list";
|
||||
import componentBlogList from "../../components/blog-list/blog-list";
|
||||
import componentRealstoreList from "../../components/realstore-list/realstore-list";
|
||||
import componentShopList from "../../components/shop-list/shop-list";
|
||||
import componentGoodsList from "../../components/goods-list/goods-list";
|
||||
import componentUserBase from "../../components/user-base/user-base";
|
||||
import componentBindingList from "../../components/binding-list/binding-list";
|
||||
import componentRecommedHot from "@/components/recommend-hot/recommend-hot";
|
||||
const app = getApp();
|
||||
import componentSearch from '../../components/search/search';
|
||||
import componentQuickNav from '../../components/quick-nav/quick-nav';
|
||||
import componentIconNav from '../../components/icon-nav/icon-nav';
|
||||
import componentBanner from '../../components/slider/slider';
|
||||
import componentCountdown from '../../components/countdown/countdown';
|
||||
import componentLayout from '../../components/layout/layout';
|
||||
import componentBadge from '../../components/badge/badge';
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
import componentBottomLine from '../../components/bottom-line/bottom-line';
|
||||
import componentCopyright from '../../components/copyright/copyright';
|
||||
import componentOnlineService from '../../components/online-service/online-service';
|
||||
import componentActivityList from '../../components/activity-list/activity-list';
|
||||
import componentBlogList from '../../components/blog-list/blog-list';
|
||||
import componentRealstoreList from '../../components/realstore-list/realstore-list';
|
||||
import componentShopList from '../../components/shop-list/shop-list';
|
||||
import componentGoodsList from '../../components/goods-list/goods-list';
|
||||
import componentUserBase from '../../components/user-base/user-base';
|
||||
import componentBindingList from '../../components/binding-list/binding-list';
|
||||
import componentRecommedHot from '@/components/recommend-hot/recommend-hot';
|
||||
|
||||
var common_static_url = app.globalData.get_static_url("common");
|
||||
var static_url = app.globalData.get_static_url("home");
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info("statusBarHeight", 0, true));
|
||||
// #ifdef MP-TOUTIAO
|
||||
bar_height = 0;
|
||||
// #endif
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
var static_url = app.globalData.get_static_url('home');
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
|
||||
// #ifdef MP-TOUTIAO
|
||||
bar_height = 0;
|
||||
// #endif
|
||||
let theme_color = app.globalData.get_theme_color();
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
static_url: static_url,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
load_status: 0,
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
data_list: [],
|
||||
banner_list: [],
|
||||
navigation: [],
|
||||
article_list: [],
|
||||
cart_total: 0,
|
||||
message_total: 0,
|
||||
right_icon_list: [],
|
||||
// 基础配置
|
||||
common_shop_notice: null,
|
||||
home_index_floor_data_type: 0,
|
||||
common_app_is_enable_search: 0,
|
||||
common_app_is_enable_answer: 0,
|
||||
common_app_is_header_nav_fixed: 0,
|
||||
common_app_is_online_service: 0,
|
||||
// 名称
|
||||
application_title: app.globalData.data.application_title,
|
||||
application_logo: app.globalData.data.application_logo,
|
||||
is_logo_use_text: app.globalData.data.is_logo_use_text || 0,
|
||||
// 顶部+搜索样式配置
|
||||
top_content_style: 'background-image: url("' + static_url + 'nav-top.png");' + "padding-top:" + (bar_height + 8) + "px;",
|
||||
search_style: "",
|
||||
search_is_fixed: 0,
|
||||
// 是否单页预览
|
||||
is_single_page: app.globalData.is_current_single_page() || 0,
|
||||
// 轮播滚动时,背景色替换
|
||||
slider_bg: null,
|
||||
// 插件顺序列表
|
||||
plugins_sort_list: [],
|
||||
// 限时秒杀插件
|
||||
plugins_seckill_data: null,
|
||||
// 购买记录插件
|
||||
plugins_salerecords_data: null,
|
||||
// 活动配置插件
|
||||
plugins_activity_data: null,
|
||||
// 标签插件
|
||||
plugins_label_data: null,
|
||||
// 首页中间广告插件
|
||||
plugins_homemiddleadv_data: null,
|
||||
// 弹屏广告、这里设置一天后可以再次显示
|
||||
plugins_popupscreen_data: null,
|
||||
plugins_popupscreen_status: 0,
|
||||
plugins_popupscreen_cache_key: "plugins_popupscreen_cache_key",
|
||||
plugins_popupscreen_timer: null,
|
||||
// 哀悼灰度插件
|
||||
plugins_mourning_data_is_app: app.globalData.is_app_mourning(),
|
||||
// 标签插件
|
||||
plugins_blog_data: null,
|
||||
// 门店插件
|
||||
plugins_realstore_data: null,
|
||||
// 多商户插件
|
||||
plugins_shop_data: null,
|
||||
// 组合搭配插件
|
||||
plugins_binding_data: null,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentSearch,
|
||||
componentQuickNav,
|
||||
componentIconNav,
|
||||
componentBanner,
|
||||
componentCountdown,
|
||||
componentLayout,
|
||||
componentBadge,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentCopyright,
|
||||
componentOnlineService,
|
||||
componentActivityList,
|
||||
componentBlogList,
|
||||
componentRealstoreList,
|
||||
componentShopList,
|
||||
componentGoodsList,
|
||||
componentUserBase,
|
||||
componentBindingList,
|
||||
componentRecommedHot,
|
||||
},
|
||||
props: {},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 用户头像和昵称设置提示
|
||||
if ((this.$refs.user_base || null) != null) {
|
||||
this.$refs.user_base.init("index");
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
currency_symbol: app.globalData.get_config("currency_symbol"),
|
||||
common_shop_notice: app.globalData.get_config("config.common_shop_notice"),
|
||||
home_index_floor_data_type: app.globalData.get_config("config.home_index_floor_data_type"),
|
||||
common_app_is_enable_search: app.globalData.get_config("config.common_app_is_enable_search"),
|
||||
common_app_is_enable_answer: app.globalData.get_config("config.common_app_is_enable_answer"),
|
||||
common_app_is_header_nav_fixed: app.globalData.get_config("config.common_app_is_header_nav_fixed"),
|
||||
common_app_is_online_service: app.globalData.get_config("config.common_app_is_online_service"),
|
||||
application_title: app.globalData.get_application_title(),
|
||||
application_logo: app.globalData.get_application_logo(),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, "init_config");
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init() {
|
||||
this.setData({
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
common_static_url: common_static_url,
|
||||
static_url: static_url,
|
||||
theme_color: theme_color,
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "index"),
|
||||
method: "POST",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
// 获取最新缓存
|
||||
if (this.load_status == 0) {
|
||||
this.init_config(true);
|
||||
}
|
||||
|
||||
// 设置首次加载状态
|
||||
this.setData({
|
||||
load_status: 1,
|
||||
});
|
||||
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_bottom_line_status: true,
|
||||
banner_list: data.banner_list || [],
|
||||
navigation: data.navigation || [],
|
||||
article_list: data.article_list || [],
|
||||
data_list: data.data_list,
|
||||
cart_total: data.cart_total.buy_number || 0,
|
||||
message_total: parseInt(data.message_total || 0),
|
||||
right_icon_list: data.right_icon_list || [],
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
plugins_sort_list: data.plugins_sort_list || [],
|
||||
plugins_seckill_data: data.plugins_seckill_data || null,
|
||||
plugins_salerecords_data: (data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0 ? null : data.plugins_salerecords_data,
|
||||
plugins_activity_data: (data.plugins_activity_data || null) == null || data.plugins_activity_data.length <= 0 ? null : data.plugins_activity_data,
|
||||
plugins_label_data: (data.plugins_label_data || null) == null || (data.plugins_label_data.base || null) == null || (data.plugins_label_data.data || null) == null || data.plugins_label_data.data.length <= 0 ? null : data.plugins_label_data,
|
||||
plugins_homemiddleadv_data: (data.plugins_homemiddleadv_data || null) == null || data.plugins_homemiddleadv_data.length <= 0 ? null : data.plugins_homemiddleadv_data,
|
||||
plugins_popupscreen_data: data.plugins_popupscreen_data || null,
|
||||
plugins_mourning_data_is_app: parseInt(data.plugins_mourning_data || 0) == 1,
|
||||
plugins_blog_data: data.plugins_blog_data || null,
|
||||
plugins_realstore_data: data.plugins_realstore_data || null,
|
||||
plugins_shop_data: data.plugins_shop_data || null,
|
||||
plugins_binding_data: data.plugins_binding_data || null,
|
||||
});
|
||||
// 轮播数据处理
|
||||
if (data.banner_list && data.banner_list.length > 0) {
|
||||
this.slider_bg = "background: linear-gradient(180deg, " + data.banner_list[0].bg_color + " 0%, #f5f5f5 80%);padding-top:" + (bar_height + 8) + "px;";
|
||||
}
|
||||
|
||||
// 弹屏广告插件处理
|
||||
this.plugins_popupscreen_handle();
|
||||
|
||||
// 导航购物车处理
|
||||
if (this.cart_total <= 0) {
|
||||
app.globalData.set_tab_bar_badge(2, 0);
|
||||
} else {
|
||||
app.globalData.set_tab_bar_badge(2, 1, this.cart_total);
|
||||
}
|
||||
|
||||
// 搜索框宽度处理
|
||||
// #ifdef MP-TOUTIAO
|
||||
var len = (this.right_icon_list || []).length;
|
||||
var val = len <= 0 ? 0 : 66 * len;
|
||||
this.setData({
|
||||
search_style: "width: calc(100% - " + val + "rpx);",
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
|
||||
// 分享菜单处理、延时执行,确保基础数据已加载完成
|
||||
setTimeout(function () {
|
||||
app.globalData.page_share_handle();
|
||||
}, 3000);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: "服务器请求出错",
|
||||
data_bottom_line_status: true,
|
||||
load_status: 1,
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
if (this.common_app_is_header_nav_fixed == 1 && this.common_app_is_enable_search == 1) {
|
||||
var top = e.scrollTop > 35 ? 35 : e.scrollTop;
|
||||
var num = top * 7;
|
||||
var base = 230;
|
||||
// #ifdef MP-ALIPAY
|
||||
base = 235;
|
||||
// #endif
|
||||
// #ifdef H5 || MP-TOUTIAO || APP
|
||||
var len = (this.right_icon_list || []).length;
|
||||
base = len <= 0 ? 0 : 66 * len;
|
||||
// #endif
|
||||
// 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效
|
||||
if (!this.plugins_mourning_data_is_app) {
|
||||
var top_val = 35;
|
||||
var val = num > base ? base : num;
|
||||
// #ifdef MP-TOUTIAO
|
||||
top_val = 0;
|
||||
val = base;
|
||||
// #endif
|
||||
this.setData({
|
||||
search_style: "width: calc(100% - " + (val < 0 ? 0 : val) + "rpx);",
|
||||
search_is_fixed: top >= top_val ? 1 : 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 弹屏广告插件处理
|
||||
plugins_popupscreen_handle() {
|
||||
if (this.plugins_popupscreen_data != null) {
|
||||
// 不存在关闭缓存或者超过间隔时间则显示
|
||||
var cv = parseInt(uni.getStorageSync(this.plugins_popupscreen_cache_key)) || 0;
|
||||
var pv = parseInt(this.plugins_popupscreen_data.interval_time) || 86400;
|
||||
if (cv == 0 || cv + pv < app.globalData.get_timestamp()) {
|
||||
// 是否开启自动关闭
|
||||
var timer = null;
|
||||
var ct = parseInt(this.plugins_popupscreen_data.close_time) || 0;
|
||||
if (ct > 0) {
|
||||
var self = this;
|
||||
timer = setTimeout(function () {
|
||||
self.setData({
|
||||
plugins_popupscreen_status: 0,
|
||||
});
|
||||
uni.setStorage({
|
||||
key: self.plugins_popupscreen_cache_key,
|
||||
data: app.globalData.get_timestamp(),
|
||||
});
|
||||
}, ct * 1000);
|
||||
}
|
||||
this.setData({
|
||||
plugins_popupscreen_status: 1,
|
||||
plugins_popupscreen_timer: timer,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 弹屏广告 - 插件 关闭事件
|
||||
plugins_popupscreen_close_event(e) {
|
||||
this.setData({
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
load_status: 0,
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
data_list: [],
|
||||
banner_list: [],
|
||||
navigation: [],
|
||||
article_list: [],
|
||||
cart_total: 0,
|
||||
message_total: 0,
|
||||
right_icon_list: [],
|
||||
// 基础配置
|
||||
common_shop_notice: null,
|
||||
home_index_floor_data_type: 0,
|
||||
common_app_is_enable_search: 0,
|
||||
common_app_is_enable_answer: 0,
|
||||
common_app_is_header_nav_fixed: 0,
|
||||
common_app_is_online_service: 0,
|
||||
// 名称
|
||||
application_title: app.globalData.data.application_title,
|
||||
application_logo: app.globalData.data.application_logo,
|
||||
is_logo_use_text: app.globalData.data.is_logo_use_text || 0,
|
||||
// 顶部+搜索样式配置
|
||||
top_content_style: 'padding-top:' + (bar_height + 8) + 'px;background:linear-gradient(180deg, ' + theme_color + ' 0%, #f5f5f5 80%)',
|
||||
top_content_title_style: 'background-image: url("' + static_url + 'nav-top.png");' + 'padding-top:' + (bar_height + 8) + 'px;background-color:' + theme_color,
|
||||
search_style: '',
|
||||
search_is_fixed: 0,
|
||||
// 是否单页预览
|
||||
is_single_page: app.globalData.is_current_single_page() || 0,
|
||||
// 轮播滚动时,背景色替换
|
||||
slider_bg: null,
|
||||
// 插件顺序列表
|
||||
plugins_sort_list: [],
|
||||
// 限时秒杀插件
|
||||
plugins_seckill_data: null,
|
||||
// 购买记录插件
|
||||
plugins_salerecords_data: null,
|
||||
// 活动配置插件
|
||||
plugins_activity_data: null,
|
||||
// 标签插件
|
||||
plugins_label_data: null,
|
||||
// 首页中间广告插件
|
||||
plugins_homemiddleadv_data: null,
|
||||
// 弹屏广告、这里设置一天后可以再次显示
|
||||
plugins_popupscreen_data: null,
|
||||
plugins_popupscreen_status: 0,
|
||||
});
|
||||
uni.setStorage({
|
||||
key: this.plugins_popupscreen_cache_key,
|
||||
data: app.globalData.get_timestamp(),
|
||||
});
|
||||
clearInterval(this.plugins_popupscreen_timer);
|
||||
plugins_popupscreen_cache_key: 'plugins_popupscreen_cache_key',
|
||||
plugins_popupscreen_timer: null,
|
||||
// 哀悼灰度插件
|
||||
plugins_mourning_data_is_app: app.globalData.is_app_mourning(),
|
||||
// 标签插件
|
||||
plugins_blog_data: null,
|
||||
// 门店插件
|
||||
plugins_realstore_data: null,
|
||||
// 多商户插件
|
||||
plugins_shop_data: null,
|
||||
// 组合搭配插件
|
||||
plugins_binding_data: null,
|
||||
};
|
||||
},
|
||||
// 轮播改变
|
||||
changeBanner(color) {
|
||||
this.slider_bg = "background: linear-gradient(180deg," + color + " 0%, #f5f5f5 80%);padding-top:" + (bar_height + 8) + "px;";
|
||||
|
||||
components: {
|
||||
componentSearch,
|
||||
componentQuickNav,
|
||||
componentIconNav,
|
||||
componentBanner,
|
||||
componentCountdown,
|
||||
componentLayout,
|
||||
componentBadge,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentCopyright,
|
||||
componentOnlineService,
|
||||
componentActivityList,
|
||||
componentBlogList,
|
||||
componentRealstoreList,
|
||||
componentShopList,
|
||||
componentGoodsList,
|
||||
componentUserBase,
|
||||
componentBindingList,
|
||||
componentRecommedHot,
|
||||
},
|
||||
},
|
||||
};
|
||||
props: {},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 用户头像和昵称设置提示
|
||||
if ((this.$refs.user_base || null) != null) {
|
||||
this.$refs.user_base.init('index');
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
currency_symbol: app.globalData.get_config('currency_symbol'),
|
||||
common_shop_notice: app.globalData.get_config('config.common_shop_notice'),
|
||||
home_index_floor_data_type: app.globalData.get_config('config.home_index_floor_data_type'),
|
||||
common_app_is_enable_search: app.globalData.get_config('config.common_app_is_enable_search'),
|
||||
common_app_is_enable_answer: app.globalData.get_config('config.common_app_is_enable_answer'),
|
||||
common_app_is_header_nav_fixed: app.globalData.get_config('config.common_app_is_header_nav_fixed'),
|
||||
common_app_is_online_service: app.globalData.get_config('config.common_app_is_online_service'),
|
||||
application_title: app.globalData.get_application_title(),
|
||||
application_logo: app.globalData.get_application_logo(),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'index'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
// 获取最新缓存
|
||||
if (this.load_status == 0) {
|
||||
this.init_config(true);
|
||||
}
|
||||
|
||||
// 设置首次加载状态
|
||||
this.setData({
|
||||
load_status: 1,
|
||||
});
|
||||
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_bottom_line_status: true,
|
||||
banner_list: data.banner_list || [],
|
||||
navigation: data.navigation || [],
|
||||
article_list: data.article_list || [],
|
||||
data_list: data.data_list,
|
||||
cart_total: data.cart_total.buy_number || 0,
|
||||
message_total: parseInt(data.message_total || 0),
|
||||
right_icon_list: data.right_icon_list || [],
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
plugins_sort_list: data.plugins_sort_list || [],
|
||||
plugins_seckill_data: data.plugins_seckill_data || null,
|
||||
plugins_salerecords_data: (data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0 ? null : data.plugins_salerecords_data,
|
||||
plugins_activity_data: (data.plugins_activity_data || null) == null || data.plugins_activity_data.length <= 0 ? null : data.plugins_activity_data,
|
||||
plugins_label_data: (data.plugins_label_data || null) == null || (data.plugins_label_data.base || null) == null || (data.plugins_label_data.data || null) == null || data.plugins_label_data.data.length <= 0 ? null : data.plugins_label_data,
|
||||
plugins_homemiddleadv_data: (data.plugins_homemiddleadv_data || null) == null || data.plugins_homemiddleadv_data.length <= 0 ? null : data.plugins_homemiddleadv_data,
|
||||
plugins_popupscreen_data: data.plugins_popupscreen_data || null,
|
||||
plugins_mourning_data_is_app: parseInt(data.plugins_mourning_data || 0) == 1,
|
||||
plugins_blog_data: data.plugins_blog_data || null,
|
||||
plugins_realstore_data: data.plugins_realstore_data || null,
|
||||
plugins_shop_data: data.plugins_shop_data || null,
|
||||
plugins_binding_data: data.plugins_binding_data || null,
|
||||
});
|
||||
// 轮播数据处理
|
||||
if (data.banner_list && data.banner_list.length > 0) {
|
||||
if (data.banner_list[0].bg_color) {
|
||||
this.slider_bg = 'background: linear-gradient(180deg, ' + data.banner_list[0].bg_color + ' 0%, #f5f5f5 80%);padding-top:' + (bar_height + 8) + 'px;';
|
||||
} else {
|
||||
this.slider_bg = 'background: linear-gradient(180deg, ' + this.theme_color + ' 0%, #f5f5f5 80%);padding-top:' + (bar_height + 8) + 'px;';
|
||||
}
|
||||
}
|
||||
|
||||
// 弹屏广告插件处理
|
||||
this.plugins_popupscreen_handle();
|
||||
|
||||
// 导航购物车处理
|
||||
if (this.cart_total <= 0) {
|
||||
app.globalData.set_tab_bar_badge(2, 0);
|
||||
} else {
|
||||
app.globalData.set_tab_bar_badge(2, 1, this.cart_total);
|
||||
}
|
||||
|
||||
// 搜索框宽度处理
|
||||
// #ifdef MP-TOUTIAO
|
||||
var len = (this.right_icon_list || []).length;
|
||||
var val = len <= 0 ? 0 : 66 * len;
|
||||
this.setData({
|
||||
search_style: 'width: calc(100% - ' + val + 'rpx);',
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
|
||||
// 分享菜单处理、延时执行,确保基础数据已加载完成
|
||||
setTimeout(function () {
|
||||
app.globalData.page_share_handle();
|
||||
}, 3000);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
data_bottom_line_status: true,
|
||||
load_status: 1,
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
if (this.common_app_is_header_nav_fixed == 1 && this.common_app_is_enable_search == 1) {
|
||||
var top = e.scrollTop > 35 ? 35 : e.scrollTop;
|
||||
var num = top * 7;
|
||||
var base = 230;
|
||||
// #ifdef MP-ALIPAY
|
||||
base = 235;
|
||||
// #endif
|
||||
// #ifdef H5 || MP-TOUTIAO || APP
|
||||
var len = (this.right_icon_list || []).length;
|
||||
base = len <= 0 ? 0 : 66 * len;
|
||||
// #endif
|
||||
// 开启哀悼插件的时候不需要浮动导航并且搜索框也不需要缩短、开启站点灰度会导致浮动失效
|
||||
if (!this.plugins_mourning_data_is_app) {
|
||||
var top_val = 35;
|
||||
var val = num > base ? base : num;
|
||||
// #ifdef MP-TOUTIAO
|
||||
top_val = 0;
|
||||
val = base;
|
||||
// #endif
|
||||
this.setData({
|
||||
search_style: 'width: calc(100% - ' + (val < 0 ? 0 : val) + 'rpx);',
|
||||
search_is_fixed: top >= top_val ? 1 : 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 弹屏广告插件处理
|
||||
plugins_popupscreen_handle() {
|
||||
if (this.plugins_popupscreen_data != null) {
|
||||
// 不存在关闭缓存或者超过间隔时间则显示
|
||||
var cv = parseInt(uni.getStorageSync(this.plugins_popupscreen_cache_key)) || 0;
|
||||
var pv = parseInt(this.plugins_popupscreen_data.interval_time) || 86400;
|
||||
if (cv == 0 || cv + pv < app.globalData.get_timestamp()) {
|
||||
// 是否开启自动关闭
|
||||
var timer = null;
|
||||
var ct = parseInt(this.plugins_popupscreen_data.close_time) || 0;
|
||||
if (ct > 0) {
|
||||
var self = this;
|
||||
timer = setTimeout(function () {
|
||||
self.setData({
|
||||
plugins_popupscreen_status: 0,
|
||||
});
|
||||
uni.setStorage({
|
||||
key: self.plugins_popupscreen_cache_key,
|
||||
data: app.globalData.get_timestamp(),
|
||||
});
|
||||
}, ct * 1000);
|
||||
}
|
||||
this.setData({
|
||||
plugins_popupscreen_status: 1,
|
||||
plugins_popupscreen_timer: timer,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 弹屏广告 - 插件 关闭事件
|
||||
plugins_popupscreen_close_event(e) {
|
||||
this.setData({
|
||||
plugins_popupscreen_status: 0,
|
||||
});
|
||||
uni.setStorage({
|
||||
key: this.plugins_popupscreen_cache_key,
|
||||
data: app.globalData.get_timestamp(),
|
||||
});
|
||||
clearInterval(this.plugins_popupscreen_timer);
|
||||
},
|
||||
// 轮播改变
|
||||
changeBanner(color) {
|
||||
if (color) {
|
||||
this.slider_bg = 'background: linear-gradient(180deg,' + color + ' 0%, #f5f5f5 80%);padding-top:' + (bar_height + 8) + 'px;';
|
||||
} else {
|
||||
this.slider_bg = 'background: linear-gradient(180deg, ' + this.theme_color + ' 0%, #f5f5f5 80%);padding-top:' + (bar_height + 8) + 'px;';
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import "./index.css";
|
||||
@import './index.css';
|
||||
</style>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">昵称<text class="form-group-tips-must">*</text></view>
|
||||
<view class="flex-row align-c">
|
||||
<view class="flex-row align-c flex-1 flex-width">
|
||||
<input :type="application_client_type == 'weixin' ? 'nickname' : 'text'" name="nickname" :value="user_data.nickname || ''" maxlength="16" placeholder-class="cr-grey-9 tr" class="cr-base tr margin-right-sm" placeholder="昵称1~16个字符" />
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
@ -26,38 +26,17 @@
|
||||
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">生日</view>
|
||||
<view class="flex-row align-c">
|
||||
<picker class="margin-right-sm" name="birthday" mode="date" :value="user_data.birthday || ''" data-field="birthday" @change="select_change_event">
|
||||
<view :class="'picker ' + ((user_data.birthday || null) == null ? 'cr-grey' : '')">{{ user_data.birthday || "请选择生日" }}</view>
|
||||
<view class="flex-1 flex-width flex-row jc-e align-c">
|
||||
<picker class="margin-right-sm wh-auto tr" name="birthday" mode="date" :value="user_data.birthday || ''" data-field="birthday" @change="select_change_event">
|
||||
<view :class="'picker ' + ((user_data.birthday || null) == null ? 'cr-grey' : '')">{{ user_data.birthday || '请选择生日' }}</view>
|
||||
</picker>
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">所在省</view>
|
||||
<view class="flex-row align-c">
|
||||
<input type="text" name="province" :value="user_data.province || ''" maxlength="30" placeholder-class="cr-grey-9 tr" class="cr-base tr margin-right-sm" placeholder="所在省最多30个字符" />
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">所在市</view>
|
||||
<view class="flex-row align-c">
|
||||
<input type="text" name="city" :value="user_data.city || ''" maxlength="30" placeholder-class="cr-grey-9 tr" class="cr-base tr margin-right-sm" placeholder="所在市最多30个字符" />
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">所在区/县</view>
|
||||
<view class="flex-row align-c">
|
||||
<input type="text" name="county" :value="user_data.county || ''" maxlength="30" placeholder-class="cr-grey-9 tr" class="cr-base tr margin-right-sm" placeholder="所在区/县最多30个字符" />
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">详细地址</view>
|
||||
<view class="flex-row align-c">
|
||||
<view class="flex-row align-c flex-1 flex-width">
|
||||
<input type="text" name="address" :value="user_data.address || ''" maxlength="30" placeholder-class="cr-grey-9 tr" class="cr-base tr margin-right-sm" placeholder="详细地址最多30个字符" />
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
@ -65,19 +44,9 @@
|
||||
|
||||
<view class="form-gorup oh flex-row jc-sb align-c">
|
||||
<view class="form-gorup-title">性别</view>
|
||||
<!-- <view class="radio-gorup">
|
||||
<radio-group data-field="gender" @change="select_change_event">
|
||||
<block v-for="(item, index) in gender_list" :key="index">
|
||||
<label class="radio">
|
||||
<radio :value="item.id.toString()" :checked="parseInt(user_data.gender || 0) == item.id" />
|
||||
<text class="va-m">{{ item.name }}</text>
|
||||
</label>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view> -->
|
||||
<view class="flex-row align-c">
|
||||
<picker @change="select_change_event" :value="user_data.gender || ''" :range="gender_list" range-key="name" name="gender" data-field="gender" class="margin-right-sm">
|
||||
<view class="uni-input cr-base tr">{{ gender_list[user_data.gender].name || "" }}</view>
|
||||
<view class="flex-row jc-e align-c flex-1 flex-width">
|
||||
<picker @change="select_change_event" :value="user_data.gender || ''" :range="gender_list" range-key="name" name="gender" data-field="gender" class="margin-right-sm wh-auto tr">
|
||||
<view class="uni-input cr-base picker">{{ gender_list[user_data.gender].name || '' }}</view>
|
||||
</picker>
|
||||
<iconfont name="icon-qiandao-jiantou2" size="34rpx" color="#ccc"></iconfont>
|
||||
</view>
|
||||
@ -97,194 +66,194 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
const app = getApp();
|
||||
import componentNoData from '../../components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
application_client_type: app.globalData.application_client_type(),
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
form_submit_disabled_status: false,
|
||||
default_avatar: app.globalData.data.default_user_head_src,
|
||||
user_data: {},
|
||||
gender_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, "init");
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login?event_callback=init",
|
||||
});
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: "请先绑定手机",
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
this.get_data();
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: "请先登录",
|
||||
});
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
application_client_type: app.globalData.application_client_type(),
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
form_submit_disabled_status: false,
|
||||
default_avatar: app.globalData.data.default_user_head_src,
|
||||
user_data: {},
|
||||
gender_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("index", "personal"),
|
||||
method: "POST",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
user_data: res.data.data.data || {},
|
||||
gender_list: res.data.data.gender_list || [],
|
||||
components: {
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 用户未绑定用户则转到登录页面
|
||||
if (app.globalData.user_is_need_login(user)) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login?event_callback=init',
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_list_loding_msg: '请先绑定手机',
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: "服务器请求出错",
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: '请先登录',
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'personal'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
user_data: res.data.data.data || {},
|
||||
gender_list: res.data.data.gender_list || [],
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 生日、性别选择事件
|
||||
select_change_event(e) {
|
||||
var temp = this.user_data;
|
||||
temp[e.currentTarget.dataset.field] = e.detail.value;
|
||||
this.setData({ user_data: temp });
|
||||
},
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 头像事件
|
||||
choose_avatar_event(e) {
|
||||
var self = this;
|
||||
if (this.application_client_type == "weixin") {
|
||||
self.upload_handle(e.detail.avatarUrl);
|
||||
} else {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success(res) {
|
||||
if (res.tempFilePaths.length > 0) {
|
||||
self.upload_handle(res.tempFilePaths[0]);
|
||||
// 生日、性别选择事件
|
||||
select_change_event(e) {
|
||||
var temp = this.user_data;
|
||||
temp[e.currentTarget.dataset.field] = e.detail.value;
|
||||
this.setData({ user_data: temp });
|
||||
},
|
||||
|
||||
// 头像事件
|
||||
choose_avatar_event(e) {
|
||||
var self = this;
|
||||
if (this.application_client_type == 'weixin') {
|
||||
self.upload_handle(e.detail.avatarUrl);
|
||||
} else {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success(res) {
|
||||
if (res.tempFilePaths.length > 0) {
|
||||
self.upload_handle(res.tempFilePaths[0]);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 上传处理
|
||||
upload_handle(image) {
|
||||
var self = this;
|
||||
uni.uploadFile({
|
||||
url: app.globalData.get_request_url('useravatarupload', 'personal'),
|
||||
filePath: image,
|
||||
name: 'file',
|
||||
formData: {},
|
||||
success: function (res) {
|
||||
if (res.statusCode == 200) {
|
||||
var data = typeof res.data == 'object' ? res.data : JSON.parse(res.data);
|
||||
if (data.code == 0) {
|
||||
var temp = self.user_data;
|
||||
temp['avatar'] = data.data;
|
||||
self.setData({ user_data: temp });
|
||||
} else {
|
||||
app.globalData.showToast(data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 上传处理
|
||||
upload_handle(image) {
|
||||
var self = this;
|
||||
uni.uploadFile({
|
||||
url: app.globalData.get_request_url("useravatarupload", "personal"),
|
||||
filePath: image,
|
||||
name: "file",
|
||||
formData: {},
|
||||
success: function (res) {
|
||||
if (res.statusCode == 200) {
|
||||
var data = typeof res.data == "object" ? res.data : JSON.parse(res.data);
|
||||
if (data.code == 0) {
|
||||
var temp = self.user_data;
|
||||
temp["avatar"] = data.data;
|
||||
self.setData({ user_data: temp });
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
var form_data = e.detail.value;
|
||||
// 头像
|
||||
form_data['avatar'] = this.user_data.avatar || '';
|
||||
// 生日
|
||||
form_data['birthday'] = this.user_data.birthday || '';
|
||||
// 性别
|
||||
form_data['gender'] = this.user_data.gender || 0;
|
||||
|
||||
// 数据保存
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'personal'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
if (res.data.code == 0) {
|
||||
uni.setStorageSync(app.globalData.data.cache_user_info_key, res.data.data);
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
setTimeout(function () {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
} else {
|
||||
app.globalData.showToast(data.msg);
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast('提交失败,请重试!');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
var form_data = e.detail.value;
|
||||
// 头像
|
||||
form_data["avatar"] = this.user_data.avatar || "";
|
||||
// 生日
|
||||
form_data["birthday"] = this.user_data.birthday || "";
|
||||
// 性别
|
||||
form_data["gender"] = this.user_data.gender || 0;
|
||||
|
||||
// 数据保存
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: "处理中...",
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("save", "personal"),
|
||||
method: "POST",
|
||||
data: form_data,
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
if (res.data.code == 0) {
|
||||
uni.setStorageSync(app.globalData.data.cache_user_info_key, res.data.data);
|
||||
app.globalData.showToast(res.data.msg, "success");
|
||||
setTimeout(function () {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast("提交失败,请重试!");
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import "./personal.css";
|
||||
@import './personal.css';
|
||||
</style>
|
||||
|
||||
@ -11,7 +11,9 @@
|
||||
}
|
||||
|
||||
.data-list .item .spec-choice {
|
||||
max-width: calc(100% - 220rpx);
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
padding: 0 34rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.data-list .item .cart-badge-icon {
|
||||
@ -19,6 +21,28 @@
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.lose-efficacy {
|
||||
z-index: 1;
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.lose-efficacy .rotate {
|
||||
width: 130rpx;
|
||||
transform: rotate(-30deg);
|
||||
}
|
||||
|
||||
.lose-efficacy .rotate-img {
|
||||
width: 100%;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
|
||||
.lose-efficacy .rotate-text {
|
||||
margin-left: 18rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航
|
||||
*/
|
||||
|
||||
@ -9,32 +9,49 @@
|
||||
<view v-if="(data.goods || null) != null && data.goods.length > 0">
|
||||
<!-- 商品 -->
|
||||
<view class="data-list oh">
|
||||
<view v-for="(item, index) in data.goods" :key="index" :class="'item padding-main border-radius-main bg-white oh spacing-mb flex-row ' + (item.is_error == 0 ? '' : 'br-red')">
|
||||
<view v-for="(item, index) in data.goods" :key="index" class="item padding-main border-radius-main bg-white oh spacing-mb flex-row pr">
|
||||
<image class="goods-img dis-block border-radius-main" :src="item.images" mode="aspectFit" :data-value="item.goods_url" @tap="url_event"></image>
|
||||
<view class="right-base flex-1 flex-width padding-left-main">
|
||||
<view class="flex-row jc-c">
|
||||
<view :class="'multi-text flex-1 flex-width ' + (data.type == 1 ? 'padding-right' : '')">{{ item.title }}</view>
|
||||
<label v-if="data.type == 1 && item.is_error == 0" class="binding-check tr" :data-index="index" @tap="goods_choice_event">
|
||||
<radio :checked="item.checked == undefined || item.checked == true" style="transform: scale(0.7)" />
|
||||
<label v-if="data.type == 1 && item.is_error == 0" class="tr binding-check pr bottom-sm" :data-index="index" @tap="goods_choice_event">
|
||||
<radio :checked="item.checked == undefined || item.checked == true" :color="theme_color" style="transform: scale(0.7)" />
|
||||
</label>
|
||||
<label class="tr binding-check" :data-index="index" @tap="goods_choice_event"> <radio :checked="item.checked == undefined || item.checked == true" :color="theme_color" style="transform: scale(0.7)" /> </label>
|
||||
</view>
|
||||
<view class="single-text margin-top-sm">
|
||||
<text class="sales-price">{{ currency_symbol }}{{ item.price }}</text>
|
||||
<text v-if="(item.discount_price || 0) != 0" class="cr-green margin-left-lg text-size-xs">节省{{ currency_symbol }}{{ item.discount_price }}</text>
|
||||
<view class="single-text margin-top-sm flex-row align-c">
|
||||
<view class="sales-price">
|
||||
<text class="text-size-xs">{{ currency_symbol }}</text>
|
||||
<text class="text-size-lg fw-b">{{ item.price }}</text>
|
||||
</view>
|
||||
<view v-if="(item.discount_price || 0) != 0" class="cr-green margin-left-lg text-size-xs">
|
||||
节省
|
||||
<text class="text-size-xs">{{ currency_symbol }}</text>
|
||||
{{ item.discount_price }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xs">
|
||||
<view v-if="item.is_error == 0">
|
||||
<view class="va-m dis-inline-block margin-right-xl pr" :data-index="index" @tap="goods_cart_event">
|
||||
<uni-icons type="cart" size="46rpx" color="#999"></uni-icons>
|
||||
<view class="cart-badge-icon pa">
|
||||
<component-badge :propNumber="item.user_cart_count || 0"></component-badge>
|
||||
<view v-if="item.is_error == 0" class="flex-row jc-sb align-c">
|
||||
<view class="flex-row align-c">
|
||||
<view class="margin-right-sm pr" :data-index="index" @tap="goods_cart_event">
|
||||
<iconfont name="icon-zuhedap-shoping" size="42rpx" color="#E22C08"></iconfont>
|
||||
<view class="cart-badge-icon pa">
|
||||
<component-badge :propNumber="item.user_cart_count || 0"></component-badge>
|
||||
</view>
|
||||
</view>
|
||||
<text class="cr-grey-9 text-size-xs">{{ item.inventory }}{{ item.inventory_unit }}</text>
|
||||
</view>
|
||||
<view v-if="(item.is_exist_many_spec || 0) == 1" class="bg-grey-e cr-grey round single-text text-size-xss spec-choice" :data-index="index" @tap="spec_choice_event">
|
||||
{{ item.spec_choice_text || '选择规格' }}
|
||||
<iconfont name="icon-mendian-jiantou2" size="14rpx" color="#666" class="pa"></iconfont>
|
||||
</view>
|
||||
<text class="cr-gray text-size-xs">{{ item.inventory }}{{ item.inventory_unit }}</text>
|
||||
<view v-if="(item.is_exist_many_spec || 0) == 1" class="br-gray cr-gray round fr padding-left padding-right single-text text-size-xs spec-choice" :data-index="index" @tap="spec_choice_event">{{ item.spec_choice_text || '选择规格' }}</view>
|
||||
</view>
|
||||
<view v-else class="cr-yellow text-size-xs">{{ item.error_msg }}</view>
|
||||
<view v-else class="cr-grey-9 text-size-xs">{{ item.error_msg }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.is_error !== 0" class="pa left-0 right-0 top-0 bottom-0 lose-efficacy flex-row jc-c align-c">
|
||||
<view class="rotate pr">
|
||||
<image :src="binding_static_url + 'lapse-icon.png'" mode="widthFix" class="dis-block rotate-img"></image>
|
||||
<text class="rotate-text pa cr-red text-size">已失效</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -89,10 +106,12 @@
|
||||
import componentGoodsBuy from '../../../../components/goods-buy/goods-buy';
|
||||
import componentBadge from '../../../../components/badge/badge';
|
||||
import componentSharePopup from '../../../../components/share-popup/share-popup';
|
||||
let binding_static_url = app.globalData.get_static_url('binding', true);
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
binding_static_url: binding_static_url,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
@ -372,6 +391,6 @@
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
@import './detail.css';
|
||||
</style>
|
||||
|
||||
@ -2,158 +2,160 @@
|
||||
* 顶部内容
|
||||
*/
|
||||
.top-content {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
padding-top: var(--status-bar-height);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
padding-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部
|
||||
*/
|
||||
.head-base {
|
||||
padding: 40rpx 40rpx 22rpx 40rpx;
|
||||
/* #ifdef MP */
|
||||
padding-top: 120rpx;
|
||||
/* #endif */
|
||||
padding: 40rpx 40rpx 22rpx 40rpx;
|
||||
/* #ifdef MP */
|
||||
padding-top: 120rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.head-base .head-id {
|
||||
background: linear-gradient(90deg, #FFE3DC 0%, #FF9F67 100%);
|
||||
background: linear-gradient(90deg, #FFE3DC 0%, #FF9F67 100%);
|
||||
}
|
||||
|
||||
.head-avatar {
|
||||
width: 116rpx;
|
||||
height: 116rpx !important;
|
||||
width: 116rpx;
|
||||
height: 116rpx !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部右上角
|
||||
*/
|
||||
.head-right {
|
||||
z-index: 10;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.head-right .item .badge-icon {
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
top: -10px;
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员码
|
||||
*/
|
||||
.qrcode-content {
|
||||
background-size: 100% 100%;
|
||||
color: #FEF6CF;
|
||||
height: 108rpx;
|
||||
line-height: 108rpx;
|
||||
background-size: 100% 100%;
|
||||
color: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode-content.divider-r::after {
|
||||
right: 50%;
|
||||
height: 30%;
|
||||
background: #FEF6CF;
|
||||
right: 50%;
|
||||
height: 30%;
|
||||
background: #FEF6CF;
|
||||
}
|
||||
|
||||
.qrcode .icon {
|
||||
width: 48rpx;
|
||||
margin-right: 18rpx;
|
||||
position: relative;
|
||||
top: 6rpx;
|
||||
width: 48rpx;
|
||||
margin-right: 18rpx;
|
||||
position: relative;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.qrcode .iconfont {
|
||||
top: 50%;
|
||||
right: 48rpx;
|
||||
transform: translateY(-50%);
|
||||
top: 50%;
|
||||
right: 48rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部内容
|
||||
*/
|
||||
.user-bottom {
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 行内导航列表
|
||||
*/
|
||||
.nav-content .nav-all-order-goods {
|
||||
width: 138rpx;
|
||||
padding: 16rpx 16rpx 16rpx 12rpx;
|
||||
width: 138rpx;
|
||||
padding: 16rpx 16rpx 16rpx 12rpx;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods::before {
|
||||
content: '';
|
||||
width: 26rpx;
|
||||
height: 130rpx;
|
||||
background-image: url(data:image/png;base64,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);
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center left;
|
||||
position: absolute;
|
||||
left: -10rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
content: '';
|
||||
width: 26rpx;
|
||||
height: 130rpx;
|
||||
background-image: url(data:image/png;base64,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);
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center left;
|
||||
position: absolute;
|
||||
left: -10rpx;
|
||||
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: 16rpx 16rpx 16rpx 0;
|
||||
padding: 16rpx 16rpx 16rpx 0;
|
||||
}
|
||||
|
||||
.nav-content .nav-all-order-goods .item .item-icon,
|
||||
.nav-list-sub .item .item-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
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: 52rpx;
|
||||
height: 52rpx !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;
|
||||
}
|
||||
@ -45,15 +45,15 @@
|
||||
</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">
|
||||
<view class="qrcode-content flex-row align-c 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="tc flex-width-half" v-if="(membership_page_url || null) != null" :data-value="membership_page_url" @tap="url_event">
|
||||
<view class="item pr top-lg dis-inline-block">
|
||||
<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">
|
||||
<view class="tc flex-width-half" v-if="(payment_page_url || null) != null" :data-value="payment_page_url" @tap="url_event">
|
||||
<view class="item pr top-lg dis-inline-block">
|
||||
<image class="icon" src="@/static/images/common/payment-code.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<text>付款码</text>
|
||||
|
||||
Reference in New Issue
Block a user