forked from silently9527/coupons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Silently9527
committed
Aug 13, 2021
1 parent
0b91841
commit 7ab9ced
Showing
72 changed files
with
13,660 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,5 @@ build/ | |
### VS Code ### | ||
.vscode/ | ||
|
||
logs | ||
logs | ||
unpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
unpackage | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script> | ||
/** | ||
* vuex管理登陆状态,具体可以参考官方登陆模板示例 | ||
*/ | ||
import app from 'app.js' | ||
import {mapMutations} from 'vuex' | ||
export default { | ||
onLaunch: function () { | ||
app.initTitleNav(); | ||
app.initShareMenu(); | ||
this.$api.backend.getLoginUser().then(resp => { | ||
if (resp.responseCode === 7002) { | ||
this.logout(); | ||
} else { | ||
this.storeUser(resp.data) | ||
} | ||
}) | ||
}, | ||
onShow: function (res) { | ||
if (res.shareTicket) { | ||
this.storeShareTicket(res.shareTicket) | ||
} | ||
}, | ||
onHide: function () { | ||
}, | ||
methods: { | ||
...mapMutations(['storeUser', 'logout', 'storeShareTicket']) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import "colorui/icon.css"; | ||
@import "colorui/main.css"; | ||
@import "style/app.scss"; | ||
.container { | ||
background: $page-color-base; | ||
} | ||
</style> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Mall-Coupons | ||
|
||
<p align="center"> | ||
<a href="#微信公众号"><img src="https://img.shields.io/badge/公众号-贝塔学JAVA-blue.svg" alt="公众号"></a> | ||
<a href="https://juejin.cn/user/2779199782521693"><img src="https://img.shields.io/badge/juejin-掘金-yellow.svg" alt="掘金"></a> | ||
<a href="https://blog.csdn.net/asdewq380303318"><img src="https://img.shields.io/badge/csdn-CSDN-red.svg" alt="CSDN"></a> | ||
<a href="https://my.oschina.net/u/3230120"><img src="https://img.shields.io/badge/oschina-开源中国-green" alt="开源中国"></a> | ||
<a href="https://www.zhihu.com/people/huaan9527-57/posts"><img src="https://img.shields.io/badge/zhihu-知乎-purple" alt="知乎"></a> | ||
</p> | ||
|
||
# 文档完善中... | ||
|
||
## 项目介绍 | ||
Mall-Coupons是一个从前端到后端完全开源的淘宝客项目,当初学习完uniapp之后想做一个实战项目,所以才研发了这个项目。由于本人平时主要从事后端研发,界面样式非我所长,所以大家觉得界面效果不好的可以自己修改。目前项目已经支持打包成App、微信小程序、QQ小程序、Web站点;理论上其他小程序支持,可能需要微调 | ||
|
||
### Github地址: | ||
- 后端项目地址:[https://github.com/silently9527/mall-coupons-server](https://github.com/silently9527/mall-coupons-server) | ||
- 前端项目地址:[https://github.com/silently9527/mall-coupons](https://github.com/silently9527/mall-coupons) | ||
|
||
### Gitee地址: | ||
- 后端项目地址:[https://gitee.com/silently9527/mall-coupons-server](https://gitee.com/silently9527/mall-coupons-server) | ||
- 前端项目地址:[https://gitee.com/silently9527/mall-coupons](https://gitee.com/silently9527/mall-coupons) | ||
|
||
## 功能列表 | ||
- [x] 推荐穿衣搭配 | ||
- [x] 搭配筛选 | ||
- [x] 搭配详情 | ||
- [x] 相关搭配推荐 | ||
- [x] 用户点赞 | ||
- [x] 商品分类 | ||
- [x] 分类查询商品列表 | ||
- [x] 首页轮播 | ||
- [x] APP、Web支持唤醒淘宝 | ||
- [x] 9.9包邮 | ||
- [x] 疯抢排行榜 | ||
- [x] 首页优质商品推荐 | ||
- [x] 商品、优惠券搜索 | ||
- [x] 商品详情 | ||
- [x] 相似商品推荐 | ||
- [x] 商品收藏、收藏夹 | ||
- [x] 口令购买、领券购买 | ||
- [x] 用户登录、微信登录、QQ登录、手机验证码登录 | ||
- [x] 用户新手教程 | ||
|
||
## 在线体验地址 | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td align="center">App下载地址</td> | ||
<td align="center">QQ小程序</td> | ||
<td align="center">微信小程序</td> | ||
<td align="center">Web站点</td> | ||
</tr> | ||
<tr style="background-color: white;"> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEgy1gn4esj3uutj30b40b4jsx.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEgy1gn4et70ft2j30g40g4gm6.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEgy1gn4etut7d1j3076076aa2.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEgy1gn4euhcqonj30b40b43yt.jpg"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
App下载地址(用手机访问才能正确下载IOS和安卓版本): [http://static.szjx.top/download/index.html](http://static.szjx.top/download/index.html) | ||
|
||
Web站点(用手机访问,PC端未适配):[http://m.szjx.top](http://m.szjx.top) | ||
|
||
## 效果预览 | ||
<table> | ||
<tbody> | ||
<tr style="background-color: white;"> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hfiqyqoj30ku11240m.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hggo8thj30ku112aba.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hge5bwuj30ku112my9.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hgbc1e2j30ku112dhz.jpg"></td> | ||
</tr> | ||
<tr style="background-color: white;"> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hg8p7uhj30ku112acg.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hg5kj8lj30ku112tc6.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hg10sibj30ku112acs.jpg"></td> | ||
<td align="center"><img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEly1gn4hft8rzcj30ku1123yt.jpg"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
|
||
## 技术选型 | ||
|
||
#### 后端技术 | ||
| 技术 | 备注 | 地址 | | ||
| ---- | ---- |---- | | ||
| SpringBoot | 容器+MVC框架 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) | | ||
| MyBatis | ORM框架 | [http://www.mybatis.org/mybatis-3/zh/index.html](http://www.mybatis.org/mybatis-3/zh/index.html) | | ||
| SpringSecurity | 认证和授权框架 | [https://spring.io/projects/spring-security](https://spring.io/projects/spring-security) | | ||
| SpringSocial | OAuth2认证框架 | [https://github.com/spring-projects/spring-social](https://github.com/spring-projects/spring-social) | | ||
| Redis | 分布式缓存 | [https://redis.io/](https://redis.io/) | | ||
| Druid | 数据库连接池 | [https://github.com/alibaba/druid](https://github.com/alibaba/druid) | | ||
| Lombok | 简化对象封装工具 | [https://github.com/rzwitserloot/lombok](https://github.com/rzwitserloot/lombok) | | ||
| Fastjson | JSON工具 | https://github.com/alibaba/fastjson | | ||
| spring-data-mybatis | 封装Mybatis实现JPA部分功能 | [https://github.com/easybest/spring-data-mybatis](https://github.com/easybest/spring-data-mybatis) | | ||
|
||
#### 前端技术 | ||
| 技术 | 备注 | 地址 | | ||
| ---- | ---- |---- | | ||
| Vue | 前端框架 | [https://vuejs.org/](https://vuejs.org/) | | ||
| UniApp | 一个使用 Vue.js 开发所有前端应用的框架 | [https://uniapp.dcloud.io/](https://uniapp.dcloud.io/) | | ||
| Vuex | 全局状态管理框架 | [https://vuex.vuejs.org/](https://vuex.vuejs.org/) | | ||
| colorui | 样式库 | [https://github.com/weilanwl/ColorUI](https://github.com/weilanwl/ColorUI) | | ||
|
||
### 开发环境 | ||
| 工具 | 版本号 | 下载 | | ||
| ------------- | ------ | ------------------------------------------------------------ | | ||
| JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | | ||
| Mysql | 5.7 | https://www.mysql.com/ | | ||
| Redis | 5.0 | https://redis.io/download | | ||
| Nginx | 1.10 | http://nginx.org/en/download.html | | ||
|
||
## 部署文档 | ||
关注微信公众号:`贝塔学JAVA` ;回复`文档`获取部署文档 | ||
|
||
**有任何部署疑问,欢迎给我留言** | ||
|
||
## 微信公众号 | ||
<img width="200" src="https://raw.githubusercontent.com/silently9527/JavaCore/master/imgs/gonzhonghao.png" alt="公众号"> | ||
|
||
## 我的技术博客 | ||
[https://silently9527.cn/](https://silently9527.cn/) | ||
|
||
## 捐赠研发 | ||
如果您认为此项目帮到了您的开发工作,使您赚到钱了,您可以捐赠我一杯可乐(相信这比打赏主播更有意义)。 | ||
|
||
<img width="200" src="https://tva1.sinaimg.cn/large/008eGmZEgy1gn63yahvn4j30ia0igjsw.jpg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import httpRequest from '../utils/http' | ||
|
||
module.exports = { | ||
login: function (provider, code) { | ||
let url = '/auth/miniprogram'; | ||
if (provider === 'qq') { | ||
url = '/auth/QQMiniProgram' | ||
} | ||
return httpRequest.get(url, {code: code}) | ||
}, | ||
htmlLogin: function (mobile, code) { | ||
return httpRequest.post('/login', {mobile: mobile, code: code}) | ||
}, | ||
logout: function () { | ||
return httpRequest.get('/logout') | ||
}, | ||
getLoginUser: function () { | ||
return httpRequest.get('/user/current_user', {}) | ||
}, | ||
sendEmailCode: function (params) { | ||
return httpRequest.post('/mi/send_email_code', params) | ||
}, | ||
updatePassword: function (params) { | ||
return httpRequest.post('/mi/update_password', params) | ||
}, | ||
register: function (user) { | ||
return httpRequest.post('/mi/register', user) | ||
}, | ||
updateUserInfo: function (user) { | ||
return httpRequest.post('/user/update', user) | ||
}, | ||
initUserInfo: function (user) { | ||
return httpRequest.post('/user/init_current_user', user) | ||
}, | ||
getCate: function () { | ||
return httpRequest.get('/mi/load_cate', {}) | ||
}, | ||
recommendGoods: function (page) { | ||
return httpRequest.get('/mi/load_recommend_goods', {page: page}) | ||
}, | ||
getGoodsDetail: function (id, goodsId) { | ||
let params = {}; | ||
if (id) { | ||
params.id = id | ||
} | ||
if (goodsId) { | ||
params.goodsId = goodsId | ||
} | ||
return httpRequest.get('/mi/goods_detail', params) | ||
}, | ||
getGoodsByCate: function (subcid, page, sort) { | ||
return httpRequest.get('/mi/load_goods_by_cate', {subcid: subcid, page: page, sort: sort}) | ||
}, | ||
getPrivilegeLink: function (goodsId) { | ||
return httpRequest.get('/mi/get_privilege_link', {goodsId: goodsId}) | ||
}, | ||
getHotSearch: function () { | ||
return httpRequest.get('/mi/get_hot_search', {}) | ||
}, | ||
search: function (keyword, page, sort) { | ||
return httpRequest.get('/mi/search', {keyword: keyword, page: page, sort: sort}) | ||
}, | ||
search2: function (keyword, page, sort, hasCoupon) { | ||
return httpRequest.get('/mi/search2', {keyword: keyword, page: page, sort: sort, hasCoupon: hasCoupon}) | ||
}, | ||
favoriteGoods: function (goodsId) { | ||
return httpRequest.get('/collection/product/add', {productId: goodsId}) | ||
}, | ||
unFavoriteGoods: function (goodsId) { | ||
return httpRequest.get('/collection/product/remove', {productId: goodsId}) | ||
}, | ||
favoriteList: function (page, size) { | ||
return httpRequest.get('/collection/product/list', {page: page, size: size}) | ||
}, | ||
getNineGoods: function (page, size, nineCid) { | ||
return httpRequest.get('/mi/load_nine_goods', {page: page, size: size, nineCid: nineCid}) | ||
}, | ||
getRankGoods: function (cid) { | ||
return httpRequest.get('/mi/load_rank_goods', {cid: cid}) | ||
}, | ||
getSimilarGoods: function (daTaoKeGoodsId) { | ||
return httpRequest.get('/mi/get_similar_goods', {daTaoKeGoodsId: daTaoKeGoodsId}) | ||
}, | ||
listCarousel: function () { | ||
return httpRequest.post('/mi/list_carousel', {}) | ||
}, | ||
listMenus: function () { | ||
return httpRequest.post('/mi/list_menus', {}) | ||
}, | ||
recommendCollocations: function (page) { | ||
return httpRequest.get('/mi/collocation/load_recommend', {page}) | ||
}, | ||
collocationsList: function (page, sex) { | ||
if (sex) { | ||
return httpRequest.get('/mi/collocation/list', {page: page, sex: sex}) | ||
} | ||
return httpRequest.get('/mi/collocation/list', {page}) | ||
}, | ||
recommendCollocations2: function (page) { | ||
return httpRequest.get('/mi/collocation/load_recommend2', {page}) | ||
}, | ||
addCollocationAppreciate: function (collocationId) { | ||
return httpRequest.get('/collocation/add_appreciate', {collocationId}) | ||
}, | ||
cancelCollocationAppreciate: function (collocationId) { | ||
return httpRequest.get('/collocation/cancel_appreciate', {collocationId}) | ||
}, | ||
collocationSimpleDetail: function (collocationId) { | ||
return httpRequest.get('/mi/collocation/simple_detail', {collocationId}) | ||
}, | ||
collocationProduct: function (collocationId) { | ||
return httpRequest.get('/mi/collocation/product', {collocationId}) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import Vue from 'vue' | ||
|
||
export default { | ||
initTitleNav() { | ||
uni.getSystemInfo({ | ||
success: function (e) { | ||
// #ifndef MP | ||
Vue.prototype.StatusBar = e.statusBarHeight; | ||
if (e.platform === 'android') { | ||
Vue.prototype.CustomBar = e.statusBarHeight + 50; | ||
} else { | ||
Vue.prototype.CustomBar = e.statusBarHeight + 45; | ||
} | ||
// #endif | ||
// #ifdef MP-WEIXIN | ||
Vue.prototype.StatusBar = e.statusBarHeight; | ||
let custom = wx.getMenuButtonBoundingClientRect(); | ||
Vue.prototype.Custom = custom; | ||
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; | ||
// #endif | ||
// #ifdef MP-ALIPAY | ||
// Vue.prototype.StatusBar = e.statusBarHeight; | ||
// Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight; | ||
// #endif | ||
// #ifdef MP-QQ | ||
Vue.prototype.StatusBar = e.statusBarHeight; | ||
let customQQ = qq.getMenuButtonBoundingClientRect(); | ||
Vue.prototype.Custom = customQQ; | ||
Vue.prototype.CustomBar = customQQ.bottom + customQQ.top - e.statusBarHeight; | ||
if (e.model.indexOf("iPhone X") > -1) { | ||
Vue.prototype.CustomBar = 82; | ||
} else { | ||
Vue.prototype.CustomBar = 60; | ||
} | ||
// #endif | ||
// #ifdef MP-TOUTIAO | ||
// Vue.prototype.StatusBar = e.statusBarHeight; | ||
// let customTT = tt.getMenuButtonBoundingClientRect(); | ||
// Vue.prototype.Custom = customTT; | ||
// Vue.prototype.CustomBar = customTT.bottom + customTT.top - e.statusBarHeight | ||
// #endif | ||
} | ||
}) | ||
}, | ||
initShareMenu() { | ||
// #ifdef MP-WEIXIN | ||
wx.showShareMenu({ | ||
withShareTicket: true, | ||
menus: ['shareAppMessage', 'shareTimeline'] | ||
}) | ||
// #endif | ||
// #ifdef MP-QQ | ||
uni.showShareMenu({ | ||
withShareTicket: true | ||
}) | ||
// #endif | ||
} | ||
|
||
}; |
Oops, something went wrong.