Repository: HunterXuan/E-Coupon Branch: master Commit: 7b86a067d54f Files: 51 Total size: 56.4 KB Directory structure: gitextract_pp4knu2e/ ├── .gitignore ├── LICENSE ├── README.md ├── cloudfunctions/ │ ├── getCouponList/ │ │ ├── index.js │ │ └── package.json │ ├── getExtConf/ │ │ ├── index.js │ │ └── package.json │ ├── getHotList/ │ │ ├── index.js │ │ └── package.json │ ├── getNineNineList/ │ │ ├── index.js │ │ └── package.json │ ├── getSearchList/ │ │ ├── index.js │ │ └── package.json │ ├── getTimeList/ │ │ ├── index.js │ │ └── package.json │ └── getTpwd/ │ ├── index.js │ └── package.json └── miniprogram/ ├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── app.json ├── app.wxss └── pages/ ├── detail/ │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ └── detail.wxss ├── favour/ │ ├── favour.js │ ├── favour.json │ ├── favour.wxml │ └── favour.wxss ├── hot/ │ ├── hot.js │ ├── hot.json │ ├── hot.wxml │ └── hot.wxss ├── index/ │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── ninenine/ │ ├── ninenine.js │ ├── ninenine.json │ ├── ninenine.wxml │ └── ninenine.wxss ├── search/ │ ├── search.js │ ├── search.json │ ├── search.wxml │ └── search.wxss └── time/ ├── time.js ├── time.json ├── time.wxml └── time.wxss ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # nyc test coverage .nyc_output # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env # next.js build output .next ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 HunterX Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # E-Coupon 一个简单的领优惠券小程序: 1. 数据来源于「淘客助手API」 2. 使用「淘宝官方API」生成「淘口令」 3. 前端基于 Vant-Weapp 开发 4. 后端利用了小程序的新功能「云开发」 # 演示效果 ![](https://github.com/HunterXuan/E-Coupon/blob/master/demo.gif) # 可改进项 1. 小程序应用内缓存数据,加快加载速度 2. 整合两个API,统一数据获取源 ================================================ FILE: cloudfunctions/getCouponList/index.js ================================================ // 获取优惠券列表 const cloud = require('wx-server-sdk') const request = require('request') const util = require('util') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) return new Promise((resolve, reject) => { let urlTpl = 'https://api.taokezhushou.com/api/v1/search?app_key=%s&cate_id=%s&sort=%s&page=%s' request(util.format( urlTpl, config.result.TKZS_APP_KEY, event.category, event.sort, event.page), function (error, response, body) { if (!error && response.statusCode == 200) { let responseBody = JSON.parse(body) let result = [] responseBody.data.forEach(function (v, i, a) { result.push({ itemId: v.goods_id, title: v.goods_title, shortTitle: v.goods_short_title, picUrl: v.goods_pic, longPicUrl: v.goods_long_pic, introduction: v.goods_intro, originalPrice: parseFloat(v.goods_price).toFixed(1), presentPrice: (parseFloat(v.goods_price) - parseFloat(v.coupon_amount)).toFixed(1), saleCount: parseInt(v.goods_sale_num), couponId: v.coupon_id, couponApplyPrice: parseFloat(v.coupon_apply_amount).toFixed(1), couponPrice: parseInt(v.coupon_amount), couponStartTime: v.coupon_start_time.slice(0, 10), couponEndTime: v.coupon_end_time.slice(0, 10), isTmall: v.is_tmall, isJHS: v.juhuasuan, isTQG: v.taoqianggou }) }) resolve(result) } else { reject() } }) }) } ================================================ FILE: cloudfunctions/getCouponList/package.json ================================================ { "name": "getCouponList", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getExtConf/index.js ================================================ // 接口相关配置 const cloud = require('wx-server-sdk') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { return { 'APP_KEY': 'APP_KEY', // 淘宝客 APP KEY 'APP_SEC': 'APP_SEC', // 淘宝客 APP SECRECT 'APP_URL': 'http://gw.api.taobao.com/router/rest', // 淘宝客 API 地址 'APP_DE_PID': 'mm_XXXXXXXXX_YYYYYYYYY_ZZZZZZZZZ', // 桌面端推广位 PID 'APP_MO_PID': 'mm_XXXXXXXXX_YYYYYYYYY_ZZZZZZZZZ', // 移动端推广位 PID 'APP_DE_ZID': 'ZZZZZZZZZ', // 桌面端 ZONE ID,即桌面端推广位 PID 最后一段数字 'APP_MO_ZID': 'ZZZZZZZZZ', // 移动端 ZONE ID,即移动端推广位 PID 最后一段数字 'TKZS_APP_KEY': 'TKZS_APP_KEY' // 淘客助手 APP KEY } } ================================================ FILE: cloudfunctions/getExtConf/package.json ================================================ { "name": "getExtConf", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getHotList/index.js ================================================ // 云函数入口文件 const cloud = require('wx-server-sdk') const request = require('request') const util = require('util') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) return new Promise((resolve, reject) => { let urlTpl = 'https://api.taokezhushou.com/api/v1/top_hour?app_key=%s&page=%s' request(util.format( urlTpl, config.result.TKZS_APP_KEY, event.page), function (error, response, body) { if (!error && response.statusCode == 200) { let responseBody = JSON.parse(body) let result = [] responseBody.data.forEach(function (v, i, a) { result.push({ itemId: v.goods_id, title: v.goods_title, shortTitle: v.goods_short_title, picUrl: v.goods_pic, longPicUrl: v.goods_long_pic, introduction: v.goods_intro, originalPrice: parseFloat(v.goods_price).toFixed(1), presentPrice: (parseFloat(v.goods_price) - parseFloat(v.coupon_amount)).toFixed(1), saleCount: parseInt(v.goods_sale_num), couponId: v.coupon_id, couponApplyPrice: parseFloat(v.coupon_apply_amount).toFixed(1), couponPrice: parseInt(v.coupon_amount), couponStartTime: v.coupon_start_time.slice(0, 10), couponEndTime: v.coupon_end_time.slice(0, 10), isTmall: v.is_tmall, isJHS: v.juhuasuan, isTQG: v.taoqianggou }) }) resolve(result) } else { reject() } }) }) } ================================================ FILE: cloudfunctions/getHotList/package.json ================================================ { "name": "getHotList", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getNineNineList/index.js ================================================ // 云函数入口文件 const cloud = require('wx-server-sdk') const request = require('request') const util = require('util') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) return new Promise((resolve, reject) => { let urlTpl = 'https://api.taokezhushou.com/api/v1/search?app_key=%s&page=%s&price_end=10' request(util.format( urlTpl, config.result.TKZS_APP_KEY, event.page), function (error, response, body) { if (!error && response.statusCode == 200) { let responseBody = JSON.parse(body) let result = [] responseBody.data.forEach(function (v, i, a) { result.push({ itemId: v.goods_id, title: v.goods_title, shortTitle: v.goods_short_title, picUrl: v.goods_pic, longPicUrl: v.goods_long_pic, introduction: v.goods_intro, originalPrice: parseFloat(v.goods_price).toFixed(1), presentPrice: (parseFloat(v.goods_price) - parseFloat(v.coupon_amount)).toFixed(1), saleCount: parseInt(v.goods_sale_num), couponId: v.coupon_id, couponApplyPrice: parseFloat(v.coupon_apply_amount).toFixed(1), couponPrice: parseInt(v.coupon_amount), couponStartTime: v.coupon_start_time.slice(0, 10), couponEndTime: v.coupon_end_time.slice(0, 10), isTmall: v.is_tmall, isJHS: v.juhuasuan, isTQG: v.taoqianggou }) }) resolve(result) } else { reject() } }) }) } ================================================ FILE: cloudfunctions/getNineNineList/package.json ================================================ { "name": "getNineNineList", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "request": "^2.88.0", "topsdk": "^1.0.10", "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getSearchList/index.js ================================================ // 获取优惠券列表 const cloud = require('wx-server-sdk') const request = require('request') const util = require('util') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) return new Promise((resolve, reject) => { let urlTpl = 'https://api.taokezhushou.com/api/v1/search?app_key=%s&q=%s&page=%s' request(encodeURI(util.format( urlTpl, config.result.TKZS_APP_KEY, event.query, event.page)), function (error, response, body) { if (!error && response.statusCode == 200) { let responseBody = JSON.parse(body) let result = [] responseBody.data.forEach(function (v, i, a) { result.push({ itemId: v.goods_id, title: v.goods_title, shortTitle: v.goods_short_title, picUrl: v.goods_pic, longPicUrl: v.goods_long_pic, introduction: v.goods_intro, originalPrice: parseFloat(v.goods_price).toFixed(1), presentPrice: (parseFloat(v.goods_price) - parseFloat(v.coupon_amount)).toFixed(1), saleCount: parseInt(v.goods_sale_num), couponId: v.coupon_id, couponApplyPrice: parseFloat(v.coupon_apply_amount).toFixed(1), couponPrice: parseInt(v.coupon_amount), couponStartTime: v.coupon_start_time.slice(0, 10), couponEndTime: v.coupon_end_time.slice(0, 10), isTmall: v.is_tmall, isJHS: v.juhuasuan, isTQG: v.taoqianggou }) }) resolve(result) } else { reject() } }) }) } ================================================ FILE: cloudfunctions/getSearchList/package.json ================================================ { "name": "getSearchList", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getTimeList/index.js ================================================ // 云函数入口文件 const cloud = require('wx-server-sdk') const request = require('request') const util = require('util') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) return new Promise((resolve, reject) => { let urlTpl = 'https://api.taokezhushou.com/api/v1/search?app_key=%s&page=%s&taoqianggou=1' request(util.format( urlTpl, config.result.TKZS_APP_KEY, event.page), function (error, response, body) { if (!error && response.statusCode == 200) { let responseBody = JSON.parse(body) let result = [] responseBody.data.forEach(function (v, i, a) { result.push({ itemId: v.goods_id, title: v.goods_title, shortTitle: v.goods_short_title, picUrl: v.goods_pic, longPicUrl: v.goods_long_pic, introduction: v.goods_intro, originalPrice: parseFloat(v.goods_price).toFixed(1), presentPrice: (parseFloat(v.goods_price) - parseFloat(v.coupon_amount)).toFixed(1), saleCount: parseInt(v.goods_sale_num), couponId: v.coupon_id, couponApplyPrice: parseFloat(v.coupon_apply_amount).toFixed(1), couponPrice: parseInt(v.coupon_amount), couponStartTime: v.coupon_start_time.slice(0, 10), couponEndTime: v.coupon_end_time.slice(0, 10), isTmall: v.is_tmall, isJHS: v.juhuasuan, isTQG: v.taoqianggou }) }) resolve(result) } else { reject() } }) }) } ================================================ FILE: cloudfunctions/getTimeList/package.json ================================================ { "name": "getTimeList", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "wx-server-sdk": "latest" } } ================================================ FILE: cloudfunctions/getTpwd/index.js ================================================ // 云函数入口文件 const cloud = require('wx-server-sdk') const util = require('util') const TopClient = require('topsdk') cloud.init() // 云函数入口函数 exports.main = async (event, context) => { const config = await cloud.callFunction({ name: 'getExtConf' }) const client = new TopClient( config.result.APP_KEY, config.result.APP_SEC, config.result.APP_URL ) let urlTpl = 'https://uland.taobao.com/coupon/edetail?activityId=%s&pid=%s&itemId=%s' return new Promise((resolve, reject) => { client.execute('taobao.tbk.tpwd.create', { 'text': event.title, 'logo': event.picUrl, 'url': util.format( urlTpl, event.couponId, config.result.APP_MO_PID, event.itemId ) }, function (error, response) { if (!error && response) { resolve(response) } }) }) } ================================================ FILE: cloudfunctions/getTpwd/package.json ================================================ { "name": "getTpwd", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "topsdk": "^1.0.10", "wx-server-sdk": "latest" } } ================================================ FILE: miniprogram/.gitignore ================================================ project.config.json ================================================ FILE: miniprogram/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: miniprogram/README.md ================================================ ## 优惠券小程序 ## 效果 ![演示](coupon.gif) ### 使用方法 git clone https://github.com/AmateurEvents/coupon.git cd coupon #### 无服务端 * 下载微信开发者工具 * 打开项目 #### 有服务端版 * 申请小程序 * 填写AppID * 搭建服务端 * 打开小程序 ### 待做 * 服务端接口完善 * 获取商品详情 * 获取商品推荐理由 * .... ### 交流(感兴趣的可加qq) ![交流](qq.jpeg) ================================================ FILE: miniprogram/app.js ================================================ App({ onLaunch: function () { wx.clearStorageSync(); if (!wx.cloud) { console.error('请使用 2.2.3 或以上的基础库以使用云能力') } else { wx.cloud.init({ traceUser: true, }) } }, globalData: { } }) ================================================ FILE: miniprogram/app.json ================================================ { "pages": [ "pages/favour/favour", "pages/index/index", "pages/ninenine/ninenine", "pages/search/search", "pages/time/time", "pages/hot/hot", "pages/detail/detail" ], "window": { "backgroundTextStyle": "dark", "backgroundColor": "#f7f7f7", "navigationBarBackgroundColor": "#ff6666", "navigationBarTitleText": "一点优惠", "navigationBarTextStyle": "#fff" }, "tabBar": { "color": "#999", "selectedColor": "#ff6666", "backgroundColor": "#f7f7f7", "borderStyle": "black", "list": [ { "pagePath": "pages/favour/favour", "text": "首页", "iconPath": "images/favour.png", "selectedIconPath": "images/favour-on.png" }, { "pagePath": "pages/ninenine/ninenine", "text": "9.9包邮", "iconPath": "images/99.png", "selectedIconPath": "images/99-on.png" }, { "pagePath": "pages/search/search", "text": "超级搜", "iconPath": "images/search.png", "selectedIconPath": "images/search-on.png" }, { "pagePath": "pages/time/time", "text": "淘抢购", "iconPath": "images/time.png", "selectedIconPath": "images/time-on.png" }, { "pagePath": "pages/hot/hot", "text": "热销", "iconPath": "images/hot.png", "selectedIconPath": "images/hot-on.png" } ] } } ================================================ FILE: miniprogram/app.wxss ================================================ @import "miniprogram_npm/vant-weapp/common/index.wxss"; .top-search-bar .van-search { background-color: #ff6666 !important; } ================================================ FILE: miniprogram/pages/detail/detail.js ================================================ var app = getApp() Page({ data: { couponInfo: {}, picWidth: wx.getSystemInfoSync().windowWidth, showTpwdDialog: false, tpwd: "", hasTpwd: false }, onShow: function () { wx.setStorageSync('isDetailBack', true) }, onLoad: function (options) { this.setData({ couponInfo: wx.getStorageSync('couponInfo') }) this.setTpwd() }, showTpwd: function () { this.setData({ showTpwdDialog: true }) }, setTpwd: function () { if (this.data.tpwd == '') { let that = this wx.cloud.callFunction({ name: 'getTpwd', data: { 'title': that.data.couponInfo.title, 'picUrl': that.data.couponInfo.picUrl, 'couponId': that.data.couponInfo.couponId, 'itemId': that.data.couponInfo.itemId }, success: (response) => { that.setData({ tpwd: response.result.data.model, hasTpwd: true }) } }) } }, copyTpwd: function () { wx.setClipboardData({ data: this.data.tpwd, success: (res) => { wx.showToast({ title: '复制成功', }) } }) } }) ================================================ FILE: miniprogram/pages/detail/detail.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-submit-bar": "../../../miniprogram_npm/vant-weapp/submit-bar/index", "van-dialog": "../../../miniprogram_npm/vant-weapp/dialog/index" } } ================================================ FILE: miniprogram/pages/detail/detail.wxml ================================================ {{couponInfo.title}} 现价¥{{couponInfo.originalPrice}} 已售 {{couponInfo.saleCount}} 件 券后价¥{{ couponInfo.presentPrice }} {{ couponInfo.isTmall ? "天猫" : (couponInfo.isTQG ? "淘抢购" : (couponInfo.isJHS ? "聚划算" : "淘宝")) }} {{ couponInfo.couponPrice }} 元优惠券 使用期限: {{ couponInfo.couponStartTime }} - {{ couponInfo.couponEndTime }} {{ couponInfo.introduction }} 复制框内整段文字,打开「手机淘宝」即可领券购买。{{ tpwd }} ================================================ FILE: miniprogram/pages/detail/detail.wxss ================================================ .page_bd { padding: 0 12px 50px 12px; } .original-price { color: #999; font-size: 12px; text-decoration: line-through; } .present-price { color: #ff6666; font-size: 12px; } .present-price-num { font-size: 18px; } .sale-count-text { color: #999; font-size: 12px; } .coupon-time-row { color: #fff; font-size: 12px; padding: 10px; margin: 10px 0; outline: 2px solid #fff; outline-offset: -5px; background-color: #ff6666; } .coupon-intro-row { font-size: 12px; padding: 10px; margin: 0 0 10px 0; border: 1px dashed #999; } .coupon-intro-pic-row { box-shadow: 1px 10px 5px #999; } .coupon-tpwd-text { font-size: 14px; padding: 10px; margin: 5px; border: 1px dashed #999; } .text-center { text-align: center; } .text-right { text-align: right; } ================================================ FILE: miniprogram/pages/favour/favour.js ================================================ let app = getApp() Page({ data: { sortByList: [], categoryList: [], couponList: [], selectedSortIndex: 0, selectedCatIndex: 0, pageIndex: 1 }, onLoad: function (options) { this.setSortByList() this.setCategoryList() }, onShow: function () { if (wx.getStorageSync('isDetailBack')) { wx.removeStorageSync('isDetailBack') return } this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: wx.getStorageSync('selectedSortIndex'), selectedCatIndex: wx.getStorageSync('selectedCatIndex') }) this.getMoreCouponList() }, // 设置排序列表 setSortByList: function () { this.setData({ sortByList: [ { key: "", name: "综合" }, { key: "new", name: "最新券" }, { key: "price_asc", name: "最优惠" }, { key: "sale_num", name: "最畅销" } ], selectedSortIndex: 0 }) }, // 获取商品分类 setCategoryList: function () { let categoryList = [ { id: "", name: "全部分类" }, { id: "1", name: "女装" }, { id: "2", name: "男装" }, { id: "3", name: "内衣" }, { id: "4", name: "数码家电" }, { id: "5", name: "美食" }, { id: "6", name: "美妆个护" }, { id: "7", name: "母婴" }, { id: "8", name: "鞋包配饰" }, { id: "9", name: "家居家装" }, { id: "10", name: "文体车品" }, { id: "11", name: "其它" } ] this.setData({ categoryList: categoryList, selectedCatIndex: 0 }) }, getMoreCouponList: function () { var that = this wx.showLoading({ title: '加载中', }) wx.cloud.callFunction({ name: 'getCouponList', data: { 'category': that.data.selectedCatIndex ? that.data.categoryList[that.data.selectedCatIndex].id : '', 'sort': that.data.selectedSortIndex ? that.data.sortByList[that.data.selectedSortIndex].key : '', 'page': that.data.pageIndex }, success: response => { that.setData({ couponList: that.data.couponList.concat(response.result) }, () => { wx.hideLoading() }) } }) }, sortByChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: e.detail.index, }) this.getMoreCouponList() wx.setStorageSync('selectedSortIndex', e.detail.index) }, categoryChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedCatIndex: e.detail.value, }) this.getMoreCouponList() wx.setStorageSync('selectedCatIndex', e.detail.value) }, jumpToSearch: function (e) { wx.switchTab({ url: '../search/search', }) }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, onPullDownRefresh: function () { this.setData({ couponList: [], pageIndex: 1 }) wx.stopPullDownRefresh() this.getMoreCouponList() }, onReachBottom: function () { this.setData({ pageIndex: this.data.pageIndex + 1 }) this.getMoreCouponList() } }) ================================================ FILE: miniprogram/pages/favour/favour.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-icon": "../../../miniprogram_npm/vant-weapp/icon/index" } } ================================================ FILE: miniprogram/pages/favour/favour.wxml ================================================ {{ item.shortTitle }} 热销 {{ item.saleCount }} 件 现价¥{{ item.originalPrice }} {{item.couponPrice}} 元 券后价{{ item.presentPrice }} ================================================ FILE: miniprogram/pages/favour/favour.wxss ================================================ /* pages/favour/favour.wxss */ .top-search-bar { background-color: #ff6666; border: none } .coupon-list-title { padding-bottom: 5px; } .coupon-list-desc { color: #b6b6b6; font-size: 12px; } .coupon-list-footer { color: #b6b6b6; font-size: 12px; } .original-price { text-decoration: line-through; } .present-price { color: #ff6666; } .present-price-num { font-size: 18px; } .text-right { text-align: right; } ================================================ FILE: miniprogram/pages/hot/hot.js ================================================ let app = getApp() Page({ data: { sortByList: [], categoryList: [], couponList: [], selectedSortIndex: 0, selectedCatIndex: 0, pageIndex: 1, isLoading: true, loadOver: false }, onLoad: function (options) { this.setSortByList() this.setCategoryList() }, onShow: function () { if (wx.getStorageSync('isDetailBack')) { wx.removeStorageSync('isDetailBack') return } this.setData({ couponList: [], pageIndex: 1, isLoading: true, loadOver: false, selectedSortIndex: wx.getStorageSync('selectedSortIndex'), selectedCatIndex: wx.getStorageSync('selectedCatIndex') }) this.getMoreCouponList() }, // 设置排序列表 setSortByList: function () { this.setData({ sortByList: [ { key: "new", name: "最新券" }, { key: "price_asc", name: "最优惠" }, { key: "sale_num", name: "最畅销" } ], selectedSortIndex: 0 }) }, // 获取商品分类 setCategoryList: function () { let categoryList = [ { id: "", name: "全部分类" }, { id: "1", name: "女装" }, { id: "2", name: "男装" }, { id: "3", name: "内衣" }, { id: "4", name: "数码家电" }, { id: "5", name: "美食" }, { id: "6", name: "美妆个护" }, { id: "7", name: "母婴" }, { id: "8", name: "鞋包配饰" }, { id: "9", name: "家居家装" }, { id: "10", name: "文体车品" }, { id: "11", name: "其它" } ] this.setData({ categoryList: categoryList, selectedCatIndex: 0 }) }, getMoreCouponList: function () { var that = this wx.showLoading({ title: '加载中', }) wx.cloud.callFunction({ name: 'getHotList', data: { 'category': that.data.selectedCatIndex ? that.data.categoryList[that.data.selectedCatIndex].id : '', 'page': that.data.pageIndex }, success: response => { that.setData({ couponList: that.data.couponList.concat(response.result) }, () => { wx.hideLoading() }) } }) }, sortByChanged: function (e) { this.setData({ couponList: [], loadOver: false, isLoading: true, pageIndex: 1, selectedSortIndex: e.detail.index, }) this.getMoreCouponList() wx.setStorageSync('selectedSortIndex', e.detail.index) }, categoryChanged: function (e) { this.setData({ couponList: [], loadOver: false, isLoading: true, pageIndex: 1, selectedCatIndex: e.detail.value, }) this.getMoreCouponList() wx.setStorageSync('selectedCatIndex', e.detail.value) }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, onPullDownRefresh: function () { this.setData({ couponList: [], loadOver: false, isLoading: true, pageIndex: 1 }) wx.stopPullDownRefresh() this.getMoreCouponList() }, onReachBottom: function () { this.setData({ isLoading: true, loadOver: false, pageIndex: this.data.pageIndex + 1 }) this.getMoreCouponList() } }) ================================================ FILE: miniprogram/pages/hot/hot.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-icon": "../../../miniprogram_npm/vant-weapp/icon/index", "van-nav-bar": "../../../miniprogram_npm/vant-weapp/nav-bar/index" } } ================================================ FILE: miniprogram/pages/hot/hot.wxml ================================================ {{ item.shortTitle }} 热销 {{ item.saleCount }} 件 现价¥{{ item.originalPrice }} {{item.couponPrice}} 元 券后价{{ item.presentPrice }} ================================================ FILE: miniprogram/pages/hot/hot.wxss ================================================ /* pages/favour/favour.wxss */ .top-search-bar { background-color: #ff6666; border: none } .coupon-list-title { padding-bottom: 5px; } .coupon-list-desc { color: #b6b6b6; font-size: 12px; } .coupon-list-footer { color: #b6b6b6; font-size: 12px; } .original-price { text-decoration: line-through; } .present-price { color: #ff6666; } .present-price-num { font-size: 18px; } .text-right { text-align: right; } ================================================ FILE: miniprogram/pages/index/index.js ================================================ // pages/index/index.js Page({ /** * Page initial data */ data: { }, /** * Lifecycle function--Called when page load */ onLoad: function (options) { wx.switchTab({ url: '../search/search', }) }, /** * Lifecycle function--Called when page is initially rendered */ onReady: function () { }, /** * Lifecycle function--Called when page show */ onShow: function () { }, /** * Lifecycle function--Called when page hide */ onHide: function () { }, /** * Lifecycle function--Called when page unload */ onUnload: function () { }, /** * Page event handler function--Called when user drop down */ onPullDownRefresh: function () { }, /** * Called when page reach bottom */ onReachBottom: function () { }, /** * Called when user click on the top right corner to share */ onShareAppMessage: function () { } }) ================================================ FILE: miniprogram/pages/index/index.json ================================================ {} ================================================ FILE: miniprogram/pages/index/index.wxml ================================================ pages/index/index.wxml ================================================ FILE: miniprogram/pages/index/index.wxss ================================================ /* pages/index/index.wxss */ ================================================ FILE: miniprogram/pages/ninenine/ninenine.js ================================================ let app = getApp() Page({ data: { sortByList: [], categoryList: [], couponList: [], selectedSortIndex: 0, selectedCatIndex: 0, pageIndex: 1 }, onLoad: function (options) { }, onShow: function () { if (wx.getStorageSync('isDetailBack')) { wx.removeStorageSync('isDetailBack') return } this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: wx.getStorageSync('selectedSortIndex'), selectedCatIndex: wx.getStorageSync('selectedCatIndex') }) this.getMoreCouponList() }, getMoreCouponList: function () { var that = this wx.showLoading({ title: '加载中', }) wx.cloud.callFunction({ name: 'getNineNineList', data: { 'category': that.data.selectedCatIndex ? that.data.categoryList[that.data.selectedCatIndex].id : '', 'sort': that.data.selectedSortIndex ? that.data.sortByList[that.data.selectedSortIndex].key : 'new', 'page': that.data.pageIndex }, success: response => { that.setData({ couponList: that.data.couponList.concat(response.result) }, () => { wx.hideLoading() }) } }) }, sortByChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: e.detail.index, }) this.getMoreCouponList() wx.setStorageSync('selectedSortIndex', e.detail.index) }, categoryChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedCatIndex: e.detail.value, }) this.getMoreCouponList() wx.setStorageSync('selectedCatIndex', e.detail.value) }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, onPullDownRefresh: function () { this.setData({ couponList: [], pageIndex: 1 }) wx.stopPullDownRefresh() this.getMoreCouponList() }, onReachBottom: function () { this.setData({ pageIndex: this.data.pageIndex + 1 }) this.getMoreCouponList() } }) ================================================ FILE: miniprogram/pages/ninenine/ninenine.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-icon": "../../../miniprogram_npm/vant-weapp/icon/index" } } ================================================ FILE: miniprogram/pages/ninenine/ninenine.wxml ================================================ {{ item.shortTitle }} 热销 {{ item.saleCount }} 件 现价¥{{ item.originalPrice }} {{item.couponPrice}} 元 券后价{{ item.presentPrice }} ================================================ FILE: miniprogram/pages/ninenine/ninenine.wxss ================================================ /* pages/favour/favour.wxss */ .top-search-bar { background-color: #ff6666; border: none } .coupon-list-title { padding-bottom: 5px; } .coupon-list-desc { color: #b6b6b6; font-size: 12px; } .coupon-list-footer { color: #b6b6b6; font-size: 12px; } .original-price { text-decoration: line-through; } .present-price { color: #ff6666; } .present-price-num { font-size: 18px; } .text-right { text-align: right; } ================================================ FILE: miniprogram/pages/search/search.js ================================================ let app = getApp() Page({ data: { couponList: [], searchContent: "", pageIndex: 1 }, onLoad: function (options) { }, onShow: function () { if (wx.getStorageSync('isDetailBack')) { wx.removeStorageSync('isDetailBack') return } this.setData({ couponList: [], searchContent: "", pageIndex: 1 }) }, onSearch: function (e) { if (e.detail !== "") { this.setData({ searchContent: e.detail, couponList: [] }, () => { this.getMoreCouponList() }) } }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, getMoreCouponList: function () { var that = this wx.showLoading({ title: '加载中', }) wx.cloud.callFunction({ name: 'getSearchList', data: { 'query': that.data.searchContent, 'page': that.data.pageIndex }, success: response => { that.setData({ couponList: that.data.couponList.concat(response.result) }, () => { wx.hideLoading() }) } }) }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, onReachBottom: function () { if (this.data.searchContent !== "") { this.setData({ pageIndex: this.data.pageIndex + 1 }, () => { this.getMoreCouponList() }) } } }) ================================================ FILE: miniprogram/pages/search/search.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-icon": "../../../miniprogram_npm/vant-weapp/icon/index" } } ================================================ FILE: miniprogram/pages/search/search.wxml ================================================ {{ item.shortTitle }} 热销 {{ item.saleCount }} 件 现价¥{{ item.originalPrice }} {{item.couponPrice}} 元 券后价{{ item.presentPrice }} ================================================ FILE: miniprogram/pages/search/search.wxss ================================================ /* pages/favour/favour.wxss */ .search-btn { padding: 0 8px; background-color: #fff; } .coupon-list-title { padding-bottom: 5px; } .coupon-list-desc { color: #b6b6b6; font-size: 12px; } .coupon-list-footer { color: #b6b6b6; font-size: 12px; } .original-price { text-decoration: line-through; } .present-price { color: #ff6666; } .present-price-num { font-size: 18px; } .text-right { text-align: right; } ================================================ FILE: miniprogram/pages/time/time.js ================================================ let app = getApp() Page({ data: { couponList: [], selectedSortIndex: 0, selectedCatIndex: 0, pageIndex: 1 }, onLoad: function (options) { }, onShow: function () { if (wx.getStorageSync('isDetailBack')) { wx.removeStorageSync('isDetailBack') return } this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: wx.getStorageSync('selectedSortIndex'), selectedCatIndex: wx.getStorageSync('selectedCatIndex') }) this.getMoreCouponList() }, getMoreCouponList: function () { var that = this wx.showLoading({ title: '加载中', }) wx.cloud.callFunction({ name: 'getTimeList', data: { 'category': that.data.selectedCatIndex ? that.data.categoryList[that.data.selectedCatIndex].id : '', 'page': that.data.pageIndex }, success: response => { that.setData({ couponList: that.data.couponList.concat(response.result) }, () => { wx.hideLoading() }) } }) }, sortByChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedSortIndex: e.detail.index, }) this.getMoreCouponList() wx.setStorageSync('selectedSortIndex', e.detail.index) }, categoryChanged: function (e) { this.setData({ couponList: [], pageIndex: 1, selectedCatIndex: e.detail.value, }) this.getMoreCouponList() wx.setStorageSync('selectedCatIndex', e.detail.value) }, jumpToDetail: function (e) { wx.setStorage({ key: 'couponInfo', data: this.data.couponList[e.currentTarget.dataset.index], success: () => { wx.navigateTo({ url: '../detail/detail', }) } }) }, onPullDownRefresh: function () { this.setData({ couponList: [], pageIndex: 1 }) wx.stopPullDownRefresh() this.getMoreCouponList() }, onReachBottom: function () { this.setData({ pageIndex: this.data.pageIndex + 1 }) this.getMoreCouponList() } }) ================================================ FILE: miniprogram/pages/time/time.json ================================================ { "usingComponents": { "van-row": "../../../miniprogram_npm/vant-weapp/row/index", "van-col": "../../../miniprogram_npm/vant-weapp/col/index", "van-search": "../../../miniprogram_npm/vant-weapp/search/index", "van-tab": "../../../miniprogram_npm/vant-weapp/tab/index", "van-tabs": "../../../miniprogram_npm/vant-weapp/tabs/index", "van-button": "../../../miniprogram_npm/vant-weapp/button/index", "van-card": "../../../miniprogram_npm/vant-weapp/card/index", "van-tag": "../../../miniprogram_npm/vant-weapp/tag/index", "van-icon": "../../../miniprogram_npm/vant-weapp/icon/index" } } ================================================ FILE: miniprogram/pages/time/time.wxml ================================================ {{ item.shortTitle }} 热销 {{ item.saleCount }} 件 现价¥{{ item.originalPrice }} {{item.couponPrice}} 元 券后价{{ item.presentPrice }} ================================================ FILE: miniprogram/pages/time/time.wxss ================================================ /* pages/favour/favour.wxss */ .top-search-bar { background-color: #ff6666; border: none } .coupon-list-title { padding-bottom: 5px; } .coupon-list-desc { color: #b6b6b6; font-size: 12px; } .coupon-list-footer { color: #b6b6b6; font-size: 12px; } .original-price { text-decoration: line-through; } .present-price { color: #ff6666; } .present-price-num { font-size: 18px; } .text-right { text-align: right; }