切换导航条
此项目
正在载入...
登录
miniprogram
/
binhaineigouopen
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
lihongjuan
5 years ago
提交
9cba46201bf4a498999614a3e5317d0a0ed735e0
1 个父辈
41d31d84
代提交
隐藏空白字符变更
内嵌
并排对比
正在显示
24 个修改的文件
包含
674 行增加
和
338 行删除
Components/Model_item/Model_item.js
app.js
app.json
pages/address/address.js
pages/classify/classify.json
pages/classify/classify.wxml
pages/classify/classify.wxss
pages/index/index.js
pages/index/index.wxml
pages/index/index.wxss
pages/message/message.js
pages/message/message.wxml
pages/message/message.wxss
pages/my/my.js
pages/my/my.wxml
pages/my/my_integral/my_integral.js
pages/my/my_integral/my_integral.wxml
pages/order/order.js
pages/search/search.js
pages/shop_cart/shop_cart.js
pages/shop_cart/shop_cart.wxml
pages/shop_detail/shop_detail.wxml
pages/startindex/startindex.js
project.config.json
Components/Model_item/Model_item.js
查看文件 @
9cba462
const
app
=
getApp
()
Component
({
/**
* 组件的属性列表
...
...
@@ -19,6 +19,19 @@ Component({
*/
methods
:
{
look_more
(
e
)
{
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showToast
({
title
:
'您还不是会员'
,
icon
:
"none"
})
setTimeout
(
function
(){
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
},
1500
)
return
false
}
let
id
=
e
.
currentTarget
.
dataset
.
id
wx
.
navigateTo
({
url
:
'/pages/shop_detail/shop_detail?id='
+
id
...
...
app.js
查看文件 @
9cba462
App
({
onLaunch
:
function
()
{
this
.
getmessagelist
()
let
token
=
wx
.
getStorageSync
(
'token'
);
console
.
log
(
'woshitoe'
,
token
)
if
(
token
!=
""
){
this
.
getInfoFun
()
}
//自动更新版本
const
updateManager
=
wx
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
...
...
@@ -78,6 +84,24 @@ App({
return
promise
;
},
// 获取个人信息
getInfoFun
()
{
let
that
=
this
;
let
u
=
that
.
interface
.
readteacher
;
that
.
post
(
u
,
{}).
then
((
r
)
=>
{
console
.
log
(
'3489523498'
,
r
)
if
(
r
.
code
==
200
)
{
that
.
globalData
.
login_new
=
r
.
msg
.
login_new
;
console
.
log
(
that
.
globalData
.
login_new
)
// t.setData({
// obj: r.msg
// })
}
})
},
getmessagelist
()
{
let
that
=
this
let
url
=
'/information/get_all'
;
...
...
@@ -118,11 +142,13 @@ App({
}).
catch
((
err
)
=>
{
})
},
onShow
:
function
()
{
console
.
log
(
'hahahahhahahahhhahh'
)
},
//接口管理
interface
:
{
openid
:
'/getopenid/get'
,
// 获取openid
getcode
:
'/getopenid/getcode'
,
// 获取验证码
readteacher
:
'/getopenid/readteacher'
,
// 获取个人信息
...
...
@@ -177,6 +203,6 @@ App({
order_read
:
'/shop/read'
,
// 订单数
},
globalData
:
{
login_new
:
""
}
})
\ No newline at end of file
...
...
app.json
查看文件 @
9cba462
{
"pages"
:
[
"pages/startindex/startindex"
,
"pages/index/index"
,
"pages/startindex/startindex"
,
"pages/register/register"
,
"pages/login/login"
,
"pages/zuji/zuji"
,
...
...
pages/address/address.js
查看文件 @
9cba462
...
...
@@ -7,14 +7,12 @@ Page({
data
:
{
list
:
[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
// 获取地址列表
getListFun
()
{
let
t
=
this
;
...
...
@@ -35,6 +33,7 @@ Page({
//选择地址返回确认订单页面
selectAdddressFun
(
e
)
{
console
.
log
(
e
)
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
//直接调用上一个页面的setData()方法,把数据存到上一个页面中去
...
...
@@ -86,11 +85,11 @@ Page({
// 删除地址
delAddressFun
(
e
)
{
let
t
=
this
;
let
u
=
a
.
interface
.
deladdress
;
let
d
=
{
id
:
e
.
currentTarget
.
dataset
.
id
}
let
t
=
this
;
let
u
=
a
.
interface
.
deladdress
;
let
d
=
{
id
:
e
.
currentTarget
.
dataset
.
id
}
a
.
post
(
u
,
d
).
then
((
r
)
=>
{
if
(
r
.
code
==
200
)
{
wx
.
showToast
({
...
...
pages/classify/classify.json
查看文件 @
9cba462
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"disableScroll"
:
true
}
\ No newline at end of file
...
...
pages/classify/classify.wxml
查看文件 @
9cba462
...
...
@@ -8,14 +8,16 @@
</navigator>
</view>
<view class='center'>
<scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}">
<view class='center_child'>
<!-- <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> -->
<view class='center_child flexone'>
<view class='left'>
<view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
<view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view>
</view>
<
view class='fake_left'></view
>
<
!-- <view class='fake_left'></view> --
>
<view class='right' wx:if="{{remain}}">
<view class='right_item' id='NAV{{index}}' wx:for='{{good_arr}}' wx:key='index' wx:if="{{good_arr[index].products.length>0}}">
<view class='right_item_top'>
...
...
@@ -35,7 +37,7 @@
<view class="right" wx:else>
<view class="right_item">
<view class='right_goods'>
<view class='right_goods'>
<view class='goods' wx:for="{{taocanlist}}" wx:key="zindex" data-id="{{item.id}}" catchtap="look_detailk">
<view class='goods_img'>
<image src='{{item.image}}'></image>
...
...
@@ -50,6 +52,6 @@
</view>
<
/scroll-view
>
<
!-- </scroll-view> --
>
</view>
</view>
\ No newline at end of file
...
...
pages/classify/classify.wxss
查看文件 @
9cba462
...
...
@@ -89,9 +89,10 @@ page {
width: 21.4%;
height: 100%;
background: #fff;
position: fixed;
top: 114rpx;
/* position: fixed;
top: 114rpx; */
overflow-y: scroll;
z-index:9999
}
...
...
@@ -143,6 +144,8 @@ page {
.right {
width: 76.3%;
height: 100%;
overflow-y: scroll;
}
.right_item {
...
...
pages/index/index.js
查看文件 @
9cba462
...
...
@@ -49,6 +49,23 @@ Page({
// console.log(this.data.stick)
},
// 获取个人信息
getInfoFun
()
{
let
that
=
this
;
let
u
=
app
.
interface
.
readteacher
;
app
.
post
(
u
,
{}).
then
((
r
)
=>
{
console
.
log
(
'3489523498'
,
r
)
if
(
r
.
code
==
200
)
{
app
.
globalData
.
login_new
=
r
.
msg
.
login_new
;
console
.
log
(
app
.
globalData
.
login_new
)
// t.setData({
// obj: r.msg
// })
}
})
},
moremiao
()
{
let
token
=
wx
.
getStorageSync
(
"token"
)
if
(
token
==
''
)
{
...
...
@@ -64,8 +81,37 @@ Page({
}
}
})
}
else
{
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
// wx.showToast({
// title: '您还不是会员',
// icon:"none"
// })
// setTimeout(function(){
// wx.navigateTo({
// url: '/pages/login/login',
// })
// },1500)
// return false
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
wx
.
navigateTo
({
url
:
'/pages/xianshi/xianshi?title2='
+
this
.
data
.
title2
,
})
...
...
@@ -79,7 +125,6 @@ Page({
let
url
=
'//wb/wb'
;
let
data
=
{
}
app
.
post
(
url
,
data
,
"POST"
).
then
((
r
)
=>
{
console
.
log
(
'4456789'
,
r
)
...
...
@@ -214,6 +259,25 @@ Page({
}
})
}
else
{
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
wx
.
navigateTo
({
url
:
'/pages/zhuanqu/zhuanqu?id='
+
id
,
})
...
...
@@ -222,6 +286,42 @@ Page({
},
more
()
{
let
token
=
wx
.
getStorageSync
(
"token"
)
if
(
token
==
''
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请先登录'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/register/register'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
wx
.
navigateTo
({
url
:
'/pages/classify/classify'
,
})
...
...
@@ -234,12 +334,48 @@ Page({
},
// 查看小分类
look_item
(
e
)
{
let
title
=
this
.
data
.
nav_arr
[
this
.
data
.
nav_index
].
name
let
index
=
e
.
currentTarget
.
dataset
.
index
?
e
.
currentTarget
.
dataset
.
index
:
0
let
pid
=
this
.
data
.
nav_arr
[
this
.
data
.
nav_index
].
id
wx
.
navigateTo
({
url
:
'/pages/search/search_result/search_result?title='
+
title
+
"&index="
+
index
+
'&pid='
+
pid
})
let
token
=
wx
.
getStorageSync
(
"token"
)
if
(
token
==
''
)
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请先登录'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/register/register'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
}
else
{
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
let
title
=
this
.
data
.
nav_arr
[
this
.
data
.
nav_index
].
name
let
index
=
e
.
currentTarget
.
dataset
.
index
?
e
.
currentTarget
.
dataset
.
index
:
0
let
pid
=
this
.
data
.
nav_arr
[
this
.
data
.
nav_index
].
id
wx
.
navigateTo
({
url
:
'/pages/search/search_result/search_result?title='
+
title
+
"&index="
+
index
+
'&pid='
+
pid
})
}
},
//监测轮播图变化
swiperChange
(
e
)
{
...
...
@@ -266,6 +402,25 @@ Page({
}
})
}
else
{
let
login_new
=
app
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
})
return
false
}
if
(
style
==
2
)
{
wx
.
navigateTo
({
url
:
'/pages/outerChain/outerChain?src='
+
e
.
currentTarget
.
dataset
.
src
...
...
@@ -313,7 +468,7 @@ Page({
page_type
:
false
})
//调用排序接口
this
.
good_list
(
this
.
data
.
c
id
,
e
.
currentTarget
.
dataset
.
index
)
this
.
good_list
(
this
.
data
.
p
id
,
e
.
currentTarget
.
dataset
.
index
)
},
select_nav
(
e
)
{
...
...
@@ -441,13 +596,20 @@ Page({
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
that
=
this
let
that
=
this
;
let
token
=
wx
.
getStorageSync
(
'token'
);
console
.
log
(
'woshitoe'
,
token
)
if
(
token
!=
""
){
this
.
getInfoFun
()
}
this
.
get_banner
()
this
.
get_info
(
0
,
1
);
// 获取活动专区
this
.
getzhuanqulist
();
this
.
getxianshi
();
...
...
@@ -523,6 +685,22 @@ Page({
}).
catch
((
err
)
=>
{})
},
// 获取个人信息
getInfoFun
()
{
let
that
=
this
;
let
u
=
app
.
interface
.
readteacher
;
app
.
post
(
u
,
{}).
then
((
r
)
=>
{
console
.
log
(
'3489523498'
,
r
)
if
(
r
.
code
==
200
)
{
app
.
globalData
.
login_new
=
r
.
msg
.
login_new
;
console
.
log
(
app
.
globalData
.
login_new
)
// t.setData({
// obj: r.msg
// })
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
@@ -534,9 +712,25 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
setData
({
shop_arr
:[],
page
:
1
})
let
token
=
wx
.
getStorageSync
(
'token'
);
console
.
log
(
'woshitoe'
,
token
)
if
(
token
!=
""
){
this
.
getInfoFun
()
}
this
.
get_notice
()
this
.
get_shopnum
()
this
.
getmessagelist
()
this
.
getmessagelist
();
console
.
log
(
'998867'
,
this
.
data
.
pid
)
if
(
this
.
data
.
pid
){
this
.
get_info
(
this
.
data
.
pid
,
2
);
}
else
{
this
.
get_info
(
0
,
1
);
}
//控制显示隐藏
this
.
ishow
()
},
...
...
@@ -594,7 +788,7 @@ Page({
that
.
setData
({
page
:
that
.
data
.
page
+
1
})
that
.
good_list
(
that
.
data
.
c
id
,
that
.
data
.
c_index
)
that
.
good_list
(
that
.
data
.
p
id
,
that
.
data
.
c_index
)
},
/**
...
...
pages/index/index.wxml
查看文件 @
9cba462
<scroll-view scroll-y="true" style="height:100%" bindscroll="scroll" scroll-top="{{scrollTop}}" bindscrolltolower="loadMore">
<view class='page'>
<view class='top'>
<navigator class='search_box' url="/pages/search/search">
<image src='/images/search.png' class='search_icon'></image>
<input class='real_search' placeholder='搜索您想要的商品'></input>
</navigator>
</view>
<view class='list' wx:if="{{nav_index!=0}}">
<view class='list_item' wx:if="{{index < length_num}}" wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item">
<view class='item'>
<view class='item_img'>
<image src='{{item.image}}' mode='aspectFill' />
</view>
<view class='item_font'>{{item.name}}</view>
</view>
</view>
<view class='list_item' data-type="1" catchtap="show_all" wx:if="{{class_arr.length>9}}">
<view class='item'>
<view class='item_img'>
<image src='/images/all.png' />
</view>
<view class='item_font'>{{length_num == 9?'查看全部':'收起'}}</view>
</view>
</view>
</view>
<!-- 轮播图 -->
<view class="lunbo_box {{nav_index==0?'boxactive':''}}" wx:else>
<swiper interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'>
<swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index">
<image src='{{item.image}}' mode="aspectFill" data-id="{{item.thing_id}}" data-style="{{item.style}}" data-src="{{item.thing_id}}" catchtap="{{item.thing_id == 0?'':'look_more'}}" />
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{imgurl}}" wx:key="index">
<view class="dot {{zcurrent == index ? 'active':''}}"></view>
</block>
</view>
</view>
<!-- 劳保 -->
<!-- <view class="fenlei">
<view class='page'>
<view class='top'>
<navigator class='search_box' url="/pages/search/search">
<image src='/images/search.png' class='search_icon'></image>
<input class='real_search' placeholder='搜索您想要的商品'></input>
</navigator>
</view>
<view class='list' wx:if="{{nav_index!=0}}">
<view class='list_item' wx:if="{{index < length_num}}" wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item">
<view class='item'>
<view class='item_img'>
<image src='{{item.image}}' mode='aspectFill' />
</view>
<view class='item_font'>{{item.name}}</view>
</view>
</view>
<view class='list_item' data-type="1" catchtap="show_all" wx:if="{{class_arr.length>9}}">
<view class='item'>
<view class='item_img'>
<image src='/images/all.png' />
</view>
<view class='item_font'>{{length_num == 9?'查看全部':'收起'}}</view>
</view>
</view>
</view>
<!-- 轮播图 -->
<view class="lunbo_box {{nav_index==0?'boxactive':''}}" wx:else>
<swiper interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" current='{{current}}' bindchange='swiperChange' autoplay="{{autoplay}}" class='swiper_box'>
<swiper-item class='swiper-item' wx:for="{{imgurl}}" wx:key="index">
<image src='{{item.image}}' mode="aspectFill" data-id="{{item.thing_id}}" data-style="{{item.style}}" data-src="{{item.thing_id}}" catchtap="{{item.thing_id == 0?'':'look_more'}}" />
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{imgurl}}" wx:key="index">
<view class="dot {{zcurrent == index ? 'active':''}}"></view>
</block>
</view>
</view>
<!-- 劳保 -->
<!-- <view class="fenlei">
<view class="fenleiitem">
劳保商城
</view>
...
...
@@ -48,96 +48,95 @@
差旅
</view>
</view> -->
<!-- 活动区域 -->
<view wx:if="{{nav_index==0}}">
<view class="actity" wx:if="{{status1==1}}">
<!-- <view class="miaoshaoname">活动专区</view> -->
<view class="active flexone">
<view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">
<view class="activeitem">
<image src="{{item.image}}"></image>
</view>
<view class="activename">{{item.name}}</view>
<!-- 活动区域 -->
<view wx:if="{{nav_index==0}}">
<view class="actity" wx:if="{{status1==1}}">
<!-- <view class="miaoshaoname">活动专区</view> -->
<view class="active flexone">
<view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">
<view class="activeitem">
<image src="{{item.image}}"></image>
</view>
<view class="activename">{{item.name}}</view>
</view>
</view>
</view>
<!-- 秒杀商城 -->
<!-- <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">
<view class="miaoshatop flextwo">
<view class="miaoshatopleft flexone">
<view class="miaoshaoname">{{title2}}</view>
<view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view>
</view>
<view class="miaosharight" bindtap="moremiao">
查看更多>
</view>
</view>
<view class="miaoshalist">
<view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">
<view class="goodimg">
<image src="{{item.images[0]}}"></image>
</view>
<view class="price">¥{{item.price2!=null?item.price2:item.price}}</view>
</view>
</view>
</view> -->
<view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao">
<view class="neigouimg">
<image src="/images/neigouk.png" ></image>
</view>
</view>
</view>
<!-- 秒杀商城 -->
<view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">
<view class="miaoshatop flextwo">
<view class="miaoshatopleft flexone">
<view class="miaoshaoname">{{title2}}</view>
<!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> -->
</view>
<view class="miaosharight" bindtap="moremiao">
查看更多>
</view>
</view>
<view class="miaoshalist">
<view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">
<view class="goodimg">
<image src="{{item.images[0]}}"></image>
</view>
<view class="price">¥{{item.price2!=null?item.price2:item.price}}</view>
</view>
</view>
</view>
</view>
<!-- 公告栏 -->
<navigator class="notice" url="../notice/notice">
<image src="/images/notice.png" class="notice_tips" />
<view class="notice_word">
<view class="notice_item" wx:for="{{notice}}" wx:key="index" wx:if="{{index<2}}">
<view class="dian" />
<view class="word">{{item.desc}}</view>
<view class="time">{{item.createtime}}</view>
</view>
</view>
</navigator>
<!-- 大分类 -->
<!-- {{stick==1?'navactive':''}} -->
<view class="navactive">
<view class="horizontal_nav ">
<view class="nav_item {{nav_index == index?'active':''}}" wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
</view>
<view class="morebox" bindtap="more">
<view class="moreimg">
<image src="/images/more.png"></image>
</view>
</view>
<!-- 小分类 -->
</view>
<view class='select_box'>
<view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view>
<view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格
<view class='select_img'>
<image src="{{c_index == 1?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
<view class='select_item {{c_index == 2?"active":""}}' data-index="2" bindtap='reorder'>销量
<view class='select_img'>
<image src="{{c_index == 2?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
</view>
<view class='real_goods'>
<Model_item list="{{shop_arr}}" />
</view>
<concat/>
</view>
</view>
<!-- 公告栏 -->
<navigator class="notice" url="../notice/notice">
<image src="/images/notice.png" class="notice_tips" />
<view class="notice_word">
<view class="notice_item" wx:for="{{notice}}" wx:key="index" wx:if="{{index<2}}">
<view class="dian" />
<view class="word">{{item.desc}}</view>
<view class="time">{{item.createtime}}</view>
</view>
</view>
</navigator>
<!-- 大分类 -->
<!-- {{stick==1?'navactive':''}} -->
<view class="navactive">
<view class="horizontal_nav ">
<view class="nav_item {{nav_index == index?'active':''}}" wx:for="{{nav_arr}}" wx:key="index" bindtap="select_nav" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
</view>
<view class="morebox" bindtap="more">
<view class="moreimg">
<image src="/images/more.png"></image>
</view>
</view>
<!-- 小分类 -->
</view>
<view class='select_box'>
<view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view>
<view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格
<view class='select_img'>
<image src="{{c_index == 1?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
<view class='select_item {{c_index == 2?"active":""}}' data-index="2" bindtap='reorder'>销量
<view class='select_img'>
<image src="{{c_index == 2?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
</view>
<view class='real_goods'>
<Model_item list="{{shop_arr}}" />
</view>
<concat />
</view>
</scroll-view>
\ No newline at end of file
...
...
pages/index/index.wxss
查看文件 @
9cba462
...
...
@@ -514,7 +514,7 @@ image {
.xianshi {
width: 750rpx;
padding: 8rpx 30rpx;
/* padding: 8rpx 30rpx; */
box-sizing: border-box;
background: #fff;
border-bottom:16rpx solid #f5f5f5;
...
...
@@ -525,3 +525,10 @@ image {
top: 0;
left: 0;
}
.neigouimg{
width:750rpx;
height:254rpx;
font-size: 0;
display:flex;
justify-content: center;
}
...
...
pages/message/message.js
查看文件 @
9cba462
...
...
@@ -7,7 +7,9 @@ Page({
*/
data
:
{
page
:
1
,
messagelist
:
[]
messagelist
:
[],
token
:
''
,
login_new
:
''
},
/**
...
...
@@ -88,6 +90,11 @@ Page({
*/
onShow
:
function
()
{
this
.
setData
({
token
:
wx
.
getStorageSync
(
'token'
),
login_new
:
app
.
globalData
.
login_new
})
this
.
setData
({
messagelist
:
[],
page
:
1
})
...
...
pages/message/message.wxml
查看文件 @
9cba462
<block wx:if="{{token==''}}">
<navigator class="no_login" catchtap="go_login" url="/pages/register/register" hover-class="none">请先登录</navigator>
</block>
<view class="empty" wx:if="{{messagelist.length==0}}">暂无更多数据</view>
<block wx:elif="{{login_new==''}}">
<navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定会员</navigator>
</block>
<block wx:else>
<view class="empty" wx:if="{{messagelist.length==0}}">暂无更多数据</view>
<view class="messagelist" wx:else>
<view class='mssageitem' wx:for="{{messagelist}}" wx:key="" bindtap="ordertail" data-id="{{item.id}}">
...
...
@@ -11,3 +19,5 @@
</view>
</view>
</block>
...
...
pages/message/message.wxss
查看文件 @
9cba462
...
...
@@ -48,3 +48,11 @@ page {
.messagename {
margin-top: 10rpx;
}
.no_login{
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 400;
color: #ccc;
margin-top: 200rpx;
text-align: center;
}
\ No newline at end of file
...
...
pages/my/my.js
查看文件 @
9cba462
const
a
=
getApp
()
Page
({
/**
* 页面的初始数据
*/
...
...
@@ -11,8 +10,8 @@ Page({
indicatorDots
:
false
,
vertical
:
false
,
autoplay
:
true
,
interval
:
2000
,
duration
:
500
,
interval
:
3000
,
duration
:
1500
,
kuaidi
:
''
},
...
...
@@ -39,12 +38,7 @@ Page({
that
.
data
.
kuaidi
.
forEach
(
function
(
value
,
index
,
array
){
console
.
log
(
value
.
kuaidi
[
0
].
kuaidi
.
Traces
)
})
console
.
log
(
that
.
data
.
kuaidi
)
}).
catch
((
err
)
=>
{
})
},
...
...
@@ -87,6 +81,7 @@ Page({
let
type
=
e
.
currentTarget
.
dataset
.
i
;
let
index
=
e
.
currentTarget
.
dataset
.
t
;
if
(
wx
.
getStorageSync
(
"token"
)
&&
wx
.
getStorageSync
(
"login"
)
==
1
&&
index
!=
5
)
{
if
(
index
==
1
)
{
// 跳转订单列表
wx
.
navigateTo
({
...
...
@@ -119,18 +114,39 @@ Page({
url
:
'/pages/my/about_us/about_us'
,
})
}
else
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'请先登录'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/register/register'
,
})
}
else
if
(
res
.
cancel
)
{
let
token
=
wx
.
getStorageSync
(
'token'
);
if
(
token
==
''
){
wx
.
showToast
({
title
:
'请先登录'
,
icon
:
"none"
})
setTimeout
(
function
(){
wx
.
navigateTo
({
url
:
'/pages/register/register'
,
})
},
1500
)
return
false
}
let
login_new
=
a
.
globalData
.
login_new
;
if
(
login_new
==
0
){
wx
.
showModal
({
title
:
'提示'
,
content
:
'您还不是会员'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/login/login'
,
})
}
else
if
(
res
.
cancel
)
{
}
}
}
})
})
return
false
}
}
},
//获取购物车数量
...
...
@@ -218,6 +234,8 @@ Page({
*/
onShow
:
function
()
{
let
t
=
this
t
.
getInfoFun
()
t
.
getnewwuliu
()
t
.
get_shopnum
()
t
.
get_order
()
...
...
pages/my/my.wxml
查看文件 @
9cba462
<block>
<view class="header" bindtap="toLoginFun">
<image class="avator" src="{{obj.image || '/images/icon_59.png'}}"></image>
<!-- 未登录 -->
<view class="right" wx:if="{{no_login}}">
<view class="tips_word">您好,请登录</view>
</view>
<!-- 登录 -->
<view class="right" wx:else>
<view class="name_box">
<view class="name">{{obj.user_name}}
<view class="id">ID {{obj.id_card}}</view>
</view>
<view class="header" bindtap="toLoginFun">
<image class="avator" src="{{obj.image || '/images/icon_59.png'}}"></image>
<!-- 未登录 -->
<view class="right" wx:if="{{no_login}}">
<view class="tips_word">点击登录</view>
</view>
<!-- 登录 -->
<view class="right" wx:else>
<view class="name_box">
<view class="name">{{obj.user_name}}
<view class="id">ID {{obj.id_card}}</view>
</view>
</view>
<view class="company">{{obj.competition}}</view>
<view class="info_box">
<view>{{obj.job?obj.job:'暂无'}}</view>
<view>{{obj.section?obj.section:'暂无'}}</view>
<view>{{obj.tel}}</view>
</view>
</view>
</view>
</view>
<view class="company">{{obj.competition}}</view>
<view class="info_box">
<view>{{obj.job?obj.job:'暂无'}}</view>
<view>{{obj.section?obj.section:'暂无'}}</view>
<view>{{obj.tel}}</view>
</view>
</view>
</view>
<view class="content">
<view class="order_box">
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="0">
<image src="/images/icon_29.png" />
<text>待付款</text>
<view class="num" wx:if="{{order.daiorder>0}}">{{order.daiorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="1">
<image src="/images/icon_58.png" />
<text>待发货</text>
<view class="num" wx:if="{{order.daifahuoorder>0}}">{{order.daifahuoorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="2">
<image src="/images/icon_30.png" />
<text>待收货</text>
<view class="num" wx:if="{{order.daishouhuoorder>0}}">{{order.daishouhuoorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="3">
<image src="/images/icon_37.png" />
<text>已完成</text>
<view class="num" wx:if="{{order.success>0}}">{{order.success}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="4">
<image src="/images/icon_31.png" />
<text>退换货</text>
<view class="num" wx:if="{{order.tui>0}}">{{order.tui}}</view>
</view>
</view>
<view class="content">
<view class="order_box">
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="0">
<image src="/images/icon_29.png" />
<text>待付款</text>
<view class="num" wx:if="{{order.daiorder>0}}">{{order.daiorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="1">
<image src="/images/icon_58.png" />
<text>待发货</text>
<view class="num" wx:if="{{order.daifahuoorder>0}}">{{order.daifahuoorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="2">
<image src="/images/icon_30.png" />
<text>待收货</text>
<view class="num" wx:if="{{order.daishouhuoorder>0}}">{{order.daishouhuoorder}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="3">
<image src="/images/icon_37.png" />
<text>已完成</text>
<view class="num" wx:if="{{order.success>0}}">{{order.success}}</view>
</view>
<view class="order_item" bindtap="jumpListFun" data-t="1" data-i="4">
<image src="/images/icon_31.png" />
<text>退换货</text>
<view class="num" wx:if="{{order.tui>0}}">{{order.tui}}</view>
</view>
</view>
<!-- 物流信息 -->
<view class="wuliuinfo" wx:if="{{kuaidi.length!=0}}">
<view class="page-section page-section-spacing swiper">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="true" circular="true">
<block wx:for="{{kuaidi}}" wx:key="*this">
<swiper-item>
<view class="swiper-item" bindtap="look_logistics" data-ordernum="{{item.order_odd}}">
<view class='wuliutop flextwo'>
<view class="wutopleft">最新物流</view>
<view class="wutopright">{{item.kuaidi[0].kuaidi.Traces[0].AcceptTime}}</view>
</view>
<view class="wuliubot flexone">
<view class="wuliuleft">
<image src="{{item.kuaidi[0].kuaidi.product_image}}"></image>
</view>
<!-- 物流信息 -->
<view class="wuliuinfo" wx:if="{{kuaidi.length!=0}}">
<view class="page-section page-section-spacing swiper">
<!-- vertical="true" -->
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true">
<block wx:for="{{kuaidi}}" wx:key="*this">
<swiper-item>
<view class="swiper-item" bindtap="look_logistics" data-ordernum="{{item.order_odd}}">
<view class='wuliutop flextwo'>
<view class="wutopleft">最新物流</view>
<view class="wutopright">{{item.kuaidi[0].kuaidi.Traces[0].AcceptTime}}</view>
</view>
<view class="wuliubot flexone">
<view class="wuliuleft">
<image src="{{item.kuaidi[0].kuaidi.product_image}}"></image>
</view>
<view class="wuliuitemright">
<view class="wuliuitemright">
<view class="wuliustate flextwo">
<view class="wuliuimg">
<image src="/images/icon_30.png"></image>
</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==0}}">待取件</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==1}}">已揽收</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==2}}">在途中</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==3}}">已签收</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==4}}">问题件</view>
</view>
<view class="daiquname">{{item.kuaidi[0].kuaidi.Traces[0].AcceptStation}}</view>
<view class="wuliustate flextwo">
<view class="wuliuimg">
<image src="/images/icon_30.png"></image>
</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==0}}">待取件</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==1}}">已揽收</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==2}}">在途中</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==3}}">已签收</view>
<view class="dai" wx:if="{{item.kuaidi[0].kuaidi.State==4}}">问题件</view>
</view>
<view class="daiquname">{{item.kuaidi[0].kuaidi.Traces[0].AcceptStation}}</view>
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<view class="item_box">
<view class="item" bindtap="jumpListFun" data-t="2">
<view class="left">
<image src="/images/icon_35.png" />我的收藏
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="3">
<view class="left">
<image src="/images/icon_33.png" />我的积分
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="6">
<view class="left">
<view class="zujiimg">
<image src="/images/zuji.png" />
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<view class="item_box">
<view class="item" bindtap="jumpListFun" data-t="2">
<view class="left">
<image src="/images/icon_35.png" />我的收藏
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="3">
<view class="left">
<image src="/images/icon_33.png" />我的积分
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="6">
<view class="left">
<view class="zujiimg">
<image src="/images/zuji.png" />
</view>
我的足迹
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="4">
<view class="left">
<image src="/images/icon_32.png" style="width:26rpx;height:30rpx;" />我的地址
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="5">
<view class="left">
<image src="/images/icon_34.png" style="width:30rpx;height:30rpx;" />关于我们
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
</view>
</view>
<concat/>
我的足迹
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="4">
<view class="left">
<image src="/images/icon_32.png" style="width:26rpx;height:30rpx;" />我的地址
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
<view class="item" bindtap="jumpListFun" data-t="5">
<view class="left">
<image src="/images/icon_34.png" style="width:30rpx;height:30rpx;" />关于我们
</view>
<image src="/images/youjiantou.png" class="youjiantou" />
</view>
</view>
</view>
<concat />
</block>
\ No newline at end of file
...
...
pages/my/my_integral/my_integral.js
查看文件 @
9cba462
...
...
@@ -24,7 +24,7 @@ Page({
a
.
post
(
u
,
{}).
then
((
r
)
=>
{
if
(
r
.
code
==
200
)
{
t
.
setData
({
jifen
:
r
.
msg
.
jifen
,
jifen
:
r
.
msg
.
jifen
==
null
?
0
:
r
.
msg
.
jifen
,
time
:
r
.
msg
.
start
+
"日到"
+
r
.
msg
.
end
+
'日'
,
list
:
r
.
msg
.
res
})
...
...
pages/my/my_integral/my_integral.wxml
查看文件 @
9cba462
...
...
@@ -5,7 +5,8 @@
<view class="header_top">
<view class="tips_word">积分余额</view>
<view class="jifen">{{jifen}}</view>
<view class="time">积分可用时间:每月{{time}}之前</view>
<!-- <view class="time">积分可用时间:每月{{time}}之前</view> -->
<view class="time">积分可用时间:以各公司宣贯为准</view>
</view>
</view>
<view class="line" />
...
...
pages/order/order.js
查看文件 @
9cba462
...
...
@@ -14,7 +14,18 @@ Page({
area
:
''
,
address
:
''
,
cover_type
:
false
,
total
:
''
total
:
''
,
info
:{
address
:{
address
:
''
,
area
:
''
,
id
:
''
,
tel
:
''
,
name
:
''
}
}
},
//加减商品数量
num_change
(
e
)
{
...
...
@@ -272,9 +283,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
let
pages
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
]
console
.
log
(
'887766554'
,
currPage
.
data
.
id
)
if
(
currPage
.
data
.
id
)
{
console
.
log
(
'4778785'
,
this
.
data
.
info
)
this
.
setData
({
"info.address.address"
:
currPage
.
data
.
address
,
"info.address.area"
:
currPage
.
data
.
area
,
...
...
@@ -282,14 +298,16 @@ Page({
"info.address.tel"
:
currPage
.
data
.
tel
,
"info.address.name"
:
currPage
.
data
.
name
})
console
.
log
(
this
.
data
.
info
)
console
.
log
(
currPage
.
data
.
address
)
this
.
get_youfei
(
currPage
.
data
.
id
)
}
if
(
wx
.
getStorageSync
(
'no_address'
))
{
wx
.
setStorageSync
(
'no_address'
,
false
)
this
.
setData
({
"info.address"
:
null
})
}
// if (wx.getStorageSync('no_address')) {
// wx.setStorageSync('no_address', false)
// this.setData({
// "info.address": null
// })
// }
},
...
...
pages/search/search.js
查看文件 @
9cba462
...
...
@@ -37,6 +37,9 @@ Page({
noClick
:
false
,
word
:
e
.
currentTarget
.
dataset
.
name
})
wx
.
navigateTo
({
url
:
'search_result/search_result?title='
+
'搜索'
+
'&name='
+
this
.
data
.
word
})
},
//获取热门搜索标签
get_hot
()
{
...
...
pages/shop_cart/shop_cart.js
查看文件 @
9cba462
...
...
@@ -8,7 +8,9 @@ Page({
check_num
:
0
,
//选中数量
checkAll
:
false
,
//全选状态
integral
:
0
,
//总积分
all_num
:
0
//总数量
all_num
:
0
,
//总数量
token
:
''
,
login_new
:
''
},
//删除商品
...
...
@@ -242,6 +244,12 @@ submit(){
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
setData
({
token
:
wx
.
getStorageSync
(
'token'
),
login_new
:
app
.
globalData
.
login_new
})
this
.
get_info
()
this
.
judge
()
this
.
get_shopnum
();
...
...
pages/shop_cart/shop_cart.wxml
查看文件 @
9cba462
<block wx:if="{{no_login}}">
<navigator class="no_login" catchtap="go_login" url="/pages/register/register">请先登录</navigator>
<navigator class="no_login" catchtap="go_login" url="/pages/register/register"
hover-class="none"
>请先登录</navigator>
</block>
<block wx:elif="{{login_new==''}}">
<navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定会员</navigator>
</block>
<block wx:else>
<view class="content">
<shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" />
...
...
pages/shop_detail/shop_detail.wxml
查看文件 @
9cba462
...
...
@@ -27,7 +27,6 @@
<view class='three_one'>
<view class='three_one_item {{status==index?"active":""}}' wx:for='{{nav}}' wx:for-index='index' wx:key='{{index}}' bindtap='clickNav' data-index='{{index}}'>{{item}}</view>
</view>
<view class='three_two'>
<template is="wxParse" data="{{wxParseData:contenta.nodes}}" wx:if="{{status==0}}" />
<template is="wxParse" data="{{wxParseData:contenb.nodes}}" wx:elif="{{status==1}}" />
...
...
pages/startindex/startindex.js
查看文件 @
9cba462
...
...
@@ -151,26 +151,32 @@ Page({
})
time
--
;
if
(
time
==
1
)
{
console
.
log
(
34643
)
that
.
getCodeFun
()
// let token=wx.getStorageSync('token')
// wx.navigateTo({
// url: '/pages/register/register',
// })
// if(token==""){
// wx.navigateTo({
// url: '/pages/register/register',
// })
// }else{
// wx.navigateTo({
// url: '/pages/index/index'
// })
// }
// if (time ==1) {
// console.log(34643)
// that.getCodeFun()
// let token=wx.getStorageSync('token')
// wx.navigateTo({
// url: '/pages/register/register',
// })
// if(token==""){
// wx.navigateTo({
// url: '/pages/register/register',
// })
// }else{
// wx.navigateTo({
// url: '/pages/index/index'
// })
// }
}
else
if
(
time
<=
0
){
// }
if
(
time
<=
0
){
clearInterval
(
interval
);
}
wx
.
switchTab
({
url
:
'/pages/index/index'
})
}
}.
bind
(
this
),
1000
);
},
...
...
project.config.json
查看文件 @
9cba462
...
...
@@ -119,6 +119,13 @@
"id"
:
-1
,
"name"
:
"首页"
,
"pathName"
:
"pages/index/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"注册"
,
"pathName"
:
"pages/register/register"
,
"scene"
:
null
}
]
...
...
请
注册
或
登录
后发表评论