Commit 07420f06 authored by usgeek's avatar usgeek Committed by linlinjava
Browse files

goods页面微调,登陆按钮微调

parent cca55492
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="c"> <view class="c">
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" /> <image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
<text>还没有登录</text> <text>还没有登录</text>
<button type="primary" plain="true" bindtap="goLogin">去登录</button> <button style="background-color:#A9A9A9" bindtap="goLogin">去登录</button>
</view> </view>
</view> </view>
<view class='login' wx:else> <view class='login' wx:else>
......
...@@ -41,6 +41,17 @@ Page({ ...@@ -41,6 +41,17 @@ Page({
path: '/pages/index/index?goodId=' + this.data.id path: '/pages/index/index?goodId=' + this.data.id
} }
}, },
shareFriendOrCircle: function () {
//var that = this;
if (this.data.openShare === false) {
this.setData({
openShare: !this.data.openShare
});
} else {
return false;
}
},
// 保存分享图 // 保存分享图
saveShare: function() { saveShare: function() {
......
<view class="container"> <view class="container">
<swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000"> <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
<swiper-item wx:for="{{goods.gallery}}" wx:key="*this"> <swiper-item wx:for="{{goods.gallery}}" wx:key="*this">
<image src="{{item}}" background-size="cover"></image> <image src="{{item}}" background-size="cover"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 分享 --> <!-- 分享 -->
<view class='goods_name'> <view class='goods_name'>
<view class='goods_name_left'>{{goods.name}}</view> <view class='goods_name_left'>{{goods.name}}</view>
<view class="goods_name_right" bindtap="shareFriendOrCircle">分享</view> <view class="goods_name_right" bindtap="shareFriendOrCircle">分享</view>
...@@ -26,169 +26,168 @@ ...@@ -26,169 +26,168 @@
</view> </view>
</view> </view>
</view> </view>
<view class="goods-info">
<view class="c"> <view class="goods-info">
<text class="name">{{goods.name}}</text> <view class="c">
<text class="desc">{{goods.goodsBrief}}</text> <text class="desc">{{goods.goodsBrief}}</text>
<view class="price"> <view class="price">
<view class="counterPrice">原价:¥{{goods.counterPrice}}</view> <view class="counterPrice">原价:¥{{goods.counterPrice}}</view>
<view class="retailPrice">现价:¥{{checkedSpecPrice}}</view> <view class="retailPrice">现价:¥{{checkedSpecPrice}}</view>
</view> </view>
<view class="brand" wx:if="{{brand.name}}"> <view class="brand" wx:if="{{brand.name}}">
<navigator url="../brandDetail/brandDetail?id={{brand.id}}"> <navigator url="../brandDetail/brandDetail?id={{brand.id}}">
<text>{{brand.name}}</text> <text>{{brand.name}}</text>
</navigator> </navigator>
</view> </view>
</view>
</view> </view>
</view> <view class="section-nav section-attr" bindtap="switchAttrPop">
<view class="section-nav section-attr" bindtap="switchAttrPop"> <view class="t">{{checkedSpecText}}</view>
<view class="t">{{checkedSpecText}}</view> <image class="i" src="/static/images/address_right.png" background-size="cover"></image>
<image class="i" src="/static/images/address_right.png" background-size="cover"></image>
</view>
<view class="comments" wx:if="{{comment.count > 0}}">
<view class="h">
<navigator url="/pages/comment/comment?valueId={{goods.id}}&type=0">
<text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
<text class="i">查看全部</text>
</navigator>
</view> </view>
<view class="b"> <view class="comments" wx:if="{{comment.count > 0}}">
<view class="item" wx:for="{{comment.data}}" wx:key="id"> <view class="h">
<view class="info"> <navigator url="/pages/comment/comment?valueId={{goods.id}}&type=0">
<view class="user"> <text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
<image src="{{item.avatar}}"></image> <text class="i">查看全部</text>
<text>{{item.nickname}}</text> </navigator>
</view>
<view class="time">{{item.addTime}}</view>
</view> </view>
<view class="content"> <view class="b">
{{item.content}} <view class="item" wx:for="{{comment.data}}" wx:key="id">
</view> <view class="info">
<view class="imgs" wx:if="{{item.picList.length > 0}}"> <view class="user">
<image class="img" wx:for="{{item.picList}}" wx:key="*this" wx:for-item="iitem" src="{{iitem}} "></image> <image src="{{item.avatar}}"></image>
<text>{{item.nickname}}</text>
</view>
<view class="time">{{item.addTime}}</view>
</view>
<view class="content">
{{item.content}}
</view>
<view class="imgs" wx:if="{{item.picList.length > 0}}">
<image class="img" wx:for="{{item.picList}}" wx:key="*this" wx:for-item="iitem" src="{{iitem}} "></image>
</view>
</view>
</view> </view>
</view>
</view> </view>
</view> <view class="goods-attr">
<view class="goods-attr"> <view class="t">商品参数</view>
<view class="t">商品参数</view> <view class="l">
<view class="l"> <view class="item" wx:for="{{attribute}}" wx:key="name">
<view class="item" wx:for="{{attribute}}" wx:key="name"> <text class="left">{{item.attribute}}</text>
<text class="left">{{item.attribute}}</text> <text class="right">{{item.value}}</text>
<text class="right">{{item.value}}</text> </view>
</view> </view>
</view> </view>
</view>
<view class="detail"> <view class="detail">
<import src="/lib/wxParse/wxParse.wxml" /> <import src="/lib/wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" /> <template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
</view>
<view class="common-problem">
<view class="h">
<view class="line"></view>
<text class="title">常见问题</text>
</view> </view>
<view class="b">
<view class="item" wx:for="{{issueList}}" wx:key="id"> <view class="common-problem">
<view class="question-box"> <view class="h">
<text class="spot"></text> <view class="line"></view>
<text class="question">{{item.question}}</text> <text class="title">常见问题</text>
</view> </view>
<view class="answer"> <view class="b">
{{item.answer}} <view class="item" wx:for="{{issueList}}" wx:key="id">
<view class="question-box">
<text class="spot"></text>
<text class="question">{{item.question}}</text>
</view>
<view class="answer">
{{item.answer}}
</view>
</view>
</view> </view>
</view>
</view> </view>
</view>
<!-- 大家都在看 --> <!-- 大家都在看 -->
<view class="related-goods" wx:if="{{relatedGoods.length > 0}}"> <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
<view class="h"> <view class="h">
<view class="line"></view> <view class="line"></view>
<text class="title">大家都在看</text> <text class="title">大家都在看</text>
</view> </view>
<view class="b"> <view class="b">
<view class="item" wx:for="{{relatedGoods}}" wx:key="id"> <view class="item" wx:for="{{relatedGoods}}" wx:key="id">
<navigator url="/pages/goods/goods?id={{item.id}}"> <navigator url="/pages/goods/goods?id={{item.id}}">
<image class="img" src="{{item.picUrl}}" background-size="cover"></image> <image class="img" src="{{item.picUrl}}" background-size="cover"></image>
<text class="name">{{item.name}}</text> <text class="name">{{item.name}}</text>
<text class="price">¥{{item.retailPrice}}</text> <text class="price">¥{{item.retailPrice}}</text>
</navigator> </navigator>
</view> </view>
</view>
</view> </view>
</view>
</view> </view>
<!-- 规格选择界面 --> <!-- 规格选择界面 -->
<view class="attr-pop-box" hidden="{{!openAttr}}"> <view class="attr-pop-box" hidden="{{!openAttr}}">
<view class="attr-pop"> <view class="attr-pop">
<view class="close" bindtap="closeAttr"> <view class="close" bindtap="closeAttr">
<image class="icon" src="/static/images/icon_close.png"></image> <image class="icon" src="/static/images/icon_close.png"></image>
</view>
<view class="img-info">
<image class="img" src="{{goods.picUrl}}"></image>
<view class="info">
<view class="c">
<view class="p">价格:¥{{checkedSpecPrice}}</view>
<view class="a">{{tmpSpecText}}</view>
</view> </view>
</view> <view class="img-info">
</view> <image class="img" src="{{goods.picUrl}}"></image>
<view class="info">
<!-- 规格列表 --> <view class="c">
<view class="spec-con"> <view class="p">价格:¥{{checkedSpecPrice}}</view>
<view class="spec-item" wx:for="{{specificationList}}" wx:key="name"> <view class="a">{{tmpSpecText}}</view>
<view class="name">{{item.name}}</view> </view>
<view class="values"> </view>
<view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">{{vitem.value}}</view>
</view> </view>
</view>
<view class="spec-con" wx:if="{{groupon.length > 0}}"> <!-- 规格列表 -->
<view class="spec-item"> <view class="spec-con">
<view class="name">团购立减</view> <view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
<view class="values"> <view class="name">{{item.name}}</view>
<view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">¥{{vitem.discount}} ({{vitem.discountMember}}人)</view> <view class="values">
</view> <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">{{vitem.value}}</view>
</view> </view>
</view> </view>
<!-- 数量 --> <view class="spec-con" wx:if="{{groupon.length > 0}}">
<view class="number-item"> <view class="spec-item">
<view class="name">数量</view> <view class="name">团购立减</view>
<view class="selnum"> <view class="values">
<view class="cut" bindtap="cutNumber">-</view> <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickGroupon" wx:for="{{groupon}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">¥{{vitem.discount}} ({{vitem.discountMember}}人)</view>
<input value="{{number}}" class="number" disabled="true" type="number" /> </view>
<view class="add" bindtap="addNumber">+</view> </view>
</view> </view>
</view>
<!-- 数量 -->
<view class="number-item">
<view class="name">数量</view>
<view class="selnum">
<view class="cut" bindtap="cutNumber">-</view>
<input value="{{number}}" class="number" disabled="true" type="number" />
<view class="add" bindtap="addNumber">+</view>
</view>
</view>
</view>
</view> </view>
</view>
</view> </view>
<!-- 联系客服 --> <!-- 联系客服 -->
<view class="contact"> <view class="contact">
<contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="27"> <contact-button style="opacity:0;position:absolute;" type="default-dark" session-from="weapp" size="27">
</contact-button> </contact-button>
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="bottom-btn"> <view class="bottom-btn">
<view class="l l-collect" bindtap="addCollectOrNot" wx:if="{{!isGroupon}}"> <view class="l l-collect" bindtap="addCollectOrNot" wx:if="{{!isGroupon}}">
<image class="icon" src="{{ collectImage }}"></image> <image class="icon" src="{{ collectImage }}"></image>
</view> </view>
<view class="l l-cart" wx:if="{{!isGroupon}}"> <view class="l l-cart" wx:if="{{!isGroupon}}">
<view class="box"> <view class="box">
<text class="cart-count">{{cartGoodsCount}}</text> <text class="cart-count">{{cartGoodsCount}}</text>
<image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image> <image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image>
</view>
</view> </view>
</view> <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view>
<view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view> <view class="c" bindtap="addFast" wx:if="{{!soldout}}">{{isGroupon?'参加团购':'立即购买'}}</view>
<view class="c" bindtap="addFast" wx:if="{{!soldout}}">{{isGroupon?'参加团购':'立即购买'}}</view> <view class="n" wx:if="{{soldout}}">商品已售空</view>
<view class="n" wx:if="{{soldout}}">商品已售空</view>
</view> </view>
\ No newline at end of file
...@@ -12,6 +12,30 @@ ...@@ -12,6 +12,30 @@
height: 750rpx; height: 750rpx;
} }
.commodity_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.2;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.commodity_attr_box {
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding-top: 20rpx;
}
/* .service-policy { /* .service-policy {
width: 750rpx; width: 750rpx;
height: 73rpx; height: 73rpx;
...@@ -52,14 +76,47 @@ ...@@ -52,14 +76,47 @@
.goods-info .c text { .goods-info .c text {
display: block; display: block;
width: 687.5rpx; width: 687.5rpx;
text-align: center; text-align: left;
} }
.goods-info .name { .goods_name {
height: 41rpx; /* border: 1px solid black; */
margin-bottom: 5.208rpx; height: 86rpx;
font-size: 41rpx; line-height: 86rpx;
line-height: 41rpx; border-bottom: 1px solid #fafafa;
}
.goods_name_left {
/* border: 1px solid #757575; */
float: left;
height: 86rpx;
font-weight: 550;
line-height: 86rpx;
margin-left: 35rpx;
font-size: 38rpx;
letter-spacing: 1rpx;
}
.goods_name_right {
float: right;
font-weight: 550;
margin-top: 28rpx;
width: 140rpx;
height: 80rpx;
line-height: 82rpx;
padding: 0;
margin: 0;
margin-right: 0rpx;
text-align: center;
font-size: 25rpx;
color: #f4f4f4;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-top-right-radius: 0rpx;
border-bottom-right-radius: 0rpx;
letter-spacing: 3rpx;
/* background-image: linear-gradient(to right, #ff7701 100%); */
background-image: linear-gradient(to right, #9a9ba1 0%, #9a9ba1 100%);
} }
.goods-info .desc { .goods-info .desc {
...@@ -71,29 +128,28 @@ ...@@ -71,29 +128,28 @@
} }
.goods-info .price { .goods-info .price {
height: 70rpx; height: 70rpx;
align-content: center; align-content: center;
} }
.goods-info .counterPrice { .goods-info .counterPrice {
float: left; float: left;
padding-left: 120rpx; padding-left: 0rpx;
text-decoration: line-through; text-decoration: line-through;
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
} }
.goods-info .retailPrice { .goods-info .retailPrice {
/* float: right; */ padding-left: 5%;
padding-left: 60rpx; font-size: 30rpx;
font-size: 30rpx; color: #a78845;
color: #a78845;
} }
.goods-info .brand { .goods-info .brand {
margin-top: 23rpx; margin-top: 23rpx;
min-height: 40rpx; min-height: 40rpx;
text-align: center; text-align: left;
} }
.goods-info .brand text { .goods-info .brand text {
...@@ -431,7 +487,7 @@ ...@@ -431,7 +487,7 @@
width: 750rpx; width: 750rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
padding-bottom: 80rpx; padding-bottom: 80rpx;
} }
.related-goods .h { .related-goods .h {
...@@ -601,7 +657,7 @@ ...@@ -601,7 +657,7 @@
.bottom-btn .c { .bottom-btn .c {
float: left; float: left;
background: #f48f18; background: #b4282d;
height: 100rpx; height: 100rpx;
line-height: 96rpx; line-height: 96rpx;
flex: 1; flex: 1;
...@@ -611,8 +667,8 @@ ...@@ -611,8 +667,8 @@
} }
.bottom-btn .r { .bottom-btn .r {
border: 1px solid #b4282d; border: 1px solid #f48f18;
background: #b4282d; background: #f48f18;
float: left; float: left;
height: 100rpx; height: 100rpx;
line-height: 96rpx; line-height: 96rpx;
...@@ -767,71 +823,20 @@ ...@@ -767,71 +823,20 @@
line-height: 65rpx; line-height: 65rpx;
} }
.contact { .contact {
height: 100rpx; height: 100rpx;
width: 100rpx; width: 100rpx;
background-color: #008000;
border-radius: 100%; border-radius: 100%;
position: fixed; position: fixed;
bottom: 150rpx; bottom: 96rpx;
right: 20rpx; right: 10rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 9;
flex-direction: column;
/*line-height: 100rpx;
text-align: center;
padding-top: 26rpx;*/
font-size: 20rpx; font-size: 20rpx;
color: #008000;
box-sizing: border-box; box-sizing: border-box;
background: url("https://litemall.oss-cn-shenzhen.aliyuncs.com/kefu.png") no-repeat center 21rpx; background: url("https://litemall.oss-cn-shenzhen.aliyuncs.com/kefu.png") no-repeat center 21rpx;
background-size: 55rpx auto; background-size: 55rpx auto;
} }
/*分享样式*/
.goods_name {
/* border: 1px solid black; */
height: 86rpx;
line-height: 86rpx;
border-bottom: 1px solid #fafafa;
}
.goods_name_left {
/* border: 1px solid #757575; */
float: left;
height: 86rpx;
font-weight: 550;
line-height: 86rpx;
margin-left: 35rpx;
font-size: 38rpx;
letter-spacing: 1rpx;
}
.goods_name_right {
float: right;
font-weight: 550;
margin-top: 28rpx;
width: 140rpx;
height: 80rpx;
line-height: 82rpx;
padding: 0;
margin: 0;
margin-right: 0rpx;
text-align: center;
font-size: 25rpx;
color: #f4f4f4;
border-top-left-radius: 50rpx;
border-bottom-left-radius: 50rpx;
border-top-right-radius: 0rpx;
border-bottom-right-radius: 0rpx;
letter-spacing: 3rpx;
/* background-image: linear-gradient(to right, #ff7701 100%); */
background-image: linear-gradient(to right, #9a9ba1 0%, #9a9ba1 100%);
}
.share-pop-box { .share-pop-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment