Commit 286c0ae7 authored by Junling Bu's avatar Junling Bu
Browse files

chore[renard-wx]: 基于微信开发者工具的格式化代码

parent 20b97ec8
page {
min-height: 100%;
background-color: #f4f4f4;
min-height: 100%;
background-color: #f4f4f4;
}
.container {
min-height: 100%;
background-color: #f4f4f4;
min-height: 100%;
background-color: #f4f4f4;
}
.search-header {
position: fixed;
top: 0;
width: 750rpx;
height: 91rpx;
display: flex;
background: #fff;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
padding: 0 31.25rpx;
font-size: 29rpx;
color: #333;
position: fixed;
top: 0;
width: 750rpx;
height: 91rpx;
display: flex;
background: #fff;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
padding: 0 31.25rpx;
font-size: 29rpx;
color: #333;
}
.search-header .input-box {
position: relative;
margin-top: 16rpx;
float: left;
width: 0;
flex: 1;
height: 59rpx;
line-height: 59rpx;
padding: 0 20rpx;
background: #f4f4f4;
position: relative;
margin-top: 16rpx;
float: left;
width: 0;
flex: 1;
height: 59rpx;
line-height: 59rpx;
padding: 0 20rpx;
background: #f4f4f4;
}
.search-header .icon {
position: absolute;
top: 14rpx;
left: 20rpx;
width: 31rpx;
height: 31rpx;
position: absolute;
top: 14rpx;
left: 20rpx;
width: 31rpx;
height: 31rpx;
}
.search-header .del {
position: absolute;
top: 3rpx;
right: 10rpx;
width: 53rpx;
height: 53rpx;
z-index: 10;
position: absolute;
top: 3rpx;
right: 10rpx;
width: 53rpx;
height: 53rpx;
z-index: 10;
}
.search-header .keywrod {
position: absolute;
top: 0;
left: 40rpx;
width: 506rpx;
height: 59rpx;
padding-left: 30rpx;
position: absolute;
top: 0;
left: 40rpx;
width: 506rpx;
height: 59rpx;
padding-left: 30rpx;
}
.search-header .right {
margin-top: 24rpx;
margin-left: 31rpx;
margin-right: 6rpx;
width: 58rpx;
height: 43rpx;
line-height: 43rpx;
float: right;
margin-top: 24rpx;
margin-left: 31rpx;
margin-right: 6rpx;
width: 58rpx;
height: 43rpx;
line-height: 43rpx;
float: right;
}
.no-search {
height: auto;
overflow: hidden;
margin-top: 91rpx;
height: auto;
overflow: hidden;
margin-top: 91rpx;
}
.search-keywords {
background: #fff;
width: 750rpx;
height: auto;
overflow: hidden;
margin-bottom: 20rpx;
background: #fff;
width: 750rpx;
height: auto;
overflow: hidden;
margin-bottom: 20rpx;
}
.search-keywords .h {
padding: 0 31.25rpx;
height: 93rpx;
line-height: 93rpx;
width: 100%;
color: #999;
font-size: 29rpx;
padding: 0 31.25rpx;
height: 93rpx;
line-height: 93rpx;
width: 100%;
color: #999;
font-size: 29rpx;
}
.search-keywords .title {
display: block;
width: 120rpx;
float: left;
display: block;
width: 120rpx;
float: left;
}
.search-keywords .icon {
margin-top: 19rpx;
float: right;
display: block;
margin-left: 511rpx;
height: 55rpx;
width: 55rpx;
margin-top: 19rpx;
float: right;
display: block;
margin-left: 511rpx;
height: 55rpx;
width: 55rpx;
}
.search-keywords .b {
width: 750rpx;
height: auto;
overflow: hidden;
padding-left: 31.25rpx;
width: 750rpx;
height: auto;
overflow: hidden;
padding-left: 31.25rpx;
}
.search-keywords .item {
display: inline-block;
width: auto;
height: 48rpx;
line-height: 48rpx;
padding: 0 15rpx;
border: 1px solid #999;
margin: 0 31.25rpx 31.25rpx 0;
font-size: 24rpx;
color: #333;
display: inline-block;
width: auto;
height: 48rpx;
line-height: 48rpx;
padding: 0 15rpx;
border: 1px solid #999;
margin: 0 31.25rpx 31.25rpx 0;
font-size: 24rpx;
color: #333;
}
.search-keywords .item.active {
color: #a78845;
border: 1px solid #a78845;
color: #a78845;
border: 1px solid #a78845;
}
.shelper-list {
width: 750rpx;
height: auto;
overflow: hidden;
background: #fff;
padding: 0 31.25rpx;
width: 750rpx;
height: auto;
overflow: hidden;
background: #fff;
padding: 0 31.25rpx;
}
.shelper-list .item {
height: 93rpx;
width: 687.5rpx;
line-height: 93rpx;
font-size: 24rpx;
color: #333;
border-bottom: 1px solid #f4f4f4;
height: 93rpx;
width: 687.5rpx;
line-height: 93rpx;
font-size: 24rpx;
color: #333;
border-bottom: 1px solid #f4f4f4;
}
.sort {
position: fixed;
top: 91rpx;
background: #fff;
width: 100%;
height: 78rpx;
position: fixed;
top: 91rpx;
background: #fff;
width: 100%;
height: 78rpx;
}
.sort-box {
background: #fff;
width: 100%;
height: 78rpx;
overflow: hidden;
padding: 0 30rpx;
display: flex;
border-bottom: 1px solid #d9d9d9;
background: #fff;
width: 100%;
height: 78rpx;
overflow: hidden;
padding: 0 30rpx;
display: flex;
border-bottom: 1px solid #d9d9d9;
}
.sort-box .item {
height: 78rpx;
line-height: 78rpx;
text-align: center;
flex: 1;
color: #333;
font-size: 30rpx;
height: 78rpx;
line-height: 78rpx;
text-align: center;
flex: 1;
color: #333;
font-size: 30rpx;
}
.sort-box .item .txt {
display: block;
width: 100%;
height: 100%;
color: #333;
display: block;
width: 100%;
height: 100%;
color: #333;
}
.sort-box .item.active .txt {
color: #a78845;
color: #a78845;
}
.sort-box .item.by-price {
background: url(//yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-3127092a69.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
background: url(//yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-3127092a69.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
}
.sort-box .item.by-price.active.asc {
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/up-636b92c0a5.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/up-636b92c0a5.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
}
.sort-box .item.by-price.active.desc {
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/down-95e035f3e5.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/down-95e035f3e5.png) 155rpx center no-repeat;
background-size: 15rpx 21rpx;
}
.sort-box-category {
background: #fff;
width: 100%;
height: auto;
overflow: hidden;
padding: 40rpx 40rpx 0 0;
border-bottom: 1px solid #d9d9d9;
background: #fff;
width: 100%;
height: auto;
overflow: hidden;
padding: 40rpx 40rpx 0 0;
border-bottom: 1px solid #d9d9d9;
}
.sort-box-category .item {
height: 54rpx;
line-height: 54rpx;
text-align: center;
float: left;
padding: 0 16rpx;
margin: 0 0 40rpx 40rpx;
border: 1px solid #666;
color: #333;
font-size: 24rpx;
height: 54rpx;
line-height: 54rpx;
text-align: center;
float: left;
padding: 0 16rpx;
margin: 0 0 40rpx 40rpx;
border: 1px solid #666;
color: #333;
font-size: 24rpx;
}
.sort-box-category .item.active {
color: #a78845;
border: 1px solid #a78845;
color: #a78845;
border: 1px solid #a78845;
}
.cate-item {
margin-top: 175rpx;
height: auto;
overflow: hidden;
margin-top: 175rpx;
height: auto;
overflow: hidden;
}
.cate-item .h {
height: 145rpx;
width: 750rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 145rpx;
width: 750rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.cate-item .h .name {
display: block;
height: 35rpx;
margin-bottom: 18rpx;
font-size: 30rpx;
color: #333;
display: block;
height: 35rpx;
margin-bottom: 18rpx;
font-size: 30rpx;
color: #333;
}
.cate-item .h .desc {
display: block;
height: 24rpx;
font-size: 24rpx;
color: #999;
display: block;
height: 24rpx;
font-size: 24rpx;
color: #999;
}
.search-result-empty {
width: 100%;
height: 100%;
padding-top: 300rpx;
width: 100%;
height: 100%;
padding-top: 300rpx;
}
.search-result-empty .icon {
margin: 0 auto;
display: block;
width: 240rpx;
height: 240rpx;
margin: 0 auto;
display: block;
width: 240rpx;
height: 240rpx;
}
.search-result-empty .text {
display: block;
width: 100%;
height: 40rpx;
font-size: 28rpx;
text-align: center;
color: #999;
display: block;
width: 100%;
height: 40rpx;
font-size: 28rpx;
text-align: center;
color: #999;
}
......@@ -4,170 +4,170 @@ var api = require('../../../config/api.js');
var app = getApp();
Page({
data: {
checkedGoodsList: [],
checkedAddress: {},
checkedCoupon: [],
goodsTotalPrice: 0.00, //商品总价
freightPrice: 0.00, //快递费
couponPrice: 0.00, //优惠券的价格
grouponPrice: 0.00, //团购优惠价格
orderTotalPrice: 0.00, //订单总价
actualPrice: 0.00, //实际需要支付的总价
cartId: 0,
addressId: 0,
couponId: 0,
grouponLinkId: 0, //参与的团购,如果是发起则为0
grouponRulesId: 0 //团购规则ID
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
},
data: {
checkedGoodsList: [],
checkedAddress: {},
checkedCoupon: [],
goodsTotalPrice: 0.00, //商品总价
freightPrice: 0.00, //快递费
couponPrice: 0.00, //优惠券的价格
grouponPrice: 0.00, //团购优惠价格
orderTotalPrice: 0.00, //订单总价
actualPrice: 0.00, //实际需要支付的总价
cartId: 0,
addressId: 0,
couponId: 0,
grouponLinkId: 0, //参与的团购,如果是发起则为0
grouponRulesId: 0 //团购规则ID
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
},
//获取checkou信息
getCheckoutInfo: function() {
let that = this;
util.request(api.CartCheckout, {
cartId: that.data.cartId,
addressId: that.data.addressId,
couponId: that.data.couponId,
grouponRulesId: that.data.grouponRulesId
}).then(function(res) {
if (res.errno === 0) {
that.setData({
checkedGoodsList: res.data.checkedGoodsList,
checkedAddress: res.data.checkedAddress,
actualPrice: res.data.actualPrice,
checkedCoupon: res.data.checkedCoupon,
couponPrice: res.data.couponPrice,
grouponPrice: res.data.grouponPrice,
freightPrice: res.data.freightPrice,
goodsTotalPrice: res.data.goodsTotalPrice,
orderTotalPrice: res.data.orderTotalPrice,
addressId: res.data.addressId,
couponId: res.data.couponId,
grouponRulesId: res.data.grouponRulesId,
//获取checkou信息
getCheckoutInfo: function() {
let that = this;
util.request(api.CartCheckout, {
cartId: that.data.cartId,
addressId: that.data.addressId,
couponId: that.data.couponId,
grouponRulesId: that.data.grouponRulesId
}).then(function(res) {
if (res.errno === 0) {
that.setData({
checkedGoodsList: res.data.checkedGoodsList,
checkedAddress: res.data.checkedAddress,
actualPrice: res.data.actualPrice,
checkedCoupon: res.data.checkedCoupon,
couponPrice: res.data.couponPrice,
grouponPrice: res.data.grouponPrice,
freightPrice: res.data.freightPrice,
goodsTotalPrice: res.data.goodsTotalPrice,
orderTotalPrice: res.data.orderTotalPrice,
addressId: res.data.addressId,
couponId: res.data.couponId,
grouponRulesId: res.data.grouponRulesId,
});
}
wx.hideLoading();
});
}
wx.hideLoading();
});
},
selectAddress() {
wx.navigateTo({
url: '/pages/ucenter/address/address',
})
},
onReady: function() {
// 页面渲染完成
},
selectAddress() {
wx.navigateTo({
url: '/pages/ucenter/address/address',
})
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
wx.showLoading({
title: '加载中...',
});
try {
var cartId = wx.getStorageSync('cartId');
if (cartId) {
this.setData({
'cartId': cartId
},
onShow: function() {
// 页面显示
wx.showLoading({
title: '加载中...',
});
}
try {
var cartId = wx.getStorageSync('cartId');
if (cartId) {
this.setData({
'cartId': cartId
});
}
var addressId = wx.getStorageSync('addressId');
if (addressId) {
this.setData({
'addressId': addressId
});
}
var addressId = wx.getStorageSync('addressId');
if (addressId) {
this.setData({
'addressId': addressId
});
}
var couponId = wx.getStorageSync('couponId');
if (couponId) {
this.setData({
'couponId': couponId
});
}
var couponId = wx.getStorageSync('couponId');
if (couponId) {
this.setData({
'couponId': couponId
});
}
var grouponRulesId = wx.getStorageSync('grouponRulesId');
if (grouponRulesId) {
this.setData({
'grouponRulesId': grouponRulesId
});
}
var grouponRulesId = wx.getStorageSync('grouponRulesId');
if (grouponRulesId) {
this.setData({
'grouponRulesId': grouponRulesId
});
}
var grouponLinkId = wx.getStorageSync('grouponLinkId');
if (grouponLinkId) {
this.setData({
'grouponLinkId': grouponLinkId
});
}
} catch (e) {
// Do something when catch error
console.log(e);
}
var grouponLinkId = wx.getStorageSync('grouponLinkId');
if (grouponLinkId) {
this.setData({
'grouponLinkId': grouponLinkId
});
}
} catch (e) {
// Do something when catch error
console.log(e);
}
this.getCheckoutInfo();
},
onHide: function() {
// 页面隐藏
this.getCheckoutInfo();
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
onUnload: function() {
// 页面关闭
},
submitOrder: function() {
if (this.data.addressId <= 0) {
util.showErrorToast('请选择收货地址');
return false;
}
util.request(api.OrderSubmit, {
cartId: this.data.cartId,
addressId: this.data.addressId,
couponId: this.data.couponId,
grouponRulesId: this.data.grouponRulesId,
grouponLinkId: this.data.grouponLinkId
}, 'POST').then(res => {
if (res.errno === 0) {
const orderId = res.data.orderId;
util.request(api.OrderPrepay, {
orderId: orderId
}, 'POST').then(function(res) {
if (res.errno === 0) {
const payParam = res.data;
console.log("支付过程开始");
wx.requestPayment({
'timeStamp': payParam.timeStamp,
'nonceStr': payParam.nonceStr,
'package': payParam.packageValue,
'signType': payParam.signType,
'paySign': payParam.paySign,
'success': function(res) {
console.log("支付过程成功");
wx.redirectTo({
url: '/pages/payResult/payResult?status=1&orderId=' + orderId
},
submitOrder: function() {
if (this.data.addressId <= 0) {
util.showErrorToast('请选择收货地址');
return false;
}
util.request(api.OrderSubmit, {
cartId: this.data.cartId,
addressId: this.data.addressId,
couponId: this.data.couponId,
grouponRulesId: this.data.grouponRulesId,
grouponLinkId: this.data.grouponLinkId
}, 'POST').then(res => {
if (res.errno === 0) {
const orderId = res.data.orderId;
util.request(api.OrderPrepay, {
orderId: orderId
}, 'POST').then(function(res) {
if (res.errno === 0) {
const payParam = res.data;
console.log("支付过程开始");
wx.requestPayment({
'timeStamp': payParam.timeStamp,
'nonceStr': payParam.nonceStr,
'package': payParam.packageValue,
'signType': payParam.signType,
'paySign': payParam.paySign,
'success': function(res) {
console.log("支付过程成功");
wx.redirectTo({
url: '/pages/payResult/payResult?status=1&orderId=' + orderId
});
},
'fail': function(res) {
console.log("支付过程失败");
wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
});
},
'complete': function(res) {
console.log("支付过程结束")
}
});
} else {
wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
});
}
});
},
'fail': function(res) {
console.log("支付过程失败");
wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
});
},
'complete': function(res) {
console.log("支付过程结束")
}
});
} else {
wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
});
}
});
} else {
util.showErrorToast(res.errmsg);
}
});
}
} else {
util.showErrorToast(res.errmsg);
}
});
}
});
\ No newline at end of file
<view class="container">
<view class="address-box">
<view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
<view class="l">
<text class="name">{{checkedAddress.name}}</text>
<text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text>
</view>
<view class="m">
<text class="mobile">{{checkedAddress.mobile}}</text>
<text class="address">{{checkedAddress.address}}</text>
</view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
</view>
<view class="address-item address-empty" bindtap="selectAddress" wx:else>
<view class="m">
还没有收货地址,去添加
</view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
<view class="address-box">
<view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
<view class="l">
<text class="name">{{checkedAddress.name}}</text>
<text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text>
</view>
<view class="m">
<text class="mobile">{{checkedAddress.mobile}}</text>
<text class="address">{{checkedAddress.address}}</text>
</view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
</view>
<view class="address-item address-empty" bindtap="selectAddress" wx:else>
<view class="m">
还没有收货地址,去添加
</view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
</view>
</view>
</view>
<view class="order-box">
<view class="order-item">
<view class="l">
<text class="name">商品合计</text>
</view>
<view class="r">
<text class="txt">¥ {{goodsTotalPrice}}元</text>
</view>
</view>
<view class="order-item">
<view class="l">
<text class="name">运费</text>
</view>
<view class="r">
<text class="txt">¥ {{freightPrice}}元</text>
</view>
<view class="order-box">
<view class="order-item">
<view class="l">
<text class="name">商品合计</text>
</view>
<view class="r">
<text class="txt">¥ {{goodsTotalPrice}}元</text>
</view>
</view>
<view class="order-item">
<view class="l">
<text class="name">运费</text>
</view>
<view class="r">
<text class="txt">¥ {{freightPrice}}元</text>
</view>
</view>
</view>
</view>
<view class="goods-items">
<view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
<view class="img">
<image src="{{item.picUrl}}"></image>
</view>
<view class="info">
<view class="t">
<text class="name">{{item.goodsName}}</text>
<text class="number">x{{item.number}}</text>
<view class="goods-items">
<view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
<view class="img">
<image src="{{item.picUrl}}"></image>
</view>
<view class="info">
<view class="t">
<text class="name">{{item.goodsName}}</text>
<text class="number">x{{item.number}}</text>
</view>
<view class="m">{{item.specifications}}</view>
<view class="b">¥{{item.price}}</view>
</view>
</view>
<view class="m">{{item.specifications}}</view>
<view class="b">¥{{item.price}}</view>
</view>
</view>
</view>
<view class="order-total">
<view class="l">实付:¥{{actualPrice}}</view>
<view class="r" bindtap="submitOrder">去付款</view>
</view>
<view class="order-total">
<view class="l">实付:¥{{actualPrice}}</view>
<view class="r" bindtap="submitOrder">去付款</view>
</view>
</view>
\ No newline at end of file
page{
height: 100%;
background: #f4f4f4;
page {
height: 100%;
background: #f4f4f4;
}
.address-box{
width: 100%;
height: 166.55rpx;
background: url('http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png') 0 0 repeat-x;
background-size: 62.5rpx 10.5rpx;
margin-bottom: 20rpx;
padding-top: 10.5rpx;
.address-box {
width: 100%;
height: 166.55rpx;
background: url('http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png') 0 0 repeat-x;
background-size: 62.5rpx 10.5rpx;
margin-bottom: 20rpx;
padding-top: 10.5rpx;
}
.address-item{
display: flex;
height: 155.55rpx;
background: #fff;
padding: 41.6rpx 0 41.6rpx 31.25rpx;
.address-item {
display: flex;
height: 155.55rpx;
background: #fff;
padding: 41.6rpx 0 41.6rpx 31.25rpx;
}
.address-item.address-empty{
.address-item.address-empty {
line-height: 75rpx;
text-align: center;
}
.address-box .l{
width: 125rpx;
height: 100%;
.address-box .l {
width: 125rpx;
height: 100%;
}
.address-box .l .name{
margin-left: 6.25rpx;
margin-top: -7.25rpx;
display: block;
width: 125rpx;
height: 43rpx;
line-height: 43rpx;
font-size: 30rpx;
color: #333;
margin-bottom: 5rpx;
.address-box .l .name {
margin-left: 6.25rpx;
margin-top: -7.25rpx;
display: block;
width: 125rpx;
height: 43rpx;
line-height: 43rpx;
font-size: 30rpx;
color: #333;
margin-bottom: 5rpx;
}
.address-box .l .default{
margin-left: 6.25rpx;
display: block;
width: 62rpx;
height: 33rpx;
border-radius: 5rpx;
border: 1px solid #b4282d;
font-size: 20.5rpx;
text-align: center;
line-height: 29rpx;
color: #b4282d;
.address-box .l .default {
margin-left: 6.25rpx;
display: block;
width: 62rpx;
height: 33rpx;
border-radius: 5rpx;
border: 1px solid #b4282d;
font-size: 20.5rpx;
text-align: center;
line-height: 29rpx;
color: #b4282d;
}
.address-box .m{
flex: 1;
height: 72.25rpx;
color: #999;
.address-box .m {
flex: 1;
height: 72.25rpx;
color: #999;
}
.address-box .mobile{
display: block;
height: 29rpx;
line-height: 29rpx;
margin-bottom: 6.25rpx;
font-size: 30rpx;
color:#333;
.address-box .mobile {
display: block;
height: 29rpx;
line-height: 29rpx;
margin-bottom: 6.25rpx;
font-size: 30rpx;
color: #333;
}
.address-box .address{
display: block;
height: 37.5rpx;
line-height: 37.5rpx;
font-size: 25rpx;
color:#666;
.address-box .address {
display: block;
height: 37.5rpx;
line-height: 37.5rpx;
font-size: 25rpx;
color: #666;
}
.address-box .r{
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
.address-box .r {
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
}
.address-box .r image{
width: 52.078rpx;
height: 52.078rpx;
.address-box .r image {
width: 52.078rpx;
height: 52.078rpx;
}
.coupon-box{
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
.coupon-box {
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
}
.coupon-box .coupon-item{
width: 100%;
height: 108.3rpx;
overflow: hidden;
background: #fff;
display: flex;
padding-left: 31.25rpx;
.coupon-box .coupon-item {
width: 100%;
height: 108.3rpx;
overflow: hidden;
background: #fff;
display: flex;
padding-left: 31.25rpx;
}
.coupon-box .l{
flex: 1;
height: 43rpx;
line-height: 43rpx;
padding-top: 35rpx;
.coupon-box .l {
flex: 1;
height: 43rpx;
line-height: 43rpx;
padding-top: 35rpx;
}
.coupon-box .l .name{
float: left;
font-size: 30rpx;
color: #666;
.coupon-box .l .name {
float: left;
font-size: 30rpx;
color: #666;
}
.coupon-box .l .txt{
float: right;
font-size: 30rpx;
color: #666;
.coupon-box .l .txt {
float: right;
font-size: 30rpx;
color: #666;
}
.coupon-box .r{
margin-top: 15.5rpx;
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
.coupon-box .r {
margin-top: 15.5rpx;
width: 77rpx;
height: 77rpx;
display: flex;
justify-content: center;
align-items: center;
}
.coupon-box .r image{
width: 52.078rpx;
height: 52.078rpx;
.coupon-box .r image {
width: 52.078rpx;
height: 52.078rpx;
}
.order-box{
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
.order-box {
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
}
.order-box .order-item{
height: 104.3rpx;
overflow: hidden;
background: #fff;
display: flex;
margin-left: 31.25rpx;
padding-right: 31.25rpx;
padding-top: 26rpx;
border-bottom: 1px solid #d9d9d9;
.order-box .order-item {
height: 104.3rpx;
overflow: hidden;
background: #fff;
display: flex;
margin-left: 31.25rpx;
padding-right: 31.25rpx;
padding-top: 26rpx;
border-bottom: 1px solid #d9d9d9;
}
.order-box .order-item .l{
float: left;
height: 52rpx;
width: 50%;
line-height: 52rpx;
overflow: hidden;
.order-box .order-item .l {
float: left;
height: 52rpx;
width: 50%;
line-height: 52rpx;
overflow: hidden;
}
.order-box .order-item .r{
float: right;
text-align: right;
width: 50%;
height: 52rpx;
line-height: 52rpx;
overflow: hidden;
.order-box .order-item .r {
float: right;
text-align: right;
width: 50%;
height: 52rpx;
line-height: 52rpx;
overflow: hidden;
}
.order-box .order-item.no-border{
border-bottom: none;
.order-box .order-item.no-border {
border-bottom: none;
}
.goods-items{
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
padding-left: 31.25rpx;
margin-bottom: 120rpx;
.goods-items {
margin-top: 20rpx;
width: 100%;
height: auto;
overflow: hidden;
background: #fff;
padding-left: 31.25rpx;
margin-bottom: 120rpx;
}
.goods-items .item{
height: 192rpx;
padding-right: 31.25rpx;
display: flex;
align-items: center;
border-bottom: 1px solid rgba(0,0,0,0.15);
.goods-items .item {
height: 192rpx;
padding-right: 31.25rpx;
display: flex;
align-items: center;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
.goods-items .item.no-border{
border-bottom: none;
.goods-items .item.no-border {
border-bottom: none;
}
.goods-items .item:last-child{
border-bottom: none;
.goods-items .item:last-child {
border-bottom: none;
}
.goods-items .img{
height: 145.83rpx;
width: 145.83rpx;
background-color: #f4f4f4;
margin-right: 20rpx;
.goods-items .img {
height: 145.83rpx;
width: 145.83rpx;
background-color: #f4f4f4;
margin-right: 20rpx;
}
.goods-items .img image{
height: 145.83rpx;
width: 145.83rpx;
.goods-items .img image {
height: 145.83rpx;
width: 145.83rpx;
}
.goods-items .info{
flex: 1;
height: 145.83rpx;
padding-top: 5rpx;
.goods-items .info {
flex: 1;
height: 145.83rpx;
padding-top: 5rpx;
}
.goods-items .t{
height: 33rpx;
line-height: 33rpx;
margin-bottom: 10rpx;
overflow: hidden;
font-size: 30rpx;
color: #333;
.goods-items .t {
height: 33rpx;
line-height: 33rpx;
margin-bottom: 10rpx;
overflow: hidden;
font-size: 30rpx;
color: #333;
}
.goods-items .t .name{
display: block;
float: left;
.goods-items .t .name {
display: block;
float: left;
}
.goods-items .t .number{
display: block;
float: right;
text-align: right;
.goods-items .t .number {
display: block;
float: right;
text-align: right;
}
.goods-items .m {
height: 29rpx;
overflow: hidden;
line-height: 29rpx;
margin-bottom: 25rpx;
font-size: 25rpx;
color: #666;
height: 29rpx;
overflow: hidden;
line-height: 29rpx;
margin-bottom: 25rpx;
font-size: 25rpx;
color: #666;
}
.goods-items .b {
height: 41rpx;
overflow: hidden;
line-height: 41rpx;
font-size: 30rpx;
color: #333;
}
.order-total{
position: fixed;
left:0;
bottom: 0;
height: 100rpx;
width: 100%;
display: flex;
}
.order-total .l{
flex: 1;
height: 100rpx;
line-height: 100rpx;
color: #a78845;
background: #fff;
font-size: 33rpx;
padding-left: 31.25rpx;
border-top: 1rpx solid rgba(0,0,0,0.2);
border-bottom: 1rpx solid rgba(0,0,0,0.2);
}
.order-total .r{
width: 233rpx;
height: 100rpx;
background: #a78845;
border: 1px solid #a78845;
line-height: 100rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
}
\ No newline at end of file
height: 41rpx;
overflow: hidden;
line-height: 41rpx;
font-size: 30rpx;
color: #333;
}
.order-total {
position: fixed;
left: 0;
bottom: 0;
height: 100rpx;
width: 100%;
display: flex;
}
.order-total .l {
flex: 1;
height: 100rpx;
line-height: 100rpx;
color: #a78845;
background: #fff;
font-size: 33rpx;
padding-left: 31.25rpx;
border-top: 1rpx solid rgba(0, 0, 0, 0.2);
border-bottom: 1rpx solid rgba(0, 0, 0, 0.2);
}
.order-total .r {
width: 233rpx;
height: 100rpx;
background: #a78845;
border: 1px solid #a78845;
line-height: 100rpx;
text-align: center;
color: #fff;
font-size: 30rpx;
}
......@@ -2,93 +2,93 @@ var util = require('../../utils/util.js');
var api = require('../../config/api.js');
var app = getApp()
Page({
data: {
topicList: [],
page: 1,
size: 10,
count: 0,
scrollTop: 0,
showPage: false
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
this.getTopic();
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
nextPage: function(event) {
var that = this;
if (this.data.page > that.data.count / that.data.size) {
return true;
}
data: {
topicList: [],
page: 1,
size: 10,
count: 0,
scrollTop: 0,
showPage: false
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
this.getTopic();
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
nextPage: function(event) {
var that = this;
if (this.data.page > that.data.count / that.data.size) {
return true;
}
that.setData({
page: that.data.page + 1
});
this.getTopic();
that.setData({
page: that.data.page + 1
});
},
this.getTopic();
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getTopic();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
getTopic: function() {
},
let that = this;
that.setData({
scrollTop: 0,
showPage: false,
topicList: []
});
// 页面渲染完成
wx.showToast({
title: '加载中...',
icon: 'loading',
duration: 2000
});
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getTopic();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
util.request(api.TopicList, {
page: that.data.page,
size: that.data.size
}).then(function(res) {
if (res.errno === 0) {
getTopic: function() {
let that = this;
that.setData({
scrollTop: 0,
topicList: res.data.data,
showPage: true,
count: res.data.count
scrollTop: 0,
showPage: false,
topicList: []
});
// 页面渲染完成
wx.showToast({
title: '加载中...',
icon: 'loading',
duration: 2000
});
}
wx.hideToast();
});
},
prevPage: function(event) {
if (this.data.page <= 1) {
return false;
}
util.request(api.TopicList, {
page: that.data.page,
size: that.data.size
}).then(function(res) {
if (res.errno === 0) {
var that = this;
that.setData({
page: that.data.page - 1
});
this.getTopic();
}
that.setData({
scrollTop: 0,
topicList: res.data.data,
showPage: true,
count: res.data.count
});
}
wx.hideToast();
});
},
prevPage: function(event) {
if (this.data.page <= 1) {
return false;
}
var that = this;
that.setData({
page: that.data.page - 1
});
this.getTopic();
}
})
\ No newline at end of file
<view class="container">
<scroll-view class="topic-list" scroll-y="true" scroll-top="{{scrollTop}}">
<navigator class="item" wx:for="{{topicList}}" wx:key="id" url="../topicDetail/topicDetail?id={{item.id}}">
<image class="img" src="{{item.picUrl}}"></image>
<view class="info">
<text class="title">{{item.title}}</text>
<text class="desc">{{item.subtitle}}</text>
<!-- <text class="price">{{item.price}}元起</text> -->
</view>
</navigator>
<view class="page" wx:if="{{showPage}}">
<view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
<view class="next {{ (count / size) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
</view>
</scroll-view>
<scroll-view class="topic-list" scroll-y="true" scroll-top="{{scrollTop}}">
<navigator class="item" wx:for="{{topicList}}" wx:key="id" url="../topicDetail/topicDetail?id={{item.id}}">
<image class="img" src="{{item.picUrl}}"></image>
<view class="info">
<text class="title">{{item.title}}</text>
<text class="desc">{{item.subtitle}}</text>
<!-- <text class="price">{{item.price}}元起</text> -->
</view>
</navigator>
<view class="page" wx:if="{{showPage}}">
<view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
<view class="next {{ (count / size) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
page ,.container{
width: 750rpx;
height: 100%;
overflow: hidden;
background: #f4f4f4;
}
.topic-list{
width: 750rpx;
height: 100%;
overflow: hidden;
background: #f4f4f4;
page, .container {
width: 750rpx;
height: 100%;
overflow: hidden;
background: #f4f4f4;
}
.topic-list .item{
width: 100%;
height: 625rpx;
overflow: hidden;
background: #fff;
margin-bottom: 20rpx;
.topic-list {
width: 750rpx;
height: 100%;
overflow: hidden;
background: #f4f4f4;
}
.topic-list .img{
width: 100%;
height: 415rpx;
.topic-list .item {
width: 100%;
height: 625rpx;
overflow: hidden;
background: #fff;
margin-bottom: 20rpx;
}
.topic-list .info{
width: 100%;
height: 210rpx;
overflow: hidden;
.topic-list .img {
width: 100%;
height: 415rpx;
}
.topic-list .title{
display: block;
text-align: center;
width: 100%;
height: 33rpx;
line-height: 35rpx;
color: #a78845;
overflow: hidden;
font-size: 35rpx;
margin-top: 30rpx;
.topic-list .info {
width: 100%;
height: 210rpx;
overflow: hidden;
}
.topic-list .desc{
display: block;
text-align: center;
position: relative;
width: auto;
height: 24rpx;
line-height: 24rpx;
overflow: hidden;
color: #999;
font-size: 24rpx;
margin-top: 16rpx;
margin-bottom: 30rpx;
.topic-list .title {
display: block;
text-align: center;
width: 100%;
height: 33rpx;
line-height: 35rpx;
color: #a78845;
overflow: hidden;
font-size: 35rpx;
margin-top: 30rpx;
}
.topic-list .price{
display: block;
text-align: center;
width: 100%;
height: 27rpx;
line-height: 27rpx;
overflow: hidden;
color: #b4282d;
font-size: 27rpx;
.topic-list .desc {
display: block;
text-align: center;
position: relative;
width: auto;
height: 24rpx;
line-height: 24rpx;
overflow: hidden;
color: #999;
font-size: 24rpx;
margin-top: 16rpx;
margin-bottom: 30rpx;
}
.topic-list .price {
display: block;
text-align: center;
width: 100%;
height: 27rpx;
line-height: 27rpx;
overflow: hidden;
color: #b4282d;
font-size: 27rpx;
}
.page{
width: 750rpx;
height: 108rpx;
background: #fff;
margin-bottom: 20rpx;
.page {
width: 750rpx;
height: 108rpx;
background: #fff;
margin-bottom: 20rpx;
}
.page view{
height: 108rpx;
width: 50%;
float: left;
font-size: 29rpx;
color: #333;
text-align: center;
line-height: 108rpx;
.page view {
height: 108rpx;
width: 50%;
float: left;
font-size: 29rpx;
color: #333;
text-align: center;
line-height: 108rpx;
}
.page .prev{
border-right: 1px solid #D9D9D9;
.page .prev {
border-right: 1px solid #d9d9d9;
}
.page .disabled{
color: #ccc;
}
\ No newline at end of file
.page .disabled {
color: #ccc;
}
<scroll-view class="container">
<scroll-view class="content">
<import src="../../lib/wxParse/wxParse.wxml"/>
<template is="wxParse" data="{{wxParseData:topicDetail.nodes}}"/>
<import src="../../lib/wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:topicDetail.nodes}}" />
</scroll-view>
<view class="topic-goods">
</view>
......
.content{
width: 100%;
height: auto;
font-size: 0;
}
.content image{
display: inline-block;
width: 100%;
.content {
width: 100%;
height: auto;
font-size: 0;
}
.comments{
width: 100%;
height: auto;
padding-left:30rpx;
background: #fff;
margin-top: 20rpx;
.content image {
display: inline-block;
width: 100%;
}
.comments .h{
height: 93rpx;
line-height: 93rpx;
width: 720rpx;
padding-right: 30rpx;
border-bottom: 1px solid #d9d9d9;
.comments {
width: 100%;
height: auto;
padding-left: 30rpx;
background: #fff;
margin-top: 20rpx;
}
.comments .h .t{
display: block;
float: left;
width: 50%;
font-size: 29rpx;
color: #333;
.comments .h {
height: 93rpx;
line-height: 93rpx;
width: 720rpx;
padding-right: 30rpx;
border-bottom: 1px solid #d9d9d9;
}
.comments .h .i{
display: block;
float: right;
margin-top: 30rpx;
width: 33rpx;
height: 33rpx;
.comments .h .t {
display: block;
float: left;
width: 50%;
font-size: 29rpx;
color: #333;
}
.comments .b{
height: auto;
width: 720rpx;
.comments .h .i {
display: block;
float: right;
margin-top: 30rpx;
width: 33rpx;
height: 33rpx;
}
.comments .item{
height: auto;
width: 720rpx;
overflow: hidden;
border-bottom: 1px solid #d9d9d9;
.comments .b {
height: auto;
width: 720rpx;
}
.comments .info{
height: 127rpx;
width: 100%;
padding: 33rpx 0 27rpx 0;
.comments .item {
height: auto;
width: 720rpx;
overflow: hidden;
border-bottom: 1px solid #d9d9d9;
}
.comments .user{
float: left;
width: auto;
height: 67rpx;
line-height: 67rpx;
font-size: 0;
.comments .info {
height: 127rpx;
width: 100%;
padding: 33rpx 0 27rpx 0;
}
.comments .user .avatar{
display: block;
float: left;
width: 67rpx;
height: 67rpx;
margin-right: 17rpx;
border-radius: 50%;
.comments .user {
float: left;
width: auto;
height: 67rpx;
line-height: 67rpx;
font-size: 0;
}
.comments .user .nickname{
display: block;
width: auto;
float: left;
height: 66rpx;
overflow: hidden;
font-size: 29rpx;
line-height: 66rpx;
.comments .user .avatar {
display: block;
float: left;
width: 67rpx;
height: 67rpx;
margin-right: 17rpx;
border-radius: 50%;
}
.comments .time{
display: block;
float: right;
width: auto;
height: 67rpx;
line-height: 67rpx;
color: #7f7f7f;
font-size: 25rpx;
margin-right: 30rpx;
.comments .user .nickname {
display: block;
width: auto;
float: left;
height: 66rpx;
overflow: hidden;
font-size: 29rpx;
line-height: 66rpx;
}
.comments .comment{
width: 720rpx;
padding-right: 30rpx;
line-height: 45.8rpx;
margin-bottom: 30rpx;
font-size: 29rpx;
color: #333;
.comments .time {
display: block;
float: right;
width: auto;
height: 67rpx;
line-height: 67rpx;
color: #7f7f7f;
font-size: 25rpx;
margin-right: 30rpx;
}
.comments .load{
width: 720rpx;
height: 108rpx;
line-height: 108rpx;
text-align: center;
font-size: 38.5rpx;
.comments .comment {
width: 720rpx;
padding-right: 30rpx;
line-height: 45.8rpx;
margin-bottom: 30rpx;
font-size: 29rpx;
color: #333;
}
.no-comments{
height: 297rpx;
.comments .load {
width: 720rpx;
height: 108rpx;
line-height: 108rpx;
text-align: center;
font-size: 38.5rpx;
}
.no-comments .txt{
height: 43rpx;
line-height: 43rpx;
display: block;
width: 100%;
text-align: center;
font-size: 29rpx;
color: #7f7f7f;
}
.no-comments .icon{
margin: 48rpx auto 18rpx auto;
height: 130rpx;
display: block;
width: 115rpx;
}
.rec-box{
width: 690rpx;
height: auto;
margin: 0 30rpx;
.no-comments {
height: 297rpx;
}
.no-comments .txt {
height: 43rpx;
line-height: 43rpx;
display: block;
width: 100%;
text-align: center;
font-size: 29rpx;
color: #7f7f7f;
}
.rec-box .h{
position: relative;
width: 690rpx;
height: 110rpx;
/*border-bottom: 1px solid #d0d0d0;*/
margin-bottom: 32rpx;
.no-comments .icon {
margin: 48rpx auto 18rpx auto;
height: 130rpx;
display: block;
width: 115rpx;
}
.rec-box {
width: 690rpx;
height: auto;
margin: 0 30rpx;
}
.rec-box .h .txt{
display: inline-block;
position: absolute;
background: #f4f4f4;
top: 59rpx;
left: 200rpx;
width: 290rpx;
height: 45rpx;
line-height: 45rpx;
font-size: 30rpx;
color: #999;
text-align: center;
}
.rec-box .b .item{
width: 690rpx;
height: auto;
padding: 24rpx 24rpx 30rpx 24rpx;
background: #fff;
margin-bottom: 30rpx;
}
.rec-box .b .item .img{
height: 355rpx;
width: 642rpx;
}
.rec-box .b .item .title{
display: block;
margin-top: 30rpx;
height: 30rpx;
width: 642rpx;
font-size: 28rpx;
.rec-box .h {
position: relative;
width: 690rpx;
height: 110rpx;
/*border-bottom: 1px solid #d0d0d0;*/
margin-bottom: 32rpx;
}
.rec-box .h .txt {
display: inline-block;
position: absolute;
background: #f4f4f4;
top: 59rpx;
left: 200rpx;
width: 290rpx;
height: 45rpx;
line-height: 45rpx;
font-size: 30rpx;
color: #999;
text-align: center;
}
.rec-box .b .item {
width: 690rpx;
height: auto;
padding: 24rpx 24rpx 30rpx 24rpx;
background: #fff;
margin-bottom: 30rpx;
}
.rec-box .b .item .img {
height: 355rpx;
width: 642rpx;
}
.rec-box .b .item .title {
display: block;
margin-top: 30rpx;
height: 30rpx;
width: 642rpx;
font-size: 28rpx;
}
@import "../../lib/wxParse/wxParse.wxss";
......@@ -3,95 +3,95 @@ var api = require('../../../config/api.js');
var app = getApp();
Page({
data: {
addressList: [],
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
this.getAddressList();
},
data: {
addressList: [],
},
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
this.getAddressList();
},
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getAddressList();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.getAddressList();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
getAddressList() {
let that = this;
util.request(api.AddressList).then(function(res) {
if (res.errno === 0) {
that.setData({
addressList: res.data
getAddressList() {
let that = this;
util.request(api.AddressList).then(function(res) {
if (res.errno === 0) {
that.setData({
addressList: res.data
});
}
});
}
});
},
},
addressAddOrUpdate(event) {
//返回之前,先取出上一页对象,并设置addressId
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2];
addressAddOrUpdate(event) {
//返回之前,先取出上一页对象,并设置addressId
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2];
if (prevPage.route == "pages/shopping/checkout/checkout") {
try {
wx.setStorageSync('addressId', event.currentTarget.dataset.addressId);
} catch (e) {
if (prevPage.route == "pages/shopping/checkout/checkout") {
try {
wx.setStorageSync('addressId', event.currentTarget.dataset.addressId);
} catch (e) {
}
}
let addressId = event.currentTarget.dataset.addressId;
if (addressId && addressId != 0) {
wx.navigateBack();
} else {
wx.navigateTo({
url: '/pages/ucenter/addressAdd/addressAdd?id=' + addressId
})
}
} else {
wx.navigateTo({
url: '/pages/ucenter/addressAdd/addressAdd?id=' + event.currentTarget.dataset.addressId
})
}
},
deleteAddress(event) {
console.log(event.target);
let that = this;
wx.showModal({
title: '',
content: '确定要删除地址?',
success: function(res) {
if (res.confirm) {
let addressId = event.target.dataset.addressId;
util.request(api.AddressDelete, {
id: addressId
}, 'POST').then(function(res) {
if (res.errno === 0) {
that.getAddressList();
wx.removeStorage({
key: 'addressId',
success: function(res) {},
})
let addressId = event.currentTarget.dataset.addressId;
if (addressId && addressId != 0) {
wx.navigateBack();
} else {
wx.navigateTo({
url: '/pages/ucenter/addressAdd/addressAdd?id=' + addressId
})
}
});
console.log('用户点击确定')
} else {
wx.navigateTo({
url: '/pages/ucenter/addressAdd/addressAdd?id=' + event.currentTarget.dataset.addressId
})
}
}
});
return false;
},
deleteAddress(event) {
console.log(event.target);
let that = this;
wx.showModal({
title: '',
content: '确定要删除地址?',
success: function(res) {
if (res.confirm) {
let addressId = event.target.dataset.addressId;
util.request(api.AddressDelete, {
id: addressId
}, 'POST').then(function(res) {
if (res.errno === 0) {
that.getAddressList();
wx.removeStorage({
key: 'addressId',
success: function(res) {},
})
}
});
console.log('用户点击确定')
}
}
});
return false;
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
}
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
}
});
\ No newline at end of file
<view class="container">
<view class="address-list" wx:if="{{ addressList.length > 0 }}">
<view class="item" wx:for="{{addressList}}" wx:key="id" bindtap="addressAddOrUpdate" data-address-id="{{item.id}}">
<view class="l">
<view class="name">{{item.name}}</view>
<view class="default" wx:if="{{item.isDefault}}">默认</view>
</view>
<view class="c">
<view class="mobile">{{item.mobile}}</view>
<view class="address">{{item.detailedAddress}}</view>
</view>
<view class="r">
<image catchtap="deleteAddress" data-address-id="{{item.id}}" class="del" src="/static/images/del-address.png"></image>
</view>
</view>
<view class="address-list" wx:if="{{ addressList.length > 0 }}">
<view class="item" wx:for="{{addressList}}" wx:key="id" bindtap="addressAddOrUpdate" data-address-id="{{item.id}}">
<view class="l">
<view class="name">{{item.name}}</view>
<view class="default" wx:if="{{item.isDefault}}">默认</view>
</view>
<view class="c">
<view class="mobile">{{item.mobile}}</view>
<view class="address">{{item.detailedAddress}}</view>
</view>
<view class="r">
<image catchtap="deleteAddress" data-address-id="{{item.id}}" class="del" src="/static/images/del-address.png"></image>
</view>
</view>
<view class="empty-view" wx:if="{{ addressList.length <= 0 }}">
<image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noAddress-26d570cefa.png"></image>
<text class="text">收货地址在哪里</text>
</view>
<view class="add-address" bindtap="addressAddOrUpdate" data-address-id="0">新建</view>
</view>
</view>
<view class="empty-view" wx:if="{{ addressList.length <= 0 }}">
<image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noAddress-26d570cefa.png"></image>
<text class="text">收货地址在哪里</text>
</view>
<view class="add-address" bindtap="addressAddOrUpdate" data-address-id="0">新建</view>
</view>
\ No newline at end of file
page{
height: 100%;
width: 100%;
background: #f4f4f4;
page {
height: 100%;
width: 100%;
background: #f4f4f4;
}
.container{
.container {
height: 100%;
width: 100%;
}
.address-list{
padding-left: 31.25rpx;
background: #fff url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png) 0 0 repeat-x;
background-size: auto 10.5rpx;
margin-bottom: 90rpx;
.address-list {
padding-left: 31.25rpx;
background: #fff url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png) 0 0 repeat-x;
background-size: auto 10.5rpx;
margin-bottom: 90rpx;
}
.address-list .item{
height: 156.55rpx;
align-items: center;
display: flex;
border-bottom: 1rpx solid #DCD9D9;
.address-list .item {
height: 156.55rpx;
align-items: center;
display: flex;
border-bottom: 1rpx solid #dcd9d9;
}
.address-list .l{
width: 125rpx;
height: 80rpx;
overflow: hidden;
.address-list .l {
width: 125rpx;
height: 80rpx;
overflow: hidden;
}
.address-list .name{
width: 125rpx;
height: 43rpx;
font-size: 29rpx;
margin-bottom: 5.2rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.address-list .name {
width: 125rpx;
height: 43rpx;
font-size: 29rpx;
margin-bottom: 5.2rpx;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.address-list .default{
width: 62.5rpx;
height: 33rpx;
line-height: 28rpx;
text-align: center;
font-size: 20rpx;
color: #a78845;
border: 1rpx solid #a78845;
visibility: visible;
.address-list .default {
width: 62.5rpx;
height: 33rpx;
line-height: 28rpx;
text-align: center;
font-size: 20rpx;
color: #a78845;
border: 1rpx solid #a78845;
visibility: visible;
}
.address-list .c{
flex: 1;
height: auto;
overflow: hidden;
.address-list .c {
flex: 1;
height: auto;
overflow: hidden;
}
.address-list .mobile{
height: 29rpx;
font-size: 29rpx;
line-height: 29rpx;
overflow: hidden;
margin-bottom: 6.25rpx;
.address-list .mobile {
height: 29rpx;
font-size: 29rpx;
line-height: 29rpx;
overflow: hidden;
margin-bottom: 6.25rpx;
}
.address-list .address{
height: 37rpx;
font-size: 25rpx;
line-height: 37rpx;
overflow: hidden;
.address-list .address {
height: 37rpx;
font-size: 25rpx;
line-height: 37rpx;
overflow: hidden;
}
.address-list .r{
width: 52rpx;
height: auto;
overflow: hidden;
margin-right: 16.5rpx;
.address-list .r {
width: 52rpx;
height: auto;
overflow: hidden;
margin-right: 16.5rpx;
}
.address-list .del{
display: block;
width: 52rpx;
height: 52rpx;
.address-list .del {
display: block;
width: 52rpx;
height: 52rpx;
}
.add-address{
background: #a78845;
text-align: center;
width: 100%;
height: 99rpx;
line-height: 99rpx;
position: fixed;
border-radius: 0;
border: none;
color: #fff;
font-size: 29rpx;
bottom: 0;
left:0;
.add-address {
background: #a78845;
text-align: center;
width: 100%;
height: 99rpx;
line-height: 99rpx;
position: fixed;
border-radius: 0;
border: none;
color: #fff;
font-size: 29rpx;
bottom: 0;
left: 0;
}
.empty-view{
.empty-view {
height: 100%;
width: 100%;
display: flex;
......@@ -112,15 +108,15 @@ page{
justify-content: center;
}
.empty-view .icon{
.empty-view .icon {
height: 248rpx;
width: 258rpx;
margin-bottom: 10rpx;
}
.empty-view .text{
.empty-view .text {
width: auto;
font-size: 28rpx;
line-height: 35rpx;
color: #999;
}
\ No newline at end of file
}
......@@ -20,10 +20,24 @@ Page({
},
addressId: 0,
openSelectRegion: false,
selectRegionList: [
{ id: 0, name: '省份', pid: 1, type: 1 },
{ id: 0, name: '城市', pid: 1, type: 2 },
{ id: 0, name: '区县', pid: 1, type: 3 }
selectRegionList: [{
id: 0,
name: '省份',
pid: 1,
type: 1
},
{
id: 0,
name: '城市',
pid: 1,
type: 2
},
{
id: 0,
name: '区县',
pid: 1,
type: 3
}
],
regionType: 1,
regionList: [],
......@@ -59,7 +73,9 @@ Page({
},
getAddressDetail() {
let that = this;
util.request(api.AddressDetail, { id: that.data.addressId }).then(function (res) {
util.request(api.AddressDetail, {
id: that.data.addressId
}).then(function(res) {
if (res.errno === 0) {
if (res.data) {
that.setData({
......@@ -110,10 +126,24 @@ Page({
this.getRegionList(address.cityId);
} else {
this.setData({
selectRegionList: [
{ id: 0, name: '省份', pid: 0, type: 1 },
{ id: 0, name: '城市', pid: 0, type: 2 },
{ id: 0, name: '区县', pid: 0, type: 3 }
selectRegionList: [{
id: 0,
name: '省份',
pid: 0,
type: 1
},
{
id: 0,
name: '城市',
pid: 0,
type: 2
},
{
id: 0,
name: '区县',
pid: 0,
type: 3
}
],
regionType: 1
})
......@@ -123,7 +153,7 @@ Page({
this.setRegionDoneStatus();
},
onLoad: function (options) {
onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数
console.log(options)
if (options.id && options.id != 0) {
......@@ -133,7 +163,7 @@ Page({
this.getAddressDetail();
}
},
onReady: function () {
onReady: function() {
},
selectRegionType(event) {
......@@ -240,7 +270,9 @@ Page({
getRegionList(regionId) {
let that = this;
let regionType = that.data.regionType;
util.request(api.RegionList, { pid: regionId }).then(function (res) {
util.request(api.RegionList, {
pid: regionId
}).then(function(res) {
if (res.errno === 0) {
that.setData({
regionList: res.data.map(item => {
......@@ -302,7 +334,7 @@ Page({
areaId: address.areaId,
address: address.address,
isDefault: address.isDefault
}, 'POST').then(function (res) {
}, 'POST').then(function(res) {
if (res.errno === 0) {
//返回之前,先取出上一页对象,并设置addressId
var pages = getCurrentPages();
......@@ -325,15 +357,15 @@ Page({
});
},
onShow: function () {
onShow: function() {
// 页面显示
},
onHide: function () {
onHide: function() {
// 页面隐藏
},
onUnload: function () {
onUnload: function() {
// 页面关闭
}
......
<view class="add-address">
<view class="add-form">
<view class="form-item">
<input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
</view>
<view class="form-item">
<input class="input" bindinput="bindinputMobile" value="{{address.mobile}}" placeholder="手机号码"/>
</view>
<view class="form-item">
<input class="input" value="{{address.provinceName + address.cityName + address.areaName}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县"/>
</view>
<view class="form-item">
<input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等"/>
</view>
<view class="form-default">
<text bindtap="bindIsDefault" class="default-input {{address.isDefault == 1 ? 'selected' : ''}}">设为默认地址</text>
</view>
<view class="add-form">
<view class="form-item">
<input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
</view>
<view class="btns">
<button class="cannel" bindtap="cancelAddress">取消</button>
<button class="save" bindtap="saveAddress">保存</button>
<view class="form-item">
<input class="input" bindinput="bindinputMobile" value="{{address.mobile}}" placeholder="手机号码" />
</view>
<view class="form-item">
<input class="input" value="{{address.provinceName + address.cityName + address.areaName}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县" />
</view>
<view class="form-item">
<input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等" />
</view>
<view class="form-default">
<text bindtap="bindIsDefault" class="default-input {{address.isDefault == 1 ? 'selected' : ''}}">设为默认地址</text>
</view>
</view>
<view class="region-select" wx:if="{{openSelectRegion}}">
<view class="hd">
<view class="region-selected">
<view class="item {{item.id == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}" bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="id">{{item.name}}</view>
</view>
<view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
<view class="btns">
<button class="cannel" bindtap="cancelAddress">取消</button>
<button class="save" bindtap="saveAddress">保存</button>
</view>
<view class="region-select" wx:if="{{openSelectRegion}}">
<view class="hd">
<view class="region-selected">
<view class="item {{item.id == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}" bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="id">{{item.name}}</view>
</view>
<view class="bd">
<view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
</view>
<view class="bd">
<scroll-view scroll-y class="region-list">
<view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="id">{{item.name}}</view>
</scroll-view>
</view>
</view>
</view>
</view>
<view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>
\ No newline at end of file
page{
height: 100%;
background: #f4f4f4;
}
.add-address .add-form{
background: #fff;
width: 100%;
height: auto;
overflow: hidden;
page {
height: 100%;
background: #f4f4f4;
}
.add-address .form-item{
height: 116rpx;
padding-left: 31.25rpx;
border-bottom: 1px solid #d9d9d9;
display: flex;
align-items: center;
padding-right: 31.25rpx;
.add-address .add-form {
background: #fff;
width: 100%;
height: auto;
overflow: hidden;
}
.add-address .input{
flex: 1;
height: 44rpx;
line-height: 44rpx;
overflow: hidden;
.add-address .form-item {
height: 116rpx;
padding-left: 31.25rpx;
border-bottom: 1px solid #d9d9d9;
display: flex;
align-items: center;
padding-right: 31.25rpx;
}
.add-address .form-default{
border-bottom: 1px solid #d9d9d9;
height: 96rpx;
background: #fafafa;
padding-top: 28rpx;
font-size: 28rpx;
.add-address .input {
flex: 1;
height: 44rpx;
line-height: 44rpx;
overflow: hidden;
}
.default-input{
margin: 0 auto;
display: block;
width: 240rpx;
height: 40rpx;
padding-left: 50rpx;
line-height: 40rpx;
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 1rpx -448rpx no-repeat;
background-size: 38rpx 486rpx;
font-size: 28rpx;
.add-address .form-default {
border-bottom: 1px solid #d9d9d9;
height: 96rpx;
background: #fafafa;
padding-top: 28rpx;
font-size: 28rpx;
}
.default-input.selected{
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat;
background-size: 38rpx 486rpx;
.default-input {
margin: 0 auto;
display: block;
width: 240rpx;
height: 40rpx;
padding-left: 50rpx;
line-height: 40rpx;
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 1rpx -448rpx no-repeat;
background-size: 38rpx 486rpx;
font-size: 28rpx;
}
.add-address .btns{
position: fixed;
bottom: 0;
left: 0;
overflow: hidden;
display: flex;
height: 100rpx;
width: 100%;
.default-input.selected {
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat;
background-size: 38rpx 486rpx;
}
.add-address .cannel,.add-address .save{
flex: 1;
height: 100rpx;
text-align: center;
line-height: 100rpx;
font-size: 28rpx;
color: #fff;
border:none;
border-radius: 0;
.add-address .btns {
position: fixed;
bottom: 0;
left: 0;
overflow: hidden;
display: flex;
height: 100rpx;
width: 100%;
}
.add-address .cannel{
background: #3F3F3F;
.add-address .cannel, .add-address .save {
flex: 1;
height: 100rpx;
text-align: center;
line-height: 100rpx;
font-size: 28rpx;
color: #fff;
border: none;
border-radius: 0;
}
.add-address .save{
background: #a78845;
.add-address .cannel {
background: #3f3f3f;
}
.add-address .save {
background: #a78845;
}
.region-select{
.region-select {
width: 100%;
height: 600rpx;
background: #fff;
position: fixed;
z-index: 10;
left:0;
left: 0;
bottom: 0;
}
.region-select .hd{
.region-select .hd {
height: 108rpx;
width: 100%;
border-bottom: 1px solid #f4f4f4;
padding: 46rpx 30rpx 0 30rpx;
}
.region-select .region-selected{
.region-select .region-selected {
float: left;
height: 60rpx;
display: flex;
}
.region-select .region-selected .item{
.region-select .region-selected .item {
max-width: 140rpx;
margin-right: 30rpx;
text-align: left;
......@@ -112,19 +112,19 @@ page{
color: #333;
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-overflow: ellipsis;
white-space: nowrap;
}
.region-select .region-selected .item.disabled{
.region-select .region-selected .item.disabled {
color: #999;
}
.region-select .region-selected .item.selected{
.region-select .region-selected .item.selected {
color: #a78845;
}
.region-select .done{
.region-select .done {
float: right;
height: 60rpx;
width: 60rpx;
......@@ -136,21 +136,21 @@ page{
font-size: 28rpx;
}
.region-select .done.disabled{
.region-select .done.disabled {
color: #999;
}
.region-select .bd{
.region-select .bd {
height: 492rpx;
width: 100%;
padding: 0 30rpx;
}
.region-select .region-list{
.region-select .region-list {
height: 492rpx;
}
.region-select .region-list .item{
.region-select .region-list .item {
width: 100%;
height: 104rpx;
line-height: 104rpx;
......@@ -159,17 +159,16 @@ page{
font-size: 28rpx;
}
.region-select .region-list .item.selected{
.region-select .region-list .item.selected {
color: #b4282d;
}
.bg-mask{
.bg-mask {
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.4);
position: fixed;
top:0;
left:0;
top: 0;
left: 0;
z-index: 8;
}
......@@ -6,7 +6,7 @@
</view>
</view>
<view class="collect-list" wx:else>
<view class="item" bindtap="openGoods" bindtouchstart="touchStart" bindtouchend="touchEnd" wx:for="{{collectList}}" wx:key="id" data-index="{{index}}">
<view class="item" bindtap="openGoods" bindtouchstart="touchStart" bindtouchend="touchEnd" wx:for="{{collectList}}" wx:key="id" data-index="{{index}}">
<image class="img" src="{{item.picUrl}}"></image>
<view class="info">
<view class="name">{{item.name}}</view>
......@@ -16,4 +16,4 @@
</view>
</view>
</view>
</view>
\ No newline at end of file
page{
background: #f4f4f4;
min-height: 100%;
page {
background: #f4f4f4;
min-height: 100%;
}
.container{
background: #f4f4f4;
min-height: 100%;
width: 100%;
height: auto;
overflow: hidden;
.container {
background: #f4f4f4;
min-height: 100%;
width: 100%;
height: auto;
overflow: hidden;
}
.no-collect{
width: 100%;
height: auto;
margin: 0 auto;
.no-collect {
width: 100%;
height: auto;
margin: 0 auto;
}
.no-collect .c{
width: 100%;
height: auto;
margin-top: 200rpx;
.no-collect .c {
width: 100%;
height: auto;
margin-top: 200rpx;
}
.no-collect .c image{
margin: 0 auto;
display: block;
text-align: center;
width: 258rpx;
height: 258rpx;
.no-collect .c image {
margin: 0 auto;
display: block;
text-align: center;
width: 258rpx;
height: 258rpx;
}
.no-collect .c text{
margin: 0 auto;
display: block;
width: 258rpx;
height: 29rpx;
line-height: 29rpx;
text-align: center;
font-size: 29rpx;
color: #999;
.no-collect .c text {
margin: 0 auto;
display: block;
width: 258rpx;
height: 29rpx;
line-height: 29rpx;
text-align: center;
font-size: 29rpx;
color: #999;
}
.collect-list{
.collect-list {
width: 100%;
height: auto;
overflow: hidden;
......@@ -52,7 +51,7 @@ page{
border-top: 1px solid #e1e1e1;
}
.item{
.item {
height: 212rpx;
width: 720rpx;
background: #fff;
......@@ -60,17 +59,17 @@ page{
border-bottom: 1px solid #e1e1e1;
}
.item:last-child{
.item:last-child {
border-bottom: 1px solid #fff;
}
.item .img{
.item .img {
float: left;
width: 150rpx;
height: 150rpx;
}
.item .info{
.item .info {
float: right;
width: 540rpx;
height: 150rpx;
......@@ -80,21 +79,20 @@ page{
padding-left: 20rpx;
}
.item .info .name{
.item .info .name {
font-size: 28rpx;
color: #333;
line-height: 40rpx;
}
.item .info .subtitle{
.item .info .subtitle {
margin-top: 8rpx;
font-size: 24rpx;
color: #888;
line-height: 40rpx;
}
.item .info .price{
.item .info .price {
margin-top: 8rpx;
font-size: 28rpx;
color: #333;
......
var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
var app = getApp();
Page({
data: {
},
onLoad: function (options) {
},
onReady: function () {
onLoad: function(options) {},
onReady: function() {
},
onShow: function () {
onShow: function() {
},
onHide: function () {
onHide: function() {
// 页面隐藏
},
onUnload: function () {
onUnload: function() {
// 页面关闭
}
})
\ No newline at end of file
......@@ -25,7 +25,7 @@
</view>
</view>
<view class="item">
<view class="item">
<view class="tag">新人专享</view>
<view class="content">
<view class="left">
......
page{
background: #f4f4f4;
min-height: 100%;
page {
background: #f4f4f4;
min-height: 100%;
}
.container{
background: #f4f4f4;
min-height: 100%;
padding-top: 30rpx;
.container {
background: #f4f4f4;
min-height: 100%;
padding-top: 30rpx;
}
.coupon-form{
.coupon-form {
height: 110rpx;
width: 100%;
background: #fff;
......@@ -19,7 +19,7 @@ page{
display: flex;
}
.input-box{
.input-box {
flex: 1;
height: 70rpx;
color: #333;
......@@ -31,7 +31,7 @@ page{
margin-right: 30rpx;
}
.input-box .coupon-sn{
.input-box .coupon-sn {
position: absolute;
top: 10rpx;
left: 30rpx;
......@@ -42,7 +42,7 @@ page{
font-size: 24rpx;
}
.clear-icon{
.clear-icon {
position: absolute;
top: 21rpx;
right: 30rpx;
......@@ -50,9 +50,9 @@ page{
height: 28rpx;
}
.add-btn{
.add-btn {
height: 70rpx;
border:none;
border: none;
width: 168rpx;
background: #b4282d;
border-radius: 0;
......@@ -61,11 +61,11 @@ page{
font-size: 28rpx;
}
.add-btn.disabled{
.add-btn.disabled {
background: #ccc;
}
.help{
.help {
height: 72rpx;
line-height: 72rpx;
text-align: right;
......@@ -76,7 +76,7 @@ page{
font-size: 24rpx;
}
.coupon-list{
.coupon-list {
width: 100%;
height: auto;
overflow: hidden;
......@@ -84,18 +84,18 @@ page{
padding-right: 30rpx;
}
.item{
.item {
position: relative;
height: 290rpx;
width: 100%;
background: linear-gradient(to right,#cfa568,#e3bf79);
background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 30rpx;
padding-top: 52rpx;
}
.tag{
.tag {
height: 32rpx;
background: #A48143;
background: #a48143;
padding-left: 16rpx;
padding-right: 16rpx;
position: absolute;
......@@ -107,8 +107,7 @@ page{
line-height: 32rpx;
}
.content{
.content {
margin-top: 24rpx;
margin-left: 40rpx;
display: flex;
......@@ -117,50 +116,50 @@ page{
align-items: center;
}
.content .left{
.content .left {
flex: 1;
}
.name{
.name {
font-size: 44rpx;
color: #fff;
margin-bottom: 14rpx;
}
.time{
.time {
font-size: 24rpx;
color: rgba(255,255,255, 0.8);
color: rgba(255, 255, 255, 0.8);
line-height: 30rpx;
}
.content .right{
.content .right {
width: 162rpx;
}
.go{
.go {
height: 48rpx;
border:none;
border: none;
width: 162rpx;
background: rgba(255,255,255, 0.8);
background: rgba(255, 255, 255, 0.8);
border-radius: 4rpx;
line-height: 48rpx;
color: #b69150;
font-size: 24rpx;
}
.condition{
.condition {
position: absolute;
width: 100%;
bottom: 0;
left:0;
left: 0;
height: 78rpx;
background: rgba(0,0,0,.08);
background: rgba(0, 0, 0, 0.08);
padding: 24rpx 40rpx;
display: flex;
flex-direction: row;
}
.condition .txt{
.condition .txt {
display: block;
height: 30rpx;
flex: 1;
......@@ -170,9 +169,8 @@ page{
color: #fff;
}
.condition .icon{
.condition .icon {
margin-left: 30rpx;
width: 24rpx;
height: 24rpx;
}
\ No newline at end of file
}
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