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
609c150a
Commit
609c150a
authored
Sep 09, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品详情页分享授权
parent
fd74b18f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
9 deletions
+24
-9
base.wxss
src/base/base.wxss
+1
-1
productDetail.js
src/pages/productDetail/productDetail.js
+0
-1
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+14
-4
productDetail.wxss
src/pages/productDetail/productDetail.wxss
+8
-1
util.js
src/utils/util.js
+1
-2
No files found.
src/base/base.wxss
View file @
609c150a
...
@@ -1313,7 +1313,7 @@ a {
...
@@ -1313,7 +1313,7 @@ a {
white-space: nowrap;
white-space: nowrap;
}
}
button {
button {
background-color:
none
;
background-color:
transparent
;
border-radius:0;
border-radius:0;
padding: 0;
padding: 0;
}
}
...
...
src/pages/productDetail/productDetail.js
View file @
609c150a
...
@@ -103,7 +103,6 @@ wxService.page({
...
@@ -103,7 +103,6 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'0this.data.currentHasUserInfo'
,
this
.
data
.
currentHasUserInfo
)
this
.
getProInfo
()
this
.
getProInfo
()
this
.
getOpenStatus
()
this
.
getOpenStatus
()
this
.
data
.
currentShareContent
=
null
this
.
data
.
currentShareContent
=
null
...
...
src/pages/productDetail/productDetail.wxml
View file @
609c150a
...
@@ -30,7 +30,17 @@
...
@@ -30,7 +30,17 @@
<text class="price">¥618</text>
<text class="price">¥618</text>
<text class="cost-price">¥888</text>
<text class="cost-price">¥888</text>
</view>
</view>
<view class="share-wrap" bindtap="onTapShare">
<button
wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
data-jflag="false"
open-type='getUserInfo'
hover-class="btn-hover"
>
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text>
</button>
<view wx:if="{{currentHasUserInfo}}" class="share-wrap" bindtap="onTapShare">
<image class="share-img" src="/assets/imgs/share.png" />
<image class="share-img" src="/assets/imgs/share.png" />
<text class="share-text">分享</text>
<text class="share-text">分享</text>
</view>
</view>
...
@@ -127,9 +137,9 @@
...
@@ -127,9 +137,9 @@
bindsubmit="addCart"
bindsubmit="addCart"
report-submit
report-submit
name='nav'
name='nav'
wx:if="{{!fromZc}}"
wx:if="{{!fromZc}}"
>
>
<button class="cart-button get-formId--btn" formType="submit"
>加入购物车</button>
<button class="cart-button get-formId--btn" formType="submit">加入购物车</button>
</form>
</form>
<form
<form
class='get-formId get-formId--form'
class='get-formId get-formId--form'
...
@@ -157,7 +167,7 @@
...
@@ -157,7 +167,7 @@
btn-text="{{btnText}}"
btn-text="{{btnText}}"
product-stock="{{productInfo.stock}}"
product-stock="{{productInfo.stock}}"
currentHasUserInfo="{{currentHasUserInfo}}"
currentHasUserInfo="{{currentHasUserInfo}}"
bind:getAuth="_getUserInfo"
bind:getAuth="_getUserInfo"
/>
/>
<card-modal
<card-modal
...
...
src/pages/productDetail/productDetail.wxss
View file @
609c150a
/* pages/productDetail/productDetail.wxss */
/* pages/productDetail/productDetail.wxss */
@import './../../base/base.wxss';
page{
page{
padding-bottom: 100rpx;
padding-bottom: 100rpx;
}
}
.swiper-image{
.swiper-image{
width: 100%;
width: 100%;
}
}
.product-price {
display: flex;
justify-content: space-between;
align-items: center;
}
.dots{
.dots{
position: absolute;
position: absolute;
left: 0;
left: 0;
...
@@ -70,7 +77,7 @@ page{
...
@@ -70,7 +77,7 @@ page{
margin-left: 8rpx;
margin-left: 8rpx;
}
}
.price-wrap{
.price-wrap{
display: inline-block
;
flex: 1
;
}
}
.product-name{
.product-name{
color: #333333;
color: #333333;
...
...
src/utils/util.js
View file @
609c150a
...
@@ -285,8 +285,7 @@ const formatNumber = n => {
...
@@ -285,8 +285,7 @@ const formatNumber = n => {
}
}
function
_getUserInfo
(
ev
)
{
function
_getUserInfo
(
ev
)
{
console
.
log
(
'iiiiiiiiiiiiii'
,
ev
)
const
userInfo
=
ev
.
detail
||
ev
const
userInfo
=
ev
.
detail
return
getUserInfoByBtn
(
userInfo
).
then
((
data
=
{})
=>
{
return
getUserInfoByBtn
(
userInfo
).
then
((
data
=
{})
=>
{
const
{
token
}
=
data
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
...
...
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