From c4bf7823a5c7b8ea54b27b6fe81ae19f01461be4 Mon Sep 17 00:00:00 2001 From: taiyuan Date: Thu, 15 Oct 2020 11:02:20 +0800 Subject: [PATCH] 商品分享 --- packageA/pages/goods_share/goods_share.js | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ packageA/pages/goods_share/goods_share.json | 6 ++++++ packageA/pages/goods_share/goods_share.wxml | 38 ++++++++++++++++++++++++++++++++++++++ packageA/pages/goods_share/goods_share.wxss | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 246 insertions(+), 0 deletions(-) create mode 100644 packageA/pages/goods_share/goods_share.js create mode 100644 packageA/pages/goods_share/goods_share.json create mode 100644 packageA/pages/goods_share/goods_share.wxml create mode 100644 packageA/pages/goods_share/goods_share.wxss diff --git a/packageA/pages/goods_share/goods_share.js b/packageA/pages/goods_share/goods_share.js new file mode 100644 index 0000000..564968b --- /dev/null +++ b/packageA/pages/goods_share/goods_share.js @@ -0,0 +1,93 @@ +// packageA//pages/goods_share/goods_share.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + // 控制价格 + active1: false, + // 控制佣金 + active2: false, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + // onPullDownRefresh: function () { + + // }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + // 点击价格排序 + sort1() { + if(this.data.active2) { + this.setData({ + active2: !this.data.active2 + }); + }; + this.setData({ + active1: !this.data.active1 + }); + + }, + // 点击佣金排序 + sort2() { + if(this.data.active1) { + this.setData({ + active1: !this.data.active1 + }); + }; + this.setData({ + active2: !this.data.active2 + }); + }, +}) \ No newline at end of file diff --git a/packageA/pages/goods_share/goods_share.json b/packageA/pages/goods_share/goods_share.json new file mode 100644 index 0000000..0ad7ff9 --- /dev/null +++ b/packageA/pages/goods_share/goods_share.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "nodata": "/components/nodata/nodata" + }, + "enablePullDownRefresh": false +} \ No newline at end of file diff --git a/packageA/pages/goods_share/goods_share.wxml b/packageA/pages/goods_share/goods_share.wxml new file mode 100644 index 0000000..86e304b --- /dev/null +++ b/packageA/pages/goods_share/goods_share.wxml @@ -0,0 +1,38 @@ + + + + + 搜索 + + + + + + 销量 + 价格 + 佣金 + 最新 + + + + 暂无数据 + + + + 商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称 + ¥200.00 + + 已售:3 + 分成金额:¥21 + + 分享 + + + - 已全部加载 - + + + diff --git a/packageA/pages/goods_share/goods_share.wxss b/packageA/pages/goods_share/goods_share.wxss new file mode 100644 index 0000000..b228d1e --- /dev/null +++ b/packageA/pages/goods_share/goods_share.wxss @@ -0,0 +1,109 @@ +/* packageA//pages/goods_share/goods_share.wxss */ +.red { + color: #FE6867; +} +.gray { + color: #7b7b7b; +} +page { + background-color: #f2f2f2; + height: 100%; +} +.container { + background-color: white; + height: 100%; +} +.search-container { + display: flex; + padding: 26rpx 20rpx; + border-bottom: 2rpx solid #f8f8f8; +} +.input-container { + flex: 1; + border-radius: 6rpx 0 0 6rpx; + overflow: hidden; +} +.search { + background-color: #f0f0f0; + padding: 10rpx 20rpx; + font-size: 28rpx; +} +.btn-search { + background-color: #FE6867; + color: white; + padding: 0 30rpx; + display: flex; + align-items: center; + border-radius: 0 6rpx 6rpx 0; +} +.title { + display: flex; + font-size: 30rpx; + border-bottom: 2rpx solid #f8f8f8; +} +.title .iconfont { + color: #ccc; + font-size: 16rpx; + margin-left: 8rpx; +} +.title-item { + width: 25%; + box-sizing: border-box; + text-align: center; + padding: 20rpx; +} +.list-container { + height: calc(100% - 118rpx); +} +.list { + height: calc(100% - 82rpx); + background-color: #f2f2f2; +} +.list-item { + display: flex; + padding: 20rpx; + border-bottom: 2rpx solid #f8f8f8; + background-color: white; +} +.img-container { + background-color: #f0f0f0; + width: 280rpx; + height: 248rpx; + display: flex; + align-items: center; + justify-content: center; +} +.img-container:after { + font-family: iconfont; + content: '\e8c1'; + color: #bbb; + font-size: 80rpx; +} +.details { + flex: 1; + padding-left: 20rpx; +} +.btn-share { + display: inline-block; + background-color: #FE6867; + color: white; + padding: 8rpx 30rpx; + border-radius: 6rpx; +} +.pdt14 { + padding-top: 14rpx; +} + +.no-more { + line-height: 3; + color: #ccc; + background-color: #f2f2f2; +} +.nodata { + text-align: center; + background-color: #f2f2f2; +} + +.name { + height: 76rpx; +} -- libgit2 0.21.4