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
2f72d947
Commit
2f72d947
authored
Aug 20, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' of
ssh://gitlab.bigaka.net:2287/gaoshq/7-Eleven
into dev_7.1.0
parents
59b26a0f
7a1d7b94
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
145 additions
and
108 deletions
+145
-108
arrow-right-sku.png
src/assets/imgs/7_1_0/arrow-right-sku.png
+0
-0
productListStyleOne.wxml
src/component/productListStyleOne/productListStyleOne.wxml
+20
-18
productListStyleTwo.wxml
src/component/productListStyleTwo/productListStyleTwo.wxml
+42
-38
skuPopup.js
src/component/skuPopup/skuPopup.js
+0
-0
skuPopup.wxml
src/component/skuPopup/skuPopup.wxml
+6
-8
skuPopup.wxss
src/component/skuPopup/skuPopup.wxss
+4
-1
productDetail.js
src/pages/productDetail/productDetail.js
+42
-16
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+23
-24
productDetail.wxss
src/pages/productDetail/productDetail.wxss
+5
-0
fun.js
src/subPackage/page/pages/fun/fun.js
+1
-1
fun.wxml
src/subPackage/page/pages/fun/fun.wxml
+2
-2
No files found.
src/assets/imgs/7_1_0/arrow-right-sku.png
0 → 100644
View file @
2f72d947
299 Bytes
src/component/productListStyleOne/productListStyleOne.wxml
View file @
2f72d947
...
@@ -11,23 +11,25 @@
...
@@ -11,23 +11,25 @@
</block>
</block>
</view>
</view>
</view>
</view>
<template name="water-list">
<template name="water-list">
<view class="item">
<navigator hover-class="none" url="/pages/productDetail/productDetail?productId={{productId}}">
<image class="item-img" src="{{indexUrl}}" mode="widthFix"></image>
<view class="item">
<view class="item-title-box">
<image class="item-img" src="{{indexUrl}}" mode="widthFix"></image>
<view class="item-title">{{productName}}</view>
<view class="item-title-box">
</view>
<view class="item-title">{{productName}}</view>
<view class="pro-price-wrap">
</view>
<view class="pro-plus-price" wx:if="{{memberPrice}}">
<view class="pro-price-wrap">
<text>¥</text>
<view class="pro-plus-price" wx:if="{{memberPrice}}">
<text class="plus-price">{{memberPrice}}</text>
<text>¥</text>
<image mode="widthFix" src="/assets/imgs/7_1_0/member-icon.png"></image>
<text class="plus-price">{{memberPrice}}</text>
</view>
<image mode="widthFix" src="/assets/imgs/7_1_0/member-icon.png"></image>
<view class="pro-member-price" wx:if="{{plusPrice}}">
</view>
<text>¥</text>
<view class="pro-member-price" wx:if="{{plusPrice}}">
<text class="member-price">{{plusPrice}}</text>
<text>¥</text>
<image mode="widthFix" src="/assets/imgs/7_1_0/plus-sm.png"></image>
<text class="member-price">{{plusPrice}}</text>
<image mode="widthFix" src="/assets/imgs/7_1_0/plus-sm.png"></image>
</view>
</view>
</view>
</view>
</view>
</navigator>
</view>
</template>
</template>
src/component/productListStyleTwo/productListStyleTwo.wxml
View file @
2f72d947
<!--component/productListStyleTwo/productListStyleTwo.wxml-->
<!--component/productListStyleTwo/productListStyleTwo.wxml-->
<view class="hot-item border_box" wx:for="{{imageData}}" wx:key="{{index}}">
<block wx:for="{{imageData}}" wx:key="{{index}}">
<view class="hot-img-box">
<navigator hover-class="none" url="/pages/productDetail/productDetail?productId={{menuSec.productId}}">
<image class="hot-img" src="{{item.indexUrl}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
<view class="hot-item border_box" >
</view>
<view class="hot-img-box">
<view class="hot-item-desc border_box">
<image class="hot-img" src="{{item.indexUrl}}" mode="widthFix" lazy-load="false" binderror="" bindload="" />
<view class="item-name">{{item.productName}}</view>
</view>
<view class="item-desc">{{item.productStatusDesc}}</view>
<view class="hot-item-desc border_box">
<view class="item-vip-price weui-flex" wx:if="{{item.memberPrice}}">
<view class="item-name">{{item.productName}}</view>
<view class="" >
<view class="item-desc">{{item.productStatusDesc}}</view>
<image
<view class="item-vip-price weui-flex" wx:if="{{item.memberPrice}}">
class="item-vip"
<view class="" >
src="./../../assets/imgs/7_1_0/vip.png"
<image
mode="widthFix"
class="item-vip"
lazy-load="false"
src="./../../assets/imgs/7_1_0/vip.png"
binderror=""
mode="widthFix"
bindload=""
lazy-load="false"
/>
binderror=""
</view>
bindload=""
<text class="vip-sale-price border_box">¥{{item.memberPrice}}</text>
/>
<text class="vip-original-price">¥189</text>
</view>
</view>
<text class="vip-sale-price border_box">¥{{item.memberPrice}}</text>
<view class="item-plus-price weui-flex" wx:if="{{item.plusPrice}}">
<text class="vip-original-price">¥189</text>
<view class="">
</view>
<image
<view class="item-plus-price weui-flex" wx:if="{{item.plusPrice}}">
class="item-plus"
<view class="">
src="./../../assets/imgs/7_1_0/plus.png"
<image
mode="widthFix"
class="item-plus"
lazy-load="false"
src="./../../assets/imgs/7_1_0/plus.png"
binderror=""
mode="widthFix"
bindload=""
lazy-load="false"
/>
binderror=""
</view>
bindload=""
<text class="vip-plus-price vip-sale-price border_box">¥{{item.plusPrice}}</text>
/>
</view>
</view>
<text class="vip-plus-price vip-sale-price border_box">¥{{item.plusPrice}}</text>
<view/>
</view>
</view>
</view>
<view/>
</view>
</view>
</navigator>
</block>
src/component/skuPopup/skuPopup.js
View file @
2f72d947
This diff is collapsed.
Click to expand it.
src/component/skuPopup/skuPopup.wxml
View file @
2f72d947
...
@@ -6,20 +6,18 @@
...
@@ -6,20 +6,18 @@
<view class="top-info clearfix">
<view class="top-info clearfix">
<image mode="widthFix" src="{{curSku.sku_pic_url && curSku.sku_pic_url != 'undefined' ? (imageDomain + curSku.sku_pic_url) : indexImg}}"></image>
<image mode="widthFix" src="{{curSku.sku_pic_url && curSku.sku_pic_url != 'undefined' ? (imageDomain + curSku.sku_pic_url) : indexImg}}"></image>
<view class="top-text">
<view class="top-text">
<
view class="price-text" wx:if="{{exchangePrice <= 0}}">¥{{price / 100}}</view
>
<
!-- <view class="price-text" wx:if="{{exchangePrice <= 0}}">¥{{price / 100}}</view> --
>
<view class="price-text"
wx:else>{{p
rice}}</view>
<view class="price-text"
>¥{{saleP
rice}}</view>
<view class="stock-text">库存:{{skuStock}}</view>
<view class="stock-text">库存:{{skuStock}}</view>
<view class="sku-text">规格:<block wx:for="{{skuText}}" wx:key="{{index}}">{{item}} </block></view>
<view class="sku-text">规格:<block wx:for="{{skuText}}" wx:key="{{index}}">{{item}} </block></view>
</view>
</view>
</view>
</view>
<!-- isAllowArrive 0 开启/放开 1 关闭/禁用 -->
<!-- isAllowArrive 0 开启/放开 1 关闭/禁用 -->
<scroll-view class="mid-info" scroll-y="true">
<scroll-view class="mid-info" scroll-y="true">
<view class="sku-info" >
<view class="sku-info" wx:for="{{specItem}}" wx:for-index="i" wx:key="{{i}}">
<view class="spec-name">默认</view>
<view class="spec-name">{{item.name}}</view>
<view class="spec-values">
<view class="spec-values" wx:for="{{item.sonList}}" wx:for-index="j" wx:key="{{j}}" wx:for-item="specValue">
<view class="spec-value active">默认选项</view>
<view class="spec-value {{specValue.stock == 0 ? ' disabled' : ''}}{{curSpec[i].name == specValue.name ? ' active' : ''}}" bindtap="selectSku" data-id="{{specValue.id}}" data-index="{{i}}" data-name="{{specValue.name}}" data-type="{{goodType}}" data-disable="{{specValue.skuStock == 0 ? true : false}}" data-stock="{{skuStock}}">{{specValue.name}}</view>
<view class="spec-value">默认选项</view>
<view class="spec-value">默认选项</view>
<!-- <view wx:if="{{isAllowArrive}}" class="spec-value{{specValue.skuStock == 0 ? ' disabled' : ''}}{{curSpec[i] == specValue.skuName ? ' active' : ''}}" wx:for="{{specInfo.specValue}}" wx:for-index="j" wx:key="{{j}}" wx:for-item="specValue" data-stock="{{specValue.skuStock}}" data-name="{{specValue.skuName}}" data-index="{{i}}" data-type="{{goodType}}" data-disable="{{specValue.skuStock == 0 ? true : false}}" bindtap="selectSku">{{specValue.skuName}}</view> -->
<!-- <view wx:if="{{isAllowArrive}}" class="spec-value{{specValue.skuStock == 0 ? ' disabled' : ''}}{{curSpec[i] == specValue.skuName ? ' active' : ''}}" wx:for="{{specInfo.specValue}}" wx:for-index="j" wx:key="{{j}}" wx:for-item="specValue" data-stock="{{specValue.skuStock}}" data-name="{{specValue.skuName}}" data-index="{{i}}" data-type="{{goodType}}" data-disable="{{specValue.skuStock == 0 ? true : false}}" bindtap="selectSku">{{specValue.skuName}}</view> -->
<!-- <view wx:if="{{!isAllowArrive}}" class="spec-value{{specValue.skuStock == 0 ? ' disabled' : ''}}{{curSpec[i] == specValue.skuName ? ' active' : ''}}" wx:for="{{specInfo.specValue}}" wx:for-index="j" wx:key="{{j}}" wx:for-item="specValue" data-stock="{{specValue.skuStock}}" data-name="{{specValue.skuName}}" data-index="{{i}}" data-type="{{goodType}}" data-disable="{{specValue.skuStock == 0 && goodType == 2 ? true : false}}" bindtap="selectSku">{{specValue.skuName}}</view> -->
<!-- <view wx:if="{{!isAllowArrive}}" class="spec-value{{specValue.skuStock == 0 ? ' disabled' : ''}}{{curSpec[i] == specValue.skuName ? ' active' : ''}}" wx:for="{{specInfo.specValue}}" wx:for-index="j" wx:key="{{j}}" wx:for-item="specValue" data-stock="{{specValue.skuStock}}" data-name="{{specValue.skuName}}" data-index="{{i}}" data-type="{{goodType}}" data-disable="{{specValue.skuStock == 0 && goodType == 2 ? true : false}}" bindtap="selectSku">{{specValue.skuName}}</view> -->
...
...
src/component/skuPopup/skuPopup.wxss
View file @
2f72d947
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
transform: translateY(0); }
transform: translateY(0); }
.out-stock {
.out-stock {
background: #
FFB400
!important;
background: #
aaaaaa
!important;
}
}
.popup-content {
.popup-content {
position: fixed;
position: fixed;
...
@@ -97,6 +97,9 @@
...
@@ -97,6 +97,9 @@
display: inline-block;
display: inline-block;
vertical-align: middle;
vertical-align: middle;
}
}
.spec-values{
display: inline-block;
}
.mid-info .sku-info .spec-value {
.mid-info .sku-info .spec-value {
color: #808080;
color: #808080;
font-size: 26rpx;
font-size: 26rpx;
...
...
src/pages/productDetail/productDetail.js
View file @
2f72d947
// pages/productDetail/productDetail.js
// pages/productDetail/productDetail.js
var
app
=
getApp
()
var
app
=
getApp
()
const
wxService
=
require
(
'../../utils/wxService'
)
Page
({
wxService
.
page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
productId
:
''
,
productInfo
:
''
,
showHtml
:
false
,
showHtml
:
false
,
reachBottom
:
false
,
// 标识是否触底
reachBottom
:
false
,
// 标识是否触底
showSkuPopup
:
false
,
showSkuPopup
:
false
,
btnText
:
'
立即购买
'
,
btnText
:
'
确定
'
,
baseImgUrl
:
app
.
globalData
.
imageUrl
,
baseImgUrl
:
app
.
globalData
.
imageUrl
,
swiperCurrent
:
0
,
swiperCurrent
:
0
,
selectSkuName
:
''
,
imageData
:
[{
imageData
:
[{
desc
:
"string"
,
desc
:
"string"
,
...
@@ -52,7 +57,11 @@ Page({
...
@@ -52,7 +57,11 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
if
(
options
&&
options
.
productId
){
this
.
setData
({
productId
:
options
.
productId
})
}
},
},
swiperChange
(
e
)
{
swiperChange
(
e
)
{
...
@@ -72,24 +81,28 @@ Page({
...
@@ -72,24 +81,28 @@ Page({
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
getProInfo
()
},
},
/**
//获取商品详情
* 生命周期函数--监听页面隐藏
getProInfo
(){
*/
wx
.
showLoading
({
onHide
:
function
()
{
title
:
'加载中'
})
wxService
.
get
(
`/sale/product/buyer/findByProductId?productId=
${
this
.
data
.
productId
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
this
.
setData
({
productInfo
:
data
})
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
},
/**
/**
...
@@ -173,6 +186,18 @@ Page({
...
@@ -173,6 +186,18 @@ Page({
}).
exec
()
}).
exec
()
},
},
confirmClick
(
event
){
console
.
log
(
event
)
var
selectSkuName
=
[]
for
(
let
i
in
event
.
detail
.
selectSku
){
selectSkuName
.
push
(
event
.
detail
.
selectSku
[
i
].
name
)
}
var
selectSkuStr
=
selectSkuName
.
join
(
','
)
this
.
setData
({
selectSkuName
:
selectSkuStr
})
}
})
})
\ No newline at end of file
src/pages/productDetail/productDetail.wxml
View file @
2f72d947
...
@@ -9,14 +9,14 @@
...
@@ -9,14 +9,14 @@
-->
-->
<swiper
<swiper
autoplay="true" style="height: 750rpx;line-height: 100rpx;" bindchange="swiperChange">
autoplay="true" style="height: 750rpx;line-height: 100rpx;" bindchange="swiperChange">
<block wx:for="{{
imageData
}}" wx:key="index">
<block wx:for="{{
productInfo.listUrl
}}" wx:key="index">
<swiper-item>
<swiper-item>
<image class="swiper-image" mode="widthFix" src="{{baseImgUrl}}{{item.imageUrl}}"></image>
<image class="swiper-image" mode="widthFix" src="{{baseImgUrl}}{{item.imageUrl}}"></image>
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
<view class="dots">
<view class="dots">
<block wx:for="{{
imageData
}}" wx:key="index">
<block wx:for="{{
productInfo.listUrl
}}" wx:key="index">
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
</block>
</block>
</view>
</view>
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
</view>
</view>
</view>
</view>
<view class="product-name">
<view class="product-name">
名称
{{productInfo.productName}}
</view>
</view>
<view class="product-desc">
<view class="product-desc">
描述
{{productInfo.productStatusDesc}}
</view>
</view>
<view class="member-price">
<view class="member-price">
<view class="member-price-info">
<view class="member-price-info">
...
@@ -51,15 +51,15 @@
...
@@ -51,15 +51,15 @@
<image class="big-arrow" src="/assets/imgs/big-arrow-right.png"></image>
<image class="big-arrow" src="/assets/imgs/big-arrow-right.png"></image>
</view>
</view>
</view>
</view>
<view class="choose-wrap">
<view class="choose-wrap"
bindtap="addCart"
>
请选择规格
{{selectSkuName ? '已选:' + selectSkuName : '请选择规格'}}
<
!-- <image class="arrow-right"></image> --
>
<
image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right-sku.png" mode="widthFix"></image
>
</view>
</view>
<view class="choose-wrap">
<
!-- <
view class="choose-wrap">
支持快递配送</view>
支持快递配送</view>
-->
<view class="surplus">
<view class="surplus">
剩余:
剩余:
<text class="surplus-number">
300
</text>
<text class="surplus-number">
{{productInfo.stock}}
</text>
件
件
</view>
</view>
...
@@ -141,19 +141,18 @@
...
@@ -141,19 +141,18 @@
</view>
</view>
<sku-popup
<sku-popup
product-name="{{product.name}}"
product-name="{{productInfo.productName}}"
spec-names="{{product.sku_names}}"
spec-item="{{productInfo.specItemList}}"
spec-values="{{product.skus}}"
good-type="{{productInfo.productType}}"
good-type="{{product.goodType}}"
index-img="{{productInfo.listUrl}}"
is-allow-arrive="{{product.isAllowArrive}}"
sku-infos="{{productInfo.productSku}}"
is-notice-status="{{isNoticeStatus}}"
index-img="{{product.index_url[0]}}"
image-domain="{{product.image_domain}}"
sku-infos="{{product.skuStocks}}"
quantity-average="{{product.quantity_average}}"
show="{{showSkuPopup}}"
show="{{showSkuPopup}}"
exchange-price="{{product.exchange_credits}}"
integral-role="{{product.integral_role}}"
bind:skuselect="confirmClick"
bind:skuselect="confirmClick"
btn-text="{{btnText}}"
btn-text="{{btnText}}"
/>
product-stock="{{productInfo.stock}}"
\ No newline at end of file
/>
<!-- <sku-popup
product-sku="{{productInfo.productSku}}"
/> -->
\ No newline at end of file
src/pages/productDetail/productDetail.wxss
View file @
2f72d947
...
@@ -231,3 +231,8 @@
...
@@ -231,3 +231,8 @@
border: none;
border: none;
border-radius: 0;
border-radius: 0;
}
}
.arrow-right{
width: 15rpx;
float:right;
margin-top: 26rpx;
}
src/subPackage/page/pages/fun/fun.js
View file @
2f72d947
...
@@ -46,7 +46,7 @@ wxService.page({
...
@@ -46,7 +46,7 @@ wxService.page({
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
wxService
.
post
(
`/sale/product/buyer/
findProductListPage
?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
this
.
data
.
form
.
queryDto
).
then
(
res
=>
{
wxService
.
post
(
`/sale/product/buyer/
listPageByCategoryId
?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
this
.
data
.
form
.
queryDto
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
src/subPackage/page/pages/fun/fun.wxml
View file @
2f72d947
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<view>
<view>
<tab-sort/>
<tab-sort/>
<product-list-style-one image-data="{{proData}}"
wx:if="{{}}"
/>
<product-list-style-one image-data="{{proData}}" />
<product-list-style-two image-data="{{proData}}" />
<product-list-style-two image-data="{{proData}}"
wx:if="{{}}"
/>
<view class="empty" wx:if="{{proData.length < 1}}">
<view class="empty" wx:if="{{proData.length < 1}}">
暂无商品哦~
暂无商品哦~
...
...
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