diff --git a/api/index.js b/api/index.js index 774d756..49ce09b 100644 --- a/api/index.js +++ b/api/index.js @@ -36,6 +36,9 @@ import withdraw from "./interfaces/withdraw" // 售后服务 import refund from "./interfaces/refund" +// 购物袋 +import bag from "./interfaces/bag" + export default { auth, bank, @@ -47,5 +50,6 @@ export default { pay, idcard, withdraw, - refund + refund, + bag } \ No newline at end of file diff --git a/api/interfaces/bag.js b/api/interfaces/bag.js new file mode 100644 index 0000000..116bc70 --- /dev/null +++ b/api/interfaces/bag.js @@ -0,0 +1,44 @@ +/* + * 手太欠 + * 愿这世界都如故事里一样 美好而动人~ +*/ + +import { req } from "../request" + +// 购物车数量 +const count = () => req({ + url: "mall/carts/count" +}) + +// 加入购物车 +const add = data => req({ + url : "mall/carts", + method : "POST", + data +}) + +// 购物车列表 +const list = () => req({ + url: "mall/carts" +}) + +// 购物车数量变更 +const putNum = (cart_id, data) => req({ + url : "mall/carts/" + cart_id, + method : "PUT", + data +}) + +// 删除产品 +const del = cart_id => req({ + url : "mall/carts/" + cart_id, + method : "DELETE" +}) + +export default ({ + count, + add, + list, + putNum, + del +}) \ No newline at end of file diff --git a/api/request.js b/api/request.js index baffe03..1916203 100644 --- a/api/request.js +++ b/api/request.js @@ -7,9 +7,9 @@ import { errInfo } from './err' import { updToken } from './updateToken' // 正式地址 -const api = "https://api.xuanhuojk.com/api/" +// const api = "https://api.xuanhuojk.com/api/" // 测试地址 -// const api = "https://api.xhtest.douhuofalv.com/api/" +const api = "https://api.xhtest.douhuofalv.com/api/" const header = { "Accept" : "application/json" } diff --git a/app.json b/app.json index d5a9a92..7bde636 100644 --- a/app.json +++ b/app.json @@ -38,7 +38,8 @@ "pages/refund/info/info", "pages/refund/deliver/deliver", "pages/refund/logs/logs", - "pages/richText/richText" + "pages/richText/richText", + "pages/bag/bag" ], "window": { "backgroundTextStyle": "light", @@ -60,6 +61,12 @@ "iconPath": "/static/tabBarIcon/tabBar_01.png", "selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png" }, + { + "pagePath": "pages/bag/bag", + "text": "购物袋", + "iconPath": "/static/tabBarIcon/tabBar_01.png", + "selectedIconPath": "/static/tabBarIcon/tabBar_selected_01.png" + }, { "pagePath": "pages/user/index", "text": "我的", diff --git a/pages/bag/bag.js b/pages/bag/bag.js new file mode 100644 index 0000000..ff8e400 --- /dev/null +++ b/pages/bag/bag.js @@ -0,0 +1,307 @@ + +var goodsIndex = '', + sellerIndex = '' + +Page({ + /** + * 页面的初始数据 + */ + data: { + bags : [], // 购物车列表 + isUser : false, // 是否登录 + bagId : '', + allCheckbox : false, + bagNumber : 0, + allPrice : '0.00', + bagOrderLoading : false + }, + /** + * 生命周期函数 - 页面显示 + */ + onShow(){ + let token = wx.getStorageSync('token') || null + this.setData({ + isUser : token != null, + bagOrderLoading : false, + allCheckbox : false, + bagNumber : 0, + allPrice : '0.00', + bagId : '', + }) + + if(token != null){ + wx.showLoading({ + title: '加载中...', + mask : true + }) + wx.$api.bag.list().then(res => { + res.data.map(val => { + val.shop.mallState = false + val.items.map(val => { + val.state = false + }) + }) + this.setData({ + pagesLoding: false, + bags : res.data + }) + wx.hideLoading() + }) + } + }, + /** + * 商品数量加减 + */ + goodsNumber(e){ + goodsIndex = e.currentTarget.dataset.goods + sellerIndex = e.currentTarget.dataset.seller + + let goodsNumber = this.data.bags[sellerIndex].items[goodsIndex].qty + + if (e.currentTarget.dataset.type == 'plus'){ + goodsNumber = goodsNumber + 1 + }else{ + if (goodsNumber > 1){ + goodsNumber = goodsNumber - 1 + }else{ + wx.showToast({ + title : '商品数量不能小于1', + icon : 'none' + }) + return + } + } + this.setnumNumber(goodsIndex, sellerIndex, goodsNumber) + }, + /** + * 输入商品数量 + */ + goodsNumberInput(e){ + goodsIndex = e.currentTarget.dataset.goods + sellerIndex = e.currentTarget.dataset.seller + + let setnumNumber = this.data.bags[sellerIndex].items[goodsIndex].number, + inputValue = Number() + if (e.detail.value > 0){ + inputValue = Number(e.detail.value) + }else{ + wx.showToast({ + title : '商品数量不能小于1', + icon : 'none' + }) + inputValue = Number(setnumNumber) + } + this.setnumNumber(goodsIndex, sellerIndex, inputValue) + }, + /** + * 更新商品数量 + */ + setnumNumber(goodsIndex, sellerIndex, setnumNumber){ + wx.showLoading({ + title: '加载中', + }) + let atGoods = this.data.bags + wx.$api.bag.putNum(atGoods[sellerIndex].items[goodsIndex].cart_id, { + qty : setnumNumber, + sku_id: atGoods[sellerIndex].items[goodsIndex].sku_id + }).then(res => { + atGoods[sellerIndex].items[goodsIndex].qty = res.data + this.setData({ + bags: atGoods + }) + this.totalPrice() + wx.hideLoading() + }) + }, + /** + * 单选 + */ + checkbox(e){ + goodsIndex = e.currentTarget.dataset.goods + sellerIndex = e.currentTarget.dataset.seller + + console.log(e.currentTarget.dataset) + + let goodsList = this.data.bags, + checkbox = goodsList[sellerIndex].items[goodsIndex].state, + seller = goodsList[sellerIndex].items, + sellerLength = 0 + + goodsList[sellerIndex].items[goodsIndex].state = !checkbox + + for (let i in seller){ + if (seller[i].state){ + sellerLength++ + if (sellerLength == goodsList[sellerIndex].items.length){ + goodsList[sellerIndex].shop.mallState = true + } + }else{ + goodsList[sellerIndex].shop.mallState = false + this.setData({ + allCheckbox: false + }) + } + } + + this.allCheckbox('checkbox') + + this.setData({ + bags: goodsList + }) + + this.totalPrice() + }, + /** + * 店铺全选 + */ + sellerCheckbox(e){ + sellerIndex = e.currentTarget.dataset.seller + + let goodsList = this.data.bags, + allCheckbox = this.data.allCheckbox, + seller = goodsList[sellerIndex].shop.mallState, + sellerLengh = 0 + + goodsList[sellerIndex].shop.mallState = !seller + + for (let i in goodsList[sellerIndex].items){ + goodsList[sellerIndex].items[i].state = !seller + } + + for (let j in goodsList){ + if (goodsList[j].shop.mallState){ + sellerLengh++ + if (sellerLengh == goodsList.length){ + allCheckbox = true + }else{ + allCheckbox = false + } + } + } + + this.allCheckbox('checkbox') + + this.setData({ + bags : goodsList, + allCheckbox : allCheckbox + }) + + this.totalPrice() + }, + /** + * 全选 + */ + allCheckbox(type){ + let goodsLenght = 0, + allCheckbox = this.data.allCheckbox, + goodsList = this.data.bags + + if (type == 'checkbox'){ + for (let j in goodsList) { + if (goodsList[j].shop.mallState) { + goodsLenght++ + if (goodsLenght == goodsList.length) { + allCheckbox = true + } + } + } + }else{ + allCheckbox = !allCheckbox + for (var i in goodsList){ + goodsList[i].shop.mallState = allCheckbox + + for (let k in goodsList[i].items){ + goodsList[i].items[k].state = allCheckbox + } + } + } + this.setData({ + allCheckbox : allCheckbox, + bags : goodsList + }) + this.totalPrice() + }, + /** + * 计算价格 + */ + totalPrice() { + let bagNumber = 0, + allPrice = 0, + bagIdArr = [], + goodsList = this.data.bags + + for (var i in goodsList){ + for (let j in goodsList[i].items){ + if (goodsList[i].items[j].state){ + bagNumber = bagNumber + goodsList[i].items[j].qty + allPrice = allPrice + (goodsList[i].items[j].qty * goodsList[i].items[j].price) + bagIdArr.push(goodsList[i].items[j].cart_id) + } + } + } + this.setData({ + bagNumber : bagNumber, + allPrice : allPrice.toFixed(2), + bagId : bagIdArr.join(",") + }) + }, + /** + * 购物车提交 + */ + bagOrder(){ + this.setData({ + bagOrderLoading:true + }) + if (this.data.bagId != ''){ + + console.log('提交的数据id:' + this.data.bagId) + + // setTimeout(() => { + // this.setData({ + // bagOrderLoading: false + // }) + // }, 2000) + }else{ + wx.showToast({ + title : '请选择结算商品', + icon : 'none' + }) + + this.setData({ + bagOrderLoading: false + }) + } + }, + /** + * 菜单 + */ + actionSheet(e){ + goodsIndex = e.currentTarget.dataset.goods + sellerIndex = e.currentTarget.dataset.seller + + let goodsList = this.data.bags, + cartId = this.data.bags[sellerIndex].items[goodsIndex].cart_id + + wx.showActionSheet({ + itemList: ['删除'], + success : res=>{ + wx.showLoading({ + title: '加载中', + }) + wx.$api.bag.del(cartId).then(res => { + goodsList[sellerIndex].items.splice([goodsIndex],1) + if (goodsList[sellerIndex].items.length == 0){ + goodsList.splice([sellerIndex], 1) + } + this.setData({ + bags: goodsList + }) + this.totalPrice() + wx.showToast({ + title: '已删除' + }) + }) + } + }) + }, +}) \ No newline at end of file diff --git a/pages/bag/bag.json b/pages/bag/bag.json new file mode 100644 index 0000000..b67c440 --- /dev/null +++ b/pages/bag/bag.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "购物车" +} \ No newline at end of file diff --git a/pages/bag/bag.wxml b/pages/bag/bag.wxml new file mode 100644 index 0000000..6aca81d --- /dev/null +++ b/pages/bag/bag.wxml @@ -0,0 +1,63 @@ + + + + + + + + + 全选 + + + + + + + + + + + {{ bagList.shop.name }} + + + + + + + + {{item.name}} + {{item.sku_name}} + + ¥{{item.price}} + + - + + + + + + + + + + + + + + + + + 购物袋中暂无任何商品 + + + + + 未登录,无法获取您的购物车信息 + + + + + 合计¥{{allPrice}} + 共计{{bagNumber}}件,不含运费 + + + diff --git a/pages/bag/bag.wxss b/pages/bag/bag.wxss new file mode 100644 index 0000000..7ce7194 --- /dev/null +++ b/pages/bag/bag.wxss @@ -0,0 +1,108 @@ + +.content{ background: #f7f8f9; min-height: 100vh; } + + /* 工具栏 */ +.bag-header{ border-bottom: solid 1rpx #f1f1f1; padding: 25rpx 30rpx; overflow: hidden; position: fixed; width: 100%; top: 0; left: 0; box-sizing: border-box; line-height: 40rpx; } + +/* 购物车列表 */ +.bag-content{ padding: 90rpx 0 140rpx 0; background: #f7f8f9; } +.bag-content-mall{ background: white; margin-top: 30rpx; padding-bottom: 20rpx; } +.bag-content-mall-name{ line-height: 80rpx; padding: 0 30rpx; border-bottom: solid 1rpx #f1f1f1; } +.bag-content-mall-goods{ position: relative; padding: 20rpx 30rpx 0 30rpx; } + +.mall-good-cover{ + width: 148rpx; + height: 148rpx; + background: #f5f6fa; + vertical-align: top; +} + +.mall-good-content{ + position: absolute; + top: 20rpx; + left: 268rpx; + right: 96rpx; +} + +.mall-good-value{ + color: #747788; + font-size: 24rpx; + line-height: 40rpx; +} + +.mall-good-title{ + line-height: 40rpx; +} + +.mall-good-price{ + color: #e92344; + padding-top: 20rpx; + line-height: 48rpx; + font-weight: bold; + padding-right: 200rpx; + position: relative; +} + +.mall-good-number{ + display: flex; + position: absolute; + right: 0; + top: 18rpx; + width: 180rpx; + font-weight: normal; + text-align: center; + height: 50rpx; +} + +.mall-good-number-btn{ + width: 50rpx; +} + +.mall-good-number-input{ + flex: 1; + margin: 0 6rpx; + height: 50rpx; + line-height: 50rpx; +} + +.mall-good-number-input, +.mall-good-number-btn{ + background: #f5f6fa; + color: #464854; +} + +.mall-good-more{ + height: 148rpx; + line-height: 148rpx; + width: 36rpx; + padding: 0 30rpx; + position: absolute; + top: 20rpx; + right: 0; +} + +.mall-good-more image{ + width: 100%; + vertical-align: middle; +} + +/* footer */ +.bag-footer{ position: fixed; bottom: 0; left: 0; width: 100%; padding: 20rpx 300rpx 20rpx 30rpx; box-sizing: border-box; border-top: solid 1rpx #f1f1f1; } +.bag-footer, .bag-header{ background: white; z-index: 9; } +.bag-footer-price{ font-size: 32rpx; font-weight: bold; } +.bag-footer-price text{ color: #da2b54; } +.bag-footer-rests{ color: #747788; font-size: 26rpx; } +.bag-footer-rests, +.bag-footer-price{ line-height: 40rpx; } +.bag-footer-btn[size="mini"]{ position: absolute; right: 30rpx; top: 20rpx; width: 240rpx; height: 80rpx; line-height: 80rpx; border-radius: 40rpx; background: #da2b54; color: white; font-size: 32rpx; } +.bag-footer-btn::after{ border: none; } + +/* checkbox */ +.checkbox{ height: 40rpx; width: 40rpx; line-height: 40rpx; display: inline-block; padding-top: 54rpx; padding-right: 30rpx; } +.checkbox.sellerCheckbox, +.checkbox.allCheckbox{ padding-top: 0; } +.checkbox.allCheckbox{ padding-right: 10rpx; } +.checkbox checkbox{ vertical-align: top; margin-top: -2rpx; } +.checkbox checkbox .wx-checkbox-input{ background: white; border-radius: 50%; border:solid 3rpx #464854; height: 34rpx; width: 34rpx; } +.checkbox checkbox .wx-checkbox-input.wx-checkbox-input-checked{ background: #da2b54; border-color: #da2b54; } +.checkbox checkbox .wx-checkbox-input.wx-checkbox-input-checked:before{ top: 18rpx; right: 5rpx; color: white; line-height: 34rpx; text-align: center; width: 36rpx; height: 36rpx; font-size:36rpx; } diff --git a/pages/mall/details/details.js b/pages/mall/details/details.js index 4f45342..86b661e 100644 --- a/pages/mall/details/details.js +++ b/pages/mall/details/details.js @@ -11,20 +11,21 @@ Page({ data: { isFixedTop : 0, barHeight : getApp().globalData.barHeight, // 状态栏高度 - goodsId : '', // 商品id - goodsData : '', // 商品数据 - mallContent : '', // 商品详情 - skus : [], // 显示的规格-提交 + goodsId : '', // 商品id + goodsData : '', // 商品数据 + mallContent : '', // 商品详情 + skus : [], // 显示的规格-提交 skuid : '', - specselect : '', // 确认购买的规格 - selectSkusValues: '', // 默认选项 - valueId : '', // 选中规格id - valueIndex : '', // 选中规格下标index + specselect : '', // 确认购买的规格 + selectSkusValues: '', // 默认选项 + valueId : '', // 选中规格id + valueIndex : '', // 选中规格下标index specselectIndex : '', - qtyNumber : 1, // 产品数量 + qtyNumber : 1, // 产品数量 goodsSize : false, invite : '', - isParent : false, // 绑定邀请码 + isParent : false, // 绑定邀请码 + buyType : null // 购物方式 }, /** @@ -34,7 +35,9 @@ Page({ this.setData({ goodsId: options.id, }) - getApp().globalData.invite = options.invite || '' + if(getApp().globalData.invite == '' && options.invite){ + getApp().globalData.invite = options.invite + } }, /** @@ -85,8 +88,8 @@ Page({ mask : true }) wx.request({ - // url : 'https://api.xhtest.douhuofalv.com/api/mall/goods/' + this.data.goodsId, - url : 'https://api.xuanhuojk.com/api/mall/goods/' + this.data.goodsId, + url : 'https://api.xhtest.douhuofalv.com/api/mall/goods/' + this.data.goodsId, + // url : 'https://api.xuanhuojk.com/api/mall/goods/' + this.data.goodsId, header : { "Accept" : "application/json", "channel" : "client", @@ -120,21 +123,6 @@ Page({ }) } }) - // wx.$api.mall.goodsSee(this.data.goodsId).then(res => { - // this.setData({ - // goodsData : res.data, - // mallContent : res.data.content.replace(/\{ - // console.log(err) - // }).finally(() => { - // wx.hideLoading() - // }) }, /** @@ -228,9 +216,10 @@ Page({ /** * 规格弹出 */ - buyPop() { + buyPop(e) { this.setData({ - goodsSize: !this.data.goodsSize + goodsSize : !this.data.goodsSize, + buyType : e.currentTarget.dataset.type }) }, @@ -239,52 +228,86 @@ Page({ */ closeTap() { this.setData({ - goodsSize: false + goodsSize: false, + buyType : null }) }, /** - * 确认购买 + * 检查登录状态 */ buyTap() { - // 获取登录状态 - if(wx.getStorageSync("token") != ''){ - let { - sku_id, - stock - } = this.data.selectSkusValues; - if (stock > 0) { - this.setData({ - skuid : sku_id, - goodsSize : false - }) - // 是否有推荐人 - if(this.data.goodsData.has_parent) { - wx.navigateTo({ - url: '/pages/mall/confirm/confirm?skuId=' + sku_id + '&qty=' + this.data.qtyNumber || 1 - }) - return - } - // 显示绑定手机号弹窗 - this.setData({ - isParent: true - }) - } else { - uni.showToast({ - title: '当前商品库存不足', - icon: 'none', - mask: true, - duration: 2000 - }) + let token = wx.getStorageSync("token") || null + if(token != null){ + switch (this.data.buyType) { + case 'card': + this.orderCard() + break; + default: + this.orderBuy() + break; } - }else{ - // 去登录 wx.navigateTo({ url: "/pages/login/index" }) } }, + /** + * 立即购买 + */ + orderBuy(){ + let { sku_id, stock } = this.data.selectSkusValues; + if (stock > 0) { + this.setData({ + skuid : sku_id, + goodsSize : false + }) + // 是否有推荐人 + if(this.data.goodsData.has_parent) { + wx.navigateTo({ + url: '/pages/mall/confirm/confirm?skuId=' + sku_id + '&qty=' + this.data.qtyNumber || 1 + }) + return + } + // 显示绑定手机号弹窗 + this.setData({ + isParent: true + }) + } else { + uni.showToast({ + title: '当前商品库存不足', + icon: 'none', + mask: true, + duration: 2000 + }) + } + }, + /** + * 加入购物车 + */ + orderCard(){ + let { sku_id, stock } = this.data.selectSkusValues; + let qty = this.data.qtyNumber || 1 + if (stock <= 0) { + uni.showToast({ + title: '当前商品库存不足', + icon : 'none', + }) + return + } + wx.showLoading({ + title: '加载中...', + mask : true + }) + wx.$api.bag.add({ sku_id, qty }).then(res => { + wx.showToast({ + title: "已加入", + icon: "success" + }) + this.closeTap() + }) + }, /** * 监听页面滑动事件 diff --git a/pages/mall/details/details.wxml b/pages/mall/details/details.wxml index fe50e2c..a7e8f46 100644 --- a/pages/mall/details/details.wxml +++ b/pages/mall/details/details.wxml @@ -53,23 +53,23 @@ - - ¥{{goodsData.original_price}} - - + + - - - - - - ¥{{selectSkusValues.price}} - 剩余库存: {{selectSkusValues.stock}} - 当前商品库存不足 + + + + + + + + {{selectSkusValues.price}} + 剩余库存: {{selectSkusValues.stock}} + {{item.name}} @@ -88,12 +88,13 @@ + - - - 抱歉,商品库存不足了 ~ - - - + + diff --git a/pages/mall/details/details.wxss b/pages/mall/details/details.wxss index ab3db16..f818ab4 100644 --- a/pages/mall/details/details.wxss +++ b/pages/mall/details/details.wxss @@ -48,7 +48,6 @@ page { height: 100%; } -/* 产品 */ /* 产品详情 */ .goodsCont { padding: 30rpx; @@ -206,82 +205,51 @@ button.goodsInfo-share[size="mini"] { /* 底部 */ .footer { width: 100%; - height: 60px; background-color: #ffffff; + border-top-right-radius: 40rpx; + border-top-left-radius: 40rpx; position: fixed; left: 0; bottom: 0; + padding: 30rpx 20rpx 50rpx; z-index: 9; box-sizing: border-box; display: flex; } -.number { - flex: 1; - line-height: 60px; - color: #da2b54; - display: flex; - padding: 0 30rpx; - box-sizing: border-box; -} - -.number text { - font-size: 28rpx; - padding-top: 10rpx; -} - -.number-price { - padding: 0 5rpx; - font-size: 46rpx; -} - -.number-vip { - margin-left: 20rpx; - font-size: 26rpx; - color: #8d97a1; - padding-top: 6rpx; - box-sizing: border-box; -} - -.btn-disabled { - color: #FFFFFF; - line-height: 60px; - text-align: center; - border: none; - border-radius:0; - background-color: #da2b54; - padding: 0; - margin: 0; -} - -button[disabled]{ - padding: 0; - padding: 0; - height: 100rpx; - line-height: 60px; - color: white !important; - opacity: .8; - background-color: transparent !important; -} +button.btn-disabled[size="mini"]{ line-height: 90rpx; border-radius: 45rpx; background: #da2b54; color: white; font-size: 30rpx; width: calc(50% - 20rpx); } +button.btn-disabled.card[size="mini"]{ background: orange; } /* 规格弹出 */ +.goods-size-back { position: fixed; top: 0; left: 0; height: 100%; width: 100%; background: rgba(0, 0, 0, 0.3); z-index: 9; display: none; } +.goods-size-back.active { display: block; } +.goods-size-content { position: fixed; bottom: -100%; left: 0; width: 100%; background: white; z-index: 100; transition: all 0.2s; border-radius: 40rpx 40rpx 0 0;} +.goods-size-content.active { bottom: 0; } -/* 规格 */ -.goods-size-back { - position: fixed; - top: 0; - left: 0; - height: 100%; - width: 100%; - background: rgba(0, 0, 0, 0.3); - z-index: 9; - display: none; -} +.goods-size-flex{ display: flex; justify-content: space-between; align-items: flex-end; padding: 30rpx; position: relative; } +.goods-size-cover{ background: #f7f8f9; width: 188rpx; height: 188rpx; border-radius: 20rpx; } +.goods-size-info{ width: calc(100% - 188rpx); padding-left: 30rpx; } +.goods-size-price{ font-size: 44rpx; font-weight: bold; color: #da2b54; line-height: 60rpx; } +.goods-size-price text{ font-size: 80%; } +.goods-size-text{ font-size: 28rpx; color: gray; line-height: 50rpx; } -.goods-size-back.active { - display: block; -} +.goods-size-remove{ position: absolute; right: 30rpx; top: 30rpx; padding: 10rpx; } +.goods-size-close{ width: 38rpx; height: 38rpx; vertical-align: top; } + +.goods-size-tag { padding: 0 30rpx 30rpx; } +.goods-size-tag-text { background: #f5f6fa; color: #999; line-height: 50rpx; margin: 20rpx 20rpx 0 0; padding: 0 15rpx; display: inline-block; font-size: 24rpx; border-radius: 10rpx; } +.goods-size-tag-text.active { color: #fff; background: #da2b54; } +.goods-size-title{ font-weight: bold; line-height: 50rpx; font-size: 30rpx; } + +.goods-size-number { color: #747788; display: flex; align-items: center; justify-content: space-between; padding: 30rpx; } +.goods-number { display: flex; height: 48rpx; border-radius: 10rpx; } +.goods-number-btn { background-color: #f7f8f9; width: 48rpx; height: 48rpx; line-height: 44rpx; text-align: center; border-radius: 24rpx; font-size: 30rpx; font-weight: bold; } +.goods-number-input { width: 80rpx; text-align: center; height: 48rpx; } + +.goods-size-btn{ padding: 30rpx 30rpx 50rpx; } +.goods-size-btn button[size="default"]{ background: #da2b54; color: white; line-height: 90rpx; padding: 0; border-radius: 45rpx; width: 100%; margin: 0; } +/* .goods-size-content { position: fixed; @@ -300,9 +268,7 @@ button[disabled]{ top: 30rpx; } -.goods-size-content.active { - bottom: 0; -} + .goods-size-img { position: absolute; @@ -353,56 +319,7 @@ button[disabled]{ font-size: 26rpx; } -.goods-size-tag { - padding: 0 20rpx 20rpx 20rpx; -} -.goods-size-tag-text { - background: #f5f6fa; - color: #999; - margin: 20rpx 10rpx 0 10rpx; - line-height: 50rpx; - padding: 0 15rpx; - display: inline-block; - font-size: 24rpx; - border-radius: 10rpx; -} - -.goods-size-tag-text.active { - color: #fff; - background: #da2b54; -} - -.goods-size-number { - padding: 10rpx 30rpx 80rpx 30rpx; - line-height: 60rpx; - color: #747788; -} - -.goods-number { - display: flex; - float: right; - margin-top: 25rpx; - height: 48rpx; - border: 2rpx solid #d7d7d7; - border-radius: 10rpx; -} - -.goods-number-btn { - background-color: transparent; - width: 48rpx; - height: 48rpx; - line-height: 48rpx; - text-align: center; -} - -.goods-number-input { - width: 80rpx; - text-align: center; - height: 48rpx; - border-left: 2rpx solid #d7d7d7; - border-right: 2rpx solid #d7d7d7; -} .goods-size-btn button[size="default"] { text-align: center; @@ -418,7 +335,7 @@ button[disabled]{ .goods-size-btn view.active { background: #b8b8b8; -} +} */ /* 邀请码弹出 */ diff --git a/project.private.config.json b/project.private.config.json index 5a1307e..9cb3045 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -8,6 +8,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "购物车", + "pathName": "pages/bag/bag", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "朋友圈进入详情", "pathName": "pages/mall/details/details", diff --git a/static/icons/bag_more_icon.png b/static/icons/bag_more_icon.png new file mode 100644 index 0000000..47344e8 Binary files /dev/null and b/static/icons/bag_more_icon.png differ diff --git a/static/icons/mobile_icon.png b/static/icons/mobile_icon.png new file mode 100644 index 0000000..66d6857 Binary files /dev/null and b/static/icons/mobile_icon.png differ diff --git a/static/icons/null_icon.png b/static/icons/null_icon.png new file mode 100644 index 0000000..ea1f6a6 Binary files /dev/null and b/static/icons/null_icon.png differ