mirror of
https://github.com/zwpro/coupons.git
synced 2025-12-10 16:52:48 +00:00
新增使用文档
This commit is contained in:
parent
e44c54af4e
commit
8eec0c0e5f
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
源码为uniapp项目,需下载hbuilder导入项目打包,可编译成h5或小程序(跳转地址为小程序路径)
|
源码为uniapp项目,需下载hbuilder导入项目打包,可编译成h5或小程序(跳转地址为小程序路径)
|
||||||
|
|
||||||
|
[在线文档](http://lianghua.wxthe.com/docs/)
|
||||||
|
|
||||||
|
|
||||||
### 常见问题
|
### 常见问题
|
||||||
1. 如何获取美团饿了吗的推广链接
|
1. 如何获取美团饿了吗的推广链接
|
||||||
|
|
||||||
|
|||||||
32
docs/.vuepress/config.js
Normal file
32
docs/.vuepress/config.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
module.exports = {
|
||||||
|
title: 'Coupons',
|
||||||
|
description: '外卖红包开源项目',
|
||||||
|
// plugins: {
|
||||||
|
// "vuepress-plugin-auto-sidebar": {
|
||||||
|
// titleMap: {
|
||||||
|
// "guide": "基础",
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
themeConfig: {
|
||||||
|
repo: 'zwpro/coupons',
|
||||||
|
docsDir: 'docs',
|
||||||
|
editLinks: true,
|
||||||
|
sidebarDepth: 3,
|
||||||
|
nav: [
|
||||||
|
{ text: '首页', link: '/' },
|
||||||
|
{ text: '快速开始', link: '/guide/' },
|
||||||
|
],
|
||||||
|
sidebar: {
|
||||||
|
'/guide/': [{
|
||||||
|
title: '基础',
|
||||||
|
collapsable: false,
|
||||||
|
children: [
|
||||||
|
{ title: '前序准备', path:'/guide/ready'},
|
||||||
|
{ title: '云开发版', path:'/guide/cloud'},
|
||||||
|
{ title: '静态版', path:'/guide/static'}
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
docs/.vuepress/public/hero.png
Normal file
BIN
docs/.vuepress/public/hero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 150 KiB |
17
docs/README.md
Normal file
17
docs/README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
home: true
|
||||||
|
heroImage: /hero.png
|
||||||
|
heroText: 外卖红包项目使用教程
|
||||||
|
tagline: 外卖优惠券部署上线流程
|
||||||
|
actionText: 快速上手 →
|
||||||
|
actionLink: /guide/
|
||||||
|
features:
|
||||||
|
- title: 代码开源
|
||||||
|
details: 全部代码在github开源,遵循开源协议,可自行修改拓展。
|
||||||
|
- title: 多平台编译
|
||||||
|
details: 支持网站h5,微信小程序编译,App打包,扩平台兼容。
|
||||||
|
- title: 云开发
|
||||||
|
details: 无需服务器、数据库、域名,以最少的配置帮助你部署上线运营,快速实现推广优惠券赚佣金。
|
||||||
|
footer: MIT Licensed | Copyright © 2020-present zwpro
|
||||||
|
---
|
||||||
|
|
||||||
32
docs/guide/README.md
Normal file
32
docs/guide/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
pageClass: getting-started
|
||||||
|
---
|
||||||
|
|
||||||
|
# 介绍
|
||||||
|
|
||||||
|
[](https://uniapp.dcloud.io/)
|
||||||
|
[](https://github.com/zwpro/coupons)
|
||||||
|
|
||||||
|
[coupons](https://github.com/zwpro/coupons) 是一个美团饿了么外卖优惠券红包cps推广的项目,它基于 [uniapp](https://uniapp.dcloud.io/) 实现多平台编译。快速接入美团联盟、饿了么推广,实现推广优惠券赚佣金。
|
||||||
|
|
||||||
|
目前最新版支持云开发,配置信息可在云数据库修改;静态版配置信息写在前端,可切换到 [静态分支](https://github.com/zwpro/coupons/tree/no-api)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/zwpro/coupons/master/static/demo.png" style="width:300px" />
|
||||||
|
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
|
||||||
|
有任何修改和建议都可以提项目 pr 和 (https://github.com/zwpro/coupons/issues)
|
||||||
|
|
||||||
|
[coupons](https://github.com/zwpro/coupons) 还在持续迭代中,逐步沉淀和总结出更多功能和相应的实现代码,总结中后台产品模板/组件/业务场景的最佳实践。本项目也十分期待你的参与和[issues](https://github.com/zwpro/coupons/issues)。
|
||||||
|
|
||||||
|
## 赞赏
|
||||||
|
|
||||||
|
如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 :heart:
|
||||||
|
<img src="http://cdn.letwind.com/me/zanshang.jpg" style="width:300px" />
|
||||||
|
|
||||||
|
## 其它
|
||||||
|
|
||||||
|
群主圈子会经常分享一些有意思的小项目,有兴趣的可以加微信 sanxungo拉你进群,备注:圈子
|
||||||
17
docs/guide/cloud.md
Normal file
17
docs/guide/cloud.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
最新版即为云开发版,配置数据来自云数据库,需开通unicloud云开发
|
||||||
|
|
||||||
|
## 创建云服务空间
|
||||||
|
|
||||||
|
右键 cloudfunctions-aliyun,选择 创建云服务空间,会自动打开 [云开发首页](https://unicloud.dcloud.net.cn/home),选择阿里云,填写信息创建。
|
||||||
|
## 云函数域名绑定
|
||||||
|
创建完成后,点击左侧云函数->函数列表->云函数域名绑定 ->启用域名,此处的域名即为你的api接口域名。
|
||||||
|
## 关联云服务空间
|
||||||
|
回到hbuilderx,右键 cloudfunctions-aliyun 关联云服务空间,选择刚刚创建的云服务空间。
|
||||||
|
## 上传云函数
|
||||||
|
右键 cloudfunctions-aliyun 上传所有云函数(如提示请在manifest.json文件中获取新的AppID,打开manifest.json重新获取appid)。
|
||||||
|
## 云函数URL化
|
||||||
|
去云服务空间,云点击左侧云函数->函数列表->刷新,可以看到刚刚上传的api函数, 点击详情->云函数URL化->编辑,填写路径 /http/api,确定后复制路径,即为你的api接口地址。
|
||||||
|
## 初始化云数据库
|
||||||
|
回到hbuilderx,右键 cloudfunctions-aliyun 目录下的 db_init.json ,初始化云数据库。初始化后可在云服务空间->云数据库 看到有两个数据表,tab是导航栏,coupon是优惠券列表,后续可直接在这更改数据。
|
||||||
|
## 修改前端请求域名
|
||||||
|
App.vue 中修改globalData.api.home为你的云函数域名。
|
||||||
28
docs/guide/ready.md
Normal file
28
docs/guide/ready.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
sidebarDepth: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
## 前序准备
|
||||||
|
|
||||||
|
1. 注册美团联盟和淘宝联盟
|
||||||
|
::: tip
|
||||||
|
美团联盟个人无法注册,可以挂靠在企业帐号下。
|
||||||
|
|
||||||
|
淘宝联盟:[https://pub.alimama.com/](https://pub.alimama.com/)
|
||||||
|
:::
|
||||||
|
2. 你需要在本地安装 [hbuilderx](https://www.dcloud.io/hbuilderx.html)。如使用云开发版本还需开通 [云开发](https://unicloud.dcloud.net.cn/),如使用静态版本,无需云开发。
|
||||||
|
|
||||||
|
3. 拉取代码并导入hbuilderx
|
||||||
|
```bash
|
||||||
|
# 克隆项目
|
||||||
|
git clone https://github.com/zwpro/coupons
|
||||||
|
|
||||||
|
# 静态版使用以下命令
|
||||||
|
git clone -b no-api https://github.com/zwpro/coupons
|
||||||
|
```
|
||||||
|
|
||||||
|
其他贡献者提供的入门教程:
|
||||||
|
|
||||||
|
[0成本搭建外卖返利cps小程序](https://mp.weixin.qq.com/s/kLY7nKYmchYAMKNNmOFxdw)
|
||||||
|
|
||||||
|
[零基础快速搭建一个能够获利的小程序](https://mp.weixin.qq.com/s/u4JWJEp6Aynl3KDH9o3e4g)
|
||||||
3
docs/guide/static.md
Normal file
3
docs/guide/static.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
静态版需切换到静态分支[no-api](https://github.com/zwpro/coupons/tree/no-api)
|
||||||
|
|
||||||
|
优惠券数据在pages/index/index里的coupons数组里修改
|
||||||
Loading…
x
Reference in New Issue
Block a user