chore[litemall-wx]: 使用微信开发者工具的格式化代码
This commit is contained in:
@@ -3,13 +3,13 @@ var api = require('./config/api.js');
|
||||
var user = require('./utils/user.js');
|
||||
|
||||
App({
|
||||
onLaunch: function () {
|
||||
onLaunch: function() {
|
||||
const updateManager = wx.getUpdateManager();
|
||||
wx.getUpdateManager().onUpdateReady(function () {
|
||||
wx.getUpdateManager().onUpdateReady(function() {
|
||||
wx.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
@@ -18,7 +18,7 @@ App({
|
||||
})
|
||||
})
|
||||
},
|
||||
onShow: function (options) {
|
||||
onShow: function(options) {
|
||||
user.checkLogin().then(res => {
|
||||
this.globalData.hasLogin = true;
|
||||
}).catch(() => {
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/catalog/catalog",
|
||||
"pages/newGoods/newGoods",
|
||||
"pages/hotGoods/hotGoods",
|
||||
"pages/ucenter/index/index",
|
||||
"pages/ucenter/address/address",
|
||||
"pages/ucenter/addressAdd/addressAdd",
|
||||
"pages/ucenter/feedback/feedback",
|
||||
"pages/ucenter/footprint/footprint",
|
||||
"pages/ucenter/order/order",
|
||||
"pages/ucenter/orderDetail/orderDetail",
|
||||
"pages/ucenter/coupon/coupon",
|
||||
"pages/ucenter/collect/collect",
|
||||
"pages/auth/login/login",
|
||||
"pages/auth/accountLogin/accountLogin",
|
||||
"pages/auth/register/register",
|
||||
"pages/auth/reset/reset",
|
||||
"pages/payResult/payResult",
|
||||
"pages/comment/comment",
|
||||
"pages/commentPost/commentPost",
|
||||
"pages/topic/topic",
|
||||
"pages/topicComment/topicComment",
|
||||
"pages/topicDetail/topicDetail",
|
||||
"pages/topicCommentPost/topicCommentPost",
|
||||
"pages/brand/brand",
|
||||
"pages/brandDetail/brandDetail",
|
||||
"pages/search/search",
|
||||
"pages/category/category",
|
||||
"pages/cart/cart",
|
||||
"pages/checkout/checkout",
|
||||
"pages/goods/goods",
|
||||
"pages/about/about",
|
||||
"pages/groupon/myGroupon/myGroupon",
|
||||
"pages/groupon/grouponDetail/grouponDetail",
|
||||
"pages/groupon/grouponList/grouponList"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTitleText": "litemall小程序商城",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"backgroundTextStyle": "dark"
|
||||
},
|
||||
"tabBar": {
|
||||
"backgroundColor": "#fafafa",
|
||||
"borderStyle": "white",
|
||||
"selectedColor": "#AB956D",
|
||||
"color": "#666",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/home.png",
|
||||
"selectedIconPath": "static/images/home@selected.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/catalog/catalog",
|
||||
"iconPath": "static/images/category.png",
|
||||
"selectedIconPath": "static/images/category@selected.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cart/cart",
|
||||
"iconPath": "static/images/cart.png",
|
||||
"selectedIconPath": "static/images/cart@selected.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/ucenter/index/index",
|
||||
"iconPath": "static/images/my.png",
|
||||
"selectedIconPath": "static/images/my@selected.png",
|
||||
"text": "个人"
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkTimeout": {
|
||||
"request": 10000,
|
||||
"connectSocket": 10000,
|
||||
"uploadFile": 10000,
|
||||
"downloadFile": 10000
|
||||
},
|
||||
"debug": true
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/catalog/catalog",
|
||||
"pages/newGoods/newGoods",
|
||||
"pages/hotGoods/hotGoods",
|
||||
"pages/ucenter/index/index",
|
||||
"pages/ucenter/address/address",
|
||||
"pages/ucenter/addressAdd/addressAdd",
|
||||
"pages/ucenter/feedback/feedback",
|
||||
"pages/ucenter/footprint/footprint",
|
||||
"pages/ucenter/order/order",
|
||||
"pages/ucenter/orderDetail/orderDetail",
|
||||
"pages/ucenter/coupon/coupon",
|
||||
"pages/ucenter/collect/collect",
|
||||
"pages/auth/login/login",
|
||||
"pages/auth/accountLogin/accountLogin",
|
||||
"pages/auth/register/register",
|
||||
"pages/auth/reset/reset",
|
||||
"pages/payResult/payResult",
|
||||
"pages/comment/comment",
|
||||
"pages/commentPost/commentPost",
|
||||
"pages/topic/topic",
|
||||
"pages/topicComment/topicComment",
|
||||
"pages/topicDetail/topicDetail",
|
||||
"pages/topicCommentPost/topicCommentPost",
|
||||
"pages/brand/brand",
|
||||
"pages/brandDetail/brandDetail",
|
||||
"pages/search/search",
|
||||
"pages/category/category",
|
||||
"pages/cart/cart",
|
||||
"pages/checkout/checkout",
|
||||
"pages/goods/goods",
|
||||
"pages/about/about",
|
||||
"pages/groupon/myGroupon/myGroupon",
|
||||
"pages/groupon/grouponDetail/grouponDetail",
|
||||
"pages/groupon/grouponList/grouponList"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTitleText": "litemall小程序商城",
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"backgroundTextStyle": "dark"
|
||||
},
|
||||
"tabBar": {
|
||||
"backgroundColor": "#fafafa",
|
||||
"borderStyle": "white",
|
||||
"selectedColor": "#AB956D",
|
||||
"color": "#666",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/home.png",
|
||||
"selectedIconPath": "static/images/home@selected.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/catalog/catalog",
|
||||
"iconPath": "static/images/category.png",
|
||||
"selectedIconPath": "static/images/category@selected.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/cart/cart",
|
||||
"iconPath": "static/images/cart.png",
|
||||
"selectedIconPath": "static/images/cart@selected.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/ucenter/index/index",
|
||||
"iconPath": "static/images/my.png",
|
||||
"selectedIconPath": "static/images/my@selected.png",
|
||||
"text": "个人"
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkTimeout": {
|
||||
"request": 10000,
|
||||
"connectSocket": 10000,
|
||||
"uploadFile": 10000,
|
||||
"downloadFile": 10000
|
||||
},
|
||||
"debug": true
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
/**app.wxss**/
|
||||
|
||||
.container {
|
||||
box-sizing: border-box;
|
||||
background-color: #f4f4f4;
|
||||
font-family: PingFangSC-Light,helvetica,'Heiti SC';
|
||||
}
|
||||
|
||||
view,image,text,navigator{
|
||||
box-sizing: border-box;
|
||||
padding:0;
|
||||
margin:0;
|
||||
|
||||
font-family: PingFangSC-Light, helvetica, 'Heiti SC';
|
||||
}
|
||||
|
||||
view,text{
|
||||
font-family: PingFangSC-Light,helvetica,'Heiti SC';
|
||||
view, image, text, navigator {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
view, text {
|
||||
font-family: PingFangSC-Light, helvetica, 'Heiti SC';
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 以下是业务服务器API地址
|
||||
// 本机开发时使用
|
||||
var WxApiRoot = 'http://localhost:8080/wx/';
|
||||
var WxApiRoot = 'http://localhost:8080/wx/';
|
||||
// 局域网测试使用
|
||||
// var WxApiRoot = 'http://192.168.0.101:8080/wx/';
|
||||
// 云平台部署时使用
|
||||
@@ -9,87 +9,87 @@
|
||||
// var WxApiRoot = 'https://www.menethil.com.cn/wx/';
|
||||
|
||||
module.exports = {
|
||||
IndexUrl: WxApiRoot + 'home/index', //首页数据接口
|
||||
CatalogList: WxApiRoot + 'catalog/index', //分类目录全部分类数据接口
|
||||
CatalogCurrent: WxApiRoot + 'catalog/current', //分类目录当前分类数据接口
|
||||
IndexUrl: WxApiRoot + 'home/index', //首页数据接口
|
||||
CatalogList: WxApiRoot + 'catalog/index', //分类目录全部分类数据接口
|
||||
CatalogCurrent: WxApiRoot + 'catalog/current', //分类目录当前分类数据接口
|
||||
|
||||
AuthLoginByWeixin: WxApiRoot + 'auth/login_by_weixin', //微信登录
|
||||
AuthLoginByAccount: WxApiRoot + 'auth/login', //账号登录
|
||||
AuthLogout: WxApiRoot + 'auth/logout', //账号登出
|
||||
AuthRegister: WxApiRoot + 'auth/register', //账号注册
|
||||
AuthReset: WxApiRoot + 'auth/reset', //账号密码重置
|
||||
AuthRegisterCaptcha: WxApiRoot + 'auth/regCaptcha', //验证码
|
||||
AuthBindPhone: WxApiRoot + 'auth/bindPhone', //绑定微信手机号
|
||||
AuthLoginByWeixin: WxApiRoot + 'auth/login_by_weixin', //微信登录
|
||||
AuthLoginByAccount: WxApiRoot + 'auth/login', //账号登录
|
||||
AuthLogout: WxApiRoot + 'auth/logout', //账号登出
|
||||
AuthRegister: WxApiRoot + 'auth/register', //账号注册
|
||||
AuthReset: WxApiRoot + 'auth/reset', //账号密码重置
|
||||
AuthRegisterCaptcha: WxApiRoot + 'auth/regCaptcha', //验证码
|
||||
AuthBindPhone: WxApiRoot + 'auth/bindPhone', //绑定微信手机号
|
||||
|
||||
GoodsCount: WxApiRoot + 'goods/count', //统计商品总数
|
||||
GoodsList: WxApiRoot + 'goods/list', //获得商品列表
|
||||
GoodsCategory: WxApiRoot + 'goods/category', //获得分类数据
|
||||
GoodsDetail: WxApiRoot + 'goods/detail', //获得商品的详情
|
||||
GoodsNew: WxApiRoot + 'goods/new', //新品
|
||||
GoodsHot: WxApiRoot + 'goods/hot', //热门
|
||||
GoodsRelated: WxApiRoot + 'goods/related', //商品详情页的关联商品(大家都在看)
|
||||
GoodsCount: WxApiRoot + 'goods/count', //统计商品总数
|
||||
GoodsList: WxApiRoot + 'goods/list', //获得商品列表
|
||||
GoodsCategory: WxApiRoot + 'goods/category', //获得分类数据
|
||||
GoodsDetail: WxApiRoot + 'goods/detail', //获得商品的详情
|
||||
GoodsNew: WxApiRoot + 'goods/new', //新品
|
||||
GoodsHot: WxApiRoot + 'goods/hot', //热门
|
||||
GoodsRelated: WxApiRoot + 'goods/related', //商品详情页的关联商品(大家都在看)
|
||||
|
||||
BrandList: WxApiRoot + 'brand/list', //品牌列表
|
||||
BrandDetail: WxApiRoot + 'brand/detail', //品牌详情
|
||||
BrandList: WxApiRoot + 'brand/list', //品牌列表
|
||||
BrandDetail: WxApiRoot + 'brand/detail', //品牌详情
|
||||
|
||||
CartList: WxApiRoot + 'cart/index', //获取购物车的数据
|
||||
CartAdd: WxApiRoot + 'cart/add', // 添加商品到购物车
|
||||
CartFastAdd: WxApiRoot + 'cart/fastadd', // 立即购买商品
|
||||
CartUpdate: WxApiRoot + 'cart/update', // 更新购物车的商品
|
||||
CartDelete: WxApiRoot + 'cart/delete', // 删除购物车的商品
|
||||
CartChecked: WxApiRoot + 'cart/checked', // 选择或取消选择商品
|
||||
CartGoodsCount: WxApiRoot + 'cart/goodscount', // 获取购物车商品件数
|
||||
CartCheckout: WxApiRoot + 'cart/checkout', // 下单前信息确认
|
||||
CartList: WxApiRoot + 'cart/index', //获取购物车的数据
|
||||
CartAdd: WxApiRoot + 'cart/add', // 添加商品到购物车
|
||||
CartFastAdd: WxApiRoot + 'cart/fastadd', // 立即购买商品
|
||||
CartUpdate: WxApiRoot + 'cart/update', // 更新购物车的商品
|
||||
CartDelete: WxApiRoot + 'cart/delete', // 删除购物车的商品
|
||||
CartChecked: WxApiRoot + 'cart/checked', // 选择或取消选择商品
|
||||
CartGoodsCount: WxApiRoot + 'cart/goodscount', // 获取购物车商品件数
|
||||
CartCheckout: WxApiRoot + 'cart/checkout', // 下单前信息确认
|
||||
|
||||
CollectList: WxApiRoot + 'collect/list', //收藏列表
|
||||
CollectAddOrDelete: WxApiRoot + 'collect/addordelete', //添加或取消收藏
|
||||
CollectList: WxApiRoot + 'collect/list', //收藏列表
|
||||
CollectAddOrDelete: WxApiRoot + 'collect/addordelete', //添加或取消收藏
|
||||
|
||||
CommentList: WxApiRoot + 'comment/list', //评论列表
|
||||
CommentCount: WxApiRoot + 'comment/count', //评论总数
|
||||
CommentPost: WxApiRoot + 'comment/post', //发表评论
|
||||
CommentList: WxApiRoot + 'comment/list', //评论列表
|
||||
CommentCount: WxApiRoot + 'comment/count', //评论总数
|
||||
CommentPost: WxApiRoot + 'comment/post', //发表评论
|
||||
|
||||
TopicList: WxApiRoot + 'topic/list', //专题列表
|
||||
TopicDetail: WxApiRoot + 'topic/detail', //专题详情
|
||||
TopicRelated: WxApiRoot + 'topic/related', //相关专题
|
||||
TopicList: WxApiRoot + 'topic/list', //专题列表
|
||||
TopicDetail: WxApiRoot + 'topic/detail', //专题详情
|
||||
TopicRelated: WxApiRoot + 'topic/related', //相关专题
|
||||
|
||||
SearchIndex: WxApiRoot + 'search/index', //搜索关键字
|
||||
SearchResult: WxApiRoot + 'search/result', //搜索结果
|
||||
SearchHelper: WxApiRoot + 'search/helper', //搜索帮助
|
||||
SearchClearHistory: WxApiRoot + 'search/clearhistory', //搜索历史清楚
|
||||
SearchIndex: WxApiRoot + 'search/index', //搜索关键字
|
||||
SearchResult: WxApiRoot + 'search/result', //搜索结果
|
||||
SearchHelper: WxApiRoot + 'search/helper', //搜索帮助
|
||||
SearchClearHistory: WxApiRoot + 'search/clearhistory', //搜索历史清楚
|
||||
|
||||
AddressList: WxApiRoot + 'address/list', //收货地址列表
|
||||
AddressDetail: WxApiRoot + 'address/detail', //收货地址详情
|
||||
AddressSave: WxApiRoot + 'address/save', //保存收货地址
|
||||
AddressDelete: WxApiRoot + 'address/delete', //保存收货地址
|
||||
AddressList: WxApiRoot + 'address/list', //收货地址列表
|
||||
AddressDetail: WxApiRoot + 'address/detail', //收货地址详情
|
||||
AddressSave: WxApiRoot + 'address/save', //保存收货地址
|
||||
AddressDelete: WxApiRoot + 'address/delete', //保存收货地址
|
||||
|
||||
ExpressQuery: WxApiRoot + 'express/query', //物流查询
|
||||
ExpressQuery: WxApiRoot + 'express/query', //物流查询
|
||||
|
||||
RegionList: WxApiRoot + 'region/list', //获取区域列表
|
||||
RegionList: WxApiRoot + 'region/list', //获取区域列表
|
||||
|
||||
OrderSubmit: WxApiRoot + 'order/submit', // 提交订单
|
||||
OrderPrepay: WxApiRoot + 'order/prepay', // 订单的预支付会话
|
||||
OrderList: WxApiRoot + 'order/list', //订单列表
|
||||
OrderDetail: WxApiRoot + 'order/detail', //订单详情
|
||||
OrderCancel: WxApiRoot + 'order/cancel', //取消订单
|
||||
OrderRefund: WxApiRoot + 'order/refund', //退款取消订单
|
||||
OrderDelete: WxApiRoot + 'order/delete', //删除订单
|
||||
OrderConfirm: WxApiRoot + 'order/confirm', //确认收货
|
||||
OrderGoods: WxApiRoot + 'order/goods', // 代评价商品信息
|
||||
OrderComment: WxApiRoot + 'order/comment', // 评价订单商品信息
|
||||
OrderSubmit: WxApiRoot + 'order/submit', // 提交订单
|
||||
OrderPrepay: WxApiRoot + 'order/prepay', // 订单的预支付会话
|
||||
OrderList: WxApiRoot + 'order/list', //订单列表
|
||||
OrderDetail: WxApiRoot + 'order/detail', //订单详情
|
||||
OrderCancel: WxApiRoot + 'order/cancel', //取消订单
|
||||
OrderRefund: WxApiRoot + 'order/refund', //退款取消订单
|
||||
OrderDelete: WxApiRoot + 'order/delete', //删除订单
|
||||
OrderConfirm: WxApiRoot + 'order/confirm', //确认收货
|
||||
OrderGoods: WxApiRoot + 'order/goods', // 代评价商品信息
|
||||
OrderComment: WxApiRoot + 'order/comment', // 评价订单商品信息
|
||||
|
||||
FeedbackAdd: WxApiRoot + 'feedback/submit', //添加反馈
|
||||
FootprintList: WxApiRoot + 'footprint/list', //足迹列表
|
||||
FootprintDelete: WxApiRoot + 'footprint/delete', //删除足迹
|
||||
FeedbackAdd: WxApiRoot + 'feedback/submit', //添加反馈
|
||||
FootprintList: WxApiRoot + 'footprint/list', //足迹列表
|
||||
FootprintDelete: WxApiRoot + 'footprint/delete', //删除足迹
|
||||
|
||||
UserFormIdCreate: WxApiRoot + 'formid/create', //用户FromId,用于发送模版消息
|
||||
UserFormIdCreate: WxApiRoot + 'formid/create', //用户FromId,用于发送模版消息
|
||||
|
||||
GroupOnList: WxApiRoot + 'groupon/list', //团购列表
|
||||
GroupOn: WxApiRoot + 'groupon/query', //团购API-查询
|
||||
GroupOnMy: WxApiRoot + 'groupon/my', //团购API-我的团购
|
||||
GroupOnDetail: WxApiRoot + 'groupon/detail', //团购API-详情
|
||||
GroupOnJoin: WxApiRoot + 'groupon/join', //团购API-详情
|
||||
StorageUpload: WxApiRoot + 'storage/upload', //图片上传,
|
||||
GroupOnList: WxApiRoot + 'groupon/list', //团购列表
|
||||
GroupOn: WxApiRoot + 'groupon/query', //团购API-查询
|
||||
GroupOnMy: WxApiRoot + 'groupon/my', //团购API-我的团购
|
||||
GroupOnDetail: WxApiRoot + 'groupon/detail', //团购API-详情
|
||||
GroupOnJoin: WxApiRoot + 'groupon/join', //团购API-详情
|
||||
StorageUpload: WxApiRoot + 'storage/upload', //图片上传,
|
||||
|
||||
UserIndex: WxApiRoot + 'user/index', //个人页面用户相关信息
|
||||
UserIndex: WxApiRoot + 'user/index', //个人页面用户相关信息
|
||||
|
||||
};
|
||||
@@ -10,26 +10,26 @@ Page({
|
||||
code: '',
|
||||
loginErrorCount: 0
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
accountLogin: function () {
|
||||
accountLogin: function() {
|
||||
var that = this;
|
||||
|
||||
if (this.data.password.length < 1 || this.data.username.length < 1) {
|
||||
@@ -51,24 +51,23 @@ Page({
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.errno == 0){
|
||||
success: function(res) {
|
||||
if (res.data.errno == 0) {
|
||||
that.setData({
|
||||
loginErrorCount: 0
|
||||
});
|
||||
app.globalData.hasLogin = true;
|
||||
wx.setStorageSync('userInfo', res.data.data.userInfo);
|
||||
wx.setStorage({
|
||||
key:"token",
|
||||
key: "token",
|
||||
data: res.data.data.token,
|
||||
success: function(){
|
||||
success: function() {
|
||||
wx.switchTab({
|
||||
url: '/pages/ucenter/index/index'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
that.setData({
|
||||
loginErrorCount: that.data.loginErrorCount + 1
|
||||
});
|
||||
@@ -78,25 +77,25 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
bindUsernameInput: function (e) {
|
||||
bindUsernameInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
username: e.detail.value
|
||||
});
|
||||
},
|
||||
bindPasswordInput: function (e) {
|
||||
bindPasswordInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
password: e.detail.value
|
||||
});
|
||||
},
|
||||
bindCodeInput: function (e) {
|
||||
bindCodeInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
code: e.detail.value
|
||||
});
|
||||
},
|
||||
clearInput: function (e) {
|
||||
clearInput: function(e) {
|
||||
switch (e.currentTarget.id) {
|
||||
case 'clear-username':
|
||||
this.setData({
|
||||
|
||||
@@ -4,27 +4,27 @@ var user = require('../../../utils/user.js');
|
||||
|
||||
var app = getApp();
|
||||
Page({
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
wxLogin: function (e) {
|
||||
if (e.detail.userInfo == undefined){
|
||||
wxLogin: function(e) {
|
||||
if (e.detail.userInfo == undefined) {
|
||||
app.globalData.hasLogin = false;
|
||||
util.showErrorToast('微信登录失败');
|
||||
return;
|
||||
@@ -45,7 +45,9 @@ Page({
|
||||
|
||||
});
|
||||
},
|
||||
accountLogin: function () {
|
||||
wx.navigateTo({ url: "/pages/auth/accountLogin/accountLogin" });
|
||||
accountLogin: function() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/auth/accountLogin/accountLogin"
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
<view class="container">
|
||||
<view class="login-box">
|
||||
<view class="login-box">
|
||||
<button type="primary" open-type="getUserInfo" class="wx-login-btn" bindgetuserinfo="wxLogin">微信直接登录</button>
|
||||
<button type="primary" class="account-login-btn" bindtap="accountLogin">账号登录</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
var api = require('../../../config/api.js');
|
||||
var check = require('../../../utils/check.js');
|
||||
|
||||
@@ -11,27 +10,27 @@ Page({
|
||||
mobile: '',
|
||||
code: ''
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
sendCode: function () {
|
||||
sendCode: function() {
|
||||
let that = this;
|
||||
|
||||
if (this.data.mobile.length == 0) {
|
||||
@@ -61,15 +60,14 @@ Page({
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.data.errno == 0) {
|
||||
wx.showModal({
|
||||
title: '发送成功',
|
||||
content: '验证码已发送',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '错误信息',
|
||||
content: res.data.errmsg,
|
||||
@@ -79,7 +77,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
requestRegister: function (wxCode) {
|
||||
requestRegister: function(wxCode) {
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: api.AuthRegister,
|
||||
@@ -94,21 +92,20 @@ Page({
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.data.errno == 0) {
|
||||
app.globalData.hasLogin = true;
|
||||
wx.setStorageSync('userInfo', res.data.data.userInfo);
|
||||
wx.setStorage({
|
||||
key: "token",
|
||||
data: res.data.data.token,
|
||||
success: function () {
|
||||
success: function() {
|
||||
wx.switchTab({
|
||||
url: '/pages/ucenter/index/index'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '错误信息',
|
||||
content: res.data.errmsg,
|
||||
@@ -118,7 +115,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
startRegister: function () {
|
||||
startRegister: function() {
|
||||
var that = this;
|
||||
|
||||
if (this.data.password.length < 6 || this.data.username.length < 6) {
|
||||
@@ -156,9 +153,9 @@ Page({
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
wx.login({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (!res.code) {
|
||||
wx.showModal({
|
||||
title: '错误信息',
|
||||
@@ -171,37 +168,37 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
bindUsernameInput: function (e) {
|
||||
bindUsernameInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
username: e.detail.value
|
||||
});
|
||||
},
|
||||
bindPasswordInput: function (e) {
|
||||
bindPasswordInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
password: e.detail.value
|
||||
});
|
||||
},
|
||||
bindConfirmPasswordInput: function (e) {
|
||||
bindConfirmPasswordInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
confirmPassword: e.detail.value
|
||||
});
|
||||
},
|
||||
bindMobileInput: function (e) {
|
||||
bindMobileInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
mobile: e.detail.value
|
||||
});
|
||||
},
|
||||
bindCodeInput: function (e) {
|
||||
bindCodeInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
code: e.detail.value
|
||||
});
|
||||
},
|
||||
clearInput: function (e) {
|
||||
clearInput: function(e) {
|
||||
switch (e.currentTarget.id) {
|
||||
case 'clear-username':
|
||||
this.setData({
|
||||
@@ -222,7 +219,7 @@ Page({
|
||||
this.setData({
|
||||
mobile: ''
|
||||
});
|
||||
break;
|
||||
break;
|
||||
case 'clear-code':
|
||||
this.setData({
|
||||
code: ''
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<view class="container">
|
||||
<view class="form-box">
|
||||
<view class="form-box">
|
||||
|
||||
<view class="form-item">
|
||||
<input class="username" value="{{username}}" bindinput="bindUsernameInput" placeholder="用户名" auto-focus/>
|
||||
<image wx:if="{{ username.length > 0 }}" id="clear-username" class="clear" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<input class="username" value="{{username}}" bindinput="bindUsernameInput" placeholder="用户名" auto-focus/>
|
||||
<image wx:if="{{ username.length > 0 }}" id="clear-username" class="clear" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<input class="password" value="{{password}}" password bindinput="bindPasswordInput" placeholder="密码"/>
|
||||
<image class="clear" id="clear-password" wx:if="{{ password.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<input class="password" value="{{password}}" password bindinput="bindPasswordInput" placeholder="密码" />
|
||||
<image class="clear" id="clear-password" wx:if="{{ password.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<input class="password" value="{{confirmPassword}}" password bindinput="bindConfirmPasswordInput" placeholder="确认密码"/>
|
||||
<image class="clear" id="clear-confirm-password" wx:if="{{ confirmPassword.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<input class="password" value="{{confirmPassword}}" password bindinput="bindConfirmPasswordInput" placeholder="确认密码" />
|
||||
<image class="clear" id="clear-confirm-password" wx:if="{{ confirmPassword.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<input class="mobile" value="{{mobile}}" bindinput="bindMobileInput" placeholder="手机号" />
|
||||
<image wx:if="{{ mobile.length > 0 }}" id="clear-mobile" class="clear" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
<image wx:if="{{ mobile.length > 0 }}" id="clear-mobile" class="clear" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
|
||||
<view class="form-item-code" >
|
||||
<view class="form-item code-item">
|
||||
<input class="code" value="{{code}}" bindinput="bindCodeInput" placeholder="验证码"/>
|
||||
<image class="clear" id="clear-code" wx:if="{{ code.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
<view class="code-btn" bindtap="sendCode">获取验证码</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="register-btn" bindtap="startRegister">注册</button>
|
||||
|
||||
<view class="form-item-code">
|
||||
<view class="form-item code-item">
|
||||
<input class="code" value="{{code}}" bindinput="bindCodeInput" placeholder="验证码" />
|
||||
<image class="clear" id="clear-code" wx:if="{{ code.length > 0 }}" src="/static/images/clear_input.png" catchtap="clearInput"></image>
|
||||
</view>
|
||||
<view class="code-btn" bindtap="sendCode">获取验证码</view>
|
||||
</view>
|
||||
|
||||
<button type="primary" class="register-btn" bindtap="startRegister">注册</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,69 +1,69 @@
|
||||
.form-box{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 96rpx;
|
||||
background: #fff;
|
||||
.form-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 96rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form-item{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 96rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.form-item {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 96rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.form-item .username, .form-item .password, .form-item .mobile, .form-item .code{
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 44rpx;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.form-item .username, .form-item .password, .form-item .mobile, .form-item .code {
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 44rpx;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-item-code{
|
||||
margin-top:32rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
.form-item-code {
|
||||
margin-top: 32rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-item-code .form-item{
|
||||
float: left;
|
||||
width: 350rpx;
|
||||
.form-item-code .form-item {
|
||||
float: left;
|
||||
width: 350rpx;
|
||||
}
|
||||
|
||||
.form-item-code .code-btn{
|
||||
float: right;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
background: green;
|
||||
.form-item-code .code-btn {
|
||||
float: right;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
background: green;
|
||||
}
|
||||
|
||||
.form-item .clear{
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
right: 18rpx;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
background: #fff;
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
.form-item .clear {
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
right: 18rpx;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
background: #fff;
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
|
||||
.register-btn{
|
||||
margin: 60rpx 0 40rpx 0;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.register-btn {
|
||||
margin: 60rpx 0 40rpx 0;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
@@ -9,28 +9,28 @@ Page({
|
||||
password: '',
|
||||
confirmPassword: ''
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
|
||||
sendCode: function () {
|
||||
sendCode: function() {
|
||||
let that = this;
|
||||
wx.request({
|
||||
url: api.AuthRegisterCaptcha,
|
||||
@@ -41,15 +41,14 @@ Page({
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.data.errno == 0) {
|
||||
wx.showModal({
|
||||
title: '发送成功',
|
||||
content: '验证码已发送',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '错误信息',
|
||||
content: res.data.errmsg,
|
||||
@@ -59,7 +58,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
startReset: function(){
|
||||
startReset: function() {
|
||||
var that = this;
|
||||
|
||||
if (this.data.mobile.length == 0 || this.data.code.length == 0) {
|
||||
@@ -109,11 +108,10 @@ Page({
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.data.errno == 0) {
|
||||
wx.navigateBack();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '密码重置失败',
|
||||
content: res.data.errmsg,
|
||||
@@ -123,32 +121,32 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
bindPasswordInput: function (e) {
|
||||
bindPasswordInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
password: e.detail.value
|
||||
});
|
||||
},
|
||||
bindConfirmPasswordInput: function (e) {
|
||||
bindConfirmPasswordInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
confirmPassword: e.detail.value
|
||||
});
|
||||
},
|
||||
bindMobileInput: function (e) {
|
||||
bindMobileInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
mobile: e.detail.value
|
||||
});
|
||||
},
|
||||
bindCodeInput: function(e){
|
||||
|
||||
bindCodeInput: function(e) {
|
||||
|
||||
this.setData({
|
||||
code: e.detail.value
|
||||
});
|
||||
},
|
||||
clearInput: function(e){
|
||||
switch (e.currentTarget.id){
|
||||
clearInput: function(e) {
|
||||
switch (e.currentTarget.id) {
|
||||
case 'clear-password':
|
||||
this.setData({
|
||||
password: ''
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
.form-box{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 96rpx;
|
||||
background: #fff;
|
||||
.form-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 0 40rpx;
|
||||
margin-top: 96rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.form-item{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 96rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.form-item {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
height: 96rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.form-item .mobile, .form-item .password, .form-item .code{
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 44rpx;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.form-item .mobile, .form-item .password, .form-item .code {
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 44rpx;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.form-item-code{
|
||||
margin-top:32rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
.form-item-code {
|
||||
margin-top: 32rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-item-code .form-item{
|
||||
float: left;
|
||||
width: 350rpx;
|
||||
.form-item-code .form-item {
|
||||
float: left;
|
||||
width: 350rpx;
|
||||
}
|
||||
|
||||
.form-item-code .code-btn{
|
||||
float: right;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
.form-item-code .code-btn {
|
||||
float: right;
|
||||
padding: 20rpx 40rpx;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.form-item .clear{
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
right: 18rpx;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
background: #fff;
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
.form-item .clear {
|
||||
position: absolute;
|
||||
top: 26rpx;
|
||||
right: 18rpx;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
background: #fff;
|
||||
height: 44rpx;
|
||||
width: 44rpx;
|
||||
}
|
||||
|
||||
.reset-btn{
|
||||
margin: 60rpx 0 40rpx 0;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
background: #b4282d;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.reset-btn {
|
||||
margin: 60rpx 0 40rpx 0;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
background: #b4282d;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
@@ -8,16 +8,19 @@ Page({
|
||||
size: 10,
|
||||
totalPages: 1
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.getBrandList();
|
||||
},
|
||||
getBrandList: function () {
|
||||
getBrandList: function() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
});
|
||||
let that = this;
|
||||
util.request(api.BrandList, { page: that.data.page, size: that.data.size }).then(function (res) {
|
||||
util.request(api.BrandList, {
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
brandList: that.data.brandList.concat(res.data.brandList),
|
||||
@@ -27,7 +30,7 @@ Page({
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
onReachBottom (){
|
||||
onReachBottom() {
|
||||
if (this.data.totalPages > this.data.page) {
|
||||
this.setData({
|
||||
page: this.data.page + 1
|
||||
@@ -38,18 +41,18 @@ Page({
|
||||
|
||||
this.getBrandList();
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<view class="container">
|
||||
<view class="brand-list" >
|
||||
<navigator url="../brandDetail/brandDetail?id={{item.id}}" class="item" wx:for="{{brandList}}" wx:key="id">
|
||||
<view class="img-bg">
|
||||
<image src="{{item.picUrl}}" background-size="cover"></image>
|
||||
</view>
|
||||
<view class="txt-box">
|
||||
<view class="line">
|
||||
<text class="name" >{{item.name}}</text>
|
||||
<text class="s">|</text>
|
||||
<text class="price">{{item.floorPrice}}元起</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator >
|
||||
</view>
|
||||
<view class="brand-list">
|
||||
<navigator url="../brandDetail/brandDetail?id={{item.id}}" class="item" wx:for="{{brandList}}" wx:key="id">
|
||||
<view class="img-bg">
|
||||
<image src="{{item.picUrl}}" background-size="cover"></image>
|
||||
</view>
|
||||
<view class="txt-box">
|
||||
<view class="line">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="s">|</text>
|
||||
<text class="price">{{item.floorPrice}}元起</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,52 +1,52 @@
|
||||
.brand-list .item{
|
||||
display: block;
|
||||
width: 750rpx;
|
||||
height: 416rpx;
|
||||
position: relative;
|
||||
margin-bottom: 4rpx;
|
||||
.brand-list .item {
|
||||
display: block;
|
||||
width: 750rpx;
|
||||
height: 416rpx;
|
||||
position: relative;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.brand-list .item .img-bg{
|
||||
position: absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 0;
|
||||
width: 750rpx;
|
||||
height: 417rpx;
|
||||
overflow: hidden;
|
||||
.brand-list .item .img-bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
width: 750rpx;
|
||||
height: 417rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.brand-list .item .img-bg image{
|
||||
width: 750rpx;
|
||||
height: 416rpx;
|
||||
.brand-list .item .img-bg image {
|
||||
width: 750rpx;
|
||||
height: 416rpx;
|
||||
}
|
||||
|
||||
.brand-list .item .txt-box{
|
||||
position: absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
display: table;
|
||||
z-index: 0;
|
||||
width: 750rpx;
|
||||
height: 417rpx;
|
||||
.brand-list .item .txt-box {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: table;
|
||||
z-index: 0;
|
||||
width: 750rpx;
|
||||
height: 417rpx;
|
||||
}
|
||||
|
||||
.brand-list .item .line{
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
height: 63rpx;
|
||||
line-height: 63rpx;
|
||||
.brand-list .item .line {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
height: 63rpx;
|
||||
line-height: 63rpx;
|
||||
}
|
||||
|
||||
.brand-list .item .line text{
|
||||
font-size: 35rpx;
|
||||
font-weight: 700;
|
||||
text-shadow: 1rpx 1rpx rgba(0,0,0,.32);
|
||||
color: #fff;
|
||||
.brand-list .item .line text {
|
||||
font-size: 35rpx;
|
||||
font-weight: 700;
|
||||
text-shadow: 1rpx 1rpx rgba(0, 0, 0, 0.32);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.brand-list .item .line .s{
|
||||
padding: 0 10rpx;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.brand-list .item .line .s {
|
||||
padding: 0 10rpx;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Page({
|
||||
page: 1,
|
||||
size: 100
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
var that = this;
|
||||
that.setData({
|
||||
@@ -20,9 +20,11 @@ Page({
|
||||
});
|
||||
this.getBrand();
|
||||
},
|
||||
getBrand: function () {
|
||||
getBrand: function() {
|
||||
let that = this;
|
||||
util.request(api.BrandDetail, { id: that.data.id }).then(function (res) {
|
||||
util.request(api.BrandDetail, {
|
||||
id: that.data.id
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
brand: res.data.brand
|
||||
@@ -35,8 +37,12 @@ Page({
|
||||
getGoodsList() {
|
||||
var that = this;
|
||||
|
||||
util.request(api.GoodsList, { brandId: that.data.id, page: that.data.page, size: that.data.size})
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsList, {
|
||||
brandId: that.data.id,
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
})
|
||||
.then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
goodsList: res.data.goodsList
|
||||
@@ -44,19 +50,19 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<view class="container">
|
||||
<view class="brand-info">
|
||||
<view class="name">
|
||||
<image class="img" src="{{brand.picUrl}}" background-size="cover"></image>
|
||||
<view class="info-box">
|
||||
<view class="info">
|
||||
<text class="txt">{{brand.name}}</text>
|
||||
<text class="line"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
{{brand.desc}}
|
||||
<view class="brand-info">
|
||||
<view class="name">
|
||||
<image class="img" src="{{brand.picUrl}}" background-size="cover"></image>
|
||||
<view class="info-box">
|
||||
<view class="info">
|
||||
<text class="txt">{{brand.name}}</text>
|
||||
<text class="line"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
{{brand.desc}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cate-item">
|
||||
<view class="b">
|
||||
<block wx:for="{{goodsList}}" wx:key="id" wx:for-index="iindex" wx:for-item="iitem">
|
||||
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : ''}}" url="../goods/goods?id={{iitem.id}}">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<view class="cate-item">
|
||||
<view class="b">
|
||||
<block wx:for="{{goodsList}}" wx:key="id" wx:for-index="iindex" wx:for-item="iitem">
|
||||
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : ''}}" url="../goods/goods?id={{iitem.id}}">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,65 +1,66 @@
|
||||
page{
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.brand-info .name{
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
position: relative;
|
||||
page {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.brand-info .img{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
.brand-info .name {
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.brand-info .info-box{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.brand-info .img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
}
|
||||
|
||||
.brand-info .info{
|
||||
display: block;
|
||||
.brand-info .info-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 290rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brand-info .txt{
|
||||
display: block;
|
||||
height: 37.5rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
.brand-info .info {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.brand-info .line{
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
.brand-info .txt {
|
||||
display: block;
|
||||
height: 37.5rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.brand-info .desc{
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 41.5rpx 31.25rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 41.5rpx;
|
||||
text-align: center;
|
||||
.brand-info .line {
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.cate-item .b{
|
||||
.brand-info .desc {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 41.5rpx 31.25rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 41.5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b {
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
@@ -67,7 +68,7 @@ page{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.cate-item .b .item{
|
||||
.cate-item .b .item {
|
||||
float: left;
|
||||
background: #fff;
|
||||
width: 375rpx;
|
||||
@@ -78,17 +79,17 @@ page{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b .item-b{
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
.cate-item .b .item-b {
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
}
|
||||
|
||||
.cate-item .item .img{
|
||||
margin-top: 10rpx;
|
||||
.cate-item .item .img {
|
||||
margin-top: 10rpx;
|
||||
width: 302rpx;
|
||||
height: 302rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .name{
|
||||
.cate-item .item .name {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 35rpx;
|
||||
@@ -100,11 +101,11 @@ page{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .item .price{
|
||||
.cate-item .item .price {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,299 +5,299 @@ var user = require('../../utils/user.js');
|
||||
var app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
cartGoods: [],
|
||||
cartTotal: {
|
||||
"goodsCount": 0,
|
||||
"goodsAmount": 0.00,
|
||||
"checkedGoodsCount": 0,
|
||||
"checkedGoodsAmount": 0.00
|
||||
data: {
|
||||
cartGoods: [],
|
||||
cartTotal: {
|
||||
"goodsCount": 0,
|
||||
"goodsAmount": 0.00,
|
||||
"checkedGoodsCount": 0,
|
||||
"checkedGoodsAmount": 0.00
|
||||
},
|
||||
isEditCart: false,
|
||||
checkedAllStatus: true,
|
||||
editCartList: [],
|
||||
hasLogin: false
|
||||
},
|
||||
isEditCart: false,
|
||||
checkedAllStatus: true,
|
||||
editCartList: [],
|
||||
hasLogin: false
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getCartList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
if (app.globalData.hasLogin) {
|
||||
this.getCartList();
|
||||
}
|
||||
|
||||
this.setData({
|
||||
hasLogin: app.globalData.hasLogin
|
||||
});
|
||||
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
goLogin() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/auth/login/login"
|
||||
});
|
||||
},
|
||||
getCartList: function() {
|
||||
let that = this;
|
||||
util.request(api.CartList).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
isCheckedAll: function() {
|
||||
//判断购物车商品已全选
|
||||
return this.data.cartGoods.every(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
doCheckedAll: function() {
|
||||
let checkedAll = this.isCheckedAll()
|
||||
this.setData({
|
||||
checkedAllStatus: this.isCheckedAll()
|
||||
});
|
||||
},
|
||||
checkedItem: function(event) {
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let that = this;
|
||||
|
||||
let productIds = [];
|
||||
productIds.push(that.data.cartGoods[itemIndex].productId);
|
||||
if (!this.data.isEditCart) {
|
||||
util.request(api.CartChecked, {
|
||||
productIds: productIds,
|
||||
isChecked: that.data.cartGoods[itemIndex].checked ? 0 : 1
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getCartList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
if (app.globalData.hasLogin) {
|
||||
this.getCartList();
|
||||
}
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
this.setData({
|
||||
hasLogin: app.globalData.hasLogin
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let tmpCartData = this.data.cartGoods.map(function(element, index, array) {
|
||||
if (index == itemIndex) {
|
||||
element.checked = !element.checked;
|
||||
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
goLogin() {
|
||||
wx.navigateTo({
|
||||
url: "/pages/auth/login/login"
|
||||
});
|
||||
},
|
||||
getCartList: function() {
|
||||
let that = this;
|
||||
util.request(api.CartList).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
isCheckedAll: function() {
|
||||
//判断购物车商品已全选
|
||||
return this.data.cartGoods.every(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
doCheckedAll: function() {
|
||||
let checkedAll = this.isCheckedAll()
|
||||
this.setData({
|
||||
checkedAllStatus: this.isCheckedAll()
|
||||
});
|
||||
},
|
||||
checkedItem: function(event) {
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let that = this;
|
||||
|
||||
let productIds = [];
|
||||
productIds.push(that.data.cartGoods[itemIndex].productId);
|
||||
if (!this.data.isEditCart) {
|
||||
util.request(api.CartChecked, {
|
||||
productIds: productIds,
|
||||
isChecked: that.data.cartGoods[itemIndex].checked ? 0 : 1
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
}
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let tmpCartData = this.data.cartGoods.map(function(element, index, array) {
|
||||
if (index == itemIndex) {
|
||||
element.checked = !element.checked;
|
||||
}
|
||||
|
||||
return element;
|
||||
});
|
||||
|
||||
that.setData({
|
||||
cartGoods: tmpCartData,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
},
|
||||
getCheckedGoodsCount: function() {
|
||||
let checkedGoodsCount = 0;
|
||||
this.data.cartGoods.forEach(function(v) {
|
||||
if (v.checked === true) {
|
||||
checkedGoodsCount += v.number;
|
||||
}
|
||||
});
|
||||
console.log(checkedGoodsCount);
|
||||
return checkedGoodsCount;
|
||||
},
|
||||
checkedAll: function() {
|
||||
let that = this;
|
||||
|
||||
if (!this.data.isEditCart) {
|
||||
var productIds = this.data.cartGoods.map(function(v) {
|
||||
return v.productId;
|
||||
});
|
||||
util.request(api.CartChecked, {
|
||||
productIds: productIds,
|
||||
isChecked: that.isCheckedAll() ? 0 : 1
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
}
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let checkedAllStatus = that.isCheckedAll();
|
||||
let tmpCartData = this.data.cartGoods.map(function(v) {
|
||||
v.checked = !checkedAllStatus;
|
||||
return v;
|
||||
});
|
||||
|
||||
that.setData({
|
||||
cartGoods: tmpCartData,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
|
||||
return element;
|
||||
});
|
||||
|
||||
that.setData({
|
||||
cartGoods: tmpCartData,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
},
|
||||
getCheckedGoodsCount: function() {
|
||||
let checkedGoodsCount = 0;
|
||||
this.data.cartGoods.forEach(function(v) {
|
||||
if (v.checked === true) {
|
||||
checkedGoodsCount += v.number;
|
||||
}
|
||||
});
|
||||
console.log(checkedGoodsCount);
|
||||
return checkedGoodsCount;
|
||||
},
|
||||
checkedAll: function() {
|
||||
let that = this;
|
||||
|
||||
if (!this.data.isEditCart) {
|
||||
var productIds = this.data.cartGoods.map(function(v) {
|
||||
return v.productId;
|
||||
});
|
||||
util.request(api.CartChecked, {
|
||||
productIds: productIds,
|
||||
isChecked: that.isCheckedAll() ? 0 : 1
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
cartGoods: res.data.cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
},
|
||||
editCart: function() {
|
||||
var that = this;
|
||||
if (this.data.isEditCart) {
|
||||
this.getCartList();
|
||||
this.setData({
|
||||
isEditCart: !this.data.isEditCart
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let tmpCartList = this.data.cartGoods.map(function(v) {
|
||||
v.checked = false;
|
||||
return v;
|
||||
});
|
||||
this.setData({
|
||||
editCartList: this.data.cartGoods,
|
||||
cartGoods: tmpCartList,
|
||||
isEditCart: !this.data.isEditCart,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let checkedAllStatus = that.isCheckedAll();
|
||||
let tmpCartData = this.data.cartGoods.map(function(v) {
|
||||
v.checked = !checkedAllStatus;
|
||||
return v;
|
||||
});
|
||||
},
|
||||
updateCart: function(productId, goodsId, number, id) {
|
||||
let that = this;
|
||||
|
||||
that.setData({
|
||||
cartGoods: tmpCartData,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
editCart: function() {
|
||||
var that = this;
|
||||
if (this.data.isEditCart) {
|
||||
this.getCartList();
|
||||
this.setData({
|
||||
isEditCart: !this.data.isEditCart
|
||||
});
|
||||
} else {
|
||||
//编辑状态
|
||||
let tmpCartList = this.data.cartGoods.map(function(v) {
|
||||
v.checked = false;
|
||||
return v;
|
||||
});
|
||||
this.setData({
|
||||
editCartList: this.data.cartGoods,
|
||||
cartGoods: tmpCartList,
|
||||
isEditCart: !this.data.isEditCart,
|
||||
checkedAllStatus: that.isCheckedAll(),
|
||||
'cartTotal.checkedGoodsCount': that.getCheckedGoodsCount()
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
updateCart: function(productId, goodsId, number, id) {
|
||||
let that = this;
|
||||
|
||||
util.request(api.CartUpdate, {
|
||||
productId: productId,
|
||||
goodsId: goodsId,
|
||||
number: number,
|
||||
id: id
|
||||
}, 'POST').then(function(res) {
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
cutNumber: function(event) {
|
||||
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let cartItem = this.data.cartGoods[itemIndex];
|
||||
let number = (cartItem.number - 1 > 1) ? cartItem.number - 1 : 1;
|
||||
cartItem.number = number;
|
||||
this.setData({
|
||||
cartGoods: this.data.cartGoods
|
||||
});
|
||||
this.updateCart(cartItem.productId, cartItem.goodsId, number, cartItem.id);
|
||||
},
|
||||
addNumber: function(event) {
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let cartItem = this.data.cartGoods[itemIndex];
|
||||
let number = cartItem.number + 1;
|
||||
cartItem.number = number;
|
||||
this.setData({
|
||||
cartGoods: this.data.cartGoods
|
||||
});
|
||||
this.updateCart(cartItem.productId, cartItem.goodsId, number, cartItem.id);
|
||||
|
||||
},
|
||||
checkoutOrder: function() {
|
||||
//获取已选择的商品
|
||||
let that = this;
|
||||
|
||||
var checkedGoods = this.data.cartGoods.filter(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (checkedGoods.length <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// storage中设置了cartId,则是购物车购买
|
||||
try {
|
||||
wx.setStorageSync('cartId', 0);
|
||||
wx.navigateTo({
|
||||
url: '/pages/checkout/checkout'
|
||||
})
|
||||
} catch (e) {}
|
||||
|
||||
},
|
||||
deleteCart: function() {
|
||||
//获取已选择的商品
|
||||
let that = this;
|
||||
|
||||
let productIds = this.data.cartGoods.filter(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (productIds.length <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
productIds = productIds.map(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return element.productId;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
util.request(api.CartDelete, {
|
||||
productIds: productIds
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
let cartList = res.data.cartList.map(v => {
|
||||
v.checked = false;
|
||||
return v;
|
||||
util.request(api.CartUpdate, {
|
||||
productId: productId,
|
||||
goodsId: goodsId,
|
||||
number: number,
|
||||
id: id
|
||||
}, 'POST').then(function(res) {
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
|
||||
that.setData({
|
||||
cartGoods: cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
}
|
||||
},
|
||||
cutNumber: function(event) {
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
}
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let cartItem = this.data.cartGoods[itemIndex];
|
||||
let number = (cartItem.number - 1 > 1) ? cartItem.number - 1 : 1;
|
||||
cartItem.number = number;
|
||||
this.setData({
|
||||
cartGoods: this.data.cartGoods
|
||||
});
|
||||
this.updateCart(cartItem.productId, cartItem.goodsId, number, cartItem.id);
|
||||
},
|
||||
addNumber: function(event) {
|
||||
let itemIndex = event.target.dataset.itemIndex;
|
||||
let cartItem = this.data.cartGoods[itemIndex];
|
||||
let number = cartItem.number + 1;
|
||||
cartItem.number = number;
|
||||
this.setData({
|
||||
cartGoods: this.data.cartGoods
|
||||
});
|
||||
this.updateCart(cartItem.productId, cartItem.goodsId, number, cartItem.id);
|
||||
|
||||
},
|
||||
checkoutOrder: function() {
|
||||
//获取已选择的商品
|
||||
let that = this;
|
||||
|
||||
var checkedGoods = this.data.cartGoods.filter(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (checkedGoods.length <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// storage中设置了cartId,则是购物车购买
|
||||
try {
|
||||
wx.setStorageSync('cartId', 0);
|
||||
wx.navigateTo({
|
||||
url: '/pages/checkout/checkout'
|
||||
})
|
||||
} catch (e) {}
|
||||
|
||||
},
|
||||
deleteCart: function() {
|
||||
//获取已选择的商品
|
||||
let that = this;
|
||||
|
||||
let productIds = this.data.cartGoods.filter(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (productIds.length <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
productIds = productIds.map(function(element, index, array) {
|
||||
if (element.checked == true) {
|
||||
return element.productId;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
util.request(api.CartDelete, {
|
||||
productIds: productIds
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
let cartList = res.data.cartList.map(v => {
|
||||
v.checked = false;
|
||||
return v;
|
||||
});
|
||||
|
||||
that.setData({
|
||||
cartGoods: cartList,
|
||||
cartTotal: res.data.cartTotal
|
||||
});
|
||||
}
|
||||
|
||||
that.setData({
|
||||
checkedAllStatus: that.isCheckedAll()
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="c">
|
||||
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
|
||||
<text>还没有登录</text>
|
||||
<button style="background-color:#A9A9A9" bindtap="goLogin">去登录</button>
|
||||
<button style="background-color:#A9A9A9" bindtap="goLogin">去登录</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class='login' wx:else>
|
||||
|
||||
@@ -449,7 +449,7 @@ page {
|
||||
border-bottom-right-radius: 50rpx;
|
||||
letter-spacing: 3rpx;
|
||||
/* 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 {
|
||||
@@ -508,7 +508,7 @@ page {
|
||||
border-top-right-radius: 50rpx;
|
||||
border-bottom-right-radius: 50rpx;
|
||||
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%); */
|
||||
}
|
||||
|
||||
|
||||
@@ -2,85 +2,85 @@ var util = require('../../utils/util.js');
|
||||
var api = require('../../config/api.js');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
categoryList: [],
|
||||
currentCategory: {},
|
||||
currentSubCategoryList: {},
|
||||
scrollLeft: 0,
|
||||
scrollTop: 0,
|
||||
goodsCount: 0,
|
||||
scrollHeight: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.getCatalog();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getCatalog();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
getCatalog: function() {
|
||||
//CatalogList
|
||||
let that = this;
|
||||
wx.showLoading({
|
||||
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
|
||||
});
|
||||
});
|
||||
data: {
|
||||
categoryList: [],
|
||||
currentCategory: {},
|
||||
currentSubCategoryList: {},
|
||||
scrollLeft: 0,
|
||||
scrollTop: 0,
|
||||
goodsCount: 0,
|
||||
scrollHeight: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
this.getCatalog();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getCatalog();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
getCatalog: function() {
|
||||
//CatalogList
|
||||
let that = this;
|
||||
wx.showLoading({
|
||||
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
|
||||
});
|
||||
});
|
||||
},
|
||||
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;
|
||||
},
|
||||
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);
|
||||
}
|
||||
|
||||
this.getCurrentCategory(event.currentTarget.dataset.id);
|
||||
}
|
||||
})
|
||||
@@ -7,24 +7,24 @@
|
||||
</view>
|
||||
<view class="catalog">
|
||||
<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 class="cate" scroll-y="true">
|
||||
<navigator url="url" class="banner">
|
||||
<image class="image" src="{{currentCategory.picUrl}}"></image>
|
||||
<view class="txt">{{currentCategory.frontName}}</view>
|
||||
<navigator url="url" class="banner">
|
||||
<image class="image" src="{{currentCategory.picUrl}}"></image>
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -68,9 +68,9 @@ page {
|
||||
}
|
||||
|
||||
.catalog .nav .item.active {
|
||||
color: #AB956D;
|
||||
color: #ab956d;
|
||||
font-size: 36rpx;
|
||||
border-left: 6rpx solid #AB956D;
|
||||
border-left: 6rpx solid #ab956d;
|
||||
}
|
||||
|
||||
.catalog .cate {
|
||||
|
||||
@@ -13,7 +13,7 @@ Page({
|
||||
page: 1,
|
||||
size: 100
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
var that = this;
|
||||
if (options.id) {
|
||||
@@ -23,7 +23,7 @@ Page({
|
||||
}
|
||||
|
||||
wx.getSystemInfo({
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.setData({
|
||||
scrollHeight: res.windowHeight
|
||||
});
|
||||
@@ -34,10 +34,12 @@ Page({
|
||||
this.getCategoryInfo();
|
||||
|
||||
},
|
||||
getCategoryInfo: function () {
|
||||
getCategoryInfo: function() {
|
||||
let that = this;
|
||||
util.request(api.GoodsCategory, { id: this.data.id })
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsCategory, {
|
||||
id: this.data.id
|
||||
})
|
||||
.then(function(res) {
|
||||
|
||||
if (res.errno == 0) {
|
||||
that.setData({
|
||||
@@ -75,33 +77,37 @@ Page({
|
||||
} else {
|
||||
//显示错误信息
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
console.log(1);
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
getGoodsList: function () {
|
||||
getGoodsList: function() {
|
||||
var that = this;
|
||||
|
||||
util.request(api.GoodsList, {categoryId: that.data.id, page: that.data.page, size: that.data.size})
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsList, {
|
||||
categoryId: that.data.id,
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
})
|
||||
.then(function(res) {
|
||||
that.setData({
|
||||
goodsList: res.data.goodsList,
|
||||
});
|
||||
});
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
switchCate: function (event) {
|
||||
switchCate: function(event) {
|
||||
if (this.data.id == event.currentTarget.dataset.id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<view class="container">
|
||||
<view class="cate-nav">
|
||||
<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 class="name">{{item.name}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};">
|
||||
<view class="cate-nav">
|
||||
<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 class="name">{{item.name}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" scroll-top="{{scrollTop}}" style="height:{{scrollHeight}};">
|
||||
|
||||
<view class="cate-item">
|
||||
<view class="h">
|
||||
<text class="name">{{currentCategory.name}}</text>
|
||||
<text class="desc">{{currentCategory.frontName}}</text>
|
||||
</view>
|
||||
<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" >
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="h">
|
||||
<text class="name">{{currentCategory.name}}</text>
|
||||
<text class="desc">{{currentCategory.frontName}}</text>
|
||||
</view>
|
||||
<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">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -1,81 +1,82 @@
|
||||
.container{
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.cate-nav{
|
||||
position: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 1000;
|
||||
.container {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.cate-nav-body{
|
||||
height: 84rpx;
|
||||
white-space: nowrap;
|
||||
background: #fff;
|
||||
border-top: 1px solid rgba(0,0,0,.15);
|
||||
overflow: hidden;
|
||||
.cate-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.cate-nav .item{
|
||||
display: inline-block;
|
||||
height: 84rpx;
|
||||
min-width: 130rpx;
|
||||
padding: 0 15rpx;
|
||||
.cate-nav-body {
|
||||
height: 84rpx;
|
||||
white-space: nowrap;
|
||||
background: #fff;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cate-nav .item .name{
|
||||
display: block;
|
||||
height: 84rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 84rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: auto;
|
||||
.cate-nav .item {
|
||||
display: inline-block;
|
||||
height: 84rpx;
|
||||
min-width: 130rpx;
|
||||
padding: 0 15rpx;
|
||||
}
|
||||
|
||||
.cate-nav .item.active .name{
|
||||
color: #AB956D;
|
||||
border-bottom: 2px solid #AB956D;
|
||||
.cate-nav .item .name {
|
||||
display: block;
|
||||
height: 84rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 84rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.cate-item{
|
||||
margin-top: 94rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
.cate-nav .item.active .name {
|
||||
color: #ab956d;
|
||||
border-bottom: 2px solid #ab956d;
|
||||
}
|
||||
|
||||
.cate-item .h{
|
||||
height: 145rpx;
|
||||
width: 750rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.cate-item {
|
||||
margin-top: 94rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cate-item .h .name{
|
||||
display: block;
|
||||
height: 35rpx;
|
||||
margin-bottom: 18rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
.cate-item .h {
|
||||
height: 145rpx;
|
||||
width: 750rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cate-item .h .desc{
|
||||
display: block;
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
.cate-item .h .name {
|
||||
display: block;
|
||||
height: 35rpx;
|
||||
margin-bottom: 18rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .b{
|
||||
.cate-item .h .desc {
|
||||
display: block;
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.cate-item .b {
|
||||
width: 750rpx;
|
||||
padding: 0 6.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cate-item .b .item{
|
||||
.cate-item .b .item {
|
||||
float: left;
|
||||
background: #fff;
|
||||
width: 365rpx;
|
||||
@@ -86,16 +87,16 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b .item-b{
|
||||
.cate-item .b .item-b {
|
||||
margin-left: 6.25rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .img{
|
||||
.cate-item .item .img {
|
||||
width: 302rpx;
|
||||
height: 302rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .name{
|
||||
.cate-item .item .name {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 35rpx;
|
||||
@@ -107,11 +108,11 @@
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .item .price{
|
||||
.cate-item .item .price {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #AB956D;
|
||||
}
|
||||
color: #ab956d;
|
||||
}
|
||||
|
||||
@@ -10,174 +10,174 @@ Page({
|
||||
checkedCoupon: [],
|
||||
couponList: [],
|
||||
goodsTotalPrice: 0.00, //商品总价
|
||||
freightPrice: 0.00, //快递费
|
||||
couponPrice: 0.00, //优惠券的价格
|
||||
grouponPrice: 0.00, //团购优惠价格
|
||||
orderTotalPrice: 0.00, //订单总价
|
||||
actualPrice: 0.00, //实际需要支付的总价
|
||||
freightPrice: 0.00, //快递费
|
||||
couponPrice: 0.00, //优惠券的价格
|
||||
grouponPrice: 0.00, //团购优惠价格
|
||||
orderTotalPrice: 0.00, //订单总价
|
||||
actualPrice: 0.00, //实际需要支付的总价
|
||||
cartId: 0,
|
||||
addressId: 0,
|
||||
couponId: 0,
|
||||
message: '',
|
||||
grouponLinkId: 0, //参与的团购,如果是发起则为0
|
||||
grouponRulesId: 0 //团购规则ID
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
couponId: 0,
|
||||
message: '',
|
||||
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,
|
||||
});
|
||||
}
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
selectAddress() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/ucenter/address/address',
|
||||
})
|
||||
},
|
||||
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({
|
||||
'cartId': cartId
|
||||
});
|
||||
}
|
||||
|
||||
var addressId = wx.getStorageSync('addressId');
|
||||
if (addressId) {
|
||||
this.setData({
|
||||
'addressId': addressId
|
||||
});
|
||||
}
|
||||
|
||||
var couponId = wx.getStorageSync('couponId');
|
||||
if (couponId) {
|
||||
this.setData({
|
||||
'couponId': couponId
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
this.getCheckoutInfo();
|
||||
},
|
||||
onHide: 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,
|
||||
message: this.data.message,
|
||||
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
|
||||
//获取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,
|
||||
});
|
||||
},
|
||||
'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
|
||||
});
|
||||
}
|
||||
}
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
selectAddress() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/ucenter/address/address',
|
||||
})
|
||||
},
|
||||
bindMessageInput: function(e) {
|
||||
this.setData({
|
||||
message: e.detail.value
|
||||
});
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
|
||||
},
|
||||
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 couponId = wx.getStorageSync('couponId');
|
||||
if (couponId) {
|
||||
this.setData({
|
||||
'couponId': couponId
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
this.getCheckoutInfo();
|
||||
},
|
||||
onHide: 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,
|
||||
message: this.data.message,
|
||||
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
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
wx.redirectTo({
|
||||
url: '/pages/payResult/payResult?status=0&orderId=' + orderId
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -1,89 +1,89 @@
|
||||
<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>
|
||||
<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 class="coupon-box">
|
||||
<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 class="coupon-box">
|
||||
<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 class="message-box">
|
||||
<input class="message-item" bindinput="bindMessageInput" placeholder="如需要,请输入留言" value="{{message}}" />
|
||||
</view>
|
||||
<view class="message-box">
|
||||
<input class="message-item" bindinput="bindMessageInput" placeholder="如需要,请输入留言" value="{{message}}" />
|
||||
</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 class="order-item no-border">
|
||||
<view class="l">
|
||||
<text class="name">优惠券</text>
|
||||
</view>
|
||||
<view class="r">
|
||||
<text class="txt">-¥{{couponPrice}}元</text>
|
||||
</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>
|
||||
<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="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 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>
|
||||
|
||||
<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>
|
||||
@@ -1,313 +1,311 @@
|
||||
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;
|
||||
}
|
||||
|
||||
.message-box{
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
.message-box {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.message-box .message-item{
|
||||
height: 52.078rpx;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
padding-top: 26rpx;
|
||||
.message-box .message-item {
|
||||
height: 52.078rpx;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
padding-top: 26rpx;
|
||||
}
|
||||
|
||||
.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;
|
||||
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 {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.order-total .l{
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
color: #b4282d;
|
||||
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 .l {
|
||||
flex: 1;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
color: #b4282d;
|
||||
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: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.order-total .r {
|
||||
width: 233rpx;
|
||||
height: 100rpx;
|
||||
background: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,12 @@ Page({
|
||||
picPage: 1,
|
||||
size: 20
|
||||
},
|
||||
getCommentCount: function () {
|
||||
getCommentCount: function() {
|
||||
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) {
|
||||
that.setData({
|
||||
allCount: res.data.allCount,
|
||||
@@ -27,15 +30,15 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
getCommentList: function(){
|
||||
getCommentList: function() {
|
||||
let that = this;
|
||||
util.request(api.CommentList, {
|
||||
valueId: that.data.valueId,
|
||||
util.request(api.CommentList, {
|
||||
valueId: that.data.valueId,
|
||||
type: that.data.type,
|
||||
size: that.data.size,
|
||||
page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage),
|
||||
showType: that.data.showType
|
||||
}).then(function (res) {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
if (that.data.showType == 0) {
|
||||
@@ -54,7 +57,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
type: options.type,
|
||||
@@ -63,23 +66,23 @@ Page({
|
||||
this.getCommentCount();
|
||||
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;
|
||||
if (that.data.showType == 0) {
|
||||
that.setData({
|
||||
@@ -98,16 +101,16 @@ Page({
|
||||
}
|
||||
this.getCommentList();
|
||||
},
|
||||
onReachBottom: function(){
|
||||
onReachBottom: function() {
|
||||
console.log('onPullDownRefresh');
|
||||
if ( this.data.showType == 0) {
|
||||
if (this.data.showType == 0) {
|
||||
|
||||
if (this.data.allCount / this.data.size < this.data.allPage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
'allPage' : this.data.allPage + 1
|
||||
'allPage': this.data.allPage + 1
|
||||
});
|
||||
} else {
|
||||
if (this.data.hasPicCount / this.data.size < this.data.picPage) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<view class="comments">
|
||||
<view class="h">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab">
|
||||
<view class="txt">全部({{allCount}})</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
|
||||
<view class="txt">有图({{hasPicCount}})</view>
|
||||
</view>
|
||||
<view class="h">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab">
|
||||
<view class="txt">全部({{allCount}})</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
|
||||
<view class="txt">有图({{hasPicCount}})</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{comments}}" wx:key="id">
|
||||
<view class="info">
|
||||
|
||||
@@ -1,156 +1,155 @@
|
||||
.comments{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left:30rpx;
|
||||
background: #fff;
|
||||
margin: 20rpx 0;
|
||||
.comments {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left: 30rpx;
|
||||
background: #fff;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.comments .h{
|
||||
position: fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
border-bottom: 1px solid rgba(0,0,0,.15);
|
||||
.comments .h {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.comments .h .item{
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 50%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
.comments .h .item {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 50%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.comments .h .item .txt{
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: 170rpx;
|
||||
.comments .h .item .txt {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: 170rpx;
|
||||
}
|
||||
|
||||
.comments .h .item.active .txt{
|
||||
color: #ab2b2b;
|
||||
border-bottom: 4rpx solid #ab2b2b;
|
||||
.comments .h .item.active .txt {
|
||||
color: #ab2b2b;
|
||||
border-bottom: 4rpx solid #ab2b2b;
|
||||
}
|
||||
|
||||
.comments .b{
|
||||
margin-top: 85rpx;
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
.comments .b {
|
||||
margin-top: 85rpx;
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
}
|
||||
|
||||
.comments .b.no-h{
|
||||
margin-top: 0;
|
||||
.comments .b.no-h {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.comments .item{
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding-bottom: 25rpx;
|
||||
.comments .item {
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.comments .info{
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
.comments .info {
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
}
|
||||
|
||||
.comments .user{
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
.comments .user {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.comments .user image{
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
.comments .user image {
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.comments .user text{
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
.comments .user text {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.comments .time{
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
.comments .time {
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.comments .comment{
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
font-size: 29rpx;
|
||||
margin-bottom: 16rpx;
|
||||
.comments .comment {
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
font-size: 29rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.comments .imgs{
|
||||
width: 720rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 25rpx;
|
||||
.comments .imgs {
|
||||
width: 720rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.comments .imgs .img{
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
margin-right: 28rpx;
|
||||
.comments .imgs .img {
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
|
||||
.comments .spec{
|
||||
width: 720rpx;
|
||||
height: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
.comments .spec {
|
||||
width: 720rpx;
|
||||
height: 25rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.comments .spec .item{
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
.comments .spec .item {
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.comments .customer-service{
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-top: 23rpx;
|
||||
background: rgba(0,0,0,.03);
|
||||
padding: 21rpx;
|
||||
.comments .customer-service {
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-top: 23rpx;
|
||||
background: rgba(0, 0, 0, 0.03);
|
||||
padding: 21rpx;
|
||||
}
|
||||
|
||||
|
||||
.comments .customer-service .u{
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 37.5rpx;
|
||||
.comments .customer-service .u {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
|
||||
.comments .customer-service .c{
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
.comments .customer-service .c {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ Page({
|
||||
picUrls: [],
|
||||
files: []
|
||||
},
|
||||
chooseImage: function (e) {
|
||||
chooseImage: function(e) {
|
||||
if (this.data.files.length >= 5) {
|
||||
util.showErrorToast('只能上传五张图片')
|
||||
return false;
|
||||
@@ -27,7 +27,7 @@ Page({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.setData({
|
||||
files: that.data.files.concat(res.tempFilePaths)
|
||||
});
|
||||
@@ -35,13 +35,13 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
upload: function (res) {
|
||||
upload: function(res) {
|
||||
var that = this;
|
||||
const uploadTask = wx.uploadFile({
|
||||
url: api.StorageUpload,
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
var _res = JSON.parse(res.data);
|
||||
if (_res.errno === 0) {
|
||||
var url = _res.data.url
|
||||
@@ -52,7 +52,7 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (e) {
|
||||
fail: function(e) {
|
||||
wx.showModal({
|
||||
title: '错误',
|
||||
content: '上传失败',
|
||||
@@ -68,28 +68,24 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
previewImage: function (e) {
|
||||
previewImage: function(e) {
|
||||
wx.previewImage({
|
||||
current: e.currentTarget.id, // 当前显示图片的http链接
|
||||
urls: this.data.files // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
selectRater: function (e) {
|
||||
selectRater: function(e) {
|
||||
var star = e.currentTarget.dataset.star + 1;
|
||||
var starText;
|
||||
if (star == 1) {
|
||||
starText = '很差';
|
||||
}
|
||||
else if (star == 2) {
|
||||
} else if (star == 2) {
|
||||
starText = '不太满意';
|
||||
}
|
||||
else if (star == 3) {
|
||||
} else if (star == 3) {
|
||||
starText = '满意';
|
||||
}
|
||||
else if (star == 4) {
|
||||
} else if (star == 4) {
|
||||
starText = '比较满意';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
starText = '十分满意'
|
||||
}
|
||||
this.setData({
|
||||
@@ -98,7 +94,7 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
var that = this;
|
||||
that.setData({
|
||||
orderId: options.orderId,
|
||||
@@ -107,11 +103,12 @@ Page({
|
||||
});
|
||||
this.getOrderGoods();
|
||||
},
|
||||
getOrderGoods: function () {
|
||||
getOrderGoods: function() {
|
||||
let that = this;
|
||||
util.request(api.OrderGoods, {
|
||||
orderId: that.data.orderId, goodsId: that.data.valueId
|
||||
}).then(function (res) {
|
||||
orderId: that.data.orderId,
|
||||
goodsId: that.data.valueId
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
orderGoods: res.data,
|
||||
@@ -119,10 +116,10 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onClose: function () {
|
||||
onClose: function() {
|
||||
wx.navigateBack();
|
||||
},
|
||||
onPost: function () {
|
||||
onPost: function() {
|
||||
let that = this;
|
||||
|
||||
if (!this.data.content) {
|
||||
@@ -136,11 +133,11 @@ Page({
|
||||
star: that.data.star,
|
||||
hasPicture: that.data.hasPicture,
|
||||
picUrls: that.data.picUrls
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '评论成功',
|
||||
complete: function () {
|
||||
complete: function() {
|
||||
wx.switchTab({
|
||||
url: '/pages/ucenter/index/index'
|
||||
})
|
||||
@@ -162,18 +159,18 @@ Page({
|
||||
content: event.detail.value,
|
||||
})
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="goods-info">
|
||||
<view class="c">
|
||||
<text class="desc">{{goods.goodsBrief}}</text>
|
||||
|
||||
@@ -823,7 +823,6 @@
|
||||
line-height: 65rpx;
|
||||
}
|
||||
|
||||
|
||||
.contact {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
@@ -932,6 +931,7 @@
|
||||
height: 128rpx;
|
||||
margin-top: 0rpx;
|
||||
}
|
||||
|
||||
.sharebtn_text {
|
||||
/* border: 1px solid #757575; */
|
||||
width: 150rpx;
|
||||
@@ -941,8 +941,9 @@
|
||||
font-size: 20rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.separate {
|
||||
background: #e0e3da;
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,289 +2,289 @@ var util = require('../../../utils/util.js');
|
||||
var api = require('../../../config/api.js');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
id: 0,
|
||||
orderId: 0,
|
||||
groupon: {},
|
||||
linkGrouponId: 0,
|
||||
joiners: [],
|
||||
orderInfo: {},
|
||||
orderGoods: [],
|
||||
expressInfo: {},
|
||||
flag: false,
|
||||
handleOption: {}
|
||||
},
|
||||
data: {
|
||||
id: 0,
|
||||
orderId: 0,
|
||||
groupon: {},
|
||||
linkGrouponId: 0,
|
||||
joiners: [],
|
||||
orderInfo: {},
|
||||
orderGoods: [],
|
||||
expressInfo: {},
|
||||
flag: false,
|
||||
handleOption: {}
|
||||
},
|
||||
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
id: options.id
|
||||
});
|
||||
this.getOrderDetail();
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
id: options.id
|
||||
});
|
||||
this.getOrderDetail();
|
||||
},
|
||||
|
||||
// 页面分享
|
||||
onShareAppMessage: function() {
|
||||
let that = this;
|
||||
return {
|
||||
title: '邀请团购',
|
||||
desc: '唯爱与美食不可辜负',
|
||||
path: '/pages/index/index?grouponId=' + this.data.linkGrouponId
|
||||
}
|
||||
},
|
||||
|
||||
shareGroupon: function() {
|
||||
let that = this;
|
||||
wx.showActionSheet({
|
||||
itemList: ['分享给朋友', '分享到朋友圈'],
|
||||
success: function(res) {
|
||||
if (res.tapIndex == 0) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '点击右上角 "..." 转发给朋友',
|
||||
showCancel: false
|
||||
});
|
||||
} else if (res.tapIndex == 1) {
|
||||
that.saveShare();
|
||||
} else {
|
||||
console.log(res.tapIndex);
|
||||
// 页面分享
|
||||
onShareAppMessage: function() {
|
||||
let that = this;
|
||||
return {
|
||||
title: '邀请团购',
|
||||
desc: '唯爱与美食不可辜负',
|
||||
path: '/pages/index/index?grouponId=' + this.data.linkGrouponId
|
||||
}
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
// 保存分享图
|
||||
saveShare: function() {
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
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('用户点击确定');
|
||||
shareGroupon: function() {
|
||||
let that = this;
|
||||
wx.showActionSheet({
|
||||
itemList: ['分享给朋友', '分享到朋友圈'],
|
||||
success: function(res) {
|
||||
if (res.tapIndex == 0) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '点击右上角 "..." 转发给朋友',
|
||||
showCancel: false
|
||||
});
|
||||
} else if (res.tapIndex == 1) {
|
||||
that.saveShare();
|
||||
} else {
|
||||
console.log(res.tapIndex);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log('fail')
|
||||
}
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function() {
|
||||
console.log('fail')
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderDetail();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
// 保存分享图
|
||||
saveShare: function() {
|
||||
let that = this;
|
||||
wx.downloadFile({
|
||||
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')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取物流信息
|
||||
getOrderExpress: function() {
|
||||
let that = this;
|
||||
util.request(api.ExpressQuery, {
|
||||
expCode: that.data.orderInfo.expCode,
|
||||
expNo: that.data.orderInfo.expNo
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
expressInfo: res.data
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderDetail();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
|
||||
//获取物流信息
|
||||
getOrderExpress: function() {
|
||||
let that = this;
|
||||
util.request(api.ExpressQuery, {
|
||||
expCode: that.data.orderInfo.expCode,
|
||||
expNo: that.data.orderInfo.expNo
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
expressInfo: res.data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
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
|
||||
},
|
||||
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) {
|
||||
that.getOrderExpress();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// “去付款”按钮点击效果
|
||||
payOrder: function() {
|
||||
let that = this;
|
||||
util.request(api.OrderPrepay, {
|
||||
orderId: that.data.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("支付过程成功");
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
},
|
||||
'fail': function(res) {
|
||||
console.log("支付过程失败");
|
||||
util.showErrorToast('支付失败');
|
||||
},
|
||||
'complete': function(res) {
|
||||
console.log("支付过程结束")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 请求物流信息,仅当订单状态为发货时才请求
|
||||
if (res.data.orderInfo.handleOption.confirm) {
|
||||
that.getOrderExpress();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// “去付款”按钮点击效果
|
||||
payOrder: function() {
|
||||
let that = this;
|
||||
util.request(api.OrderPrepay, {
|
||||
orderId: that.data.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("支付过程成功");
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
},
|
||||
'fail': function(res) {
|
||||
console.log("支付过程失败");
|
||||
util.showErrorToast('支付失败');
|
||||
},
|
||||
'complete': function(res) {
|
||||
console.log("支付过程结束")
|
||||
}
|
||||
},
|
||||
// “取消订单”点击效果
|
||||
cancelOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderCancel, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// “取消订单并退款”点击效果
|
||||
refundOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
},
|
||||
// “取消订单”点击效果
|
||||
cancelOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderCancel, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderRefund, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// “取消订单并退款”点击效果
|
||||
refundOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
});
|
||||
},
|
||||
// “删除”点击效果
|
||||
deleteOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderRefund, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要删除此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderDelete, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '删除订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// “删除”点击效果
|
||||
deleteOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
});
|
||||
},
|
||||
// “确认收货”点击效果
|
||||
confirmOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要删除此订单?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderDelete, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '删除订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确认收货?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderConfirm, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '确认收货成功!'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// “确认收货”点击效果
|
||||
confirmOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确认收货?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderConfirm, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '确认收货成功!'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
});
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "团购详情"
|
||||
"navigationBarTitleText": "团购详情"
|
||||
}
|
||||
@@ -1,91 +1,91 @@
|
||||
<view class="container">
|
||||
<view class="order-info">
|
||||
<view class="item-a">下单时间:{{orderInfo.addTime}}</view>
|
||||
<view class="item-b">订单编号:{{orderInfo.orderSn}}</view>
|
||||
<view class="item-c">
|
||||
<view class="l">实付:
|
||||
<text class="cost">¥{{orderInfo.actualPrice}}</text>
|
||||
</view>
|
||||
<view class="r">
|
||||
<view class="btn active" bindtap="shareGroupon">邀请参团</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 class="order-goods">
|
||||
<view class="h">
|
||||
<view class="label">商品信息</view>
|
||||
<view class="status">{{orderInfo.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<view class="item" wx:for="{{orderGoods}}" wx:key="id">
|
||||
<view class="img">
|
||||
<image src="{{item.picUrl}}"></image>
|
||||
<view class="order-info">
|
||||
<view class="item-a">下单时间:{{orderInfo.addTime}}</view>
|
||||
<view class="item-b">订单编号:{{orderInfo.orderSn}}</view>
|
||||
<view class="item-c">
|
||||
<view class="l">实付:
|
||||
<text class="cost">¥{{orderInfo.actualPrice}}</text>
|
||||
</view>
|
||||
<view class="r">
|
||||
<view class="btn active" bindtap="shareGroupon">邀请参团</view>
|
||||
</view>
|
||||
</view>
|
||||
<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 class="order-bottom">
|
||||
<view class="address">
|
||||
<view class="t">
|
||||
<text class="name">{{orderInfo.consignee}}</text>
|
||||
<text class="mobile">{{orderInfo.mobile}}</text>
|
||||
<view class="menu-list-pro">
|
||||
<view class="h">
|
||||
<view class="label">参与团购 ( {{joiners.length}}人)</view>
|
||||
<view class="status">查看全部</view>
|
||||
</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 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 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 class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
|
||||
<view class="expand">
|
||||
<view class="title">
|
||||
<view class="t">快递公司:{{expressInfo.expName}}</view>
|
||||
<view class="b">物流单号:{{expressInfo.expCode}}</view>
|
||||
</view>
|
||||
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
|
||||
</view>
|
||||
|
||||
<!-- <view class="order-express" > -->
|
||||
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
|
||||
<view class="trace">
|
||||
<view class="acceptStation">{{iitem.AcceptStation}}</view>
|
||||
<view class="acceptTime">{{iitem.AcceptTime}}</view>
|
||||
</view>
|
||||
<view class="order-goods">
|
||||
<view class="h">
|
||||
<view class="label">商品信息</view>
|
||||
<view class="status">{{orderInfo.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<view class="item" wx:for="{{orderGoods}}" 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="attr">{{item.goodsSpecificationValues}}</view>
|
||||
<view class="price">¥{{item.retailPrice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order-bottom">
|
||||
<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> -->
|
||||
|
||||
<!-- 物流信息,仅收货状态下可见 -->
|
||||
<view class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
|
||||
<view class="expand">
|
||||
<view class="title">
|
||||
<view class="t">快递公司:{{expressInfo.expName}}</view>
|
||||
<view class="b">物流单号:{{expressInfo.expCode}}</view>
|
||||
</view>
|
||||
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
|
||||
</view>
|
||||
|
||||
<!-- <view class="order-express" > -->
|
||||
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
|
||||
<view class="trace">
|
||||
<view class="acceptStation">{{iitem.AcceptStation}}</view>
|
||||
<view class="acceptTime">{{iitem.AcceptTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
@@ -1,395 +1,395 @@
|
||||
page {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order-info {
|
||||
padding-top: 25rpx;
|
||||
background: #fff;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding-top: 25rpx;
|
||||
background: #fff;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-a {
|
||||
padding-left: 31.25rpx;
|
||||
height: 42.5rpx;
|
||||
padding-bottom: 12.5rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
padding-left: 31.25rpx;
|
||||
height: 42.5rpx;
|
||||
padding-bottom: 12.5rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.item-b {
|
||||
padding-left: 31.25rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
margin-top: 12.5rpx;
|
||||
margin-bottom: 41.5rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
padding-left: 31.25rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
margin-top: 12.5rpx;
|
||||
margin-bottom: 41.5rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.item-c {
|
||||
margin-left: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
}
|
||||
|
||||
.item-c .l {
|
||||
float: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item-c .r {
|
||||
height: 103rpx;
|
||||
float: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 16rpx;
|
||||
height: 103rpx;
|
||||
float: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
|
||||
.item-c .r .btn {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.item-c .cost {
|
||||
color: #b4282d;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.item-c .btn {
|
||||
line-height: 66rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 66rpx;
|
||||
line-height: 66rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 66rpx;
|
||||
}
|
||||
|
||||
.item-c .btn.active {
|
||||
background: #a78845;
|
||||
color: #fff;
|
||||
background: #a78845;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.order-goods {
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-goods .h {
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
}
|
||||
|
||||
.order-goods .h .label {
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order-goods .h .status {
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-goods .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 192rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 192rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-goods .item:last-child {
|
||||
border-bottom: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.order-goods .item .img {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order-goods .item .img image {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .info {
|
||||
flex: 1;
|
||||
height: 145.83rpx;
|
||||
margin-left: 20rpx;
|
||||
flex: 1;
|
||||
height: 145.83rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t {
|
||||
margin-top: 8rpx;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
margin-bottom: 10.5rpx;
|
||||
margin-top: 8rpx;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
margin-bottom: 10.5rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t .name {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t .number {
|
||||
display: block;
|
||||
float: right;
|
||||
height: 33rpx;
|
||||
text-align: right;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
display: block;
|
||||
float: right;
|
||||
height: 33rpx;
|
||||
text-align: right;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .attr {
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
color: #666;
|
||||
margin-bottom: 25rpx;
|
||||
font-size: 25rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
color: #666;
|
||||
margin-bottom: 25rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .price {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .btn {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: right;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: right;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .btn.active {
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.order-bottom {
|
||||
margin-top: 20rpx;
|
||||
padding-left: 31.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
padding-left: 31.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-bottom .address {
|
||||
height: 128rpx;
|
||||
padding-top: 25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
height: 128rpx;
|
||||
padding-top: 25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-bottom .address .t {
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .name {
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
width: 140rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
width: 140rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .mobile {
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .b {
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .total {
|
||||
height: 106rpx;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
height: 106rpx;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-bottom .total .t {
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
display: flex;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.order-bottom .total .label {
|
||||
width: 150rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
width: 150rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .total .txt {
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee {
|
||||
height: 81rpx;
|
||||
line-height: 81rpx;
|
||||
height: 81rpx;
|
||||
line-height: 81rpx;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee .label {
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee .txt {
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-express {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-express .expand {
|
||||
/* margin-top: 20rpx; */
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
/* border: 10rpx #a78845; */
|
||||
/* margin-top: 20rpx; */
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
/* border: 10rpx #a78845; */
|
||||
}
|
||||
|
||||
.order-express .title {
|
||||
float: left;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 10rpx;
|
||||
float: left;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.order-express .ti {
|
||||
float: right;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-top: 28rpx;
|
||||
float: right;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.order-express .t {
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.order-express .b {
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.order-express .traces {
|
||||
padding: 17.5rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f1e6cdcc;
|
||||
padding: 17.5rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f1e6cdcc;
|
||||
}
|
||||
|
||||
.order-express .trace {
|
||||
padding-bottom: 17.5rpx;
|
||||
padding-top: 17.5rpx;
|
||||
background: #fff;
|
||||
padding-bottom: 17.5rpx;
|
||||
padding-top: 17.5rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-express .acceptTime {
|
||||
margin-top: 20rpx;
|
||||
margin-right: 40rpx;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-right: 40rpx;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order-express .acceptStation {
|
||||
font-size: 26rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.menu-list-pro {
|
||||
margin-top: 20rpx;
|
||||
overflow-x: scroll;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
height: 260rpx;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-bottom: 1rpx #cfc9ca;
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
overflow-x: scroll;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
height: 260rpx;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-bottom: 1rpx #cfc9ca;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.menu-list-pro .h {
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
}
|
||||
|
||||
.menu-list-pro .h .label {
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.menu-list-pro .h .status {
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #a78845;
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.menu-list-pro .menu-list-item {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 110rpx;
|
||||
width: 80rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
margin-left: 40rpx;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 110rpx;
|
||||
width: 80rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.menu-list-pro .icon {
|
||||
height: 80rpx;
|
||||
width: 80rpx;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0px 4rpx 4rpx 0px #cfc9ca;
|
||||
height: 80rpx;
|
||||
width: 80rpx;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0px 4rpx 4rpx 0px #cfc9ca;
|
||||
}
|
||||
|
||||
.menu-list-pro .txt {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80rpx;
|
||||
margin-top: 5rpx;
|
||||
font-size: 22rpx;
|
||||
color: #a78845;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80rpx;
|
||||
margin-top: 5rpx;
|
||||
font-size: 22rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
@@ -20,59 +20,59 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
this.getGrouponList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
onPullDownRefresh: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
onReachBottom: function() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
onShareAppMessage: function() {
|
||||
|
||||
},
|
||||
getGrouponList: function () {
|
||||
getGrouponList: function() {
|
||||
|
||||
let that = this;
|
||||
that.setData({
|
||||
@@ -87,7 +87,10 @@ Page({
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
util.request(api.GroupOnList, { page: that.data.page, size: that.data.size }).then(function (res) {
|
||||
util.request(api.GroupOnList, {
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
that.setData({
|
||||
@@ -101,7 +104,7 @@ Page({
|
||||
});
|
||||
|
||||
},
|
||||
nextPage: function (event) {
|
||||
nextPage: function(event) {
|
||||
var that = this;
|
||||
if (this.data.page > that.data.count / that.data.size) {
|
||||
return true;
|
||||
@@ -115,7 +118,7 @@ Page({
|
||||
this.getTopic();
|
||||
|
||||
},
|
||||
prevPage: function (event) {
|
||||
prevPage: function(event) {
|
||||
if (this.data.page <= 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,117 +1,118 @@
|
||||
page ,.container{
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f4f4f4;
|
||||
page, .container {
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.groupon-list{
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f4f4f4;
|
||||
|
||||
.groupon-list {
|
||||
width: 750rpx;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.groupon-list .item {
|
||||
height: 244rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
height: 244rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.groupon-list .img {
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
|
||||
.groupon-list .right {
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
.groupon-list .text {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
}
|
||||
|
||||
.groupon-list .name {
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.groupon-list .capsule-tag {
|
||||
float: right;
|
||||
padding-right: 0rpx;
|
||||
padding-top: 8rpx;
|
||||
float: right;
|
||||
padding-right: 0rpx;
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
|
||||
.groupon-list .zan-capsule + .zan-capsule {
|
||||
margin-left: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.groupon-list .desc {
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.groupon-list .price {
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #AB956D;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #ab956d;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
|
||||
.groupon-list .counterPrice {
|
||||
text-decoration: line-through;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.groupon-list .retailPrice {
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #a78845;
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
.page .disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
@@ -2,51 +2,51 @@ var util = require('../../../utils/util.js');
|
||||
var api = require('../../../config/api.js');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
orderList: [],
|
||||
showType: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
data: {
|
||||
orderList: [],
|
||||
showType: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
|
||||
getOrderList() {
|
||||
let that = this;
|
||||
util.request(api.GroupOnMy, {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
orderList: res.data.data
|
||||
getOrderList() {
|
||||
let that = this;
|
||||
util.request(api.GroupOnMy, {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
orderList: res.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
switchTab: function(event) {
|
||||
let showType = event.currentTarget.dataset.index;
|
||||
this.setData({
|
||||
showType: showType
|
||||
});
|
||||
this.getOrderList();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getOrderList();
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
},
|
||||
switchTab: function(event) {
|
||||
let showType = event.currentTarget.dataset.index;
|
||||
this.setData({
|
||||
showType: showType
|
||||
});
|
||||
this.getOrderList();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getOrderList();
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的团购",
|
||||
"usingComponents": {
|
||||
"zan-capsule": "../../../lib/zanui-weapp/capsule/index"
|
||||
}
|
||||
"navigationBarTitleText": "我的团购",
|
||||
"usingComponents": {
|
||||
"zan-capsule": "../../../lib/zanui-weapp/capsule/index"
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,52 @@
|
||||
<view class="container">
|
||||
<view class="orders-switch">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
|
||||
<view class="txt">发起的团购</view>
|
||||
<view class="orders-switch">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
|
||||
<view class="txt">发起的团购</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
|
||||
<view class="txt">参加的团购</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
|
||||
<view class="txt">参加的团购</view>
|
||||
<view class="no-order" wx:if="{{orderList.length <= 0}}">
|
||||
<view class="c">
|
||||
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
|
||||
<text>尚未参加任何团购</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-order" wx:if="{{orderList.length <= 0}}">
|
||||
<view class="c">
|
||||
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
|
||||
<text>尚未参加任何团购</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="orders">
|
||||
<navigator url="../grouponDetail/grouponDetail?id={{item.id}}" class="order" open-type="navigate" wx:for="{{orderList}}" wx:key="id">
|
||||
<view class="h">
|
||||
<view class="l">订单编号:{{item.orderSn}}</view>
|
||||
<view class="r">{{item.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="j">
|
||||
<view class="l">团购立减:¥{{item.rules.discount}}</view>
|
||||
<view class="r">参与时间:{{item.groupon.addTime}}</view>
|
||||
</view>
|
||||
<view class="i">
|
||||
<view class="l">团购要求:{{item.rules.discountMember}}人</view>
|
||||
<view class="r">当前参与:{{item.joinerCount}}</view>
|
||||
</view>
|
||||
<view class="goods" wx:for="{{item.goodsList}}" wx:key="id" wx:for-item="gitem">
|
||||
<view class="img">
|
||||
<image src="{{gitem.picUrl}}"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<text class="name">{{gitem.goodsName}}</text>
|
||||
<text class="number">共{{gitem.number}}件商品</text>
|
||||
</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="l">实付:¥{{item.actualPrice}}</view>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="状态" rightText="{{item.joinerCount>=item.rules.discountMember?'已达成':'团购中'}}" />
|
||||
</view>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="发起" rightText="{{item.creator}}" wx:if="{{!item.isCreator}}" />
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="orders">
|
||||
<navigator url="../grouponDetail/grouponDetail?id={{item.id}}" class="order" open-type="navigate" wx:for="{{orderList}}" wx:key="id">
|
||||
<view class="h">
|
||||
<view class="l">订单编号:{{item.orderSn}}</view>
|
||||
<view class="r">{{item.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="j">
|
||||
<view class="l">团购立减:¥{{item.rules.discount}}</view>
|
||||
<view class="r">参与时间:{{item.groupon.addTime}}</view>
|
||||
</view>
|
||||
<view class="i">
|
||||
<view class="l">团购要求:{{item.rules.discountMember}}人</view>
|
||||
<view class="r">当前参与:{{item.joinerCount}}</view>
|
||||
</view>
|
||||
<view class="goods" wx:for="{{item.goodsList}}" wx:key="id" wx:for-item="gitem">
|
||||
<view class="img">
|
||||
<image src="{{gitem.picUrl}}"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<text class="name">{{gitem.goodsName}}</text>
|
||||
<text class="number">共{{gitem.number}}件商品</text>
|
||||
</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="l">实付:¥{{item.actualPrice}}</view>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="状态" rightText="{{item.joinerCount>=item.rules.discountMember?'已达成':'团购中'}}" />
|
||||
</view>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="发起" rightText="{{item.creator}}" wx:if="{{!item.isCreator}}" />
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,222 +1,222 @@
|
||||
page {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.capsule-tag {
|
||||
float: right;
|
||||
/* padding-right: 10rpx; */
|
||||
float: right;
|
||||
/* padding-right: 10rpx; */
|
||||
}
|
||||
|
||||
.zan-capsule + .zan-capsule {
|
||||
margin-left: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.orders-switch {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
border-bottom: 1px solid #a78845;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
border-bottom: 1px solid #a78845;
|
||||
}
|
||||
|
||||
.orders-switch .item {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 50%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 50%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.orders-switch .item .txt {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.orders-switch .item.active .txt {
|
||||
color: #a78845;
|
||||
border-bottom: 4rpx solid #a78845;
|
||||
color: #a78845;
|
||||
border-bottom: 4rpx solid #a78845;
|
||||
}
|
||||
|
||||
.no-order {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.no-order .c {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
|
||||
.no-order .c image {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
}
|
||||
|
||||
.no-order .c text {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.orders {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.order {
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order .h {
|
||||
height: 83.3rpx;
|
||||
line-height: 83.3rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
height: 83.3rpx;
|
||||
line-height: 83.3rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order .h .l {
|
||||
float: left;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
float: left;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order .h .r {
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order .i {
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order .i .l {
|
||||
float: left;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
float: left;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order .i .r {
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order .j {
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
}
|
||||
|
||||
.order .j .l {
|
||||
float: left;
|
||||
font-size: 26rpx;
|
||||
color: #a78845;
|
||||
float: left;
|
||||
font-size: 26rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.order .j .r {
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
float: right;
|
||||
color: #a78845;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order .goods {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 199rpx;
|
||||
margin-left: 31.25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 199rpx;
|
||||
margin-left: 31.25rpx;
|
||||
}
|
||||
|
||||
.order .goods .img {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order .goods .img image {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
}
|
||||
|
||||
.order .goods .info {
|
||||
height: 145.83rpx;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
height: 145.83rpx;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.order .goods .name {
|
||||
margin-top: 30rpx;
|
||||
display: block;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
margin-top: 30rpx;
|
||||
display: block;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order .goods .number {
|
||||
display: block;
|
||||
height: 37rpx;
|
||||
line-height: 37rpx;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
display: block;
|
||||
height: 37rpx;
|
||||
line-height: 37rpx;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order .goods .status {
|
||||
width: 105rpx;
|
||||
color: #a78845;
|
||||
font-size: 25rpx;
|
||||
width: 105rpx;
|
||||
color: #a78845;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order .b {
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order .b .l {
|
||||
float: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.order .b .r {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.order .b .btn {
|
||||
margin-top: 19rpx;
|
||||
height: 64.5rpx;
|
||||
line-height: 64.5rpx;
|
||||
text-align: center;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #a78845;
|
||||
margin-top: 19rpx;
|
||||
height: 64.5rpx;
|
||||
line-height: 64.5rpx;
|
||||
text-align: center;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #a78845;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ Page({
|
||||
page: 1,
|
||||
size: 100
|
||||
},
|
||||
getBanner: function () {
|
||||
getBanner: function() {
|
||||
let that = this;
|
||||
util.request(api.GoodsHot).then(function (res) {
|
||||
util.request(api.GoodsHot).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
bannerInfo: res.data.bannerInfo,
|
||||
@@ -28,23 +28,32 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
getCategoryList: function(){
|
||||
getCategoryList: function() {
|
||||
var that = this;
|
||||
|
||||
util.request(api.GoodsFilter, { isHot: 1 })
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsFilter, {
|
||||
isHot: 1
|
||||
})
|
||||
.then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
filterCategory: res.data.filterCategoryList,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
getGoodsList: function (){
|
||||
getGoodsList: function() {
|
||||
var that = this;
|
||||
|
||||
util.request(api.GoodsList, { isHot: true, page: that.data.page, size: that.data.size, order: that.data.currentSortOrder, sort: that.data.currentSort, categoryId: that.data.categoryId})
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsList, {
|
||||
isHot: true,
|
||||
page: that.data.page,
|
||||
size: that.data.size,
|
||||
order: that.data.currentSortOrder,
|
||||
sort: that.data.currentSort,
|
||||
categoryId: that.data.categoryId
|
||||
})
|
||||
.then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
goodsList: res.data.goodsList,
|
||||
@@ -52,29 +61,29 @@ Page({
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.getBanner();
|
||||
this.getGoodsList();
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
openSortFilter: function (event) {
|
||||
openSortFilter: function(event) {
|
||||
let currentId = event.currentTarget.id;
|
||||
switch (currentId) {
|
||||
case 'categoryFilter':
|
||||
@@ -111,7 +120,7 @@ Page({
|
||||
this.getGoodsList();
|
||||
}
|
||||
},
|
||||
selectCategory: function(event){
|
||||
selectCategory: function(event) {
|
||||
let currentIndex = event.target.dataset.categoryIndex;
|
||||
this.setData({
|
||||
'categoryFilter': false,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="sort">
|
||||
<view class="sort-box">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<text class="txt">综合</text>
|
||||
</view>
|
||||
<view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
|
||||
|
||||
@@ -1,132 +1,132 @@
|
||||
page{
|
||||
background: #f4f4f4;
|
||||
page {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.brand-info .name{
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
position: relative;
|
||||
.brand-info .name {
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.brand-info .img{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
.brand-info .img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
}
|
||||
|
||||
.brand-info .info-box{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.brand-info .info-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brand-info .info{
|
||||
display: block;
|
||||
.brand-info .info {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.brand-info .txt{
|
||||
display: block;
|
||||
height: 40rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
.brand-info .txt {
|
||||
display: block;
|
||||
height: 40rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.brand-info .line{
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
.brand-info .line {
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.sort{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 78rpx;
|
||||
.sort {
|
||||
position: relative;
|
||||
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;
|
||||
.sort-box {
|
||||
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;
|
||||
.sort-box .item {
|
||||
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;
|
||||
.sort-box .item .txt {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sort-box .item.active .txt{
|
||||
color: #b4282d;
|
||||
.sort-box .item.active .txt {
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category{
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 40rpx 40rpx 0 0;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.sort-box-category {
|
||||
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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category .item.active{
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
.sort-box-category .item.active {
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
}
|
||||
|
||||
.cate-item .b{
|
||||
.cate-item .b {
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
@@ -134,7 +134,7 @@ page{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.cate-item .b .item{
|
||||
.cate-item .b .item {
|
||||
float: left;
|
||||
background: #fff;
|
||||
width: 375rpx;
|
||||
@@ -145,17 +145,17 @@ page{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b .item-b{
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
.cate-item .b .item-b {
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
}
|
||||
|
||||
.cate-item .item .img{
|
||||
margin-top: 10rpx;
|
||||
.cate-item .item .img {
|
||||
margin-top: 10rpx;
|
||||
width: 302rpx;
|
||||
height: 302rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .name{
|
||||
.cate-item .item .name {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 35rpx;
|
||||
@@ -167,11 +167,11 @@ page{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .item .price{
|
||||
.cate-item .item .price {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,113 +6,113 @@ const user = require('../../utils/user.js');
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
newGoods: [],
|
||||
hotGoods: [],
|
||||
topics: [],
|
||||
brands: [],
|
||||
groupons: [],
|
||||
floorGoods: [],
|
||||
banner: [],
|
||||
channel: []
|
||||
},
|
||||
data: {
|
||||
newGoods: [],
|
||||
hotGoods: [],
|
||||
topics: [],
|
||||
brands: [],
|
||||
groupons: [],
|
||||
floorGoods: [],
|
||||
banner: [],
|
||||
channel: []
|
||||
},
|
||||
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: 'litemall小程序商场',
|
||||
desc: '开源微信小程序商城',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: 'litemall小程序商场',
|
||||
desc: '开源微信小程序商城',
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getIndexData();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getIndexData();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
|
||||
getIndexData: function() {
|
||||
let that = this;
|
||||
util.request(api.IndexUrl).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
newGoods: res.data.newGoodsList,
|
||||
hotGoods: res.data.hotGoodsList,
|
||||
topics: res.data.topicList,
|
||||
brands: res.data.brandList,
|
||||
floorGoods: res.data.floorGoodsList,
|
||||
banner: res.data.banner,
|
||||
groupons: res.data.grouponList,
|
||||
channel: res.data.channel
|
||||
getIndexData: function() {
|
||||
let that = this;
|
||||
util.request(api.IndexUrl).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
newGoods: res.data.newGoodsList,
|
||||
hotGoods: res.data.hotGoodsList,
|
||||
topics: res.data.topicList,
|
||||
brands: res.data.brandList,
|
||||
floorGoods: res.data.floorGoodsList,
|
||||
banner: res.data.banner,
|
||||
groupons: res.data.grouponList,
|
||||
channel: res.data.channel
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad: function(options) {
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.scene) {
|
||||
//这个scene的值存在则证明首页的开启来源于朋友圈分享的图,同时可以通过获取到的goodId的值跳转导航到对应的详情页
|
||||
var scene = decodeURIComponent(options.scene);
|
||||
console.log("scene:" + scene);
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.scene) {
|
||||
//这个scene的值存在则证明首页的开启来源于朋友圈分享的图,同时可以通过获取到的goodId的值跳转导航到对应的详情页
|
||||
var scene = decodeURIComponent(options.scene);
|
||||
console.log("scene:" + scene);
|
||||
|
||||
let info_arr = [];
|
||||
info_arr = scene.split(',');
|
||||
let _type = info_arr[0];
|
||||
let id = info_arr[1];
|
||||
let info_arr = [];
|
||||
info_arr = scene.split(',');
|
||||
let _type = info_arr[0];
|
||||
let id = info_arr[1];
|
||||
|
||||
if (_type == 'goods') {
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?id=' + id
|
||||
});
|
||||
} else if (_type == 'groupon') {
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?grouponId=' + id
|
||||
});
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '../index/index'
|
||||
});
|
||||
}
|
||||
}
|
||||
if (_type == 'goods') {
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?id=' + id
|
||||
});
|
||||
} else if (_type == 'groupon') {
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?grouponId=' + id
|
||||
});
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '../index/index'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.grouponId) {
|
||||
//这个pageId的值存在则证明首页的开启来源于用户点击来首页,同时可以通过获取到的pageId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?grouponId=' + options.grouponId
|
||||
});
|
||||
}
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.grouponId) {
|
||||
//这个pageId的值存在则证明首页的开启来源于用户点击来首页,同时可以通过获取到的pageId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?grouponId=' + options.grouponId
|
||||
});
|
||||
}
|
||||
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.goodId) {
|
||||
//这个goodId的值存在则证明首页的开启来源于分享,同时可以通过获取到的goodId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?id=' + options.goodId
|
||||
});
|
||||
}
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.goodId) {
|
||||
//这个goodId的值存在则证明首页的开启来源于分享,同时可以通过获取到的goodId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../goods/goods?id=' + options.goodId
|
||||
});
|
||||
}
|
||||
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.orderId) {
|
||||
//这个orderId的值存在则证明首页的开启来源于订单模版通知,同时可以通过获取到的pageId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../ucenter/orderDetail/orderDetail?id=' + options.orderId
|
||||
});
|
||||
}
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
if (options.orderId) {
|
||||
//这个orderId的值存在则证明首页的开启来源于订单模版通知,同时可以通过获取到的pageId的值跳转导航到对应的详情页
|
||||
wx.navigateTo({
|
||||
url: '../ucenter/orderDetail/orderDetail?id=' + options.orderId
|
||||
});
|
||||
}
|
||||
|
||||
this.getIndexData();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
this.getIndexData();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
})
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "首页",
|
||||
"usingComponents": {
|
||||
"zan-capsule": "../../lib/zanui-weapp/capsule/index"
|
||||
}
|
||||
"navigationBarTitleText": "首页",
|
||||
"usingComponents": {
|
||||
"zan-capsule": "../../lib/zanui-weapp/capsule/index"
|
||||
}
|
||||
}
|
||||
@@ -1,157 +1,157 @@
|
||||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
|
||||
<swiper-item wx:for="{{banner}}" wx:key="id">
|
||||
<!-- <navigator url="{{item.link}}"> -->
|
||||
<image src="{{item.url}}" background-size="cover"></image>
|
||||
<!-- </navigator> -->
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="m-menu">
|
||||
<navigator class="item" url="/pages/category/category?id={{item.id}}" wx:for="{{channel}}" wx:key="id">
|
||||
<image src="{{item.iconUrl}}" background-size="cover"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
|
||||
<swiper-item wx:for="{{banner}}" wx:key="id">
|
||||
<!-- <navigator url="{{item.link}}"> -->
|
||||
<image src="{{item.url}}" background-size="cover"></image>
|
||||
<!-- </navigator> -->
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="m-menu">
|
||||
<navigator class="item" url="/pages/category/category?id={{item.id}}" wx:for="{{channel}}" wx:key="id">
|
||||
<image src="{{item.iconUrl}}" background-size="cover"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-groupon" wx:if="{{groupons.length > 0}}">
|
||||
<view class="h">
|
||||
<view class="title">
|
||||
<view>
|
||||
<navigator url="/pages/groupon/grouponList/grouponList">
|
||||
<text class="txt">团购专区</text>
|
||||
<view class="a-section a-groupon" wx:if="{{groupons.length > 0}}">
|
||||
<view class="h">
|
||||
<view class="title">
|
||||
<view>
|
||||
<navigator url="/pages/groupon/grouponList/grouponList">
|
||||
<text class="txt">团购专区</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{groupons}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.goods.id}}">
|
||||
<image class="img" src="{{item.goods.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<view class="header">
|
||||
<text class="name">{{item.goods.name}}</text>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="团购" rightText="{{item.groupon_member}}" />
|
||||
</view>
|
||||
</view>
|
||||
<text class="desc">{{item.goods.brief}}</text>
|
||||
<view class="price">
|
||||
<view class="counterPrice">原价:¥{{item.goods.counterPrice}}</view>
|
||||
<view class="retailPrice">现价:¥{{item.groupon_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-brand">
|
||||
<view class="h">
|
||||
<navigator url="../brand/brand">
|
||||
<text class="txt">品牌制造商直供</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item item-1" wx:for="{{brands}}" wx:key="id">
|
||||
<navigator url="/pages/brandDetail/brandDetail?id={{item.id}}">
|
||||
<view class="wrap">
|
||||
<image class="img" src="{{item.picUrl}}" mode="aspectFill"></image>
|
||||
<view class="mt">
|
||||
<text class="brand">{{item.name}}</text>
|
||||
<text class="price">{{item.floorPrice}}</text>
|
||||
<text class="unit">元起</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{groupons}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.goods.id}}">
|
||||
<image class="img" src="{{item.goods.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<view class="header">
|
||||
<text class="name">{{item.goods.name}}</text>
|
||||
<view class="capsule-tag">
|
||||
<zan-capsule color="#a78845" leftText="团购" rightText="{{item.groupon_member}}" />
|
||||
<view class="a-section a-new" wx:if="{{newGoods.length > 0}}">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="../newGoods/newGoods">
|
||||
<text class="txt">周一周四 · 新品首发</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{newGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="../goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-popular" wx:if="{{hotGoods.length > 0}}">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="../hotGoods/hotGoods">
|
||||
<text class="txt">人气推荐</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="desc">{{item.brief}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-topic" wx:if="topics.length > 0">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="/pages/topic/topic">
|
||||
<text class="txt">专题精选</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<scroll-view scroll-x class="list">
|
||||
<view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="../topicDetail/topicDetail?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="np">
|
||||
<text class="name">{{item.title}}</text>
|
||||
<text class="price">¥{{item.price}}元起</text>
|
||||
</view>
|
||||
<text class="desc">{{item.subtitle}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<text class="desc">{{item.goods.brief}}</text>
|
||||
<view class="price">
|
||||
<view class="counterPrice">原价:¥{{item.goods.counterPrice}}</view>
|
||||
<view class="retailPrice">现价:¥{{item.groupon_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-brand">
|
||||
<view class="h">
|
||||
<navigator url="../brand/brand">
|
||||
<text class="txt">品牌制造商直供</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item item-1" wx:for="{{brands}}" wx:key="id">
|
||||
<navigator url="/pages/brandDetail/brandDetail?id={{item.id}}">
|
||||
<view class="wrap">
|
||||
<image class="img" src="{{item.picUrl}}" mode="aspectFill"></image>
|
||||
<view class="mt">
|
||||
<text class="brand">{{item.name}}</text>
|
||||
<text class="price">{{item.floorPrice}}</text>
|
||||
<text class="unit">元起</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="a-section a-new" wx:if="{{newGoods.length > 0}}">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="../newGoods/newGoods">
|
||||
<text class="txt">周一周四 · 新品首发</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{newGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="../goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-popular" wx:if="{{hotGoods.length > 0}}">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="../hotGoods/hotGoods">
|
||||
<text class="txt">人气推荐</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="desc">{{item.brief}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="a-section a-topic" wx:if="topics.length > 0">
|
||||
<view class="h">
|
||||
<view>
|
||||
<navigator url="/pages/topic/topic">
|
||||
<text class="txt">专题精选</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<scroll-view scroll-x class="list">
|
||||
<view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="../topicDetail/topicDetail?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="np">
|
||||
<text class="name">{{item.title}}</text>
|
||||
<text class="price">¥{{item.price}}元起</text>
|
||||
</view>
|
||||
<text class="desc">{{item.subtitle}}</text>
|
||||
</navigator>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="good-grid" wx:for="{{floorGoods}}" wx:key="id">
|
||||
<view class="h">
|
||||
<view class="good-grid" wx:for="{{floorGoods}}" wx:key="id">
|
||||
<view class="h">
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view class="b">
|
||||
<block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
|
||||
<view class="item {{iindex % 2 == 0 ? '' : 'item-b'}}">
|
||||
<navigator url="../goods/goods?id={{iitem.id}}" class="a">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</block>
|
||||
<view class="b">
|
||||
<block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
|
||||
<view class="item {{iindex % 2 == 0 ? '' : 'item-b'}}">
|
||||
<navigator url="../goods/goods?id={{iitem.id}}" class="a">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<navigator url="/pages/category/category?id={{item.id}}" class="t">
|
||||
<view class="txt">{{'更多'+item.name+'好物 >'}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<navigator url="/pages/category/category?id={{item.id}}" class="t">
|
||||
<view class="txt">{{'更多'+item.name+'好物 >'}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
@@ -9,20 +9,15 @@
|
||||
}
|
||||
|
||||
.m-menu {
|
||||
/* border: 1px solid black; */
|
||||
/* height: 280rpx; */
|
||||
background: #fff;
|
||||
/* padding: 0 25rpx; */
|
||||
display: flex;
|
||||
/* justify-content: center; */
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 0rpx;
|
||||
padding-top: 25rpx
|
||||
padding-top: 25rpx;
|
||||
}
|
||||
|
||||
.m-menu .item {
|
||||
/* border: 1px solid black; */
|
||||
width: 150rpx;
|
||||
height: 126rpx;
|
||||
}
|
||||
@@ -116,7 +111,7 @@
|
||||
margin-left: 1rpx;
|
||||
}
|
||||
|
||||
.a-brand .item-1:nth-child(2n+1){
|
||||
.a-brand .item-1:nth-child(2n+1) {
|
||||
margin-left: 0;
|
||||
width: 374rpx;
|
||||
}
|
||||
@@ -127,89 +122,89 @@
|
||||
}
|
||||
|
||||
.a-groupon {
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.a-groupon .b .item {
|
||||
border-top: 1px solid #d9d9d9;
|
||||
margin: 0 20rpx;
|
||||
height: 244rpx;
|
||||
width: 710rpx;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
margin: 0 20rpx;
|
||||
height: 244rpx;
|
||||
width: 710rpx;
|
||||
}
|
||||
|
||||
.a-groupon .b .img {
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
|
||||
.a-groupon .b .right {
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
.a-groupon .b .text {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
}
|
||||
|
||||
.a-groupon .b .name {
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.a-groupon .capsule-tag {
|
||||
float: right;
|
||||
padding-right: 0rpx;
|
||||
padding-top: 8rpx;
|
||||
float: right;
|
||||
padding-right: 0rpx;
|
||||
padding-top: 8rpx;
|
||||
}
|
||||
|
||||
.a-groupon .zan-capsule + .zan-capsule {
|
||||
margin-left: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.a-groupon .b .desc {
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.a-groupon .b .price {
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #AB956D;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #ab956d;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
|
||||
.a-groupon .b .counterPrice {
|
||||
text-decoration: line-through;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.a-groupon .b .retailPrice {
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #a78845;
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.a-new .b {
|
||||
@@ -252,7 +247,7 @@
|
||||
text-align: center;
|
||||
line-height: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #AB956D;
|
||||
color: #ab956d;
|
||||
}
|
||||
|
||||
.a-popular {
|
||||
@@ -313,7 +308,7 @@
|
||||
.a-popular .b .price {
|
||||
width: 456rpx;
|
||||
display: block;
|
||||
color: #AB956D;
|
||||
color: #ab956d;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
@@ -357,7 +352,7 @@
|
||||
|
||||
.a-topic .b .np .price {
|
||||
margin-left: 20.8rpx;
|
||||
color: #AB956D;
|
||||
color: #ab956d;
|
||||
}
|
||||
|
||||
.a-topic .b .desc {
|
||||
@@ -367,7 +362,7 @@
|
||||
font-size: 24rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.good-grid {
|
||||
@@ -403,7 +398,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.good-grid .b .item .a{
|
||||
.good-grid .b .item .a {
|
||||
height: 452rpx;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -436,7 +431,7 @@
|
||||
height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #AB956D;
|
||||
color: #ab956d;
|
||||
}
|
||||
|
||||
.good-grid .t {
|
||||
|
||||
@@ -18,9 +18,9 @@ Page({
|
||||
page: 1,
|
||||
size: 100
|
||||
},
|
||||
getBanner: function () {
|
||||
getBanner: function() {
|
||||
let that = this;
|
||||
util.request(api.GoodsNew).then(function (res) {
|
||||
util.request(api.GoodsNew).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
bannerInfo: res.data.bannerInfo,
|
||||
@@ -31,8 +31,15 @@ Page({
|
||||
getGoodsList: function() {
|
||||
var that = this;
|
||||
|
||||
util.request(api.GoodsList, { isNew: true, page: that.data.page, size: that.data.size, order: that.data.currentSortOrder, sort: that.data.currentSort, categoryId: that.data.categoryId })
|
||||
.then(function (res) {
|
||||
util.request(api.GoodsList, {
|
||||
isNew: true,
|
||||
page: that.data.page,
|
||||
size: that.data.size,
|
||||
order: that.data.currentSortOrder,
|
||||
sort: that.data.currentSort,
|
||||
categoryId: that.data.categoryId
|
||||
})
|
||||
.then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
goodsList: res.data.goodsList,
|
||||
@@ -41,27 +48,27 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.getBanner();
|
||||
this.getGoodsList();
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
openSortFilter: function (event) {
|
||||
openSortFilter: function(event) {
|
||||
let currentId = event.currentTarget.id;
|
||||
switch (currentId) {
|
||||
case 'categoryFilter':
|
||||
@@ -98,7 +105,7 @@ Page({
|
||||
this.getGoodsList();
|
||||
}
|
||||
},
|
||||
selectCategory: function (event) {
|
||||
selectCategory: function(event) {
|
||||
let currentIndex = event.target.dataset.categoryIndex;
|
||||
this.setData({
|
||||
'categoryFilter': false,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
<view class="sort">
|
||||
<view class="sort-box">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<text class="txt">综合</text>
|
||||
</view>
|
||||
<view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
|
||||
|
||||
@@ -1,132 +1,132 @@
|
||||
page{
|
||||
background: #f4f4f4;
|
||||
page {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.brand-info .name{
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
position: relative;
|
||||
.brand-info .name {
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.brand-info .img{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
.brand-info .img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
}
|
||||
|
||||
.brand-info .info-box{
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.brand-info .info-box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 278rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brand-info .info{
|
||||
display: block;
|
||||
.brand-info .info {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.brand-info .txt{
|
||||
display: block;
|
||||
height: 40rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
.brand-info .txt {
|
||||
display: block;
|
||||
height: 40rpx;
|
||||
font-size: 37.5rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.brand-info .line{
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
.brand-info .line {
|
||||
margin: 0 auto;
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
height: 2rpx;
|
||||
width: 145rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.sort{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 78rpx;
|
||||
.sort {
|
||||
position: relative;
|
||||
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;
|
||||
.sort-box {
|
||||
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;
|
||||
.sort-box .item {
|
||||
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;
|
||||
.sort-box .item .txt {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sort-box .item.active .txt{
|
||||
color: #b4282d;
|
||||
.sort-box .item.active .txt {
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category{
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 40rpx 40rpx 0 0;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.sort-box-category {
|
||||
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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category .item.active{
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
.sort-box-category .item.active {
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
}
|
||||
|
||||
.cate-item .b{
|
||||
.cate-item .b {
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
@@ -134,7 +134,7 @@ page{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.cate-item .b .item{
|
||||
.cate-item .b .item {
|
||||
float: left;
|
||||
background: #fff;
|
||||
width: 375rpx;
|
||||
@@ -145,17 +145,17 @@ page{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b .item-b{
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
.cate-item .b .item-b {
|
||||
border-right: 1rpx solid #f4f4f4;
|
||||
}
|
||||
|
||||
.cate-item .item .img{
|
||||
margin-top: 10rpx;
|
||||
.cate-item .item .img {
|
||||
margin-top: 10rpx;
|
||||
width: 302rpx;
|
||||
height: 302rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .name{
|
||||
.cate-item .item .name {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 35rpx;
|
||||
@@ -167,11 +167,11 @@ page{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .item .price{
|
||||
.cate-item .item .price {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,25 @@ Page({
|
||||
status: false,
|
||||
orderId: 0
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
orderId: options.orderId,
|
||||
status: options.status === '1' ? true : false
|
||||
})
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
@@ -57,7 +57,7 @@ Page({
|
||||
|
||||
util.request(api.OrderPrepay, {
|
||||
orderId: that.data.orderId
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
const payParam = res.data;
|
||||
console.log("支付过程开始")
|
||||
@@ -67,17 +67,17 @@ Page({
|
||||
'package': payParam.packageValue,
|
||||
'signType': payParam.signType,
|
||||
'paySign': payParam.paySign,
|
||||
'success': function (res) {
|
||||
'success': function(res) {
|
||||
console.log("支付过程成功")
|
||||
that.setData({
|
||||
status: true
|
||||
});
|
||||
},
|
||||
'fail': function (res) {
|
||||
'fail': function(res) {
|
||||
console.log("支付过程失败")
|
||||
util.showErrorToast('支付失败');
|
||||
},
|
||||
'complete': function (res) {
|
||||
'complete': function(res) {
|
||||
console.log("支付过程结束")
|
||||
}
|
||||
});
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<view class="error" wx:if="{{!status}}">
|
||||
<view class="msg">付款失败</view>
|
||||
<view class="tips">
|
||||
<view class="p">请在 <text class="time">半小时</text> 内完成付款</view>
|
||||
<view class="p">请在
|
||||
<text class="time">半小时</text> 内完成付款</view>
|
||||
<view class="p">否则订单将会被系统取消</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
|
||||
@@ -33,7 +33,7 @@ page {
|
||||
width: 200rpx;
|
||||
line-height: 78rpx;
|
||||
border: 1px solid #868686;
|
||||
color: #000000;
|
||||
color: #000;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
|
||||
@@ -56,4 +56,4 @@ page {
|
||||
.pay-result .error .tips .p {
|
||||
line-height: 42rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,23 +21,23 @@ Page({
|
||||
categoryId: 0
|
||||
},
|
||||
//事件处理函数
|
||||
closeSearch: function () {
|
||||
closeSearch: function() {
|
||||
wx.navigateBack()
|
||||
},
|
||||
clearKeyword: function () {
|
||||
clearKeyword: function() {
|
||||
this.setData({
|
||||
keyword: '',
|
||||
searchStatus: false
|
||||
});
|
||||
},
|
||||
onLoad: function () {
|
||||
onLoad: function() {
|
||||
|
||||
this.getSearchKeyword();
|
||||
},
|
||||
|
||||
getSearchKeyword() {
|
||||
let that = this;
|
||||
util.request(api.SearchIndex).then(function (res) {
|
||||
util.request(api.SearchIndex).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
historyKeyword: res.data.historyKeywordList,
|
||||
@@ -48,7 +48,7 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
inputChange: function (e) {
|
||||
inputChange: function(e) {
|
||||
this.setData({
|
||||
keyword: e.detail.value,
|
||||
searchStatus: false
|
||||
@@ -58,7 +58,7 @@ Page({
|
||||
this.getHelpKeyword();
|
||||
}
|
||||
},
|
||||
getHelpKeyword: function () {
|
||||
getHelpKeyword: function() {
|
||||
let that = this;
|
||||
util.request(api.SearchHelper, {
|
||||
keyword: that.data.keyword
|
||||
@@ -70,7 +70,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
inputFocus: function () {
|
||||
inputFocus: function() {
|
||||
this.setData({
|
||||
searchStatus: false,
|
||||
goodsList: []
|
||||
@@ -80,17 +80,17 @@ Page({
|
||||
this.getHelpKeyword();
|
||||
}
|
||||
},
|
||||
clearHistory: function () {
|
||||
clearHistory: function() {
|
||||
this.setData({
|
||||
historyKeyword: []
|
||||
})
|
||||
|
||||
util.request(api.SearchClearHistory, {}, 'POST')
|
||||
.then(function (res) {
|
||||
.then(function(res) {
|
||||
console.log('清除成功');
|
||||
});
|
||||
},
|
||||
getGoodsList: function () {
|
||||
getGoodsList: function() {
|
||||
let that = this;
|
||||
util.request(api.GoodsList, {
|
||||
keyword: that.data.keyword,
|
||||
@@ -113,7 +113,7 @@ Page({
|
||||
that.getSearchKeyword();
|
||||
});
|
||||
},
|
||||
onKeywordTap: function (event) {
|
||||
onKeywordTap: function(event) {
|
||||
|
||||
this.getSearchResult(event.target.dataset.keyword);
|
||||
|
||||
|
||||
@@ -8,55 +8,55 @@
|
||||
<view class="right" bindtap="closeSearch">取消</view>
|
||||
</view>
|
||||
<view class="no-search" wx:if="{{ !searchStatus}}">
|
||||
<view class="search-keywords search-history" wx:if="{{!keyword && historyKeyword.length}}">
|
||||
<view class="h">
|
||||
<text class="title">历史记录</text>
|
||||
<image class="icon" bindtap="clearHistory" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/del1-93f0a4add4.png"></image>
|
||||
<view class="search-keywords search-history" wx:if="{{!keyword && historyKeyword.length}}">
|
||||
<view class="h">
|
||||
<text class="title">历史记录</text>
|
||||
<image class="icon" bindtap="clearHistory" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/del1-93f0a4add4.png"></image>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" bindtap="onKeywordTap" data-keyword="{{item.keyword}}" wx:for="{{historyKeyword}}" wx:key="keyword" hover-class="navigator-hover">{{item.keyword}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" bindtap="onKeywordTap" data-keyword="{{item.keyword}}" wx:for="{{historyKeyword}}" wx:key="keyword" hover-class="navigator-hover">{{item.keyword}}</view>
|
||||
<view class="search-keywords search-hot" wx:if="{{!keyword && hotKeyword.length}}">
|
||||
<view class="h">
|
||||
<text class="title">热门搜索</text>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item {{item.is_hot === 1 ? 'active' : ''}}" hover-class="navigator-hover" bindtap="onKeywordTap" data-keyword="{{item.keyword}}" wx:for="{{hotKeyword}}" wx:key="id">{{item.keyword}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-keywords search-hot" wx:if="{{!keyword && hotKeyword.length}}">
|
||||
<view class="h">
|
||||
<text class="title">热门搜索</text>
|
||||
<view class="shelper-list" wx:if="{{keyword}}">
|
||||
<view class="item" hover-class="navigator-hover" wx:for="{{helpKeyword}}" wx:key="id" bindtap="onKeywordTap" data-keyword="{{item}}">{{item}}</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item {{item.is_hot === 1 ? 'active' : ''}}" hover-class="navigator-hover" bindtap="onKeywordTap" data-keyword="{{item.keyword}}" wx:for="{{hotKeyword}}" wx:key="id">{{item.keyword}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shelper-list" wx:if="{{keyword}}">
|
||||
<view class="item" hover-class="navigator-hover" wx:for="{{helpKeyword}}" wx:key="id" bindtap="onKeywordTap" data-keyword="{{item}}">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-result" wx:if="{{ searchStatus && goodsList.length}}">
|
||||
<view class="sort">
|
||||
<view class="sort-box">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<text class="txt">综合</text>
|
||||
<view class="sort-box">
|
||||
<view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
|
||||
<text class="txt">综合</text>
|
||||
</view>
|
||||
<view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
|
||||
<text class="txt">价格</text>
|
||||
</view>
|
||||
<view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
|
||||
<text class="txt">分类</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
|
||||
<text class="txt">价格</text>
|
||||
</view>
|
||||
<view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
|
||||
<text class="txt">分类</text>
|
||||
<view class="sort-box-category" wx-if="{{categoryFilter}}">
|
||||
<view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="id" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="sort-box-category" wx-if="{{categoryFilter}}">
|
||||
<view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="id" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
|
||||
<view class="cate-item">
|
||||
<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">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cate-item">
|
||||
<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">
|
||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||
<text class="name">{{iitem.name}}</text>
|
||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-result-empty" wx:if="{{!goodsList.length && searchStatus}}">
|
||||
<image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noSearchResult-7572a94f32.png"></image>
|
||||
|
||||
@@ -1,278 +1,277 @@
|
||||
page{
|
||||
page {
|
||||
min-height: 100%;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
.container{
|
||||
.container {
|
||||
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,.15);
|
||||
padding: 0 31.25rpx;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-header .icon{
|
||||
position: absolute;
|
||||
top: 14rpx;
|
||||
left: 20rpx;
|
||||
width: 31rpx;
|
||||
height: 31rpx;
|
||||
.search-header .icon {
|
||||
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;
|
||||
.search-header .del {
|
||||
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;
|
||||
.search-header .keywrod {
|
||||
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;
|
||||
.search-header .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;
|
||||
.no-search {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-top: 91rpx;
|
||||
}
|
||||
|
||||
.search-keywords{
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
.search-keywords {
|
||||
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;
|
||||
.search-keywords .h {
|
||||
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;
|
||||
.search-keywords .title {
|
||||
display: block;
|
||||
width: 120rpx;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.search-keywords .icon{
|
||||
margin-top: 19rpx;
|
||||
float: right;
|
||||
display: block;
|
||||
margin-left: 511rpx;
|
||||
height: 55rpx;
|
||||
width: 55rpx;
|
||||
.search-keywords .icon {
|
||||
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;
|
||||
.search-keywords .b {
|
||||
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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.search-keywords .item.active{
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
.search-keywords .item.active {
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
}
|
||||
|
||||
.shelper-list{
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
padding: 0 31.25rpx;
|
||||
.shelper-list {
|
||||
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;
|
||||
.shelper-list .item {
|
||||
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;
|
||||
.sort {
|
||||
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;
|
||||
.sort-box {
|
||||
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;
|
||||
.sort-box .item {
|
||||
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;
|
||||
.sort-box .item .txt {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sort-box .item.active .txt{
|
||||
color: #b4282d;
|
||||
.sort-box .item.active .txt {
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category{
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
padding: 40rpx 40rpx 0 0;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.sort-box-category {
|
||||
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;
|
||||
.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;
|
||||
}
|
||||
|
||||
.sort-box-category .item.active{
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
.sort-box-category .item.active {
|
||||
color: #b4282d;
|
||||
border: 1px solid #b4282d;
|
||||
}
|
||||
|
||||
.cate-item{
|
||||
margin-top: 175rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
.cate-item {
|
||||
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;
|
||||
.cate-item .h {
|
||||
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;
|
||||
.cate-item .h .name {
|
||||
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;
|
||||
.cate-item .h .desc {
|
||||
display: block;
|
||||
height: 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.cate-item .b{
|
||||
.cate-item .b {
|
||||
width: 750rpx;
|
||||
padding: 0 6.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cate-item .list-filter{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
margin-bottom: 6.25rpx;
|
||||
.cate-item .list-filter {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
margin-bottom: 6.25rpx;
|
||||
}
|
||||
|
||||
.cate-item .b .item{
|
||||
.cate-item .b .item {
|
||||
float: left;
|
||||
background: #fff;
|
||||
width: 365rpx;
|
||||
@@ -283,16 +282,16 @@ page{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cate-item .b .item-b{
|
||||
.cate-item .b .item-b {
|
||||
margin-left: 6.25rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .img{
|
||||
.cate-item .item .img {
|
||||
width: 302rpx;
|
||||
height: 302rpx;
|
||||
}
|
||||
|
||||
.cate-item .item .name{
|
||||
.cate-item .item .name {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 35rpx;
|
||||
@@ -304,7 +303,7 @@ page{
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cate-item .item .price{
|
||||
.cate-item .item .price {
|
||||
display: block;
|
||||
width: 365.625rpx;
|
||||
height: 30rpx;
|
||||
@@ -313,24 +312,24 @@ page{
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.search-result-empty{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: 300rpx;
|
||||
.search-result-empty {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: 300rpx;
|
||||
}
|
||||
|
||||
.search-result-empty .icon{
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
.search-result-empty .icon {
|
||||
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;
|
||||
}
|
||||
.search-result-empty .text {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@@ -2,82 +2,85 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
that.setData({
|
||||
page: that.data.page + 1
|
||||
});
|
||||
|
||||
this.getTopic();
|
||||
|
||||
},
|
||||
getTopic: function(){
|
||||
|
||||
let that = this;
|
||||
that.setData({
|
||||
scrollTop: 0,
|
||||
showPage: false,
|
||||
topicList: []
|
||||
});
|
||||
// 页面渲染完成
|
||||
wx.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
util.request(api.TopicList, { page: that.data.page, size: that.data.size }).then(function (res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
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();
|
||||
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();
|
||||
|
||||
},
|
||||
getTopic: function() {
|
||||
|
||||
let that = this;
|
||||
that.setData({
|
||||
scrollTop: 0,
|
||||
showPage: false,
|
||||
topicList: []
|
||||
});
|
||||
// 页面渲染完成
|
||||
wx.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
util.request(api.TopicList, {
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
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();
|
||||
}
|
||||
})
|
||||
@@ -1,16 +1,16 @@
|
||||
<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>
|
||||
@@ -17,9 +17,12 @@ Page({
|
||||
picPage: 1,
|
||||
size: 20
|
||||
},
|
||||
getCommentCount: function () {
|
||||
getCommentCount: function() {
|
||||
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) {
|
||||
|
||||
that.setData({
|
||||
@@ -29,15 +32,15 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
getCommentList: function(){
|
||||
getCommentList: function() {
|
||||
let that = this;
|
||||
util.request(api.CommentList, {
|
||||
valueId: that.data.valueId,
|
||||
util.request(api.CommentList, {
|
||||
valueId: that.data.valueId,
|
||||
type: that.data.type,
|
||||
size: that.data.size,
|
||||
page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage),
|
||||
showType: that.data.showType
|
||||
}).then(function (res) {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
if (that.data.showType == 0) {
|
||||
@@ -56,7 +59,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
type: options.type,
|
||||
@@ -65,39 +68,39 @@ Page({
|
||||
this.getCommentCount();
|
||||
this.getCommentList();
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
},
|
||||
switchTab: function () {
|
||||
switchTab: function() {
|
||||
this.setData({
|
||||
showType: this.data.showType == 1 ? 0 :1
|
||||
showType: this.data.showType == 1 ? 0 : 1
|
||||
});
|
||||
|
||||
this.getCommentList();
|
||||
},
|
||||
onReachBottom: function(){
|
||||
onReachBottom: function() {
|
||||
console.log('onPullDownRefresh');
|
||||
if ( this.data.showType == 0) {
|
||||
if (this.data.showType == 0) {
|
||||
|
||||
if (this.data.allCount / this.data.size < this.data.allPage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
'allPage' : this.data.allPage + 1
|
||||
'allPage': this.data.allPage + 1
|
||||
});
|
||||
} else {
|
||||
if (this.data.hasPicCount / this.data.size < this.data.picPage) {
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
<view class="imgs" wx:if="{{item.picList.length > 0}}">
|
||||
<image class="img" wx:for="{{item.picList}}" wx:key="id" wx:for-item="pitem" src="{{pitem.picUrl}}"></image>
|
||||
</view>
|
||||
<!--<view class="customer-service" wx:if="{{item.commentReplyVO}}">
|
||||
<text class="u">小选回复:</text>
|
||||
<text class="c">{{item.commentReplyVO.replyContent}}</text>
|
||||
</view>-->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -1,108 +1,107 @@
|
||||
.comments{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left:30rpx;
|
||||
background: #fff;
|
||||
margin: 20rpx 0;
|
||||
.comments {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left: 30rpx;
|
||||
background: #fff;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.comments .b{
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
.comments .b {
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
}
|
||||
|
||||
.comments .b.no-h{
|
||||
margin-top: 0;
|
||||
.comments .b.no-h {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.comments .item{
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding-bottom: 25rpx;
|
||||
.comments .item {
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.comments .info{
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
.comments .info {
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
}
|
||||
|
||||
.comments .user{
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
.comments .user {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.comments .user image{
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
.comments .user image {
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.comments .user text{
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
.comments .user text {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.comments .time{
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
.comments .time {
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.comments .comment{
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
font-size: 29rpx;
|
||||
margin-bottom: 16rpx;
|
||||
.comments .comment {
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
font-size: 29rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.comments .imgs{
|
||||
width: 720rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 25rpx;
|
||||
.comments .imgs {
|
||||
width: 720rpx;
|
||||
height: 150rpx;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.comments .imgs .img{
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
margin-right: 28rpx;
|
||||
.comments .imgs .img {
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
margin-right: 28rpx;
|
||||
}
|
||||
|
||||
.comments .customer-service{
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-top: 23rpx;
|
||||
background: rgba(0,0,0,.03);
|
||||
padding: 21rpx;
|
||||
.comments .customer-service {
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-top: 23rpx;
|
||||
background: rgba(0, 0, 0, 0.03);
|
||||
padding: 21rpx;
|
||||
}
|
||||
|
||||
|
||||
.comments .customer-service .u{
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 37.5rpx;
|
||||
.comments .customer-service .u {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
|
||||
.comments .customer-service .c{
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
.comments .customer-service .c {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 37.5rpx;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ Page({
|
||||
picUrls: [],
|
||||
files: []
|
||||
},
|
||||
chooseImage: function (e) {
|
||||
chooseImage: function(e) {
|
||||
if (this.data.files.length >= 5) {
|
||||
util.showErrorToast('只能上传五张图片')
|
||||
return false;
|
||||
@@ -25,7 +25,7 @@ Page({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.setData({
|
||||
files: that.data.files.concat(res.tempFilePaths)
|
||||
});
|
||||
@@ -33,13 +33,13 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
upload: function (res) {
|
||||
upload: function(res) {
|
||||
var that = this;
|
||||
const uploadTask = wx.uploadFile({
|
||||
url: api.StorageUpload,
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
var _res = JSON.parse(res.data);
|
||||
if (_res.errno === 0) {
|
||||
var url = _res.data.url
|
||||
@@ -50,7 +50,7 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (e) {
|
||||
fail: function(e) {
|
||||
wx.showModal({
|
||||
title: '错误',
|
||||
content: '上传失败',
|
||||
@@ -66,28 +66,24 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
previewImage: function (e) {
|
||||
previewImage: function(e) {
|
||||
wx.previewImage({
|
||||
current: e.currentTarget.id, // 当前显示图片的http链接
|
||||
urls: this.data.files // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
selectRater: function (e) {
|
||||
selectRater: function(e) {
|
||||
var star = e.currentTarget.dataset.star + 1;
|
||||
var starText;
|
||||
if (star == 1) {
|
||||
starText = '很差';
|
||||
}
|
||||
else if (star == 2) {
|
||||
} else if (star == 2) {
|
||||
starText = '不太满意';
|
||||
}
|
||||
else if (star == 3) {
|
||||
} else if (star == 3) {
|
||||
starText = '满意';
|
||||
}
|
||||
else if (star == 4) {
|
||||
} else if (star == 4) {
|
||||
starText = '比较满意';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
starText = '十分满意'
|
||||
}
|
||||
this.setData({
|
||||
@@ -96,8 +92,8 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
onLoad: function (options) {
|
||||
if (parseInt(options.type) !== 1){
|
||||
onLoad: function(options) {
|
||||
if (parseInt(options.type) !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,9 +103,11 @@ Page({
|
||||
});
|
||||
this.getTopic();
|
||||
},
|
||||
getTopic: function () {
|
||||
getTopic: function() {
|
||||
let that = this;
|
||||
util.request(api.TopicDetail, { id: that.data.valueId }).then(function (res) {
|
||||
util.request(api.TopicDetail, {
|
||||
id: that.data.valueId
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
|
||||
that.setData({
|
||||
@@ -117,12 +115,12 @@ Page({
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
onClose: function () {
|
||||
onClose: function() {
|
||||
wx.navigateBack();
|
||||
},
|
||||
onPost: function () {
|
||||
onPost: function() {
|
||||
let that = this;
|
||||
|
||||
if (!this.data.content) {
|
||||
@@ -137,11 +135,11 @@ Page({
|
||||
star: that.data.star,
|
||||
hasPicture: that.data.hasPicture,
|
||||
picUrls: that.data.picUrls
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '评论成功',
|
||||
complete: function () {
|
||||
complete: function() {
|
||||
wx.navigateBack();
|
||||
}
|
||||
})
|
||||
@@ -161,18 +159,18 @@ Page({
|
||||
content: event.detail.value,
|
||||
})
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
<view class="weui-uploader__file" bindtap="previewImage" id="{{item}}">
|
||||
<image class="weui-uploader__img" src="{{item}}" mode="aspectFill" />
|
||||
</view>
|
||||
<!-- <view class="weui-uploader__file weui-uploader__file_status" bindtap="previewImage" id="{{item}}">
|
||||
<image class="weui-uploader__img" src="{{item}}" mode="aspectFill" />
|
||||
<view class="weui-uploader__file-content">50%</view>
|
||||
</view> -->
|
||||
</block>
|
||||
<view class="weui-uploader__input-box">
|
||||
<view class="weui-uploader__input" bindtap="chooseImage"></view>
|
||||
|
||||
@@ -12,14 +12,16 @@ Page({
|
||||
commentList: [],
|
||||
topicGoods: []
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
var that = this;
|
||||
that.setData({
|
||||
id: options.id
|
||||
});
|
||||
|
||||
util.request(api.TopicDetail, { id: that.data.id }).then(function (res) {
|
||||
util.request(api.TopicDetail, {
|
||||
id: that.data.id
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
topic: res.data.topic,
|
||||
@@ -30,7 +32,9 @@ Page({
|
||||
}
|
||||
});
|
||||
|
||||
util.request(api.TopicRelated, { id: that.data.id }).then(function (res) {
|
||||
util.request(api.TopicRelated, {
|
||||
id: that.data.id
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
topicList: res.data
|
||||
@@ -40,7 +44,13 @@ Page({
|
||||
},
|
||||
getCommentList() {
|
||||
let that = this;
|
||||
util.request(api.CommentList, { valueId: that.data.id, type: 1, showType: 0, page: 1, size: 5 }).then(function (res) {
|
||||
util.request(api.CommentList, {
|
||||
valueId: that.data.id,
|
||||
type: 1,
|
||||
showType: 0,
|
||||
page: 1,
|
||||
size: 5
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
commentList: res.data.data,
|
||||
@@ -51,26 +61,27 @@ Page({
|
||||
},
|
||||
postComment() {
|
||||
if (!app.globalData.hasLogin) {
|
||||
wx.navigateTo({ url: "/pages/auth/login/login" });
|
||||
}
|
||||
else {
|
||||
wx.navigateTo({
|
||||
url: "/pages/auth/login/login"
|
||||
});
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '/pages/topicCommentPost/topicCommentPost?valueId=' + this.data.id + '&type=1',
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getCommentList();
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<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>
|
||||
<scroll-view class="sv-goods" wx:if="{{topicGoods.length > 0 }}">
|
||||
<view class="topic-goods">
|
||||
<view class="h">
|
||||
<text class="t">专题商品</text>
|
||||
<image bindtap="postComment" class="i" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/comment-add-2aca147c3f.png"></image>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{topicGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="desc">{{item.brief}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
<view class="topic-goods">
|
||||
<view class="h">
|
||||
<text class="t">专题商品</text>
|
||||
<image bindtap="postComment" class="i" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/comment-add-2aca147c3f.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{topicGoods}}" wx:for-index="index" wx:for-item="item" wx:key="id">
|
||||
<navigator url="/pages/goods/goods?id={{item.id}}">
|
||||
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
|
||||
<view class="right">
|
||||
<view class="text">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="desc">{{item.brief}}</text>
|
||||
<text class="price">¥{{item.retailPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="comments">
|
||||
<view class="h">
|
||||
<text class="t">精选留言</text>
|
||||
<image bindtap="postComment" class="i" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/comment-add-2aca147c3f.png"></image>
|
||||
</view>
|
||||
<view class="has-comments" wx:if="{{commentList.length > 0 }}">
|
||||
<view class="has-comments" wx:if="{{commentList.length > 0 }}">
|
||||
<view class="b">
|
||||
<view class="item" wx:for="{{commentList}}" wx:key="id">
|
||||
<view class="info">
|
||||
@@ -48,12 +48,12 @@
|
||||
<view class="load" wx:if="{{commentCount > 5}}">
|
||||
<navigator url="/pages/topicComment/topicComment?valueId={{topic.id}}&type=1">查看更多</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-comments" wx:if="{{commentList.length <= 0}}">
|
||||
<view class="b">
|
||||
<image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-comment-560f87660a.png"></image>
|
||||
<text class="txt">等你来留言</text>
|
||||
</view>
|
||||
<view class="b">
|
||||
<image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-comment-560f87660a.png"></image>
|
||||
<text class="txt">等你来留言</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="rec-box">
|
||||
|
||||
@@ -1,246 +1,252 @@
|
||||
.content{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 0;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.content image{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
.content image {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.comments{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left:30rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
.comments {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left: 30rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.comments .h{
|
||||
height: 93rpx;
|
||||
line-height: 93rpx;
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.comments .h {
|
||||
height: 93rpx;
|
||||
line-height: 93rpx;
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.comments .h .t{
|
||||
display: block;
|
||||
float: left;
|
||||
width: 50%;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
.comments .h .t {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 50%;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.comments .h .i{
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 30rpx;
|
||||
width: 33rpx;
|
||||
height: 33rpx;
|
||||
.comments .h .i {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 30rpx;
|
||||
width: 33rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
.comments .b{
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
.comments .b {
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
}
|
||||
|
||||
.comments .item{
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
.comments .item {
|
||||
height: auto;
|
||||
width: 720rpx;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
.comments .info{
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
.comments .info {
|
||||
height: 127rpx;
|
||||
width: 100%;
|
||||
padding: 33rpx 0 27rpx 0;
|
||||
}
|
||||
|
||||
.comments .user{
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
.comments .user {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.comments .user .avatar{
|
||||
display: block;
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
.comments .user .avatar {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 67rpx;
|
||||
height: 67rpx;
|
||||
margin-right: 17rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.comments .user .nickname{
|
||||
display: block;
|
||||
width: auto;
|
||||
float: left;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
.comments .user .nickname {
|
||||
display: block;
|
||||
width: auto;
|
||||
float: left;
|
||||
height: 66rpx;
|
||||
overflow: hidden;
|
||||
font-size: 29rpx;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.comments .time{
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
.comments .time {
|
||||
display: block;
|
||||
float: right;
|
||||
width: auto;
|
||||
height: 67rpx;
|
||||
line-height: 67rpx;
|
||||
color: #7f7f7f;
|
||||
font-size: 25rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.comments .comment{
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
.comments .comment {
|
||||
width: 720rpx;
|
||||
padding-right: 30rpx;
|
||||
line-height: 45.8rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.comments .load{
|
||||
width: 720rpx;
|
||||
height: 108rpx;
|
||||
line-height: 108rpx;
|
||||
text-align: center;
|
||||
font-size: 38.5rpx;
|
||||
.comments .load {
|
||||
width: 720rpx;
|
||||
height: 108rpx;
|
||||
line-height: 108rpx;
|
||||
text-align: center;
|
||||
font-size: 38.5rpx;
|
||||
}
|
||||
|
||||
.no-comments{
|
||||
height: 297rpx;
|
||||
.no-comments {
|
||||
height: 297rpx;
|
||||
}
|
||||
|
||||
.no-comments .txt{
|
||||
height: 43rpx;
|
||||
line-height: 43rpx;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #7f7f7f;
|
||||
.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;
|
||||
.no-comments .icon {
|
||||
margin: 48rpx auto 18rpx auto;
|
||||
height: 130rpx;
|
||||
display: block;
|
||||
width: 115rpx;
|
||||
}
|
||||
|
||||
.sv-goods{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left:30rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
.sv-goods {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding-left: 30rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .item {
|
||||
border-top: 1px solid #d9d9d9;
|
||||
margin: 0 20rpx;
|
||||
height: 244rpx;
|
||||
width: 710rpx;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
margin: 0 20rpx;
|
||||
height: 244rpx;
|
||||
width: 710rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .img {
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
margin-top: 12rpx;
|
||||
margin-right: 12rpx;
|
||||
float: left;
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .right {
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
float: left;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
.topic-goods .b .text {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 244rpx;
|
||||
width: 476rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .name {
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
float: left;
|
||||
width: 330rpx;
|
||||
display: block;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .desc {
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
width: 476rpx;
|
||||
display: block;
|
||||
color: #999;
|
||||
line-height: 50rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.topic-goods .b .price {
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #b4282d;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
width: 476rpx;
|
||||
display: flex;
|
||||
color: #b4282d;
|
||||
line-height: 50rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
|
||||
.rec-box{
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
margin: 0 30rpx;
|
||||
.rec-box {
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.rec-box .h{
|
||||
position: relative;
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
/*border-bottom: 1px solid #d0d0d0;*/
|
||||
margin-bottom: 32rpx;
|
||||
.rec-box .h {
|
||||
position: relative;
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
/*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 .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: 397rpx;
|
||||
padding: 24rpx 24rpx 30rpx 24rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
.rec-box .b .item {
|
||||
width: 690rpx;
|
||||
height: 397rpx;
|
||||
padding: 24rpx 24rpx 30rpx 24rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.rec-box .b .item .img{
|
||||
height: 278rpx;
|
||||
width: 642rpx;
|
||||
.rec-box .b .item .img {
|
||||
height: 278rpx;
|
||||
width: 642rpx;
|
||||
}
|
||||
|
||||
.rec-box .b .item .title{
|
||||
display: block;
|
||||
margin-top: 30rpx;
|
||||
height: 30rpx;
|
||||
width: 642rpx;
|
||||
font-size: 28rpx;
|
||||
.rec-box .b .item .title {
|
||||
display: block;
|
||||
margin-top: 30rpx;
|
||||
height: 30rpx;
|
||||
width: 642rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
@import "../../lib/wxParse/wxParse.wxss";
|
||||
|
||||
@@ -6,19 +6,19 @@ Page({
|
||||
data: {
|
||||
addressList: [],
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getAddressList();
|
||||
},
|
||||
getAddressList (){
|
||||
getAddressList() {
|
||||
let that = this;
|
||||
util.request(api.AddressList).then(function (res) {
|
||||
util.request(api.AddressList).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
addressList: res.data
|
||||
@@ -26,7 +26,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
addressAddOrUpdate (event) {
|
||||
addressAddOrUpdate(event) {
|
||||
console.log(event)
|
||||
|
||||
//返回之前,先取出上一页对象,并设置addressId
|
||||
@@ -55,13 +55,13 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteAddress(event){
|
||||
deleteAddress(event) {
|
||||
console.log(event.target)
|
||||
let that = this;
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要删除地址?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
let addressId = event.target.dataset.addressId;
|
||||
util.request(api.AddressDelete, {
|
||||
@@ -80,12 +80,12 @@ Page({
|
||||
}
|
||||
})
|
||||
return false;
|
||||
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
})
|
||||
@@ -1,22 +1,22 @@
|
||||
<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>
|
||||
@@ -1,95 +1,93 @@
|
||||
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;
|
||||
color: #333;
|
||||
margin-bottom: 5.2rpx;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
.address-list .name {
|
||||
width: 125rpx;
|
||||
height: 43rpx;
|
||||
font-size: 29rpx;
|
||||
color: #333;
|
||||
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: #b4282d;
|
||||
border: 1rpx solid #b4282d;
|
||||
visibility: visible;
|
||||
.address-list .default {
|
||||
width: 62.5rpx;
|
||||
height: 33rpx;
|
||||
line-height: 28rpx;
|
||||
text-align: center;
|
||||
font-size: 20rpx;
|
||||
color: #b4282d;
|
||||
border: 1rpx solid #b4282d;
|
||||
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;
|
||||
color: #333;
|
||||
margin-bottom: 6.25rpx;
|
||||
.address-list .mobile {
|
||||
height: 29rpx;
|
||||
font-size: 29rpx;
|
||||
line-height: 29rpx;
|
||||
overflow: hidden;
|
||||
color: #333;
|
||||
margin-bottom: 6.25rpx;
|
||||
}
|
||||
|
||||
.address-list .address{
|
||||
height: 37rpx;
|
||||
font-size: 25rpx;
|
||||
line-height: 37rpx;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
.address-list .address {
|
||||
height: 37rpx;
|
||||
font-size: 25rpx;
|
||||
line-height: 37rpx;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.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{
|
||||
.add-address {
|
||||
border: none;
|
||||
right: 0;
|
||||
display: flex;
|
||||
@@ -117,7 +115,7 @@ page{
|
||||
background-image: linear-gradient(to right, #9a9ba1 0%, #9a9ba1 100%);
|
||||
}
|
||||
|
||||
.empty-view{
|
||||
.empty-view {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -126,15 +124,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
address: {
|
||||
id:0,
|
||||
id: 0,
|
||||
provinceId: 0,
|
||||
cityId: 0,
|
||||
areaId: 0,
|
||||
@@ -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: [],
|
||||
@@ -43,14 +57,14 @@ Page({
|
||||
address: address
|
||||
});
|
||||
},
|
||||
bindinputAddress (event){
|
||||
bindinputAddress(event) {
|
||||
let address = this.data.address;
|
||||
address.address = event.detail.value;
|
||||
this.setData({
|
||||
address: address
|
||||
});
|
||||
},
|
||||
bindIsDefault(){
|
||||
bindIsDefault() {
|
||||
let address = this.data.address;
|
||||
address.isDefault = !address.isDefault;
|
||||
this.setData({
|
||||
@@ -59,12 +73,14 @@ 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({
|
||||
address: res.data
|
||||
});
|
||||
if (res.data) {
|
||||
that.setData({
|
||||
address: res.data
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -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) {
|
||||
@@ -142,14 +172,14 @@ Page({
|
||||
let selectRegionList = that.data.selectRegionList;
|
||||
|
||||
//判断是否可点击
|
||||
if (regionTypeIndex + 1 == this.data.regionType || (regionTypeIndex - 1 >= 0 && selectRegionList[regionTypeIndex-1].id <= 0)) {
|
||||
if (regionTypeIndex + 1 == this.data.regionType || (regionTypeIndex - 1 >= 0 && selectRegionList[regionTypeIndex - 1].id <= 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
regionType: regionTypeIndex + 1
|
||||
})
|
||||
|
||||
|
||||
let selectRegionItem = selectRegionList[regionTypeIndex];
|
||||
|
||||
this.getRegionList(selectRegionItem.pid);
|
||||
@@ -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 => {
|
||||
@@ -258,10 +290,10 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelAddress(){
|
||||
cancelAddress() {
|
||||
wx.navigateBack();
|
||||
},
|
||||
saveAddress(){
|
||||
saveAddress() {
|
||||
console.log(this.data.address)
|
||||
let address = this.data.address;
|
||||
|
||||
@@ -293,7 +325,7 @@ Page({
|
||||
}
|
||||
|
||||
let that = this;
|
||||
util.request(api.AddressSave, {
|
||||
util.request(api.AddressSave, {
|
||||
id: address.id,
|
||||
name: address.name,
|
||||
mobile: address.mobile,
|
||||
@@ -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() {
|
||||
// 页面关闭
|
||||
|
||||
}
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
<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>
|
||||
@@ -1,109 +1,109 @@
|
||||
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: #333;
|
||||
.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: #b4282d;
|
||||
.add-address .cannel {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.add-address .save {
|
||||
background: #b4282d;
|
||||
}
|
||||
|
||||
.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: #b4282d;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,11 @@ Page({
|
||||
title: '加载中...',
|
||||
});
|
||||
let that = this;
|
||||
util.request(api.CollectList, { type: that.data.type, page: that.data.page, size: that.data.size }).then(function (res) {
|
||||
util.request(api.CollectList, {
|
||||
type: that.data.type,
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
that.setData({
|
||||
collectList: that.data.collectList.concat(res.data.collectList),
|
||||
@@ -26,7 +30,7 @@ Page({
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
this.getCollectList();
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -43,22 +47,22 @@ Page({
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onReady: function () {
|
||||
},
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
openGoods(event) {
|
||||
|
||||
|
||||
let that = this;
|
||||
let index = event.currentTarget.dataset.index;
|
||||
let goodsId = this.data.collectList[index].valueId;
|
||||
@@ -71,10 +75,13 @@ Page({
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定删除吗?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
|
||||
util.request(api.CollectAddOrDelete, { type: that.data.type, valueId: goodsId}, 'POST').then(function (res) {
|
||||
|
||||
util.request(api.CollectAddOrDelete, {
|
||||
type: that.data.type,
|
||||
valueId: goodsId
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
wx.showToast({
|
||||
@@ -92,24 +99,24 @@ Page({
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
|
||||
wx.navigateTo({
|
||||
url: '/pages/goods/goods?id=' + goodsId,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
//按下事件开始
|
||||
touchStart: function (e) {
|
||||
touchStart: function(e) {
|
||||
let that = this;
|
||||
that.setData({
|
||||
touchStart: e.timeStamp
|
||||
})
|
||||
},
|
||||
//按下事件结束
|
||||
touchEnd: function (e) {
|
||||
touchEnd: function(e) {
|
||||
let that = this;
|
||||
that.setData({
|
||||
touchEnd: e.timeStamp
|
||||
})
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -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>
|
||||
@@ -1,49 +1,48 @@
|
||||
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;
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
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() {
|
||||
// 页面关闭
|
||||
}
|
||||
})
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
<view class="item">
|
||||
<view class="tag">新人专享</view>
|
||||
<view class="content">
|
||||
<view class="left">
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ Page({
|
||||
picUrls: [],
|
||||
files: []
|
||||
},
|
||||
chooseImage: function (e) {
|
||||
chooseImage: function(e) {
|
||||
if (this.data.files.length >= 5) {
|
||||
util.showErrorToast('只能上传五张图片')
|
||||
return false;
|
||||
@@ -26,7 +26,7 @@ Page({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
that.setData({
|
||||
files: that.data.files.concat(res.tempFilePaths)
|
||||
});
|
||||
@@ -34,13 +34,13 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
upload: function (res) {
|
||||
upload: function(res) {
|
||||
var that = this;
|
||||
const uploadTask = wx.uploadFile({
|
||||
url: api.StorageUpload,
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
var _res = JSON.parse(res.data);
|
||||
if (_res.errno === 0) {
|
||||
var url = _res.data.url
|
||||
@@ -51,7 +51,7 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (e) {
|
||||
fail: function(e) {
|
||||
wx.showModal({
|
||||
title: '错误',
|
||||
content: '上传失败',
|
||||
@@ -67,12 +67,12 @@ Page({
|
||||
})
|
||||
|
||||
},
|
||||
previewImage: function (e) {
|
||||
previewImage: function(e) {
|
||||
wx.previewImage({
|
||||
current: e.currentTarget.id, // 当前显示图片的http链接
|
||||
urls: this.data.files // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
},
|
||||
bindPickerChange: function(e) {
|
||||
this.setData({
|
||||
index: e.detail.value
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
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;
|
||||
}
|
||||
|
||||
.fb-type{
|
||||
.fb-type {
|
||||
height: 104rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
@@ -21,26 +21,26 @@
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.fb-type .type-label{
|
||||
.fb-type .type-label {
|
||||
height: 36rpx;
|
||||
flex: 1;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.fb-type .type-icon{
|
||||
.fb-type .type-icon {
|
||||
height: 36rpx;
|
||||
width: 36rpx;
|
||||
}
|
||||
|
||||
.fb-body{
|
||||
.fb-body {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 600rpx;
|
||||
padding: 18rpx 30rpx 64rpx 30rpx;
|
||||
}
|
||||
|
||||
.fb-body .content{
|
||||
.fb-body .content {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
color: #333;
|
||||
@@ -48,7 +48,7 @@
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.weui-uploader__files{
|
||||
.weui-uploader__files {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -112,19 +112,19 @@
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fb-body .text-count{
|
||||
.fb-body .text-count {
|
||||
line-height: 30rpx;
|
||||
float: right;
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.fb-mobile{
|
||||
.fb-mobile {
|
||||
height: 162rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fb-mobile .label{
|
||||
.fb-mobile .label {
|
||||
height: 58rpx;
|
||||
width: 100%;
|
||||
padding-top: 14rpx;
|
||||
@@ -136,7 +136,7 @@
|
||||
line-height: 33rpx;
|
||||
}
|
||||
|
||||
.fb-mobile .mobile-box{
|
||||
.fb-mobile .mobile-box {
|
||||
height: 104rpx;
|
||||
width: 100%;
|
||||
color: #333;
|
||||
@@ -147,7 +147,7 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fb-mobile .mobile{
|
||||
.fb-mobile .mobile {
|
||||
position: absolute;
|
||||
top: 27rpx;
|
||||
left: 30rpx;
|
||||
@@ -158,7 +158,7 @@
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.fb-mobile .clear-icon{
|
||||
.fb-mobile .clear-icon {
|
||||
position: absolute;
|
||||
top: 27rpx;
|
||||
right: 30rpx;
|
||||
@@ -167,7 +167,7 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.fb-btn{
|
||||
.fb-btn {
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -181,7 +181,7 @@
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: 10%;
|
||||
margin-left: 10%;
|
||||
text-align: center;
|
||||
/* padding-left: -5rpx; */
|
||||
font-size: 25rpx;
|
||||
@@ -192,4 +192,4 @@
|
||||
border-bottom-right-radius: 50rpx;
|
||||
letter-spacing: 3rpx;
|
||||
background-image: linear-gradient(to right, #9a9ba1 0%, #9a9ba1 100%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,10 @@ Page({
|
||||
title: '加载中...',
|
||||
});
|
||||
let that = this;
|
||||
util.request(api.FootprintList, { page: that.data.page, size: that.data.size }).then(function (res) {
|
||||
util.request(api.FootprintList, {
|
||||
page: that.data.page,
|
||||
size: that.data.size
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
let f1 = that.data.footprintList;
|
||||
let f2 = res.data.footprintList;
|
||||
@@ -23,8 +26,7 @@ Page({
|
||||
let last = f1.length - 1;
|
||||
if (last >= 0 && f1[last][0].addTime === f2[i].addTime) {
|
||||
f1[last].push(f2[i]);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
let tmp = [];
|
||||
tmp.push(f2[i])
|
||||
f1.push(tmp);
|
||||
@@ -39,7 +41,7 @@ Page({
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
deleteItem (event){
|
||||
deleteItem(event) {
|
||||
let that = this;
|
||||
let index = event.currentTarget.dataset.index;
|
||||
let iindex = event.currentTarget.dataset.iindex;
|
||||
@@ -52,9 +54,11 @@ Page({
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '要删除所选足迹?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.FootprintDelete, { footprintId: footprintId }, 'POST').then(function (res) {
|
||||
util.request(api.FootprintDelete, {
|
||||
footprintId: footprintId
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '删除成功',
|
||||
@@ -62,7 +66,7 @@ Page({
|
||||
duration: 2000
|
||||
});
|
||||
that.data.footprintList[index].splice(iindex, 1)
|
||||
if (that.data.footprintList[index].length == 0){
|
||||
if (that.data.footprintList[index].length == 0) {
|
||||
that.data.footprintList.splice(index, 1)
|
||||
}
|
||||
that.setData({
|
||||
@@ -78,9 +82,9 @@ Page({
|
||||
url: '/pages/goods/goods?id=' + goodsId,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
this.getFootprintList();
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -98,21 +102,21 @@ Page({
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
},
|
||||
//按下事件开始
|
||||
touchStart: function (e) {
|
||||
touchStart: function(e) {
|
||||
let that = this;
|
||||
that.setData({
|
||||
touchStart: e.timeStamp
|
||||
@@ -120,11 +124,11 @@ Page({
|
||||
console.log(e.timeStamp + '- touchStart')
|
||||
},
|
||||
//按下事件结束
|
||||
touchEnd: function (e) {
|
||||
touchEnd: function(e) {
|
||||
let that = this;
|
||||
that.setData({
|
||||
touchEnd: e.timeStamp
|
||||
})
|
||||
console.log(e.timeStamp + '- touchEnd')
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -5,11 +5,11 @@
|
||||
<text>没有浏览足迹</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footprint" wx:if="{{footprintList.length > 0}}">
|
||||
<view class="day-item" wx:for="{{footprintList}}" wx:key="*this" wx:for-index="index">
|
||||
<view class="footprint" wx:if="{{footprintList.length > 0}}">
|
||||
<view class="day-item" wx:for="{{footprintList}}" wx:key="*this" wx:for-index="index">
|
||||
<view class="day-hd" wx:if="{{item.length > 0}}">{{item[0].addTime}}</view>
|
||||
<view class="day-list" wx:if="{{item.length > 0}}">
|
||||
<view class="item" data-index="{{index}}" data-iindex="{{iindex}}" bindtouchstart="touchStart" bindtouchend="touchEnd" bindtap="deleteItem" wx:for="{{item}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
|
||||
<view class="item" data-index="{{index}}" data-iindex="{{iindex}}" bindtouchstart="touchStart" bindtouchend="touchEnd" bindtap="deleteItem" wx:for="{{item}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="id">
|
||||
<image class="img" src="{{iitem.picUrl}}"></image>
|
||||
<view class="info">
|
||||
<view class="name">{{iitem.name}}</view>
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
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-footprint{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
.no-footprint {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.no-footprint .c{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
.no-footprint .c {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
|
||||
.no-footprint .c image{
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
.no-footprint .c image {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
}
|
||||
|
||||
.no-footprint .c text{
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
.no-footprint .c text {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.footprint{
|
||||
.footprint {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e1e1e1;
|
||||
}
|
||||
|
||||
.day-item{
|
||||
.day-item {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.day-hd{
|
||||
.day-hd {
|
||||
height: 94rpx;
|
||||
width: 100%;
|
||||
line-height: 94rpx;
|
||||
@@ -66,7 +66,7 @@ page{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.day-list{
|
||||
.day-list {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
@@ -75,7 +75,7 @@ page{
|
||||
border-top: 1px solid #e1e1e1;
|
||||
}
|
||||
|
||||
.item{
|
||||
.item {
|
||||
height: 212rpx;
|
||||
width: 720rpx;
|
||||
background: #fff;
|
||||
@@ -83,17 +83,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;
|
||||
@@ -103,21 +103,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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"backgroundColor": "#f4f4f4",
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false
|
||||
"backgroundColor": "#f4f4f4",
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
@@ -6,8 +6,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='separate'></view>
|
||||
|
||||
<view class='separate'></view>
|
||||
|
||||
<view class='user_area'>
|
||||
<view class='user_row' bindtap='goOrder'>
|
||||
<view class='user_row_left'>我的订单</view>
|
||||
@@ -16,8 +16,8 @@
|
||||
<view class='user_column'>
|
||||
<view class='user_column_item' bindtap='goOrderIndex' data-index='1' data-route='/pages/ucenter/order/order'>
|
||||
<text class="user_column_item_badge" wx:if="{{order.unpaid != 0}}">{{order.unpaid}}</text>
|
||||
<image class='user_column_item_image' src='/static/images/pendpay.png'>
|
||||
</image>
|
||||
<image class='user_column_item_image' src='/static/images/pendpay.png'>
|
||||
</image>
|
||||
<view class='user_column_item_text'>待付款</view>
|
||||
</view>
|
||||
<view class='user_column_item' bindtap='goOrderIndex' data-index='2' data-route='/pages/ucenter/order/order'>
|
||||
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class='separate'></view>
|
||||
|
||||
<view class='user_row'>
|
||||
|
||||
@@ -112,8 +112,8 @@ page {
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
margin-top:20rpx;
|
||||
margin-left:40rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.user_column_item_image {
|
||||
@@ -137,26 +137,27 @@ page {
|
||||
|
||||
.user_column_item_phone {
|
||||
width: 30%;
|
||||
text-align:center;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
flex-wrap:wrap;
|
||||
float:left;
|
||||
background:#fff;
|
||||
border-bottom:1px solid #fafafa;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
float: left;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #fafafa;
|
||||
}
|
||||
.user_column_item_phone::after{
|
||||
|
||||
.user_column_item_phone::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.logout{
|
||||
margin-top: 30rpx;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
color: red;
|
||||
font-size: 30rpx;
|
||||
.logout {
|
||||
margin-top: 30rpx;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
color: red;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
@@ -2,62 +2,61 @@ var util = require('../../../utils/util.js');
|
||||
var api = require('../../../config/api.js');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
orderList: [],
|
||||
showType: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
let that = this
|
||||
try {
|
||||
var tab = wx.getStorageSync('tab');
|
||||
data: {
|
||||
orderList: [],
|
||||
showType: 0
|
||||
},
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
let that = this
|
||||
try {
|
||||
var tab = wx.getStorageSync('tab');
|
||||
|
||||
this.setData({
|
||||
showType: tab
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
this.setData({
|
||||
showType: tab
|
||||
});
|
||||
} catch (e) {}
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderList();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
|
||||
getOrderList() {
|
||||
let that = this;
|
||||
util.request(api.OrderList, {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
orderList: res.data.data
|
||||
getOrderList() {
|
||||
let that = this;
|
||||
util.request(api.OrderList, {
|
||||
showType: that.data.showType
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
orderList: res.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
switchTab: function(event) {
|
||||
let showType = event.currentTarget.dataset.index;
|
||||
this.setData({
|
||||
showType: showType
|
||||
});
|
||||
this.getOrderList();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getOrderList();
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
},
|
||||
switchTab: function(event) {
|
||||
let showType = event.currentTarget.dataset.index;
|
||||
this.setData({
|
||||
showType: showType
|
||||
});
|
||||
this.getOrderList();
|
||||
},
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
this.getOrderList();
|
||||
},
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
})
|
||||
@@ -1,47 +1,47 @@
|
||||
<view class="container">
|
||||
<view class="orders-switch">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
|
||||
<view class="txt">全部</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
|
||||
<view class="txt">待付款</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 2 ? 'active' : ''}}" bindtap="switchTab" data-index='2'>
|
||||
<view class="txt">待发货</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 3 ? 'active' : ''}}" bindtap="switchTab" data-index='3'>
|
||||
<view class="txt">待收货</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 4 ? 'active' : ''}}" bindtap="switchTab" data-index='4'>
|
||||
<view class="txt">待评价</view>
|
||||
</view>
|
||||
<view class="orders-switch">
|
||||
<view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
|
||||
<view class="txt">全部</view>
|
||||
</view>
|
||||
<view class="no-order" wx:if="{{orderList.length <= 0}}">
|
||||
<view class="c">
|
||||
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
|
||||
<text>还没有任何订单呢</text>
|
||||
</view>
|
||||
<view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
|
||||
<view class="txt">待付款</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 2 ? 'active' : ''}}" bindtap="switchTab" data-index='2'>
|
||||
<view class="txt">待发货</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 3 ? 'active' : ''}}" bindtap="switchTab" data-index='3'>
|
||||
<view class="txt">待收货</view>
|
||||
</view>
|
||||
<view class="item {{ showType == 4 ? 'active' : ''}}" bindtap="switchTab" data-index='4'>
|
||||
<view class="txt">待评价</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-order" wx:if="{{orderList.length <= 0}}">
|
||||
<view class="c">
|
||||
<image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
|
||||
<text>还没有任何订单呢</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="orders">
|
||||
<navigator url="../orderDetail/orderDetail?id={{item.id}}" class="order" open-type="redirect" wx:for="{{orderList}}" wx:key="id">
|
||||
<view class="h">
|
||||
<view class="l">订单编号:{{item.orderSn}}</view>
|
||||
<view class="r">{{item.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="goods" wx:for="{{item.goodsList}}" wx:key="id" wx:for-item="gitem">
|
||||
<view class="img">
|
||||
<image src="{{gitem.picUrl}}"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<text class="name">{{gitem.goodsName}}</text>
|
||||
<text class="number">共{{gitem.number}}件商品</text>
|
||||
</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="l">实付:¥{{item.actualPrice}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orders">
|
||||
<navigator url="../orderDetail/orderDetail?id={{item.id}}" class="order" open-type="redirect" wx:for="{{orderList}}" wx:key="id">
|
||||
<view class="h">
|
||||
<view class="l">订单编号:{{item.orderSn}}</view>
|
||||
<view class="r">{{item.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="goods" wx:for="{{item.goodsList}}" wx:key="id" wx:for-item="gitem">
|
||||
<view class="img">
|
||||
<image src="{{gitem.picUrl}}"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<text class="name">{{gitem.goodsName}}</text>
|
||||
<text class="number">共{{gitem.number}}件商品</text>
|
||||
</view>
|
||||
<view class="status"></view>
|
||||
</view>
|
||||
<view class="b">
|
||||
<view class="l">实付:¥{{item.actualPrice}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,176 +1,174 @@
|
||||
page{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
page {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
|
||||
.orders-switch{
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
/* border-bottom: 1px solid rgba(0,0,0,.15); */
|
||||
.orders-switch {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 84rpx;
|
||||
/* border-bottom: 1px solid rgba(0,0,0,.15); */
|
||||
}
|
||||
|
||||
.orders-switch .item{
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 18%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
.orders-switch .item {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
width: 18%;
|
||||
padding: 0 15rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.orders-switch .item .txt{
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #9a9ba1;
|
||||
font-size: 30rpx;
|
||||
width: 170rpx;
|
||||
.orders-switch .item .txt {
|
||||
display: inline-block;
|
||||
height: 82rpx;
|
||||
padding: 0 20rpx;
|
||||
line-height: 82rpx;
|
||||
color: #9a9ba1;
|
||||
font-size: 30rpx;
|
||||
width: 170rpx;
|
||||
}
|
||||
|
||||
.orders-switch .item.active .txt{
|
||||
color: #AB956D;
|
||||
border-bottom: 4rpx solid #AB956D;
|
||||
.orders-switch .item.active .txt {
|
||||
color: #ab956d;
|
||||
border-bottom: 4rpx solid #ab956d;
|
||||
}
|
||||
|
||||
|
||||
.no-order{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
.no-order {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.no-order .c{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
.no-order .c {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-top: 200rpx;
|
||||
}
|
||||
|
||||
.no-order .c image{
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
.no-order .c image {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 258rpx;
|
||||
height: 258rpx;
|
||||
}
|
||||
|
||||
.no-order .c text{
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
.no-order .c text {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
width: 258rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
text-align: center;
|
||||
font-size: 29rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.orders{
|
||||
height: auto;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.orders {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.order{
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
.order {
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order .h{
|
||||
height: 83.3rpx;
|
||||
line-height: 83.3rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
.order .h {
|
||||
height: 83.3rpx;
|
||||
line-height: 83.3rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order .h .l{
|
||||
float: left;
|
||||
.order .h .l {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.order .h .r{
|
||||
float: right;
|
||||
color: #b4282d;
|
||||
font-size: 24rpx;
|
||||
.order .h .r {
|
||||
float: right;
|
||||
color: #b4282d;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.order .goods{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 199rpx;
|
||||
margin-left: 31.25rpx;
|
||||
.order .goods {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 199rpx;
|
||||
margin-left: 31.25rpx;
|
||||
}
|
||||
|
||||
.order .goods .img{
|
||||
height:145.83rpx;
|
||||
width:145.83rpx;
|
||||
background: #f4f4f4;
|
||||
.order .goods .img {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order .goods .img image{
|
||||
height:145.83rpx;
|
||||
width:145.83rpx;
|
||||
.order .goods .img image {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
}
|
||||
|
||||
.order .goods .info{
|
||||
height: 145.83rpx;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
.order .goods .info {
|
||||
height: 145.83rpx;
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.order .goods .name{
|
||||
margin-top: 30rpx;
|
||||
display: block;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.order .goods .name {
|
||||
margin-top: 30rpx;
|
||||
display: block;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order .goods .number{
|
||||
display: block;
|
||||
height: 37rpx;
|
||||
line-height: 37rpx;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
.order .goods .number {
|
||||
display: block;
|
||||
height: 37rpx;
|
||||
line-height: 37rpx;
|
||||
color: #666;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order .goods .status{
|
||||
width:105rpx;
|
||||
color: #b4282d;
|
||||
font-size: 25rpx;
|
||||
.order .goods .status {
|
||||
width: 105rpx;
|
||||
color: #b4282d;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order .b{
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
.order .b {
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order .b .l{
|
||||
float: left;
|
||||
.order .b .l {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.order .b .r{
|
||||
float: right;
|
||||
.order .b .r {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.order .b .btn{
|
||||
margin-top: 19rpx;
|
||||
height: 64.5rpx;
|
||||
line-height: 64.5rpx;
|
||||
text-align: center;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #b4282d;
|
||||
}
|
||||
.order .b .btn {
|
||||
margin-top: 19rpx;
|
||||
height: 64.5rpx;
|
||||
line-height: 64.5rpx;
|
||||
text-align: center;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #b4282d;
|
||||
}
|
||||
|
||||
@@ -10,38 +10,38 @@ Page({
|
||||
flag: false,
|
||||
handleOption: {}
|
||||
},
|
||||
onLoad: function (options) {
|
||||
onLoad: function(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
this.setData({
|
||||
orderId: options.id
|
||||
});
|
||||
this.getOrderDetail();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderDetail();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
wx.showNavigationBarLoading() //在标题栏中显示加载
|
||||
this.getOrderDetail();
|
||||
wx.hideNavigationBarLoading() //完成停止加载
|
||||
wx.stopPullDownRefresh() //停止下拉刷新
|
||||
},
|
||||
expandDetail: function() {
|
||||
let that = this;
|
||||
this.setData({
|
||||
flag: !that.data.flag
|
||||
})
|
||||
},
|
||||
getOrderDetail: function () {
|
||||
getOrderDetail: function() {
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
wx.hideLoading()
|
||||
}, 2000);
|
||||
|
||||
let that = this;
|
||||
util.request(api.OrderDetail, {
|
||||
orderId: that.data.orderId
|
||||
}).then(function (res) {
|
||||
}).then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
console.log(res.data);
|
||||
that.setData({
|
||||
@@ -50,62 +50,61 @@ Page({
|
||||
handleOption: res.data.orderInfo.handleOption,
|
||||
expressInfo: res.data.expressInfo
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
// “去付款”按钮点击效果
|
||||
payOrder: function() {
|
||||
let that = this;
|
||||
util.request(api.OrderPrepay, {
|
||||
orderId: that.data.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("支付过程成功");
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
},
|
||||
'fail': function(res) {
|
||||
console.log("支付过程失败");
|
||||
util.showErrorToast('支付失败');
|
||||
},
|
||||
'complete': function(res) {
|
||||
console.log("支付过程结束")
|
||||
}
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
// “去付款”按钮点击效果
|
||||
payOrder: function() {
|
||||
let that = this;
|
||||
util.request(api.OrderPrepay, {
|
||||
orderId: that.data.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("支付过程成功");
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
},
|
||||
'fail': function(res) {
|
||||
console.log("支付过程失败");
|
||||
util.showErrorToast('支付失败');
|
||||
},
|
||||
'complete': function(res) {
|
||||
console.log("支付过程结束")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
// “取消订单”点击效果
|
||||
cancelOrder: function () {
|
||||
cancelOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderCancel, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
@@ -114,79 +113,76 @@ Page({
|
||||
});
|
||||
},
|
||||
// “取消订单并退款”点击效果
|
||||
refundOrder: function () {
|
||||
refundOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要取消此订单?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderRefund, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '取消订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
// “删除”点击效果
|
||||
deleteOrder: function () {
|
||||
deleteOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确定要删除此订单?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderDelete, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '删除订单成功'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
// “确认收货”点击效果
|
||||
confirmOrder: function () {
|
||||
confirmOrder: function() {
|
||||
let that = this;
|
||||
let orderInfo = that.data.orderInfo;
|
||||
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '确认收货?',
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
util.request(api.OrderConfirm, {
|
||||
orderId: orderInfo.id
|
||||
}, 'POST').then(function (res) {
|
||||
}, 'POST').then(function(res) {
|
||||
if (res.errno === 0) {
|
||||
wx.showToast({
|
||||
title: '确认收货成功!'
|
||||
});
|
||||
util.redirect('/pages/ucenter/order/order');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
util.showErrorToast(res.errmsg);
|
||||
}
|
||||
});
|
||||
@@ -194,16 +190,16 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onReady: function () {
|
||||
onReady: function() {
|
||||
// 页面渲染完成
|
||||
},
|
||||
onShow: function () {
|
||||
onShow: function() {
|
||||
// 页面显示
|
||||
},
|
||||
onHide: function () {
|
||||
onHide: function() {
|
||||
// 页面隐藏
|
||||
},
|
||||
onUnload: function () {
|
||||
onUnload: function() {
|
||||
// 页面关闭
|
||||
}
|
||||
})
|
||||
@@ -1,85 +1,87 @@
|
||||
<view class="container">
|
||||
<view class="order-info">
|
||||
<view class="item-a">下单时间:{{orderInfo.addTime}}</view>
|
||||
<view class="item-b">订单编号:{{orderInfo.orderSn}}</view>
|
||||
<view class="item-c">
|
||||
<view class="l">实付:<text class="cost">¥{{orderInfo.actualPrice}}</text></view>
|
||||
<view class="r">
|
||||
<view class="btn active" bindtap="cancelOrder" wx:if="{{handleOption.cancel}}">取消订单</view>
|
||||
<view class="btn active" bindtap="payOrder" wx:if="{{handleOption.pay}}">去付款</view>
|
||||
<view class="btn active" bindtap="confirmOrder" wx:if="{{handleOption.confirm}}">确认收货</view>
|
||||
<view class="btn active" bindtap="deleteOrder" wx:if="{{handleOption.delete}}">删除订单</view>
|
||||
<view class="btn active" bindtap="refundOrder" wx:if="{{handleOption.refund}}">申请退款</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-info">
|
||||
<view class="item-a">下单时间:{{orderInfo.addTime}}</view>
|
||||
<view class="item-b">订单编号:{{orderInfo.orderSn}}</view>
|
||||
<view class="item-c">
|
||||
<view class="l">实付:
|
||||
<text class="cost">¥{{orderInfo.actualPrice}}</text>
|
||||
</view>
|
||||
<view class="r">
|
||||
<view class="btn active" bindtap="cancelOrder" wx:if="{{handleOption.cancel}}">取消订单</view>
|
||||
<view class="btn active" bindtap="payOrder" wx:if="{{handleOption.pay}}">去付款</view>
|
||||
<view class="btn active" bindtap="confirmOrder" wx:if="{{handleOption.confirm}}">确认收货</view>
|
||||
<view class="btn active" bindtap="deleteOrder" wx:if="{{handleOption.delete}}">删除订单</view>
|
||||
<view class="btn active" bindtap="refundOrder" wx:if="{{handleOption.refund}}">申请退款</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order-goods">
|
||||
<view class="h">
|
||||
<view class="label">商品信息</view>
|
||||
<view class="status">{{orderInfo.orderStatusText}}</view>
|
||||
<view class="order-goods">
|
||||
<view class="h">
|
||||
<view class="label">商品信息</view>
|
||||
<view class="status">{{orderInfo.orderStatusText}}</view>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<view class="item" wx:for="{{orderGoods}}" wx:key="id">
|
||||
<view class="img">
|
||||
<image src="{{item.picUrl}}"></image>
|
||||
</view>
|
||||
<view class="goods">
|
||||
<view class="item" wx:for="{{orderGoods}}" 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="attr">{{item.specifications}}</view>
|
||||
<view class="price">¥{{item.price}}</view>
|
||||
<view class="btn active" wx:if="{{handleOption.comment && (item.comment == 0)}}">
|
||||
<navigator url="../../commentPost/commentPost?orderId={{item.orderId}}&&valueId={{item.goodsId}}&type=0">去评价</navigator>
|
||||
</view>
|
||||
<view class="btn active" wx:if="{{handleOption.rebuy}}">
|
||||
<navigator url="../../goods/goods?id={{item.goodsId}}">再次购买</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="t">
|
||||
<text class="name">{{item.goodsName}}</text>
|
||||
<text class="number">x{{item.number}}</text>
|
||||
</view>
|
||||
<view class="attr">{{item.specifications}}</view>
|
||||
<view class="price">¥{{item.price}}</view>
|
||||
<view class="btn active" wx:if="{{handleOption.comment && (item.comment == 0)}}">
|
||||
<navigator url="../../commentPost/commentPost?orderId={{item.orderId}}&&valueId={{item.goodsId}}&type=0">去评价</navigator>
|
||||
</view>
|
||||
<view class="btn active" wx:if="{{handleOption.rebuy}}">
|
||||
<navigator url="../../goods/goods?id={{item.goodsId}}">再次购买</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order-bottom">
|
||||
<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 class="address">
|
||||
<view class="t">
|
||||
<text class="name">{{orderInfo.consignee}}</text>
|
||||
<text class="mobile">{{orderInfo.mobile}}</text>
|
||||
</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 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="pay-fee">
|
||||
<text class="label">实付:</text>
|
||||
<text class="txt">¥{{orderInfo.actualPrice}}</text>
|
||||
<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="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
|
||||
<view class="order-express">
|
||||
<view class="title">
|
||||
<view class="t">快递公司:{{expressInfo.shipperName}}</view>
|
||||
<view class="b">物流单号:{{expressInfo.shipperCode}}</view>
|
||||
</view>
|
||||
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
|
||||
<!-- 物流信息,仅收货状态下可见 -->
|
||||
<view class="order-express" bindtap="expandDetail" wx:if="{{ handleOption.confirm }}">
|
||||
<view class="order-express">
|
||||
<view class="title">
|
||||
<view class="t">快递公司:{{expressInfo.shipperName}}</view>
|
||||
<view class="b">物流单号:{{expressInfo.shipperCode}}</view>
|
||||
</view>
|
||||
<image class="ti" src="/static/images/address_right.png" background-size="cover"></image>
|
||||
</view>
|
||||
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
|
||||
<view class="trace">
|
||||
<view class="acceptStation">{{iitem.AcceptStation}}</view>
|
||||
<view class="acceptTime">{{iitem.AcceptTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="traces" wx:for="{{expressInfo.Traces}}" wx:key="item" wx:for-item="iitem" wx:if="{{ flag }}">
|
||||
<view class="trace">
|
||||
<view class="acceptStation">{{iitem.AcceptStation}}</view>
|
||||
<view class="acceptTime">{{iitem.AcceptTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,329 +1,329 @@
|
||||
page{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
page {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order-info{
|
||||
padding-top: 25rpx;
|
||||
background: #fff;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
.order-info {
|
||||
padding-top: 25rpx;
|
||||
background: #fff;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-a{
|
||||
padding-left: 31.25rpx;
|
||||
height: 42.5rpx;
|
||||
padding-bottom: 12.5rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
.item-a {
|
||||
padding-left: 31.25rpx;
|
||||
height: 42.5rpx;
|
||||
padding-bottom: 12.5rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.item-b{
|
||||
padding-left: 31.25rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
margin-top: 12.5rpx;
|
||||
margin-bottom: 41.5rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
.item-b {
|
||||
padding-left: 31.25rpx;
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
margin-top: 12.5rpx;
|
||||
margin-bottom: 41.5rpx;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.item-c{
|
||||
margin-left: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
.item-c {
|
||||
margin-left: 31.25rpx;
|
||||
border-top: 1px solid #f4f4f4;
|
||||
height: 103rpx;
|
||||
line-height: 103rpx;
|
||||
}
|
||||
|
||||
.item-c .l{
|
||||
float: left;
|
||||
.item-c .l {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item-c .r{
|
||||
height: 103rpx;
|
||||
float: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 16rpx;
|
||||
.item-c .r {
|
||||
height: 103rpx;
|
||||
float: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
|
||||
.item-c .r .btn{
|
||||
float: right;
|
||||
.item-c .r .btn {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.item-c .cost{
|
||||
color: #b4282d;
|
||||
.item-c .cost {
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.item-c .btn{
|
||||
line-height: 66rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 66rpx;
|
||||
.item-c .btn {
|
||||
line-height: 66rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
height: 66rpx;
|
||||
}
|
||||
|
||||
.item-c .btn.active{
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
.item-c .btn.active {
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.order-goods{
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
.order-goods {
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-goods .h{
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
.order-goods .h {
|
||||
height: 93.75rpx;
|
||||
line-height: 93.75rpx;
|
||||
margin-left: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
padding-right: 31.25rpx;
|
||||
}
|
||||
|
||||
.order-goods .h .label{
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
.order-goods .h .label {
|
||||
float: left;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.order-goods .h .status{
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
.order-goods .h .status {
|
||||
float: right;
|
||||
font-size: 30rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-goods .item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 192rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
.order-goods .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 192rpx;
|
||||
margin-left: 31.25rpx;
|
||||
padding-right: 31.25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-goods .item:last-child{
|
||||
border-bottom: none;
|
||||
.order-goods .item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.order-goods .item .img{
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
.order-goods .item .img {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.order-goods .item .img image{
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
.order-goods .item .img image {
|
||||
height: 145.83rpx;
|
||||
width: 145.83rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .info{
|
||||
flex: 1;
|
||||
height: 145.83rpx;
|
||||
margin-left: 20rpx;
|
||||
.order-goods .item .info {
|
||||
flex: 1;
|
||||
height: 145.83rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t{
|
||||
margin-top: 8rpx;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
margin-bottom: 10.5rpx;
|
||||
.order-goods .item .t {
|
||||
margin-top: 8rpx;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
margin-bottom: 10.5rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t .name{
|
||||
display: block;
|
||||
float: left;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.order-goods .item .t .name {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 33rpx;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .t .number{
|
||||
display: block;
|
||||
float: right;
|
||||
height: 33rpx;
|
||||
text-align: right;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.order-goods .item .t .number {
|
||||
display: block;
|
||||
float: right;
|
||||
height: 33rpx;
|
||||
text-align: right;
|
||||
line-height: 33rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .attr{
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
color: #666;
|
||||
margin-bottom: 25rpx;
|
||||
font-size: 25rpx;
|
||||
.order-goods .item .attr {
|
||||
height: 29rpx;
|
||||
line-height: 29rpx;
|
||||
color: #666;
|
||||
margin-bottom: 25rpx;
|
||||
font-size: 25rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .price{
|
||||
display: block;
|
||||
float: left;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
.order-goods .item .price {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .btn{
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: right;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
.order-goods .item .btn {
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: right;
|
||||
margin: 0 15rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.order-goods .item .btn.active{
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
.order-goods .item .btn.active {
|
||||
background: #b4282d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.order-bottom{
|
||||
margin-top: 20rpx;
|
||||
padding-left: 31.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
.order-bottom {
|
||||
margin-top: 20rpx;
|
||||
padding-left: 31.25rpx;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-bottom .address{
|
||||
height: 128rpx;
|
||||
padding-top: 25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
.order-bottom .address {
|
||||
height: 128rpx;
|
||||
padding-top: 25rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-bottom .address .t{
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
.order-bottom .address .t {
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .name{
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
width: 140rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
.order-bottom .address .name {
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
width: 140rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .mobile{
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
.order-bottom .address .mobile {
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .address .b{
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
.order-bottom .address .b {
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .total{
|
||||
height: 106rpx;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
.order-bottom .total {
|
||||
height: 106rpx;
|
||||
padding-top: 20rpx;
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.order-bottom .total .t{
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
display: flex;
|
||||
.order-bottom .total .t {
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
margin-bottom: 7.5rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.order-bottom .total .label{
|
||||
width: 150rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
.order-bottom .total .label {
|
||||
width: 150rpx;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .total .txt{
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
.order-bottom .total .txt {
|
||||
flex: 1;
|
||||
display: inline-block;
|
||||
height: 35rpx;
|
||||
line-height: 35rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee{
|
||||
height: 81rpx;
|
||||
line-height: 81rpx;
|
||||
.order-bottom .pay-fee {
|
||||
height: 81rpx;
|
||||
line-height: 81rpx;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee .label{
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
.order-bottom .pay-fee .label {
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-bottom .pay-fee .txt{
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
.order-bottom .pay-fee .txt {
|
||||
display: inline-block;
|
||||
width: 140rpx;
|
||||
color: #b4282d;
|
||||
}
|
||||
|
||||
.order-express {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-express .title {
|
||||
float: left;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 10rpx;
|
||||
float: left;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.order-express .ti {
|
||||
float: right;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-top: 28rpx;
|
||||
float: right;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
margin-right: 16rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.order-express .t {
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.order-express .b {
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
font-size: 29rpx;
|
||||
margin-left: 10.25rpx;
|
||||
color: #a78845;
|
||||
}
|
||||
|
||||
.order-express .traces {
|
||||
padding: 17.5rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f1e6cdcc;
|
||||
padding: 17.5rpx;
|
||||
background: #fff;
|
||||
border-bottom: 1rpx solid #f1e6cdcc;
|
||||
}
|
||||
|
||||
.order-express .trace {
|
||||
padding-bottom: 17.5rpx;
|
||||
padding-top: 17.5rpx;
|
||||
background: #fff;
|
||||
padding-bottom: 17.5rpx;
|
||||
padding-top: 17.5rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.order-express .acceptTime {
|
||||
margin-top: 20rpx;
|
||||
margin-right: 40rpx;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-right: 40rpx;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order-express .acceptStation {
|
||||
font-size: 26rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
@@ -1,246 +1,246 @@
|
||||
{
|
||||
"description": "项目配置文件。",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"newFeature": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "1.9.93",
|
||||
"appid": "wxa5b486c6b918ecfb",
|
||||
"projectname": "litemall-wx",
|
||||
"condition": {
|
||||
"search": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"plugin": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"current": 34,
|
||||
"list": [
|
||||
{
|
||||
"id": -1,
|
||||
"name": "首页",
|
||||
"pathName": "pages/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题",
|
||||
"pathName": "pages/topic/topic",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题详情",
|
||||
"pathName": "pages/topicDetail/topicDetail",
|
||||
"query": "id=314"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题评论列表",
|
||||
"pathName": "pages/topicComment/topicComment",
|
||||
"query": "valueId=314&type=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题评论添加",
|
||||
"pathName": "pages/topicCommentPost/topicCommentPost",
|
||||
"query": "valueId=314&type=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "品牌",
|
||||
"pathName": "pages/brand/brand",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "品牌详情",
|
||||
"pathName": "pages/brandDetail/brandDetail",
|
||||
"query": "id=1001000"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "人气推荐",
|
||||
"pathName": "pages/hotGoods/hotGoods",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "新品首发",
|
||||
"pathName": "pages/newGoods/newGoods",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "分类",
|
||||
"pathName": "pages/catalog/catalog",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "分类详情",
|
||||
"pathName": "pages/category/category",
|
||||
"query": "id=1008002"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "查找",
|
||||
"pathName": "pages/search/search",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "商品",
|
||||
"pathName": "pages/goods/goods",
|
||||
"query": "id=1181003"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "商品评论列表",
|
||||
"pathName": "pages/comment/comment",
|
||||
"query": "valueId=1181000&type=0"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "购物车",
|
||||
"pathName": "pages/cart/cart",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "下单",
|
||||
"pathName": "pages/checkout/checkout",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "支付结果",
|
||||
"pathName": "pages/payResult/payResult",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的",
|
||||
"pathName": "pages/ucenter/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的订单列表",
|
||||
"pathName": "pages/ucenter/order/order",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的订单详情",
|
||||
"pathName": "pages/ucenter/orderDetail/orderDetail",
|
||||
"query": "id=1"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "待评价的订单详情",
|
||||
"pathName": "pages/ucenter/orderDetail/orderDetail",
|
||||
"query": "id=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "购买商品评价",
|
||||
"pathName": "pages/commentPost/commentPost",
|
||||
"query": "orderId=2&type=0&valueId=1116011"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的优惠券",
|
||||
"pathName": "pages/ucenter/coupon/coupon",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的收藏",
|
||||
"pathName": "pages/ucenter/collect/collect",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的足迹",
|
||||
"pathName": "pages/ucenter/footprint/footprint",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的地址",
|
||||
"pathName": "pages/ucenter/address/address",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的地址添加",
|
||||
"pathName": "pages/ucenter/addressAdd/addressAdd",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "登录",
|
||||
"pathName": "pages/auth/login/login",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "账号登录",
|
||||
"pathName": "pages/auth/accountLogin/accountLogin",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "注册",
|
||||
"pathName": "pages/auth/register/register",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "找回密码",
|
||||
"pathName": "pages/auth/reset/reset",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "关于",
|
||||
"pathName": "pages/about/about",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "测试更新",
|
||||
"pathName": "pages/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "意见反馈",
|
||||
"pathName": "pages/ucenter/feedback/feedback",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "团购专区",
|
||||
"pathName": "pages/groupon/grouponList/grouponList",
|
||||
"query": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"description": "项目配置文件。",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"newFeature": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "1.9.93",
|
||||
"appid": "wxa5b486c6b918ecfb",
|
||||
"projectname": "litemall-wx",
|
||||
"condition": {
|
||||
"search": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"plugin": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"current": 34,
|
||||
"list": [
|
||||
{
|
||||
"id": -1,
|
||||
"name": "首页",
|
||||
"pathName": "pages/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题",
|
||||
"pathName": "pages/topic/topic",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题详情",
|
||||
"pathName": "pages/topicDetail/topicDetail",
|
||||
"query": "id=314"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题评论列表",
|
||||
"pathName": "pages/topicComment/topicComment",
|
||||
"query": "valueId=314&type=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "专题评论添加",
|
||||
"pathName": "pages/topicCommentPost/topicCommentPost",
|
||||
"query": "valueId=314&type=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "品牌",
|
||||
"pathName": "pages/brand/brand",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "品牌详情",
|
||||
"pathName": "pages/brandDetail/brandDetail",
|
||||
"query": "id=1001000"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "人气推荐",
|
||||
"pathName": "pages/hotGoods/hotGoods",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "新品首发",
|
||||
"pathName": "pages/newGoods/newGoods",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "分类",
|
||||
"pathName": "pages/catalog/catalog",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "分类详情",
|
||||
"pathName": "pages/category/category",
|
||||
"query": "id=1008002"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "查找",
|
||||
"pathName": "pages/search/search",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "商品",
|
||||
"pathName": "pages/goods/goods",
|
||||
"query": "id=1181003"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "商品评论列表",
|
||||
"pathName": "pages/comment/comment",
|
||||
"query": "valueId=1181000&type=0"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "购物车",
|
||||
"pathName": "pages/cart/cart",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "下单",
|
||||
"pathName": "pages/checkout/checkout",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "支付结果",
|
||||
"pathName": "pages/payResult/payResult",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的",
|
||||
"pathName": "pages/ucenter/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的订单列表",
|
||||
"pathName": "pages/ucenter/order/order",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的订单详情",
|
||||
"pathName": "pages/ucenter/orderDetail/orderDetail",
|
||||
"query": "id=1"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "待评价的订单详情",
|
||||
"pathName": "pages/ucenter/orderDetail/orderDetail",
|
||||
"query": "id=1"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "购买商品评价",
|
||||
"pathName": "pages/commentPost/commentPost",
|
||||
"query": "orderId=2&type=0&valueId=1116011"
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的优惠券",
|
||||
"pathName": "pages/ucenter/coupon/coupon",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的收藏",
|
||||
"pathName": "pages/ucenter/collect/collect",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的足迹",
|
||||
"pathName": "pages/ucenter/footprint/footprint",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的地址",
|
||||
"pathName": "pages/ucenter/address/address",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "我的地址添加",
|
||||
"pathName": "pages/ucenter/addressAdd/addressAdd",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "登录",
|
||||
"pathName": "pages/auth/login/login",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "账号登录",
|
||||
"pathName": "pages/auth/accountLogin/accountLogin",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "注册",
|
||||
"pathName": "pages/auth/register/register",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "找回密码",
|
||||
"pathName": "pages/auth/reset/reset",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "关于",
|
||||
"pathName": "pages/about/about",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "测试更新",
|
||||
"pathName": "pages/index/index",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "意见反馈",
|
||||
"pathName": "pages/ucenter/feedback/feedback",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"id": -1,
|
||||
"name": "团购专区",
|
||||
"pathName": "pages/groupon/grouponList/grouponList",
|
||||
"query": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ function isValidPhone(str) {
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isValidPhone
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user