Commit b02f838f authored by liumiss's avatar liumiss

7

parent e3afe2da
...@@ -55,6 +55,11 @@ export const allCategoryAndGoods = (shop_id) => request('/shop/goods/shop', { sh ...@@ -55,6 +55,11 @@ export const allCategoryAndGoods = (shop_id) => request('/shop/goods/shop', { sh
// 商品相关-获取商品列表(查询) // 商品相关-获取商品列表(查询)
export const search = param => request('shop/goods/index', param, 'get'); export const search = param => request('shop/goods/index', param, 'get');
// 满减
export const fullReduction = (shop_id) => request('shop/member/discount/rule', {shop_id}, 'get');
/******* 订单相关 ******/ /******* 订单相关 ******/
...@@ -95,6 +100,7 @@ export const getCoupons = (page, perPage) => request('coupons/self', { ...@@ -95,6 +100,7 @@ export const getCoupons = (page, perPage) => request('coupons/self', {
}, 'get'); }, 'get');
/******* 支付相关 ******/ /******* 支付相关 ******/
export const weChatConfig = (url, js_api_list) => request('wechat/jsticket', { export const weChatConfig = (url, js_api_list) => request('wechat/jsticket', {
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
.text-light-primary{ .text-light-primary{
color:$color-light-blue color:$color-light-blue
} }
.text-dark-grey{
color:#323232;
}
.text-light-grey{ .text-light-grey{
color:$color-light-grey color:$color-light-grey
} }
......
...@@ -17,12 +17,27 @@ ...@@ -17,12 +17,27 @@
</div> </div>
</li> </li>
</ul> </ul>
<van-cell :value="'¥'+delivery_fee || 0">
<div slot="title" class="tags">
<van-tag color="#ecf0f3" size="10">配送费</van-tag>
</div>
</van-cell>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: ["shopInfo", "goods_list"] props: {
delivery_fee: {
default: 0
},
shopInfo: {
default: {}
},
goods_list: {
default: []
}
}
}; };
</script> </script>
...@@ -36,10 +51,10 @@ export default { ...@@ -36,10 +51,10 @@ export default {
header { header {
position: relative; position: relative;
padding: 15px; padding: 15px;
span{
scw($fontsize-large, #3e3e3e, 600); span {
scw($fontsize-large, #3e3e3e, 600);
} }
} }
.van-cell { .van-cell {
...@@ -60,5 +75,10 @@ export default { ...@@ -60,5 +75,10 @@ export default {
} }
} }
} }
.van-tag {
color: #abb6bc;
border: 1px solid #d2d3d8;
}
} }
</style> </style>
\ No newline at end of file
...@@ -157,12 +157,12 @@ export default { ...@@ -157,12 +157,12 @@ export default {
if (this.$route.name == "confirmOrder") { if (this.$route.name == "confirmOrder") {
this.$router.replace({ this.$router.replace({
name: "orderDetails", name: "orderDetails",
params: { id: this.order_no } params: { order_no: this.order_no }
}); });
} else { } else {
this.$router.push({ this.$router.push({
name: "orderDetails", name: "orderDetails",
params: { id: this.order_no } params: { order_no: this.order_no }
}); });
} }
}, 1000); }, 1000);
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
this.$emit("click"); this.$emit("click");
this.$router.push({ this.$router.push({
name: "orderDetails", name: "orderDetails",
params: { id: this.order_no } params: { order_no: this.order_no }
}); });
}, },
// 检测当前运行环境 // 检测当前运行环境
......
...@@ -29,10 +29,6 @@ export default { ...@@ -29,10 +29,6 @@ export default {
visible: true visible: true
}; };
}, },
created() {
console.log(this.isFoodTab)
},
props: { props: {
fullReduction: { fullReduction: {
default() { default() {
...@@ -71,14 +67,14 @@ export default { ...@@ -71,14 +67,14 @@ export default {
shopId: { shopId: {
type: String type: String
}, },
// 是否添加transition 动画效果
isFoodTab: { isFoodTab: {
// type: Boolean, type: Boolean,
default: 0
} }
}, },
computed: { computed: {
fadeClass() { fadeClass() {
return this.isFood==0 ? "fade" : ""; return this.isFoodTab? "fade" : "";
} }
}, },
methods: { methods: {
...@@ -107,6 +103,6 @@ export default { ...@@ -107,6 +103,6 @@ export default {
} }
.fade-enter-active, .fade-leave-active { .fade-enter-active, .fade-leave-active {
transition: all 0.5s ease-in-out; transition: all 0.28s ease-in-out;
} }
</style> </style>
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div> <div>
<section class="van-submit-bar"> <section class="van-submit-bar">
<div v-show="totalCount>0&&tip!==''&&listFold" class="van-submit-bar__tip">{{tip}}</div> <div v-show="totalCount>0&&tip!==''&&listFold" class="van-submit-bar__tip">{{tip}}</div>
<section class="van-submit-bar__bar" @click="toggleList"> <section class="van-submit-bar__bar">
<div style="flex:1"> <div style="flex:1" @click="toggleList">
<div <div
class="cart_icon_container" class="cart_icon_container"
:class="{cart_icon_activity: totalPrice > 0}" :class="{cart_icon_activity: totalPrice > 0}"
...@@ -151,6 +151,9 @@ export default { ...@@ -151,6 +151,9 @@ export default {
total += food.price * food.num; total += food.price * food.num;
}); });
if (total == 0) return; if (total == 0) return;
// 没有满减规则
if(!this.fullReduction.length)return '';
let r = this.fullReduction[0], let r = this.fullReduction[0],
c = parseInt(r.condition), // 满减条件 c = parseInt(r.condition), // 满减条件
...@@ -343,8 +346,14 @@ export default { ...@@ -343,8 +346,14 @@ export default {
left: 2%; left: 2%;
wh(56px, 56px); wh(56px, 56px);
&.cart_icon_activity .van-icon { &.cart_icon_activity {
color: #1296fa !important; .icon-box {
background: #3190e8;
}
.van-icon {
color: #fff !important;
}
} }
.icon-box { .icon-box {
......
...@@ -26,7 +26,6 @@ const state = { ...@@ -26,7 +26,6 @@ const state = {
coupon:{}, coupon:{},
remarkText: '',//输入备注内容 remarkText: '',//输入备注内容
/* showCart:true, // 是否展示底部导航 */
} }
export default new Vuex.Store({ export default new Vuex.Store({
state, state,
......
...@@ -151,8 +151,4 @@ export default { ...@@ -151,8 +151,4 @@ export default {
REJECT_LOGIN(state){ REJECT_LOGIN(state){
state.rejectLogin = true; state.rejectLogin = true;
}, },
/* SHOW_CART(state,info){
state.showCart = info;
console.log(info)
} */
} }
\ No newline at end of file
...@@ -23,15 +23,11 @@ ...@@ -23,15 +23,11 @@
</div> </div>
<section class="section"> <section class="section">
<confirm-foods-list :shopInfo="shopInfo" :goods_list="checkoutData.goods_list"></confirm-foods-list> <confirm-foods-list :shopInfo="shopInfo" :delivery_fee="checkoutData.delivery_fee" :goods_list="checkoutData.goods_list"></confirm-foods-list>
</section> </section>
<van-row class="order-box"> <van-row class="order-box">
<van-cell :value="'¥'+checkoutData.delivery_fee || 0">
<div slot="title">
<van-tag color="#1f9af8">配送费</van-tag>
</div>
</van-cell>
<van-cell title="门店优惠"> <van-cell title="门店优惠">
<span class="text-danger">¥{{checkoutData.delivery_fee || 0}}</span> <span class="text-danger">¥{{checkoutData.delivery_fee || 0}}</span>
</van-cell> </van-cell>
...@@ -60,7 +56,7 @@ ...@@ -60,7 +56,7 @@
:loading="btnLoading" :loading="btnLoading"
:price="checkoutData.price_final*100" :price="checkoutData.price_final*100"
:tip="submitBarTip" :tip="submitBarTip"
button-text="提交订单" button-text="确认支付"
@submit="onSubmit" @submit="onSubmit"
/> />
<pay :order_no="order_no" :showActionSheet="showActionSheet" @click="payAction"></pay> <pay :order_no="order_no" :showActionSheet="showActionSheet" @click="payAction"></pay>
...@@ -244,14 +240,18 @@ export default { ...@@ -244,14 +240,18 @@ export default {
} }
} }
.order-box .van-cell__value { .order-box {
scw($fontsize-medium, #3e3e3e, 600); .van-cell__value {
scw($fontsize-medium, #3e3e3e, 600);
}
} }
.word-one .van-cell__value { .word-one .van-cell__value {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.text-danger{
color:#f44;} .text-danger {
color: #f44;
}
</style> </style>
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
}); });
}, },
payEvent(shop_id,order_no) { payEvent(shop_id,order_no) {
this.$router.push({ name: "orderDetails", params: { id: order_no,shopId:shop_id } }); this.$router.push({ name: "orderDetails", params: { order_no: order_no,shopId:shop_id } });
} }
} }
/* watch: { /* watch: {
......
<template> <template>
<div class="scroll-list-wrap"> <div class="scroll-list-wrap">
<cube-scroll ref="scroll"> <cube-scroll ref="scroll">
<div class="content">
<h1 class="page-title">{{order.order_status |orderStatus}}</h1> <h1 class="page-title">{{order.order_status |orderStatus}}</h1>
<section class="section"> <section class="section">
<confirm-foods-list :shopInfo="shopInfo" :goods_list="order.goods"></confirm-foods-list> <confirm-foods-list :shopInfo="shopInfo" delivery_fee="0" :goods_list="order.goods"></confirm-foods-list>
<van-cell class="total"> <van-cell class="total">
<span slot="title" class="text-primary" @click="callEvent">联系商家</span> <span slot="title" class="text-primary" @click="callEvent">联系商家</span>
<span> <span>
...@@ -41,9 +42,17 @@ ...@@ -41,9 +42,17 @@
<van-cell title="订单备注" value="暂无"></van-cell> <van-cell title="订单备注" value="暂无"></van-cell>
</div> </div>
</van-panel> </van-panel>
</div>
</cube-scroll> </cube-scroll>
<pay :order_no="order.order_no" :showActionSheet="showActionSheet" @click="payAction"></pay> <div v-if="order.order_status=='unpaid'">
<van-submit-bar
:price="order.price_final*100"
button-text="去支付"
@submit="onSubmit"
/>
<pay :order_no="order.order_no" :showActionSheet="showActionSheet" @click="payAction"></pay>
</div>
</div> </div>
</template> </template>
...@@ -135,10 +144,10 @@ export default { ...@@ -135,10 +144,10 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '~common/stylus/variable.styl'; @import '~common/stylus/variable.styl';
.cube-scroll-list-wrapper {
background: transparent;
}
.content{
padding-bottom:60px;
}
.page-title { .page-title {
padding: 20px 10px; padding: 20px 10px;
} }
......
...@@ -47,8 +47,12 @@ ...@@ -47,8 +47,12 @@
</div> </div>
</van-row> </van-row>
<div v-else-if="keyword==''&& searchHistory.length==0" class="empty_tips"> <div v-else-if="searchHistory.length==0" class="empty_tips">
<p>暂无搜索数据</p> <h4>暂无搜索数据</h4>
</div>
<div v-else-if="result.length==0" class="empty_tips">
<h4 class="text-medium text-dark-grey">暂无搜索数据</h4>
<p>换个关键词试试</p>
</div> </div>
</cube-scroll> </cube-scroll>
</div> </div>
......
...@@ -4,128 +4,149 @@ ...@@ -4,128 +4,149 @@
<div class="detail-wrapper clear-fix"> <div class="detail-wrapper clear-fix">
<div class="detail-main"> <div class="detail-main">
<h1 class="name">{{seller.name}}</h1> <h1 class="name">{{seller.name}}</h1>
<!-- <div class="star-wrapper">
<star :size="48" :score="seller.score"></star> <section v-if="seller.discount" class="supports text-extra-small">
</div> --> <div class="title">
<div class="title"> <div class="text">优惠信息</div>
<div class="text">优惠信息</div> </div>
</div> <ul class="tags">
<ul v-if="seller.supports" class="supports"> <li>
<li class="support-item" v-for="(item,index) in seller.supports" :key="item.id"> <van-cell>
<!-- <support-ico :size=2 :type="seller.supports[index].type"></support-ico> --> <span slot="title">
<span class="text">{{seller.supports[index].description}}</span> <van-tag color="#f44" plain size="10">满减</van-tag>
</li> </span>
</ul> <span
<div class="title"> v-for="tag in seller.discount"
<div class="text">商家公告</div> :key="tag.id"
</div> class="text"
<div class="bulletin"> >满{{parseInt(tag.condition) }}减{{parseInt(tag.amount)}},&nbsp;</span>
</van-cell>
</li>
</ul>
</section>
<div v-if="seller.bulletin" class="bulletin">
<div class="title">
<div class="text">商家公告</div>
</div>
<p class="content">{{seller.bulletin}}</p> <p class="content">{{seller.bulletin}}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="detail-close" @click="hide"> <div class="detail-close" @click="hide">
<i class="icon-close"></i> <i class="cubeic-select"></i>
</div> </div>
</div> </div>
</transition> </transition>
</template> </template>
<script> <script>
import popupMixin from '../../../../common/mixins/popup' import popupMixin from "../../../../common/mixins/popup";
export default {
// import SupportIco from '../../../../components/support-ico/support-ico' name: "header-detail",
mixins: [popupMixin],
export default { props: {
name: 'header-detail', seller: {
mixins: [popupMixin], type: Object,
props: { default() {
seller: { return {};
type: Object,
default() {
return {}
}
} }
},
components: {
// SupportIco
} }
},
components: {
// SupportIco
} }
};
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
// @import "~common/stylus/mixin" .van-cell {
// @import "~common/stylus/variable" padding: 0;
background-color: transparent;
.header-detail
position: fixed &__title {
z-index: 999 flex: none;
top: 0 }
left: 0
width: 100% &__value {
height: 100% text-align: left;
overflow: auto color: #f5f5f5;
backdrop-filter: blur(2px) }
opacity: 1 }
// color: $color-white
background: $color-white .header-detail {
&.fade-enter-active, &.fade-leave-active position: fixed;
transition: all 0.5s z-index: 999;
&.fade-enter, &.fade-leave-active top: 0;
opacity: 0 left: 0;
background: $color-background width: 100%;
.detail-wrapper height: 100%;
display: inline-block overflow: auto;
width: 100% backdrop-filter: blur(10px);
min-height: 100% opacity: 1;
.detail-main color: $color-white;
margin-top: 64px background: rgba(7, 17, 27, 0.8);
padding-bottom: 64px
.name &.fade-enter-active, &.fade-leave-active {
line-height: 16px transition: all 0.5s;
text-align: center }
font-size: $fontsize-large
font-weight: 700 &.fade-enter, &.fade-leave-active {
.star-wrapper opacity: 0;
margin-top: 18px background: $color-background;
padding: 2px 0 }
text-align: center
.title .detail-wrapper {
display: flex display: inline-block;
width: 80% width: 100%;
margin: 28px auto 24px auto min-height: 100%;
.text
padding: 0 12px .detail-main {
font-weight: 700 margin-top: 64px;
font-size: $fontsize-medium padding-bottom: 64px;
.supports .name {
width: 80% line-height: 16px;
margin: 0 auto text-align: center;
.support-item font-size: $fontsize-large-xx;
display: flex font-weight: 700;
align-items: center }
padding: 0 12px
margin-bottom: 12px .title {
&:last-child display: flex;
margin-bottom: 0 margin: 16px 0;
.support-ico
margin-right: 6px .text {
.text font-weight: 700;
line-height: 16px font-size: $fontsize-medium;
font-size: $fontsize-small }
.bulletin }
width: 80%
margin: 0 auto .supports {
.content width: 83%;
padding: 0 12px margin: 0 auto;
line-height: 24px }
font-size: $fontsize-small
.detail-close .bulletin {
position: relative width: 80%;
width: 30px margin: 0 auto;
height: 30px
margin: -64px auto 0 auto .content {
clear: both padding: 0 12px;
font-size: $fontsize-large-xxxx line-height: 24px;
font-size: $fontsize-small;
}
}
}
}
.detail-close {
position: relative;
width: 40px;
height: 40px;
margin: -64px auto 0 auto;
clear: both;
font-size: 32px;
}
}
</style> </style>
...@@ -134,16 +134,18 @@ export default { ...@@ -134,16 +134,18 @@ export default {
props: { props: {
disable: { disable: {
default: true default: true
},
isFoodTab:{
default: false
} }
}, },
components: { cubeShopCart, scrollNav }, components: { cubeShopCart, scrollNav },
created() { created() {
this.order_no = this.$route.query.order_no; this.order_no = this.$route.query.order_no;
this.initData(); this.initData();
}, },
mounted() { mounted() {
// this._showShopCartSticky(); this._showShopCartSticky();
}, },
methods: { methods: {
async initData() { async initData() {
...@@ -214,12 +216,13 @@ export default { ...@@ -214,12 +216,13 @@ export default {
this.shopCartStickyComp || this.shopCartStickyComp ||
this.$createShopCartSticky({ this.$createShopCartSticky({
$props: { $props: {
fullReduction:this.shopInfo.discount, fullReduction:this.shopInfo.discount,// 满减
selectFoods: "cartFoodList", selectFoods: "cartFoodList",
shopId: this.shopId.toString(), shopId: this.shopId.toString(),
deliveryPrice: this.seller.deliveryPrice, deliveryPrice: this.seller.deliveryPrice,// 配送费
minPrice: this.seller.minPrice, minPrice: this.seller.minPrice,// 起送价
fold: true, fold: true,
isFoodTab:true, // 控制购物导航是否显示
toggle: this.seller.toggle // 是否主动展示购物列表 toggle: this.seller.toggle // 是否主动展示购物列表
} }
}); });
...@@ -285,6 +288,15 @@ export default { ...@@ -285,6 +288,15 @@ export default {
if (!value.length) { if (!value.length) {
this.showCartList = false; this.showCartList = false;
} }
},
// 监听tab的切换,控制底部的是否显示
isFoodTab(newVal){
console.log(newVal)
if (!newVal) {
this._hideShopCartSticky();
} else {
this._showShopCartSticky();
}
} }
} }
}; };
......
<template> <template>
<div class="scroll-list-wrap" :class="{'view-wrapper':!pageLoading}"> <div class="scroll-list-wrap" :style="bgStyle">
<cube-loading v-if="pageLoading" :size="40"></cube-loading> <cube-loading v-if="pageLoading" :size="40"></cube-loading>
<cube-sticky <cube-sticky
:pos="scrollY" :pos="scrollY"
:check-top="checkTop" :check-top="checkTop"
...@@ -22,7 +21,7 @@ ...@@ -22,7 +21,7 @@
</h1> </h1>
<p class="text-light-grey text-extra-small">评价4.2 月售 等描述</p> <p class="text-light-grey text-extra-small">评价4.2 月售 等描述</p>
<!-- 优惠内容 --> <!-- 优惠内容 -->
<div class="tags" @click="showHeaderDetail"> <div v-if="shopInfo.discount.length" class="tags" @click="showHeaderDetail">
<van-tag <van-tag
v-for="tag in shopInfo.discount" v-for="tag in shopInfo.discount"
:key="tag.id" :key="tag.id"
...@@ -72,7 +71,7 @@ ...@@ -72,7 +71,7 @@
<script> <script>
import { allCategoryAndGoods, getShopInfo } from "../../common/serve"; import { allCategoryAndGoods, getShopInfo,fullReduction } from "../../common/serve";
import shopTab from "./children/shop"; import shopTab from "./children/shop";
import evaluate from "./children/rating/index"; import evaluate from "./children/rating/index";
import shopInfo from "./children/shopInfo"; import shopInfo from "./children/shopInfo";
...@@ -115,18 +114,21 @@ export default { ...@@ -115,18 +114,21 @@ export default {
this.initData(); this.initData();
}, },
computed: { computed: {
component() { // component() {
return "shopTab"; // return "shopTab";
}, // },
options() { options() {
return { click: true, bounce: false }; return { click: true, bounce: false };
}, },
contentH() { contentH() {
return document.body.clientHeight - this.tabBarH + "px"; return document.body.clientHeight - this.tabBarH + "px";
}, },
opacity() { // 顶部背景图片样式
let opacity = 0; bgStyle() {
return (opacity = this.scrollY / 30 > 1 ? 1 : this.scrollY / 30); return !this.pageLoading?{
background: `url(${this.$globalUrlFile+this.shopInfo.icon}) no-repeat`,
backgroundSize: '100%'
}:''
} }
}, },
watch: { watch: {
...@@ -137,37 +139,22 @@ export default { ...@@ -137,37 +139,22 @@ export default {
} else { } else {
this.disableFn(); this.disableFn();
} }
},
//pageLoading变化时说明组件已经获取初始化数据,在下一帧nextTick进行后续操作
pageLoading(value) {
if (!value) {
this.$nextTick(() => {
this.tabBarH = this.$refs.tabBar.offsetHeight; // tabbar 高度
});
}
} }
}, },
methods: { methods: {
scrollHandler({ y }) {
this.scrollY = -y;
/* if (this.scrollY >= this.headerH) {
this.disable = false;
} else {
this.disable = true;
} */
},
changeHandler(label) {
this.currentTab = label;
this.isFoodTab = label == "点餐" ? true : false;
// this.$store.commit('SHOW_CART',this.isFoodTab);
console.log("changed to:", label);
},
// 当tab吸附在顶部时,开启内部的滑动
diffChangeHandler(diff) {
if (diff && diff >= 1) {
this.disable = false;
}
},
scrollTop() {
this.disable = true;
},
async initData() { async initData() {
let p1 = allCategoryAndGoods(this.shopId); // 获取分类和商品数据 let p1 = allCategoryAndGoods(this.shopId); // 获取分类和商品数据
let p2 = getShopInfo(this.shopId); // 获取店铺信息 let p2 = getShopInfo(this.shopId); // 获取店铺信息
Promise.all([p1, p2]) let p3 = fullReduction(this.shopId);//满减
Promise.all([p1, p2,p3])
.then(result => { .then(result => {
let goodsMsg = result[0]; let goodsMsg = result[0];
if (goodsMsg.code == 0) { if (goodsMsg.code == 0) {
...@@ -178,7 +165,8 @@ export default { ...@@ -178,7 +165,8 @@ export default {
let shopMsg = result[1]; let shopMsg = result[1];
if (shopMsg.code == 0) { if (shopMsg.code == 0) {
this.shopInfo = shopMsg.data; this.shopInfo = shopMsg.data;
this.shopInfo["discount"] = [ this.shopInfo["discount"]=[]
/* this.shopInfo["discount"] = [
{ {
rule_id: 4, rule_id: 4,
condition: "20.00", condition: "20.00",
...@@ -189,14 +177,40 @@ export default { ...@@ -189,14 +177,40 @@ export default {
condition: "30.00", condition: "30.00",
amount: "5.00" amount: "5.00"
} }
]; ]; */
this.$store.commit("CURRENT_SHOPINFO", shopMsg.data); this.$store.commit("CURRENT_SHOPINFO", shopMsg.data);
} }
let fullrMsg = result[2];
if(fullrMsg.code==0){
}
this.pageLoading = false; this.pageLoading = false;
}) })
.catch(error => {}); .catch(error => {});
}, },
scrollHandler({ y }) {
this.scrollY = -y;
/* if (this.scrollY >= this.headerH) {
this.disable = false;
} else {
this.disable = true;
} */
},
scrollTop() {
this.disable = true;
},
changeHandler(label) {
this.currentTab = label;
this.isFoodTab = label == "点餐" ? true : false;
},
// 当tab吸附在顶部时,开启内部的滑动
diffChangeHandler(diff) {
if (diff && diff >= 1) {
this.disable = false;
}
},
enableFn() { enableFn() {
this.$refs.scroll.enable(); this.$refs.scroll.enable();
}, },
...@@ -205,34 +219,20 @@ export default { ...@@ -205,34 +219,20 @@ export default {
}, },
showHeaderDetail() { showHeaderDetail() {
/* this.headerDetailComp = this.headerDetailComp =
this.headerDetailComp || this.headerDetailComp ||
this.$createHeaderDetail({ this.$createHeaderDetail({
$props: { $props: {
seller: "shopInfo" seller: "shopInfo"
} }
}); });
this.headerDetailComp.show(); */ this.headerDetailComp.show();
}
},
//pageLoading变化时说明组件已经获取初始化数据,在下一帧nextTick进行后续操作
pageLoading: function(value) {
if (!value) {
this.$nextTick(() => {
// this.headerH = this.$refs.header.offsetHeight; // 包含tabbar 在内的头部高度
this.tabBarH = this.$refs.tabBar.offsetHeight; // tabbar 高度
});
} }
} }
}; };
</script> </script>
<style lang="stylus"> <style lang="stylus">
.view-wrapper {
background: url('https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3340225592,2502432116&fm=26&gp=0.jpg') no-repeat; // ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3340225592,2502432116&fm=26&gp=0.jpg) no-repeat;
background-size: 100%;
}
.page-hd { .page-hd {
position: relative; position: relative;
padding-top: 100px; padding-top: 100px;
...@@ -287,7 +287,6 @@ export default { ...@@ -287,7 +287,6 @@ export default {
&-slider { &-slider {
width: 0px !important; width: 0px !important;
// transform: translateX(0px) translateZ(0px);
} }
.cube-tab { .cube-tab {
...@@ -308,30 +307,4 @@ export default { ...@@ -308,30 +307,4 @@ export default {
.cube-tab-panel { .cube-tab-panel {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
/* .sticky-header {
z-index: 999;
.icons-box {
position: fixed;
left: 0;
text-align: right;
padding: 10px 10px 0;
right: 0;
z-index: -1;
.van-icon {
color: $color-white;
}
}
.van-search {
// opacity: 0;
z-index: 99;
&__content {
flex: auto;
}
}
} */
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment