master
sws 2023-09-27 16:11:09 +08:00
parent 5693f05d62
commit 29eb2d576b
8 changed files with 433 additions and 399 deletions

10
App.vue
View File

@ -67,11 +67,11 @@
// tabbar
tabbar_pages: ['/pages/index/index', '/pages/goods-category/goods-category', '/pages/cart/cart', '/pages/user/user'],
//
request_url: 'https://d1.shopxo.vip/',
// request_url: 'http://shopxo.com/',
// request_url: 'https://d1.shopxo.vip/',
request_url: 'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url: 'https://d1.shopxo.vip/',
// static_url: 'http://shopxo.com/',
// static_url: 'https://d1.shopxo.vip/',
static_url: 'http://shopxo.com/',
// default
system_type: 'default',
//
@ -1885,7 +1885,7 @@
//
if (query.length < 1) {
//url
window.history.replaceState({ path: url }, '', url);
window.history.replaceState({ path: url.split('?')[0] }, '', url.split('?')[0]);
} else {
query.forEach((item) => {
let re = new RegExp('([?&])' + item.key + '=.*?(&|$)', 'i');

View File

@ -506,6 +506,26 @@ button:before {
border-right: 1px solid #f5f5f5 !important;
}
.br-e {
border: 1px solid #eeeeee !important;
}
.br-b-e {
border-bottom: 1px solid #eeeeee !important;
}
.br-t-e {
border-top: 1px solid #eeeeee !important;
}
.br-l-e {
border-left: 1px solid #eeeeee !important;
}
.br-r-e {
border-right: 1px solid #eeeeee !important;
}
.br-red {
border: 1px solid #E22C08 !important;
}

View File

@ -1,57 +1,69 @@
<template>
<view>
<view>
<view v-if="(propConfig || null) != null && (propData || null) != null && propData.length > 0">
<block v-for="(floor, index) in propData" :key="index">
<block v-if="floor.goods_list.length > 0 && floor.home_data_location == propLocation">
<component-goods-list :propData="floor" propMoreUrlKey="url" :propLabel="propLabel" :propIsAutoPlay="(propConfig.is_home_auto_play || 0) == 1" :propCurrencySymbol="propCurrencySymbol" :propIsCartParaCurve="propIsCartParaCurve" :propSource="propSource"></component-goods-list>
<component-goods-list
:propData="floor"
propMoreUrlKey="url"
:propLabel="propLabel"
:propIsAutoPlay="(propConfig.is_home_auto_play || 0) == 1"
:propCurrencySymbol="propCurrencySymbol"
:propIsCartParaCurve="propIsCartParaCurve"
:propSource="propSource"
:prop-open-cart="floor.style_type === '2' ? false : true"
></component-goods-list>
</block>
</block>
</block>
</view>
</view>
</template>
</view>
</template>
<script>
const app = getApp();
import componentGoodsList from "../goods-list/goods-list";
export default {
data() {
return {};
},
import componentGoodsList from '../goods-list/goods-list';
export default {
data() {
return {};
},
components: {
componentGoodsList
},
componentGoodsList,
},
props: {
propCurrencySymbol: {
type: String,
default: app.globalData.data.currency_symbol
default: app.globalData.data.currency_symbol,
},
propLocation: {
type: [String,Number],
default: 0
type: [String, Number],
default: 0,
},
propConfig: {
type: [String,Object],
default: null
type: [String, Object],
default: null,
},
propData: {
type: Array,
default: []
type: Array,
default: [],
},
propLabel: {
type: [Array,Object,String],
default: null
type: [Array, Object, String],
default: null,
},
propIsCartParaCurve: {
type: Boolean,
default: false
default: false,
},
//
propSource: {
type: String,
default: ''
}
},
methods: {}
};
</script>
<style>
</style>
default: '',
},
propOpenCart: {
type: Boolean,
default: true,
},
},
methods: {},
};
</script>
<style></style>

View File

@ -1,78 +1,80 @@
<template>
<view>
<view v-if="(data || null) != null && (data_base || null) != null" class="padding-vertical-main">
<view class="padding-horizontal-main">
<view v-if="(data || null) != null && (data_base || null) != null" class="padding-bottom-main">
<view>
<!-- 点赞评论分享 -->
<view v-if="propType == 'detail'" class="tc padding-vertical-main blog-comments-bottom-container">
<view v-if="propType == 'detail'" class="tr blog-comments-bottom-container spacing-mt cr-grey padding-horizontal-main">
<view v-if="(data_base.is_blog_comments_show || 0) == 1" class="item dis-inline-block" :data-value="'/pages/plugins/blog/comments/comments?id=' + data.id" @tap="url_event">
<view class="va-m dis-inline-block">
<uni-icons type="chat" size="30rpx" color="#999"></uni-icons>
</view>
<text class="cr-grey va-m text-size-xs">评论({{ data.comments_count }})</text>
<iconfont name="icon-bowenxiangqing-huifu" size="28rpx" class="pr top-sm margin-right-xs"></iconfont>
<text class="text-size-xs">评论({{ data.comments_count }})</text>
</view>
<view v-if="(data_base.is_blog_give_thumbs || 0) == 1" class="item dis-inline-block" :data-blogid="data.id" @tap="give_thumbs_event">
<view class="va-m dis-inline-block">
<uni-icons type="hand-up" size="30rpx" :styleClass="'cr-' + ((data.is_give_thumbs || 0) == 1 ? 'main' : 'grey')"></uni-icons>
</view>
<text :class="'va-m text-size-xs cr-' + ((data.is_give_thumbs || 0) == 1 ? 'main' : 'grey')">点赞({{ data.give_thumbs_count }})</text>
<view v-if="(data_base.is_blog_give_thumbs || 0) == 1" :class="'item dis-inline-block cr-' + ((data.is_give_thumbs || 0) == 1 ? 'main' : 'grey')" :data-blogid="data.id" @tap="give_thumbs_event">
<iconfont :name="(data.is_give_thumbs || 0) == 1 ? 'icon-bowenxiangqing-dianzan-xuaz' : 'icon-bowenxiangqing-dianzan'" size="28rpx" class="pr top-sm margin-right-xs"></iconfont>
<text class="va-m text-size-xs">点赞({{ data.give_thumbs_count }})</text>
</view>
<view class="item dis-inline-block" @tap="popup_share_event">
<view class="va-m dis-inline-block">
<uni-icons type="redo" size="30rpx" color="#999"></uni-icons>
</view>
<text class="cr-grey va-m text-size-xs">分享</text>
<iconfont name="icon-bowenxiangqing-fenxiang" size="28rpx" class="pr top-sm margin-right-xs"></iconfont>
<text class="text-size-xs">分享</text>
</view>
</view>
<!-- 评论回复表单 -->
<view v-if="(data_base.is_blog_comments_add || 0) == 1 && !input_comments_modal_status" class="padding-top-lg margin-bottom-xl oh padding-bottom-xl blog-comments-reply-container">
<view v-if="(data_base.is_blog_comments_add || 0) == 1 && !input_comments_modal_status" class="padding-top-xxxl padding-bottom-xxl padding-horizontal-main blog-comments-reply-container flex-row jc-sb spacing-mb">
<image :src="avatar" mode="aspectFill" class="user-avatar fl circle"></image>
<view class="right-base fr">
<view class="right-base flex-1 flex-width">
<view class="bg-white border-radius-main padding-main">
<textarea placeholder="期待您的发言..." placeholder-class="cr-grey" class="wh-auto" :value="input_comments_value" :maxlength="input_comments_length_max" @input="comments_input_event" @blur="comments_input_event"></textarea>
</view>
<view class="margin-top-lg oh">
<image :src="common_static_url + 'emoji-icon.png'" mode="aspectFill" class="emoji-icon va-m" @tap="emoji_event"></image>
<view class="fr">
<text class="va-m text-size-xs cr-grey margin-right-lg">剩余{{ input_comments_length_value }}</text>
<button type="default" size="mini" class="bg-main br-main cr-white round text-size-xs va-m" @tap="comments_event"></button>
<view class="oh flex-row jc-sb align-e">
<image :src="common_static_url + 'emoji-icon.png'" mode="aspectFill" class="emoji-icon va-m" @tap="emoji_event"></image>
<view class="flex-row align-e">
<text class="text-size-xs cr-grey-d margin-right-sm">剩余{{ input_comments_length_value }}</text>
<button type="default" size="mini" class="comment-btn cr-white border-radius-sm text-size-md va-m" :class="input_comments_value.length > 0 ? 'bg-main br-main ' : 'br-grey-d bg-grey-d'" @tap="comments_event"></button>
</view>
</view>
</view>
</view>
</view>
<!-- 评论回复内容 -->
<view v-if="(data_base.is_blog_comments_show || 0) == 1 && (data.comments_list || null) != null && data.comments_list.length > 0" class="blog-comments-list bg-white border-radius-main margin-bottom-xxxl">
<view v-if="(data_base.is_blog_comments_show || 0) == 1 && (data.comments_list || null) != null && data.comments_list.length > 0" class="blog-comments-list margin-bottom-xxxl padding-left-main">
<block v-for="(item, index) in data.comments_list" :key="index">
<view class="item oh padding-horizontal-main padding-top-xxl padding-bottom-xxl text-size-xs">
<view class="item oh flex-row jc-sb">
<image :src="item.user.avatar" mode="aspectFill" class="user-avatar circle fl"></image>
<view class="fr right-content">
<view class="right-content padding-bottom-main margin-bottom-main br-b-e flex-1 flex-width">
<view class="comments-base oh">
<span class="username cr-base">{{ item.user.user_name_view }}</span>
<span class="cr-grey margin-left-lg">{{ item.add_time }}</span>
<view class="fr blog-comments-right-content-operate">
<view v-if="(data_base.is_blog_comments_show || 0) == 1" class="item dis-inline-block" :data-index="index" :data-username="item.user.user_name_view" :data-blogcommentsid="item.id" @tap="modal_open_event">
<view class="va-m dis-inline-block">
<uni-icons type="chat" size="30rpx" color="#999"></uni-icons>
</view>
<text class="cr-grey va-m">回复({{ item.comments_count }})</text>
</view>
<view v-if="(data_base.is_blog_give_thumbs || 0) == 1" class="item dis-inline-block">
<view class="va-m dis-inline-block">
<uni-icons type="hand-up" size="30rpx" :styleClass="'cr-' + ((item.is_give_thumbs || 0) == 1 ? 'main' : 'grey')"></uni-icons>
</view>
<text :class="'va-m cr-' + ((item.is_give_thumbs || 0) == 1 ? 'main' : 'grey')" data-type="1" :data-index="index" :data-blogid="item.blog_id" :data-blogcommentsid="item.id" @tap="give_thumbs_event">({{ item.give_thumbs_count }})</text>
</view>
<span class="username fw-b">{{ item.user.user_name_view }}</span>
<span class="cr-grey-9 margin-left-main">{{ item.add_time }}</span>
</view>
<view class="margin-top-sm comments-content">{{ item.content }}</view>
<view class="blog-comments-right-content-operate margin-top-main flex-row jc-e align-c text-size-xs cr-grey-9">
<view v-if="(data_base.is_blog_comments_show || 0) == 1" class="item dis-inline-block" :data-index="index" :data-username="item.user.user_name_view" :data-blogcommentsid="item.id" @tap="modal_open_event">
<iconfont name="icon-bowenxiangqing-huifu" size="28rpx" class="pr top-md margin-right-xs"></iconfont>
<text class="va-m">回复({{ item.comments_count }})</text>
</view>
<view
v-if="(data_base.is_blog_give_thumbs || 0) == 1"
:class="'item dis-inline-block margin-left-xxxl padding-left-sm cr-' + ((item.is_give_thumbs || 0) == 1 ? 'main' : '')"
data-type="1"
:data-index="index"
:data-blogid="item.blog_id"
:data-blogcommentsid="item.id"
@tap="give_thumbs_event"
>
<iconfont :name="(item.is_give_thumbs || 0) == 1 ? 'icon-bowenxiangqing-dianzan-xuaz' : 'icon-bowenxiangqing-dianzan'" size="28rpx" class="pr top-md margin-right-xs"></iconfont>
<text class="va-m">点赞({{ item.give_thumbs_count }})</text>
</view>
</view>
<view class="margin-top-xs cr-base comments-content">{{ item.content }}</view>
<view v-if="(item.reply_comments_list || null) != null && item.reply_comments_list.length > 0" class="reply-blog-comments-list">
<block v-for="(comments, index2) in item.reply_comments_list" :key="index2">
<view class="item margin-top-xl padding-bottom-lg oh">
<image :src="comments.user.avatar" mode="aspectFill" class="user-avatar circle fl"></image>
<view class="fr right-content">
<view class="comments-reply-base oh">
<span class="username cr-base">{{ comments.user.user_name_view }}</span>
<span class="cr-grey margin-left-sm">{{ comments.add_time }}</span>
<view class="fr blog-comments-right-content-operate">
<view class="bg-grey-e">
<view class="item padding-main oh flex-row jc-sb">
<image :src="comments.user.avatar" mode="aspectFill" class="user-avatar circle fl"></image>
<view class="right-content flex-1 flex-width">
<view class="comments-reply-base oh">
<span class="username fw-b">{{ comments.user.user_name_view }}</span>
<span class="cr-grey-9 margin-left-main">{{ comments.add_time }}</span>
</view>
<view v-if="(comments.reply_comments_text || null) != null" class="margin-top-sm reply-content">{{ comments.reply_comments_text }}</view>
<view class="margin-top-sm">{{ comments.content }}</view>
<view class="blog-comments-right-content-operate flex-row jc-e align-c text-size-xs cr-grey-9 padding-0">
<view
v-if="(data_base.is_blog_comments_show || 0) == 1"
class="item dis-inline-block"
@ -82,40 +84,34 @@
:data-replycommentsid="comments.id"
@tap="modal_open_event"
>
<view class="va-m dis-inline-block">
<uni-icons type="chat" size="30rpx" color="#999"></uni-icons>
</view>
<text class="cr-grey va-m text-size-xs">回复({{ comments.comments_count }})</text>
<iconfont name="icon-bowenxiangqing-huifu" size="28rpx" class="pr top-md margin-right-xs"></iconfont>
<text class="va-m">回复({{ comments.comments_count }})</text>
</view>
<view v-if="(data_base.is_blog_give_thumbs || 0) == 1" class="item dis-inline-block">
<view class="va-m dis-inline-block">
<uni-icons type="hand-up" size="30rpx" :styleClass="'cr-' + ((comments.is_give_thumbs || 0) == 1 ? 'main' : 'grey')"></uni-icons>
</view>
<text
:class="'va-m cr-' + ((comments.is_give_thumbs || 0) == 1 ? 'main' : 'grey')"
data-type="2"
:data-index="index"
:data-indexs="index2"
:data-blogid="comments.blog_id"
:data-blogcommentsid="comments.id"
:data-replycommentsid="comments.blog_comments_id"
@tap="give_thumbs_event"
>点赞({{ comments.give_thumbs_count }})</text
>
<view
v-if="(data_base.is_blog_give_thumbs || 0) == 1"
:class="'item dis-inline-block margin-left-xxxl padding-left-sm cr-' + ((comments.is_give_thumbs || 0) == 1 ? 'main' : '')"
data-type="2"
:data-index="index"
:data-indexs="index2"
:data-blogid="comments.blog_id"
:data-blogcommentsid="comments.id"
:data-replycommentsid="comments.blog_comments_id"
@tap="give_thumbs_event"
>
<iconfont :name="(comments.is_give_thumbs || 0) == 1 ? 'icon-bowenxiangqing-dianzan-xuaz' : 'icon-bowenxiangqing-dianzan'" size="28rpx" class="pr top-md margin-right-xs"></iconfont>
<text class="va-m">点赞({{ comments.give_thumbs_count }})</text>
</view>
</view>
</view>
<view v-if="(comments.reply_comments_text || null) != null" class="margin-top-sm border-radius-main padding-main reply-content">{{ comments.reply_comments_text }}</view>
<view class="margin-top-sm cr-base">{{ comments.content }}</view>
</view>
</view>
</block>
</view>
<view v-if="(item.comments_count || 0) > 0 && (item.is_comments_list_submit == undefined || item.is_comments_list_submit == 1)" class="margin-top-lg">
<view v-if="(item.comments_count || 0) > 0 && (item.is_comments_list_submit == undefined || item.is_comments_list_submit == 1)" class="margin-top-lg text-size-xs">
<text :data-index="index" :data-blogid="item.blog_id" :data-blogcommentsid="item.id" @tap="comments_list_reply_event">
<text v-if="item.is_comments_list_submit == undefined" class="cr-grey">{{ item.comments_count }}</text>
<text v-else class="cr-grey">查看更多回复</text>
<text class="arrow-bottom padding-horizontal-main"></text>
<iconfont name="icon-mendian-jiantou2" size="24rpx" class="margin-left-xs pr top-xs"></iconfont>
</text>
</view>
</view>
@ -124,14 +120,14 @@
<block v-if="((data_base.blog_detail_comments_more_page_number || 0) == 0 && (data.comments_count || 0) > 20) || ((data_base.blog_detail_comments_more_page_number || 0) > 0 && data.comments_count > data_base.blog_detail_comments_more_page_number)">
<view v-if="propType == 'detail'" class="margin-top-xxl tc padding-bottom-xxl">
<text :data-value="'/pages/plugins/blog/comments/comments?id=' + data.id" @tap="url_event">
<text class="cr-base fw-b">查看全部{{ data.comments_count }}条评论</text>
<text class="arrow-right padding-horizontal-main"></text>
<text class="cr-grey">查看全部{{ data.comments_count }}条评论</text>
<iconfont name="icon-qiandao-jiantou2" size="24rpx" class="margin-left-xs pr top-xs"></iconfont>
</text>
</view>
<view v-if="propType == 'comments' && (data.is_comments_list_submit == undefined || data.is_comments_list_submit == 1)" class="margin-top-xxl tc padding-bottom-xxl">
<text :data-blogid="data.id" @tap="comments_list_reply_event">
<text class="cr-base fw-b">查看更多评论</text>
<text class="arrow-bottom padding-horizontal-main"></text>
<text class="cr-grey">查看更多评论</text>
<iconfont name="icon-mendian-jiantou2" size="24rpx" class="margin-left-xs pr top-xs"></iconfont>
</text>
</view>
</block>
@ -153,7 +149,7 @@
<image :src="common_static_url + 'emoji-icon.png'" mode="aspectFill" class="emoji-icon va-m" @tap="emoji_event"></image>
<view class="fr">
<text class="va-m text-size-xs cr-grey margin-right-lg">剩余{{ input_comments_length_value }}</text>
<button type="default" size="mini" class="bg-main br-main cr-white round text-size-xs va-m" @tap="comments_event"></button>
<button type="default" size="mini" class="comment-btn cr-white border-radius-sm text-size-xs va-m" :class="input_comments_value.length > 0 ? 'bg-main br-main ' : 'br-grey-d bg-grey-d'" @tap="comments_event"></button>
</view>
</view>
</view>
@ -246,6 +242,7 @@
input_comments_modal_username: '',
input_comments_modal_blog_comments_id: 0,
input_comments_modal_reply_comments_id: 0,
input_comments_value: '',
});
},
@ -269,6 +266,7 @@
var reply_comments_id = e.currentTarget.dataset.replycommentsid || 0;
this.setData({
input_comments_modal_status: true,
input_comments_value: '',
input_comments_modal_index: index,
input_comments_modal_username: username,
input_comments_modal_blog_comments_id: blog_comments_id,
@ -534,12 +532,12 @@
},
};
</script>
<style>
<style scoped>
/**
* 聚合点赞评论分享
*/
.blog-comments-bottom-container .item:not(:last-child) {
margin-right: 50rpx;
margin-right: 64rpx;
}
.blog-comments-reply-container .emoji-icon,
.blog-comments-modal .emoji-icon {
@ -547,12 +545,12 @@
height: 40rpx !important;
}
.blog-comments-reply-container .user-avatar {
width: 100rpx;
height: 100rpx !important;
width: 72rpx;
height: 72rpx !important;
border: 1px solid #eee;
}
.blog-comments-reply-container .right-base {
width: calc(100% - 130rpx);
padding-left: 16rpx;
}
.blog-comments-reply-container .right-base textarea {
height: 120rpx;
@ -580,6 +578,11 @@
top: 8rpx;
right: 14rpx;
}
.comment-btn {
height: 56rpx;
line-height: 56rpx;
padding: 0 24rpx;
}
/**
* 评论列表
@ -589,18 +592,19 @@
height: 50rpx;
border: 1px solid #eee;
}
.blog-comments-list > .item:not(:last-child) {
border-bottom: 1px dashed #f6f6f6;
.blog-comments-list .comments-base,
.blog-comments-list .comments-content {
padding-left: 16rpx;
padding-right: 20rpx;
}
.blog-comments-list > .item .right-content {
width: calc(100% - 70rpx);
.blog-comments-right-content-operate,
.reply-blog-comments-list {
padding-right: 20rpx;
}
.blog-comments-list > .item .right-content .reply-content {
background: #f3fafc;
border: 1px solid #e5f6ff;
color: #617580;
.reply-blog-comments-list {
margin-top: 28rpx;
}
.blog-comments-right-content-operate > .item:not(:last-child) {
margin-right: 30rpx;
.reply-blog-comments-list .right-content {
padding-left: 16rpx;
}
</style>

View File

@ -24,8 +24,8 @@
<style scoped>
/* iconfont.css全局注册需要将src切换成绝对路径 */
/* @/static/icon/ */
@import url('@/static/icon/iconfont.css');
/* @import url('https://at.alicdn.com/t/c/font_4227145_4zljgwpfojt.css'); */
/* @import url('@/static/icon/iconfont.css'); */
@import url('https://at.alicdn.com/t/c/font_4227145_klds40ixeqs.css');
.iconfont {
display: inline-block;

View File

@ -86,10 +86,10 @@
<!-- 限时秒杀 - 插件 -->
<view
v-if="pv.plugins == 'seckill' && (plugins_seckill_data || null) != null && (plugins_seckill_data.data || null) != null && (plugins_seckill_data.data.goods || null) != null && plugins_seckill_data.data.goods.length > 0"
class="plugins-seckill-data border-radius-main padding-horizontal-main spacing-mb padding-top-main bg-white"
:style="'background-image: url(' + plugins_seckill_data.data.home_bg + ');'"
class="plugins-seckill-data border-radius-main spacing-mb bg-white"
:style="'background-image: url(' + seckill_static_url + 'seckill-bg.png);'"
>
<view class="spacing-nav-title flex-row jc-sb align-c">
<view class="flex-row jc-sb align-c padding-top-main padding-horizontal-main">
<view class="flex-1">
<image class="dis-inline-block va-m icon" :src="plugins_seckill_data.data.home_title_icon" mode="widthFix"></image>
<view class="dis-inline-block va-m margin-left-sm">
@ -176,7 +176,7 @@
<block v-for="(pv, pi) in plugins_sort_list" :key="pi">
<!-- 活动配置-楼层底部 - 插件 -->
<block v-if="pv.plugins == 'activity' && (plugins_activity_data || null) != null">
<component-activity-list :propConfig="plugins_activity_data.base" :propData="plugins_activity_data.data" propLocation="1" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" propSource="index"></component-activity-list>
<component-activity-list :propConfig="plugins_activity_data.base" :propData="plugins_activity_data.data" propLocation="1" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" propSource="index" :prop-open-cart="false"></component-activity-list>
</block>
<!-- 弹屏广告 - 插件 -->
@ -296,6 +296,7 @@
import componentRecommedHot from '@/components/recommend-hot/recommend-hot';
var common_static_url = app.globalData.get_static_url('common');
var seckill_static_url = app.globalData.get_static_url('seckill', true) + 'app/';
var static_url = app.globalData.get_static_url('home');
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
@ -308,6 +309,7 @@
data() {
return {
common_static_url: common_static_url,
seckill_static_url: seckill_static_url,
static_url: static_url,
theme_color: theme_color,
data_list_loding_status: 1,

View File

@ -4,7 +4,7 @@
<view class="padding-horizontal-main">
<view class="padding-main border-radius-main bg-white spacing-mb">
<view class="fw-b text-size-xl">{{ data.title }}</view>
<view class="cr-grey margin-top-lg oh br-t padding-top-main text-size-xs">
<view class="cr-grey-9 margin-top-lg oh br-t padding-top-main text-size-xs">
<view class="fl">
<text>时间</text>
<text>{{ data.add_time }}</text>
@ -29,21 +29,21 @@
<view class="padding-horizontal-main">
<!-- 上一篇下一篇 -->
<view v-if="(last_next || null) != null" class="last-next-data spacing-mb">
<view v-if="(last_next.last || null) != null">
<text class="cr-grey va-m">上一篇</text>
<navigator :url="last_next.last.url" open-type="redirect" hover-class="none" class="dis-inline-block va-m cr-blue">{{ last_next.last.title }}</navigator>
<view v-if="(last_next.last || null) != null" class="flex-row cr-base">
<text>上一篇</text>
<navigator :url="last_next.last.url" open-type="redirect" hover-class="none" class="dis-inline-block flex-row flex-width">{{ last_next.last.title }}</navigator>
</view>
<view v-if="(last_next.next || null) != null" class="margin-top-sm">
<text class="cr-grey va-m">下一篇</text>
<navigator :url="last_next.next.url" open-type="redirect" hover-class="none" class="dis-inline-block va-m cr-blue">{{ last_next.next.title }}</navigator>
<view v-if="(last_next.next || null) != null" class="margin-top-sm flex-row cr-main">
<text>下一篇</text>
<navigator :url="last_next.next.url" open-type="redirect" hover-class="none" class="dis-inline-block flex-row flex-width">{{ last_next.next.title }}</navigator>
</view>
</view>
<!-- 推荐博文 -->
<view v-if="right_list.length > 0" class="plugins-blog-list">
<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 v-for="(item, index) in right_list" class="item oh padding-main border-radius-main bg-white spacing-mb">
<navigator :url="item.url" hover-class="none">
@ -59,9 +59,9 @@
<!-- 相关商品 -->
<view v-if="(data.goods_list || null) != null && data.goods_list.length > 0">
<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: data.goods_list }" :propCurrencySymbol="currency_symbol"></component-goods-list>
</view>
@ -77,135 +77,135 @@
</view>
</template>
<script>
const app = getApp();
import componentNoData from "../../../../components/no-data/no-data";
import componentBottomLine from "../../../../components/bottom-line/bottom-line";
import componentBlogComments from "../../../../components/blog-comments/blog-comments";
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 componentBlogComments from '../../../../components/blog-comments/blog-comments';
import componentGoodsList from '../../../../components/goods-list/goods-list';
var common_static_url = app.globalData.get_static_url("common");
export default {
data() {
return {
common_static_url: common_static_url,
data_list_loding_status: 1,
data_list_loding_msg: "",
data_bottom_line_status: false,
currency_symbol: app.globalData.data.currency_symbol,
client_type: application_client_type(),
params: null,
data_base: null,
data: null,
right_list: [],
last_next: null,
emoji_list: [],
blog_main_name: "博文",
//
share_info: {},
};
},
components: {
componentNoData,
componentBottomLine,
componentBlogComments,
componentGoodsList,
},
props: {},
onLoad(params) {
this.setData({
params: params,
});
//
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");
}
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
return {
common_static_url: common_static_url,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
currency_symbol: app.globalData.data.currency_symbol,
client_type: app.globalData.application_client_type(),
params: null,
data_base: null,
data: null,
right_list: [],
last_next: null,
emoji_list: [],
blog_main_name: '博文',
//
share_info: {},
};
},
//
get_data() {
uni.showLoading({
title: "加载中...",
components: {
componentNoData,
componentBottomLine,
componentBlogComments,
componentGoodsList,
},
props: {},
onLoad(params) {
this.setData({
params: params,
});
uni.request({
url: app.globalData.get_request_url("detail", "index", "blog"),
method: "POST",
data: {
id: this.params.id || 0,
},
dataType: "json",
success: (res) => {
uni.hideLoading();
uni.stopPullDownRefresh();
var data = res.data.data;
if (res.data.code == 0 && (data.data || null) != null) {
var blog = data.data;
this.setData({
data_bottom_line_status: true,
data_list_loding_status: 3,
data_base: data.base || null,
data: blog,
right_list: data.right_list || [],
last_next: data.last_next || null,
emoji_list: data.emoji_list || [],
blog_main_name: (data.base || null) == null ? "博文" : data.base.blog_main_name || "博文",
});
//
this.setData({
share_info: {
title: this.data.seo_title || this.data.title,
desc: this.data.seo_desc || this.data.describe,
path: "/pages/plugins/blog/detail/detail",
query: "id=" + this.data.id,
img: this.data.cover,
},
});
//
this.init_config();
//
uni.setNavigationBarTitle({ title: this.data.title });
} else {
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: res.data.msg,
});
app.globalData.showToast(res.data.msg);
}
//
this.get_data();
},
//
app.globalData.page_share_handle(this.share_info);
},
fail: () => {
uni.hideLoading();
uni.stopPullDownRefresh();
//
onPullDownRefresh() {
this.get_data();
},
methods: {
//
init_config(status) {
if ((status || false) == true) {
this.setData({
data_list_loding_status: 2,
currency_symbol: app.globalData.get_config('currency_symbol'),
});
app.globalData.showToast("服务器请求出错");
},
});
} else {
app.globalData.is_config(this, 'init_config');
}
},
//
get_data() {
uni.showLoading({
title: '加载中...',
});
uni.request({
url: app.globalData.get_request_url('detail', 'index', 'blog'),
method: 'POST',
data: {
id: this.params.id || 0,
},
dataType: 'json',
success: (res) => {
uni.hideLoading();
uni.stopPullDownRefresh();
var data = res.data.data;
if (res.data.code == 0 && (data.data || null) != null) {
var blog = data.data;
this.setData({
data_bottom_line_status: true,
data_list_loding_status: 3,
data_base: data.base || null,
data: blog,
right_list: data.right_list || [],
last_next: data.last_next || null,
emoji_list: data.emoji_list || [],
blog_main_name: (data.base || null) == null ? '博文' : data.base.blog_main_name || '博文',
});
//
this.setData({
share_info: {
title: this.data.seo_title || this.data.title,
desc: this.data.seo_desc || this.data.describe,
path: '/pages/plugins/blog/detail/detail',
query: 'id=' + this.data.id,
img: this.data.cover,
},
});
//
uni.setNavigationBarTitle({ title: this.data.title });
} else {
this.setData({
data_list_loding_status: 0,
data_list_loding_msg: res.data.msg,
});
app.globalData.showToast(res.data.msg);
}
//
app.globalData.page_share_handle(this.share_info);
},
fail: () => {
uni.hideLoading();
uni.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
});
app.globalData.showToast('服务器请求出错');
},
});
},
},
},
};
};
</script>
<style></style>

View File

@ -2,12 +2,12 @@
<view>
<view v-if="(data_base || null) != null">
<!-- 搜索框 -->
<view class="nav-search padding-horizontal-main padding-top-main">
<view class="nav-search padding-main">
<component-search propBrColor="#efefef" propBgColor="#fff" propUrl="/pages/plugins/blog/search/search"></component-search>
</view>
<!-- 轮播 -->
<view v-if="slide_list.length > 0" class="padding-horizontal-main padding-top-main">
<view v-if="slide_list.length > 0" class="padding-horizontal-main spacing-mb">
<component-banner :propData="slide_list"></component-banner>
</view>
@ -33,13 +33,9 @@
</view>
<!-- 分类 -->
<view class="spacing-nav-title padding-horizontal-main">
<text class="text-wrapper va-m">所有{{ blog_main_name }}</text>
<scroll-view v-if="(category || null) != null && category.length > 0" class="nav-list scroll-view-horizontal dis-inline-block oh va-m margin-left-sm" scroll-x="true">
<block v-for="(item, index) in category" :key="index">
<view class="item cr-base dis-inline-block padding-horizontal-main" :data-value="item.url" @tap="url_event">{{ item.name }}</view>
</block>
</scroll-view>
<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>
<!-- 博文列表 -->
@ -117,139 +113,139 @@
</view>
</template>
<script>
const app = getApp();
import componentSearch from "../../../../components/search/search";
import componentBanner from "../../../../components/slider/slider";
import componentCountdown from "../../../../components/countdown/countdown";
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 componentSearch from '../../../../components/search/search';
import componentBanner from '../../../../components/slider/slider';
import componentCountdown from '../../../../components/countdown/countdown';
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,
data_base: null,
category: [],
data_list: [],
slide_list: [],
goods_list: [],
hot_list: [],
right_list: [],
blog_main_name: "博文",
//
share_info: {},
};
},
components: {
componentSearch,
componentBanner,
componentCountdown,
componentNoData,
componentBottomLine,
componentGoodsList,
},
props: {},
onLoad() {},
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,
data_base: null,
category: [],
data_list: [],
slide_list: [],
goods_list: [],
hot_list: [],
right_list: [],
blog_main_name: '博文',
//
share_info: {},
};
},
//
get_data() {
uni.request({
url: app.globalData.get_request_url("index", "index", "blog"),
method: "POST",
data: {},
dataType: "json",
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_base: data.base || null,
category: data.category || [],
data_list: data.data_list || [],
slide_list: data.slide_list || [],
goods_list: data.goods_list || [],
hot_list: data.hot_list || [],
right_list: data.right_list || [],
blog_main_name: (data.base || null) == null ? "博文" : data.base.blog_main_name || "博文",
data_list_loding_msg: "",
data_list_loding_status: 0,
data_bottom_line_status: true,
});
components: {
componentSearch,
componentBanner,
componentCountdown,
componentNoData,
componentBottomLine,
componentGoodsList,
},
props: {},
//
var title = this.data_base.seo_title || this.data_base.application_name;
this.setData({
share_info: {
title: title,
desc: this.data_base.seo_desc,
path: "/pages/plugins/blog/index/index",
img: (this.slide_list || null) != null && this.slide_list.length > 0 ? this.slide_list[0]["images_url"] : "",
},
});
} else {
onLoad() {},
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('index', 'index', 'blog'),
method: 'POST',
data: {},
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
data_base: data.base || null,
category: data.category || [],
data_list: data.data_list || [],
slide_list: data.slide_list || [],
goods_list: data.goods_list || [],
hot_list: data.hot_list || [],
right_list: data.right_list || [],
blog_main_name: (data.base || null) == null ? '博文' : data.base.blog_main_name || '博文',
data_list_loding_msg: '',
data_list_loding_status: 0,
data_bottom_line_status: true,
});
//
var title = this.data_base.seo_title || this.data_base.application_name;
this.setData({
share_info: {
title: title,
desc: this.data_base.seo_desc,
path: '/pages/plugins/blog/index/index',
img: (this.slide_list || null) != null && this.slide_list.length > 0 ? this.slide_list[0]['images_url'] : '',
},
});
} else {
this.setData({
data_bottom_line_status: false,
data_list_loding_status: 2,
data_list_loding_msg: res.data.msg,
});
}
//
uni.setNavigationBarTitle({ title: title });
//
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.showToast('服务器请求出错');
},
});
},
//
uni.setNavigationBarTitle({ title: title });
//
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("服务器请求出错");
},
});
// url
url_event(e) {
app.globalData.url_event(e);
},
},
// url
url_event(e) {
app.globalData.url_event(e);
},
},
};
};
</script>
<style>
@import "./index.css";
@import './index.css';
</style>