Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
8bc728e2
Commit
8bc728e2
authored
Aug 05, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw-sc' into 'dev_7.1.0'
Feature zyw sc See merge request
!48
parents
8a428031
80a7f997
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
249 additions
and
6 deletions
+249
-6
cart.js
src/pages/cart/cart.js
+1
-1
cart.wxml
src/pages/cart/cart.wxml
+0
-1
category.js
src/pages/category/category.js
+64
-0
category.json
src/pages/category/category.json
+2
-0
category.wxml
src/pages/category/category.wxml
+73
-1
category.wxss
src/pages/category/category.wxss
+101
-2
project.config.json
src/project.config.json
+8
-1
No files found.
src/pages/cart/cart.js
View file @
8bc728e2
...
@@ -92,7 +92,7 @@ wxService.page({
...
@@ -92,7 +92,7 @@ wxService.page({
},
},
//删除商品
//删除商品
deletePro
(){
deletePro
(
e
){
wx
.
showModal
({
wx
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'确认删除该商品'
,
content
:
'确认删除该商品'
,
...
...
src/pages/cart/cart.wxml
View file @
8bc728e2
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
<!-- 购物车列表 -->
<!-- 购物车列表 -->
<view class="cart-content">
<view class="cart-content">
<view class="cart-item" wx:for="{{cartList}}" wx:key="{{index}}">
<view class="cart-item" wx:for="{{cartList}}" wx:key="{{index}}">
<view class="cart-list" bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" style="{{item.shows}}" data-index="{{ index}}">
<view class="cart-list" bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" style="{{item.shows}}" data-index="{{ index}}">
<view class="select-radio" catchtap="selectPro" data-index="{{index}}">
<view class="select-radio" catchtap="selectPro" data-index="{{index}}">
...
...
src/pages/category/category.js
View file @
8bc728e2
...
@@ -5,6 +5,47 @@ Page({
...
@@ -5,6 +5,47 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
curMenu
:
[
0
,
0
],
navData
:
[
{
children
:[
{
name
:
'1dsfkshdfsdf'
,
id
:
1
,
children
:[
{
name
:
'111111111'
,
pic_url
:
'http://pic39.nipic.com/20140321/18063302_210604412116_2.jpg'
}
]
},
{
name
:
2
,
id
:
2
,
pic_url
:
'http://pic68.nipic.com/file/20150601/8164280_104301508000_2.jpg'
,
children
:
[
{
name
:
'2222222'
,
pic_url
:
'http://pic68.nipic.com/file/20150601/8164280_104301508000_2.jpg'
},
{
name
:
'2222222'
,
pic_url
:
'http://pic68.nipic.com/file/20150601/8164280_104301508000_2.jpg'
},
{
name
:
'2222222'
,
pic_url
:
'http://pic68.nipic.com/file/20150601/8164280_104301508000_2.jpg'
},
{
name
:
'2222222'
,
pic_url
:
'http://pic68.nipic.com/file/20150601/8164280_104301508000_2.jpg'
},
]
}
]
}
],
},
},
...
@@ -34,6 +75,29 @@ Page({
...
@@ -34,6 +75,29 @@ Page({
}
}
},
},
selectMenu
:
function
(
event
)
{
const
{
id1
,
id2
,
name1
,
name2
}
=
event
.
target
.
dataset
// xm_bi.Event.stat("classClick", {
// "className": name2,
// "classType": "中类",
// "classID": id2
// })
this
.
setData
({
curMenu
:
[
event
.
target
.
dataset
.
i
,
event
.
target
.
dataset
.
j
]
})
// app.sr.track('browse_category_detail', {
// first_category: {
// id: id1,
// name: name1
// },
// second_category: {
// id: id2,
// name: name2
// }
// })
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
...
...
src/pages/category/category.json
View file @
8bc728e2
{
{
"navigationBarTitleText"
:
"分类"
,
"usingComponents"
:
{}
"usingComponents"
:
{}
}
}
\ No newline at end of file
src/pages/category/category.wxml
View file @
8bc728e2
<!--pages/category/category.wxml-->
<!--pages/category/category.wxml-->
<text>pages/category/category.wxml</text>
<view class="nav-container search-top">
<scroll-view class="nav-menu" scroll-y="true">
<!-- <block >
<view class="menu-item{{i == curMenu[0] && j == curMenu[1] ? ' active' : ''}}">
<view class="menu-name{{i == curMenu[0] && j == curMenu[1] ? ' active-text' : ''}}" data-i="{{i}}" data-j="{{j}}"
data-name1="{{menuFir.name}}" data-id1="{{menuFir.id}}" data-id2="{{menuSec.id}}"
data-name2="{{menuSec.name}}" data-id="{{menuSec.id}}" bindtap="selectMenu">{{1111111}}</view>
</view>
<view class="menu-item{{i == curMenu[0] && j == curMenu[1] ? ' active' : ''}}">
<view class="menu-name{{i == curMenu[0] && j == curMenu[1] ? ' active-text' : ''}}" data-i="{{i}}" data-j="{{j}}"
data-name1="{{menuFir.name}}" data-id1="{{menuFir.id}}" data-id2="{{menuSec.id}}"
data-name2="{{menuSec.name}}" data-id="{{menuSec.id}}" bindtap="selectMenu">{{22222}}</view>
</view>
</block> -->
<block wx:for="{{navData}}" wx:key="{{i}}" wx:for-index="i" wx:for-item="menuFir">
<view wx:for="{{menuFir.children}}" wx:key="{{j}}" wx:for-index="j" wx:for-item="menuSec" class="menu-item{{i == curMenu[0] && j == curMenu[1] ? ' active' : ''}}">
<view class="menu-name{{i == curMenu[0] && j == curMenu[1] ? ' active-text' : ''}}" data-i="{{i}}" data-j="{{j}}"
data-name1="{{menuFir.name}}" data-id1="{{menuFir.id}}" data-id2="{{menuSec.id}}"
data-name2="{{menuSec.name}}" data-id="{{menuSec.id}}" bindtap="selectMenu">{{menuSec.name}}</view>
</view>
</block>
</scroll-view>
<scroll-view class="nav-contents" scroll-y="true">
<block wx:for="{{navData}}" wx:key="{{i}}" wx:for-index="i" wx:for-item="menuFir">
<view wx:for="{{menuFir.children}}" wx:key="{{j}}" wx:for-index="j" wx:for-item="menuSec" class="nav-content{{i == curMenu[0] && j == curMenu[1] ? ' active' : ''}}">
<navigator class="sec-menu-image" open-type="navigate" url="/pages/productNav/productNav?id={{menuSec.id}}&name={{menuSec.name}}">
<image src="{{menuSec.pic_url}}" mode="widthFix"></image>
</navigator>
<view class="menu-list">
<view wx:for="{{menuSec.children}}" wx:key="{{k}}" wx:for-index="k" wx:for-item="menuThr" class="menu-third" >
<view data-id="{{menuThr.id}}" data-name="{{menuThr.name}}" bindtap="navPage">
<image src="{{menuThr.pic_url}}" class="thr-menu-image" ></image>
<view class="thr-menu-name">{{menuThr.name}}</view>
</view>
</view>
</view>
</view>
</block>
<!-- <block >
<view class="nav-content{{i == curMenu[0] && j == curMenu[1] ? ' active' : ''}}">
<navigator class="sec-menu-image" open-type="navigate" url="/pages/productNav/productNav?id={{menuSec.id}}&name={{menuSec.name}}">
<image src="/assets/imgs/7_1_0/icon.png" mode="widthFix"></image>
</navigator>
<view class="menu-list">
<view class="menu-third" >
<view data-id="{{menuThr.id}}" data-name="{{menuThr.name}}" bindtap="navPage">
<image src="/assets/imgs/7_1_0/icon.png" class="thr-menu-image" mode="widthFix"></image>
<view class="thr-menu-name">111111</view>
</view>
</view>
<view class="menu-third" >
<view data-id="{{menuThr.id}}" data-name="{{menuThr.name}}" bindtap="navPage">
<image src="/assets/imgs/7_1_0/icon.png" class="thr-menu-image" mode="widthFix"></image>
<view class="thr-menu-name">111111</view>
</view>
</view>
<view class="menu-third" >
<view data-id="{{menuThr.id}}" data-name="{{menuThr.name}}" bindtap="navPage">
<image src="/assets/imgs/7_1_0/icon.png" class="thr-menu-image" mode="widthFix"></image>
<view class="thr-menu-name">111111</view>
</view>
</view>
</view>
</view>
</block> -->
</scroll-view>
</view>
\ No newline at end of file
src/pages/category/category.wxss
View file @
8bc728e2
/* pages/category/category.wxss */
/* pages/category/category.wxss */
\ No newline at end of file
page {
height: 100%;
background-color: #ffffff;}
.nav-container {
width: 100%;
height: 100%;
display: flex; }
.nav-menu {
flex: 0;
width: 25%;
padding-bottom: 50px;
}
.nav-menu .menu-item {
position: relative;
/* padding: 0 16rpx; */
padding: 0 28rpx;
font-size: 26rpx;
color: #000000;
line-height: 100rpx;
text-align: center; }
/* .nav-menu .menu-item::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 18rpx;
width: 8rpx;
height: 60rpx;
background: transparent; } */
/* .nav-menu .menu-item.active::after {
background: #cB3C3C; } */
.nav-menu .menu-item .menu-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 26rpx; }
.active-text{
color: #cB3C3C;
}
.nav-contents {
flex: 1;
width: 75%; }
.nav-content {
display: none;
padding: 30rpx 30rpx; }
.nav-content.active {
display: block; }
.sec-menu-image::after {
content: '';
display: block;
clear: both; }
.sec-menu-image image {
width: 100%;
height: auto;
float: left;
border-radius: 4rpx;
margin-bottom: 30rpx;}
.menu-list {
display: flex;
flex-wrap: wrap;
margin-bottom:50rpx;
justify-content: space-between;
}
.menu-list:after{
content: '';
width: 150rpx;
}
.menu-third {
width: 150rpx;
text-align: center;
padding-bottom: 32rpx; }
.menu-third image {
width: 150rpx;
height: 150rpx;
border-radius: 2rpx;
}
.thr-menu-name {
font-size: 24rpx;
margin-top: 10rpx;
font-family: SourceHanSansCN-Normal;
font-weight: normal;
font-stretch: normal;
letter-spacing: -1px;
color: #333; }
src/project.config.json
View file @
8bc728e2
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
1
8
,
"current"
:
1
9
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -157,6 +157,13 @@
...
@@ -157,6 +157,13 @@
"id"
:
-1
,
"id"
:
-1
,
"name"
:
"购物车"
,
"name"
:
"购物车"
,
"pathName"
:
"pages/cart/cart"
,
"pathName"
:
"pages/cart/cart"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"分类"
,
"pathName"
:
"pages/category/category"
,
"scene"
:
null
"scene"
:
null
}
}
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment