Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -1,72 +1,71 @@ |
|||
<!--pages/category/category.wxml--> |
|||
<!--index.wxml--> |
|||
<view class="body" wx:if="{{remind}}"> |
|||
<view class='zong'> |
|||
<view class="spinner" > |
|||
<view class="spinner-container container1"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container2"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container3"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
</view> |
|||
<view class='zong'> |
|||
<view class="spinner"> |
|||
<view class="spinner-container container1"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container2"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container3"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 加载页面结束 --> |
|||
<block wx:else> |
|||
<import src="/wxSearch/wxSearch.wxml"/> |
|||
<form bindsubmit="wxSearchFn" report-submit="true" > |
|||
<view class="wxSearch-section"> |
|||
<view class="wxSearch-pancel"> |
|||
<input bindinput="wxSearchInput" confirmType="search" bindconfirm="search_confirmType" value="{{wxSearchData.value}}" bindtap="wxSerchFocus" class="wxSearch-input" placeholder="搜索" /> |
|||
<button class="wxSearch-button" type="primary" formType="submit" size="mini" plain="true">搜索</button> |
|||
</view> |
|||
</view> |
|||
</form> |
|||
<template is="wxSearch" data="{{wxSearchData}}"/> |
|||
<view class="t_container"> |
|||
<!--左侧栏--> |
|||
<view class="nav_left"> |
|||
<scroll-view scroll-y="true" style="height:99%;"> |
|||
<view wx:for="{{cateItems}}" wx:key="cateItems"> |
|||
<!--当前项的id等于item项的id,那个就是当前状态--> |
|||
<!--用data-index记录这个数据在数组的下标位置,使用data-id设置每个item的id值,供打开2级页面使用--> |
|||
<view class="nav_left_items {{curNav == item.cate_id ? 'active' : ''}}" bindtap="switchRightTab" data-index="{{index}}" data-id="{{item.cate_id}}">{{item.cate_name}}</view> |
|||
<import src="/wxSearch/wxSearch.wxml" /> |
|||
<form bindsubmit="wxSearchFn"> |
|||
<view class="wxSearch-section"> |
|||
<view class="wxSearch-pancel"> |
|||
<input bindinput="wxSearchInput" confirmType="search" bindconfirm="search_confirmType" value="{{wxSearchData.value}}" bindtap="wxSerchFocus" class="wxSearch-input" placeholder="搜索" /> |
|||
<button class="wxSearch-button" type="primary" formType="submit" size="mini" plain="true">搜索</button> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
<!--右侧栏--> |
|||
<view class="nav_right"> |
|||
<scroll-view scroll-y="true" style="height:100%"> |
|||
<!--如果有数据,才遍历项--> |
|||
<image class='cimages' wx:if="{{cateItems[curIndex].cimgurl != ''}}" src="{{cateItems[curIndex].cimgurl}}"></image> |
|||
<view wx:if="{{cateItems[curIndex].ishaveChild}}"> |
|||
<block wx:for="{{cateItems[curIndex].children}}" wx:key="children"> |
|||
<view class="nav_right_items"> |
|||
<!--界面跳转 --> |
|||
<navigator url="../listdetail/listdetail?class={{item.child_id}}&title={{item.name}}" > |
|||
<image src="{{item.picture}}"></image> |
|||
<text>{{item.name}}</text> |
|||
</navigator> |
|||
</view> |
|||
</form> |
|||
<template is="wxSearch" data="{{wxSearchData}}" /> |
|||
<view class="t_container"> |
|||
<!--左侧栏--> |
|||
<view class="nav_left"> |
|||
<scroll-view scroll-y="true" style="height:99%;"> |
|||
<view wx:for="{{cateItems}}" wx:key="cateItems"> |
|||
<!--当前项的id等于item项的id,那个就是当前状态--> |
|||
<!--用data-index记录这个数据在数组的下标位置,使用data-id设置每个item的id值,供打开2级页面使用--> |
|||
<view class="nav_left_items {{curNav == item.cate_id ? 'active' : ''}}" bindtap="switchRightTab" data-index="{{index}}" data-id="{{item.cate_id}}">{{item.cate_name}}</view> |
|||
</view> |
|||
</block> |
|||
</scroll-view> |
|||
</view> |
|||
<!--右侧栏--> |
|||
<view class="nav_right"> |
|||
<scroll-view scroll-y="true" style="height:100%"> |
|||
<!--如果有数据,才遍历项--> |
|||
<image class='cimages' wx:if="{{cateItems[curIndex].cimgurl != ''}}" src="{{cateItems[curIndex].cimgurl}}"></image> |
|||
<view wx:if="{{cateItems[curIndex].ishaveChild}}"> |
|||
<block wx:for="{{cateItems[curIndex].children}}" wx:key="children"> |
|||
<view class="nav_right_items"> |
|||
<!--界面跳转 --> |
|||
<navigator url="../listdetail/listdetail?id={{item.child_id}}&title={{item.name}}"> |
|||
<image src="{{item.picture}}"></image> |
|||
<text>{{item.name}}</text> |
|||
</navigator> |
|||
</view> |
|||
</block> |
|||
</view> |
|||
<!--如果无数据,则显示数据--> |
|||
<view class="nodata_text" wx:else>该分类暂无数据</view> |
|||
</scroll-view> |
|||
</view> |
|||
<!--如果无数据,则显示数据--> |
|||
<view class="nodata_text" wx:else>该分类暂无数据</view> |
|||
</scroll-view> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
|
|||
</block> |
@ -0,0 +1,85 @@ |
|||
// pages/store/myStore.js
|
|||
var app = getApp(); |
|||
var WXAPI = require('../../utils/server.js'); |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
shop_info: {}, |
|||
}, |
|||
// 数据加载
|
|||
reloadData: function (options) { |
|||
var that = this; |
|||
var shopId = options.shopId; |
|||
WXAPI.seemystore({ |
|||
accessId: app.globalData.accessId, |
|||
storeId: 239, |
|||
storeType: 1, |
|||
shop_id: shopId, |
|||
}).then(res => { |
|||
if (res.code == 200) { |
|||
var data = res.data; |
|||
that.setData({ |
|||
shop_info: data.list[0], |
|||
}) |
|||
} |
|||
}); |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
this.reloadData(options); |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarBackgroundColor": "#FA5151", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "查看门店信息" |
|||
} |
@ -0,0 +1,14 @@ |
|||
<!--pages/store/myStore.wxml--> |
|||
<view class="container"> |
|||
<view class="store-item-top"> |
|||
<view>{{ shop_info.name }}</view> |
|||
|
|||
<view class="store-item-disc">地址:{{ shop_info.sheng }}{{ shop_info.shi }}{{ shop_info.xian }}{{ shop_info.address }}</view> |
|||
|
|||
<view class="store-item-bottom"> |
|||
<view>营业时间:{{ shop_info.business_hours }}</view> |
|||
<view>联系电话:{{ shop_info.mobile }}</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
@ -0,0 +1,38 @@ |
|||
/* pages/store/myStore.wxss */ |
|||
.container { |
|||
background-color: #F6F6F6; |
|||
/* min-height: 100vh; */ |
|||
} |
|||
.store-item-top { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100vw; |
|||
background: white; |
|||
box-sizing: border-box; |
|||
padding: 30rpx 24rpx 30rpx 28rpx; |
|||
font-size: 32rpx; |
|||
color: black; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.store-item-disc{ |
|||
font-size: 28rpx; |
|||
line-height: 32rpx; |
|||
color: #666666; |
|||
margin-top: 16rpx; |
|||
text-overflow: -o-ellipsis-lastline; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
display: -webkit-box; |
|||
-webkit-line-clamp: 2; |
|||
line-clamp: 2; |
|||
-webkit-box-orient: vertical; |
|||
} |
|||
|
|||
.store-item-bottom{ |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
color: #666666; |
|||
font-size: 28rpx; |
|||
margin-top: 5rpx; |
|||
} |
@ -1,3 +1,6 @@ |
|||
{ |
|||
"usingComponents": {} |
|||
"usingComponents": {}, |
|||
"navigationBarBackgroundColor": "#FA5151", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "店铺主页" |
|||
} |
@ -1,2 +1,65 @@ |
|||
<!--pages/store/store.wxml--> |
|||
<text>pages/store/store.wxml</text> |
|||
<view class="container"> |
|||
<view class="storeTop"> |
|||
<view class="storeTop_title"> |
|||
<view class="storeTopLeft"> |
|||
<image src="{{shop_logo}}" mode="" /> |
|||
<view class="storeTopLeftText"> |
|||
<view class="storeName"> |
|||
{{ shop_name }} |
|||
<view class="is_open" wx:if="{{shop.is_open == 2}}">已关闭</view> |
|||
<view class="collectionBtn" bindtap="collStore"> |
|||
<image src="{{collection_status == 0?mch_sc:mch_sch}}" mode="" /> |
|||
</view> |
|||
</view> |
|||
<view class="storeSellNum"> |
|||
{{ shop.quantity_on_sale }}在售商品 | |
|||
已售{{ shop.quantity_sold}}件 | |
|||
{{ shop.collection_num }}收藏 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="storeTop_bottom"> |
|||
<view class="addressBox"> |
|||
<image src="/images/icon_dz.png" mode="widthFix" style='width:48rpx;' /> |
|||
<text>{{shop_info.sheng}}{{shop_info.shi}}{{shop_info.xian}}{{shop_info.address}}({{shop.distance}}km)</text> |
|||
</view> |
|||
<view class="seeStore" bindtap="navToStore"> |
|||
查看门店信息 |
|||
<image src="/images/blueRight.png" mode="" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="tab-view"> |
|||
<view class="tab-item{{currentIndex==idx?'Active':''}}" wx:key="key" wx:for="{{navTab}}" wx:for-index="idx" wx:for-item="item" data-idx='{{idx}}' data-item='{{item}}' bindtap="switchTab">{{item.type}} |
|||
<view class="tab-line{{currentIndex==idx?'Active':''}}"></view> |
|||
<text class="tab-badge" hidden="{{item.num == 0}}">{{item.num}}</text> |
|||
</view> |
|||
</view> |
|||
<scroll-view class="list-table" scroll-y="true"> |
|||
<block wx:if="{{type!=3}}"> |
|||
<view class="list-cell" wx:for="{{goods_list}}" wx:key="index" data-info="{{item}}"> |
|||
<view class="goods_view"> |
|||
<image class="goods_img" lazy-load src="{{item.imgurl}}" /> |
|||
<view wx:if="{{item.status == 3}}" class="dowmPro">已失效</view> |
|||
<view wx:elif="{{item.stockNum == 0}}" class="dowmPro">已售罄</view> |
|||
</view> |
|||
<view class="overtitle">{{ item.product_title }}</view> |
|||
<view class="goods_mun"> |
|||
<view class="goods_price"> |
|||
<view class='price'>¥{{item.vip_yprice}}</view> |
|||
</view> |
|||
<image wx:if="{{item.is_open == 1}}" bindtap="shopping_j" src="/images/goods_shopImg.png" /> |
|||
<image wx:else src="" /> |
|||
</view> |
|||
</view> |
|||
</block> |
|||
<block wx:else> |
|||
<view class="list-label" wx:for="{{goods_list}}" wx:key="index" data-info="{{item}}" bindtap="navToList"> |
|||
<view class="title">{{item.pname}}</view> |
|||
<image src="/images/x_right.png" /> |
|||
</view> |
|||
</block> |
|||
</scroll-view> |
|||
</view> |
@ -1 +1,270 @@ |
|||
/* pages/store/store.wxss */ |
|||
/* pages/store/store.wxss */ |
|||
.container { |
|||
background-color: #F6F6F6; |
|||
/* min-height: 100vh; */ |
|||
} |
|||
.storeTop { |
|||
background-color: #FA5151; |
|||
padding: 30rpx; |
|||
width: 100%; |
|||
} |
|||
.storeTop_title { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
.storeTopLeft { |
|||
flex: 1; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
.storeTopLeft image { |
|||
width: 100rpx; |
|||
height: 100rpx; |
|||
} |
|||
.storeTopLeftText { |
|||
flex: 1; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
margin-left: 20rpx; |
|||
padding: 11rpx 0; |
|||
} |
|||
.storeTop_content { |
|||
padding-top: 28rpx; |
|||
} |
|||
.storeTop_content_top { |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 26rpx; |
|||
color: #777777; |
|||
} |
|||
.storeTop_content_bottom { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
flex-wrap: wrap; |
|||
font-size: 24rpx; |
|||
color: #b8b8b8; |
|||
overflow: hidden; |
|||
transition: all 0.3s linear; |
|||
} |
|||
.storeTop_content_bottom p { |
|||
padding-top: 16rpx; |
|||
} |
|||
.storeTop_content img { |
|||
width: 22rpx; |
|||
height: 12rpx; |
|||
margin-left: 9rpx; |
|||
} |
|||
.storeName { |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 30rpx; |
|||
line-height: 30rpx; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
.storeSellNum { |
|||
font-size: 22rpx; |
|||
line-height: 22rpx; |
|||
color: white; |
|||
} |
|||
.storeTopRight { |
|||
font-size: 22rpx; |
|||
color: #fff; |
|||
} |
|||
.storeTopRight img { |
|||
width: 26rpx; |
|||
height: 24rpx; |
|||
} |
|||
.collectionBtn { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: 33rpx; |
|||
height: 31rpx; |
|||
margin-left: auto; |
|||
padding: 0 20rpx; |
|||
box-sizing: content-box; |
|||
} |
|||
.collectionBtn img,.shareBtn img{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
.storeTop_bottom{ |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 25rpx; |
|||
} |
|||
.addressBox{ |
|||
flex: 1; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-right: 150rpx; |
|||
color: rgba(255, 255, 255, 0.7); |
|||
} |
|||
.addressBox image{ |
|||
width: 24rpx; |
|||
height: 31rpx; |
|||
} |
|||
.addressBox text{ |
|||
margin-left: 10rpx; |
|||
font-size: 24rpx; |
|||
line-height: 24rpx; |
|||
} |
|||
.seeStore{ |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
width: 208rpx; |
|||
height: 60rpx; |
|||
background: #ffffff; |
|||
border-radius: 30rpx 0 0 30rpx; |
|||
margin-right: 25rpx; |
|||
padding: 0 20rpx 0 25rpx; |
|||
box-sizing: border-box; |
|||
color: #FA5151; |
|||
} |
|||
|
|||
.seeStore image{ |
|||
width: 12rpx; |
|||
height: 22rpx; |
|||
margin-left: auto; |
|||
} |
|||
.tab-view{ |
|||
/* position: fixed; */ |
|||
width: 100%; |
|||
height: 100rpx; |
|||
background-color: #F6F6F6; |
|||
white-space: nowrap; |
|||
} |
|||
.tab-itemActive{ |
|||
color: #FA5151; |
|||
width: 25%; |
|||
height: 100rpx; |
|||
line-height: 100rpx; |
|||
text-align: center; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
display: inline-block; |
|||
} |
|||
.tab-item { |
|||
color: #888888; |
|||
width: 25%; |
|||
height: 100rpx; |
|||
line-height: 100rpx; |
|||
text-align: center; |
|||
font-size: 30rpx; |
|||
display: inline-block; |
|||
} |
|||
.tab-lineActive{ |
|||
width: 78rpx; |
|||
height: 6rpx; |
|||
margin-top: -10rpx; |
|||
margin-left: 31%; |
|||
background-color: #FA5151; |
|||
z-index: 655; |
|||
} |
|||
.tab-badge{ |
|||
position: absolute; |
|||
margin-top: -80rpx; |
|||
margin-left: 45rpx; |
|||
width: 35rpx; |
|||
height: 35rpx; |
|||
border-radius: 17.5rpx; |
|||
line-height: 35rpx; |
|||
font-size: 28rpx; |
|||
text-align: center; |
|||
font-weight: normal; |
|||
color: white; |
|||
background-color: red; |
|||
} |
|||
.tab-line{ |
|||
width: 100%; |
|||
height: 2rpx; |
|||
margin-top: -8rpx; |
|||
background-color: #F6F6F6; |
|||
} |
|||
.list-table { |
|||
margin-top:5rpx; |
|||
width: 100%; |
|||
padding-bottom: calc(100rpx + env(safe-area-inset-bottom)); |
|||
} |
|||
.list-cell { |
|||
display: inline-table; |
|||
width: 46%; |
|||
margin:5rpx 0rpx 20rpx 20rpx; |
|||
padding-bottom: 5rpx; |
|||
background-color: white; |
|||
border-radius: 10rpx; |
|||
overflow: hidden; |
|||
} |
|||
.goods_view { |
|||
width: 345rpx; |
|||
height: 345rpx; |
|||
} |
|||
.goods_img{ |
|||
width:345rpx; |
|||
height:345rpx; |
|||
} |
|||
.dowmPro { |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
border-radius: 50%; |
|||
background-color: rgba(0, 0, 0, 0.6); |
|||
position: absolute; |
|||
top: 50%; |
|||
left: 25%; |
|||
transform: translate(-50%, -50%); |
|||
color: #FFFFFF; |
|||
font-size: 26rpx; |
|||
line-height: 120rpx; |
|||
text-align: center; |
|||
} |
|||
.overtitle { |
|||
font-size: 30rpx; |
|||
line-height: 30rpx; |
|||
margin-top: 5rpx!important; |
|||
margin-left: 25rpx; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
} |
|||
.goods_mun { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 10rpx; |
|||
padding: 0rpx 20rpx 20rpx 25rpx; |
|||
} |
|||
.goods_mun image{ |
|||
width: 58rpx; |
|||
height: 58rpx; |
|||
margin-left: auto; |
|||
} |
|||
.goods_mun .price{ |
|||
font-size: 32rpx; |
|||
line-height: 32rpx; |
|||
font-weight: bold; |
|||
color: #FA5151; |
|||
} |
|||
.list-label{ |
|||
margin: 0rpx 20rpx 20rpx 20rpx; |
|||
height:100rpx; |
|||
border-radius: 10rpx; |
|||
overflow: hidden; |
|||
background-color: white; |
|||
display: flex; |
|||
align-items:center; |
|||
} |
|||
.list-label .title{ |
|||
margin-left: 20rpx; |
|||
font-size: 32rpx; |
|||
color: black; |
|||
} |
|||
.list-label image{ |
|||
position: absolute; |
|||
right: 40rpx; |
|||
width: 25rpx; |
|||
height: 25rpx; |
|||
} |