-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -199,7 +231,7 @@ export default {
data() {
return {
config,
- pageData: "", //楼层页面数据
+ pageData: { list: [] }, //楼层页面数据
enablePageData: false, //是否显示楼层装修内容
basePageData: false, //基础店铺信息
scrollTop: 0,
@@ -265,6 +297,14 @@ export default {
},
},
+ computed: {
+ floorHasTopSearch() {
+ const list = this.pageData && this.pageData.list;
+ if (!list || !list.length) return false;
+ return list.some((item, index) => item.type === "search" && index !== 1);
+ },
+ },
+
/**
* 加载
*/
@@ -302,21 +342,50 @@ export default {
this.talkIm(this.storeInfo.storeId)
},
back() {
- uni.navigateBack();
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
+ uni.navigateBack({ delta: 1 });
+ } else {
+ uni.switchTab({ url: "/pages/tabbar/home/index" });
+ }
},
/**
* 实例化首页数据楼层
*/
initPageData() {
- this.pageData = "";
+ this.pageData = { list: [] };
getFloorStoreData({
pageType: "STORE",
num: this.storeId,
- }).then((res) => {
- if (res.data.success) {
- this.pageData = JSON.parse(res.data.result.pageData);
- }
- });
+ })
+ .then((res) => {
+ const result = res.data && res.data.result;
+ const pageDataStr = result && result.pageData;
+ if (res.data.success && pageDataStr) {
+ try {
+ const parsed = JSON.parse(pageDataStr);
+ this.pageData =
+ parsed && Array.isArray(parsed.list)
+ ? parsed
+ : { list: [] };
+ this.enablePageData = true;
+ } catch (e) {
+ this.fallbackToBasePage();
+ }
+ } else {
+ this.fallbackToBasePage();
+ }
+ })
+ .catch(() => {
+ this.fallbackToBasePage();
+ });
+ },
+ fallbackToBasePage() {
+ this.enablePageData = false;
+ this.basePageData = true;
+ this.pageData = { list: [] };
+ this.getGoodsData();
+ this.getCategoryData();
},
getStoreLicencePhoto() {
uni.navigateTo({
@@ -414,7 +483,6 @@ export default {
if(res.data.result.pageShow == '1'){
// 开启了楼层装修店铺
this.initPageData();
- this.enablePageData = true;
}
else{
// 商品信息
@@ -514,50 +582,102 @@ export default {
}
.store {
+ display: flex;
align-items: center;
- > .box {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-left: 30rpx;
- font-size: 24rpx;
- color: #999;
- flex: 2;
+ .store-logo {
+ flex-shrink: 0;
+ width: 100rpx;
+ height: 100rpx;
+ overflow: hidden;
- > .store-name {
- font-size: 34rpx;
- color: #333;
- letter-spacing: 1rpx;
- font-weight: bold;
- }
-
- > .store-message {
- margin-top: 25rpx;
-
- > div {
- font-size: 26rpx;
- margin: 0 5rpx;
-
- > span {
- font-size: 26rpx;
- font-weight: bold;
- color: #333;
- margin-right: 8rpx;
- }
- }
+ :deep(.u-image),
+ :deep(.u-image__image) {
+ width: 100rpx !important;
+ height: 100rpx !important;
}
}
+
+ .store-main {
+ flex: 1;
+ min-width: 0;
+ margin-left: 20rpx;
+ }
+
+ .store-top {
+ position: relative;
+ display: flex;
+ align-items: center;
+ min-height: 56rpx;
+ }
+
+ .store-name {
+ width: 100%;
+ font-size: 34rpx;
+ color: #333;
+ letter-spacing: 1rpx;
+ font-weight: bold;
+ text-align: center;
+ }
+
+ .store-name-text {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ display: block;
+ padding: 0 150rpx;
+ box-sizing: border-box;
+ }
+
+ .store-message {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-wrap: nowrap;
+ margin-top: 12rpx;
+ font-size: 24rpx;
+ color: #999;
+ }
+
+ .store-stat {
+ display: flex;
+ align-items: baseline;
+ white-space: nowrap;
+ margin-right: 24rpx;
+ font-size: 26rpx;
+ color: #999;
+ }
+
+ .stat-num {
+ font-size: 26rpx;
+ font-weight: bold;
+ color: #333;
+ margin-right: 4rpx;
+ }
+
+ .stat-label {
+ font-size: 26rpx;
+ color: #999;
+ }
+}
+
+.collection {
+ position: absolute;
+ right: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ flex-shrink: 0;
}
.collection-btn {
background: $main-color;
- padding: 6rpx 0;
+ padding: 8rpx 0;
width: 140rpx;
font-size: 24rpx;
color: #fff;
border-radius: 100px;
text-align: center;
+ line-height: 1.2;
}
.store-desc {
@@ -740,4 +860,47 @@ export default {
font-size: 24rpx;
color: #999;
}
+
+.shop-navbar {
+ :deep(.u-navbar__content__left) {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ z-index: 2;
+ width: auto !important;
+ padding: 0 24rpx 0 8rpx !important;
+ box-sizing: border-box;
+ }
+}
+
+.shop-navbar-inner {
+ display: flex;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+}
+
+.search-wrap {
+ flex: 1;
+ min-width: 0;
+ box-sizing: border-box;
+}
+
+.floor-search-wrap {
+ flex: 1;
+ min-width: 0;
+ box-sizing: border-box;
+}
+
+.nav-back {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 64rpx;
+ height: 100%;
+ flex-shrink: 0;
+}
diff --git a/pages/product/shopPageGoods.vue b/pages/product/shopPageGoods.vue
index a9a0076..0342680 100644
--- a/pages/product/shopPageGoods.vue
+++ b/pages/product/shopPageGoods.vue
@@ -1,6 +1,12 @@
-
+
暂无商品信息
diff --git a/pages/promotion/joinGroup.vue b/pages/promotion/joinGroup.vue
index 064fb2c..0f628ed 100644
--- a/pages/promotion/joinGroup.vue
+++ b/pages/promotion/joinGroup.vue
@@ -1,24 +1,34 @@
-
-
-
-
-
+
+
+
+
-
-
+ {{ title }}
+
-
- 取消
-
+
+ 取消
+
-
+
@@ -56,7 +66,9 @@
mounted() {},
watch: {
search(val) {
- val ? (this.title = "") : (this.title = "拼团活动");
+ if (!val && !this.title) {
+ this.title = "拼团活动";
+ }
},
},
onReachBottom() {
@@ -71,6 +83,24 @@
},
methods: {
+ back() {
+ if (this.search) {
+ this.search = false;
+ this.params.goodsName = "";
+ this.goodsList = [];
+ this.params.pageNumber = 1;
+ this.GET_AssembleGoods();
+ return;
+ }
+ const pages = getCurrentPages();
+ if (pages.length > 1) {
+ uni.navigateBack();
+ } else {
+ uni.switchTab({
+ url: "/pages/tabbar/home/index",
+ });
+ }
+ },
loadMore() {
this.params.pageNumber++;
this.GET_AssembleGoods();
@@ -118,16 +148,37 @@
diff --git a/pages/promotion/lives.vue b/pages/promotion/lives.vue
index b246a11..6bb2977 100644
--- a/pages/promotion/lives.vue
+++ b/pages/promotion/lives.vue
@@ -1,9 +1,19 @@
-
-
-
-
+
+
+
+
+
+
@@ -120,6 +130,14 @@ export default {
this.getLives();
},
methods: {
+ back() {
+ uni.navigateBack({
+ delta: 1,
+ fail: () => {
+ uni.switchTab({ url: "/pages/tabbar/home/index" });
+ },
+ });
+ },
/**
* 点击标签栏切换
*/
diff --git a/pages/promotion/point/detail.vue b/pages/promotion/point/detail.vue
index c06c3ff..678aaa5 100644
--- a/pages/promotion/point/detail.vue
+++ b/pages/promotion/point/detail.vue
@@ -1,6 +1,12 @@
-
+
diff --git a/pages/promotion/point/pointList.vue b/pages/promotion/point/pointList.vue
index eb5f52f..9387570 100644
--- a/pages/promotion/point/pointList.vue
+++ b/pages/promotion/point/pointList.vue
@@ -17,15 +17,23 @@
-
+
-
-
-
- {{ item.goodsName }}
-
- {{ item.points }}积分
- ¥{{unitPrice(item.originalPrice) }}
+
+
+
+ {{ item.goodsName || item.promotionName || '' }}
+
+
+ {{ item.points != null ? item.points : 0 }}
+ 积分
+
+ ¥{{ unitPrice(item.originalPrice) }}
@@ -194,10 +202,11 @@ page {
height: 100%;
}
.tipsMkt {
+ flex-shrink: 0;
color: #c0c4cc;
font-size: 24rpx !important;
text-decoration: line-through;
- margin-right: 20rpx !important;
+ margin-left: 12rpx;
}
@@ -265,61 +274,84 @@ page {
}
.index-items {
- padding-top: 10rpx;
- margin-top: 20rpx;
-
- padding-left: 20rpx;
+ padding: 20rpx 20rpx 0;
background-color: #f7f7f7;
- display: -webkit-box;
- display: -webkit-flex;
display: flex;
- align-items: center;
flex-wrap: wrap;
+ align-items: flex-start;
+ justify-content: space-between;
+ box-sizing: border-box;
}
.index-item {
- width: 346rpx;
- // height: 2100rpx;
+ width: calc(50% - 9rpx);
background-color: #fff;
- margin: 0 18rpx 20rpx 0;
+ margin-bottom: 20rpx;
border-radius: 16rpx;
box-sizing: border-box;
overflow: hidden;
- height: auto;
- padding-bottom: 20rpx;
+ display: flex;
+ flex-direction: column;
}
.index-item-img {
- ::v-deep .u-image {
- width: 346rpx !important;
- height: 320rpx !important;
- border-radius: 10rpx !important;
- }
+ width: 100%;
+ height: 320rpx;
+ overflow: hidden;
+ flex-shrink: 0;
+}
+
+.index-item-image {
+ width: 100%;
+ height: 320rpx;
+ display: block;
+}
+
+.index-item-info {
+ position: relative;
+ z-index: 1;
+ flex: 1;
+ background-color: #fff;
}
.index-item-title {
font-size: 26rpx;
- color: #333333;
- padding: 0 20rpx;
- height: 80rpx;
- box-sizing: border-box;
- max-height: 3em;
+ color: #333;
+ padding: 16rpx 20rpx 0;
+ line-height: 1.4;
overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
-
-
.index-item-price {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
font-size: 28rpx;
- overflow: hidden;
- color: $main-color;
- padding: 20rpx 0 0 20rpx;
- >.point{
- >span{
- font-size: 42rpx;
- font-weight: bold;
- margin-right:10rpx;
- }
+ color: #ff3c2a;
+ padding: 12rpx 20rpx 20rpx;
+
+ .point {
+ flex: 1;
+ min-width: 0;
+ display: flex;
+ align-items: baseline;
+ overflow: hidden;
+ }
+
+ .point-num {
+ font-size: 42rpx;
+ font-weight: bold;
+ color: #ff3c2a;
+ line-height: 1;
+ }
+
+ .point-unit {
+ margin-left: 6rpx;
+ font-size: 24rpx;
+ color: #ff3c2a;
+ flex-shrink: 0;
}
}
diff --git a/pages/promotion/point/user.vue b/pages/promotion/point/user.vue
index 6dca8c6..b10a8fb 100644
--- a/pages/promotion/point/user.vue
+++ b/pages/promotion/point/user.vue
@@ -37,6 +37,9 @@ export default {
height: 300rpx;
background: url("/static/point-bg.png") no-repeat;
background-size: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
.point {
font-size: 40rpx;
@@ -48,13 +51,17 @@ export default {
padding: 20rpx 0;
}
.point-wrapper {
- padding-top: 80rpx;
display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
}
.whether-point {
color: #fff;
- margin-left: 30rpx;
+ margin-top: 20rpx;
font-size: 36rpx;
font-weight: bold;
+ text-align: center;
}
\ No newline at end of file
diff --git a/pages/promotion/seckill.vue b/pages/promotion/seckill.vue
index e466527..6fc3668 100644
--- a/pages/promotion/seckill.vue
+++ b/pages/promotion/seckill.vue
@@ -1,8 +1,15 @@
-
+
@@ -86,6 +93,16 @@
this._setTimeInterval && clearInterval(this._setTimeInterval);
},
methods: {
+ back() {
+ uni.navigateBack({
+ delta: 1,
+ fail: () => {
+ uni.switchTab({
+ url: "/pages/tabbar/home/index",
+ });
+ },
+ });
+ },
/**
* 获取时间线商品
*/
@@ -168,14 +185,17 @@
}
.header-wraper {
- background: url('/static/bg.png');
+ background: url('/static/bg.png') no-repeat center center;
+ background-size: cover;
height: 200rpx;
display: flex;
align-items: center;
justify-content: center;
- >image{
+
+ .header-banner {
width: 300rpx;
height: 100rpx;
+ display: block;
}
}
diff --git a/patches/uview-plus+3.8.42.patch b/patches/uview-plus+3.8.42.patch
index 2e44737..18c69f4 100644
--- a/patches/uview-plus+3.8.42.patch
+++ b/patches/uview-plus+3.8.42.patch
@@ -95,6 +95,30 @@ index ed4c8ea..b1e4a3e 100644
+/* 主题变量改由组件 JS 的 upThemeVar 默认值兜底。
+ * 原有 page/body 标签选择器与 [data-up-theme] 属性选择器,
+ * 在微信小程序组件级 wxss 中不被允许,会触发编译告警,故移除。 */
+diff --git a/node_modules/uview-plus/components/u-parse/node/node.vue b/node_modules/uview-plus/components/u-parse/node/node.vue
+index 8e971c0..8b7c893 100644
+--- a/node_modules/uview-plus/components/u-parse/node/node.vue
++++ b/node_modules/uview-plus/components/u-parse/node/node.vue
+@@ -124,10 +124,18 @@ export default {
+ // #endif
+ },
+ data () {
++ let isiOS = false
++ // #ifdef MP-WEIXIN
++ if (uni.canIUse('getDeviceInfo')) {
++ isiOS = uni.getDeviceInfo().system.includes('iOS')
++ } else {
++ isiOS = uni.getSystemInfoSync().system.includes('iOS')
++ }
++ // #endif
+ return {
+ ctrl: {},
+ // #ifdef MP-WEIXIN
+- isiOS: uni.getSystemInfoSync().system.includes('iOS')
++ isiOS
+ // #endif
+ }
+ },
diff --git a/node_modules/uview-plus/components/u-popup/u-popup.vue b/node_modules/uview-plus/components/u-popup/u-popup.vue
index e06f46e..2557244 100644
--- a/node_modules/uview-plus/components/u-popup/u-popup.vue