1优化顶部返回按钮定位
parent
d4d14e45d9
commit
d5cb2f2448
|
|
@ -1,69 +1,63 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="bg-white padding-main" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;'">
|
||||
<view class="flex-row align-c">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back margin-right-main round va-m">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- true为空对象 false为非空对象 Object.keys(detail_data).length == 0 -->
|
||||
<view v-if="Object.keys(detail_data).length !== 0" class="answers-container bg-white spacing-mb">
|
||||
<view class="padding-main br-b-dashed">
|
||||
<view class="fw-b text-size-xl spacing-mb">{{ detail_data.title }}</view>
|
||||
<view class="cr-grey-9 text-size-xs margin-bottom-sm flex-row">
|
||||
留言时间: {{ detail_data.add_time_date }}
|
||||
<view class="fw-b padding-horizontal-xs">·</view>
|
||||
{{ detail_data.access_count || '0' }}浏览
|
||||
</view>
|
||||
<view class="text-size-md">{{ detail_data.content }}</view>
|
||||
</view>
|
||||
<view v-if="detail_data.is_reply && detail_data.is_reply === '1'" class="padding-main">
|
||||
<view class="flex-row jc-sb align-c">
|
||||
<view class="flex-row align-c">
|
||||
<image :src="answers_static_url + 'admin.png'" mode="widthFix" class="admin-img margin-right-sm"></image>
|
||||
<text>管理员</text>
|
||||
<view v-if="Object.keys(detail_data).length !== 0">
|
||||
<!-- true为空对象 false为非空对象 Object.keys(detail_data).length == 0 -->
|
||||
<view class="answers-container bg-white spacing-mb">
|
||||
<view class="padding-main br-b-dashed">
|
||||
<view class="fw-b text-size-xl spacing-mb">{{ detail_data.title }}</view>
|
||||
<view class="cr-grey-9 text-size-xs margin-bottom-sm flex-row">
|
||||
留言时间: {{ detail_data.add_time_date }}
|
||||
<view class="fw-b padding-horizontal-xs">·</view>
|
||||
{{ detail_data.access_count || '0' }}浏览
|
||||
</view>
|
||||
<view class="cr-grey-9 text-size-xs">回复时间: {{ detail_data.reply_time_date }}</view>
|
||||
<view class="text-size-md">{{ detail_data.content }}</view>
|
||||
</view>
|
||||
<view class="text-size-md padding-top-main">{{ detail_data.reply }}</view>
|
||||
<view v-if="detail_data.is_reply && detail_data.is_reply === '1'" class="padding-main">
|
||||
<view class="flex-row jc-sb align-c">
|
||||
<view class="flex-row align-c">
|
||||
<image :src="answers_static_url + 'admin.png'" mode="widthFix" class="admin-img margin-right-sm"></image>
|
||||
<text>管理员</text>
|
||||
</view>
|
||||
<view class="cr-grey-9 text-size-xs">回复时间: {{ detail_data.reply_time_date }}</view>
|
||||
</view>
|
||||
<view class="text-size-md padding-top-main">{{ detail_data.reply }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 猜你喜欢 -->
|
||||
<view v-if="goods_list.length > 0" class="padding-horizontal-main">
|
||||
<view class="tc">
|
||||
<view class="guess-like fw-b text-size-md">猜你喜欢</view>
|
||||
</view>
|
||||
<component-goods-list
|
||||
class="padding-top-main"
|
||||
:propData="{ style_type: 1, goods_list: goods_list, random: random_value }"
|
||||
:propLabel="plugins_label_data"
|
||||
:propCurrencySymbol="currency_symbol"
|
||||
:propIsCartParaCurve="true"
|
||||
propSource="detail"
|
||||
@CartSuccessEvent="cart_success_event"
|
||||
></component-goods-list>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status" class="bottom-line"></component-bottom-line>
|
||||
</view>
|
||||
<view class="bottom-fixed flex-row jc-sa align-c bg-white text-size fw-b">
|
||||
<navigator url="/pages/user-answers-form/user-answers-form" hover-class="none" class="flex-1 tc answers-btn flex-col jc-c align-c">
|
||||
<view class="divider-r-d">
|
||||
<iconfont name="icon-wenda-wytw" size="30rpx" color="#333" class="margin-right-sm"></iconfont>
|
||||
我要提问
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator url="/pages/user-answers-question/user-answers-question" hover-class="none" class="flex-1 tc answers-btn flex-col jc-c align-c">
|
||||
<view>
|
||||
<iconfont name="icon-wenda-wdtw" size="32rpx" color="#333" class="margin-right-sm pr top-xs"></iconfont>
|
||||
我的提问
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 猜你喜欢 -->
|
||||
<view v-if="goods_list.length > 0" class="padding-horizontal-main">
|
||||
<view class="tc">
|
||||
<view class="guess-like fw-b text-size-md">猜你喜欢</view>
|
||||
</view>
|
||||
<component-goods-list
|
||||
class="padding-top-main"
|
||||
:propData="{ style_type: 1, goods_list: goods_list, random: random_value }"
|
||||
:propLabel="plugins_label_data"
|
||||
:propCurrencySymbol="currency_symbol"
|
||||
:propIsCartParaCurve="true"
|
||||
propSource="detail"
|
||||
@CartSuccessEvent="cart_success_event"
|
||||
></component-goods-list>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status" class="bottom-line"></component-bottom-line>
|
||||
<view v-else>
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
<view class="bottom-fixed flex-row jc-sa align-c bg-white text-size fw-b">
|
||||
<navigator url="/pages/user-answers-form/user-answers-form" hover-class="none" class="flex-1 tc answers-btn flex-col jc-c align-c">
|
||||
<view class="divider-r-d">
|
||||
<iconfont name="icon-wenda-wytw" size="30rpx" color="#333" class="margin-right-sm"></iconfont>
|
||||
我要提问
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator url="/pages/user-answers-question/user-answers-question" hover-class="none" class="flex-1 tc answers-btn flex-col jc-c align-c">
|
||||
<view>
|
||||
<iconfont name="icon-wenda-wdtw" size="32rpx" color="#333" class="margin-right-sm pr top-xs"></iconfont>
|
||||
我的提问
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -76,9 +70,6 @@
|
|||
data() {
|
||||
return {
|
||||
answers_static_url: app.globalData.get_static_url('answers', true),
|
||||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: true,
|
||||
detail_data: {},
|
||||
|
|
@ -94,6 +85,7 @@
|
|||
plugins_label_data: null,
|
||||
// 增加随机数,避免无法监听数据列表内部数据更新
|
||||
random_value: 0,
|
||||
params: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -104,7 +96,12 @@
|
|||
},
|
||||
props: {},
|
||||
|
||||
onLoad() {
|
||||
onLoad(params) {
|
||||
if (params) {
|
||||
this.setData({
|
||||
params: params.id,
|
||||
});
|
||||
}
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
|
|
@ -138,7 +135,7 @@
|
|||
url: app.globalData.get_request_url('detail', 'index', 'answers'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
id: this.$route.query.id,
|
||||
id: this.params,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
|
|
@ -179,16 +176,6 @@
|
|||
// 传1表示为购物车回调方法调用的此方法
|
||||
this.get_data(1);
|
||||
},
|
||||
top_nav_left_back_event() {
|
||||
var pages = getCurrentPages();
|
||||
if (pages.length <= 1) {
|
||||
uni.switchTab({
|
||||
url: app.globalData.data.tabbar_pages[0],
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,22 @@
|
|||
<template>
|
||||
<view class="pr">
|
||||
<view class="pa z-i left-0 top-0 right-0" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;'">
|
||||
<view class="pf z-i left-0 top-0 right-0 pa-w" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;background-color:rgba(255,255,255,' + opacity + ')'">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-top-sm round va-m cr-white">
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-vertical-sm round va-m pr z-i" :class="opacity > 0.3 ? 'cr-black' : 'cr-white'">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="pa top-0 bg-img wh-auto">
|
||||
<image v-if="(data_base || null) != null" class="wh-auto dis-block" :src="data_base.app_banner_images || coupon_static_url + 'coupon-bg.png'" mode="widthFix"
|
||||
:data-value="data_base.url || ''" @tap="url_event"></image>
|
||||
<image v-if="(data_base || null) != null" class="wh-auto dis-block" :src="data_base.app_banner_images || coupon_static_url + 'coupon-bg.png'" mode="widthFix" :data-value="data_base.url || ''" @tap="url_event"></image>
|
||||
</view>
|
||||
<view class="plugins-coupon-container">
|
||||
<view class="coupon-content bg-white pr">
|
||||
<!-- 优惠劵列表 -->
|
||||
<view v-if="data_list.length > 0" class="flex-col">
|
||||
<block v-for="(item, index) in data_list" :key="index">
|
||||
<component-coupon-card :prop-data="item" :prop-status-type="item.status_type" :prop-status-operable-name="item.status_operable_name" :prop-index="index" propIsProgress
|
||||
@call-back="coupon_receive_event"></component-coupon-card>
|
||||
<component-coupon-card :prop-data="item" :prop-status-type="item.status_type" :prop-status-operable-name="item.status_operable_name" :prop-index="index" propIsProgress @call-back="coupon_receive_event"></component-coupon-card>
|
||||
</block>
|
||||
</view>
|
||||
<view v-else>
|
||||
|
|
@ -50,6 +48,8 @@
|
|||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
// 顶部返回导航背景透明度
|
||||
opacity: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
|
@ -227,10 +227,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 顶部返回操作
|
||||
top_nav_left_back_event(e) {
|
||||
var pages = getCurrentPages();
|
||||
|
|
@ -242,9 +244,17 @@
|
|||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
|
||||
this.setData({
|
||||
opacity: top,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@import './index.css';
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<view>
|
||||
<view v-if="(data_base || null) != null" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;'">
|
||||
<view class="pr">
|
||||
<view class="pf z-i left-0 top-0 right-0 pa-w" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;background-color:rgba(255,255,255,' + opacity + ')'">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-vertical-sm round va-m" :class="opacity > 0.3 ? 'cr-black' : 'cr-white'">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view v-if="(data_base || null) != null" class="padding-top-xxxl">
|
||||
<!-- 头部背景 -->
|
||||
<image :src="distribution_static_url + 'distribution-bg.png'" mode="widthFix" class="pa top-0 bg-img wh-auto" />
|
||||
<view class="pr z-i">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-top-sm round va-m cr-white">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="pr padding-top-main">
|
||||
<view class="padding-top-xxxl oh">
|
||||
<!-- 头部 -->
|
||||
<view class="padding-main border-radius-main oh pr">
|
||||
|
|
@ -211,6 +213,8 @@
|
|||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
// 顶部返回导航背景透明度
|
||||
opacity: 0,
|
||||
distribution_static_url: distribution_static_url,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
|
|
@ -467,6 +471,7 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 顶部返回操作
|
||||
top_nav_left_back_event(e) {
|
||||
var pages = getCurrentPages();
|
||||
|
|
@ -478,6 +483,14 @@
|
|||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
|
||||
this.setData({
|
||||
opacity: top,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
<template>
|
||||
<view>
|
||||
<view v-if="(data_base || null) != null" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;'">
|
||||
<view class="pf z-i left-0 top-0 right-0 pa-w" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;background-color:rgba(255,255,255,' + opacity + ')'">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-vertical-sm round va-m cr-black">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view v-if="(data_base || null) != null" class="padding-top-xxxl">
|
||||
<!-- 头部背景 -->
|
||||
<image :src="membershiplevelvip_static_url + 'title-bg.png'" mode="widthFix" class="pa top-0 bg-img wh-auto" />
|
||||
<view class="pr z-i">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-top-sm round va-m">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="pr padding-top-main">
|
||||
<view class="padding-top-xxxl oh">
|
||||
<!-- 头部 -->
|
||||
<view class="head-box padding-main oh pr">
|
||||
|
|
@ -187,6 +189,8 @@
|
|||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
// 顶部返回导航背景透明度
|
||||
opacity: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
|
@ -366,6 +370,7 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 顶部返回操作
|
||||
top_nav_left_back_event(e) {
|
||||
var pages = getCurrentPages();
|
||||
|
|
@ -377,6 +382,14 @@
|
|||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
|
||||
this.setData({
|
||||
opacity: top,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
<template>
|
||||
<view>
|
||||
<view v-if="(data_base || null) != null" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;'">
|
||||
<view class="pf z-i left-0 top-0 right-0 pa-w" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 10) + 'px;background-color:rgba(255,255,255,' + opacity + ')'">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-vertical-sm round va-m flex-row" :class="opacity > 0.3 ? 'cr-black' : 'cr-white'">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
<text class="text-size flex-1 tc">积分</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view v-if="(data_base || null) != null">
|
||||
<!-- 广告图片 -->
|
||||
<view class="pa top-0 bg-img wh-auto">
|
||||
<block v-if="(data_base.right_images || null) != null">
|
||||
|
|
@ -11,13 +20,7 @@
|
|||
<image class="wh-auto advertisement" :src="points_static_url + 'integral-bg.png'" mode="widthFix" :data-value="data_base.right_images_url || ''" @tap="url_event"></image>
|
||||
</block>
|
||||
</view>
|
||||
<view class="pr z-i">
|
||||
<!-- 返回 -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ || MP-KUAISHOU || H5 || APP -->
|
||||
<view v-if="is_realstore_top_nav_back == 1" class="nav-back padding-horizontal-main padding-top-sm round va-m cr-white flex-row">
|
||||
<iconfont name="icon-tongyong-fanhui" size="40rpx" @tap="top_nav_left_back_event"></iconfont>
|
||||
<text class="text-size flex-1 tc">积分</text>
|
||||
</view>
|
||||
<view class="pr">
|
||||
<!-- #endif -->
|
||||
<view class="padding-horizontal-main points-content pr">
|
||||
<!-- 顶部 -->
|
||||
|
|
@ -35,7 +38,8 @@
|
|||
<image class="avatar dis-block circle" @tap="preview_event" :src="user.avatar || avatar_default" mode="widthFix"></image>
|
||||
<view class="padding-left-main">
|
||||
<view class="text-size fw-b">{{ user.user_name_view }}</view>
|
||||
<view class="desc margin-top-sm cr-grey">当前可用
|
||||
<view class="desc margin-top-sm cr-grey"
|
||||
>当前可用
|
||||
<text class="cr-black fw-b padding-horizontal-xs">
|
||||
{{ user_integral.integral || 0 }}
|
||||
</text>
|
||||
|
|
@ -77,22 +81,26 @@
|
|||
</view>
|
||||
|
||||
<!-- 公告信息 -->
|
||||
<button v-if="(data_base.points_desc || null) != null && data_base.points_desc.length > 0" class="rule-btn pa right-0 tc cr-white text-size-md"
|
||||
@tap="quick_open_event">积分规则</button>
|
||||
<button v-if="(data_base.points_desc || null) != null && data_base.points_desc.length > 0" class="rule-btn pa right-0 tc cr-white text-size-md" @tap="quick_open_event">积分规则</button>
|
||||
|
||||
<!-- 商品兑换 -->
|
||||
<view v-if="(data_base.goods_exchange_data || null) != null && data_base.goods_exchange_data.length > 0">
|
||||
<component-goods-list :propData="{ style_type: 1, title: '商品兑换', url: '/pages/goods-search/goods-search', goods_list: data_base.goods_exchange_data }" prop-more-url-key="url"
|
||||
:propCurrencySymbol="currency_symbol" :prop-grid-btn-config="gridBtnConfig" :prop-is-open-grid-btn-set="isOpenGridBtnSet" propPriceField="price"
|
||||
propIntegral></component-goods-list>
|
||||
<component-goods-list
|
||||
:propData="{ style_type: 1, title: '商品兑换', url: '/pages/goods-search/goods-search', goods_list: data_base.goods_exchange_data }"
|
||||
prop-more-url-key="url"
|
||||
:propCurrencySymbol="currency_symbol"
|
||||
:prop-grid-btn-config="gridBtnConfig"
|
||||
:prop-is-open-grid-btn-set="isOpenGridBtnSet"
|
||||
propPriceField="price"
|
||||
propIntegral
|
||||
></component-goods-list>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
<!-- 积分规则弹窗 -->
|
||||
<component-popup v-if="(data_base.points_desc || null) != null && data_base.points_desc.length > 0" :propShow="popup_status" :propIsBar="propIsBar" propPosition="bottom"
|
||||
@onclose="quick_close_event">
|
||||
<component-popup v-if="(data_base.points_desc || null) != null && data_base.points_desc.length > 0" :propShow="popup_status" :propIsBar="propIsBar" propPosition="bottom" @onclose="quick_close_event">
|
||||
<view class="rule">
|
||||
<view class="cr-black text-size-md fw-b margin-bottom-main tc">积分规则</view>
|
||||
<scroll-view :scroll-y="true" class="item">
|
||||
|
|
@ -124,6 +132,8 @@
|
|||
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
|
||||
// 顶部导航返回按钮
|
||||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
// 顶部返回导航背景透明度
|
||||
opacity: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
|
@ -192,6 +202,7 @@
|
|||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
|
|
@ -248,6 +259,7 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 立即登录
|
||||
login_event() {
|
||||
var user = app.globalData.get_user_info(this, 'login_event');
|
||||
|
|
@ -274,10 +286,12 @@
|
|||
user: user || null,
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
|
||||
// 头像查看
|
||||
preview_event() {
|
||||
if (app.globalData.data.default_user_head_src != this.user.avatar) {
|
||||
|
|
@ -287,6 +301,7 @@
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
get_integral_data_list(is_mandatory) {
|
||||
// 是否加载中
|
||||
if (this.integral_is_loading == 1) {
|
||||
|
|
@ -345,18 +360,21 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 弹层开启
|
||||
quick_open_event(e) {
|
||||
this.setData({
|
||||
popup_status: true,
|
||||
});
|
||||
},
|
||||
|
||||
// 弹层关闭
|
||||
quick_close_event(e) {
|
||||
this.setData({
|
||||
popup_status: false,
|
||||
});
|
||||
},
|
||||
|
||||
// 顶部返回操作
|
||||
top_nav_left_back_event(e) {
|
||||
var pages = getCurrentPages();
|
||||
|
|
@ -368,9 +386,17 @@
|
|||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
|
||||
this.setData({
|
||||
opacity: top,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './index.css';
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -50,4 +50,14 @@
|
|||
margin: 20rpx 70rpx 42rpx 70rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
.scroll-y {
|
||||
height: calc(100vh - 198rpx - var(--window-top) - 5px);
|
||||
/* #ifdef H5 */
|
||||
height: calc(100vh - 198rpx - 10px);
|
||||
/* #endif */
|
||||
}
|
||||
|
|
@ -13,56 +13,52 @@
|
|||
<!-- #endif -->
|
||||
<!-- 秒杀时段 -->
|
||||
<scroll-view :scroll-x="true" :scroll-with-animation="true" :scroll-into-view="'one-nav-item-' + nav_active_index" class="top-nav-scroll wh-auto">
|
||||
<view class="nav_seckill flex-row flex-nowrap cr-white">
|
||||
<view v-for="(item, index) in periods_list" :key="index" class="item tc cp text-size-xss" :class="nav_active_index === index ? 'active' : ''" :id="'one-nav-item-' + index"
|
||||
:data-index="index" :data-text="item.time.time_first_text" :data-status="item.time.status" @tap="nav_event">
|
||||
<view class="nav_seckill flex-row flex-nowrap cr-white tc">
|
||||
<view v-for="(item, index) in periods_list" :key="index" class="item text-size-xss" :class="nav_active_index === index ? 'active' : ''" :id="'one-nav-item-' + index" :data-index="index" :data-text="item.time.time_first_text" :data-status="item.time.status" @tap="nav_event">
|
||||
<view class="time text-size-lg">{{ item.name }}</view>
|
||||
<view class="state text-size-xs round" :class="nav_active_index === index ? 'cr-main' : ''">{{ item.time.msg }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<!-- 基础信息、倒计时 -->
|
||||
<view class="oh spacing-mb flex-row jc-sb align-c">
|
||||
<view>
|
||||
<text :class="'va-m text-size-xs fw-b cr-blak ' + (is_valid == 1 ? 'cr-base' : 'cr-red')">{{ time_first_text }}</text>
|
||||
<view v-if="is_valid == 1" class="dis-inline-block va-m margin-left-sm">
|
||||
<component-countdown :propHour="time.hours" :propMinute="time.minutes" :propSecond="time.seconds"
|
||||
:prop-time-background-color="seckill_status === 1 ? '#E22C08' : '#333333'"></component-countdown>
|
||||
<scroll-view :scroll-top="scroll_top" scroll-y="true" class="scroll-y" @scroll="scroll_event">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<!-- 基础信息、倒计时 -->
|
||||
<view class="oh spacing-mb flex-row jc-sb align-c">
|
||||
<view>
|
||||
<text :class="'va-m text-size-xs fw-b cr-blak ' + (is_valid == 1 ? 'cr-base' : 'cr-red')">{{ time_first_text }}</text>
|
||||
<view v-if="is_valid == 1" class="dis-inline-block va-m margin-left-sm">
|
||||
<component-countdown :propHour="time.hours" :propMinute="time.minutes" :propSecond="time.seconds" :prop-time-background-color="seckill_status === 1 ? '#E22C08' : '#333333'"></component-countdown>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-size-xs cr-blak" @tap="quick_open_event">
|
||||
活动规则
|
||||
<iconfont v-if="(data_base.content_notice || null) != null && data_base.content_notice.length > 0" name="icon-miaosha-hdgz" size="26rpx" class="margin-left-xs pr top-xs" color="#999"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-size-xs cr-blak" @tap="quick_open_event">
|
||||
活动规则
|
||||
<iconfont v-if="(data_base.content_notice || null) != null && data_base.content_notice.length > 0" name="icon-miaosha-hdgz" size="26rpx" class="margin-left-xs pr top-xs"
|
||||
color="#999"></iconfont>
|
||||
|
||||
<!-- 商品 -->
|
||||
<view v-if="goods.length > 0">
|
||||
<component-goods-list :propData="{ style_type: 1, goods_list: goods }" :propCurrencySymbol="currency_symbol" :prop-grid-btn-config="grid_btn_config" :prop-is-open-grid-btn-set="isOpenGridBtnSet" propPriceField="seckill_min_price"></component-goods-list>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data propStatus="0" propMsg="没有相关商品"></component-no-data>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品 -->
|
||||
<view v-if="goods.length > 0">
|
||||
<component-goods-list :propData="{ style_type: 1, goods_list: goods }" :propCurrencySymbol="currency_symbol" :prop-grid-btn-config="gridBtnConfig"
|
||||
:prop-is-open-grid-btn-set="isOpenGridBtnSet" propPriceField="seckill_min_price"></component-goods-list>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data propStatus="0" propMsg="没有相关商品"></component-no-data>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
<!-- 弹窗 -->
|
||||
<component-popup v-if="(data_base.content_notice || null) != null && data_base.content_notice.length > 0" :propShow="popup_status" :propIsBar="propIsBar" propPosition="bottom"
|
||||
@onclose="quick_close_event">
|
||||
<view class="rule">
|
||||
<view class="title cr-black text-size-md fw-b margin-bottom-main tc">活动规则</view>
|
||||
<scroll-view :scroll-y="true" class="item">
|
||||
<view v-for="(item, index) in data_base.content_notice" :key="index" class="cr-grey text-size-md">{{ item }}</view>
|
||||
</scroll-view>
|
||||
<button type="default" class="bg-main cr-white round text-size-md pa bottom-0 left-0 right-0" @tap="quick_close_event">知道了</button>
|
||||
</view>
|
||||
</component-popup>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
<!-- 弹窗 -->
|
||||
<component-popup v-if="(data_base.content_notice || null) != null && data_base.content_notice.length > 0" :propShow="popup_status" :propIsBar="propIsBar" propPosition="bottom" @onclose="quick_close_event">
|
||||
<view class="rule">
|
||||
<view class="title cr-black text-size-md fw-b margin-bottom-main tc">活动规则</view>
|
||||
<scroll-view :scroll-y="true" class="item">
|
||||
<view v-for="(item, index) in data_base.content_notice" :key="index" class="cr-grey text-size-md">{{ item }}</view>
|
||||
</scroll-view>
|
||||
<button type="default" class="bg-main cr-white round text-size-md pa bottom-0 left-0 right-0" @tap="quick_close_event">知道了</button>
|
||||
</view>
|
||||
</component-popup>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
|
|
@ -86,6 +82,8 @@
|
|||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
seckill_bg: 'background: url(' + seckill_static_url + 'header-bg.png) top/100% no-repeat;',
|
||||
seckill_title_url: seckill_static_url + 'seckill-title.png',
|
||||
scroll_top: 0,
|
||||
scroll_top_old: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
|
@ -111,7 +109,7 @@
|
|||
seckill_status: 0,
|
||||
// 配置商品列表按钮
|
||||
isOpenGridBtnSet: false,
|
||||
gridBtnConfig: {
|
||||
grid_btn_config: {
|
||||
name: '即将开抢',
|
||||
disabled: true,
|
||||
},
|
||||
|
|
@ -143,14 +141,14 @@
|
|||
name: '即将开抢',
|
||||
};
|
||||
this.setData({
|
||||
gridBtnConfig: Object.assign({}, gridBtnConfig, newData),
|
||||
grid_btn_config: Object.assign({}, this.grid_btn_config, newData),
|
||||
});
|
||||
} else if (val === 2) {
|
||||
let newData = {
|
||||
name: '已结束',
|
||||
};
|
||||
this.setData({
|
||||
gridBtnConfig: Object.assign({}, gridBtnConfig, newData),
|
||||
grid_btn_config: Object.assign({}, this.grid_btn_config, newData),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -250,6 +248,7 @@
|
|||
goods: this.periods_list[index].goods,
|
||||
isOpenGridBtnSet: seckill_status === 1 ? false : true,
|
||||
});
|
||||
this.reset_scroll();
|
||||
},
|
||||
// 弹层开启
|
||||
quick_open_event(e) {
|
||||
|
|
@ -274,9 +273,28 @@
|
|||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
|
||||
// 重置滑动位置
|
||||
reset_scroll() {
|
||||
this.setData({
|
||||
scroll_top: this.scroll_top_old,
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.setData({
|
||||
scroll_top: 0,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 滑动事件位置记录
|
||||
scroll_event(e) {
|
||||
this.setData({
|
||||
scroll_top_old: e.detail.scrollTop,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@import './index.css';
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,12 @@
|
|||
</navigator>
|
||||
</view>
|
||||
<view v-else class="content bg-white flex-row jc-sb align-c">
|
||||
<text class="fw-b">今日已签到,获得{{ user_signin_data.integral }}积分,共{{ user_signin_data.total }}次</text>
|
||||
<text class="fw-b">
|
||||
今日
|
||||
<block v-if="user_signin_data.integral">已</block>
|
||||
<block v-else>未</block>
|
||||
签到,获得{{ user_signin_data.integral || 0 }}积分,共{{ user_signin_data.total }}次
|
||||
</text>
|
||||
<navigator v-if="(data_base.is_user_menu || 0) == 1" url="/pages/plugins/signin/user/user" hover-class="none">
|
||||
<iconfont name="icon-qiandao-jiantou2"></iconfont>
|
||||
</navigator>
|
||||
|
|
@ -108,7 +113,9 @@
|
|||
<view class="coming-content tc pr">
|
||||
<image :src="signin_static_url + 'signin-popup-title.png'" class="pa" mode="widthFix"></image>
|
||||
<view class="title">签到成功</view>
|
||||
<view class="desc">恭喜您获得 <text>{{ coming_integral }}</text> 积分</view>
|
||||
<view class="desc"
|
||||
>恭喜您获得 <text>{{ coming_integral }}</text> 积分</view
|
||||
>
|
||||
<view class="use-btn text-size fw-b cr-white" :data-value="home_page_url" @tap="url_event">立即使用</view>
|
||||
<view class="close-sub pa cr-white" @tap="coming_success_close_event">
|
||||
<iconfont name="icon-qiandao-tancguanbi" size="60rpx"></iconfont>
|
||||
|
|
@ -400,7 +407,7 @@
|
|||
// 重新拉取数据
|
||||
this.get_data();
|
||||
break;
|
||||
// 需要填写联系人信息
|
||||
// 需要填写联系人信息
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
url: '/pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo?id=' + res.data.data.qrcode_id + '&is_team=1',
|
||||
|
|
@ -446,4 +453,4 @@
|
|||
</script>
|
||||
<style>
|
||||
@import './index-detail.css';
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
is_realstore_top_nav_back: app.globalData.data.is_realstore_top_nav_back || 0,
|
||||
detail_data: {},
|
||||
data_list_loding_status: 1,
|
||||
params: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -67,7 +68,13 @@
|
|||
},
|
||||
props: {},
|
||||
|
||||
onLoad() {},
|
||||
onLoad(params) {
|
||||
if (params) {
|
||||
this.setData({
|
||||
params: params.id,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.init();
|
||||
|
|
@ -112,7 +119,7 @@
|
|||
url: app.globalData.get_request_url('detail', 'answer'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
id: this.$route.query.id,
|
||||
id: this.params,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
<view class="flex-col align-b" data-value="/pages/personal/personal" @tap="url_event">
|
||||
<text class="va-m fw-b text-size">{{ nickname }}</text>
|
||||
<view v-if="(user_id || null) != null" class="head-id border-radius-sm padding-vertical-xsss padding-horizontal-sm margin-top-sm dis-inline-block fw-b">
|
||||
<text class="text-size-sm">ID </text>
|
||||
<text class="text-size-xs padding-left-xs">{{ user_id }}</text>
|
||||
<text class="text-size-xs">ID </text>
|
||||
<text class="text-size-xss padding-left-xs">{{ user_id }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue