diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f5d1256 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 4c37490..1837c4f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,39 @@ -# fireflysg-wxapp +# miniProject -萤火社贡微信小程序 \ No newline at end of file +#### 介绍 +{**以下是 Gitee 平台说明,您可以替换此简介** +Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 +无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/app.js b/app.js new file mode 100644 index 0000000..b545190 --- /dev/null +++ b/app.js @@ -0,0 +1,39 @@ +//app.js +App({ + onLaunch: function () { + // 展示本地存储能力 + var logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + this.globalData.userInfo = res.userInfo + + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 + // 所以此处加入 callback 以防止这种情况 + if (this.userInfoReadyCallback) { + this.userInfoReadyCallback(res) + } + } + }) + } + } + }) + }, + globalData: { + userInfo: null + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..5033a9a --- /dev/null +++ b/app.json @@ -0,0 +1,89 @@ +{ + "usingComponents": { + "empty": "/component/empty/empty" + }, + "pages": [ + "pages/home/home", + "pages/my/login", + "pages/vedio/index", + "pages/vedio/detail", + "pages/article/publish3", + "pages/achieve/detail", + "pages/my/achievement", + "pages/buy/cart", + "pages/my/orderList", + "pages/buy/index", + "pages/my/addressList", + "pages/my/addressAdd", + "pages/my/publishList", + "pages/my/publish", + "pages/article/publish", + "pages/article/publish2", + "pages/article/publish1", + "pages/shopList/shopDetail", + "pages/shopList/businessDetail", + "pages/shopList/index", + "pages/my/index", + "pages/article/detail", + "pages/index/index", + "pages/shopList/success", + "pages/near/index", + "pages/logs/logs", + "component/upload/upload", + "pages/add/add", + "pages/category/category" + ], + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + }, + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "Weixin", + "navigationBarTextStyle": "black" + }, + "style": "v2", + "sitemapLocation": "sitemap.json", + "requiredPrivateInfos": [ + "chooseLocation", + "getLocation", + "choosePoi" + ], + "tabBar": { + "color": "#999999", + "selectedColor": "#000000", + "list": [ + { + "iconPath": "./images/bar/icon_home.png", + "selectedIconPath": "./images/bar/icon_home_cur.png", + "pagePath": "pages/home/home", + "text": "首页" + }, + { + "iconPath": "./images/bar/icon_near.png", + "selectedIconPath": "./images/bar/icon_near_cur.png", + "pagePath": "pages/near/index", + "text": "商家福利" + }, + { + "iconPath": "./images/bar/icon_add.png", + "selectedIconPath": "./images/bar/add_cur.png", + "pagePath": "pages/add/add" + }, + { + "iconPath": "./images/bar/icon_list.png", + "selectedIconPath": "./images/bar/icon_list_cur.png", + "pagePath": "pages/shopList/index", + "text": "社贡商城" + }, + { + "iconPath": "./images/bar/icon_center.png", + "selectedIconPath": "./images/bar/icon_center_cur.png", + "pagePath": "pages/my/index", + "text": "个人中心" + } + ] + } +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..b94edcd --- /dev/null +++ b/app.wxss @@ -0,0 +1,147 @@ +/**app.wxss**/ +page { + font-family: PingFangSC-Regular; + background-color: #f3f6fa; +} + +.yellow { + color: #ffc44f; +} + +.red { + color: #ff1616; +} + +.blue { + color: #194f82; +} + +.light-blue { + color: #5cbaea; +} + +.white { + color: #fff; +} + +.red-bg { + background-color: #ff1616; +} +.gray-bg { + background-color: #f3f6fa; +} + +.white-bg { + background-color: #fff; +} + +.yellow-bg { + background-color: #ffc44f; +} + +.blue-bg { + background-color: #194f82; +} + +.light-blue-bg { + background-color: #5cbaea; +} + +.light-orange-bg { + background-color: #ff6925; +} + +/*theme color end*/ + +.flex-row { + display: flex; +} + +.box-center { + -webkit-box-align: center; +} + +.flex-col { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: left; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: left; + -webkit-box-align: left; +} + +.flex-right { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: right; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: right; + -webkit-box-align: right; +} + +.flex-center { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: center; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: center; + -webkit-box-align: center; +} +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} +.tc{ + text-align: center; +} +button::after{ + border:none; +} +.fs0{ + font-size: 0; +} +.space{ + padding-left: 30rpx; + padding-right: 30rpx; +} + +.box-wrap{ + padding: 30rpx; +} +.pub-btn{ + width: 90%; + /* height: 88rpx; */ + margin: 0 auto; + border-radius: 10rpx; + background: #3D98FF; + font-size: 32rpx; + color: #fff; +} +.text-left{ + text-align: left; +} +.arrow { + width: 10rpx; + height: 16rpx; + margin-left: 12rpx; +} +.mt10{ + margin-top: 10rpx; +} +.mt20{ + margin-top: 20rpx; +} \ No newline at end of file diff --git a/bash.exe.stackdump b/bash.exe.stackdump new file mode 100644 index 0000000..1d51404 --- /dev/null +++ b/bash.exe.stackdump @@ -0,0 +1,11 @@ +Stack trace: +Frame Function Args +00800000010 001800638AE (00180272F10, 00180263FD1, 00800000010, 000FFFFBA10) +00800000010 0018004973A (00100002000, 000FFFFCBB0, 001803480C8, 00000000002) +00800000010 00180049772 (00000000002, 001803483D8, 00800000010, 00000000008) +00800000010 0018005CBDD (000FFFFCCE0, 000FFFFCC45, 00000000000, 205C745C615C635C) +000FFFFCBBC 0018005CD4F (635C655C205C265C, 3E5C205C6F5C685C, 765C655C645C2F5C, 795C745C745C2F5C) +000FFFFCCE0 00180049EE8 (00000000000, 00000000000, 00000000000, 00000000000) +000FFFFFFF0 00180048846 (00000000000, 00000000000, 00000000000, 00000000000) +000FFFFFFF0 001800488F4 (00000000000, 00000000000, 00000000000, 00000000000) +End of stack trace diff --git a/component/articleList/index.js b/component/articleList/index.js new file mode 100644 index 0000000..c9d1433 --- /dev/null +++ b/component/articleList/index.js @@ -0,0 +1,23 @@ +// component/articleList/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/component/articleList/index.json b/component/articleList/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/articleList/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/articleList/index.wxml b/component/articleList/index.wxml new file mode 100644 index 0000000..53656b2 --- /dev/null +++ b/component/articleList/index.wxml @@ -0,0 +1,56 @@ + + + + + 社会新闻社会新闻社会新闻社会新闻 + 今天我们来讲讲社会新闻的重要性,目前春节将至,回家的人越来越多...... + + 2020.12.21 + 公开 + + + + + + + + + 社会新闻社会新闻社会新闻社会新闻 + 今天我们来讲讲社会新闻的重要性,目前春节将至,回家的人越来越多...... + + 2020.12.21 + 仅自己可见 + + + + + + + + + 社会新闻社会新闻社会新闻社会新闻 + 今天我们来讲讲社会新闻的重要性,目前春节将至,回家的人越来越多...... + + 2020.12.21 + 公开 + + + + + + + + + 社会新闻社会新闻社会新闻社会新闻 + 今天我们来讲讲社会新闻的重要性,目前春节将至,回家的人越来越多...... + + 2020.12.21 + 公开 + + + + + + + 没有更多了...... + \ No newline at end of file diff --git a/component/articleList/index.wxss b/component/articleList/index.wxss new file mode 100644 index 0000000..4917b00 --- /dev/null +++ b/component/articleList/index.wxss @@ -0,0 +1,82 @@ +.art-list-wrap { + padding: 0 30rpx 50rpx 30rpx; + background: #fff; +} + +.art-list-con { + margin-top: 20rpx; + background: #F8F8F8; + border-radius: 10rpx; + padding: 15rpx 30rpx; +} + +.list-title { + font-size: 26rpx; + color: #333; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; +} + +.list-intro { + padding-top: 12rpx; + font-size: 20rpx; + color: #666; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.list-img { + width: 165rpx; + height: 159rpx; +} + +.flex-col { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: left; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: left; + -webkit-box-align: left; +} + +.flex-row { + display: flex; +} + +.list-img { + font-size: 0; + margin-left: 45rpx; +} + +.pic { + width: 165rpx; + height: 159rpx; +} + +.list-bot { + padding-top: 28rpx; +} + +.list-left { + color: #A0A0A0; + font-size: 18rpx; +} + +.list-right { + color: #3D98FF; + font-size: 18rpx; +} + +.no-more { + padding-top: 80rpx; + text-align: center; + color: #A0A0A0; + font-size: 20rpx; +} \ No newline at end of file diff --git a/component/empty/empty.js b/component/empty/empty.js new file mode 100644 index 0000000..7c1bd2d --- /dev/null +++ b/component/empty/empty.js @@ -0,0 +1,34 @@ +// components/empty/empty.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + emptyImg: { + type: String, + value: 'https://img01.yzcdn.cn/vant/empty-image-default.png' + }, + emptyDes: { + type: String, + value: '暂无数据' + }, + arrowShow: { + type: Boolean, + value: false + }, + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) \ No newline at end of file diff --git a/component/empty/empty.json b/component/empty/empty.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/empty/empty.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/empty/empty.wxml b/component/empty/empty.wxml new file mode 100644 index 0000000..a784bbc --- /dev/null +++ b/component/empty/empty.wxml @@ -0,0 +1,5 @@ + + + +{{emptyDes}} + diff --git a/component/empty/empty.wxss b/component/empty/empty.wxss new file mode 100644 index 0000000..273cfa9 --- /dev/null +++ b/component/empty/empty.wxss @@ -0,0 +1,28 @@ +/* components/empty/empty.wxss */ + +.empty-con { + /* text-align: center; + position: fixed; + width: 320rpx; + height: 294rpx; + left: 50%; + top: 60%; + margin-left: -160rpx; + margin-top: -147rpx; */ + text-align: center; + width: 100%; +} + +.img-sty { + /* width: 240rpx; + height: 240rpx; */ + width: 50%; + margin:0 auto; +} + +.des-sty { + padding-top: 6rpx; + display: block; + font-size: 28rpx; + color: #a4a8bc; +} diff --git a/component/goodsList/index.js b/component/goodsList/index.js new file mode 100644 index 0000000..999345a --- /dev/null +++ b/component/goodsList/index.js @@ -0,0 +1,23 @@ +// component/goodsList/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/component/goodsList/index.json b/component/goodsList/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/goodsList/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/goodsList/index.wxml b/component/goodsList/index.wxml new file mode 100644 index 0000000..6d1da0d --- /dev/null +++ b/component/goodsList/index.wxml @@ -0,0 +1,36 @@ + + + + + + + + 前排出二手摄像机,九成新Nikon/尼康:型号co olpix + + + ¥2580积分 + + + + + + + + 前排出二手摄像机,九成新Nikon/尼康:型号co olpix + + + ¥2580积分 + + + + + + + + 前排出二手摄像机,九成新Nikon/尼康:型号co olpix + + + ¥2580积分 + + + \ No newline at end of file diff --git a/component/goodsList/index.wxss b/component/goodsList/index.wxss new file mode 100644 index 0000000..b79e963 --- /dev/null +++ b/component/goodsList/index.wxss @@ -0,0 +1,45 @@ +/* component/goodsList/index.wxss */ +.goods-wrap{ + padding: 0 30rpx; + clear: both; + overflow: hidden; +} +.goods-list{ + margin-top: 30rpx; + width: 48%; + background: #fff; + border-radius: 10rpx; + float: left; + padding-bottom: 19rpx; +} +.goods-list:nth-child(odd){ + margin-right: 4%; +} +.goods-img{ + font-size: 0; +} +.pic{ + width: 100%; + height: 230rpx; +} +.goods-intro{ + margin-top: 13rpx; + padding: 0 12rpx; + font-size: 24rpx; + color: #333333; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} +.list-price{ + margin-top: 14rpx; + color: #F31717; + padding: 0 12rpx; + font-size: 20rpx; +} +.price{ + display: inline-block; + font-size: 26rpx; + margin: 0 6rpx; +} \ No newline at end of file diff --git a/component/payLayer/index.js b/component/payLayer/index.js new file mode 100644 index 0000000..c313a56 --- /dev/null +++ b/component/payLayer/index.js @@ -0,0 +1,27 @@ +// component/payLayer/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + tapEvent(){ + console.log('1111') + const et = 'hide' + this.triggerEvent('callSomeFun', et) + } + } +}) diff --git a/component/payLayer/index.json b/component/payLayer/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/payLayer/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/payLayer/index.wxml b/component/payLayer/index.wxml new file mode 100644 index 0000000..4f34357 --- /dev/null +++ b/component/payLayer/index.wxml @@ -0,0 +1,20 @@ + + + + + 支付方式 + + + + + + 11111 + + + + + + + + + diff --git a/component/payLayer/index.wxss b/component/payLayer/index.wxss new file mode 100644 index 0000000..45d011e --- /dev/null +++ b/component/payLayer/index.wxss @@ -0,0 +1,84 @@ +.mask-layer{ + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgb(0, 0, 0, 0.6); + z-index: 99; +} +.flex-col { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: left; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: left; + -webkit-box-align: left; +} +.flex-row { + display: flex; +} +.layer-title{ + padding: 20rpx; + font-size: 0; +} +.layer-con{ + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background: #fff; + border-radius: 40rpx 40rpx 0px 0px; + overflow: hidden; +} +.title-con{ + text-align: center; + color: #333333; + font-size: 30rpx; +} +.close-img{ + margin-top: 10rpx; + width: 24rpx; + height: 24rpx; +} +.pay-list-wrap{ + margin-top: 40rpx; + padding: 0 30rpx; + height: 300rpx; +} +.pay-list1:first-child{ + border-top: 1px solid #e8e8e8; +} +.pay-list{ + padding: 24rpx 0; + font-size: 0; + border-bottom: 1px solid #E8E8E8; +} +.right{ + width: 27rpx; + height: 18rpx; +} +.jifen{ + width: 30rpx; + height: 30rpx; +} +.list-text{ + vertical-align: 4rpx; + font-size: 28rpx; + color: #333; + margin-left: 12rpx; +} +.btn-con{ + padding: 29rpx 54rpx; +} +.sum-btn{ + width: 100%; + background: #3D98FF; + border-radius: 10rpx; + font-size: 32rpx; + color: 32rpx; + color: #fff; +} \ No newline at end of file diff --git a/component/stepper/index.js b/component/stepper/index.js new file mode 100644 index 0000000..ab10362 --- /dev/null +++ b/component/stepper/index.js @@ -0,0 +1,103 @@ +Component({ + properties: { + value: { + type: Number, + value: 1, + }, + min: { + type: Number, + value: 1, + }, + max: { + type: Number, + value: 10000, + }, + step: { + type: Number, + value: 1 + }, + disabled: { + type: Boolean, + value: false + }, + index: { + type: Number, + value: 0 + }, + }, + data: { + }, + methods: { + //通过step属性设置每次点击增加或减少按钮时变化的值,默认为1 + getScale() { + let scale = 1; + if (this.data.step != parseInt(this.data.step)) { + //微信小程序的小数计算会出现偏差导致产生很长的无限循环的数,在这块处理一下。 + scale = Math.pow(10, (this.data.step + '').split('.')[1].length) + } + return scale; + }, + //输入操作处理 + blur: function (e) { + let value = e.detail.value + if (value) { + value = +value + if (value > this.data.max) { + value = this.data.max + } else if (value < this.data.min) { + value = this.data.min + } + } else { + value = this.data.min + } + if (value != this.data.value) { + this.setData({ + value: value + }) + } + this.handleChange(value, "blur") + }, + calcNum: function (type) { + if (this.data.disabled) { + return + } + const scale = this.getScale() + let num = this.data.value * scale + let step = this.data.step * scale + if (type === 'reduce') { + num -= step + } else if (type === 'plus') { + num += step + } + let value = num / scale + if (type === "plus" && value < this.data.min) { + value = this.data.min + } else if (type === "reduce" && value > this.data.max) { + value = this.data.max + } + if (value < this.data.min || value > this.data.max) { + return + } + this.handleChange(value, type) + }, + //增加按钮处理 + plus: function () { + this.calcNum("plus") + }, + //减少按钮处理 + reduce: function () { + this.calcNum("reduce") + }, + //事件绑定,返回值有三个,value:值 type:类型(输入,增加,减少) index(当前组件的索引) + handleChange(value, type) { + if (this.data.disabled) { + return + } + this.triggerEvent('change', { + value: value, + type: type, + index: this.data.index + }) + } + } +}) \ No newline at end of file diff --git a/component/stepper/index.json b/component/stepper/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/stepper/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/stepper/index.wxml b/component/stepper/index.wxml new file mode 100644 index 0000000..44e8e51 --- /dev/null +++ b/component/stepper/index.wxml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/component/stepper/index.wxss b/component/stepper/index.wxss new file mode 100644 index 0000000..6cdf124 --- /dev/null +++ b/component/stepper/index.wxss @@ -0,0 +1,89 @@ +.cl-stepper { + font-size: 0 +} +.cl-stepper__minus, +.cl-stepper__plus { + position: relative; + display: inline-block; + box-sizing: border-box; + margin: 0; + padding: 0; + vertical-align: middle; + border: 0; + background-color: #f7f8fa; + color: #666; + width: 42rpx; + height: 42rpx; + border-radius: 10rpx; +} + +.cl-stepper__minus:before, +.cl-stepper__plus:before { + width: 10px; + height: 2px +} + +.cl-stepper__minus:after, +.cl-stepper__plus:after { + width: 2px; + height: 10px +} + +.cl-stepper__minus:after, +.cl-stepper__minus:before, +.cl-stepper__plus:after, +.cl-stepper__plus:before { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + background-color: currentColor; + content: "" +} +.cl-stepper__minus:active, +.cl-stepper__plus:active { + background-color: #e5e5e5; +} +.cl-stepper__minus--disabled, +.cl-stepper__plus--disabled { + color: #b2b2b2; + background-color: #f7f8fa; +} + +.cl-stepper__minus--disabled, +.cl-stepper__minus--disabled.cl-stepper__minus--hover, +.cl-stepper__minus--disabled.cl-stepper__plus--hover, +.cl-stepper__plus--disabled, +.cl-stepper__plus--disabled.cl-stepper__minus--hover, +.cl-stepper__plus--disabled.cl-stepper__plus--hover { + background-color: #f7f8fa; +} + +.cl-stepper__minus:after { + display: none +} + +.cl-stepper__input { + display: inline-block; + box-sizing: border-box; + min-height: 0; + margin: 1px; + padding: 1px; + text-align: center; + vertical-align: middle; + border: 0; + border-width: 1px 0; + border-radius: 0; + -webkit-appearance: none; + font-size: 14px; + color: #333333; + width: 32px; + height: 28px; +} + +.cl-stepper__input--disabled { + color: #c8c9cc; + background-color: #f2f3f5; +} \ No newline at end of file diff --git a/component/swipers/swipers.js b/component/swipers/swipers.js new file mode 100644 index 0000000..ebfd11d --- /dev/null +++ b/component/swipers/swipers.js @@ -0,0 +1,123 @@ +// components/swiper.js +var request = require('../../utils/request.js') +Component({ + /** + * 组件的属性列表 + */ + properties: { + source: { + type: Number, + value: 0 + }, + }, + lifetimes:{ + attached: function() { + // this.getData() + } + }, + /** + * 组件的初始数据 + */ + data: { + itemList:[], + imgList:["https://mmbiz.qpic.cn/mmbiz_png/jJtBNByXZuHuxiaoUr9CGcn4ibGpJxeNXRTG4Du0I2QqibHvDcwaDWcmqvN7cRROYoIO3k4V5ok8SsH5ABTfMAjnw/0?wx_fmt=png"], + testurl:'https://mmbiz.qpic.cn/mmbiz_png/jJtBNByXZuHuxiaoUr9CGcn4ibGpJxeNXRTG4Du0I2QqibHvDcwaDWcmqvN7cRROYoIO3k4V5ok8SsH5ABTfMAjnw/0?wx_fmt=png' + }, + + /** + * 组件的方法列表 + */ + methods: { + getData(){ + request._get('/guest/finals/image',{target:this.data.source}, + (res=>{ + if(res.result == 0){ + this.setData({ + itemList:res.data + }) + console.log(res.data) + } + }) + ) + }, + Authorization(e){ + let imgUrl=e.currentTarget.dataset.imgurl + this.setData({ + testurl:imgUrl + }) + wx.getSetting({ + success:(res)=>{ + if (!res.authSetting['scope.writePhotosAlbum']) { + wx.authorize({ + scope: 'scope.writePhotosAlbum', + success:()=> { + // 同意授权 + this.saveImg(); + }, + fail: (res) =>{ + console.log(res); + } + }) + }else{ + // 已经授权了 + this.saveImg(); + } + }, + fail:(res)=>{ + console.log(res) + } + }) + }, + saveImg(){ + console.log(this.data.testurl) + wx.getImageInfo({ + src: this.data.testurl, + success:(res)=> { + let path = res.path; + wx.saveImageToPhotosAlbum({ + filePath:path, + success:(res)=> { + wx.hideLoading(); + setTimeout(() => { + wx.showToast({ + title: '图片保存成功', + icon: 'success', + duration:3000 + }) + }, 200); + }, + fail:(res)=>{ + wx.hideLoading(); + setTimeout(() => { + wx.showToast({ + title: '图片保存失败', + icon: 'error', + duration:3000 + }) + }, 200); + } + }) + }, + fail:(res)=> { + console.log(res); + } + }) + }, + jumpTarget(e){ + let imghref=e.currentTarget.dataset.imghref + if(imghref == 0){ + wx.switchTab({ + url: `/pages/baoming/geren` + }) + }else if(imghref == 1){ + wx.navigateTo({ + url: `/pages/home/jpkc` + }) + }else if(imghref == 2){ + wx.navigateTo({ + url: `/pages/baoming/erweima` + }) + } + } + } +}) diff --git a/component/swipers/swipers.json b/component/swipers/swipers.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/swipers/swipers.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/swipers/swipers.wxml b/component/swipers/swipers.wxml new file mode 100644 index 0000000..0532595 --- /dev/null +++ b/component/swipers/swipers.wxml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/component/swipers/swipers.wxss b/component/swipers/swipers.wxss new file mode 100644 index 0000000..92c6f89 --- /dev/null +++ b/component/swipers/swipers.wxss @@ -0,0 +1,7 @@ +/* components/swiper.wxss */ +.banner{ + width: 100%; +} +swiper{ + height: 420rpx; +} \ No newline at end of file diff --git a/component/tabList/index.js b/component/tabList/index.js new file mode 100644 index 0000000..1fa83a8 --- /dev/null +++ b/component/tabList/index.js @@ -0,0 +1,36 @@ +// component/tabList/test.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + step:{ + type:Number, + value: '2' + } + }, + + /** + * 组件的初始数据 + */ + data: { + addShow: false + }, + + /** + * 组件的方法列表 + */ + methods: { + jumpUrl(param){ + wx.navigateTo({ + url: param.currentTarget.dataset.url + }) + }, + pubEvent(){ + this.setData({ + addShow: !this.data.addShow + }) + console.log('发多少简历开放电视剧偶尔') + } + } +}) diff --git a/component/tabList/index.json b/component/tabList/index.json new file mode 100644 index 0000000..4575d1b --- /dev/null +++ b/component/tabList/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "component": true +} \ No newline at end of file diff --git a/component/tabList/index.wxml b/component/tabList/index.wxml new file mode 100644 index 0000000..b70a9e9 --- /dev/null +++ b/component/tabList/index.wxml @@ -0,0 +1,31 @@ + + + + + + 首页 + + + + + 附近商家 + + + + + + + + 商品列表 + + + + + 个人中心 + + + + + + + diff --git a/component/tabList/index.wxss b/component/tabList/index.wxss new file mode 100644 index 0000000..9e32116 --- /dev/null +++ b/component/tabList/index.wxss @@ -0,0 +1,82 @@ +/* component/tabList/index.wxss */ +.mask{ + position: fixed; + width: 100%; + height: 100%; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.6); +} +.mask-z{ + z-index: 99; +} +.pub-con{ + position: relative; + z-index: 9999; +} +.tab-list{ + position: fixed; + width: 100%; + left: 0; + bottom: 0; + padding: 11rpx 0; + background: #FFFFFF; + z-index: 11; +} +.flex-col { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + width: 100%; + text-align: left; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: left; + -webkit-box-align: left; +} +.flex-row { + display: flex; +} +.tc{ + text-align: center; +} +.list-item .tab-img1,.list-item .tab-img2{ + margin: 0 auto; + display: block; + width: 45rpx; + height: 35rpx; +} +.list-name{ + margin-top: 6rpx; + color: #707070; + font-size: 20rpx; +} +.list-cur .list-name{ + color: #3D98FF; +} +.list-item .tab-img2,.list-cur .tab-img1{ + display: none; +} +.list-cur .tab-img2{ + display: block; +} +.pub-img{ + width: 76rpx; + height: 69rpx; +} +.pub-list{ + position: fixed; + width: 100%; + left: 0; + bottom: 150rpx; + z-index: 11; + text-align: center; + z-index: 9999; +} +.plist{ + width: 100rpx; + height: 100rpx; +} +.pub{ + margin-right: 100rpx; +} \ No newline at end of file diff --git a/component/upload/index.js b/component/upload/index.js new file mode 100644 index 0000000..a32ed55 --- /dev/null +++ b/component/upload/index.js @@ -0,0 +1,187 @@ +// component/uploadImages/index.js +import request from '../../utils/request' +Component({ + /** + * 组件的属性列表 + */ + properties: { + count: { //最多选择图片的张数,默认9张 + type: Number, + value: 9 + }, + uploadUrl: { //图片上传的服务器路径 + type: String, + value: '' + }, + showUrl: { //图片的拼接路径 + type: String, + value: '' + }, + getListImg: { // 获取图片 + type: Array, + value: '' + } + }, + + /** + * 组件的初始数据 + */ + data: { + detailPics: [], //上传的结果图片集合 + isShow: true + }, + + ready: function () { + console.log('富家大室咖啡机少的可怜', this.data.getListImg) + if (this.data.getListImg) { + this.setData({ + detailPics: this.data.getListImg + }) + } + console.log(this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + bindlongpressimg(e) { + let index = e.currentTarget.dataset.id + let detailPics = this.data.detailPics + detailPics.splice(index, 1) + this.setData({ + detailPics + }) + console.log(this.data.detailPics) + var myEventDetail = { + picsList: this.data.detailPics + } // detail对象,提供给事件监听函数 + let show = (this.data.detailPics.length < this.data.count) ? true : false + this.setData({ + isShow: show + }) + this.triggerEvent('myevent', myEventDetail, {}) //结果返回调用的页面 + }, + uploadDetailImage: function (e) { //这里是选取图片的方法 + var that = this; + var pics = []; + var detailPics = that.data.detailPics; + if (detailPics.length >= that.data.count) { + wx.showToast({ + title: '最多选择' + that.data.count + '张!', + }) + return; + } + wx.chooseMedia({ + count: that.data.count, // 最多可以选择的图片张数,默认9, + sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 + mediaType: ['image'], + sourceType: ['album', 'camera'], + maxDuration: 15, + camera: 'back', + success(res) { + console.log(res.tempFiles) + var imgs = res.tempFiles; + for (var i = 0; i < imgs.length; i++) { + pics.push(imgs[i].tempFilePath) + } + console.log(pics) + let data = { + url: that.data.uploadUrl, //这里是你图片上传的接口 + path: pics, //这里是选取的图片的地址数组 + } + // that.imgSecCheck(pics) + that.uploadimg(data); + } + }) + }, + imgSecCheck(imgs, num = 0) { + let len = imgs.length + request._post('/firefly/wx/imgSecCheck', { + media: imgs[num] + }, + res => { + if (res.retCode == 0) { + if (len == num) { + let data = { + url: this.data.uploadUrl, //这里是你图片上传的接口 + path: imgs, //这里是选取的图片的地址数组 + } + this.uploadimg(data); + } else { + ++num + this.imgSecCheck(imgs, num) + } + } + }) + + }, + //多张图片上传 + uploadimg: function (data) { + console.log(data) + wx.showLoading({ + title: '上传中...', + mask: true, + }) + var that = this, + i = data.i ? data.i : 0, + success = data.success ? data.success : 0, + fail = data.fail ? data.fail : 0; + wx.uploadFile({ + url: data.url, + filePath: data.path[i], + header: { + 'content-type': 'multipart/form-data', + 'terminal': 'MINI-PROGRAM', + 'token': wx.getStorageSync("token") || '', + }, + name: 'file', + formData: null, + success: (resp) => { + console.log(resp) + wx.hideLoading(); + success++; + var str = resp.data //返回的结果,可能不同项目结果不一样 + var pic = JSON.parse(str); + var pic_name = pic.body.mediaURL; + var detailPics = that.data.detailPics; + detailPics.push({ + mediaId: pic.body.mediaId, + mediaPath: pic_name, + mediaURL: pic.body.mediaURL, + seq: 1 + }) + that.setData({ + detailPics: detailPics + }) + }, + fail: (res) => { + fail++; + console.log('fail:' + i + "fail:" + fail); + }, + complete: () => { + i++; + if (i == data.path.length) { //当图片传完时,停止调用 + console.log('执行完毕'); + console.log('成功:' + success + " 失败:" + fail); + var myEventDetail = { + picsList: that.data.detailPics + } // detail对象,提供给事件监听函数 + let show = (that.data.detailPics.length < that.data.count) ? true : false + that.setData({ + isShow: show + }) + var myEventOption = {} // 触发事件的选项 + that.triggerEvent('myevent', myEventDetail, myEventOption) //结果返回调用的页面 + } else { //若图片还没有传完,则继续调用函数 + data.i = i; + data.success = success; + data.fail = fail; + that.uploadimg(data); //递归,回调自己 + } + } + }); + }, + + } +}) \ No newline at end of file diff --git a/component/upload/index.json b/component/upload/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/component/upload/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/upload/index.wxml b/component/upload/index.wxml new file mode 100644 index 0000000..2b1f953 --- /dev/null +++ b/component/upload/index.wxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + 长按对应的图片即可删除 + + \ No newline at end of file diff --git a/component/upload/index.wxss b/component/upload/index.wxss new file mode 100644 index 0000000..bb02145 --- /dev/null +++ b/component/upload/index.wxss @@ -0,0 +1,92 @@ +.content { + width: 100%; + background-color: #fff; +} + +.img-list { + display: flex; + display: -webkit-flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + flex-wrap: wrap; +} + +.img-item { + width: 30%; + text-align: left; + margin-right: 20rpx; + margin-bottom: 10rpx; +} + +.img-item image { + width: 180rpx; + height: 180rpx; +} + +.submit-btn { + width: 100%; + background-color: #fff; + height: 80rpx; + text-align: center; + line-height: 80rpx; + font-size: 30rpx; + position: fixed; + bottom: 100rpx; +} + +.chooseimg { + background-color: #fff; +} + +.weui-uploader__input-box { + float: left; + position: relative; + margin-right: 9px; + margin-bottom: 9px; + width: 180rpx; + height: 180rpx; + border: 1px solid #d9d9d9; +} + +.weui-uploader__input-box:before { + width: 2px; + height: 39.5px; +} + +.weui-uploader__input-box:after, .weui-uploader__input-box:before { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #d9d9d9; +} + +.weui-uploader__input-box:after { + width: 39.5px; + height: 2px; +} + +.weui-uploader__input-box:after, .weui-uploader__input-box:before { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #d9d9d9; +} + +.tips { + color: #666; + font-size: 24rpx; + padding-bottom: 20rpx; +} + +.img-box { + width: 92%; + margin: auto; + padding-top: 20rpx; +} \ No newline at end of file diff --git a/component/upload/upload.js b/component/upload/upload.js new file mode 100644 index 0000000..a84d8df --- /dev/null +++ b/component/upload/upload.js @@ -0,0 +1,66 @@ +// component/upload/upload.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/component/upload/upload.json b/component/upload/upload.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/component/upload/upload.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/component/upload/upload.wxml b/component/upload/upload.wxml new file mode 100644 index 0000000..3b470ad --- /dev/null +++ b/component/upload/upload.wxml @@ -0,0 +1,2 @@ + +component/upload/upload.wxml diff --git a/component/upload/upload.wxss b/component/upload/upload.wxss new file mode 100644 index 0000000..605c24a --- /dev/null +++ b/component/upload/upload.wxss @@ -0,0 +1 @@ +/* component/upload/upload.wxss */ \ No newline at end of file diff --git a/images/arrow_right.png b/images/arrow_right.png new file mode 100644 index 0000000..f05f94d Binary files /dev/null and b/images/arrow_right.png differ diff --git a/images/article/good.png b/images/article/good.png new file mode 100644 index 0000000..ffdefda Binary files /dev/null and b/images/article/good.png differ diff --git a/images/article/good_cur.png b/images/article/good_cur.png new file mode 100644 index 0000000..7b25a3f Binary files /dev/null and b/images/article/good_cur.png differ diff --git a/images/article/money.png b/images/article/money.png new file mode 100644 index 0000000..a5d50f6 Binary files /dev/null and b/images/article/money.png differ diff --git a/images/article/share.png b/images/article/share.png new file mode 100644 index 0000000..52a4b9c Binary files /dev/null and b/images/article/share.png differ diff --git a/images/back1.png b/images/back1.png new file mode 100644 index 0000000..68d2444 Binary files /dev/null and b/images/back1.png differ diff --git a/images/bar/add_cur.png b/images/bar/add_cur.png new file mode 100644 index 0000000..26fe395 Binary files /dev/null and b/images/bar/add_cur.png differ diff --git a/images/bar/icon_add.png b/images/bar/icon_add.png new file mode 100644 index 0000000..26fe395 Binary files /dev/null and b/images/bar/icon_add.png differ diff --git a/images/bar/icon_center.png b/images/bar/icon_center.png new file mode 100644 index 0000000..1792d1a Binary files /dev/null and b/images/bar/icon_center.png differ diff --git a/images/bar/icon_center_cur.png b/images/bar/icon_center_cur.png new file mode 100644 index 0000000..bca656b Binary files /dev/null and b/images/bar/icon_center_cur.png differ diff --git a/images/bar/icon_home.png b/images/bar/icon_home.png new file mode 100644 index 0000000..0650463 Binary files /dev/null and b/images/bar/icon_home.png differ diff --git a/images/bar/icon_home_cur.png b/images/bar/icon_home_cur.png new file mode 100644 index 0000000..c4de72d Binary files /dev/null and b/images/bar/icon_home_cur.png differ diff --git a/images/bar/icon_list.png b/images/bar/icon_list.png new file mode 100644 index 0000000..6979102 Binary files /dev/null and b/images/bar/icon_list.png differ diff --git a/images/bar/icon_list_cur.png b/images/bar/icon_list_cur.png new file mode 100644 index 0000000..1e52f7e Binary files /dev/null and b/images/bar/icon_list_cur.png differ diff --git a/images/bar/icon_near.png b/images/bar/icon_near.png new file mode 100644 index 0000000..0002ec8 Binary files /dev/null and b/images/bar/icon_near.png differ diff --git a/images/bar/icon_near_cur.png b/images/bar/icon_near_cur.png new file mode 100644 index 0000000..76ff1fb Binary files /dev/null and b/images/bar/icon_near_cur.png differ diff --git a/images/bar/pub.png b/images/bar/pub.png new file mode 100644 index 0000000..476e0fa Binary files /dev/null and b/images/bar/pub.png differ diff --git a/images/bar/pub1.png b/images/bar/pub1.png new file mode 100644 index 0000000..06eb006 Binary files /dev/null and b/images/bar/pub1.png differ diff --git a/images/bar/pub2.png b/images/bar/pub2.png new file mode 100644 index 0000000..7fd8d50 Binary files /dev/null and b/images/bar/pub2.png differ diff --git a/images/buy/add.png b/images/buy/add.png new file mode 100644 index 0000000..dfb8eea Binary files /dev/null and b/images/buy/add.png differ diff --git a/images/buy/address.png b/images/buy/address.png new file mode 100644 index 0000000..aed9e00 Binary files /dev/null and b/images/buy/address.png differ diff --git a/images/buy/close.png b/images/buy/close.png new file mode 100644 index 0000000..e28f6cc Binary files /dev/null and b/images/buy/close.png differ diff --git a/images/buy/jifen.png b/images/buy/jifen.png new file mode 100644 index 0000000..714380c Binary files /dev/null and b/images/buy/jifen.png differ diff --git a/images/buy/reduce.png b/images/buy/reduce.png new file mode 100644 index 0000000..d2a0422 Binary files /dev/null and b/images/buy/reduce.png differ diff --git a/images/buy/right.png b/images/buy/right.png new file mode 100644 index 0000000..eb43e97 Binary files /dev/null and b/images/buy/right.png differ diff --git a/images/buy/select.png b/images/buy/select.png new file mode 100644 index 0000000..ae3b1ad Binary files /dev/null and b/images/buy/select.png differ diff --git a/images/buy/selected.png b/images/buy/selected.png new file mode 100644 index 0000000..0ceb44e Binary files /dev/null and b/images/buy/selected.png differ diff --git a/images/group.png b/images/group.png new file mode 100644 index 0000000..f7c9cb5 Binary files /dev/null and b/images/group.png differ diff --git a/images/home/code.png b/images/home/code.png new file mode 100644 index 0000000..25997c8 Binary files /dev/null and b/images/home/code.png differ diff --git a/images/home/icon_chen.png b/images/home/icon_chen.png new file mode 100644 index 0000000..8374719 Binary files /dev/null and b/images/home/icon_chen.png differ diff --git a/images/home/icon_love.png b/images/home/icon_love.png new file mode 100644 index 0000000..1a6100b Binary files /dev/null and b/images/home/icon_love.png differ diff --git a/images/home/icon_menu1.png b/images/home/icon_menu1.png new file mode 100644 index 0000000..9f4cd54 Binary files /dev/null and b/images/home/icon_menu1.png differ diff --git a/images/home/icon_menu3.png b/images/home/icon_menu3.png new file mode 100644 index 0000000..c44fe00 Binary files /dev/null and b/images/home/icon_menu3.png differ diff --git a/images/home/icon_menu4.png b/images/home/icon_menu4.png new file mode 100644 index 0000000..b22f123 Binary files /dev/null and b/images/home/icon_menu4.png differ diff --git a/images/home/icon_pocket.png b/images/home/icon_pocket.png new file mode 100644 index 0000000..ff8b886 Binary files /dev/null and b/images/home/icon_pocket.png differ diff --git a/images/home/icon_search.png b/images/home/icon_search.png new file mode 100644 index 0000000..eff13c6 Binary files /dev/null and b/images/home/icon_search.png differ diff --git a/images/home/icon_shake.png b/images/home/icon_shake.png new file mode 100644 index 0000000..da1f6cd Binary files /dev/null and b/images/home/icon_shake.png differ diff --git a/images/home/msg.png b/images/home/msg.png new file mode 100644 index 0000000..89737da Binary files /dev/null and b/images/home/msg.png differ diff --git a/images/home/search.png b/images/home/search.png new file mode 100644 index 0000000..2aa8b26 Binary files /dev/null and b/images/home/search.png differ diff --git a/images/login_title.png b/images/login_title.png new file mode 100644 index 0000000..d901e55 Binary files /dev/null and b/images/login_title.png differ diff --git a/images/my/bg.png b/images/my/bg.png new file mode 100644 index 0000000..ef3fb34 Binary files /dev/null and b/images/my/bg.png differ diff --git a/images/my/clear.png b/images/my/clear.png new file mode 100644 index 0000000..f78f87b Binary files /dev/null and b/images/my/clear.png differ diff --git a/images/my/crown.png b/images/my/crown.png new file mode 100644 index 0000000..ddff4ad Binary files /dev/null and b/images/my/crown.png differ diff --git a/images/my/head.png b/images/my/head.png new file mode 100644 index 0000000..9eb7fd5 Binary files /dev/null and b/images/my/head.png differ diff --git a/images/my/head1.png b/images/my/head1.png new file mode 100644 index 0000000..3331ccc Binary files /dev/null and b/images/my/head1.png differ diff --git a/images/my/icon_integral1.png b/images/my/icon_integral1.png new file mode 100644 index 0000000..a713a0a Binary files /dev/null and b/images/my/icon_integral1.png differ diff --git a/images/my/icon_integral2.png b/images/my/icon_integral2.png new file mode 100644 index 0000000..39d405a Binary files /dev/null and b/images/my/icon_integral2.png differ diff --git a/images/my/icon_integral3.png b/images/my/icon_integral3.png new file mode 100644 index 0000000..67ed5d1 Binary files /dev/null and b/images/my/icon_integral3.png differ diff --git a/images/my/icon_right1.png b/images/my/icon_right1.png new file mode 100644 index 0000000..50b5597 Binary files /dev/null and b/images/my/icon_right1.png differ diff --git a/images/my/icon_right2.png b/images/my/icon_right2.png new file mode 100644 index 0000000..f8bd2b6 Binary files /dev/null and b/images/my/icon_right2.png differ diff --git a/images/my/icon_right3.png b/images/my/icon_right3.png new file mode 100644 index 0000000..cd2f783 Binary files /dev/null and b/images/my/icon_right3.png differ diff --git a/images/my/icon_right4.png b/images/my/icon_right4.png new file mode 100644 index 0000000..0161916 Binary files /dev/null and b/images/my/icon_right4.png differ diff --git a/images/near/position.png b/images/near/position.png new file mode 100644 index 0000000..c414083 Binary files /dev/null and b/images/near/position.png differ diff --git a/images/near/star1.png b/images/near/star1.png new file mode 100644 index 0000000..1340d3d Binary files /dev/null and b/images/near/star1.png differ diff --git a/images/near/star2.png b/images/near/star2.png new file mode 100644 index 0000000..b6ab227 Binary files /dev/null and b/images/near/star2.png differ diff --git a/images/near/success.png b/images/near/success.png new file mode 100644 index 0000000..36d0eb7 Binary files /dev/null and b/images/near/success.png differ diff --git a/images/play.png b/images/play.png new file mode 100644 index 0000000..737dadc Binary files /dev/null and b/images/play.png differ diff --git a/images/select.png b/images/select.png new file mode 100644 index 0000000..5945191 Binary files /dev/null and b/images/select.png differ diff --git a/images/shop/addr.png b/images/shop/addr.png new file mode 100644 index 0000000..df530fd Binary files /dev/null and b/images/shop/addr.png differ diff --git a/images/shop/collect.png b/images/shop/collect.png new file mode 100644 index 0000000..502e525 Binary files /dev/null and b/images/shop/collect.png differ diff --git a/images/shop/collect_cur.png b/images/shop/collect_cur.png new file mode 100644 index 0000000..94de2f7 Binary files /dev/null and b/images/shop/collect_cur.png differ diff --git a/images/shop/good.png b/images/shop/good.png new file mode 100644 index 0000000..29a3598 Binary files /dev/null and b/images/shop/good.png differ diff --git a/images/shop/good_cur.png b/images/shop/good_cur.png new file mode 100644 index 0000000..c570d65 Binary files /dev/null and b/images/shop/good_cur.png differ diff --git a/images/shop/tel.png b/images/shop/tel.png new file mode 100644 index 0000000..5e1cd47 Binary files /dev/null and b/images/shop/tel.png differ diff --git a/images/task/icon_pic1.png b/images/task/icon_pic1.png new file mode 100644 index 0000000..aab51f5 Binary files /dev/null and b/images/task/icon_pic1.png differ diff --git a/images/task/icon_pic2.png b/images/task/icon_pic2.png new file mode 100644 index 0000000..64f1c9f Binary files /dev/null and b/images/task/icon_pic2.png differ diff --git a/images/task/icon_pic3.png b/images/task/icon_pic3.png new file mode 100644 index 0000000..53e5e80 Binary files /dev/null and b/images/task/icon_pic3.png differ diff --git a/images/task/icon_pic4.png b/images/task/icon_pic4.png new file mode 100644 index 0000000..9a8270d Binary files /dev/null and b/images/task/icon_pic4.png differ diff --git a/images/task/icon_pic5.png b/images/task/icon_pic5.png new file mode 100644 index 0000000..a67571f Binary files /dev/null and b/images/task/icon_pic5.png differ diff --git a/images/task/icon_pic6.png b/images/task/icon_pic6.png new file mode 100644 index 0000000..63ed500 Binary files /dev/null and b/images/task/icon_pic6.png differ diff --git a/images/team.png b/images/team.png new file mode 100644 index 0000000..1dc3b82 Binary files /dev/null and b/images/team.png differ diff --git a/pages/.DS_Store b/pages/.DS_Store new file mode 100644 index 0000000..7362e85 Binary files /dev/null and b/pages/.DS_Store differ diff --git a/pages/achieve/detail.js b/pages/achieve/detail.js new file mode 100644 index 0000000..eea4da5 --- /dev/null +++ b/pages/achieve/detail.js @@ -0,0 +1,92 @@ +// pages/achieve/detail.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + achieveItem:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let achieveItem = wx.getStorageSync('achieveItem'); + this.setData({ + achieveItem + }) + }, + onShareAppMessage:function(){ + wx.showShareMenu({ + withShareTicket:true, + menus:['shareAppMessage','shareTimeline'], + complete: (res) => {}, + }) + }, + onShareTimeline: function () { + return { + title: '', + query: { + key: value + }, + imageUrl: '' + } + }, + Mtask(e){ + let achvTitleId=e.currentTarget.dataset.achv + let categoryId=e.currentTarget.dataset.category + console.log(achvTitleId) + wx.navigateTo({ + url: '/pages/article/publish?achvTitleId='+achvTitleId+'&categoryId='+categoryId, + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/achieve/detail.json b/pages/achieve/detail.json new file mode 100644 index 0000000..16c2f76 --- /dev/null +++ b/pages/achieve/detail.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "成就详情" +} \ No newline at end of file diff --git a/pages/achieve/detail.wxml b/pages/achieve/detail.wxml new file mode 100644 index 0000000..eb082c3 --- /dev/null +++ b/pages/achieve/detail.wxml @@ -0,0 +1,35 @@ + + + + +{{achieveItem.intro}} +恭喜你!已获得{{achieveItem.titleName}}成就! +暂未获得该成就 + + + + + + {{item.title}} + {{item.content}} + {{item.createdAt}} + + + + + + + + + + + \ No newline at end of file diff --git a/pages/achieve/detail.wxss b/pages/achieve/detail.wxss new file mode 100644 index 0000000..4889adf --- /dev/null +++ b/pages/achieve/detail.wxss @@ -0,0 +1,107 @@ +/* pages/achieve/detail.wxss */ +page{ + background: #fff; +} +.team-img{ + margin-top: 45px; + text-align: center; +} +.team-img image{ + width: 140px; + height: 136px; +} +.team-title{ + font-size: 17px; + font-weight: bold; + margin-top: 20px; +} +.team-finish{ + color: #484848; + font-size: 14px; + margin-top: 8px; +} +.shi-con{ + margin-top: 35px; + padding: 0 25px; + font-size: 13px; + color: #333; +} +.shi-title{ + font-size: 15px; +} +.shi-art{ + margin-top: 10px; +} +.right-img image{ + width: 82px; + height: 82px; + margin-left: 24px; +} +.news-list{ + margin-top: 40px; + padding: 0 25px; +} +.news-item{ + margin-top: 20rpx; + padding: 16rpx 16rpx; + background: #F8F8F8; + border-radius: 10rpx; +} +.news-title{ + font-size: 13px; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp:1; + -webkit-box-orient: vertical; +} +.news-con{ + margin-top: 7px; + font-size: 10px; + color: #666666; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp:2; + -webkit-box-orient: vertical; +} +.news-time{ + margin-top: 16rpx; + font-size: 9px; + color: #A0A0A0; +} +.ac-con{ + margin-top: 10px; + display: inline-block; + position: relative; + border: 1px solid #3D98FF; + font-size: 10px; + padding: 3px 10px; + border-radius: 20px; + color: #3D98FF; +} +.ac-con::before{ + content: ""; + position: absolute; + left: 50%; + top: -8px; + margin-left: -7px; + width:0; + height:0; + border-right:7px solid transparent; + border-left:7px solid transparent; + border-bottom:7px solid #3D98FF; +} +.btn-con{ + position: absolute; + left: 0; + bottom: 20rpx; + width: 100%; +} +.btn-con button{ + width: 100%; + background: linear-gradient(270deg, #92BBFF 0%, #3D98FF 100%); + color: #fff; + font-size: 28rpx; +} \ No newline at end of file diff --git a/pages/add/add.js b/pages/add/add.js new file mode 100644 index 0000000..91261ee --- /dev/null +++ b/pages/add/add.js @@ -0,0 +1,81 @@ +// pages/add/add.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + release(e){ + let num=e.currentTarget.dataset.num + let url = '/pages/article/publish' + if(num == 1){ + url = '/pages/article/publish' + }else if(num == 2){ + url = '/pages/article/publish1' + }else if(num == 3){ + url = '/pages/article/publish2' + }else if(num == 4){ + url = '/pages/article/publish3' + } + wx.navigateTo({ + url: url + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/add/add.json b/pages/add/add.json new file mode 100644 index 0000000..b125b5b --- /dev/null +++ b/pages/add/add.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "发布" +} \ No newline at end of file diff --git a/pages/add/add.wxml b/pages/add/add.wxml new file mode 100644 index 0000000..4c11a5a --- /dev/null +++ b/pages/add/add.wxml @@ -0,0 +1,23 @@ + + + + + + 上传 + 文章 + + + 上传 + 商品 + + + 商家 + 优惠 + + + 上传 + 视频 + + \ No newline at end of file diff --git a/pages/add/add.wxss b/pages/add/add.wxss new file mode 100644 index 0000000..80b6e3a --- /dev/null +++ b/pages/add/add.wxss @@ -0,0 +1,25 @@ +/* pages/add/add.wxss */ +.pub-list{ + position: fixed; + width: 100%; + left: 0; + bottom: 150rpx; + z-index: 11; + text-align: center; + z-index: 9999; +} +.plist{ + width: 100rpx; + height: 100rpx; +} +.pub{ + margin-right: 100rpx; +} +.video-text{ + border-radius: 100rpx; + color: #fff; + padding: 20rpx 30rpx; + font-size: 26rpx; + margin-right: 5%; + margin-left: 5%; +} \ No newline at end of file diff --git a/pages/article/assets/iconfont.wxss b/pages/article/assets/iconfont.wxss new file mode 100644 index 0000000..9ff2f5c --- /dev/null +++ b/pages/article/assets/iconfont.wxss @@ -0,0 +1,240 @@ +@font-face {font-family: "iconfont"; + src: url('//at.alicdn.com/t/font_945958_zfsfjju1dim.eot?t=1547618146468'); /* IE9 */ + src: url('//at.alicdn.com/t/font_945958_zfsfjju1dim.eot?t=1547618146468#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABdkAAsAAAAALvAAABcWAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCKSgrBdLN+ATYCJAOBZAt0AAQgBYRtB4YRG7smRSQnqz4jqjWV7P9bAidjcG3cMssRirV6WRdYIhSPI7KwpqTEWqtc6K4YeK6yr9OvxbcdprxM/yib6gio0BZ+n7Rt/V9XwX9lINMYSgkPeG++5I+ba4GUClKqlqSIS6hYyq38QNv8d5x65OEhRh+sdQE7jL5NnPgnihL75TgDFuUqOW2WuvRY8VkVv8LJj8Zl6Y80f+Xx8HZ7/9/tWGoR13aUWBZEaSABZpQkkIVz9psLXwo4ADJiSk74UeimQCl/LdkLu3A5Lb9fLdiAfKs0jVd6s5bW0vrllU9aXUOpAIbgIBQAP4AF4GQAwNjv66z+twPSe3YyEXkJoUQ7zmyGcJHc2NVJ3y0N0HJgEQJLfBSQrqKmOVa8TZaSWNiEpAWmBqH+vylGDwgxZs4BANAGCCDwC//E1Xjv8RV9Igu2Cl/+HldFYWn3eMChdGNoISXOzb/OdLV8cYCdC0/AGw1beE226f8vwwcrF1k++JYDtkM61rHsAPEEG2Or7ysYCtZdilMAh63AY6e+jmP3qVBzmePWPyDU3kl9GHOfD1sDjzw0JUUixbX+Wp8hgFtelxinUgsImeg1AURf5lWDUKiZim3BSbAlb2vGLpQztwwCn/z74mMcDpJV0LsvzqI6oL+d0InD/qznq9VobgRW78AAXWBCntKlOKD+qsvgPvzOkJgBa0Wm9DtBKi1KPiNGnaXW2aLZ9/6ZPFXz5zLruHXfxERF2tTejuTtxONJF9iLS6Lns9rShlznoJfC2gm2xX10zPS5AVb8KQ8QMjwkL7egkJi0FB+/AJMlLCIqwebg5LJkiEvKyskrKCopq6iqqWtoamnr6OrpGxgaGZuYmplbQDTY9ALkba+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RMXEJSSlpGVk5eQVFJWUVVTV1DU0tbR1dP38DQyNjE1MzcwtLKuqMVtT9KrP0JsUaWhk/CabMH/1WRdjgofKhATi2CxnB6Kc7qZla3Xb1rvDmEkOpGHXBFuD7SINgxnJYb5Z0PvcQI6jT0SOp4dn91nRNwSUta6ARsfSrT/P5vrM0kdBlqntqCG1lks6Vi93QlOr5u97aonh1FOcnBq8QdR4wqExkrzaW5f7AmNj1NAZWQ59MgTpjaSWhFdE8Bzh0XaWepES2wsqlbKXHE5wTUKpANbiJqQ1/wLpp3lYWQnFrDTohLqtfi9jptUg3kCLtlZoZno1PtjMaWeGvjTgYTSTOQE0StHQlpoAqaOVCfpXzbpCRQaWD7KwT3FdwTiSlf2LcJ8qJC/TVUrrYJNqlXbggl6/ttgSM2d8kX1mqbHHAnBUpPOkmB6pCGS0w1xScmAefUjxbZ1IAvot2ro1f15aBkAFI/1KCIzd4e') format('woff2'), + url('//at.alicdn.com/t/font_945958_zfsfjju1dim.woff?t=1547618146468') format('woff'), + url('//at.alicdn.com/t/font_945958_zfsfjju1dim.ttf?t=1547618146468') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + url('//at.alicdn.com/t/font_945958_zfsfjju1dim.svg?t=1547618146468#iconfont') format('svg'); /* iOS 4.1- */ +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-redo:before { + content: "\e627"; +} + +.icon-undo:before { + content: "\e633"; +} + +.icon-indent:before { + content: "\eb28"; +} + +.icon-outdent:before { + content: "\e6e8"; +} + +.icon-fontsize:before { + content: "\e6fd"; +} + +.icon-format-header-1:before { + content: "\e860"; +} + +.icon-format-header-4:before { + content: "\e863"; +} + +.icon-format-header-5:before { + content: "\e864"; +} + +.icon-format-header-6:before { + content: "\e865"; +} + +.icon-clearup:before { + content: "\e64d"; +} + +.icon-preview:before { + content: "\e631"; +} + +.icon-date:before { + content: "\e63e"; +} + +.icon-fontbgcolor:before { + content: "\e678"; +} + +.icon-clearedformat:before { + content: "\e67e"; +} + +.icon-font:before { + content: "\e684"; +} + +.icon-723bianjiqi_duanhouju:before { + content: "\e65f"; +} + +.icon-722bianjiqi_duanqianju:before { + content: "\e660"; +} + +.icon-text_color:before { + content: "\e72c"; +} + +.icon-format-header-2:before { + content: "\e75c"; +} + +.icon-format-header-3:before { + content: "\e75d"; +} + +.icon--checklist:before { + content: "\e664"; +} + +.icon-baocun:before { + content: "\ec09"; +} + +.icon-line-height:before { + content: "\e7f8"; +} + +.icon-quanping:before { + content: "\ec13"; +} + +.icon-direction-rtl:before { + content: "\e66e"; +} + +.icon-direction-ltr:before { + content: "\e66d"; +} + +.icon-selectall:before { + content: "\e62b"; +} + +.icon-fuzhi:before { + content: "\ec7a"; +} + +.icon-shanchu:before { + content: "\ec7b"; +} + +.icon-bianjisekuai:before { + content: "\ec7c"; +} + +.icon-fengexian:before { + content: "\ec7f"; +} + +.icon-dianzan:before { + content: "\ec80"; +} + +.icon-charulianjie:before { + content: "\ec81"; +} + +.icon-charutupian:before { + content: "\ec82"; +} + +.icon-wuxupailie:before { + content: "\ec83"; +} + +.icon-juzhongduiqi:before { + content: "\ec84"; +} + +.icon-yinyong:before { + content: "\ec85"; +} + +.icon-youxupailie:before { + content: "\ec86"; +} + +.icon-youduiqi:before { + content: "\ec87"; +} + +.icon-zitidaima:before { + content: "\ec88"; +} + +.icon-xiaolian:before { + content: "\ec89"; +} + +.icon-zitijiacu:before { + content: "\ec8a"; +} + +.icon-zitishanchuxian:before { + content: "\ec8b"; +} + +.icon-zitishangbiao:before { + content: "\ec8c"; +} + +.icon-zitibiaoti:before { + content: "\ec8d"; +} + +.icon-zitixiahuaxian:before { + content: "\ec8e"; +} + +.icon-zitixieti:before { + content: "\ec8f"; +} + +.icon-zitiyanse:before { + content: "\ec90"; +} + +.icon-zuoduiqi:before { + content: "\ec91"; +} + +.icon-zitiyulan:before { + content: "\ec92"; +} + +.icon-zitixiabiao:before { + content: "\ec93"; +} + +.icon-zuoyouduiqi:before { + content: "\ec94"; +} + +.icon-duigoux:before { + content: "\ec9e"; +} + +.icon-guanbi:before { + content: "\eca0"; +} + +.icon-shengyin_shiti:before { + content: "\eca5"; +} + +.icon-Character-Spacing:before { + content: "\e964"; +} diff --git a/pages/article/assets/weui.wxss b/pages/article/assets/weui.wxss new file mode 100644 index 0000000..f02b805 --- /dev/null +++ b/pages/article/assets/weui.wxss @@ -0,0 +1,39 @@ +.ql-container { + box-sizing: border-box; + width: 100%; + height: 100%; + font-size: 16px; + line-height: 1.5; + overflow: auto; + padding: 10px 10px 20px 10px; + border: 1px solid #ECECEC; +} + +.ql-active { + color: #22C704; +} + +.iconfont { + display: inline-block; + width: 30px; + height: 30px; + cursor: pointer; + font-size: 20px; +} + +.toolbar { + box-sizing: border-box; + padding: 0 10px; + height: 50px; + width: 100%; + position: fixed; + left: 0; + right: 100%; + bottom: 0; + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ECECEC; + border-left: none; + border-right: none; +} diff --git a/pages/article/detail.js b/pages/article/detail.js new file mode 100644 index 0000000..9836f44 --- /dev/null +++ b/pages/article/detail.js @@ -0,0 +1,161 @@ +// pages/article/detail.js +import request from '../../utils/request' +Page({ + + /** + * 页面的初始数据 + */ + data: { + detailInfo:{}, + userInfo:{}, + list:[], + pageNum:1, + pageSize:10, + articleId:'', + content:'', + isLike:false, + listList:[] + }, + msgWord: function (e) { + this.setData({msgWord: e.detail.value}) // 把值给keyWord + }, + setLike(){ + let data = { + category: this.data.detailInfo.categoryId, + refereceId: this.data.articleId, + action: this.data.isLike?2:1 + } + request._post('/firefly/account-like/like/do', data, + res=>{ + if(res.retCode ==0){ + setTimeout(() => { + wx.showToast({ + title: '积分'+res.body.points, + icon: 'none', + duration:2000 + }) + }, 100); + this.getData() + } + }) + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + userInfo: wx.getStorageSync("userInfo"), + articleId:options.id + }) + this.getData() + this.getList() + }, + add(){ + request._post('/firefly/article/comment/add/new',{articleId:this.data.articleId,content:this.data.content,isReply:2,replyId:0}, + res=>{ + if(res.retCode ==0){ + setTimeout(() => { + wx.showToast({ + title: '发布成功,获得'+res.body.points+'积分!', + icon: 'none', + duration:2000 + }) + }, 100); + this.getList() + } + } + ) + }, + getList(id){ + request._post('/firefly/article/comment/list',{articleId:this.data.articleId,pageNum:this.data.pageNum,pageSize:this.data.pageSize}, + res=>{ + if(res.retCode ==0){ + this.setData({ + list:res.body + }) + } + } + ) + }, + subEvent(){ + const data = { + articleId: this.data.detailInfo.id, + content: this.data.msgWord, + isReply: 2, + replyId: '' + } + request._post('/firefly/article/comment/add/new', data, + res=>{ + + }) + }, + getData(id){ + request._post('/firefly/article/detail',{articleId:this.data.articleId}, + res=>{ + if(res.retCode ==0){ + let userInfo = wx.getStorageSync("userInfo") + let a = res.body.accountLike.filter(item=>item.accountId==userInfo.id) + console.log(a.length) + this.setData({ + detailInfo:res.body, + listList:res.body.accountLike, + isLike:a.length>0?true:false + }) + } + } + ) + }, + getInputContent(e){ + this.setData({ + content: e.detail.value + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/article/detail.json b/pages/article/detail.json new file mode 100644 index 0000000..c59efc1 --- /dev/null +++ b/pages/article/detail.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "文章详情" +} \ No newline at end of file diff --git a/pages/article/detail.wxml b/pages/article/detail.wxml new file mode 100644 index 0000000..bb69385 --- /dev/null +++ b/pages/article/detail.wxml @@ -0,0 +1,79 @@ + + + + {{detailInfo.title}} + + + + + {{detailInfo.nickName}} + + + {{detailInfo.updatedAt}} + + + + + + + + + + + + + + + + + + + + {{detailInfo.likeCount?detailInfo.likeCount:''}} + + + + + + + + 全部留言 + + + + + + + 发布 + + + + + + + {{item.nickName}} + + {{item.content}} + + {{item.createdAt}} + + + + + + \ No newline at end of file diff --git a/pages/article/detail.wxss b/pages/article/detail.wxss new file mode 100644 index 0000000..72310ff --- /dev/null +++ b/pages/article/detail.wxss @@ -0,0 +1,179 @@ +/* pages/article/detail.wxss */ +.detail-title { + margin-top: 35rpx; + font-size: 30rpx; + font-weight: bold; + line-height: 54rpx; + color: #333333; +} + +.info-con { + margin-top: 20rpx; + font-size: 24rpx; + color: #666; +} + +.info-left text { + font-size: 22rpx; +} + +.article-list { + font-size: 26rpx; + font-weight: 400; + line-height: 42rpx; + color: #333333; +} + +.article-list image { + margin-top: 30rpx; + /* margin:0 auto; */ + width: 100%; + /* height: 307rpx; */ +} +.info-title{ + margin-top: 20rpx; + text-align: center; + color: #333333; + font-weight: bold; + font-size: 28rpx; +} +.art-info{ + margin-top: 20rpx; + font-size: 28rpx; +} +.wrap{ + background: #fff; + overflow: hidden; +} +.opra-con{ + margin-top: 40rpx; + padding-top: 30rpx; + padding-bottom: 30rpx; + font-size: 26rpx; + color: #181818; + border-top: 1px solid #E6E6E6; +} +.comment-con{ + margin-top: 30rpx; + padding-bottom: 10rpx; +} +.opra-con image{ + width: 38rpx; + height: 38rpx; + vertical-align: -7rpx; + margin-right: 12rpx; +} +.comment-img{ + width: 59rpx; + height: 59rpx; + margin-right: 20rpx; +} +.comment-list{ + margin-top: 32rpx; + padding-bottom: 15rpx; + border-bottom: 1rpx solid #ffffff; +} +.comment-text{ + padding-left: 30rpx; + background: #fff; + border-radius: 10rpx; + font-size: 24rpx; +} +.list-head{ + font-size: 28rpx; + color: #181818; +} +.list-head image{ + width: 45rpx; + height: 45rpx; + vertical-align: -15rpx; + margin-right: 14rpx; + border-radius: 50%; +} +.list-intro{ + padding-top: 20rpx; + color: #181818; + font-size: 24rpx; +} +.bot-right image{ + width: 28rpx; + height: 28rpx; + vertical-align: -5rpx; + margin-right: 4rpx; +} +/* .right-img{ + width: 28rpx; + height: 28rpx; +} */ +.bot-right{ + font-size: 20rpx; + color: #333333; +} +.list-date{ + color: #828282; + font-size: 20rpx; +} +.list-bot{ + padding-top: 21rpx; +} +.bot-right-cur{ + color: #3D98FF; +} +.title{ + padding-top: 24rpx; + font-size: 32rpx; + color: #333333; + font-weight: bold; +} +.title text{ + font-size: 28rpx; + font-weight: normal; +} +.enter-con{ + margin-top: 20rpx; + padding-bottom: 20rpx; +} +.head1{ + width: 30rpx; + height: 30rpx; + margin-right: 20rpx; + border-radius: 50%; + vertical-align: -5rpx; +} +.head{ + width: 59rpx; + height: 59rpx; + margin-right: 20rpx; + border-radius: 50%; +} +.enter-text{ + font-size: 24rpx; + background: #F8F8F8; + border-radius: 10px; + height: 64rpx; + width: 96%; + padding-left: 4%; +} +.wrap{ + padding-left: 30rpx; + padding-right: 30rpx; +} +.sub-btn{ + padding: 0; + display: block; + width: 80px; + height: 60rpx; + line-height: 60rpx; + margin: 0; + text-align: center; + background: #3D98FF; + color: #fff; + font-size: 24rpx; + border-radius: 10rpx; + margin-top: 10rpx; + margin-left: 10px; +} +.del-img{ + width: 30px; + height: 30px; +} \ No newline at end of file diff --git a/pages/article/publish.js b/pages/article/publish.js new file mode 100644 index 0000000..d9efeb8 --- /dev/null +++ b/pages/article/publish.js @@ -0,0 +1,281 @@ +// pages/article/publish.js +import request from '../../utils/request' +Page({ + + /** + * 页面的初始数据 + */ + data: { + formats: {}, + readOnly: false, + placeholder: '开始输入...', + editorHeight: 300, + keyboardHeight: 0, + isIOS: false, + categoryList:[], + currentTab: 0, + layerHide:false, + typeName:'', + countPic:9,//上传图片最大数量 + showImgUrl: "https://api.fireflysg.com", //路径拼接,一般上传返回的都是文件名, + uploadImgUrl:'https://api.fireflysg.com/firefly/media-room/photo/upload',//图片的上传的路径 + switch: false, + categoryId:1,//文章分类 Id, + imgList:[], + title:'', + content:'', + achvTitleId:'' + }, + onEditorReady() { + const that = this + wx.createSelectorQuery().select('#editor').context(function (res) { + that.editorCtx = res.context + }).exec() + }, + readOnlyChange() { + this.setData({ + readOnly: !this.data.readOnly + }) + }, + insertImage() { + const that = this + wx.chooseImage({ + count: 1, + success: function (res) { + that.editorCtx.insertImage({ + src: res.tempFilePaths[0], + data: { + id: 'abcd', + role: 'god' + }, + width: '80%', + success: function () { + console.log('insert image success') + } + }) + } + }) + }, + submit(){ + const that = this + that.editorCtx.getContents({ + success: function (res) { + that.getInfo(res.html) + } + }) + }, + getInfo(){ + let datas={ + title:this.data.title, + categoryId:this.data.categoryId, + achvTitleId:this.data.achvTitleId, + content: this.data.content, + contentStyle: 1, + display:this.data.switch?1:2, + mediaList:this.data.imgList + } + request._post('/firefly/article/add/new',datas, + res=>{ + if(res.retCode == 0){ + wx.hideLoading(); + setTimeout(() => { + wx.showToast({ + title: '发布成功,获得'+res.body.points+'积分!', + icon: 'none', + duration:2000 + }) + }, 100); + wx.switchTab({ + url: '/pages/home/home', + }) + } + }) + }, + getInputTitle(e){ + this.setData({ + title: e.detail.value + }) + }, + getInputContent(e){ + this.setData({ + content: e.detail.value + }) + }, +//监听组件事件,返回的结果 +myEventListener:function(e){ + console.log("上传的图片结果集合") + console.log(e.detail.picsList) + this.setData({ + imgList:e.detail.picsList + }) + }, + currentTab: function (e) { + var categoryItem = e.currentTarget.dataset.item + if (this.data.categoryId == categoryItem.id){ + return; + } + this.setData({ + categoryId: categoryItem.id, + typeName: categoryItem.name, + layerHide: false + }) +}, +typeEvent(){ + if(!this.data.achvTitleId){ + this.setData({layerHide:true}) + } +}, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + // achvTitleId=3&categoryId=1 + this.getcategory(options.categoryId) + this.setData({ + categoryId:options.categoryId||'', + achvTitleId:options.achvTitleId||'' + }) + }, + getcategory(id){ + request._post('/firefly/category/list',{type:1}, + res=>{ + if(res.retCode == 0){ + if(id){ + var defaultinfo = res.body.filter(item=>item.id==id) + } + console.log(defaultinfo) + this.setData({ + categoryList:res.body, + typeName: id?defaultinfo[0].name:'' + }) + } + }) + const platform = wx.getSystemInfoSync().platform + const isIOS = platform === 'ios' + this.setData({ isIOS}) + const that = this + this.updatePosition(0) + let keyboardHeight = 0 + wx.onKeyboardHeightChange(res => { + if (res.height === keyboardHeight) return + const duration = res.height > 0 ? res.duration * 1000 : 0 + keyboardHeight = res.height + setTimeout(() => { + wx.pageScrollTo({ + scrollTop: 0, + success() { + that.updatePosition(keyboardHeight) + that.editorCtx.scrollIntoView() + } + }) + }, duration) + + }) + }, + updatePosition(keyboardHeight) { + const toolbarHeight = 50 + const { windowHeight, platform } = wx.getSystemInfoSync() + let editorHeight = keyboardHeight > 0 ? (windowHeight - keyboardHeight - toolbarHeight) : windowHeight + this.setData({ editorHeight, keyboardHeight }) + }, + calNavigationBarAndStatusBar() { + const systemInfo = wx.getSystemInfoSync() + const { statusBarHeight, platform } = systemInfo + const isIOS = platform === 'ios' + const navigationBarHeight = isIOS ? 44 : 48 + return statusBarHeight + navigationBarHeight + }, + // onEditorReady() { + // const that = this + // wx.createSelectorQuery().select('#editor').context(function (res) { + // that.editorCtx = res.context + // }).exec() + // }, + blur() { + this.editorCtx.blur() + }, + format(e) { + let { name, value } = e.target.dataset + if (!name) return + console.log('format', name, value) + this.editorCtx.format(name, value) + + }, + onStatusChange(e) { + const formats = e.detail + console.log(formats) + this.setData({ formats }) + }, + insertDivider() { + this.editorCtx.insertDivider({ + success: function () { + console.log('insert divider success') + } + }) + }, + clear() { + this.editorCtx.clear({ + success: function (res) { + console.log("clear success") + } + }) + }, + removeFormat() { + this.editorCtx.removeFormat() + }, + insertDate() { + const date = new Date() + const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}` + this.editorCtx.insertText({ + text: formatDate + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/article/publish.json b/pages/article/publish.json new file mode 100644 index 0000000..0ba2d16 --- /dev/null +++ b/pages/article/publish.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "uploadImages": "/component/upload/index" + }, + "navigationBarTitleText": "发布文章" +} \ No newline at end of file diff --git a/pages/article/publish.wxml b/pages/article/publish.wxml new file mode 100644 index 0000000..63e209d --- /dev/null +++ b/pages/article/publish.wxml @@ -0,0 +1,48 @@ + + + + + +