1.测试优化
parent
4b916ba160
commit
e6235bd9a2
8
App.vue
8
App.vue
|
|
@ -71,11 +71,11 @@
|
|||
// tabbar页面
|
||||
tabbar_pages: ['/pages/index/index', '/pages/goods-category/goods-category', '/pages/cart/cart', '/pages/user/user'],
|
||||
// 请求地址
|
||||
request_url: 'https://new.shopxo.vip/',
|
||||
// request_url: 'http://shopxo.com/',
|
||||
// request_url: 'https://new.shopxo.vip/',
|
||||
request_url: 'http://shopxo.com/',
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url: 'https://new.shopxo.vip/',
|
||||
// static_url: 'http://shopxo.com/',
|
||||
// static_url: 'https://new.shopxo.vip/',
|
||||
static_url: 'http://shopxo.com/',
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
// 基础信息
|
||||
|
|
|
|||
|
|
@ -948,12 +948,10 @@ button[disabled].bg-grey {
|
|||
* 关键字标签展示
|
||||
*/
|
||||
.word-list .word-icon {
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 4rpx;
|
||||
border: 2rpx solid #FFCAC0;
|
||||
color: #FFCAC0;
|
||||
padding: 0 16rpx;
|
||||
padding: 0 12rpx;
|
||||
}
|
||||
|
||||
.word-list .word-icon:not(:last-child) {
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@
|
|||
<view class="tc spacing-mb">
|
||||
<view class="guess-like fw-b text-size-md">猜你喜欢</view>
|
||||
</view>
|
||||
<component-goods-list class="spacing-mt" :propData="{ style_type: 1, goods_list: goods_list, random: random_value }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true" propSource="index" @CartSuccessEvent="cart_success_event">
|
||||
</component-goods-list>
|
||||
<component-goods-list class="spacing-mt" :propData="{ style_type: 1, goods_list: goods_list, random: random_value }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true" propSource="index" @CartSuccessEvent="cart_success_event"> </component-goods-list>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="goods_bottom_line_status"></component-bottom-line>
|
||||
|
|
@ -579,6 +578,7 @@
|
|||
data_list: temp_list,
|
||||
data_list_loding_status: temp_list.length == 0 ? 0 : this.data_list_loding_status,
|
||||
goods_list: new_goods_list,
|
||||
random_value: Math.random(),
|
||||
});
|
||||
app.globalData.showToast(type == 'delete' ? '删除成功' : '收藏成功', 'success');
|
||||
|
||||
|
|
@ -815,6 +815,7 @@
|
|||
let new_goods_list = this.goods_list;
|
||||
for (let i = 0; i < new_goods_list.length; i++) {
|
||||
let bool = app.globalData.some_arry(cart_list, new_goods_list[i].id, 'goods_id');
|
||||
console.log(bool);
|
||||
if (bool) {
|
||||
// 将购物车中相同商品不同规格的商品数量累加
|
||||
let new_goods_item = this.cart_item_num(cart_list);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
"transparentTitle": "always",
|
||||
"titlePenetrate": "YES",
|
||||
"navigationBarTitleText": "",
|
||||
"scrollIndicator": "none", // 该页不显示滚动条
|
||||
// #endif
|
||||
"enablePullDownRefresh": false,
|
||||
// 禁止页面下拉
|
||||
|
|
|
|||
|
|
@ -113,13 +113,15 @@
|
|||
|
||||
.model-one .content-item:nth-child(3n) {
|
||||
border-right: 0;
|
||||
}
|
||||
.model-one .content .desc {
|
||||
min-height: 52rpx;
|
||||
line-height: 26rpx;
|
||||
}
|
||||
.model-one .content {
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
.model-one .content .desc {
|
||||
min-height: 52rpx;
|
||||
line-height: 26rpx;
|
||||
}
|
||||
|
||||
.model-one .content {
|
||||
height: 240rpx;
|
||||
}
|
||||
|
||||
.one-content image {
|
||||
|
|
@ -381,11 +383,24 @@
|
|||
padding-right: 0;
|
||||
padding-left: 24rpx;
|
||||
}
|
||||
|
||||
.cart-content .cart-list .goods-base-content {
|
||||
min-height: 60rpx;
|
||||
}
|
||||
|
||||
/* */
|
||||
/**
|
||||
* 无数据
|
||||
*/
|
||||
.no-data {
|
||||
z-index: 101;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 隐藏滚动条
|
||||
*/
|
||||
scroll-view ::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@
|
|||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_is_loading: 0,
|
||||
user: null,
|
||||
user: null,
|
||||
params: null,
|
||||
tabbar_params: null,
|
||||
common_site_type: 0,
|
||||
|
|
@ -461,12 +461,12 @@
|
|||
componentUserBase,
|
||||
componentNavMore,
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
this.setData({
|
||||
params: params
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
|
|
@ -1252,6 +1252,6 @@
|
|||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
@import './goods-category.css';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -68,18 +68,12 @@
|
|||
</block>
|
||||
</swiper>
|
||||
<!-- 标签插件 -->
|
||||
<view
|
||||
v-if="(plugins_label_data || null) != null && plugins_label_data.data.length > 0"
|
||||
:class="'plugins-label oh pa plugins-label-' + ((plugins_label_data.base.is_user_goods_label_icon || 0) == 0 ? 'text' : 'img') + ' plugins-label-' + (plugins_label_data.base.user_goods_show_style || 'top-left')"
|
||||
>
|
||||
<view v-if="(plugins_label_data || null) != null && plugins_label_data.data.length > 0" :class="'plugins-label oh pa plugins-label-' + ((plugins_label_data.base.is_user_goods_label_icon || 0) == 0 ? 'text' : 'img') + ' plugins-label-' + (plugins_label_data.base.user_goods_show_style || 'top-left')">
|
||||
<block v-for="(lv, li) in plugins_label_data.data" :key="li">
|
||||
<view class="lv dis-inline-block va-m" :data-value="(plugins_label_data.base.is_user_goods_label_url || 0) == 1 ? lv.url || '' : ''" @tap="url_event">
|
||||
<view
|
||||
v-if="(plugins_label_data.base.is_user_goods_label_icon || 0) == 0"
|
||||
class="round cr-white bg-main text-size-xs fl"
|
||||
:style="((lv.bg_color || null) != null ? 'background-color:' + lv.bg_color + ' !important;' : '') + ((lv.text_color || null) != null ? 'color:' + lv.text_color + ' !important;' : '')"
|
||||
>{{ lv.name }}</view
|
||||
>
|
||||
<view v-if="(plugins_label_data.base.is_user_goods_label_icon || 0) == 0" class="round cr-white bg-main text-size-xs fl" :style="((lv.bg_color || null) != null ? 'background-color:' + lv.bg_color + ' !important;' : '') + ((lv.text_color || null) != null ? 'color:' + lv.text_color + ' !important;' : '')">{{
|
||||
lv.name
|
||||
}}</view>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
|
|
@ -89,7 +83,7 @@
|
|||
<!-- 价格信息 -->
|
||||
<view :class="'goods-base-price bg-white oh spacing-mb ' + ((plugins_seckill_data || null) != null ? 'goods-base-price-countdown' : '')">
|
||||
<!-- 价格 -->
|
||||
<view class="price-content padding-lg bs-bb fl" :style="(plugins_seckill_data || null) != null ? 'background-image: url(' + plugins_seckill_data.goods_detail_header + ')' : ''">
|
||||
<view class="price-content padding-lg bs-bb fl" :style="(plugins_seckill_data || null) != null ? 'background-image: url(' + plugins_seckill_data.goods_detail_header + ')' : ''">
|
||||
<view class="single-text">
|
||||
<text v-if="(show_field_price_text || null) != null" class="price-icon round va-m">{{ show_field_price_text }}</text>
|
||||
<text class="sales-price va-m">{{ currency_symbol }}{{ goods_spec_base_price }}</text>
|
||||
|
|
@ -204,11 +198,11 @@
|
|||
|
||||
<!-- 批发 -->
|
||||
<view v-if="(plugins_wholesale_data || null) != null" class="plugins-wholesale-container-view pr oh padding-main border-radius-main bg-white text-size-xs spacing-mb flex-row jc-sb align-c">
|
||||
<view class="flex-row align-c">
|
||||
<view class="item-title padding-right-main">{{ plugins_wholesale_data.title }}</view>
|
||||
<view class="column-right-view border-radius-main single-text flex-1 flex-width" @tap="popup_wholesale_event">
|
||||
<view class="flex-row wh-auto">
|
||||
<view class="item-title padding-right-main self-c">{{ plugins_wholesale_data.title }}</view>
|
||||
<view class="column-right-view border-radius-main single-text flex-1 flex-width flex-row flex-warp" @tap="popup_wholesale_event">
|
||||
<block v-for="(item, index) in plugins_wholesale_data.rules" :key="index">
|
||||
<view class="item round dis-inline-block">{{ item.msg }}</view>
|
||||
<view class="item round dis-inline-block margin-vertical-xs">{{ item.msg }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -217,11 +211,11 @@
|
|||
|
||||
<!-- 优惠券 -->
|
||||
<view v-if="(plugins_coupon_data || null) != null && plugins_coupon_data.data.length > 0" class="plugins-coupon-container-view pr oh padding-main border-radius-main bg-white text-size-xs spacing-mb flex-row jc-sb align-c">
|
||||
<view class="flex-row align-c">
|
||||
<view class="item-title padding-right-main">优惠券</view>
|
||||
<view class="column-right-view border-radius-main single-text cp flex-1 flex-width" @tap="popup_coupon_event">
|
||||
<view class="flex-row wh-auto">
|
||||
<view class="item-title padding-right-main self-c">优惠券</view>
|
||||
<view class="column-right-view border-radius-main single-text cp flex-1 flex-width flex-row flex-warp" @tap="popup_coupon_event">
|
||||
<block v-for="(item, index) in plugins_coupon_data.data" :key="index">
|
||||
<view class="item round cr-white dis-inline-block" :style="'background:' + item.bg_color_value + ';border:1px solid ' + item.bg_color_value + ';'">{{ item.desc || item.name }}</view>
|
||||
<view class="item round cr-white dis-inline-block margin-vertical-xs" :style="'background:' + item.bg_color_value + ';border:1px solid ' + item.bg_color_value + ';'">{{ item.desc || item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -229,10 +223,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 规格选择 -->
|
||||
<view
|
||||
v-if="goods.is_exist_many_spec == 1 && (buy_button || null) != null && (buy_button.is_buy || 0) + (buy_button.is_cart || 0) + (buy_button.is_show || 0) > 0"
|
||||
class="spec-container-view oh padding-horizontal-main padding-main border-radius-main bg-white arrow-right text-size-xs spacing-mb"
|
||||
>
|
||||
<view v-if="goods.is_exist_many_spec == 1 && (buy_button || null) != null && (buy_button.is_buy || 0) + (buy_button.is_cart || 0) + (buy_button.is_show || 0) > 0" class="spec-container-view oh padding-horizontal-main padding-main border-radius-main bg-white arrow-right text-size-xs spacing-mb">
|
||||
<view class="fl item-title">规格</view>
|
||||
<view class="fr column-right-view border-radius-main cr-base single-text cp" @tap="nav_buy_submit_event" :data-type="(buy_button.is_buy || 0) == 1 ? 'buy' : (buy_button.is_cart || 0) == 1 ? 'cart' : 'show'">{{ goods_spec_selected_text }}</view>
|
||||
</view>
|
||||
|
|
@ -240,12 +231,7 @@
|
|||
|
||||
<view class="padding-horizontal-main">
|
||||
<!-- 商品基础参数 -->
|
||||
<view
|
||||
v-if="(goods.parameters || null) != null && (goods.parameters.base || null) != null && goods.parameters.base.length > 0"
|
||||
class="goods-parameters parameters-base border-radius-main padding-main bg-white arrow-right single-text text-size-xs spacing-mb"
|
||||
@tap="popup_params_event"
|
||||
data-value="base"
|
||||
>
|
||||
<view v-if="(goods.parameters || null) != null && (goods.parameters.base || null) != null && goods.parameters.base.length > 0" class="goods-parameters parameters-base border-radius-main padding-main bg-white arrow-right single-text text-size-xs spacing-mb" @tap="popup_params_event" data-value="base">
|
||||
<block v-for="(item, index) in goods.parameters.base" :key="index">
|
||||
<text v-if="index > 0">,</text>
|
||||
<text>{{ item.value }}</text>
|
||||
|
|
@ -271,10 +257,9 @@
|
|||
|
||||
<!-- 门店 -->
|
||||
<view v-if="plugins_realstore_data != null && plugins_realstore_data.length > 0" class="plugins-realstore-container">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
<text class="text-wrapper">相关门店</text>
|
||||
<text class="arrow-right padding-right-xl margin-top-xs cr-grey fr" data-value="/pages/plugins/realstore/index/index" @tap="url_event">更多</text>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">相关门店</text>
|
||||
<navigator url="/pages/plugins/realstore/index/index" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<component-realstore-list :propDataList="plugins_realstore_data" :propIsFavor="false"></component-realstore-list>
|
||||
</view>
|
||||
|
|
@ -286,11 +271,12 @@
|
|||
|
||||
<!-- 商品评价 -->
|
||||
<view v-if="common_is_show_goods_comments == 1" class="goods-comment spacing-mb">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
<text class="text-wrapper">商品评价</text>
|
||||
<text class="margin-left-xs">({{ goods.comments_count }})</text>
|
||||
<navigator :url="'/pages/goods-comment/goods-comment?goods_id=' + goods.id" hover-class="none" class="arrow-right padding-right-xl margin-top-xs cr-grey fr">好评率 {{ goods.comments_score.rate }}%</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper title-left-border">商品评价</text>
|
||||
<text class="vice-name cr-grey">({{ goods.comments_count }})</text>
|
||||
</view>
|
||||
<navigator :url="'/pages/goods-comment/goods-comment?goods_id=' + goods.id" hover-class="none" class="arrow-right padding-right cr-grey">好评率 {{ goods.comments_score.rate }}%</navigator>
|
||||
</view>
|
||||
<view class="border-radius-main padding-main bg-white">
|
||||
<component-goods-comments :prop-data="goods.comments_data"></component-goods-comments>
|
||||
|
|
@ -304,10 +290,12 @@
|
|||
</view>
|
||||
<!-- 问答 -->
|
||||
<view v-if="(plugins_ask_data || null) !== null && plugins_ask_data.is_ask_add == 1" class="goods-comment spacing-mb">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
<text class="text-wrapper">问答</text>
|
||||
<navigator :url="'/pages/plugins/ask/goods-list/goods-list?goods_id=' + goods.id" hover-class="none" class="arrow-right padding-right-xl margin-top-xs cr-grey fr">查看全部回答</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper title-left-border">问答</text>
|
||||
<text class="vice-name cr-grey">({{ goods.comments_count }})</text>
|
||||
</view>
|
||||
<navigator :url="'/pages/plugins/ask/goods-list/goods-list?goods_id=' + goods.id" hover-class="none" class="arrow-right padding-right cr-grey">查看全部回答</navigator>
|
||||
</view>
|
||||
<view class="border-radius-main padding-main bg-white">
|
||||
<component-ask-comments-goods :prop-data="plugins_ask_data.ask_data"></component-ask-comments-goods>
|
||||
|
|
@ -360,9 +348,8 @@
|
|||
|
||||
<!-- 商品详情 -->
|
||||
<view class="goods-detail">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
<text class="text-wrapper">商品详情</text>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">商品详情</text>
|
||||
</view>
|
||||
<view class="border-radius-main oh bg-white">
|
||||
<block v-if="(common_is_goods_detail_show_photo == 1 && goods_photo.length > 0) || (common_app_is_use_mobile_detail == 0 && (goods.content_web || null) != null) || (common_app_is_use_mobile_detail == 1 && goods_content_app.length > 0)">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<!-- 搜索关键字 -->
|
||||
<view class="padding-horizontal-main padding-top-main padding-bottom-sm pr">
|
||||
<view class="top-search-input">
|
||||
<component-search :propDefaultValue="post_data.wd || ''" @onsearch="search_input_confirm_event" :propIsOnEvent="true" @oninput="search_input_value_event" :propIsOnInputEvent="true"
|
||||
<component-search :propDefaultValue="post_data.wd || ''" propBrColor="#ddd" @onsearch="search_input_confirm_event" :propIsOnEvent="true" @oninput="search_input_value_event" :propIsOnInputEvent="true"
|
||||
@onfocus="search_input_focus_event" :propIsOnFocusEvent="true" @onblur="search_input_blur_event" :propIsOnBlurEvent="true" :propIsRequired="false"
|
||||
propPlaceholder="输入商品名称搜索"></component-search>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
<!-- 顶部内容 -->
|
||||
<view v-if="load_status == 1" class="home-top-nav-content" :style="top_content_bg_color + top_content_style">
|
||||
<!-- 顶部背景图片 -->
|
||||
<image class="pa top-0 bg-img wh-auto" mode="widthFix" :src="static_url + 'nav-top.png'"></image>
|
||||
<view class="pa top-0 left-0 right-0">
|
||||
<image class="bg-img wh-auto" mode="widthFix" :src="static_url + 'nav-top.png'"></image>
|
||||
</view>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<view v-if="common_app_is_header_nav_fixed == 1" class="search-fixed-seat"></view>
|
||||
|
|
@ -24,9 +26,11 @@
|
|||
<view v-if="common_app_is_enable_search == 1" class="search-content-input dis-inline-block va-m" :style="top_content_search_style">
|
||||
<!-- 是否开启搜索框前面icon扫一扫 -->
|
||||
<block v-if="is_home_search_scan == 1">
|
||||
<component-search propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-white" propIconColor="#fff" propBgColor="rgb(255 255 255 / 0.5)"
|
||||
<!-- #ifndef H5 -->
|
||||
<component-search propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-white" propIconColor="#fff" propBgColor="rgb(255 255 255 / 0.5)" @onicon="search_icon_event" propIcon="icon-mendian-sousuosm" :propIsIconOnEvent="true"></component-search>
|
||||
@onicon="search_icon_event" propIcon="icon-mendian-sousuosm" :propIsIconOnEvent="true"
|
||||
<!-- #endif -->
|
||||
></component-search>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-search propPlaceholder="输入商品名称搜索" propPlaceholderClass="cr-white" propIconColor="#fff" propBgColor="rgb(255 255 255 / 0.5)"></component-search>
|
||||
|
|
@ -208,14 +212,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<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;' : ''"
|
||||
>
|
||||
<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">
|
||||
<swiper-item>
|
||||
<view class="item oh padding-vertical-main">
|
||||
|
|
|
|||
|
|
@ -2,15 +2,16 @@
|
|||
* 基础
|
||||
*/
|
||||
.base-container {
|
||||
height: 280rpx;
|
||||
height: 280rpx;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
.base-container .text {
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgb(0 0 0 / 35%);
|
||||
.base-container .text {
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgb(0 0 0 / 35%);
|
||||
padding: 100rpx 20rpx 20rpx 20rpx;
|
||||
}
|
||||
}
|
||||
.word-content .word-icon:not(:last-child) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
|
@ -18,10 +18,12 @@
|
|||
|
||||
<!-- 推荐商品 -->
|
||||
<view v-if="(data.goods_list || null) != null && data.goods_list.length > 0">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">活动商品</text>
|
||||
<text class="cr-grey text-size-xs margin-left-lg">{{ data.vice_title }}</text>
|
||||
<navigator url="/pages/plugins/activity/index/index" hover-class="none" class="arrow-right padding-right-xxxl cr-grey fr">更多活动</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<view class="title-left">
|
||||
<text class="text-wrapper title-left-border">活动商品</text>
|
||||
<text class="vice-name margin-left-lg cr-grey">{{ data.vice_title }}</text>
|
||||
</view>
|
||||
<navigator url="'/pages/plugins/activity/index/index" hover-class="none" class="arrow-right padding-right cr-grey">更多活动</navigator>
|
||||
</view>
|
||||
<component-goods-list :propData="{ style_type: 1, goods_list: data.goods_list }" :propCurrencySymbol="currency_symbol"></component-goods-list>
|
||||
</view>
|
||||
|
|
@ -41,131 +43,131 @@
|
|||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from "../../../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
|
||||
import componentGoodsList from "../../../../components/goods-list/goods-list";
|
||||
const app = getApp();
|
||||
import componentNoData from '../../../../components/no-data/no-data';
|
||||
import componentBottomLine from '../../../../components/bottom-line/bottom-line';
|
||||
import componentGoodsList from '../../../../components/goods-list/goods-list';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
params: null,
|
||||
user: null,
|
||||
data_base: null,
|
||||
data: null,
|
||||
// 自定义分享信息
|
||||
share_info: {},
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentGoodsList,
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
//params['id'] = 1;
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 获取数据
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
currency_symbol: app.globalData.get_config("currency_symbol"),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, "init_config");
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
params: null,
|
||||
user: null,
|
||||
data_base: null,
|
||||
data: null,
|
||||
// 自定义分享信息
|
||||
share_info: {},
|
||||
};
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "index", "activity"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id || 0,
|
||||
},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
data: data.data || null,
|
||||
data_list_loding_msg: "",
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: (data.data || null) != null && (data.data.goods_list || null) != null && data.data.goods_list.length > 0,
|
||||
});
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentGoodsList,
|
||||
},
|
||||
props: {},
|
||||
|
||||
if ((this.data || null) != null) {
|
||||
// 基础自定义分享
|
||||
onLoad(params) {
|
||||
//params['id'] = 1;
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 获取数据
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
currency_symbol: app.globalData.get_config('currency_symbol'),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('detail', 'index', 'activity'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
id: this.params.id || 0,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
share_info: {
|
||||
title: this.data.seo_title || this.data.title,
|
||||
desc: this.data.seo_desc || this.data.describe,
|
||||
path: "/pages/plugins/activity/detail/detail",
|
||||
query: "id=" + this.data.id,
|
||||
img: this.data.cover,
|
||||
},
|
||||
data_base: data.base || null,
|
||||
data: data.data || null,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: (data.data || null) != null && (data.data.goods_list || null) != null && data.data.goods_list.length > 0,
|
||||
});
|
||||
|
||||
// 标题
|
||||
if ((this.data.title || null) != null) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.data.title,
|
||||
if ((this.data || null) != null) {
|
||||
// 基础自定义分享
|
||||
this.setData({
|
||||
share_info: {
|
||||
title: this.data.seo_title || this.data.title,
|
||||
desc: this.data.seo_desc || this.data.describe,
|
||||
path: '/pages/plugins/activity/detail/detail',
|
||||
query: 'id=' + this.data.id,
|
||||
img: this.data.cover,
|
||||
},
|
||||
});
|
||||
|
||||
// 标题
|
||||
if ((this.data.title || null) != null) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.data.title,
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle(this.share_info);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
});
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle(this.share_info);
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: "服务器请求出错",
|
||||
});
|
||||
app.globalData.showToast("服务器请求出错");
|
||||
},
|
||||
});
|
||||
app.globalData.showToast('服务器请求出错');
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import "./detail.css";
|
||||
@import './detail.css';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@
|
|||
|
||||
<!-- 分类 -->
|
||||
<view class="spacing-nav-title padding-horizontal-main spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">所有{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">所有{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 博文列表 -->
|
||||
|
|
@ -54,9 +56,9 @@
|
|||
|
||||
<!-- 热门博文-滚动 -->
|
||||
<view v-if="hot_list.length > 0" class="padding-horizontal-main spacing-mb">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">热门{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right-xxxl cr-grey fr">更多</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">热门{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<view class="rolling-horizontal border-radius-main oh">
|
||||
<view class="plugins-blog-rolling-list scroll-view-horizontal">
|
||||
|
|
@ -78,9 +80,9 @@
|
|||
|
||||
<!-- 推荐博文 -->
|
||||
<view v-if="right_list.length > 0" class="padding-horizontal-main spacing-mb">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">推荐{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right-xxxl cr-grey fr">更多</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">推荐{{ blog_main_name }}</text>
|
||||
<navigator url="/pages/plugins/blog/search/search" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<view class="right-list padding-horizontal-main border-radius-main bg-white">
|
||||
<block v-for="(item, index) in right_list" :key="index">
|
||||
|
|
@ -96,9 +98,9 @@
|
|||
|
||||
<!-- 推荐商品 -->
|
||||
<view v-if="goods_list.length > 0" class="goods-list oh padding-horizontal-main">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">推荐商品</text>
|
||||
<navigator url="/pages/goods-search/goods-search" hover-class="none" class="arrow-right padding-right-xxxl cr-grey fr">更多</navigator>
|
||||
<view class="spacing-nav-title flex-row align-c jc-sb text-size-xs">
|
||||
<text class="text-wrapper title-left-border">推荐商品</text>
|
||||
<navigator url="/pages/goods-search/goods-search" hover-class="none" class="arrow-right padding-right cr-grey">更多</navigator>
|
||||
</view>
|
||||
<component-goods-list :propData="{ style_type: 1, goods_list: goods_list }" :propCurrencySymbol="currency_symbol"></component-goods-list>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<view class="cr-grey tc margin-top-xxxl">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
|
||||
|
||||
<!-- 导航 -->
|
||||
<view v-if="(plugins_wallet || null) != null" class="bottom-fixed padding-main">
|
||||
<view v-if="(plugins_wallet || null) != null" class="bottom-fixed padding-main br-0">
|
||||
<view class="bottom-line-exclude oh">
|
||||
<view class="bg-grey round oh">
|
||||
<button type="default" class="bg-main br-main cr-white round text-size fl" size="mini">会员码</button>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<view class="margin-top-xxxl cr-yellow tc">({{ scheduled_value }})秒后自动刷新付款码</view>
|
||||
|
||||
<!-- 导航 -->
|
||||
<view v-if="(plugins_membershiplevelvip || null) != null" class="bottom-fixed padding-main">
|
||||
<view v-if="(plugins_membershiplevelvip || null) != null" class="bottom-fixed padding-main br-0">
|
||||
<view class="bottom-line-exclude oh">
|
||||
<view class="bg-grey round oh">
|
||||
<button type="default" class="bg-grey br-grey cr-base round text-size fl" size="mini" :data-value="'/pages/plugins/membershiplevelvip/member-code/member-code?screen_brightness_value=' + screen_brightness_value" data-redirect="1" @tap="url_event">会员码</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue