切换导航条
此项目
正在载入...
登录
倪静楠
/
huarunwj
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
倪静楠
4 years ago
提交
0a3250ec8ee6edb104bdcf97f78b978e12203ea0
1 个父辈
2958112f
评价
隐藏空白字符变更
内嵌
并排对比
正在显示
29 个修改的文件
包含
750 行增加
和
184 行删除
app.json
app.wxss
pages/all-evaluate/all-evaluate.js
pages/all-evaluate/all-evaluate.json
pages/all-evaluate/all-evaluate.wxml
pages/all-evaluate/all-evaluate.wxss
pages/all-order/all-order.wxss
pages/classify/classify.js
pages/classify/classify.json
pages/classify/classify.wxml
pages/classify/classify.wxss
pages/discount-card/discount-card.js
pages/home/home.js
pages/home/home.json
pages/home/home.wxml
pages/home/home.wxss
pages/my-collect/my-collect.js
pages/product-detail/product-detail.js
pages/product-detail/product-detail.wxss
pages/refund-after/refund-after.wxml
pages/refund-after/refund-after.wxss
pages/select-address/select-address.wxml
pages/select-address/select-address.wxss
pages/shopping-cart/shopping-cart.js
pages/shopping-cart/shopping-cart.wxml
pages/shopping-cart/shopping-cart.wxss
pages/user/user.js
pages/user/user.wxml
pages/user/user.wxss
app.json
查看文件 @
0a3250e
...
...
@@ -40,34 +40,7 @@
"style"
:
"v2"
,
"sitemapLocation"
:
"sitemap.json"
,
"selectedColor"
:
"#355DFF"
,
"tabBar"
:
{
"list"
:
[
{
"pagePath"
:
"pages/home/home"
,
"text"
:
"首页"
,
"iconPath"
:
"/images/tab/home.png"
,
"selectedIconPath"
:
"/images/tab/home (2).png"
},
{
"pagePath"
:
"pages/classify/classify"
,
"text"
:
"分类"
,
"iconPath"
:
"/images/tab/classify (2).png"
,
"selectedIconPath"
:
"/images/tab/classify.png"
},
{
"pagePath"
:
"pages/shopping-cart/shopping-cart"
,
"text"
:
"购物车"
,
"iconPath"
:
"/images/tab/cart (2).png"
,
"selectedIconPath"
:
"/images/tab/cart.png"
},
{
"pagePath"
:
"pages/user/user"
,
"text"
:
"我的"
,
"iconPath"
:
"/images/tab/user.png"
,
"selectedIconPath"
:
"/images/tab/user (2).png"
}
]
},
"plugins"
:
{
"chooseLocation"
:
{
"version"
:
"1.0.5"
,
...
...
app.wxss
查看文件 @
0a3250e
...
...
@@ -3,4 +3,5 @@ page{
width: 100%;
height: 100%;
overflow-x: hidden;
background-color: #f1f2f4;
}
\ No newline at end of file
...
...
pages/all-evaluate/all-evaluate.js
查看文件 @
0a3250e
// pages/all-evaluate/all-evaluate.js
let
method
=
require
(
"../../utils/reuqest.js"
)
Page
({
data
:
{
list
:[],
goodsId
:
''
goodsId
:
''
,
page
:
1
,
bottomHint
:
false
},
//评价列表
getList
(
goodsId
)
{
let
postData
=
{
goodsId
:
goodsId
,
page
:
this
.
data
.
page
,
size
:
10
}
method
.
postRequest
(
"/goods/goodsComment"
,
postData
,
data
=>
{
wx
.
stopPullDownRefresh
();
if
(
data
.
statusCode
==
0
)
{
this
.
setData
({
list
:
data
.
data
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
setData
({
goodsId
:
options
.
goodsId
})
this
.
getList
(
options
.
goodsid
)
},
/**
...
...
@@ -23,7 +44,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
getList
()
},
/**
...
...
@@ -43,15 +64,34 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onRefresh
()
{
// wx.showNavigationBarLoading();
this
.
setData
({
page
:
1
,
list
:[]
})
this
.
getList
()
},
onPullDownRefresh
:
function
()
{
this
.
onRefresh
()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
,
})
this
.
getList
();
this
.
setData
({
bottomHint
:
true
})
setTimeout
(()
=>
{
this
.
setData
({
bottomHint
:
false
})
},
2000
)
},
/**
...
...
pages/all-evaluate/all-evaluate.json
查看文件 @
0a3250e
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"全部评价"
,
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
...
...
pages/all-evaluate/all-evaluate.wxml
查看文件 @
0a3250e
<!--pages/all-evaluate/all-evaluate.wxml-->
<view class="outerBox">
<view class="outerBox"
wx:for="{{list}}"
>
<view class="userBox">
<view class="wxHead">
<image src="{{}}"></image>
<image src="{{
item.wxHeadImg
}}"></image>
</view>
<view class="wxName"></view>
<view class="wxName">
{{item.wxName}}
</view>
</view>
<view class="text"></view>
<view class="text">
{{item.content}}
</view>
<view class="picBox">
<view class="pic" wx:for="{{item.images}}">
<image src="{{item}}"></image>
<image src="{{item}}"
></image>
</view>
</view>
</view>
<view wx:if="{{list.length==0}}" class="noDataBox">
<view class="noDataPic">
<image src="/images/message@2x.png"></image>
</view>
<view class="noDataText">这件商品还没有评价,快去评价吧~</view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
\ No newline at end of file
...
...
pages/all-evaluate/all-evaluate.wxss
查看文件 @
0a3250e
/* pages/all-evaluate/all-evaluate.wxss */
page{
page
{
background-color: #f1f2f4;
padding-top: 24rpx;
}
.outerBox{
.outerBox {
background-color: #ffffff;
width: 750rpx;
padding: 32rpx;
box-sizing: border-box;
padding-bottom: 20rpx;
}
.userBox {
width: 686rpx;
height: 72rpx;
background-color: #ffffff;
display: flex;
display: flex;
}
.wxHead {
width: 72rpx;
height: 72rpx;
margin-right:16rpx;
margin-right:
16rpx;
background-color: aqua;
}
...
...
@@ -28,32 +33,77 @@ page{
}
.wxName {
color: #333333;
height: 100%;
width: 200rpx;
max-width: 500rpx;
background-color: bisque;
display: flex;
align-items: center;
justify-content: left;
font-size: 28rpx;
}
.text {
width: 686rpx;
height: 200rpx;
font-size: 28rpx;
font-weight: 400;
text-align: left;
color: #333333;
background-color: blueviolet
;
word-break: break-all
;
margin-top: 20rpx;
}
.picBox {
display: flex;
height: 200rpx;
width: 100%;
}
.pic {
width: 33%;
display: flex;
justify-content: center;
}
.pic image {
width: 96%;
height: 200rpx;
}
.bottomHint {
font-size: 24rpx;
color: gray;
display: flex;
justify-content: center;
padding-bottom: 10rpx;
}
.noDataBox {
margin-top: 200rpx;
}
.noDataPic {
width: 200rpx;
height: 200rpx;
margin: 0 auto;
}
.noDataPic image {
width: 200rpx;
height: 200rpx;
}
.noDataText {
width: 750rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #8e8e8e;
}
.bottomHint {
font-size: 24rpx;
color: gray;
display: flex;
justify-content: center;
padding-bottom: 10rpx;
}
\ No newline at end of file
...
...
pages/all-order/all-order.wxss
查看文件 @
0a3250e
...
...
@@ -172,6 +172,7 @@ page{
width:750rpx;
display: flex;
justify-content: center;
margin-top: 10rpx;
}
.top1{
font-size: 28rpx;
...
...
pages/classify/classify.js
查看文件 @
0a3250e
...
...
@@ -3,6 +3,8 @@ let method = require("../../utils/reuqest.js");
const
util
=
require
(
"../../utils/util.js"
);
Page
({
data
:
{
page
:
1
,
classifyId
:
""
,
idx
:
0
,
//商品规格索引
check
:
false
,
//商品规格选择
goodsData
:
''
,
//获取商品库存
...
...
@@ -20,8 +22,25 @@ Page({
location
:
''
,
latitude
:
''
,
//维度
longitude
:
''
,
//经度
bottomHint
:
false
//触底提示
},
// tabbar
toHome
()
{
wx
.
reLaunch
({
url
:
'/pages/home/home'
,
})
},
toShopCart
()
{
wx
.
reLaunch
({
url
:
'/pages/shopping-cart/shopping-cart'
,
})
},
toUser
()
{
wx
.
reLaunch
({
url
:
'/pages/user/user'
,
})
},
//获取定位
getLocation
()
{
let
that
=
this
;
wx
.
getLocation
({
...
...
@@ -69,7 +88,7 @@ Page({
url
:
'/pages/searchRequest/searchRequest?keyword='
+
this
.
data
.
keyword
,
})
},
// 导航
切换
// 导航
菜单
catalog
()
{
method
.
getRequest
(
'/category/getCategoryList'
,
data
=>
{
if
(
data
.
statusCode
==
0
)
{
...
...
@@ -84,34 +103,43 @@ Page({
let
that
=
this
;
let
list
=
that
.
data
.
lableArray
;
let
id
=
e
.
currentTarget
.
dataset
.
id
;
this
.
setData
({
classifyId
:
id
})
that
.
dataRequest
(
id
)
},
//第一次数据请求
onData
()
{
onData
(
id
)
{
let
postData
=
{
categoryId
:
this
.
data
.
lableArray
[
0
].
categoryId
,
page
:
1
,
categoryId
:
this
.
data
.
classifyId
,
page
:
this
.
data
.
page
,
size
:
10
}
method
.
postRequest
(
'/goods/list'
,
postData
,
data
=>
{
let
lists
=
this
.
data
.
page
==
1
?
data
.
data
:
this
.
data
.
list
.
concat
(
data
.
data
)
if
(
data
.
statusCode
==
0
)
{
this
.
setData
({
list
:
data
.
data
list
:
lists
})
}
})
},
//分类数据请求
dataRequest
:
function
(
id
)
{
this
.
setData
({
page
:
1
})
let
postData
=
{
categoryId
:
id
,
page
:
1
,
page
:
this
.
data
.
page
,
size
:
10
}
method
.
postRequest
(
'/goods/list'
,
postData
,
data
=>
{
wx
.
stopPullDownRefresh
()
let
lists
=
this
.
data
.
page
==
1
?
data
.
data
:
this
.
data
.
list
.
concat
(
data
.
data
)
if
(
data
.
statusCode
==
0
)
{
this
.
setData
({
list
:
data
.
data
list
:
lists
})
}
})
...
...
@@ -246,11 +274,24 @@ Page({
*/
onLoad
:
function
(
options
)
{
// this.dataRequest();
this
.
catalog
();
if
(
wx
.
getStorageSync
(
'categoryId'
))
{
let
id
=
wx
.
getStorageSync
(
'categoryId'
)
this
.
setData
({
classifyId
:
id
})
this
.
dataRequest
(
this
.
data
.
classifyId
);
}
else
{
setTimeout
(()
=>
{
this
.
setData
({
classifyId
:
this
.
data
.
lableArray
[
0
].
categoryId
})
},
500
)
this
.
dataRequest
(
this
.
data
.
classifyId
);
}
wx
.
removeStorageSync
(
'categoryId'
)
wx
.
removeStorageSync
(
'index'
)
this
.
catalog
();
},
/**
...
...
@@ -266,11 +307,16 @@ Page({
onShow
:
function
()
{
let
categoryId
=
wx
.
getStorageSync
(
'categoryId'
)
let
index
=
wx
.
getStorageSync
(
'classifyIndex'
)
this
.
setData
({
activeKey
:
index
});
// this.location()
//this.getLocation();
if
(
index
){
this
.
setData
({
activeKey
:
index
});
}
else
{
this
.
setData
({
activeKey
:
0
})
}
wx
.
removeStorageSync
(
"classifyIndex"
)
let
that
=
this
;
wx
.
getLocation
({
type
:
'gcj02'
,
...
...
@@ -306,15 +352,33 @@ Page({
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onRefresh
()
{
this
.
setData
({
page
:
1
,
list
:
[]
})
this
.
dataRequest
(
this
.
data
.
classifyId
);
},
onPullDownRefresh
:
function
()
{
this
.
onRefresh
()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
setData
({
page
:
Number
(
this
.
data
.
page
)
+
1
})
this
.
dataRequest
(
this
.
data
.
classifyId
);
this
.
setData
({
bottomHint
:
true
})
setTimeout
(()
=>
{
this
.
setData
({
bottomHint
:
false
})
},
2000
)
},
/**
...
...
pages/classify/classify.json
查看文件 @
0a3250e
...
...
@@ -4,5 +4,6 @@
"van-sidebar"
:
"@vant/weapp/sidebar/index"
,
"van-sidebar-item"
:
"@vant/weapp/sidebar-item/index"
},
"navigationBarTitleText"
:
"分类"
"navigationBarTitleText"
:
"分类"
,
"enablePullDownRefresh"
:
true
}
\ No newline at end of file
...
...
pages/classify/classify.wxml
查看文件 @
0a3250e
...
...
@@ -4,12 +4,12 @@
<view class="location">
<image src="/images/location.png"></image>
<text>{{location}}</text>
</view>
<view class="searchBox">
<view class="search_center" catchtap="goSearch">
<view class="real_search_center">
<input class="weui-input" auto-focus placeholder="请输入商品名称" bindinput="getKeyWord"
<input class="weui-input" auto-focus
="{{false}}"
placeholder="请输入商品名称" bindinput="getKeyWord"
placeholder-class="placeholder" />
<view class="search_right" catchtap="search">
<image src="/images/01-02/sousuo.png"></image>
...
...
@@ -21,7 +21,7 @@
</view>
<!-- 侧边导航 -->
<view class="navSide">
<van-sidebar active-key="{{ activeKey }}">
<van-sidebar active-key="{{ activeKey }}"
style="background:rgb(247,248,250)"
>
<view wx:for="{{lableArray}}" data-id="{{item.categoryId}}" bindtap="onChange">
<van-sidebar-item title="{{item.categoryName}}" />
</view>
...
...
@@ -53,6 +53,9 @@
</view>
</view>
</scroll-view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
</view>
</view>
<!-- 加入购物车弹框 -->
...
...
@@ -88,4 +91,33 @@
</view>
<view class="confrimBtn" catchtap="confrimCart">确定</view>
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox">
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
<image src="/images/tab/home.png"></image>
</view>
<text bindtap="toHome">首页</text>
</li>
<li>
<view class="tabbarPic">
<image src="/images/tab/classify.png"></image>
</view>
<text class="check">分类</text>
</li>
<li>
<view class="tabbarPic" bindtap="toShopCart">
<image src="/images/tab/cart (2).png"></image>
</view>
<text bindtap="toShopCart">购物车</text>
</li>
<li>
<view class="tabbarPic" bindtap="toUser">
<image src="/images/tab/user.png"></image>
</view>
<text bindtap="toUser">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
...
...
pages/classify/classify.wxss
查看文件 @
0a3250e
...
...
@@ -3,6 +3,10 @@
border-color: var(--sidebar-selected-border-color, #406BFF) !important;
}
page {
background-color: #fff;
}
/* 搜索框 */
/* 搜索框 */
.serachMain {
...
...
@@ -20,7 +24,7 @@
.location image {
width: 16rpx;
height: 2
0
rpx;
height: 2
6
rpx;
position: absolute;
}
...
...
@@ -94,22 +98,17 @@
}
.searchMain {
/* width: 750rpx;
height: 92rpx;
padding: 0 32rpx;
box-sizing: border-box; */
box-sizing: border-box;
background-color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
/* position: fixed;
top: 0;
left: 0;
z-index: 9; */
width: 100%;
}
.location {
width: 142rpx;
height:
6
0rpx;
height:
7
0rpx;
font-size: 24rpx;
color: #323232;
text-indent: 1em;
...
...
@@ -123,30 +122,35 @@
}
.searchBox {
width: 524rpx;
/* width: 524rpx; */
height: 72rpx;
}
/* 侧边导航 */
.navSide {
margin-top: 4rpx;
display: flex;
width: 100%;
background-color: #ffffff;
}
.navContent {
margin-left: 32rpx;
background-color: #fff;
margin-bottom: 100rpx;
}
.scroll-view {
height: calc(100vh - 100rpx);
padding: 16rpx 32rpx 0 0rpx;
/* padding: 16rpx 32rpx 0 0rpx; */
padding-left: 32rpx;
box-sizing: border-box;
}
.navItem {
width:
548rpx
;
width:
100%
;
height: 234rpx;
display: flex;
padding: 24rpx 32rpx 26rpx 0;
box-sizing: border-box;
border-bottom: 2rpx solid #ebedf0;
...
...
@@ -228,18 +232,28 @@
}
.exchange {
height: 38rpx;
font-size: 24rpx;
color: #ffffff;
border-radius: 11rpx;
display: flex;
border-radius: 11rpx;
justify-content: center;
}
.exchange image{
width:40rpx;
height: 38rpx;
font-size: 24rpx;
color: #ffffff;
border-radius: 11rpx;
display: flex;
border-radius: 11rpx;
justify-content: center;
}
.exchange image {
width: 40rpx;
height: 40rpx;
}
.bottomHint {
font-size: 24rpx;
color: gray;
display: flex;
justify-content: center;
background-color: #f1f2f4;
}
/* 购物车弹框 */
.mask {
position: fixed;
...
...
@@ -258,7 +272,7 @@
left: 0;
border-radius: 10rpx 10rpx 0 0;
background: #fff;
padding: 30rpx 32rpx
;
padding: 30rpx 32rpx;
box-sizing: border-box;
max-height: 94%;
overflow-y: auto;
...
...
@@ -448,4 +462,49 @@
justify-content: center;
margin-top: 20rpx;
border-radius: 36rpx;
}
/* tabbar */
.tabbarBox {
width: 100%;
height: 98rpx;
background-color: #fff;
position: fixed;
display: flex;
bottom: 0;
left: 0;
padding-top: 12rpx;
box-sizing: border-box;
}
.tabbarPic {
display: flex;
justify-content: center;
}
.tabbarBox ul {
width: 100%;
display: flex;
}
ul>li {
width: 25%;
}
li text {
display: block;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
}
.check {
color: #355DFF;
}
.tabbarPic image {
width: 48rpx;
height: 48rpx;
}
\ No newline at end of file
...
...
pages/discount-card/discount-card.js
查看文件 @
0a3250e
...
...
@@ -14,7 +14,6 @@ Page({
//获取优惠券
getDiscounCard
()
{
let
that
=
this
;
console
.
log
(
that
.
data
.
pages
,
'pages'
)
let
postData
=
{
page
:
that
.
data
.
pages
,
size
:
10
,
...
...
@@ -92,9 +91,8 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onRefresh
()
{
wx
.
showNavigationBarLoading
();
this
.
setData
({
page
Num
:
1
,
page
s
:
1
,
cardList
:
[]
})
this
.
getDiscounCard
();
...
...
@@ -106,9 +104,6 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
// onReachBottom: function () {
// util.onReachListData(this, this.data.pageNums, this.data.cardList, this.getDiscounCard);
// },
onReachBottom
:
function
()
{
this
.
setData
({
pages
:
Number
(
this
.
data
.
pages
)
+
1
...
...
pages/home/home.js
查看文件 @
0a3250e
...
...
@@ -38,9 +38,24 @@ Page({
categoryId
:
''
,
times
:
''
,
//每日特价倒计时
timeDatas
:
{},
bottomHint
:
false
//上拉触底
bottomHint
:
false
//上拉触底
},
// tabbar
toClassify
(){
wx
.
reLaunch
({
url
:
'/pages/classify/classify'
,
})
},
toShopCart
(){
wx
.
reLaunch
({
url
:
'/pages/shopping-cart/shopping-cart'
,
})
},
toUser
(){
wx
.
reLaunch
({
url
:
'/pages/user/user'
,
})
},
//搜索
goSearch
()
{
wx
.
navigateTo
({
...
...
@@ -85,7 +100,7 @@ Page({
let
index
=
e
.
currentTarget
.
dataset
.
index
wx
.
setStorageSync
(
'categoryId'
,
categoryId
)
wx
.
setStorageSync
(
'classifyIndex'
,
index
)
wx
.
switchTab
({
wx
.
reLaunch
({
url
:
'/pages/classify/classify'
,
})
},
...
...
@@ -114,20 +129,25 @@ Page({
timeData
:
e
.
detail
,
});
},
countDown
()
{
let
startTime
=
null
;
let
endTime
=
null
;
//
let date = null;
let
date
=
null
;
// let nowTimes = this.data.nowTimes
method
.
getRequest
(
'/goods/getActivity'
,
data
=>
{
if
(
data
.
statusCode
==
0
)
{
startTime
=
new
Date
().
getTime
();
endTime
=
Date
.
parse
(
data
.
data
.
endDate
);
// endTime = data.data.endDate;
endTime
=
this
.
initTime
(
data
.
data
.
endDate
).
replace
(
/-/g
,
'/'
)
//标准时间转换为普通日期
endTime
=
Date
.
parse
(
endTime
)
console
.
log
(
endTime
,
'end'
)
this
.
setData
({
endTimess
:
endTime
})
date
=
(
Number
(
endTime
)
-
Number
(
startTime
));
if
(
Number
(
data
.
data
.
endTimes
)
<
Number
(
data
.
data
.
nowTimes
))
{
console
.
log
(
date
,
'666'
)
if
(
date
<=
0
)
{
this
.
setData
({
countDownShow
:
false
})
...
...
@@ -139,7 +159,14 @@ Page({
}
})
},
//限时优惠倒计时
//标准时间转换为普通时间
initTime
(
t
)
{
let
d
=
new
Date
(
t
).
getTime
(
new
Date
(
t
));
let
time
=
new
Date
(
d
+
8
*
3600
*
1000
).
toJSON
().
substr
(
0
,
19
).
replace
(
'T'
,
' '
).
replace
(
/
\.
/g
,
'-'
);
return
time
;
},
demoDown
()
{
this
.
setData
({
timer
:
setInterval
(()
=>
{
...
...
@@ -186,13 +213,13 @@ Page({
}
//精确到分
else
if
(
format
==
2
)
{
time
=
year
+
"
-"
+
month
+
"-
"
+
date
+
" "
+
hour
+
":"
+
minu
+
":"
+
sec
;
time
=
year
+
"
/"
+
month
+
"/
"
+
date
+
" "
+
hour
+
":"
+
minu
+
":"
+
sec
;
}
return
time
;
},
dayCountDown
()
{
var
nowTime
=
this
.
getCurrentDate
(
2
)
var
nowTimes
=
Date
.
parse
(
n
owTime
)
var
nowTimes
=
Date
.
parse
(
n
ew
Date
(
nowTime
)
)
this
.
setData
({
nowTimes
:
nowTimes
})
...
...
@@ -460,9 +487,6 @@ Page({
that
.
countDown
();
that
.
oneDataRequest
();
that
.
discountList
();
// setTimeout(() => {
// that.demoDown();
// }, 300)
},
...
...
@@ -509,14 +533,14 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
this
.
setData
({
bottomHint
:
true
})
setTimeout
(()
=>
{
this
.
setData
({
bottomHint
:
true
})
setTimeout
(()
=>
{
this
.
setData
({
bottomHint
:
false
})
},
2000
)
bottomHint
:
false
})
},
2000
)
},
/**
...
...
pages/home/home.json
查看文件 @
0a3250e
...
...
@@ -6,6 +6,6 @@
"van-popup"
:
"@vant/weapp/popup/index"
,
"van-count-down"
:
"@vant/weapp/count-down/index"
},
"navigationBarTitleText"
:
"首页"
,
"navigationStyle"
:
"custom"
"navigationBarTitleText"
:
"首页"
}
\ No newline at end of file
...
...
pages/home/home.wxml
查看文件 @
0a3250e
...
...
@@ -42,13 +42,6 @@
<view class="textss">{{minute}}</view>
<view class="maohao">:</view>
<view class="textss">{{second}}</view>
<!-- <van-count-down use-slot time="{{ time }}" bind:change="onChange1">
<text class="item">{{ timeData.hours }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeData.minutes }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeData.seconds }}</text>
</van-count-down> -->
</view>
<view class="moreCount" bindtap="moreCount">{{moreCount}}</view>
<view class="arrow" bindtap="moreCount"></view>
...
...
@@ -78,11 +71,11 @@
<view class="dayPriceText">{{dayPrice}}</view>
<view class="dayPriceTime">
<van-count-down use-slot time="{{ times }}" bind:change="onChange2">
<text class="item">{{
timeDatas.hours }}</text>
<text class="item">{{
timeDatas.hours<10?'0'+timeDatas.hours:
timeDatas.hours }}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{ timeDatas.minutes }}</text>
<text class="item">{{ timeDatas.minutes
<10?'0'+timeDatas.minutes:timeDatas.minutes
}}</text>
<text style="color:#FF593C">:</text>
<text class="item">{{
timeDatas.seconds
}}</text>
<text class="item">{{
timeDatas.seconds<10?'0'+timeDatas.seconds:timeDatas.seconds
}}</text>
</van-count-down>
</view>
<view class="morePrice" bindtap="morePrice">{{morePrice}}</view>
...
...
@@ -160,7 +153,37 @@
</view>
</view>
</van-popup>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic">
<image src="/images/tab/home (2).png"></image>
</view>
<text class="check">首页</text>
</li>
<li bindtap="toClassify">
<view class="tabbarPic">
<image src="/images/tab/classify (2).png"></image>
</view>
<text>分类</text>
</li>
<li bindtap="toShopCart">
<view class="tabbarPic">
<image src="/images/tab/cart (2).png"></image>
</view>
<text>购物车</text>
</li>
<li bindtap="toUser">
<view class="tabbarPic">
<image src="/images/tab/user.png"></image>
</view>
<text>我的</text>
</li>
</ul>
</view>
\ No newline at end of file
...
...
pages/home/home.wxss
查看文件 @
0a3250e
/* pages/home/home.wxss */
.contenter {
padding-left: 32rpx;
padding-right: 32rpx;
background-color: #f1f2f4;
padding-top: 24rpx;
margin-bottom: 100rpx;
}
page{
padding: 24rpx 32rpx 0 32rpx;
box-sizing: border-box;
}
/* 搜索框 */
...
...
@@ -75,7 +76,6 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 56rpx;
box-sizing: border-box;
}
...
...
@@ -637,4 +637,43 @@
color: gray;
display: flex;
justify-content: center;
padding: 8rpx;
}
/* tabbar */
.tabbarBox{
width: 100%;
height: 98rpx;
background-color: #fff;
position: fixed;
display: flex;
bottom: 0;
left: 0;
padding-top: 12rpx;
box-sizing: border-box;
}
.tabbarPic{
display: flex;
justify-content: center;
}
.tabbarBox ul{
width: 100%;
display: flex;
}
ul>li{
width: 25%;
}
li text{
display: block;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
}
.check{
color: #355DFF;
}
.tabbarPic image{
width:48rpx;
height: 48rpx;
}
\ No newline at end of file
...
...
pages/my-collect/my-collect.js
查看文件 @
0a3250e
...
...
@@ -3,6 +3,7 @@ let method = require("../../utils/reuqest.js")
Page
({
data
:
{
index
:
''
,
page
:
1
,
list
:
[],
},
//商品详情
...
...
@@ -49,14 +50,15 @@ Page({
//获取收藏商品列表
getCollect
()
{
let
postData
=
{
currPage
:
1
,
currPage
:
this
.
data
.
page
,
pageSize
:
10
,
}
method
.
postRequest
(
"/myUser/myCollection"
,
postData
,
data
=>
{
let
list
=
this
.
data
.
page
==
1
?
data
.
data
:
this
.
data
.
list
.
concat
(
data
.
data
);
wx
.
stopPullDownRefresh
()
if
(
data
.
statusCode
==
0
)
{
this
.
setData
({
list
:
data
.
data
list
:
list
})
}
})
...
...
@@ -99,8 +101,8 @@ Page({
*/
onRefresh
()
{
this
.
setData
({
page
:
1
,
list
:[]
page
:
1
,
list
:
[]
})
this
.
getCollect
();
},
...
...
@@ -113,6 +115,10 @@ Page({
*/
onReachBottom
:
function
()
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
})
this
.
getCollect
()
this
.
setData
({
bottomHint
:
true
})
setTimeout
(()
=>
{
...
...
pages/product-detail/product-detail.js
查看文件 @
0a3250e
...
...
@@ -135,9 +135,12 @@ Page({
},
//查看全部
openAll
()
{
this
.
setData
({
flags
:
!
this
.
data
.
flags
,
flag
:
!
this
.
data
.
flag
// this.setData({
// flags: !this.data.flags,
// flag: !this.data.flag
// })
wx
.
navigateTo
({
url
:
'/pages/all-evaluate/all-evaluate?goodsid='
+
this
.
data
.
goodsId
,
})
},
//进入购物车
...
...
pages/product-detail/product-detail.wxss
查看文件 @
0a3250e
...
...
@@ -226,12 +226,13 @@
}
.noData {
height: 58rpx;
/*
height: 58rpx;
color: #999999;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: center;
justify-content: center; */
display: none;
}
.evaluateContents {
...
...
@@ -251,6 +252,7 @@
display: flex;
justify-content: space-between;
margin: 0 auto;
padding: 30rpx;
}
.evaluateTitle {
...
...
pages/refund-after/refund-after.wxml
查看文件 @
0a3250e
<!--pages/all-order/all-order.wxml-->
<!-- <view class="titleLable">
<van-tabs active="{{active}}" bind:click="onClick">
<van-tab title="全部订单"></van-tab>
<van-tab title="待付款"></van-tab>
<van-tab title="待发货"></van-tab>
<van-tab title="待收货"></van-tab>
<van-tab title="待评价"></van-tab>
</van-tabs>
</view> -->
<!-- 订单 -->
<view class="container">
<view class="orderItem" wx:for="{{tabList}}" catchtap="orderDetail" data-orderid="{{item.orderId}}" wx:if="{{item.status==6}}">
<view class="orderItem" wx:for="{{tabList}}" catchtap="orderDetail" data-orderid="{{item.orderId}}"
wx:if="{{item.status==6}}">
<!-- 订单号 -->
<view class="top">
<view class="orderNumber">订单号:{{item.orderId}}</view>
<view class="status" >退款</view>
<!-- <view class="status" wx:if="{{item.returnVos[0].status==2}}">审核失败</view>
<view class="status" wx:if="{{item.returnVos[0].status==3}}">审核通过</view> -->
<!-- <view class="status" wx:if="{{item.status==1}}">待发货</view> -->
<!-- <view class="status" wx:if="{{item.status==2}}">待收货</view>
<view class="status" wx:if="{{item.status==3}}">已完成</view>
<view class="status" wx:if="{{item.status==4}}">已关闭</view>
<view class="status" wx:if="{{item.status==5}}">待评价</view>
<view class="status" wx:if="{{item.status==5}}">已退款</view> -->
<view class="status">退款</view>
</view>
<!-- 商品详情 -->
<view class="bottom">
...
...
@@ -45,7 +31,7 @@
<view>(含运费¥{{item.freightAmount}})</view>
</view>
<view class="btnBox">
<view class="third btnPublic"
>查看详情</view>
<view class="third btnPublic">查看详情</view>
</view>
<!-- 按钮 -->
<!-- <view class="btnBox" wx:if="{{item.status==0}}">
...
...
@@ -70,6 +56,12 @@
</view> -->
</view>
</view>
<view class="noData" wx:if="{{tabList.length==0}}">
<view class="noDataPic">
<image src="/images/message@2x.png"></image>
</view>
<view class="noDataBottom">还没有退款的商品~</view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
我是有底线的~
</view>
\ No newline at end of file
...
...
pages/refund-after/refund-after.wxss
查看文件 @
0a3250e
...
...
@@ -172,4 +172,34 @@ page{
justify-content: center;
padding-bottom: 10rpx;
}
.noData{
width: 100%;
height: 100%;
margin-top: 300rpx;
}
.noDataPic{
width: 200rpx;
height: 200rpx;
margin: 0 auto;
}
.noDataPic image{
width: 200rpx;
height: 200rpx;
}
.noDataTop{
width: 100%;
font-size: 30rpx;
display: flex;
/* align-items: center; */
color: #323233;
justify-content: center;
font-weight: 500;
}
.noDataBottom{
width: 100%;
font-size: 24rpx;
color: #7d7e80;
display: flex;
justify-content: center;
margin-top: 10rpx;
}
...
...
pages/select-address/select-address.wxml
查看文件 @
0a3250e
...
...
@@ -6,12 +6,13 @@
<view class="userInfo">
<view class="name">{{item.name}}</view>
<view class="tell">{{item.phone}}</view>
<view class="lable" wx:if="{{item.delFlag==1}}"
>默认</view>
<view class="lable" wx:if="{{item.delFlag==1}}">默认</view>
</view>
<view class="address">{{item.area}}{{item.address}}</view>
<!-- 默认状态 -->
<view data-select="{{defaultType}}" >
<view class="selectDefault" bindtap="defaultEvent" data-delFlag="{{item.delFlag}}" data-id="{{item.id}}" data-index="{{index}}">
<view data-select="{{defaultType}}">
<view class="selectDefault" bindtap="defaultEvent" data-delFlag="{{item.delFlag}}" data-id="{{item.id}}"
data-index="{{index}}">
<view class="defaultPic">
<image src='{{item.delFlag=="1"?"/images/04-05/default.png":"/images/04-05/undefault.png"}}'></image>
</view>
...
...
@@ -40,6 +41,13 @@
</view>
</view>
</view>
<view class="noData" wx:if="{{list.length==0}}">
<view class="noDataPic">
<image src="/images/message@2x.png"></image>
</view>
<view class="noDataTop">一个地址都没有</view>
<view class="noDataBottom">快去添加收货地址,买买买吧~</view>
</view>
<!-- 超出配送范围 -->
<!-- <view class="exceedRange" wx:if="{{exceedRange}}">
<view class="exceedText">以下超出配送范围</view>
...
...
pages/select-address/select-address.wxss
查看文件 @
0a3250e
...
...
@@ -176,7 +176,6 @@ page{
.bottom {
width: 750rpx;
height: 119rpx;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0
...
...
@@ -195,4 +194,35 @@ page{
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
}
.noData{
width: 100%;
height: 100%;
margin-top: 300rpx;
}
.noDataPic{
width: 200rpx;
height: 200rpx;
margin: 0 auto;
}
.noDataPic image{
width: 200rpx;
height: 200rpx;
}
.noDataTop{
width: 100%;
font-size: 30rpx;
display: flex;
/* align-items: center; */
color: #323233;
justify-content: center;
font-weight: 500;
}
.noDataBottom{
width: 100%;
font-size: 24rpx;
color: #7d7e80;
display: flex;
justify-content: center;
margin-top: 10rpx;
}
\ No newline at end of file
...
...
pages/shopping-cart/shopping-cart.js
查看文件 @
0a3250e
...
...
@@ -28,6 +28,22 @@ Page({
},
bottomHint
:
false
,
//上拉提示
},
// tabbar
toClassify
()
{
wx
.
reLaunch
({
url
:
'/pages/classify/classify'
,
})
},
toHome
()
{
wx
.
reLaunch
({
url
:
'/pages/home/home'
,
})
},
toUser
()
{
wx
.
reLaunch
({
url
:
'/pages/user/user'
,
})
},
//购物车列表
getList
()
{
method
.
getRequest
(
'/cart'
,
data
=>
{
...
...
@@ -366,7 +382,6 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onRefresh
()
{
wx
.
showNavigationBarLoading
();
this
.
getList
();
},
onPullDownRefresh
:
function
()
{
...
...
pages/shopping-cart/shopping-cart.wxml
查看文件 @
0a3250e
...
...
@@ -57,8 +57,11 @@
<text class="cart-count-add" catchtap="addCount" data-index="{{index}}"
data-goodSkuId="{{item.goodsSkuId}}">+</text>
</view>
</view>
</view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
</view>
<!-- <view wx:if="{{carts.length==0}}"> -->
<view wx:if="{{cartnoData}}">
...
...
@@ -66,9 +69,7 @@
<view class="cart-no-data-btn" bindtap="goHome">去逛逛</view>
</view>
</view>
<view class="bottomHint" wx:if="{{bottomHint}}">
我是有底线的~
</view>
<!-- 立即购买 -->
<view class="bottom">
<!-- <view class="checkPic">
...
...
@@ -86,4 +87,33 @@
立即购买
</view>
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
<image src="/images/tab/home.png"></image>
</view>
<text bindtap="toHome">首页</text>
</li>
<li>
<view class="tabbarPic" bindtap="toClassify">
<image src="/images/tab/classify (2).png"></image>
</view>
<text bindtap="toClassify">分类</text>
</li>
<li>
<view class="tabbarPic">
<image src="/images/tab/cart.png"></image>
</view>
<text class="check">购物车</text>
</li>
<li>
<view class="tabbarPic" bindtap="toUser">
<image src="/images/tab/user.png"></image>
</view>
<text bindtap="toUser">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
...
...
pages/shopping-cart/shopping-cart.wxss
查看文件 @
0a3250e
...
...
@@ -274,7 +274,9 @@ page {
border-radius: 16rpx;
/* padding-bottom: 120rpx; */
}
.main{
margin-bottom: 120rpx;
}
.cart-list {
position: relative;
padding: 20rpx 20rpx 20rpx 285rpx;
...
...
@@ -339,6 +341,8 @@ page {
bottom: 20rpx;
width: 194rpx;
height: 44rpx;
display: flex;
align-items:center;
}
.cart-list .cart-count-box text {
...
...
@@ -442,10 +446,11 @@ page {
display: flex;
align-items: center;
position: fixed;
bottom:
0
;
bottom:
98rpx
;
left: 0;
background-color: #ffffff;
padding-left: 28rpx;
border-bottom: 2rpx solid #f1f2f4
}
.bottom .checkPic {
...
...
@@ -515,5 +520,43 @@ page {
color: gray;
display: flex;
justify-content: center;
padding-bottom: 10rpx;
background-color: #f1f2f4;
}
/* tabbar */
.tabbarBox{
width: 100%;
height: 98rpx;
background-color: #fff;
position: fixed;
display: flex;
bottom: 0;
left: 0;
padding-top: 12rpx;
box-sizing: border-box;
}
.tabbarPic{
display: flex;
justify-content: center;
}
.tabbarBox ul{
width: 100%;
display: flex;
}
ul>li{
width: 25%;
}
li text{
display: block;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
}
.check{
color: #355DFF;
}
.tabbarPic image{
width:48rpx;
height: 48rpx;
}
\ No newline at end of file
...
...
pages/user/user.js
查看文件 @
0a3250e
...
...
@@ -2,6 +2,7 @@
let
method
=
require
(
"../../utils/reuqest.js"
)
Page
({
data
:
{
phoneNumber
:
''
,
userData
:
''
,
vip
:
''
,
orderList
:
[{
...
...
@@ -40,6 +41,22 @@ Page({
text
:
'关于我们'
}]
},
// tabbar
toHome
()
{
wx
.
reLaunch
({
url
:
'/pages/home/home'
,
})
},
toShopCart
()
{
wx
.
reLaunch
({
url
:
'/pages/shopping-cart/shopping-cart'
,
})
},
toClassify
()
{
wx
.
reLaunch
({
url
:
'/pages/classify/classify'
,
})
},
//用户信息
getUserInfo
()
{
method
.
getRequest
(
"/myUser/queryUserInfo"
,
data
=>
{
...
...
@@ -124,13 +141,23 @@ Page({
},
//在线客服
myKefu
()
{
method
.
getRequest
(
"/information/queryCustomerPhone"
,
data
=>
{
if
(
data
.
statusCode
==
0
){
this
.
setData
({
phoneNumber
:
data
.
data
})
}
})
wx
.
makePhoneCall
({
phoneNumber
:
'111111111000'
,
phoneNumber
:
this
.
data
.
phoneNumber
,
success
()
{
console
.
log
(
'拨打电话成功'
)
},
fail
()
{
console
.
log
(
'拨打电话失败'
)
wx
.
showToast
({
title
:
this
.
data
.
msg
,
icon
:
'none'
})
}
})
},
...
...
pages/user/user.wxml
查看文件 @
0a3250e
...
...
@@ -56,4 +56,33 @@
</view>
</view>
</view>
</view>
<!-- tabbar -->
<view class="tabbarBox" >
<ul>
<li>
<view class="tabbarPic" bindtap="toHome">
<image src="/images/tab/home.png"></image>
</view>
<text bindtap="toHome">首页</text>
</li>
<li>
<view class="tabbarPic" bindtap="toClassify">
<image src="/images/tab/classify (2).png"></image>
</view>
<text bindtap="toClassify">分类</text>
</li>
<li>
<view class="tabbarPic" bindtap="toShopCart">
<image src="/images/tab/cart (2).png"></image>
</view>
<text bindtap="toShopCart">购物车</text>
</li>
<li>
<view class="tabbarPic">
<image src="/images/tab/user (2).png"></image>
</view>
<text class="check">我的</text>
</li>
</ul>
</view>
\ No newline at end of file
...
...
pages/user/user.wxss
查看文件 @
0a3250e
...
...
@@ -203,4 +203,42 @@
font-weight: 400;
text-align: center;
color: #7d7e80;
}
/* tabbar */
.tabbarBox{
width: 100%;
height: 98rpx;
background-color: #fff;
position: fixed;
display: flex;
bottom: 0;
left: 0;
padding-top: 12rpx;
box-sizing: border-box;
}
.tabbarPic{
display: flex;
justify-content: center;
}
.tabbarBox ul{
width: 100%;
display: flex;
}
ul>li{
width: 25%;
}
li text{
display: block;
display: flex;
justify-content: center;
font-size: 18rpx;
font-weight: 400;
color: #bdc4ce;
}
.check{
color: #355DFF;
}
.tabbarPic image{
width:48rpx;
height: 48rpx;
}
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论