From 8aa6643476e8996ccd4836d464dbca2c996f78ef Mon Sep 17 00:00:00 2001 From: gooking Date: Sun, 29 Dec 2019 10:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 37 ++++-------- app.json | 5 +- pages/index/index.js | 51 ++++++----------- pages/index/index.wxml | 109 +++++++++++++++--------------------- pages/index/index.wxss | 121 ++++++++++++++++++++++++++++------------ pages/notice/index.js | 24 ++++++++ pages/notice/index.json | 3 + pages/notice/index.wxml | 9 +++ pages/notice/index.wxss | 60 ++++++++++++++++++++ 9 files changed, 255 insertions(+), 164 deletions(-) create mode 100644 pages/notice/index.js create mode 100644 pages/notice/index.json create mode 100644 pages/notice/index.wxml create mode 100644 pages/notice/index.wxss diff --git a/README.md b/README.md index 56c8e28c..21f2f433 100644 --- a/README.md +++ b/README.md @@ -74,18 +74,14 @@ thirdScriptError ```javascript module.exports = { - version: "5.0", - note: "优化接口调用流程", + version: "7.4.0", + note: '内页增加快速浮动导航、我的页面UI优化', subDomain: "tz", // 根据教程 https://www.yuque.com/apifm/doc/qr6l4m 查看你自己的 subDomain appid: "wxa46b09d413fbcaff", // 您的小程序的appid,购物单功能需要使用 - shareProfile: "百款精品商品,总有一款适合您" // 首页转发的时候话术 -}; -/* -根据自己需要修改下单时候的模板消息内容设置,可增加关闭订单、收货时候模板消息提醒; -1、/pages/to-pay-order/index.js 中已添加关闭订单、商家发货后提醒消费者; -2、/pages/order-details/index.js 中已添加用户确认收货后提供用户参与评价;评价后提醒消费者好评奖励积分已到账; -3、请自行修改上面几处的模板消息ID,参数为您自己的变量设置即可。 -*/ + shareProfile: '百款精品商品,总有一款适合您', // 首页转发的时候话术 + kanjiaRequirePlayAd: true, // 是否必须要观看视频广告后才可以砍价 + goodsDetailSkuShowType: 0, // 0 为点击立即购买按钮后出现规格尺寸、数量的选择; 1为直接在商品详情页面显示规格尺寸、数量的选择,而不弹框 +} ``` 4、[设置小程序合法服务器域名](https://www.yuque.com/apifm/doc/tvpou9) @@ -96,9 +92,9 @@ module.exports = { ``` 这两个功能都是使用后台 “系统设置” --> “banner” 管理功能来实现的; -后台发布banner的时候,自定义类型请分别填写 app 和 new +后台发布banner的时候,自定义类型请分别填写 app 和 index 小程序会自动读取类型为 app 的banner图片作为启动展示图片; -小程序会自动读取类型为 new 的banner图片作为首页分类下的轮播图; +小程序会自动读取类型为 index 的banner图片作为首页的轮播图; ``` 7、订阅消息(以前的模板消息)如何使用?请查阅 “api工厂” 的教程: @@ -213,21 +209,6 @@ module.exports = { 1. 创建订单接口增加 expireMinutes 参数; 2. 代表多少分钟未支付自动关闭本订单,传 0 不自动关闭订单; -- 我没有那么多分类,首页2行分类能否改成1行? - - 打开 /pages/index/index.js 文件,找到下图所示位置,代码 - - ```js - // 这行代码为显示2行 - const _n = Math.ceil(categories.length / 2) - // 这行代码为显示1行 - const _n = Math.ceil(categories.length) - ``` - - - -- [更多问题?](https://www.yuque.com/apifm/doc) - - 如何删除小程序源码中的广告位? 1. 在小程序开发工具中全局搜索关键词: + + {{item.name}} + + + - - - - - - - - - - - - - + + + {{item.name}} + 更多 > - - - - - - - {{item.title}} - - - - - - - - - - {{item.name}} - + {{item.name}} + + ¥ {{item.minPrice}} + ¥ {{item.originalPrice}} - - - - - - - - - + + 爆品推荐 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 1290b2cb..5bb356a7 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,3 +1,66 @@ +.search { + position: absolute; + top: 32rpx; + left: 25rpx; + width: 700rpx; + height: 66rpx; + display: block; + box-sizing: border-box; +} +.search input { + display: block; + box-sizing: border-box; + background: #fff; + border: 1rpx solid #e3e3e3; + width: 700rpx; + height: 66rpx; + border-radius: 30rpx; + padding-left: 32rpx; +} +.search image { + width: 35rpx; + height: 35rpx; + position: absolute; + top: 16rpx; + right: 32rpx; +} +.notice-box { + display: flex; + box-sizing: border-box; + width: 100vw; + height: 88rpx; + line-height: 88rpx; + justify-content: space-between; + align-items: center; + padding-right: 32rpx; + border-bottom: 1rpx solid #efeff4; +} +.notice{ + display: flex; + justify-content: space-between; + align-items: center; + width: 600rpx; +} +.notice_icon { + margin-left:20rpx; + width:30rpx; + height:30rpx; +} +.notice_swiper{ + height: 88rpx; + width: 600rpx; +} +.notice_itemr { + padding-left: 16rpx; + font-size: 24rpx; + overflow: hidden; + color: #e64340; +} +.notice-box .more { + color: #666; + font-size: 24rpx; +} + .container { background-color: #fff; min-height: 100%; @@ -5,7 +68,8 @@ } .category-box { background-color: #fff; - clear: both; + display: flex; + flex-wrap: wrap; } .category-list{ width:150rpx; @@ -32,16 +96,16 @@ .swiper-container{ width: 750rpx; + height: 375rpx; position: relative; } -.swiper_box { +.swiper-container swiper { width: 750rpx; - height:250rpx; + height: 375rpx; } - -swiper-item image { +.swiper-container swiper image { width: 750rpx; - height:250rpx; + height: 375rpx; } ::-webkit-scrollbar { width: 0; @@ -98,37 +162,7 @@ swiper-item image { color:#e64340; margin-left: 24rpx; } -.notice{ - display: flex; - justify-content: space-between; - flex-wrap:wrap; - height: 80rpx; - line-height: 80rpx; - width: 750rpx; - margin-top: 10rpx; - background-color: #fff; - border-bottom: 1rpx solid #efeff4; -} -.notice_icon { - margin-top: 25rpx; - margin-left:20rpx; - width:30rpx; - height:30rpx; -} -.notice_swiper{ - height: 80rpx; - line-height: 80rpx; - width: 680rpx; -} -.notice_itemr { - padding-left: 10rpx; - font-size: 24rpx; - overflow: hidden; - color: #e64340; - width: 680rpx; - height: 80rpx; - line-height: 80rpx; -} + .pos-fiexd{ position: fixed; top: 0; @@ -224,4 +258,17 @@ swiper-item image { position: absolute; right:30rpx; bottom: 10rpx; +} +.category-goods-title { + width: 100vw; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8rpx; + border-bottom: 1rpx solid #efeff4; +} +.category-goods-title .more { + color: #666; + font-size: 24rpx; + margin-right: 32rpx; } \ No newline at end of file diff --git a/pages/notice/index.js b/pages/notice/index.js new file mode 100644 index 00000000..49d3bd3e --- /dev/null +++ b/pages/notice/index.js @@ -0,0 +1,24 @@ +const WXAPI = require('apifm-wxapi') +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + WXAPI.noticeList().then(res => { + this.setData({ + noticeList: res.data.dataList + }) + }) + }, + onShow: function () { + + }, +}) \ No newline at end of file diff --git a/pages/notice/index.json b/pages/notice/index.json new file mode 100644 index 00000000..65ccba13 --- /dev/null +++ b/pages/notice/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "公告" +} \ No newline at end of file diff --git a/pages/notice/index.wxml b/pages/notice/index.wxml new file mode 100644 index 00000000..bff483e9 --- /dev/null +++ b/pages/notice/index.wxml @@ -0,0 +1,9 @@ + + + + {{item.title}} + {{ item.dateAdd }} + + 查看 > + + \ No newline at end of file diff --git a/pages/notice/index.wxss b/pages/notice/index.wxss new file mode 100644 index 00000000..000f2e0c --- /dev/null +++ b/pages/notice/index.wxss @@ -0,0 +1,60 @@ +page { + background-color: #f3f4f5; +} +.no-order { + margin-top: 96rpx; + display: flex; + flex-direction: column; + align-items: center; +} + +.no-order image { + width: 294rpx; + height: 310rpx; +} + +.no-order view { + margin-top: 30rpx; + font-family: PingFangSC-Medium; + font-size: 30rpx; + color: #333; + letter-spacing: 0; +} + +.cashlogs { + width: 702rpx; + margin-top: 24rpx; + margin-left: 24rpx; + height: 148rpx; + background: #FFFFFF; + box-shadow: 0 0 16rpx 0 rgba(36,44,69,0.20); + border-radius: 8rpx; + + display: flex; + justify-content: space-between; + align-items: center; +} +.cashlogs .profile { + display: flex; + flex-direction: column; + margin-left: 24rpx; +} +.cashlogs .amount { + font-size: 24rpx; + color: #FEB21C; + margin-right: 24rpx; + flex-shrink: 0; +} +.cashlogs .profile .typeStr { + font-size: 30rpx; + color: #333333; +} +.cashlogs .profile .dateAdd { + margin-top: 16rpx; + font-size: 24rpx; + color: #999999; +} +.bottom { + width: 100vw; + height: 24rpx; +} \ No newline at end of file