├── README.md ├── app.js ├── app.json ├── app.wxss ├── pages ├── common │ ├── footer.wxml │ ├── head.wxml │ ├── liuyan.wxml │ └── weui.wxss ├── company │ ├── company.js │ ├── company.json │ ├── company.wxml │ └── company.wxss ├── detail │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ └── detail.wxss ├── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── logs │ ├── logs.js │ ├── logs.json │ ├── logs.wxml │ └── logs.wxss ├── news │ ├── news.js │ ├── news.json │ ├── news.wxml │ └── news.wxss ├── projectcon │ ├── projectcon.js │ ├── projectcon.json │ ├── projectcon.wxml │ └── projectcon.wxss └── ucenter │ └── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── project.config.json ├── sitemap.json ├── utils └── util.js └── vimg ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg └── 5.jpg /README.md: -------------------------------------------------------------------------------- 1 | # laraveladmin-xcx(如果帮助了你,请给个Star) 2 | laravel-admin 前端 微信小程序(模版样式是随便弄了一个,将就看) 3 | 4 | 开箱即用,当前已发布小程序首页,项目列表,项目内容,文章列表,文章内容,登录,留言等
5 | 6 | 7 | #安装方式 8 | 9 | $git clone https://github.com/imnotdoubi/laraveladmin-xcx 10 | 11 | #具体操作 12 | 请一定要先配置 https://github.com/imnotdoubi/laravel-admin ,因为是根据这个来做的
13 | 如果你不想配置,可以将小程序里面的获取数据链接改为自己的
14 | 15 | 16 | #后台部分截图 17 | ![laravel-admin](https://github.com/imnotdoubi/laraveladmin-xcx/blob/master/vimg/1.jpg) 18 | ![laravel-admin](https://github.com/imnotdoubi/laraveladmin-xcx/blob/master/vimg/2.jpg) 19 | ![laravel-admin](https://github.com/imnotdoubi/laraveladmin-xcx/blob/master/vimg/3.jpg) 20 | ![laravel-admin](https://github.com/imnotdoubi/laraveladmin-xcx/blob/master/vimg/4.jpg) 21 | ![laravel-admin](https://github.com/imnotdoubi/laraveladmin-xcx/blob/master/vimg/5.jpg) 22 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | App({ 3 | onLaunch: function () { 4 | // 展示本地存储能力 5 | var logs = wx.getStorageSync('logs') || [] 6 | logs.unshift(Date.now()) 7 | wx.setStorageSync('logs', logs) 8 | 9 | // 登录 10 | wx.login({ 11 | success: res => { 12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 13 | } 14 | }) 15 | // 获取用户信息 16 | wx.getSetting({ 17 | success: res => { 18 | if (res.authSetting['scope.userInfo']) { 19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 20 | wx.getUserInfo({ 21 | success: res => { 22 | // 可以将 res 发送给后台解码出 unionId 23 | this.globalData.userInfo = res.userInfo 24 | 25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 26 | // 所以此处加入 callback 以防止这种情况 27 | if (this.userInfoReadyCallback) { 28 | this.userInfoReadyCallback(res) 29 | } 30 | } 31 | }) 32 | } 33 | } 34 | }) 35 | }, 36 | globalData: { 37 | userInfo: null 38 | } 39 | }) -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/news/news", 5 | "pages/projectcon/projectcon", 6 | "pages/company/company", 7 | "pages/detail/detail", 8 | "pages/ucenter/index/index", 9 | "pages/authorize/index", 10 | "pages/logs/logs" 11 | ], 12 | "window": { 13 | "backgroundTextStyle": "light", 14 | "navigationBarBackgroundColor": "#fff", 15 | "navigationBarTitleText": "WeChat", 16 | "navigationBarTextStyle": "black" 17 | }, 18 | "sitemapLocation": "sitemap.json" 19 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | .container { 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: space-between; 8 | padding: 200rpx 0; 9 | box-sizing: border-box; 10 | } 11 | .header{ height:44px; line-height:44px; background:#ff5000; position:relative;} 12 | .header strong{ margin:0 44px; display:block; text-align:center; font-size:18px;color:#fff;} 13 | 14 | .header .h_search_pic{ position:absolute; right:0; top:0;} 15 | .header .h_search_pic{ width:44px; height:44px; float:left; text-indent:-9999px;border-left:1px solid rgba(0,0,0,0.2);} 16 | .header .h_search_pic{ background:url(http://www.lar-admin.test/web/m/images/header_pic.jpg) no-repeat 0 -44px; } 17 | 18 | .in_news_hd{ height:30px; line-height:28px; background-color:#f7f7f7; cursor:pointer;} 19 | .in_news_hd ul view{ float:left; width:20%; text-align:center; border-top:1px solid #f7f7f7; border-bottom:1px solid #f7f7f7;} 20 | .in_news_hd ul li.current{border-bottom:1px solid #ff5000; color:#ff5000;} 21 | 22 | .in_news_bd{ text-align:left;} 23 | .in_news_bd ul li{ margin:0 5px; padding:14px 0; border-bottom:1px solid #e9e9e9; cursor:pointer;} 24 | .in_news_bd ul li .text1{ float:left; width:120px; height:90px; overflow:hidden;} 25 | .in_news_bd ul li image{ width:120px; height:90px;} 26 | .in_news_bd ul li .text{ margin-left:130px; line-height:24px; height:72px; overflow:hidden;} 27 | 28 | 29 | 30 | .in_news_bd ul li i{ display:block; margin-left:130px; line-height:18px; font-style:normal; color:#999; height:18px;} 31 | 32 | 33 | .footer{ line-height:26px; padding:14px 0 60px 0; font-family:"微软雅黑"; color:#333; text-align:center;} 34 | 35 | .f_nav{ height:44px; background-color:#fff; position:fixed; left:0; bottom:0; width:100%; line-height:18px; text-align:center; } 36 | .f_nav ul li{ float:left; width:25%;} 37 | .f_nav ul li navigatora{ color:#333; display:block; height:40px; padding-top:4px;} 38 | .f_nav ul li icon{ height:22px; width:24px; display:block; margin:0 auto;} 39 | .f_nav ul li icon.icon1{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat;} 40 | .f_nav ul li icon.icon2{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -22px;} 41 | .f_nav ul li icon.icon3{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -44px;} 42 | .f_nav ul li icon.icon4{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -66px;} 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /pages/common/footer.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/common/head.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/common/liuyan.wxml: -------------------------------------------------------------------------------- 1 |