Merge branch 'wwz_x' of https://e.coding.net/g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into gaohao
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<page-meta :page-style="'overflow:'+(pagemetashow?'hidden':'visible')"></page-meta>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 占位符 接口请求完毕才显示 -->
|
<!-- 占位符 接口请求完毕才显示 -->
|
||||||
<view v-if="fixedtrue"
|
<view v-if="fixedtrue"
|
||||||
@@ -7,8 +8,9 @@
|
|||||||
<text style="margin-left:10rpx;font-size: 40rpx;color: #7d7d76;">加载中</text>
|
<text style="margin-left:10rpx;font-size: 40rpx;color: #7d7d76;">加载中</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 顶部面板 -->
|
<!-- 顶部面板 -->
|
||||||
<view class="top--panel">
|
<view class="top--panel" @touchmove.stop.prevent="stopRoll">
|
||||||
<navseat :opacity='opacity' :titleshow='true' @navigateBacknav='navigateBacknav' :navigateBacknavtitle='true'></navseat>
|
<navseat :opacity='opacity' :titleshow='true' @navigateBacknav='navigateBacknav'
|
||||||
|
:navigateBacknavtitle='true'></navseat>
|
||||||
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
|
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
|
||||||
<image class="panelimgbackground"
|
<image class="panelimgbackground"
|
||||||
:src="shopInfo.storeInfo.coverImg||'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/shopDetails/topBanner.png'"
|
:src="shopInfo.storeInfo.coverImg||'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/shopDetails/topBanner.png'"
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
<view class="panelfiveitemthere flex-start">
|
<view class="panelfiveitemthere flex-start">
|
||||||
<text>招牌</text>
|
<text>招牌</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="panelfiveitemfour">
|
<!-- <view class="panelfiveitemfour">
|
||||||
{{item.shortTitle?item.shortTitle:''}}
|
{{item.shortTitle?item.shortTitle:''}}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="panelfiveitemfive">
|
<view class="panelfiveitemfive">
|
||||||
@@ -84,7 +86,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
@@ -253,11 +254,12 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- 规格 -->
|
<!-- 规格 -->
|
||||||
<u-popup :show="showShopsku" :round="20" mode="bottom" @close="showShopsku = false"
|
<u-popup :show="showShopsku" :round="20" mode="bottom" @close="showShopsku = false;pagemetashow=false"
|
||||||
:safeAreaInsetBottom='false'>
|
:safeAreaInsetBottom='false'>
|
||||||
<view class="shop_sku" :style="{ 'max-height': (scrollHeight-100)+'px' }">
|
<view class="shop_sku" :style="{ 'max-height': '80vh;' }">
|
||||||
<view class="positionabsolute">
|
<view class="positionabsolute">
|
||||||
<u-icon name="close-circle" @click="showShopsku = false" color="#000" size="50"></u-icon>
|
<u-icon name="close-circle" @click="showShopsku = false;pagemetashow=false" color="#000"
|
||||||
|
size="50"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<image class="shop_skucimage" :src="specifications.coverImg" mode="aspectFill"></image>
|
<image class="shop_skucimage" :src="specifications.coverImg" mode="aspectFill"></image>
|
||||||
<view class="shop_sku_name"> {{specifications.name}} </view>
|
<view class="shop_sku_name"> {{specifications.name}} </view>
|
||||||
@@ -321,6 +323,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pagemetashow: false,
|
||||||
fixedtrue: true,
|
fixedtrue: true,
|
||||||
userInfo: uni.cache.get('userInfo'), //个人信息
|
userInfo: uni.cache.get('userInfo'), //个人信息
|
||||||
opacity: false, //是否显示
|
opacity: false, //是否显示
|
||||||
@@ -579,6 +582,7 @@
|
|||||||
let res = await this.api.cartAdd(data)
|
let res = await this.api.cartAdd(data)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.showShopsku = false;
|
this.showShopsku = false;
|
||||||
|
this.pagemetashow = false;
|
||||||
this.$set(this, 'amountcartNumber', 0)
|
this.$set(this, 'amountcartNumber', 0)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -724,6 +728,7 @@
|
|||||||
this.skuNumber = res.data.number || 0;
|
this.skuNumber = res.data.number || 0;
|
||||||
this.skuSuit = res.data.suit;
|
this.skuSuit = res.data.suit;
|
||||||
this.showShopsku = true //打开弹框
|
this.showShopsku = true //打开弹框
|
||||||
|
this.pagemetashow = true
|
||||||
}
|
}
|
||||||
this.$set(this, 'amountcartNumber', 0)
|
this.$set(this, 'amountcartNumber', 0)
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -848,14 +853,12 @@
|
|||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
let view = uni.createSelectorQuery().selectAll('.main-item');
|
let view = uni.createSelectorQuery().selectAll('.main-item');
|
||||||
view.boundingClientRect(async data => {
|
view.boundingClientRect(async data => {
|
||||||
console.log(data, 840)
|
|
||||||
resolve(data);
|
resolve(data);
|
||||||
}).exec();
|
}).exec();
|
||||||
this.$u.getRect('.scroll-panel').then(res => {
|
this.$u.getRect('.scroll-panel').then(res => {
|
||||||
this.scrollTopSize = res.top; //元素距离顶部的距离
|
this.scrollTopSize = res.top; //元素距离顶部的距离
|
||||||
})
|
})
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, 111)
|
|
||||||
let topArr = res.map((item) => {
|
let topArr = res.map((item) => {
|
||||||
return item.top; /* 减去滚动容器距离顶部的距离 加导航栏高度*/
|
return item.top; /* 减去滚动容器距离顶部的距离 加导航栏高度*/
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user