Commit 20b97ec8 authored by Junling Bu's avatar Junling Bu
Browse files

chore[litemall-wx]: 使用微信开发者工具的格式化代码

parent 822d5075
...@@ -449,7 +449,7 @@ page { ...@@ -449,7 +449,7 @@ page {
border-bottom-right-radius: 50rpx; border-bottom-right-radius: 50rpx;
letter-spacing: 3rpx; letter-spacing: 3rpx;
/* background-image: linear-gradient(to right, #ff7701 100%); */ /* background-image: linear-gradient(to right, #ff7701 100%); */
background-image: linear-gradient(to right, #AB956D 0%, #AB956D 100%); background-image: linear-gradient(to right, #ab956d 0%, #ab956d 100%);
} }
.action_btn_area .checkout { .action_btn_area .checkout {
...@@ -508,7 +508,7 @@ page { ...@@ -508,7 +508,7 @@ page {
border-top-right-radius: 50rpx; border-top-right-radius: 50rpx;
border-bottom-right-radius: 50rpx; border-bottom-right-radius: 50rpx;
letter-spacing: 3rpx; letter-spacing: 3rpx;
background-image: linear-gradient(to right, #AB956D 0%, #AB956D 100%); background-image: linear-gradient(to right, #ab956d 0%, #ab956d 100%);
/* background-image: linear-gradient(to right, #ff7701 0%, #fe4800 100%); */ /* background-image: linear-gradient(to right, #ff7701 0%, #fe4800 100%); */
} }
......
...@@ -2,85 +2,85 @@ var util = require('../../utils/util.js'); ...@@ -2,85 +2,85 @@ var util = require('../../utils/util.js');
var api = require('../../config/api.js'); var api = require('../../config/api.js');
Page({ Page({
data: { data: {
categoryList: [], categoryList: [],
currentCategory: {}, currentCategory: {},
currentSubCategoryList: {}, currentSubCategoryList: {},
scrollLeft: 0, scrollLeft: 0,
scrollTop: 0, scrollTop: 0,
goodsCount: 0, goodsCount: 0,
scrollHeight: 0 scrollHeight: 0
}, },
onLoad: function(options) { onLoad: function(options) {
this.getCatalog(); this.getCatalog();
}, },
onPullDownRefresh() { onPullDownRefresh() {
wx.showNavigationBarLoading() //在标题栏中显示加载 wx.showNavigationBarLoading() //在标题栏中显示加载
this.getCatalog(); this.getCatalog();
wx.hideNavigationBarLoading() //完成停止加载 wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新 wx.stopPullDownRefresh() //停止下拉刷新
}, },
getCatalog: function() { getCatalog: function() {
//CatalogList //CatalogList
let that = this; let that = this;
wx.showLoading({ wx.showLoading({
title: '加载中...', title: '加载中...',
});
util.request(api.CatalogList).then(function(res) {
that.setData({
categoryList: res.data.categoryList,
currentCategory: res.data.currentCategory,
currentSubCategoryList: res.data.currentSubCategory
});
wx.hideLoading();
});
util.request(api.GoodsCount).then(function(res) {
that.setData({
goodsCount: res.data.goodsCount
});
});
},
getCurrentCategory: function(id) {
let that = this;
util.request(api.CatalogCurrent, {
id: id
})
.then(function(res) {
that.setData({
currentCategory: res.data.currentCategory,
currentSubCategoryList: res.data.currentSubCategory
}); });
}); util.request(api.CatalogList).then(function(res) {
}, that.setData({
onReady: function() { categoryList: res.data.categoryList,
// 页面渲染完成 currentCategory: res.data.currentCategory,
}, currentSubCategoryList: res.data.currentSubCategory
onShow: function() { });
// 页面显示 wx.hideLoading();
}, });
onHide: function() { util.request(api.GoodsCount).then(function(res) {
// 页面隐藏 that.setData({
}, goodsCount: res.data.goodsCount
onUnload: function() { });
// 页面关闭
},
getList: function() {
var that = this;
util.request(api.ApiRootUrl + 'api/catalog/' + that.data.currentCategory.catId)
.then(function(res) {
that.setData({
categoryList: res.data,
}); });
});
},
switchCate: function(event) {
var that = this;
var currentTarget = event.currentTarget;
if (this.data.currentCategory.id == event.currentTarget.dataset.id) {
return false;
}
this.getCurrentCategory(event.currentTarget.dataset.id); },
} getCurrentCategory: function(id) {
let that = this;
util.request(api.CatalogCurrent, {
id: id
})
.then(function(res) {
that.setData({
currentCategory: res.data.currentCategory,
currentSubCategoryList: res.data.currentSubCategory
});
});
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
},
onHide: function() {
// 页面隐藏
},
onUnload: function() {
// 页面关闭
},
getList: function() {
var that = this;
util.request(api.ApiRootUrl + 'api/catalog/' + that.data.currentCategory.catId)
.then(function(res) {
that.setData({
categoryList: res.data,
});
});
},
switchCate: function(event) {
var that = this;
var currentTarget = event.currentTarget;
if (this.data.currentCategory.id == event.currentTarget.dataset.id) {
return false;
}
this.getCurrentCategory(event.currentTarget.dataset.id);
}
}) })
\ No newline at end of file
...@@ -7,24 +7,24 @@ ...@@ -7,24 +7,24 @@
</view> </view>
<view class="catalog"> <view class="catalog">
<scroll-view class="nav" scroll-y="true"> <scroll-view class="nav" scroll-y="true">
<view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{categoryList}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">{{item.name}}</view> <view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{categoryList}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">{{item.name}}</view>
</scroll-view> </scroll-view>
<scroll-view class="cate" scroll-y="true"> <scroll-view class="cate" scroll-y="true">
<navigator url="url" class="banner"> <navigator url="url" class="banner">
<image class="image" src="{{currentCategory.picUrl}}"></image> <image class="image" src="{{currentCategory.picUrl}}"></image>
<view class="txt">{{currentCategory.frontName}}</view> <view class="txt">{{currentCategory.frontName}}</view>
</navigator>
<view class="hd">
<text class="line"></text>
<text class="txt">{{currentCategory.name}}分类</text>
<text class="line"></text>
</view>
<view class="bd">
<navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
<image class="icon" src="{{item.picUrl}}"></image>
<text class="txt">{{item.name}}</text>
</navigator> </navigator>
<view class="hd"> </view>
<text class="line"></text>
<text class="txt">{{currentCategory.name}}分类</text>
<text class="line"></text>
</view>
<view class="bd">
<navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
<image class="icon" src="{{item.picUrl}}"></image>
<text class="txt">{{item.name}}</text>
</navigator>
</view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -68,9 +68,9 @@ page { ...@@ -68,9 +68,9 @@ page {
} }
.catalog .nav .item.active { .catalog .nav .item.active {
color: #AB956D; color: #ab956d;
font-size: 36rpx; font-size: 36rpx;
border-left: 6rpx solid #AB956D; border-left: 6rpx solid #ab956d;
} }
.catalog .cate { .catalog .cate {
......
...@@ -13,7 +13,7 @@ Page({ ...@@ -13,7 +13,7 @@ Page({
page: 1, page: 1,
size: 100 size: 100
}, },
onLoad: function (options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
var that = this; var that = this;
if (options.id) { if (options.id) {
...@@ -23,7 +23,7 @@ Page({ ...@@ -23,7 +23,7 @@ Page({
} }
wx.getSystemInfo({ wx.getSystemInfo({
success: function (res) { success: function(res) {
that.setData({ that.setData({
scrollHeight: res.windowHeight scrollHeight: res.windowHeight
}); });
...@@ -34,10 +34,12 @@ Page({ ...@@ -34,10 +34,12 @@ Page({
this.getCategoryInfo(); this.getCategoryInfo();
}, },
getCategoryInfo: function () { getCategoryInfo: function() {
let that = this; let that = this;
util.request(api.GoodsCategory, { id: this.data.id }) util.request(api.GoodsCategory, {
.then(function (res) { id: this.data.id
})
.then(function(res) {
if (res.errno == 0) { if (res.errno == 0) {
that.setData({ that.setData({
...@@ -75,33 +77,37 @@ Page({ ...@@ -75,33 +77,37 @@ Page({
} else { } else {
//显示错误信息 //显示错误信息
} }
}); });
}, },
onReady: function () { onReady: function() {
// 页面渲染完成 // 页面渲染完成
}, },
onShow: function () { onShow: function() {
// 页面显示 // 页面显示
console.log(1); console.log(1);
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
getGoodsList: function () { getGoodsList: function() {
var that = this; var that = this;
util.request(api.GoodsList, {categoryId: that.data.id, page: that.data.page, size: that.data.size}) util.request(api.GoodsList, {
.then(function (res) { categoryId: that.data.id,
page: that.data.page,
size: that.data.size
})
.then(function(res) {
that.setData({ that.setData({
goodsList: res.data.goodsList, goodsList: res.data.goodsList,
}); });
}); });
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
}, },
switchCate: function (event) { switchCate: function(event) {
if (this.data.id == event.currentTarget.dataset.id) { if (this.data.id == event.currentTarget.dataset.id) {
return false; return false;
} }
......
<view class="container"> <view class="container">
<view class="cate-nav"> <view class="cate-nav">
<scroll-view scroll-x="true" class="cate-nav-body" style="width: 750rpx;" scroll-left="{{scrollLeft}}"> <scroll-view scroll-x="true" class="cate-nav-body" style="width: 750rpx;" scroll-left="{{scrollLeft}}">
<view wx:for="{{navList}}" class="item {{ id == item.id ? 'active' : ''}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate"> <view wx:for="{{navList}}" class="item {{ id == item.id ? 'active' : ''}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};"> <scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};">
<view class="cate-item"> <view class="cate-item">
<view class="h"> <view class="h">
<text class="name">{{currentCategory.name}}</text> <text class="name">{{currentCategory.name}}</text>
<text class="desc">{{currentCategory.frontName}}</text> <text class="desc">{{currentCategory.frontName}}</text>
</view> </view>
<view class="b"> <view class="b">
<navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex" > <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:key="id" wx:for-item="iitem" wx:for-index="iindex">
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image> <image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
<text class="name">{{iitem.name}}</text> <text class="name">{{iitem.name}}</text>
<text class="price">¥{{iitem.retailPrice}}</text> <text class="price">¥{{iitem.retailPrice}}</text>
</navigator> </navigator>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
\ No newline at end of file
.container{ .container {
background: #f9f9f9; background: #f9f9f9;
} }
.cate-nav{
position: fixed; .cate-nav {
left:0; position: fixed;
top:0; left: 0;
z-index: 1000; top: 0;
z-index: 1000;
} }
.cate-nav-body{ .cate-nav-body {
height: 84rpx; height: 84rpx;
white-space: nowrap; white-space: nowrap;
background: #fff; background: #fff;
border-top: 1px solid rgba(0,0,0,.15); border-top: 1px solid rgba(0, 0, 0, 0.15);
overflow: hidden; overflow: hidden;
} }
.cate-nav .item{ .cate-nav .item {
display: inline-block; display: inline-block;
height: 84rpx; height: 84rpx;
min-width: 130rpx; min-width: 130rpx;
padding: 0 15rpx; padding: 0 15rpx;
} }
.cate-nav .item .name{ .cate-nav .item .name {
display: block; display: block;
height: 84rpx; height: 84rpx;
padding: 0 20rpx; padding: 0 20rpx;
line-height: 84rpx; line-height: 84rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
width: auto; width: auto;
} }
.cate-nav .item.active .name{ .cate-nav .item.active .name {
color: #AB956D; color: #ab956d;
border-bottom: 2px solid #AB956D; border-bottom: 2px solid #ab956d;
} }
.cate-item{ .cate-item {
margin-top: 94rpx; margin-top: 94rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
.cate-item .h{ .cate-item .h {
height: 145rpx; height: 145rpx;
width: 750rpx; width: 750rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.cate-item .h .name{ .cate-item .h .name {
display: block; display: block;
height: 35rpx; height: 35rpx;
margin-bottom: 18rpx; margin-bottom: 18rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.cate-item .h .desc{ .cate-item .h .desc {
display: block; display: block;
height: 24rpx; height: 24rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.cate-item .b{ .cate-item .b {
width: 750rpx; width: 750rpx;
padding: 0 6.25rpx; padding: 0 6.25rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
.cate-item .b .item{ .cate-item .b .item {
float: left; float: left;
background: #fff; background: #fff;
width: 365rpx; width: 365rpx;
...@@ -86,16 +87,16 @@ ...@@ -86,16 +87,16 @@
text-align: center; text-align: center;
} }
.cate-item .b .item-b{ .cate-item .b .item-b {
margin-left: 6.25rpx; margin-left: 6.25rpx;
} }
.cate-item .item .img{ .cate-item .item .img {
width: 302rpx; width: 302rpx;
height: 302rpx; height: 302rpx;
} }
.cate-item .item .name{ .cate-item .item .name {
display: block; display: block;
width: 365.625rpx; width: 365.625rpx;
height: 35rpx; height: 35rpx;
...@@ -107,11 +108,11 @@ ...@@ -107,11 +108,11 @@
color: #333; color: #333;
} }
.cate-item .item .price{ .cate-item .item .price {
display: block; display: block;
width: 365.625rpx; width: 365.625rpx;
height: 30rpx; height: 30rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 30rpx;
color: #AB956D; color: #ab956d;
} }
\ No newline at end of file
...@@ -10,174 +10,174 @@ Page({ ...@@ -10,174 +10,174 @@ Page({
checkedCoupon: [], checkedCoupon: [],
couponList: [], couponList: [],
goodsTotalPrice: 0.00, //商品总价 goodsTotalPrice: 0.00, //商品总价
freightPrice: 0.00, //快递费 freightPrice: 0.00, //快递费
couponPrice: 0.00, //优惠券的价格 couponPrice: 0.00, //优惠券的价格
grouponPrice: 0.00, //团购优惠价格 grouponPrice: 0.00, //团购优惠价格
orderTotalPrice: 0.00, //订单总价 orderTotalPrice: 0.00, //订单总价
actualPrice: 0.00, //实际需要支付的总价 actualPrice: 0.00, //实际需要支付的总价
cartId: 0, cartId: 0,
addressId: 0, addressId: 0,
couponId: 0, couponId: 0,
message: '', message: '',
grouponLinkId: 0, //参与的团购,如果是发起则为0 grouponLinkId: 0, //参与的团购,如果是发起则为0
grouponRulesId: 0 //团购规则ID grouponRulesId: 0 //团购规则ID
}, },
onLoad: function(options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
}, },
//获取checkou信息 //获取checkou信息
getCheckoutInfo: function() { getCheckoutInfo: function() {
let that = this; let that = this;
util.request(api.CartCheckout, { util.request(api.CartCheckout, {
cartId: that.data.cartId, cartId: that.data.cartId,
addressId: that.data.addressId, addressId: that.data.addressId,
couponId: that.data.couponId, couponId: that.data.couponId,
grouponRulesId: that.data.grouponRulesId grouponRulesId: that.data.grouponRulesId
}).then(function(res) { }).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
checkedGoodsList: res.data.checkedGoodsList, checkedGoodsList: res.data.checkedGoodsList,
checkedAddress: res.data.checkedAddress, checkedAddress: res.data.checkedAddress,
actualPrice: res.data.actualPrice, actualPrice: res.data.actualPrice,
checkedCoupon: res.data.checkedCoupon, checkedCoupon: res.data.checkedCoupon,
couponPrice: res.data.couponPrice, couponPrice: res.data.couponPrice,
grouponPrice: res.data.grouponPrice, grouponPrice: res.data.grouponPrice,
freightPrice: res.data.freightPrice, freightPrice: res.data.freightPrice,
goodsTotalPrice: res.data.goodsTotalPrice, goodsTotalPrice: res.data.goodsTotalPrice,
orderTotalPrice: res.data.orderTotalPrice, orderTotalPrice: res.data.orderTotalPrice,
addressId: res.data.addressId, addressId: res.data.addressId,
couponId: res.data.couponId, couponId: res.data.couponId,
grouponRulesId: res.data.grouponRulesId, grouponRulesId: res.data.grouponRulesId,
});
}
wx.hideLoading();
}); });
} },
wx.hideLoading(); selectAddress() {
}); wx.navigateTo({
}, url: '/pages/ucenter/address/address',
selectAddress() { })
wx.navigateTo({ },
url: '/pages/ucenter/address/address', bindMessageInput: function(e) {
})
},
bindMessageInput: function (e) {
this.setData({
message: e.detail.value
});
},
onReady: function() {
// 页面渲染完成
},
onShow: function() {
// 页面显示
wx.showLoading({
title: '加载中...',
});
try {
var cartId = wx.getStorageSync('cartId');
if (cartId) {
this.setData({ this.setData({
'cartId': cartId message: e.detail.value
}); });
} },
onReady: function() {
// 页面渲染完成
var addressId = wx.getStorageSync('addressId'); },
if (addressId) { onShow: function() {
this.setData({ // 页面显示
'addressId': addressId wx.showLoading({
title: '加载中...',
}); });
} try {
var cartId = wx.getStorageSync('cartId');
if (cartId) {
this.setData({
'cartId': cartId
});
}
var couponId = wx.getStorageSync('couponId'); var addressId = wx.getStorageSync('addressId');
if (couponId) { if (addressId) {
this.setData({ this.setData({
'couponId': couponId 'addressId': addressId
}); });
} }
var grouponRulesId = wx.getStorageSync('grouponRulesId'); var couponId = wx.getStorageSync('couponId');
if (grouponRulesId) { if (couponId) {
this.setData({ this.setData({
'grouponRulesId': grouponRulesId 'couponId': couponId
}); });
} }
var grouponLinkId = wx.getStorageSync('grouponLinkId'); var grouponRulesId = wx.getStorageSync('grouponRulesId');
if (grouponLinkId) { if (grouponRulesId) {
this.setData({ this.setData({
'grouponLinkId': grouponLinkId 'grouponRulesId': grouponRulesId
}); });
} }
} catch (e) {
// Do something when catch error
console.log(e);
}
this.getCheckoutInfo(); var grouponLinkId = wx.getStorageSync('grouponLinkId');
}, if (grouponLinkId) {
onHide: function() { this.setData({
// 页面隐藏 'grouponLinkId': grouponLinkId
});
}
} catch (e) {
// Do something when catch error
console.log(e);
}
}, this.getCheckoutInfo();
onUnload: function() { },
// 页面关闭 onHide: function() {
// 页面隐藏
}, },
submitOrder: function() { onUnload: function() {
if (this.data.addressId <= 0) { // 页面关闭
util.showErrorToast('请选择收货地址');
return false; },
} submitOrder: function() {
util.request(api.OrderSubmit, { if (this.data.addressId <= 0) {
cartId: this.data.cartId, util.showErrorToast('请选择收货地址');
addressId: this.data.addressId, return false;
couponId: this.data.couponId, }
message: this.data.message, util.request(api.OrderSubmit, {
grouponRulesId: this.data.grouponRulesId, cartId: this.data.cartId,
grouponLinkId: this.data.grouponLinkId addressId: this.data.addressId,
}, 'POST').then(res => { couponId: this.data.couponId,
if (res.errno === 0) { message: this.data.message,
const orderId = res.data.orderId; grouponRulesId: this.data.grouponRulesId,
util.request(api.OrderPrepay, { grouponLinkId: this.data.grouponLinkId
orderId: orderId }, 'POST').then(res => {
}, 'POST').then(function(res) { if (res.errno === 0) {
if (res.errno === 0) { const orderId = res.data.orderId;
const payParam = res.data; util.request(api.OrderPrepay, {
console.log("支付过程开始"); orderId: orderId
wx.requestPayment({ }, 'POST').then(function(res) {
'timeStamp': payParam.timeStamp, if (res.errno === 0) {
'nonceStr': payParam.nonceStr, const payParam = res.data;
'package': payParam.packageValue, console.log("支付过程开始");
'signType': payParam.signType, wx.requestPayment({
'paySign': payParam.paySign, 'timeStamp': payParam.timeStamp,
'success': function(res) { 'nonceStr': payParam.nonceStr,
console.log("支付过程成功"); 'package': payParam.packageValue,
wx.redirectTo({ 'signType': payParam.signType,
url: '/pages/payResult/payResult?status=1&orderId=' + orderId '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) { } else {
console.log("支付过程失败");
wx.redirectTo({ wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId 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 {
wx.redirectTo({
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
});
}
});
}
}); });
\ No newline at end of file
<view class="container"> <view class="container">
<view class="address-box"> <view class="address-box">
<view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}"> <view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
<view class="l"> <view class="l">
<text class="name">{{checkedAddress.name}}</text> <text class="name">{{checkedAddress.name}}</text>
<text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text> <text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text>
</view> </view>
<view class="m"> <view class="m">
<text class="mobile">{{checkedAddress.mobile}}</text> <text class="mobile">{{checkedAddress.mobile}}</text>
<text class="address">{{checkedAddress.address}}</text> <text class="address">{{checkedAddress.address}}</text>
</view> </view>
<view class="r"> <view class="r">
<image src="/static/images/address_right.png"></image> <image src="/static/images/address_right.png"></image>
</view> </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="address-item address-empty" bindtap="selectAddress" wx:else>
<view class="coupon-box"> <view class="m">
<view class="coupon-item"> 还没有收货地址,去添加
<view class="l"> </view>
<text class="name">请选择优惠券</text> <view class="r">
<text class="txt">{{couponList.length}}张</text> <image src="/static/images/address_right.png"></image>
</view> </view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
</view>
</view> </view>
</view>
<view class="message-box"> <view class="coupon-box">
<input class="message-item" bindinput="bindMessageInput" placeholder="如需要,请输入留言" value="{{message}}" /> <view class="coupon-item">
<view class="l">
<text class="name">请选择优惠券</text>
<text class="txt">{{couponList.length}}张</text>
</view>
<view class="r">
<image src="/static/images/address_right.png"></image>
</view>
</view> </view>
</view>
<view class="order-box"> <view class="message-box">
<view class="order-item"> <input class="message-item" bindinput="bindMessageInput" placeholder="如需要,请输入留言" value="{{message}}" />
<view class="l"> </view>
<text class="name">商品合计</text>
</view> <view class="order-box">
<view class="r"> <view class="order-item">
<text class="txt">¥{{goodsTotalPrice}}元</text> <view class="l">
</view> <text class="name">商品合计</text>
</view> </view>
<view class="order-item"> <view class="r">
<view class="l"> <text class="txt">¥{{goodsTotalPrice}}元</text>
<text class="name">运费</text> </view>
</view> </view>
<view class="r"> <view class="order-item">
<text class="txt">¥{{freightPrice}}元</text> <view class="l">
</view> <text class="name">运费</text>
</view> </view>
<view class="order-item no-border"> <view class="r">
<view class="l"> <text class="txt">¥{{freightPrice}}元</text>
<text class="name">优惠券</text> </view>
</view>
<view class="r">
<text class="txt">-¥{{couponPrice}}元</text>
</view>
</view>
</view> </view>
<view class="order-item no-border">
<view class="l">
<text class="name">优惠券</text>
</view>
<view class="r">
<text class="txt">-¥{{couponPrice}}元</text>
</view>
</view>
</view>
<view class="goods-items"> <view class="goods-items">
<view class="item" wx:for="{{checkedGoodsList}}" wx:key="id"> <view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
<view class="img"> <view class="img">
<image src="{{item.picUrl}}"></image> <image src="{{item.picUrl}}"></image>
</view> </view>
<view class="info"> <view class="info">
<view class="t"> <view class="t">
<text class="name">{{item.goodsName}}</text> <text class="name">{{item.goodsName}}</text>
<text class="number">x{{item.number}}</text> <text class="number">x{{item.number}}</text>
</view>
<view class="m">{{item.specifications}}</view>
<view class="b">¥{{item.price}}</view>
</view>
</view> </view>
<view class="m">{{item.specifications}}</view>
<view class="b">¥{{item.price}}</view>
</view>
</view> </view>
</view>
<view class="order-total"> <view class="order-total">
<view class="l">实付:¥{{actualPrice}}</view> <view class="l">实付:¥{{actualPrice}}</view>
<view class="r" bindtap="submitOrder">去付款</view> <view class="r" bindtap="submitOrder">去付款</view>
</view> </view>
</view> </view>
\ No newline at end of file
page{ page {
height: 100%; height: 100%;
background: #f4f4f4; background: #f4f4f4;
} }
.address-box{ .address-box {
width: 100%; width: 100%;
height: 166.55rpx; 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: 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; background-size: 62.5rpx 10.5rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding-top: 10.5rpx; padding-top: 10.5rpx;
} }
.address-item{ .address-item {
display: flex; display: flex;
height: 155.55rpx; height: 155.55rpx;
background: #fff; background: #fff;
padding: 41.6rpx 0 41.6rpx 31.25rpx; padding: 41.6rpx 0 41.6rpx 31.25rpx;
} }
.address-item.address-empty{ .address-item.address-empty {
line-height: 75rpx; line-height: 75rpx;
text-align: center; text-align: center;
} }
.address-box .l{ .address-box .l {
width: 125rpx; width: 125rpx;
height: 100%; height: 100%;
} }
.address-box .l .name{ .address-box .l .name {
margin-left: 6.25rpx; margin-left: 6.25rpx;
margin-top: -7.25rpx; margin-top: -7.25rpx;
display: block; display: block;
width: 125rpx; width: 125rpx;
height: 43rpx; height: 43rpx;
line-height: 43rpx; line-height: 43rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
margin-bottom: 5rpx; margin-bottom: 5rpx;
} }
.address-box .l .default{ .address-box .l .default {
margin-left: 6.25rpx; margin-left: 6.25rpx;
display: block; display: block;
width: 62rpx; width: 62rpx;
height: 33rpx; height: 33rpx;
border-radius: 5rpx; border-radius: 5rpx;
border: 1px solid #b4282d; border: 1px solid #b4282d;
font-size: 20.5rpx; font-size: 20.5rpx;
text-align: center; text-align: center;
line-height: 29rpx; line-height: 29rpx;
color: #b4282d; color: #b4282d;
} }
.address-box .m{ .address-box .m {
flex: 1; flex: 1;
height: 72.25rpx; height: 72.25rpx;
color: #999; color: #999;
} }
.address-box .mobile{ .address-box .mobile {
display: block; display: block;
height: 29rpx; height: 29rpx;
line-height: 29rpx; line-height: 29rpx;
margin-bottom: 6.25rpx; margin-bottom: 6.25rpx;
font-size: 30rpx; font-size: 30rpx;
color:#333; color: #333;
} }
.address-box .address{ .address-box .address {
display: block; display: block;
height: 37.5rpx; height: 37.5rpx;
line-height: 37.5rpx; line-height: 37.5rpx;
font-size: 25rpx; font-size: 25rpx;
color:#666; color: #666;
} }
.address-box .r{ .address-box .r {
width: 77rpx; width: 77rpx;
height: 77rpx; height: 77rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.address-box .r image{ .address-box .r image {
width: 52.078rpx; width: 52.078rpx;
height: 52.078rpx; height: 52.078rpx;
} }
.coupon-box{ .coupon-box {
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
} }
.coupon-box .coupon-item{ .coupon-box .coupon-item {
width: 100%; width: 100%;
height: 108.3rpx; height: 108.3rpx;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
display: flex; display: flex;
padding-left: 31.25rpx; padding-left: 31.25rpx;
} }
.coupon-box .l{ .coupon-box .l {
flex: 1; flex: 1;
height: 43rpx; height: 43rpx;
line-height: 43rpx; line-height: 43rpx;
padding-top: 35rpx; padding-top: 35rpx;
} }
.coupon-box .l .name{ .coupon-box .l .name {
float: left; float: left;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.coupon-box .l .txt{ .coupon-box .l .txt {
float: right; float: right;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.coupon-box .r{ .coupon-box .r {
margin-top: 15.5rpx; margin-top: 15.5rpx;
width: 77rpx; width: 77rpx;
height: 77rpx; height: 77rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.coupon-box .r image{ .coupon-box .r image {
width: 52.078rpx; width: 52.078rpx;
height: 52.078rpx; height: 52.078rpx;
} }
.message-box{ .message-box {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
} }
.message-box .message-item{ .message-box .message-item {
height: 52.078rpx; height: 52.078rpx;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
display: flex; display: flex;
margin-left: 31.25rpx; margin-left: 31.25rpx;
padding-right: 31.25rpx; padding-right: 31.25rpx;
padding-top: 26rpx; padding-top: 26rpx;
} }
.order-box{ .order-box {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
} }
.order-box .order-item{ .order-box .order-item {
height: 104.3rpx; height: 104.3rpx;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
display: flex; display: flex;
margin-left: 31.25rpx; margin-left: 31.25rpx;
padding-right: 31.25rpx; padding-right: 31.25rpx;
padding-top: 26rpx; padding-top: 26rpx;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
} }
.order-box .order-item .l{ .order-box .order-item .l {
float: left; float: left;
height: 52rpx; height: 52rpx;
width: 50%; width: 50%;
line-height: 52rpx; line-height: 52rpx;
overflow: hidden; overflow: hidden;
} }
.order-box .order-item .r{ .order-box .order-item .r {
float: right; float: right;
text-align: right; text-align: right;
width: 50%; width: 50%;
height: 52rpx; height: 52rpx;
line-height: 52rpx; line-height: 52rpx;
overflow: hidden; overflow: hidden;
} }
.order-box .order-item.no-border{ .order-box .order-item.no-border {
border-bottom: none; border-bottom: none;
} }
.goods-items{ .goods-items {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
padding-left: 31.25rpx; padding-left: 31.25rpx;
margin-bottom: 120rpx; margin-bottom: 120rpx;
} }
.goods-items .item{ .goods-items .item {
height: 192rpx; height: 192rpx;
padding-right: 31.25rpx; padding-right: 31.25rpx;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid rgba(0,0,0,0.15); border-bottom: 1px solid rgba(0, 0, 0, 0.15);
} }
.goods-items .item.no-border{ .goods-items .item.no-border {
border-bottom: none; border-bottom: none;
} }
.goods-items .item:last-child {
.goods-items .item:last-child{ border-bottom: none;
border-bottom: none;
} }
.goods-items .img{ .goods-items .img {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
background-color: #f4f4f4; background-color: #f4f4f4;
margin-right: 20rpx; margin-right: 20rpx;
} }
.goods-items .img image{ .goods-items .img image {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
} }
.goods-items .info{ .goods-items .info {
flex: 1; flex: 1;
height: 145.83rpx; height: 145.83rpx;
padding-top: 5rpx; padding-top: 5rpx;
} }
.goods-items .t{ .goods-items .t {
height: 33rpx; height: 33rpx;
line-height: 33rpx; line-height: 33rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
overflow: hidden; overflow: hidden;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.goods-items .t .name{ .goods-items .t .name {
display: block; display: block;
float: left; float: left;
} }
.goods-items .t .number{ .goods-items .t .number {
display: block; display: block;
float: right; float: right;
text-align: right; text-align: right;
} }
.goods-items .m { .goods-items .m {
height: 29rpx; height: 29rpx;
overflow: hidden; overflow: hidden;
line-height: 29rpx; line-height: 29rpx;
margin-bottom: 25rpx; margin-bottom: 25rpx;
font-size: 25rpx; font-size: 25rpx;
color: #666; color: #666;
} }
.goods-items .b { .goods-items .b {
height: 41rpx; height: 41rpx;
overflow: hidden; overflow: hidden;
line-height: 41rpx; line-height: 41rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.order-total{ .order-total {
position: fixed; position: fixed;
left:0; left: 0;
bottom: 0; bottom: 0;
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
display: flex; display: flex;
} }
.order-total .l{ .order-total .l {
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
color: #b4282d; color: #b4282d;
background: #fff; background: #fff;
font-size: 33rpx; font-size: 33rpx;
padding-left: 31.25rpx; padding-left: 31.25rpx;
border-top: 1rpx solid rgba(0,0,0,0.2); border-top: 1rpx solid rgba(0, 0, 0, 0.2);
border-bottom: 1rpx solid rgba(0,0,0,0.2); border-bottom: 1rpx solid rgba(0, 0, 0, 0.2);
} }
.order-total .r{ .order-total .r {
width: 233rpx; width: 233rpx;
height: 100rpx; height: 100rpx;
background: #b4282d; background: #b4282d;
border: 1px solid #b4282d; border: 1px solid #b4282d;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 30rpx; font-size: 30rpx;
} }
\ No newline at end of file
...@@ -16,9 +16,12 @@ Page({ ...@@ -16,9 +16,12 @@ Page({
picPage: 1, picPage: 1,
size: 20 size: 20
}, },
getCommentCount: function () { getCommentCount: function() {
let that = this; let that = this;
util.request(api.CommentCount, { valueId: that.data.valueId, type: that.data.type}).then(function (res) { util.request(api.CommentCount, {
valueId: that.data.valueId,
type: that.data.type
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
allCount: res.data.allCount, allCount: res.data.allCount,
...@@ -27,15 +30,15 @@ Page({ ...@@ -27,15 +30,15 @@ Page({
} }
}); });
}, },
getCommentList: function(){ getCommentList: function() {
let that = this; let that = this;
util.request(api.CommentList, { util.request(api.CommentList, {
valueId: that.data.valueId, valueId: that.data.valueId,
type: that.data.type, type: that.data.type,
size: that.data.size, size: that.data.size,
page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage), page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage),
showType: that.data.showType showType: that.data.showType
}).then(function (res) { }).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
if (that.data.showType == 0) { if (that.data.showType == 0) {
...@@ -54,7 +57,7 @@ Page({ ...@@ -54,7 +57,7 @@ Page({
} }
}); });
}, },
onLoad: function (options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
this.setData({ this.setData({
type: options.type, type: options.type,
...@@ -63,23 +66,23 @@ Page({ ...@@ -63,23 +66,23 @@ Page({
this.getCommentCount(); this.getCommentCount();
this.getCommentList(); this.getCommentList();
}, },
onReady: function () { onReady: function() {
// 页面渲染完成 // 页面渲染完成
}, },
onShow: function () { onShow: function() {
// 页面显示 // 页面显示
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
}, },
switchTab: function () { switchTab: function() {
let that = this; let that = this;
if (that.data.showType == 0) { if (that.data.showType == 0) {
that.setData({ that.setData({
...@@ -98,16 +101,16 @@ Page({ ...@@ -98,16 +101,16 @@ Page({
} }
this.getCommentList(); this.getCommentList();
}, },
onReachBottom: function(){ onReachBottom: function() {
console.log('onPullDownRefresh'); console.log('onPullDownRefresh');
if ( this.data.showType == 0) { if (this.data.showType == 0) {
if (this.data.allCount / this.data.size < this.data.allPage) { if (this.data.allCount / this.data.size < this.data.allPage) {
return false; return false;
} }
this.setData({ this.setData({
'allPage' : this.data.allPage + 1 'allPage': this.data.allPage + 1
}); });
} else { } else {
if (this.data.hasPicCount / this.data.size < this.data.picPage) { if (this.data.hasPicCount / this.data.size < this.data.picPage) {
......
<view class="comments"> <view class="comments">
<view class="h"> <view class="h">
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab"> <view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab">
<view class="txt">全部({{allCount}})</view> <view class="txt">全部({{allCount}})</view>
</view>
<view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
<view class="txt">有图({{hasPicCount}})</view>
</view>
</view> </view>
<view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
<view class="txt">有图({{hasPicCount}})</view>
</view>
</view>
<view class="b"> <view class="b">
<view class="item" wx:for="{{comments}}" wx:key="id"> <view class="item" wx:for="{{comments}}" wx:key="id">
<view class="info"> <view class="info">
......
.comments{ .comments {
width: 100%; width: 100%;
height: auto; height: auto;
padding-left:30rpx; padding-left: 30rpx;
background: #fff; background: #fff;
margin: 20rpx 0; margin: 20rpx 0;
} }
.comments .h{ .comments .h {
position: fixed; position: fixed;
left:0; left: 0;
top:0; top: 0;
z-index: 1000; z-index: 1000;
width: 100%; width: 100%;
display: flex; display: flex;
background: #fff; background: #fff;
height: 84rpx; height: 84rpx;
border-bottom: 1px solid rgba(0,0,0,.15); border-bottom: 1px solid rgba(0, 0, 0, 0.15);
} }
.comments .h .item{ .comments .h .item {
display: inline-block; display: inline-block;
height: 82rpx; height: 82rpx;
width: 50%; width: 50%;
padding: 0 15rpx; padding: 0 15rpx;
text-align: center; text-align: center;
} }
.comments .h .item .txt{ .comments .h .item .txt {
display: inline-block; display: inline-block;
height: 82rpx; height: 82rpx;
padding: 0 20rpx; padding: 0 20rpx;
line-height: 82rpx; line-height: 82rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
width: 170rpx; width: 170rpx;
} }
.comments .h .item.active .txt{ .comments .h .item.active .txt {
color: #ab2b2b; color: #ab2b2b;
border-bottom: 4rpx solid #ab2b2b; border-bottom: 4rpx solid #ab2b2b;
} }
.comments .b{ .comments .b {
margin-top: 85rpx; margin-top: 85rpx;
height: auto; height: auto;
width: 720rpx; width: 720rpx;
} }
.comments .b.no-h{ .comments .b.no-h {
margin-top: 0; margin-top: 0;
} }
.comments .item{ .comments .item {
height: auto; height: auto;
width: 720rpx; width: 720rpx;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #d9d9d9; border-bottom: 1px solid #d9d9d9;
padding-bottom: 25rpx; padding-bottom: 25rpx;
} }
.comments .info{ .comments .info {
height: 127rpx; height: 127rpx;
width: 100%; width: 100%;
padding: 33rpx 0 27rpx 0; padding: 33rpx 0 27rpx 0;
} }
.comments .user{ .comments .user {
float: left; float: left;
width: auto; width: auto;
height: 67rpx; height: 67rpx;
line-height: 67rpx; line-height: 67rpx;
font-size: 0; font-size: 0;
} }
.comments .user image{ .comments .user image {
float: left; float: left;
width: 67rpx; width: 67rpx;
height: 67rpx; height: 67rpx;
margin-right: 17rpx; margin-right: 17rpx;
border-radius: 50%; border-radius: 50%;
} }
.comments .user text{ .comments .user text {
display: inline-block; display: inline-block;
width: auto; width: auto;
height: 66rpx; height: 66rpx;
overflow: hidden; overflow: hidden;
font-size: 29rpx; font-size: 29rpx;
line-height: 66rpx; line-height: 66rpx;
} }
.comments .time{ .comments .time {
display: block; display: block;
float: right; float: right;
width: auto; width: auto;
height: 67rpx; height: 67rpx;
line-height: 67rpx; line-height: 67rpx;
color: #7f7f7f; color: #7f7f7f;
font-size: 25rpx; font-size: 25rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
.comments .comment{ .comments .comment {
width: 720rpx; width: 720rpx;
padding-right: 30rpx; padding-right: 30rpx;
line-height: 45.8rpx; line-height: 45.8rpx;
font-size: 29rpx; font-size: 29rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.comments .imgs{ .comments .imgs {
width: 720rpx; width: 720rpx;
height: 150rpx; height: 150rpx;
margin-bottom: 25rpx; margin-bottom: 25rpx;
} }
.comments .imgs .img{ .comments .imgs .img {
height: 150rpx; height: 150rpx;
width: 150rpx; width: 150rpx;
margin-right: 28rpx; margin-right: 28rpx;
} }
.comments .spec{ .comments .spec {
width: 720rpx; width: 720rpx;
height: 25rpx; height: 25rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.comments .spec .item{ .comments .spec .item {
color: #7f7f7f; color: #7f7f7f;
font-size: 25rpx; font-size: 25rpx;
} }
.comments .customer-service{ .comments .customer-service {
width: 690rpx; width: 690rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
margin-top: 23rpx; margin-top: 23rpx;
background: rgba(0,0,0,.03); background: rgba(0, 0, 0, 0.03);
padding: 21rpx; padding: 21rpx;
} }
.comments .customer-service .u {
.comments .customer-service .u{ font-size: 24rpx;
font-size: 24rpx; color: #333;
color: #333; line-height: 37.5rpx;
line-height: 37.5rpx;
} }
.comments .customer-service .c{ .comments .customer-service .c {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
line-height: 37.5rpx; line-height: 37.5rpx;
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ Page({ ...@@ -16,7 +16,7 @@ Page({
picUrls: [], picUrls: [],
files: [] files: []
}, },
chooseImage: function (e) { chooseImage: function(e) {
if (this.data.files.length >= 5) { if (this.data.files.length >= 5) {
util.showErrorToast('只能上传五张图片') util.showErrorToast('只能上传五张图片')
return false; return false;
...@@ -27,7 +27,7 @@ Page({ ...@@ -27,7 +27,7 @@ Page({
count: 1, count: 1,
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: function (res) { success: function(res) {
that.setData({ that.setData({
files: that.data.files.concat(res.tempFilePaths) files: that.data.files.concat(res.tempFilePaths)
}); });
...@@ -35,13 +35,13 @@ Page({ ...@@ -35,13 +35,13 @@ Page({
} }
}) })
}, },
upload: function (res) { upload: function(res) {
var that = this; var that = this;
const uploadTask = wx.uploadFile({ const uploadTask = wx.uploadFile({
url: api.StorageUpload, url: api.StorageUpload,
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
name: 'file', name: 'file',
success: function (res) { success: function(res) {
var _res = JSON.parse(res.data); var _res = JSON.parse(res.data);
if (_res.errno === 0) { if (_res.errno === 0) {
var url = _res.data.url var url = _res.data.url
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
}) })
} }
}, },
fail: function (e) { fail: function(e) {
wx.showModal({ wx.showModal({
title: '错误', title: '错误',
content: '上传失败', content: '上传失败',
...@@ -68,28 +68,24 @@ Page({ ...@@ -68,28 +68,24 @@ Page({
}) })
}, },
previewImage: function (e) { previewImage: function(e) {
wx.previewImage({ wx.previewImage({
current: e.currentTarget.id, // 当前显示图片的http链接 current: e.currentTarget.id, // 当前显示图片的http链接
urls: this.data.files // 需要预览的图片http链接列表 urls: this.data.files // 需要预览的图片http链接列表
}) })
}, },
selectRater: function (e) { selectRater: function(e) {
var star = e.currentTarget.dataset.star + 1; var star = e.currentTarget.dataset.star + 1;
var starText; var starText;
if (star == 1) { if (star == 1) {
starText = '很差'; starText = '很差';
} } else if (star == 2) {
else if (star == 2) {
starText = '不太满意'; starText = '不太满意';
} } else if (star == 3) {
else if (star == 3) {
starText = '满意'; starText = '满意';
} } else if (star == 4) {
else if (star == 4) {
starText = '比较满意'; starText = '比较满意';
} } else {
else {
starText = '十分满意' starText = '十分满意'
} }
this.setData({ this.setData({
...@@ -98,7 +94,7 @@ Page({ ...@@ -98,7 +94,7 @@ Page({
}) })
}, },
onLoad: function (options) { onLoad: function(options) {
var that = this; var that = this;
that.setData({ that.setData({
orderId: options.orderId, orderId: options.orderId,
...@@ -107,11 +103,12 @@ Page({ ...@@ -107,11 +103,12 @@ Page({
}); });
this.getOrderGoods(); this.getOrderGoods();
}, },
getOrderGoods: function () { getOrderGoods: function() {
let that = this; let that = this;
util.request(api.OrderGoods, { util.request(api.OrderGoods, {
orderId: that.data.orderId, goodsId: that.data.valueId orderId: that.data.orderId,
}).then(function (res) { goodsId: that.data.valueId
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
orderGoods: res.data, orderGoods: res.data,
...@@ -119,10 +116,10 @@ Page({ ...@@ -119,10 +116,10 @@ Page({
} }
}); });
}, },
onClose: function () { onClose: function() {
wx.navigateBack(); wx.navigateBack();
}, },
onPost: function () { onPost: function() {
let that = this; let that = this;
if (!this.data.content) { if (!this.data.content) {
...@@ -136,11 +133,11 @@ Page({ ...@@ -136,11 +133,11 @@ Page({
star: that.data.star, star: that.data.star,
hasPicture: that.data.hasPicture, hasPicture: that.data.hasPicture,
picUrls: that.data.picUrls picUrls: that.data.picUrls
}, 'POST').then(function (res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '评论成功', title: '评论成功',
complete: function () { complete: function() {
wx.switchTab({ wx.switchTab({
url: '/pages/ucenter/index/index' url: '/pages/ucenter/index/index'
}) })
...@@ -162,18 +159,18 @@ Page({ ...@@ -162,18 +159,18 @@ Page({
content: event.detail.value, content: event.detail.value,
}) })
}, },
onReady: function () { onReady: function() {
}, },
onShow: function () { onShow: function() {
// 页面显示 // 页面显示
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<view class="c"> <view class="c">
<text class="desc">{{goods.goodsBrief}}</text> <text class="desc">{{goods.goodsBrief}}</text>
......
...@@ -823,7 +823,6 @@ ...@@ -823,7 +823,6 @@
line-height: 65rpx; line-height: 65rpx;
} }
.contact { .contact {
height: 100rpx; height: 100rpx;
width: 100rpx; width: 100rpx;
...@@ -932,6 +931,7 @@ ...@@ -932,6 +931,7 @@
height: 128rpx; height: 128rpx;
margin-top: 0rpx; margin-top: 0rpx;
} }
.sharebtn_text { .sharebtn_text {
/* border: 1px solid #757575; */ /* border: 1px solid #757575; */
width: 150rpx; width: 150rpx;
...@@ -941,8 +941,9 @@ ...@@ -941,8 +941,9 @@
font-size: 20rpx; font-size: 20rpx;
color: #555; color: #555;
} }
.separate { .separate {
background: #e0e3da; background: #e0e3da;
width: 100%; width: 100%;
height: 6rpx; height: 6rpx;
} }
\ No newline at end of file
...@@ -2,289 +2,289 @@ var util = require('../../../utils/util.js'); ...@@ -2,289 +2,289 @@ var util = require('../../../utils/util.js');
var api = require('../../../config/api.js'); var api = require('../../../config/api.js');
Page({ Page({
data: { data: {
id: 0, id: 0,
orderId: 0, orderId: 0,
groupon: {}, groupon: {},
linkGrouponId: 0, linkGrouponId: 0,
joiners: [], joiners: [],
orderInfo: {}, orderInfo: {},
orderGoods: [], orderGoods: [],
expressInfo: {}, expressInfo: {},
flag: false, flag: false,
handleOption: {} handleOption: {}
}, },
onLoad: function(options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
this.setData({ this.setData({
id: options.id id: options.id
}); });
this.getOrderDetail(); this.getOrderDetail();
}, },
// 页面分享
onShareAppMessage: function() {
let that = this;
return {
title: '邀请团购',
desc: '唯爱与美食不可辜负',
path: '/pages/index/index?grouponId=' + this.data.linkGrouponId
}
},
shareGroupon: function() { // 页面分享
let that = this; onShareAppMessage: function() {
wx.showActionSheet({ let that = this;
itemList: ['分享给朋友', '分享到朋友圈'], return {
success: function(res) { title: '邀请团购',
if (res.tapIndex == 0) { desc: '唯爱与美食不可辜负',
wx.showModal({ path: '/pages/index/index?grouponId=' + this.data.linkGrouponId
title: '提示',
content: '点击右上角 "..." 转发给朋友',
showCancel: false
});
} else if (res.tapIndex == 1) {
that.saveShare();
} else {
console.log(res.tapIndex);
} }
}, },
fail: function(res) {
console.log(res.errMsg);
}
})
},
// 保存分享图 shareGroupon: function() {
saveShare: function() { let that = this;
let that = this; wx.showActionSheet({
wx.downloadFile({ itemList: ['分享给朋友', '分享到朋友圈'],
url: that.data.groupon.shareUrl, success: function(res) {
success: function(res) { if (res.tapIndex == 0) {
console.log(res) wx.showModal({
wx.saveImageToPhotosAlbum({ title: '提示',
filePath: res.tempFilePath, content: '点击右上角 "..." 转发给朋友',
success: function(res) { showCancel: false
wx.showModal({ });
title: '存图成功', } else if (res.tapIndex == 1) {
content: '图片成功保存到相册了,可以分享到朋友圈了', that.saveShare();
showCancel: false, } else {
confirmText: '好的', console.log(res.tapIndex);
confirmColor: '#a78845',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} }
} },
}) fail: function(res) {
}, console.log(res.errMsg);
fail: function(res) { }
console.log('fail')
}
}) })
}, },
fail: function() {
console.log('fail')
}
})
},
onPullDownRefresh() { // 保存分享图
wx.showNavigationBarLoading() //在标题栏中显示加载 saveShare: function() {
this.getOrderDetail(); let that = this;
wx.hideNavigationBarLoading() //完成停止加载 wx.downloadFile({
wx.stopPullDownRefresh() //停止下拉刷新 url: that.data.groupon.shareUrl,
}, success: function(res) {
console.log(res)
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function(res) {
wx.showModal({
title: '存图成功',
content: '图片成功保存到相册了,可以分享到朋友圈了',
showCancel: false,
confirmText: '好的',
confirmColor: '#a78845',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
}
}
})
},
fail: function(res) {
console.log('fail')
}
})
},
fail: function() {
console.log('fail')
}
})
},
//获取物流信息 onPullDownRefresh() {
getOrderExpress: function() { wx.showNavigationBarLoading() //在标题栏中显示加载
let that = this; this.getOrderDetail();
util.request(api.ExpressQuery, { wx.hideNavigationBarLoading() //完成停止加载
expCode: that.data.orderInfo.expCode, wx.stopPullDownRefresh() //停止下拉刷新
expNo: that.data.orderInfo.expNo },
}, 'POST').then(function(res) {
if (res.errno === 0) { //获取物流信息
that.setData({ getOrderExpress: function() {
expressInfo: res.data let that = this;
}); util.request(api.ExpressQuery, {
} expCode: that.data.orderInfo.expCode,
}); expNo: that.data.orderInfo.expNo
}, }, 'POST').then(function(res) {
expandDetail: function() { if (res.errno === 0) {
let that = this; that.setData({
this.setData({ expressInfo: res.data
flag: !that.data.flag });
}) }
},
getOrderDetail: function() {
let that = this;
util.request(api.GroupOnDetail, {
grouponId: that.data.id
}).then(function(res) {
if (res.errno === 0) {
that.setData({
joiners: res.data.joiners,
groupon: res.data.groupon,
linkGrouponId: res.data.linkGrouponId,
orderId: res.data.orderInfo.id,
orderInfo: res.data.orderInfo,
orderGoods: res.data.orderGoods,
handleOption: res.data.orderInfo.handleOption
}); });
},
expandDetail: function() {
let that = this;
this.setData({
flag: !that.data.flag
})
},
getOrderDetail: function() {
let that = this;
util.request(api.GroupOnDetail, {
grouponId: that.data.id
}).then(function(res) {
if (res.errno === 0) {
that.setData({
joiners: res.data.joiners,
groupon: res.data.groupon,
linkGrouponId: res.data.linkGrouponId,
orderId: res.data.orderInfo.id,
orderInfo: res.data.orderInfo,
orderGoods: res.data.orderGoods,
handleOption: res.data.orderInfo.handleOption
});
// 请求物流信息,仅当订单状态为发货时才请求 // 请求物流信息,仅当订单状态为发货时才请求
if (res.data.orderInfo.handleOption.confirm) { if (res.data.orderInfo.handleOption.confirm) {
that.getOrderExpress(); that.getOrderExpress();
} }
} }
}); });
}, },
// “去付款”按钮点击效果 // “去付款”按钮点击效果
payOrder: function() { payOrder: function() {
let that = this; let that = this;
util.request(api.OrderPrepay, { util.request(api.OrderPrepay, {
orderId: that.data.orderId orderId: that.data.orderId
}, 'POST').then(function(res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
const payParam = res.data; const payParam = res.data;
console.log("支付过程开始"); console.log("支付过程开始");
wx.requestPayment({ wx.requestPayment({
'timeStamp': payParam.timeStamp, 'timeStamp': payParam.timeStamp,
'nonceStr': payParam.nonceStr, 'nonceStr': payParam.nonceStr,
'package': payParam.packageValue, 'package': payParam.packageValue,
'signType': payParam.signType, 'signType': payParam.signType,
'paySign': payParam.paySign, 'paySign': payParam.paySign,
'success': function(res) { 'success': function(res) {
console.log("支付过程成功"); console.log("支付过程成功");
util.redirect('/pages/ucenter/order/order'); util.redirect('/pages/ucenter/order/order');
}, },
'fail': function(res) { 'fail': function(res) {
console.log("支付过程失败"); console.log("支付过程失败");
util.showErrorToast('支付失败'); util.showErrorToast('支付失败');
}, },
'complete': function(res) { 'complete': function(res) {
console.log("支付过程结束") console.log("支付过程结束")
} }
});
}
}); });
}
});
}, },
// “取消订单”点击效果 // “取消订单”点击效果
cancelOrder: function() { cancelOrder: function() {
let that = this; let that = this;
let orderInfo = that.data.orderInfo; let orderInfo = that.data.orderInfo;
wx.showModal({ wx.showModal({
title: '', title: '',
content: '确定要取消此订单?', content: '确定要取消此订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
util.request(api.OrderCancel, { util.request(api.OrderCancel, {
orderId: orderInfo.id orderId: orderInfo.id
}, 'POST').then(function(res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '取消订单成功' title: '取消订单成功'
}); });
util.redirect('/pages/ucenter/order/order'); util.redirect('/pages/ucenter/order/order');
} else { } else {
util.showErrorToast(res.errmsg); util.showErrorToast(res.errmsg);
}
});
}
} }
}); });
} },
} // “取消订单并退款”点击效果
}); refundOrder: function() {
}, let that = this;
// “取消订单并退款”点击效果 let orderInfo = that.data.orderInfo;
refundOrder: function() {
let that = this;
let orderInfo = that.data.orderInfo;
wx.showModal({ wx.showModal({
title: '', title: '',
content: '确定要取消此订单?', content: '确定要取消此订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
util.request(api.OrderRefund, { util.request(api.OrderRefund, {
orderId: orderInfo.id orderId: orderInfo.id
}, 'POST').then(function(res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '取消订单成功' title: '取消订单成功'
}); });
util.redirect('/pages/ucenter/order/order'); util.redirect('/pages/ucenter/order/order');
} else { } else {
util.showErrorToast(res.errmsg); util.showErrorToast(res.errmsg);
}
});
}
} }
}); });
} },
} // “删除”点击效果
}); deleteOrder: function() {
}, let that = this;
// “删除”点击效果 let orderInfo = that.data.orderInfo;
deleteOrder: function() {
let that = this;
let orderInfo = that.data.orderInfo;
wx.showModal({ wx.showModal({
title: '', title: '',
content: '确定要删除此订单?', content: '确定要删除此订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
util.request(api.OrderDelete, { util.request(api.OrderDelete, {
orderId: orderInfo.id orderId: orderInfo.id
}, 'POST').then(function(res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '删除订单成功' title: '删除订单成功'
}); });
util.redirect('/pages/ucenter/order/order'); util.redirect('/pages/ucenter/order/order');
} else { } else {
util.showErrorToast(res.errmsg); util.showErrorToast(res.errmsg);
}
});
}
} }
}); });
} },
} // “确认收货”点击效果
}); confirmOrder: function() {
}, let that = this;
// “确认收货”点击效果 let orderInfo = that.data.orderInfo;
confirmOrder: function() {
let that = this;
let orderInfo = that.data.orderInfo;
wx.showModal({ wx.showModal({
title: '', title: '',
content: '确认收货?', content: '确认收货?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
util.request(api.OrderConfirm, { util.request(api.OrderConfirm, {
orderId: orderInfo.id orderId: orderInfo.id
}, 'POST').then(function(res) { }, 'POST').then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
wx.showToast({ wx.showToast({
title: '确认收货成功!' title: '确认收货成功!'
}); });
util.redirect('/pages/ucenter/order/order'); util.redirect('/pages/ucenter/order/order');
} else { } else {
util.showErrorToast(res.errmsg); util.showErrorToast(res.errmsg);
}
});
}
} }
}); });
} },
} onReady: function() {
}); // 页面渲染完成
}, },
onReady: function() { onShow: function() {
// 页面渲染完成 // 页面显示
}, },
onShow: function() { onHide: function() {
// 页面显示 // 页面隐藏
}, },
onHide: function() { onUnload: function() {
// 页面隐藏 // 页面关闭
}, }
onUnload: function() {
// 页面关闭
}
}); });
\ No newline at end of file
{ {
"navigationBarTitleText": "团购详情" "navigationBarTitleText": "团购详情"
} }
\ No newline at end of file
<view class="container"> <view class="container">
<view class="order-info"> <view class="order-info">
<view class="item-a">下单时间:{{orderInfo.addTime}}</view> <view class="item-a">下单时间:{{orderInfo.addTime}}</view>
<view class="item-b">订单编号:{{orderInfo.orderSn}}</view> <view class="item-b">订单编号:{{orderInfo.orderSn}}</view>
<view class="item-c"> <view class="item-c">
<view class="l">实付: <view class="l">实付:
<text class="cost">¥{{orderInfo.actualPrice}}</text> <text class="cost">¥{{orderInfo.actualPrice}}</text>
</view> </view>
<view class="r"> <view class="r">
<view class="btn active" bindtap="shareGroupon">邀请参团</view> <view class="btn active" bindtap="shareGroupon">邀请参团</view>
</view> </view>
</view> </view>
</view>
<view class="menu-list-pro">
<view class="h">
<view class="label">参与团购 ( {{joiners.length}}人)</view>
<view class="status">查看全部</view>
</view>
<view class="menu-list-item" wx:for-items="{{joiners}}" wx:key="id" data-id="{{item.id}}">
<image class="icon" src="{{item.avatar}}"></image>
<text class="txt">{{item.nickname}}</text>
</view> </view>
</view>
<view class="order-goods"> <view class="menu-list-pro">
<view class="h"> <view class="h">
<view class="label">商品信息</view> <view class="label">参与团购 ( {{joiners.length}}人)</view>
<view class="status">{{orderInfo.orderStatusText}}</view> <view class="status">查看全部</view>
</view>
<view class="goods">
<view class="item" wx:for="{{orderGoods}}" wx:key="id">
<view class="img">
<image src="{{item.picUrl}}"></image>
</view> </view>
<view class="info"> <view class="menu-list-item" wx:for-items="{{joiners}}" wx:key="id" data-id="{{item.id}}">
<view class="t"> <image class="icon" src="{{item.avatar}}"></image>
<text class="name">{{item.goodsName}}</text> <text class="txt">{{item.nickname}}</text>
<text class="number">x{{item.number}}</text>
</view>
<view class="attr">{{item.goodsSpecificationValues}}</view>
<view class="price">¥{{item.retailPrice}}</view>
</view> </view>
</view>
</view> </view>
<view class="order-bottom"> <view class="order-goods">
<view class="address"> <view class="h">
<view class="t"> <view class="label">商品信息</view>
<text class="name">{{orderInfo.consignee}}</text> <view class="status">{{orderInfo.orderStatusText}}</view>
<text class="mobile">{{orderInfo.mobile}}</text>
</view> </view>
<view class="b">{{orderInfo.address}}</view> <view class="goods">
</view> <view class="item" wx:for="{{orderGoods}}" wx:key="id">
<view class="total"> <view class="img">
<view class="t"> <image src="{{item.picUrl}}"></image>
<text class="label">商品合计:</text> </view>
<text class="txt">¥{{orderInfo.goodsPrice}}</text> <view class="info">
<view class="t">
<text class="name">{{item.goodsName}}</text>
<text class="number">x{{item.number}}</text>
</view>
<view class="attr">{{item.goodsSpecificationValues}}</view>
<view class="price">¥{{item.retailPrice}}</view>
</view>
</view>
</view> </view>
<view class="t">
<text class="label">运费:</text> <view class="order-bottom">
<text class="txt">¥{{orderInfo.freightPrice}}</text> <view class="address">
<view class="t">
<text class="name">{{orderInfo.consignee}}</text>
<text class="mobile">{{orderInfo.mobile}}</text>
</view>
<view class="b">{{orderInfo.address}}</view>
</view>
<view class="total">
<view class="t">
<text class="label">商品合计:</text>
<text class="txt">¥{{orderInfo.goodsPrice}}</text>
</view>
<view class="t">
<text class="label">运费:</text>
<text class="txt">¥{{orderInfo.freightPrice}}</text>
</view>
</view>
<view class="pay-fee">
<text class="label">实付:</text>
<text class="txt">¥{{orderInfo.actualPrice}}</text>
</view>
</view> </view>
</view>
<view class="pay-fee">
<text class="label">实付:</text>
<text class="txt">¥{{orderInfo.actualPrice}}</text>
</view>
</view> </view>
</view>
<!-- 物流信息,仅收货状态下可见 --> <!-- 物流信息,仅收货状态下可见 -->
<view class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}"> <view class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
<view class="expand"> <view class="expand">
<view class="title"> <view class="title">
<view class="t">快递公司:{{expressInfo.expName}}</view> <view class="t">快递公司:{{expressInfo.expName}}</view>
<view class="b">物流单号:{{expressInfo.expCode}}</view> <view class="b">物流单号:{{expressInfo.expCode}}</view>
</view> </view>
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image> <image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
</view> </view>
<!-- <view class="order-express" > --> <!-- <view class="order-express" > -->
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}"> <view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
<view class="trace"> <view class="trace">
<view class="acceptStation">{{iitem.AcceptStation}}</view> <view class="acceptStation">{{iitem.AcceptStation}}</view>
<view class="acceptTime">{{iitem.AcceptTime}}</view> <view class="acceptTime">{{iitem.AcceptTime}}</view>
</view> </view>
</view>
</view> </view>
</view> <!-- </view> -->
<!-- </view> -->
</view> </view>
\ No newline at end of file
page { page {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: #f4f4f4; background: #f4f4f4;
} }
.order-info { .order-info {
padding-top: 25rpx; padding-top: 25rpx;
background: #fff; background: #fff;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
} }
.item-a { .item-a {
padding-left: 31.25rpx; padding-left: 31.25rpx;
height: 42.5rpx; height: 42.5rpx;
padding-bottom: 12.5rpx; padding-bottom: 12.5rpx;
line-height: 30rpx; line-height: 30rpx;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.item-b { .item-b {
padding-left: 31.25rpx; padding-left: 31.25rpx;
height: 29rpx; height: 29rpx;
line-height: 29rpx; line-height: 29rpx;
margin-top: 12.5rpx; margin-top: 12.5rpx;
margin-bottom: 41.5rpx; margin-bottom: 41.5rpx;
font-size: 30rpx; font-size: 30rpx;
color: #666; color: #666;
} }
.item-c { .item-c {
margin-left: 31.25rpx; margin-left: 31.25rpx;
border-top: 1px solid #f4f4f4; border-top: 1px solid #f4f4f4;
height: 103rpx; height: 103rpx;
line-height: 103rpx; line-height: 103rpx;
} }
.item-c .l { .item-c .l {
float: left; float: left;
} }
.item-c .r { .item-c .r {
height: 103rpx; height: 103rpx;
float: right; float: right;
display: flex; display: flex;
align-items: center; align-items: center;
padding-right: 16rpx; padding-right: 16rpx;
} }
.item-c .r .btn { .item-c .r .btn {
float: right; float: right;
} }
.item-c .cost { .item-c .cost {
color: #b4282d; color: #b4282d;
} }
.item-c .btn { .item-c .btn {
line-height: 66rpx; line-height: 66rpx;
border-radius: 5rpx; border-radius: 5rpx;
text-align: center; text-align: center;
margin: 0 15rpx; margin: 0 15rpx;
padding: 0 20rpx; padding: 0 20rpx;
height: 66rpx; height: 66rpx;
} }
.item-c .btn.active { .item-c .btn.active {
background: #a78845; background: #a78845;
color: #fff; color: #fff;
} }
.order-goods { .order-goods {
margin-top: 20rpx; margin-top: 20rpx;
background: #fff; background: #fff;
} }
.order-goods .h { .order-goods .h {
height: 93.75rpx; height: 93.75rpx;
line-height: 93.75rpx; line-height: 93.75rpx;
margin-left: 31.25rpx; margin-left: 31.25rpx;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
padding-right: 31.25rpx; padding-right: 31.25rpx;
} }
.order-goods .h .label { .order-goods .h .label {
float: left; float: left;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.order-goods .h .status { .order-goods .h .status {
float: right; float: right;
font-size: 30rpx; font-size: 30rpx;
color: #b4282d; color: #b4282d;
} }
.order-goods .item { .order-goods .item {
display: flex; display: flex;
align-items: center; align-items: center;
height: 192rpx; height: 192rpx;
margin-left: 31.25rpx; margin-left: 31.25rpx;
padding-right: 31.25rpx; padding-right: 31.25rpx;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
} }
.order-goods .item:last-child { .order-goods .item:last-child {
border-bottom: none; border-bottom: none;
} }
.order-goods .item .img { .order-goods .item .img {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
background: #f4f4f4; background: #f4f4f4;
} }
.order-goods .item .img image { .order-goods .item .img image {
height: 145.83rpx; height: 145.83rpx;
width: 145.83rpx; width: 145.83rpx;
} }
.order-goods .item .info { .order-goods .item .info {
flex: 1; flex: 1;
height: 145.83rpx; height: 145.83rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
.order-goods .item .t { .order-goods .item .t {
margin-top: 8rpx; margin-top: 8rpx;
height: 33rpx; height: 33rpx;
line-height: 33rpx; line-height: 33rpx;
margin-bottom: 10.5rpx; margin-bottom: 10.5rpx;
} }
.order-goods .item .t .name { .order-goods .item .t .name {
display: block; display: block;
float: left; float: left;
height: 33rpx; height: 33rpx;
line-height: 33rpx; line-height: 33rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
} }
.order-goods .item .t .number { .order-goods .item .t .number {
display: block; display: block;
float: right; float: right;
height: 33rpx; height: 33rpx;
text-align: right; text-align: right;
line-height: 33rpx; line-height: 33rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
} }
.order-goods .item .attr { .order-goods .item .attr {
height: 29rpx; height: 29rpx;
line-height: 29rpx; line-height: 29rpx;
color: #666; color: #666;
margin-bottom: 25rpx; margin-bottom: 25rpx;
font-size: 25rpx; font-size: 25rpx;
} }
.order-goods .item .price { .order-goods .item .price {
display: block; display: block;
float: left; float: left;
height: 30rpx; height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
color: #333; color: #333;
font-size: 30rpx; font-size: 30rpx;
} }
.order-goods .item .btn { .order-goods .item .btn {
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
border-radius: 5rpx; border-radius: 5rpx;
text-align: center; text-align: center;
display: block; display: block;
float: right; float: right;
margin: 0 15rpx; margin: 0 15rpx;
padding: 0 20rpx; padding: 0 20rpx;
} }
.order-goods .item .btn.active { .order-goods .item .btn.active {
background: #b4282d; background: #b4282d;
color: #fff; color: #fff;
} }
.order-bottom { .order-bottom {
margin-top: 20rpx; margin-top: 20rpx;
padding-left: 31.25rpx; padding-left: 31.25rpx;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
} }
.order-bottom .address { .order-bottom .address {
height: 128rpx; height: 128rpx;
padding-top: 25rpx; padding-top: 25rpx;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
} }
.order-bottom .address .t { .order-bottom .address .t {
height: 35rpx; height: 35rpx;
line-height: 35rpx; line-height: 35rpx;
margin-bottom: 7.5rpx; margin-bottom: 7.5rpx;
} }
.order-bottom .address .name { .order-bottom .address .name {
display: inline-block; display: inline-block;
height: 35rpx; height: 35rpx;
width: 140rpx; width: 140rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.order-bottom .address .mobile { .order-bottom .address .mobile {
display: inline-block; display: inline-block;
height: 35rpx; height: 35rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.order-bottom .address .b { .order-bottom .address .b {
height: 35rpx; height: 35rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.order-bottom .total { .order-bottom .total {
height: 106rpx; height: 106rpx;
padding-top: 20rpx; padding-top: 20rpx;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
} }
.order-bottom .total .t { .order-bottom .total .t {
height: 30rpx; height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
margin-bottom: 7.5rpx; margin-bottom: 7.5rpx;
display: flex; display: flex;
} }
.order-bottom .total .label { .order-bottom .total .label {
width: 150rpx; width: 150rpx;
display: inline-block; display: inline-block;
height: 35rpx; height: 35rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.order-bottom .total .txt { .order-bottom .total .txt {
flex: 1; flex: 1;
display: inline-block; display: inline-block;
height: 35rpx; height: 35rpx;
line-height: 35rpx; line-height: 35rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.order-bottom .pay-fee { .order-bottom .pay-fee {
height: 81rpx; height: 81rpx;
line-height: 81rpx; line-height: 81rpx;
} }
.order-bottom .pay-fee .label { .order-bottom .pay-fee .label {
display: inline-block; display: inline-block;
width: 140rpx; width: 140rpx;
color: #b4282d; color: #b4282d;
} }
.order-bottom .pay-fee .txt { .order-bottom .pay-fee .txt {
display: inline-block; display: inline-block;
width: 140rpx; width: 140rpx;
color: #b4282d; color: #b4282d;
} }
.order-express { .order-express {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background: #fff; background: #fff;
} }
.order-express .expand { .order-express .expand {
/* margin-top: 20rpx; */ /* margin-top: 20rpx; */
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background: #fff; background: #fff;
/* border: 10rpx #a78845; */ /* border: 10rpx #a78845; */
} }
.order-express .title { .order-express .title {
float: left; float: left;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding: 10rpx; padding: 10rpx;
} }
.order-express .ti { .order-express .ti {
float: right; float: right;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
margin-right: 16rpx; margin-right: 16rpx;
margin-top: 28rpx; margin-top: 28rpx;
} }
.order-express .t { .order-express .t {
font-size: 29rpx; font-size: 29rpx;
margin-left: 10.25rpx; margin-left: 10.25rpx;
color: #a78845; color: #a78845;
} }
.order-express .b { .order-express .b {
font-size: 29rpx; font-size: 29rpx;
margin-left: 10.25rpx; margin-left: 10.25rpx;
color: #a78845; color: #a78845;
} }
.order-express .traces { .order-express .traces {
padding: 17.5rpx; padding: 17.5rpx;
background: #fff; background: #fff;
border-bottom: 1rpx solid #f1e6cdcc; border-bottom: 1rpx solid #f1e6cdcc;
} }
.order-express .trace { .order-express .trace {
padding-bottom: 17.5rpx; padding-bottom: 17.5rpx;
padding-top: 17.5rpx; padding-top: 17.5rpx;
background: #fff; background: #fff;
} }
.order-express .acceptTime { .order-express .acceptTime {
margin-top: 20rpx; margin-top: 20rpx;
margin-right: 40rpx; margin-right: 40rpx;
text-align: right; text-align: right;
font-size: 26rpx; font-size: 26rpx;
} }
.order-express .acceptStation { .order-express .acceptStation {
font-size: 26rpx; font-size: 26rpx;
} }
.menu-list-pro { .menu-list-pro {
margin-top: 20rpx; margin-top: 20rpx;
overflow-x: scroll; overflow-x: scroll;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
height: 260rpx; height: 260rpx;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-bottom: 1rpx #cfc9ca; border-bottom: 1rpx #cfc9ca;
background-color: #fff; background-color: #fff;
} }
.menu-list-pro .h { .menu-list-pro .h {
height: 93.75rpx; height: 93.75rpx;
line-height: 93.75rpx; line-height: 93.75rpx;
margin-left: 31.25rpx; margin-left: 31.25rpx;
border-bottom: 1px solid #f4f4f4; border-bottom: 1px solid #f4f4f4;
padding-right: 31.25rpx; padding-right: 31.25rpx;
} }
.menu-list-pro .h .label { .menu-list-pro .h .label {
float: left; float: left;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
} }
.menu-list-pro .h .status { .menu-list-pro .h .status {
float: right; float: right;
font-size: 30rpx; font-size: 30rpx;
color: #a78845; color: #a78845;
} }
.menu-list-pro .menu-list-item { .menu-list-pro .menu-list-item {
display: block; display: block;
float: left; float: left;
height: 110rpx; height: 110rpx;
width: 80rpx; width: 80rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
margin-left: 40rpx; margin-left: 40rpx;
} }
.menu-list-pro .icon { .menu-list-pro .icon {
height: 80rpx; height: 80rpx;
width: 80rpx; width: 80rpx;
border-radius: 12rpx; border-radius: 12rpx;
box-shadow: 0px 4rpx 4rpx 0px #cfc9ca; box-shadow: 0px 4rpx 4rpx 0px #cfc9ca;
} }
.menu-list-pro .txt { .menu-list-pro .txt {
display: block; display: block;
float: left; float: left;
width: 80rpx; width: 80rpx;
margin-top: 5rpx; margin-top: 5rpx;
font-size: 22rpx; font-size: 22rpx;
color: #a78845; color: #a78845;
} }
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