细节优化
parent
0b66783a14
commit
06ce35da7a
|
|
@ -13,10 +13,18 @@
|
|||
return {};
|
||||
},
|
||||
components: {},
|
||||
props: {
|
||||
props: {
|
||||
propUrl: {
|
||||
type: String,
|
||||
default: '/pages/goods-search/goods-search'
|
||||
},
|
||||
propFormName: {
|
||||
type: String,
|
||||
default: 'keywords'
|
||||
},
|
||||
propPlaceholder: {
|
||||
type: String,
|
||||
default: '输入商品名称搜索'
|
||||
default: '其实搜索很简单 ^_^!'
|
||||
},
|
||||
propBgColor: {
|
||||
type: String,
|
||||
|
|
@ -38,7 +46,7 @@
|
|||
|
||||
// 进入搜索页面
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods-search/goods-search?keywords=' + keywords
|
||||
url: this.propUrl+'?'+this.propFormName+'=' + keywords
|
||||
});
|
||||
},
|
||||
}
|
||||
|
|
|
|||
21
pages.json
21
pages.json
|
|
@ -667,6 +667,27 @@
|
|||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "标签详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/plugins/blog/index/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "博客"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/plugins/blog/search/search",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "博文搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/plugins/blog/detail/detail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "博文详情"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [],
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<view v-if="(data || null) != null">
|
||||
<!-- 搜索 -->
|
||||
<block v-if="(data.is_header || 0) == 1">
|
||||
<!-- 搜索框 -->
|
||||
<view class="padding-main bg-white">
|
||||
<component-search></component-search>
|
||||
<!-- 搜索框 -->
|
||||
<view class="padding-main bg-white">
|
||||
<component-search prop-placeholder="输入商品名称搜索"></component-search>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<!-- 结尾 -->
|
||||
<block v-if="(data.is_footer || 0) == 1">
|
||||
<!-- 结尾 -->
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :prop-status="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
</view>
|
||||
|
|
@ -25,9 +25,9 @@
|
|||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentLayout from "../../components/layout/layout";
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentLayout from "../../components/layout/layout";
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
import componentBottomLine from "../../components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
|
|
@ -43,9 +43,9 @@
|
|||
},
|
||||
|
||||
components: {
|
||||
componentLayout,
|
||||
componentSearch,
|
||||
componentNoData,
|
||||
componentLayout,
|
||||
componentSearch,
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
props: {},
|
||||
|
|
@ -59,8 +59,8 @@
|
|||
},
|
||||
|
||||
onShow() {
|
||||
this.get_data();
|
||||
|
||||
this.get_data();
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
@ -110,8 +110,8 @@
|
|||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: true
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 标题名称
|
||||
if ((this.data || null) != null) {
|
||||
uni.setNavigationBarTitle({
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 搜索框 -->
|
||||
<view class="nav-search padding-horizontal-main bg-white" :style="'padding-top:'+(status_bar_height+5)+'px;'">
|
||||
<component-search></component-search>
|
||||
</view>
|
||||
|
||||
<!-- 分类内容 -->
|
||||
<view>
|
||||
<!-- 搜索框 -->
|
||||
<view class="nav-search padding-horizontal-main bg-white" :style="'padding-top:'+(status_bar_height+5)+'px;'">
|
||||
<component-search prop-placeholder="输入商品名称搜索"></component-search>
|
||||
</view>
|
||||
|
||||
<!-- 分类内容 -->
|
||||
<view v-if="data_list.length > 0" class="category-content" :style="'height:calc(100vh - '+(status_bar_height+45)+'px);'">
|
||||
<block v-if="category_show_level == 1">
|
||||
<!-- 一级模式 -->
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
<view class="right-container">
|
||||
<!-- 一级内基础容 -->
|
||||
<view v-if="(data_content || null) != null" class="right-content padding-top-main padding-left-main padding-right-main">
|
||||
<view v-if="(data_content || null) != null" class="right-content padding-top-main padding-left-main padding-right-main">
|
||||
<!-- 一级基础信息 -->
|
||||
<view v-if="(data_content.vice_name || null) != null || (data_content.describe || null) != null" class="one-content bg-white padding-main border-radius-main spacing-mb" :data-value="data_content.id" @tap="category_event">
|
||||
<view v-if="(data_content.vice_name || null) != null" class="one-vice-name text-size" :style="'color:' + data_content.bg_color + ';'">{{data_content.vice_name}}</view>
|
||||
|
|
@ -54,11 +54,11 @@
|
|||
</block>
|
||||
<!-- 三级模式 -->
|
||||
<block v-if="category_show_level == 3">
|
||||
<block v-for="(v, index) in data_content.items" :key="index">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">{{v.name}}</text>
|
||||
<text v-if="floor.describe.length > 0" class="vice-name margin-left-lg cr-gray">{{floor.describe}}</text>
|
||||
<view :data-value="v.id" @tap="category_event" class="arrow-right padding-right-xxxl cr-gray fr">更多</view>
|
||||
<block v-for="(v, index) in data_content.items" :key="index">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper">{{v.name}}</text>
|
||||
<text v-if="floor.describe.length > 0" class="vice-name margin-left-lg cr-gray">{{floor.describe}}</text>
|
||||
<view :data-value="v.id" @tap="category_event" class="arrow-right padding-right-xxxl cr-gray fr">更多</view>
|
||||
</view>
|
||||
<view v-if="v.items.length > 0" class="bg-white oh padding-main border-radius-main spacing-mb">
|
||||
<block v-for="(vs, index2) in v.items" :key="index2">
|
||||
|
|
@ -73,17 +73,17 @@
|
|||
</block>
|
||||
</block>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data prop-status="0" prop-msg="没有子分类数据"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view v-if="data_list.length == 0 && data_list_loding_status != 0">
|
||||
<!-- 提示信息 -->
|
||||
<view v-if="data_list.length == 0 && data_list_loding_status != 0">
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :prop-status="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
|
|
@ -93,14 +93,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
const app = getApp();
|
||||
import componentSearch from "../../components/search/search";
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentQuickNav from "../../components/quick-nav/quick-nav";
|
||||
import componentNoData from "../../components/no-data/no-data";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight')),
|
||||
data_list_loding_status: 1,
|
||||
nav_active_index: 0,
|
||||
|
|
@ -112,20 +112,20 @@
|
|||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
components: {
|
||||
componentSearch,
|
||||
componentQuickNav,
|
||||
componentQuickNav,
|
||||
componentNoData
|
||||
},
|
||||
props: {},
|
||||
|
||||
onShow() {
|
||||
onShow() {
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<text class="fr cr-red" @tap="map_remove_event">清除</text>
|
||||
</view>
|
||||
<!-- 搜索关键字 -->
|
||||
<input type="text" confirm-type="done" placeholder="其实搜索很简单^_^ !" name="wd" :value="(post_data.wd || '')" class="map-keywords wh-auto round bg-base margin-top-lg" placeholder-class="cr-grey">
|
||||
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^ !" name="wd" :value="(post_data.wd || '')" class="map-keywords wh-auto round bg-base margin-top-lg" placeholder-class="cr-grey">
|
||||
</view>
|
||||
|
||||
<!-- 品牌 -->
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<template>
|
||||
<template>
|
||||
<view>
|
||||
<view :class="(plugins_mourning_data || 0) == 1 ? 'grayscale' : ''">
|
||||
<!-- 顶部内容 -->
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<view v-if="load_status == 1" :class="search_is_fixed == 1 ? 'search-content-fixed bg-main' : ''" :style="search_is_fixed == 1 ? top_content_style : ''">
|
||||
<view :style="search_style">
|
||||
<view class="margin-horizontal-main">
|
||||
<component-search prop-bg-color="#fff"></component-search>
|
||||
<component-search prop-placeholder="输入商品名称搜索" prop-bg-color="#fff"></component-search>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -31,26 +31,26 @@
|
|||
|
||||
<!-- 商城公告 -->
|
||||
<view class="notice-content spacing-mb" v-if="load_status == 1 && (common_shop_notice || null) != null">{{common_shop_notice}}</view>
|
||||
|
||||
<!-- 推荐文章 -->
|
||||
<view v-if="article_list.length > 0" class="article-list border-radius-main bg-white oh br-main spacing-mb">
|
||||
<text class="text-size-sm va-m fw-b bg-main cr-white padding-top-xl padding-bottom-xl padding-horizontal-main" data-value="/pages/article-category/article-category" @tap="url_event">商城资讯</text>
|
||||
<swiper class="dis-inline-block va-m margin-left-lg margin-vertical-main" :vertical="true" :autoplay="true" :circular="true" display-multiple-items="1" interval="3000">
|
||||
<block v-for="(item, index) in article_list" :key="index">
|
||||
<swiper-item class="single-text">
|
||||
<text class="cr-base" :data-value="item.category_url" @tap="url_event">[{{item.article_category_name}}]</text>
|
||||
<text class="margin-left-xs cr-base" :style="(item.title_color || null) != null ? 'color:'+item.title_color+' !important;' : ''" :data-value="item.url" @tap="url_event">{{item.title}}</text>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 首页中间广告 - 插件 -->
|
||||
<view v-if="(plugins_homemiddleadv_data || null) != null && plugins_homemiddleadv_data.length > 0" class="plugins-homemiddleadv oh">
|
||||
<view v-for="(item,index) in plugins_homemiddleadv_data" :key="index" class="item border-radius-main oh spacing-mb" :data-value="item.url || ''" @tap="url_event">
|
||||
<image class="dis-block wh-auto border-radius-main" :src="item.images" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 推荐文章 -->
|
||||
<view v-if="article_list.length > 0" class="article-list border-radius-main bg-white oh br-main spacing-mb">
|
||||
<text class="text-size-sm va-m fw-b bg-main cr-white padding-top-xl padding-bottom-xl padding-horizontal-main" data-value="/pages/article-category/article-category" @tap="url_event">商城资讯</text>
|
||||
<swiper class="dis-inline-block va-m margin-left-lg margin-vertical-main" :vertical="true" :autoplay="true" :circular="true" display-multiple-items="1" interval="3000">
|
||||
<block v-for="(item, index) in article_list" :key="index">
|
||||
<swiper-item class="single-text">
|
||||
<text class="cr-base" :data-value="item.category_url" @tap="url_event">[{{item.article_category_name}}]</text>
|
||||
<text class="margin-left-xs cr-base" :style="(item.title_color || null) != null ? 'color:'+item.title_color+' !important;' : ''" :data-value="item.url" @tap="url_event">{{item.title}}</text>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 首页中间广告 - 插件 -->
|
||||
<view v-if="(plugins_homemiddleadv_data || null) != null && plugins_homemiddleadv_data.length > 0" class="plugins-homemiddleadv oh">
|
||||
<view v-for="(item,index) in plugins_homemiddleadv_data" :key="index" class="item border-radius-main oh spacing-mb" :data-value="item.url || ''" @tap="url_event">
|
||||
<image class="dis-block wh-auto border-radius-main" :src="item.images" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 限时秒杀 - 插件 -->
|
||||
<view v-if="plugins_seckill_is_valid == 1 && plugins_seckill_data.goods.length > 0" class="seckill spacing-mb">
|
||||
|
|
@ -62,10 +62,10 @@
|
|||
<navigator url="/pages/plugins/seckill/index/index" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="goods-list scroll-view-horizontal border-radius-main oh">
|
||||
<swiper :vertical="false" :autoplay="(plugins_seckill_data.base || null) != null && (plugins_seckill_data.base.is_home_auto_play || 0) == 1" :circular="true" :display-multiple-items="plugins_seckill_data.goods.length < 3 ? plugins_seckill_data.goods.length : 3" interval="3000">
|
||||
<block v-for="(item, index) in plugins_seckill_data.goods" :key="index">
|
||||
<swiper :vertical="false" :autoplay="(plugins_seckill_data.base || null) != null && (plugins_seckill_data.base.is_home_auto_play || 0) == 1" :circular="true" :display-multiple-items="plugins_seckill_data.goods.length < 3 ? plugins_seckill_data.goods.length : 3" interval="3000">
|
||||
<block v-for="(item, index) in plugins_seckill_data.goods" :key="index">
|
||||
<swiper-item class="padding-right-main">
|
||||
<view class="item bg-white border-radius-main oh pr ht-auto">
|
||||
<view class="item bg-white border-radius-main oh pr ht-auto">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + item.goods_id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="item.images" mode="aspectFit"></image>
|
||||
|
|
@ -75,65 +75,65 @@
|
|||
<view v-if="(item.min_original_price || null) != null && item.min_original_price > 0" class="original-price single-text">{{currency_symbol}}{{item.min_original_price}}</view>
|
||||
<uni-icons type="cart" size="16" color="#E02020" class="icon pa"></uni-icons>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(item.goods_id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(item.goods_id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 活动信息-楼层顶部 - 插件 -->
|
||||
<view v-if="(plugins_activity_data || null) != null && plugins_activity_data.length > 0" class="activity">
|
||||
<block v-for="(floor, index) in plugins_activity_data" :key="index">
|
||||
<view v-if="floor.goods_list.length > 0 && (floor.home_data_location || 0) == 0" class="floor">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.vice_title}}</text>
|
||||
<navigator :url="'/pages/plugins/activity/detail/detail?id=' + floor.id" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="floor-list wh-auto oh">
|
||||
<view v-if="floor.keywords_arr.length > 0" class="word scroll-view-horizontal">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in floor.keywords_arr" :key="ki">
|
||||
<navigator :url="'/pages/goods-search/goods-search?keywords=' + kv" hover-class="none" class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">{{kv}}</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="goods-list margin-top-lg">
|
||||
<view v-for="(goods, index2) in floor.goods_list" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + goods.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="goods.images" mode="aspectFit"></image>
|
||||
<view class="goods-base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm">{{goods.title}}</view>
|
||||
<view class="sales-price">{{currency_symbol}}{{goods.min_price}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 活动信息-楼层顶部 - 插件 -->
|
||||
<view v-if="(plugins_activity_data || null) != null && plugins_activity_data.length > 0" class="activity">
|
||||
<block v-for="(floor, index) in plugins_activity_data" :key="index">
|
||||
<view v-if="floor.goods_list.length > 0 && (floor.home_data_location || 0) == 0" class="floor">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.vice_title}}</text>
|
||||
<navigator :url="'/pages/plugins/activity/detail/detail?id=' + floor.id" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="floor-list wh-auto oh">
|
||||
<view v-if="floor.keywords_arr.length > 0" class="word scroll-view-horizontal">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in floor.keywords_arr" :key="ki">
|
||||
<navigator :url="'/pages/goods-search/goods-search?keywords=' + kv" hover-class="none" class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">{{kv}}</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="goods-list margin-top-lg">
|
||||
<view v-for="(goods, index2) in floor.goods_list" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + goods.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="goods.images" mode="aspectFit"></image>
|
||||
<view class="goods-base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm">{{goods.title}}</view>
|
||||
<view class="sales-price">{{currency_symbol}}{{goods.min_price}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 楼层数据 -->
|
||||
<block v-if="(data_list || nul) != null && data_list.length > 0">
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
</scroll-view>
|
||||
</view>
|
||||
<view v-if="floor.goods.length > 0" class="goods-list margin-top-lg">
|
||||
<view v-for="(goods, index2) in floor.goods" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<view v-for="(goods, index2) in floor.goods" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + goods.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="goods.images" mode="aspectFit"></image>
|
||||
|
|
@ -167,64 +167,64 @@
|
|||
<view class="goods-title multi-text margin-bottom-sm">{{goods.title}}</view>
|
||||
<view class="sales-price">{{currency_symbol}}{{goods.min_price}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<!-- 活动信息-楼层底部 - 插件 -->
|
||||
<view v-if="(plugins_activity_data || null) != null && plugins_activity_data.length > 0" class="activity">
|
||||
<block v-for="(floor, index) in plugins_activity_data" :key="index">
|
||||
<view v-if="floor.goods_list.length > 0 && (floor.home_data_location || 0) == 1" class="floor">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.vice_title}}</text>
|
||||
<navigator :url="'/pages/plugins/activity/detail/detail?id=' + floor.id" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="floor-list wh-auto oh">
|
||||
<view v-if="floor.keywords_arr.length > 0" class="word scroll-view-horizontal">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in floor.keywords_arr" :key="ki">
|
||||
<navigator :url="'/pages/goods-search/goods-search?keywords=' + kv" hover-class="none" class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">{{kv}}</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="goods-list margin-top-lg">
|
||||
<view v-for="(goods, index2) in floor.goods_list" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + goods.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="goods.images" mode="aspectFit"></image>
|
||||
<view class="goods-base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm">{{goods.title}}</view>
|
||||
<view class="sales-price">{{currency_symbol}}{{goods.min_price}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<!-- 活动信息-楼层底部 - 插件 -->
|
||||
<view v-if="(plugins_activity_data || null) != null && plugins_activity_data.length > 0" class="activity">
|
||||
<block v-for="(floor, index) in plugins_activity_data" :key="index">
|
||||
<view v-if="floor.goods_list.length > 0 && (floor.home_data_location || 0) == 1" class="floor">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="text-wrapper" :style="'color:'+(floor.color || '#333')+';'">{{floor.title}}</text>
|
||||
<text v-if="(floor.vice_title || null) != null" class="vice-name margin-left-lg cr-gray">{{floor.vice_title}}</text>
|
||||
<navigator :url="'/pages/plugins/activity/detail/detail?id=' + floor.id" hover-class="none" class="arrow-right padding-right-xxxl cr-gray fr">更多</navigator>
|
||||
</view>
|
||||
<view class="floor-list wh-auto oh">
|
||||
<view v-if="floor.keywords_arr.length > 0" class="word scroll-view-horizontal">
|
||||
<scroll-view scroll-x>
|
||||
<block v-for="(kv, ki) in floor.keywords_arr" :key="ki">
|
||||
<navigator :url="'/pages/goods-search/goods-search?keywords=' + kv" hover-class="none" class="word-icon dis-inline-block bg-main-light text-size-xs cr-main round padding-top-xs padding-bottom-xs padding-left padding-right">{{kv}}</navigator>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="goods-list margin-top-lg">
|
||||
<view v-for="(goods, index2) in floor.goods_list" :key="index2" class="goods bg-white border-radius-main oh pr">
|
||||
<!-- 商品主体内容 -->
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + goods.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="goods.images" mode="aspectFit"></image>
|
||||
<view class="goods-base padding-horizontal-main margin-top-sm">
|
||||
<view class="goods-title multi-text margin-bottom-sm">{{goods.title}}</view>
|
||||
<view class="sales-price">{{currency_symbol}}{{goods.min_price}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- 标签插件 -->
|
||||
<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 v-if="lv.goods_ids.indexOf(goods.id) != -1" 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>
|
||||
<image v-else class="dis-block" :src="lv.icon" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!--- 底部购买记录 - 插件 -->
|
||||
|
|
@ -255,14 +255,14 @@
|
|||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹屏广告 - 插件 -->
|
||||
<view v-if="(plugins_popupscreen_data || null) != null && plugins_popupscreen_status == 1" class="plugins-popupscreen wh-auto ht-auto">
|
||||
<view class="content pr">
|
||||
<icon type="clear" size="20" class="close pa" @tap.stop="plugins_popupscreen_close_event"></icon>
|
||||
<image class="dis-block auto" :src="plugins_popupscreen_data.images" mode="widthFix" :data-value="plugins_popupscreen_data.images_url || ''" @tap="url_event"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹屏广告 - 插件 -->
|
||||
<view v-if="(plugins_popupscreen_data || null) != null && plugins_popupscreen_status == 1" class="plugins-popupscreen wh-auto ht-auto">
|
||||
<view class="content pr">
|
||||
<icon type="clear" size="20" class="close pa" @tap.stop="plugins_popupscreen_close_event"></icon>
|
||||
<image class="dis-block auto" :src="plugins_popupscreen_data.images" mode="widthFix" :data-value="plugins_popupscreen_data.images_url || ''" @tap="url_event"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 留言 -->
|
||||
|
|
@ -271,21 +271,21 @@
|
|||
<image mode="widthFix" :src="static_url+'answer-form.jpg'" class="wh-auto border-radius-main"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<block v-if="load_status == 0">
|
||||
<component-no-data :prop-status="data_list_loding_status" :prop-msg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :prop-status="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<view v-if="load_status == 1">
|
||||
<component-copyright></component-copyright>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<block v-if="load_status == 0">
|
||||
<component-no-data :prop-status="data_list_loding_status" :prop-msg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :prop-status="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<view v-if="load_status == 1">
|
||||
<component-copyright></component-copyright>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 在线客服 -->
|
||||
<component-online-service :prop-is-nav="true" :prop-is-grayscale="plugins_mourning_data || 0"></component-online-service>
|
||||
|
|
@ -321,7 +321,7 @@
|
|||
data_bottom_line_status: false,
|
||||
data_list: [],
|
||||
banner_list: [],
|
||||
navigation: [],
|
||||
navigation: [],
|
||||
article_list: [],
|
||||
// 基础配置
|
||||
currency_symbol: app.globalData.data.currency_symbol,
|
||||
|
|
@ -330,30 +330,30 @@
|
|||
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,
|
||||
// 顶部+搜索样式配置
|
||||
top_content_style: 'background-image: url("'+static_url+'nav-top.png");'+'padding-top:'+(parseInt(app.globalData.get_system_info('statusBarHeight'))+5)+'px;',
|
||||
search_style: '',
|
||||
common_app_is_online_service: 0,
|
||||
// 名称
|
||||
application_title: app.globalData.data.application_title,
|
||||
// 顶部+搜索样式配置
|
||||
top_content_style: 'background-image: url("'+static_url+'nav-top.png");'+'padding-top:'+(parseInt(app.globalData.get_system_info('statusBarHeight'))+5)+'px;',
|
||||
search_style: '',
|
||||
search_is_fixed: 0,
|
||||
// 限时秒杀插件
|
||||
plugins_seckill_is_valid: 0,
|
||||
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_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: 0
|
||||
};
|
||||
},
|
||||
|
|
@ -448,25 +448,25 @@
|
|||
});
|
||||
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_bottom_line_status: true,
|
||||
banner_list: data.banner_list || [],
|
||||
navigation: data.navigation || [],
|
||||
navigation: data.navigation || [],
|
||||
article_list: data.article_list || [],
|
||||
data_list: data.data_list,
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
plugins_seckill_data: data.plugins_seckill_data || null,
|
||||
plugins_seckill_is_valid: (data.plugins_seckill_data || null) != null && (data.plugins_seckill_data.is_valid || 0) == 1 ? 1 : 0,
|
||||
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_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: data.plugins_mourning_data || 0
|
||||
});
|
||||
|
||||
// 弹屏广告插件处理
|
||||
});
|
||||
|
||||
// 弹屏广告插件处理
|
||||
this.plugins_popupscreen_handle();
|
||||
|
||||
// 导航购物车处理
|
||||
|
|
@ -478,7 +478,7 @@
|
|||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
data_bottom_line_status: true
|
||||
});
|
||||
|
|
@ -488,7 +488,7 @@
|
|||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: '服务器请求出错',
|
||||
data_bottom_line_status: true,
|
||||
load_status: 1
|
||||
|
|
@ -496,64 +496,64 @@
|
|||
app.globalData.showToast("服务器请求出错");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 35 ? 35 : e.scrollTop;
|
||||
var num = top*7;
|
||||
var val = (num > 220) ? 220 : num;
|
||||
this.setData({
|
||||
search_style: 'width: calc(100% - '+val+'rpx);',
|
||||
search_is_fixed: (top >= 35) ? 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);
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 35 ? 35 : e.scrollTop;
|
||||
var num = top*7;
|
||||
var val = (num > 220) ? 220 : num;
|
||||
this.setData({
|
||||
search_style: 'width: calc(100% - '+val+'rpx);',
|
||||
search_is_fixed: (top >= 35) ? 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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,9 +87,12 @@
|
|||
},
|
||||
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 获取数据
|
||||
this.get_data();
|
||||
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
@ -119,7 +122,18 @@
|
|||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@
|
|||
.scroll-box {
|
||||
height: calc(100vh - 150rpx);
|
||||
}
|
||||
.data-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
.data-list .item {
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="30">
|
||||
<view v-if="data_list.length > 0" class="data-list padding-horizontal-main padding-top-main">
|
||||
<view v-if="data_list.length > 0" class="data-list oh padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-bottom-sm border-radius-main bg-white margin-bottom-main oh">
|
||||
<navigator :url="'/pages/goods-detail/goods-detail?goods_id=' + item.id" hover-class="none">
|
||||
<image class="goods-img dis-block" :src="item.images" mode="aspectFit"></image>
|
||||
|
|
@ -100,12 +100,12 @@
|
|||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 数据加载
|
||||
this.get_data();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
|
|
|
|||
|
|
@ -98,9 +98,12 @@
|
|||
},
|
||||
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 获取数据
|
||||
this.get_data();
|
||||
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
@ -130,7 +133,18 @@
|
|||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -87,9 +87,12 @@
|
|||
onLoad() {},
|
||||
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 获取数据
|
||||
this.get_data();
|
||||
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
@ -119,7 +122,18 @@
|
|||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
|
||||
// 显示分享菜单
|
||||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -139,12 +139,12 @@
|
|||
app.globalData.show_share_menu();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
onShow() {
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
|
|
|
|||
Loading…
Reference in New Issue