细节优化

master
gongfuxiang 2023-10-14 00:03:08 +08:00
parent fc1dc7ae5f
commit 428f08c4db
8 changed files with 67 additions and 102 deletions

View File

@ -70,9 +70,9 @@
}
.icon-nav-list .item {
width: calc(20% - 40rpx);
float: left;
padding: 20rpx;
width: 20%;
float: left;
padding: 16rpx 0;
/* #ifdef H5 */
cursor: pointer;
/* #endif */

View File

@ -32,7 +32,7 @@
{{ item.province_name }}{{ item.city_name }}{{ item.county_name }}{{ item.address }}
</view>
</view>
<view v-if="(item.distance || null) != null" class="text-size-xs cr-grey-c padding-top-xs">{{ item.distance }}</view>
<view v-if="(item.distance || null) != null" class="text-size-xs cr-grey-c padding-top-xs">{{ item.distance }}</view>
</view>
<!-- 右侧操作 -->
<view class="icon-list pa">

View File

@ -177,14 +177,14 @@
font-size: 24rpx;
padding: 0 32rpx 0 54rpx;
box-sizing: border-box;
height: 58rpx;
line-height: 58rpx;
height: 56rpx;
line-height: 56rpx;
}
.search-content .search-btn {
width: 106rpx;
height: 48rpx;
line-height: 48rpx;
height: 46rpx;
line-height: 46rpx;
font-size: 28rpx;
border-radius: 30rpx;
padding: 0;

View File

@ -30,7 +30,7 @@
}
.top-nav {
position: absolute;
bottom: 4rpx;
bottom: 0;
width: calc(100% - 40rpx);
/* #ifdef H5 || APP */
bottom: 6px;
@ -53,8 +53,7 @@
}
.top-nav-content .nav-active {
font-weight: 500;
padding-bottom: 5rpx;
padding-bottom: 5rpx;
padding-bottom: 2rpx;
border-style: solid;
border-width: 0 0 2px 0;
/* #ifdef H5 || APP */

View File

@ -7,7 +7,7 @@
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
<!-- 小导航 -->
<view class="top-nav-left-icon pf" :style="'top:' + top_nav_icon_top_value + 'px;'">
<uni-icons type="arrowleft" size="20" color="#333" class="icon round cp" @tap="top_nav_left_back_event"></uni-icons>
<uni-icons type="arrowleft" size="22" color="#333" class="icon round cp" @tap="top_nav_left_back_event"></uni-icons>
<uni-icons v-if="nav_more_list.length > 0" type="list" size="20" color="#333" class="icon round cp margin-left-lg" @tap="top_nav_left_more_event"></uni-icons>
</view>
<!-- #endif -->
@ -630,7 +630,6 @@ export default {
indicator_active_color: "#666",
autoplay: true,
circular: true,
load_status: 0,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: "",
@ -695,7 +694,7 @@ export default {
top_nav_more_top_value: 50,
top_nav_right_icon_left_value: win_width <= 800 ? win_width - 40 : win_width - (win_width - 800) / 2 - 40,
// #endif
top_nav_height: 23,
top_nav_height: 20,
top_nav_title_index: 0,
top_nav_title_scroll: true,
top_nav_title_timer: null,
@ -859,14 +858,6 @@ export default {
//
init() {
if (this.load_status == 0) {
uni.showLoading({
title: "加载中...",
});
}
this.setData({
data_list_loding_status: 1,
});
uni.request({
url: app.globalData.get_request_url("detail", "goods"),
method: "POST",
@ -874,55 +865,47 @@ export default {
dataType: "json",
success: (res) => {
uni.stopPullDownRefresh();
if (this.load_status == 0) {
uni.hideLoading();
}
if (res.data.code == 0) {
var data = res.data.data;
var goods = data.goods;
if (this.load_status == 1) {
this.setData({ quick_nav_cart_count: data.cart_total.buy_number || 0 });
} else {
var price_text_arr = ["售价", "价格", "销售价"];
var upd_data = {
data_bottom_line_status: true,
data_list_loding_status: 3,
load_status: 1,
goods: goods,
indicator_dots: goods.photo.length > 1,
autoplay: goods.photo.length > 1,
goods_photo: goods.photo,
nav_more_list: data.nav_more_list || [],
goods_content_app: goods.content_app || [],
nav_favor_button_info: {
text: (goods.is_favor == 1 ? "已" : "") + "收藏",
status: goods.is_favor,
},
buy_button: data.buy_button || null,
top_nav_title_data: data.middle_tabs_nav || [],
goods_spec_base_price: goods.price,
goods_spec_base_original_price: goods.original_price || 0,
show_field_price_text: price_text_arr.indexOf(goods.show_field_price_text) != -1 ? null : goods.show_field_price_text.replace(/<[^>]+>/g, "") || null,
plugins_seckill_data: data.plugins_seckill_data || null,
plugins_coupon_data: data.plugins_coupon_data || null,
quick_nav_cart_count: data.cart_total.buy_number || 0,
plugins_salerecords_data: data.plugins_salerecords_data || null,
plugins_shop_data: data.plugins_shop_data || null,
plugins_wholesale_data: (data.plugins_wholesale_data || null) == null ? null : data.plugins_wholesale_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_intellectstools_data: data.plugins_intellectstools_data || null,
plugins_chat_data: data.plugins_chat_data || null,
plugins_realstore_data: data.plugins_realstore_data || null,
plugins_binding_data: data.plugins_binding_data || null,
plugins_goodsservice_data: data.plugins_goodsservice_data || null,
plugins_batchbuy_data: data.plugins_batchbuy_data || null,
};
//
if ((data.nav_home_button_info || null) != null) {
upd_data["nav_home_button_info"] = data.nav_home_button_info;
}
this.setData(upd_data);
var price_text_arr = ["售价", "价格", "销售价"];
var upd_data = {
data_bottom_line_status: true,
data_list_loding_status: 3,
goods: goods,
indicator_dots: goods.photo.length > 1,
autoplay: goods.photo.length > 1,
goods_photo: goods.photo,
nav_more_list: data.nav_more_list || [],
goods_content_app: goods.content_app || [],
nav_favor_button_info: {
text: (goods.is_favor == 1 ? "已" : "") + "收藏",
status: goods.is_favor,
},
buy_button: data.buy_button || null,
top_nav_title_data: data.middle_tabs_nav || [],
goods_spec_base_price: goods.price,
goods_spec_base_original_price: goods.original_price || 0,
show_field_price_text: price_text_arr.indexOf(goods.show_field_price_text) != -1 ? null : goods.show_field_price_text.replace(/<[^>]+>/g, "") || null,
plugins_seckill_data: data.plugins_seckill_data || null,
plugins_coupon_data: data.plugins_coupon_data || null,
quick_nav_cart_count: data.cart_total.buy_number || 0,
plugins_salerecords_data: data.plugins_salerecords_data || null,
plugins_shop_data: data.plugins_shop_data || null,
plugins_wholesale_data: (data.plugins_wholesale_data || null) == null ? null : data.plugins_wholesale_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_intellectstools_data: data.plugins_intellectstools_data || null,
plugins_chat_data: data.plugins_chat_data || null,
plugins_realstore_data: data.plugins_realstore_data || null,
plugins_binding_data: data.plugins_binding_data || null,
plugins_goodsservice_data: data.plugins_goodsservice_data || null,
plugins_batchbuy_data: data.plugins_batchbuy_data || null,
};
//
if ((data.nav_home_button_info || null) != null) {
upd_data["nav_home_button_info"] = data.nav_home_button_info;
}
this.setData(upd_data);
// 0
if (this.popup_buy_status && parseInt(goods.inventory) > 0) {
@ -963,9 +946,6 @@ export default {
},
fail: () => {
uni.stopPullDownRefresh();
if (this.load_status == 0) {
uni.hideLoading();
}
this.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,

View File

@ -71,12 +71,6 @@
width: 100%;
}
.search-content-fixed-content {
background-repeat: no-repeat;
background-size: 100% auto;
padding-bottom: 20rpx;
}
.search-content-input {
width: calc(100% - 320rpx);
}
@ -85,7 +79,7 @@
background-repeat: no-repeat;
background-size: 100% auto;
background-position: top;
padding-bottom: 20rpx;
padding-bottom: 6px;
/* #ifdef H5 || APP */
padding-top: 15rpx !important;
padding-bottom: 15rpx !important;

View File

@ -17,18 +17,6 @@
margin-top: 80rpx;
}
.nav-search /deep/ .search-icon {
left: 30rpx;
margin-top: 2rpx;
}
.nav-search /deep/ input {
padding: 0 32rpx 0 82rpx;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
}
/**
*
*/

View File

@ -1,12 +1,8 @@
<template>
<view class="realstore">
<view v-if="(data_base || null) != null" class="realstore-nav-bg">
<block v-if="screenWidth > 960">
<image :src="realstore_static_url + 'title-bg-pc.png'" mode="widthFix" class="wh-auto pa bg-img" />
</block>
<block v-else>
<image :src="realstore_static_url + 'title-bg.png'" mode="widthFix" class="wh-auto pa bg-img" />
</block>
<!-- 背景图片 -->
<image :src="realstore_static_url + 'title-bg'+(screen_width > 960 ? '-pc' : '')+'.png'" mode="widthFix" class="wh-auto pa bg-img" />
<!-- 顶部 -->
<view class="spacing-mb pr z-i cr-white">
<!-- 位置 -->
@ -81,14 +77,15 @@
import componentRealstoreList from '../../../../components/realstore-list/realstore-list';
import componentTitle from '../../../../components/title/title';
let realstore_static_url = app.globalData.get_static_url('realstore', true);
var realstore_static_url = app.globalData.get_static_url('realstore', true);
export default {
data() {
return {
realstore_static_url: realstore_static_url,
//
screenWidth: window.innerWidth,
// #ifdef H5
screen_width: window.innerWidth,
// #endif
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
@ -123,8 +120,11 @@
this.setData({
params: params,
});
// #ifdef H5
//
window.addEventListener('resize', this.handleResize, true);
window.addEventListener('resize', this.handle_resize, true);
// #endif
},
onShow() {
@ -142,7 +142,7 @@
//
onUnload: function () {
window.removeEventListener('resize', this.handleResize);
window.removeEventListener('resize', this.handle_resize);
},
methods: {
@ -259,10 +259,14 @@
location_tips_close_status: false,
});
},
handleResize() {
//
handle_resize() {
// #ifdef H5
this.setData({
screenWidth: window.innerWidth,
screen_width: window.innerWidth,
});
// #endif
},
},
};