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+XUBMYEFCpIAOlBR4oCkiofOCFMgI3lB0EoRgQgqoDMaglIA21FKSg1gEf1Bbgh2oGAajvgQn1H7BwnQzCuD4PIrhWgSiuf4IEbgywcasFDtzqgBM3B3DhXgeWeE4EBrQIxKEjQBJ6A8hCbwQ56E0gD+0CBWgWFKEbQAm6EZShm0AFuhlUoVtADboV1KHbTANqh2lCbpgWtBWmDW2D6UDbYbrQDpgetBOmD+2CGUAdMEOoE2YE7YYZQ3tgJtBemCl0BGYGeWHm0AmcsACwcl98APALuAfgvdCFePA6xwmWI0lmMIBucnImpQhjJZc8FHMoMUwEpuUSkFKxqXUhZwocJppG7g5lRWlxWeEco+wVN5zisZtVpL9w3/MmkyqHMS3ctynbem5lnk1RccrFpipqksYNMD3MamvcVFj6yWTix1lVdexd2SCkpCOw9pOuQSseVli8owDLTKAdNaS0se2Cp4NS1JQNF06dCWlCOUyC517Nm779nP/w50B+3UrlHq6eFtLRSX57SeoR2WIO5Q3XjCr2eaJbUCO66DgMmTb1BOYkuKlu70buw8ticceQVNc05DQpEuCABw184AcabEQOefRE/hwHIkVepip6kMQZQQo0ebgBAbKfymd6MNotLFMpQYZHhQkUCT7+2fi2InSE4aJe2sP8eAIUiBcdyC27w8VnqyVINaBDhRXwIDeOpOsHs353eqJMqTQx25TYU1RV/vp9Sod+qgNqOMwihEuRkCMSZsoc4vRco56qrzkzhvZnUSwDW1nY70k000Tr+VWu/DFz5vb/oZbf6NktJWx6SaXqra+UeKcpl6s733LySCl+JafnzaJROM8E4dFPE7zDP69EAixFSJj2ZQAoPvxxvGfgh0YmBDx6GkNmdmyHEYlYERlUaqS/Pko8V+ofO1Roslatoyp2g+E4MeoOpETSjpgokoDs9I/vVtUCLfAdPIM/Lg8+/nmid+inc3GQoRHrOxK4/yBer1J4RsDkC5iOkUTP3bfFscn+tv7iTPFqXs9NE64VjsYzLKfPVuRUsVxV0vV4Z3PiatYosFkHE8rbaM6stInu4+vXs2OTSbSjtTfLi3vL83ujdjnaSwirACuBMVaVXCm64lKjsmRJy0BJ7314dfp0m+iRxGdzBR6cZCBcG+P0X8eQOdruuQKlaiJeTY/qmVZzLTO2Hw+3Pi0so+Riq3g1raemAVnCO3NGLDh0LWNk8biRYZFN1B2TImSLE9ejVOnv1Sp1j5qepYSGFlA+83AiQJVEG+CGHsqQSIDlOkvjDovI1NLTprSVuGOylG62X46houlKqqjYNqLrxhr6ZgCzInWW3YkKHK9hqQix+/UciTqZaWwKCewnY25XWn5iPxCoWh3/F9HvzJLF0e7A/JFw+g8A7CdKkSAFyiCJGj9r05XHYChtdBxY0xduMvp0Oxp0Xeo3nCOVqu4vmvnRazMRTgf8SK5EjMtEsUne4DBLj67vIMM1HKYIcsKiDQeWNwvWcmtAj3mjovv9tY4MCFdyozy9+enB68WxvHEECXQLVFSAGhkI9I4JvEj0tKHMWUqx/WzAihA7ihXSPBBIIqwXvMcnMzvdwKPpPnuJI7JlI3LArKhi5605B2eTrzcILtSMeAMzVvC8ysh0wZRAR6RkrcX7NHwbtbGmvJJPCgn9fYVz/pBPE0qQh6MxEt02XYrqsblLQs032qCi+HA1wW5hn9s3LmBruJSVrhHb2wUs3j1sT5fxqLj7JHfU/vsNqkeFJ77BD1d3ii8OBYmVYhlK+zIzhCupUVxvq3U2lhpZMx0lI6WWl/QcWTOqdLpmWo+0WWcDL3/cM5h/0kvF8kLdC3kPr07UQLPRlXlaCKq1NiEKjZ5mZOTADd4oukwbvF2FjkuvH/y6XHz8/cTGLjUfEYnQbV1RGtdiDcG6M+Nb3cXtBiGrFm+T1bNxcAaSKN1hnAuRmiQTaEI1XKpse1AidbJsA5YjXG++jJ18PzHZP3Tr2SneGHSLczJhpSDAt1Iqvbzy+svxumxVNHNaq0iW96hVKmV4TorVaqWrpHjFqrpXLkEp02qR3NO2VzPGEWH/0bIZ4UL7ofeZulOWO+IL+etqvKGDwc8+MitrUOyt1ieNJadcDaAW4dj6SZET+CQmRL62ESmQjaNMPF2l8Boos1MpNBawRRMdD7a1q3G1VVY80qlNGVjjWEXnxoj8dlnWUYGyZj/UdNfL015l+rg49vYUoxIXfKK57+didGA53dRn3QBovyEDxTJ1raZ/3aH304JUpAEicsiBdg5VUcELiSTWNstiQ65ERAruxu8XNSrAZGUYzTTRc1oN4+BD/gHV35on54GrJiwf9ABac8CwO6hpQhDBuhHlFhMAjcgT59ULkNuylmRtG3j4fNovPZEqzS9P9XZFLvUPMNetDsUebGmPFJllMkY2i29cZ2uC0lLtvbSXl5bqEczDz5k2dzKfsq7EOpzhx9H2k53uG4rW1vFaktLeZg0+lDrbX+7zxg6q7tPRnp4nsTiwDOVffcwWyxhStloEnZPSUb5M9JJiPRqSfrZR2ev0Z81oN7coaQ51Yi8LmhJ44YRjj1uEHNFzR60biwfllwn0dskl54ybpKIHnplLMAZe8ZmD0JAWYA/GN373p4tm+T+vuqvpeuXPJp785TqAwIf+H8v/HBxzfdj148Ki48f08rNYifCMXH/9OGp5/BLhWewRdlbIB99aim3KNhH7CM+Ez9wirkdUGIW6ZnhgKME84RnRoss9qg/nplf0mIsVuFjanUyE/Rfa4V+WBdctK5wDq9UV3LbajizMq12Ya41sIf7vYW/ftt2aZE1JtaXetqR0LT6QVDxvuW29fc5qADuDFCMGu92AWDU8mmr1ag0Y5JrQGc+h/AOhc+rYuXPnVMqQqxXz7bODjJ9X9Z0WjGhOaUYEp/v7h+UZ5PUjsF5ksqvNFBKpwcjXSEzTYn52SVi+4ch1MkM+3Pi65YmUT/LSJ9uJeUTSt61PMrK37bOMHcDK8fIJA06iC2LwaB7LwPhEjOm+ZCaJlnSEPES/D7n1Pu4m5NaJkJCTAZYByLJf+UXv9rDbezs7b+/ZjgEK+rZ7t5s7S8skktLyjo4JuaUs606/h/bk4zsADWxW52fXgrK7suC1ivSK6OHoRbAo7El04JOYMC8dgPR1kXujn4TFJYNCYZjTfD27+iio9LOFQlWptIXrfagfLtzpr9JXZWXsaghFqiqVhdOaCivLdRfT+ZaHxT7xSPSIxCcZfr5FPShLj9eZ/MNhf8zHQtqYmcf7efw4zv+TRt5fFGmn/oyR875YsLRw7F9VMZefj4GXC4JeKp3ygtvxzbDJE/IDz3aWjebha0fElJeNg0Rw+SebTaXVaxU2ShSeW7WFyP8EeI9mECN4SYlJ23ErVPq+7fhn1upW+9HDJcURq4jJlUFHk2YznGk9ZQxvHCeRj+0Qjks9gkXFRDwbsbxCZdFGhYrUzznXI3At63DcT7FFFdXiqFCxqlmiDtEL7sLBq7NvJAbW5Tg34yGq9Tm2zeFOcLqyTG6mqrbtWjGzyLyBVH8zq1cBCe051v2fyJfBMo1Fbda88/3UcRZ/W45t/+vyT4A0qy0Kapy8MNnz7hk5lUzJz7zrIalENyxcfVB1MGvADQefzWdUrnPTtQVzrTPWtSUVRy82rx9lEQan+Li/fpnSQpUHwwz+tuzl2v5PIywqOqRchoVrPCpPpoE7kSIPBk7n5+B04GByYSIE36oQDU7MvyjUX/zW8jtXeC9mDRiqye2iHybeM2RdnPS/wvLBS9H+NVKQ5khAys8jyZHC08gGYAwxy3mlr614X5cYY4VihimGuXjTY8/P630E827ZGGIM880/YgX0n/sYAtJ2f2HVhnFMY9u7lnfbGhkuTGsVcsJcjKt/qZ7DcoUcneTCurBpb9BvTOMW15LA+KGdMYWJXuxr7DkVBt8tKQG9nJPrey24xWrT42dxawrGyT3YJMwj57Cm4yUGa7QHLwr2sRYZW1ImMZxcnYS56tZjqRcqknugjeIZc48Ysm7EI4g67omXEvePUNLPHT2J2/VdoD7QsyzQEdi1y+THCRxYnd/Ub+oIsnSUIQi09ZFMGBvGZNZI+rTmeZwJEyL5vOY0LesOGyYiZzTPCMmIqNtitdZuGZMREh4wpjYO9T2dpsRbZYoEhWzhcpkqQbXnmC2BwJcvlCni1bKtuOp8yS0fAVEC70xWd7t9beHyGHgDY+Oq5eVkuQlZfj9fQb1sJ80OtMeMr9iQFSsRm4OytyG6byWPo4YkRs4oVjGPxUZWPBQ17HbqaMRmAxponiuN6GbzD78WHVGucTjXKtc6HGsjhyPXcg+9Q1FDoCUVDucaJa9cyz3quNE7HnFJUOOIysJ8Sp9EDYO1L0/w4uA37Bug6fBvk+kZMHDtcVKSlIgnZEloFzlgCoZ8GxqM+iYqGPoXLnlNf4XTtPWIjPP5uLjpsV3bt9vtXCwVy61e0wVXe8jwIMIgwXBiIi5i7RjJFAb6sqtkZ8lR2Uca2nh6L7uHyo4eozuOBHLk1wLXiACyBaMBE07gLNNMAQ0btfEtXZnJZyrTHVQdcWKcRmvojl/i5TKfTB5f+vKmx3Wa7M6wnnMHJ3yhbw2ahj885z8/Of7ty9L5sxv3I7qAvnGt5zy7plCmq9lHG4fkSxMQzqEf0ASRYoYu0Wyz3EktpHJEJZWta+LXJLRIrQk7xm2uK2lOP3ezcQRvQVHjNiNC/P+CoXkKjcPOUvncFWDMEUaa/JAZby6LI3SKRZD55Vlzzc+xzrK6iim1FaVZLynyDNmzFS8Z8hfZEkPwe+YC6XrVSv/02dLSfENW1dJnEmleY479ucxpSffy5lumprNTbImTIRORiVadm/9qe2mVXqb795+LX//2GT0mAnsfLabSHWvgOASgoIdm61PXxzLsNVbp2pV81PynrjVg52nGKXcVeHFwnbTSql0xS6Nsul8QauwZnz6XMVZdQBc8m8FmuB3WlihSMlIUJZz9KduXXuQmWfbiV6QelUzxkcUFN4ci5gIOyk4yBUiU7g75918zcTcQwaCD56scH3rvHgr2CSJoV9b8U/rKy3G7xl6PYL3Pt15YMADvETTEDAEdLkj+7oNNYF+9chVUxi6pGhoAZ/7HO9+fAcOjDP9F72t0X85Ero5cnQl5+mrIuL4VZNMwHIDJaP0srX6UrPfXk/9s6yHiZYw4hm3KOT++TbuR2IO98NOySsGzXKHb1Ufeb30h+1ktaTq6q+Oie3z6LDpvVaxzLt6iCtcTUSKYipJsgGWsSG/AyzDAW5oFly4Jmrl6DrHU11sSIwMAw0sEzX+HfW2cEUkNmkKSJPNNz7PETdbgc7/tmZNYlLYjzokoqZRnlREpzpmnttbaj+zwTVp/Mb3Ilqd668uQ21+FXIJy75W/IKbxQvlTxd1fBYq4oO6+Prr/xugF5AI/F9myBZkrUPASDFKPPCauydSya8SHi0eFXJQkd/X9+m1XHL02tfnaHH3rbK1K3yP7pRNcnDrOHTuhnT1QOeZhbfxADg7j3RQVV9VF6WyKrtjpcRwl0PXunvi5Tkfpus6OOEDjgscGNGgNqhm4fuooTuBCFs9f2BVr6B0PkWWTJ8aXdHf7MnrHj7XrslIcy14KZjZ2e3L3n8jes8AtUsW5CwoLz/TMOg+ZbBIgArXDocc5XG8wHA7ZL8bhJJQoKlASjnmFMk6qN5QcRpZ21+lAkAgUQd56wHQJKaKXErpxt7DdzUH1EpSwC+8S6jEOczKsfyXA9QdPq9igxwRQ7rou4HkQgqAZAJYbZBUFO4naBHfIbNlm/BZ0FK0noi8FCwD4bu+hMzGWR98VBPRPPTJVF/AQNUEqu9QV99HpMBosRl2oucaPamRen6Bf97uWtsaF6lBj1WQbQl8ouGXS60VpUPq7KCOGTjVlFNqP+KO3vF9UC/5t99AJMn/TYl7BKPeLbE2VST92T5HptwRek8BRETWDVCimEzuCktDQahWlxQT/GZaY+B+RaCou/EYDqkDJ8NI3fVGVAPSvBJdQ6hD87g0IrtT5uNG5f9lnBs37IpVdnvubED0io6v/9OYcPz7uc4dfgJP8IyjE3/F87j+p3KFjAJHV9n4G1btRcWtkf7rqvwZyg8ev/OIyJHA7h8Bf/cvD/naLEtNGLnEKvtVEySE30eBUlUxPd6LFYzrR5nSY6Nbx7vM9IoJDovoM2n5aE4Wg3xMlvy9iyDx/iAnPy0RL3D9sMyBjottrkyI96r23XwUEQZ3l24yU5yIqpO21fY8mOQgksPikzxgiec4uzy7O9e+QMZjIEVfmSqTIiuCr7K2VBZ3zWR18iUrOLHX10/l5sfkOZ8pXe20XAQICaZnc1p2ZKB4rzizakb/+PWQkDgiKLR5m/gwFEd185tKZCw3pHWOtLVbFGq0YV4TwQsbWD7xK5i3hyDk1XqaWd1ZCijhjUxi1J+dkT4UuOyteqeYlY/RtlRZeJUUJRIsRK078bw6UPwv+xKSUSkhYRFRMXEJSSlpGVk5eQVFJWUVVTV1DU0tbR1dP38DQyNjE1MzcwtLKuqMVtT9KrP0JsUaWhk/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:''}}
+
+
+
+
+
+
+
+ 全部留言
+
+
+
+
+
+
+ 发布
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 类型
+
+ {{typeName}}
+
+
+
+
+ 设为私密
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/article/publish.wxss b/pages/article/publish.wxss
new file mode 100644
index 0000000..6f2e028
--- /dev/null
+++ b/pages/article/publish.wxss
@@ -0,0 +1,180 @@
+/* pages/article/publish.wxss */
+@import "./assets/iconfont.wxss";
+@import "./assets/weui.wxss";
+
+.enter-sty{
+ background: #fff;
+ margin-top: 20rpx;
+ height: 73rpx;
+ font-size: 28rpx;
+ text-align: center;
+}
+.toolbar{
+ /* position: relative; */
+ z-index: 999;
+}
+.pla-s{
+ color: #A0A0A0;
+}
+.enter-con{
+ background: #fff;
+ margin-top: 20rpx;
+ padding: 30rpx;
+}
+.enter-wrap{
+ width: 100%;
+ font-size: 28rpx;
+}
+.tab-list{
+ margin-top: 20rpx;
+ padding: 0 30rpx;
+ background: #fff;
+}
+.list{
+ align-items: center;
+ height: 98rpx;
+ font-size: 28rpx;
+ color: #484848;
+}
+.list:first-child{
+ border-bottom: 1px solid #E6E6E6;
+}
+.arrow{
+ width: 10rpx;
+ height: 16rpx;
+ margin-left: 12rpx;
+}
+.type-wrap{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ background: #F6F6F9;
+ box-sizing: border-box;
+ z-index: 9999;
+}
+.list-wrap{
+ padding: 0 30rpx;
+ background: #fff;
+}
+.type-list{
+ display: flex;
+ justify-content: space-between;
+ height: 80rpx;
+ align-items: center;
+ font-size: 28rpx;
+ border-bottom: 1px solid #E6E6E6;
+}
+.select{
+ width: 40rpx;
+ height: 27rpx;
+ display: none;
+}
+.list-cur{
+ color: #3D98FF;
+}
+.list-cur .select{
+ display: block;
+}
+
+
+.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;
+}
+.enter-sty-left{
+ background-color: #ffffff;
+ margin-top: 20rpx;
+ padding: 20rpx 30rpx;
+ color: #A0A0A0;
+}
\ No newline at end of file
diff --git a/pages/article/publish1.js b/pages/article/publish1.js
new file mode 100644
index 0000000..9b9307f
--- /dev/null
+++ b/pages/article/publish1.js
@@ -0,0 +1,208 @@
+// pages/article/publish.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ categoryList:[],
+ layerHide:false,
+ getListImg: [],
+ radioItems: [
+ {name: '包邮', value: '美国',checked: 'true'},
+ {name: '按距离估算', value: '中国'}
+ ],
+ currentTab: 0,
+ typeName:'',
+ countPic:9,//上传图片最大数量
+ showImgUrl: "https://api.fireflysg.com", //路径拼接,一般上传返回的都是文件名,
+ uploadImgUrl:'https://api.fireflysg.com/firefly/media-room/photo/upload',//图片的上传的路径
+ switch: false,
+ content:'',
+ title:'',
+ point:'',
+ stockCount:'',
+ goodsPhoto:'',
+ imgList:[],
+ categoryId:1
+ },
+ submit(){
+ let datas={
+ goodsName:this.data.title,
+ categoryId:this.data.categoryId,
+ desc:this.data.content,
+ point:this.data.point,
+ stockCount:this.data.stockCount,
+ goodsPhoto:this.data.goodsPhoto,
+ mediaList:this.data.imgList
+ }
+ console.log(datas)
+ request._post('/firefly/goods/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/shopList/index',
+ })
+ }
+ }
+ )
+ },
+ getcategory(){
+ request._post('/firefly/category/list',{type:3},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ categoryList:res.body
+ })
+ }
+ })
+ },
+ 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
+ })
+ },
+ getInputTitle(e){
+ this.setData({
+ title: e.detail.value
+ })
+ },
+ getInputContent(e){
+ this.setData({
+ content: e.detail.value
+ })
+ },
+ getInputPoint(e){
+ this.setData({
+ point: e.detail.value
+ })
+ },
+ getInputStockCount(e){
+ this.setData({
+ stockCount: e.detail.value
+ })
+ },
+//监听组件事件,返回的结果
+myEventListener:function(e){
+ console.log("上传的图片结果集合")
+ console.log(e.detail.picsList)
+ this.setData({
+ imgList:e.detail.picsList
+ })
+ },
+ myEventListener1:function(e){
+ console.log("上传的图片结果集合")
+ console.log(e.detail.picsList)
+ this.setData({
+ goodsPhoto:e.detail.picsList[0].mediaPath
+ })
+ },
+ getDetail(id){
+ let that = this
+ let datas={
+ goodsId: id
+ }
+ request._post('/firefly/goods/detail',datas,
+ res=>{
+ if(res.retCode == 0){
+ // goodsName:this.data.title,
+ // categoryId:this.data.categoryId,
+ // desc:this.data.content,
+ // point:this.data.point,
+ // stockCount:this.data.stockCount,
+ // goodsPhoto:this.data.goodsPhoto,
+ // mediaList:this.data.imgList
+ let arr = []
+ that.data.getListImg.push(res.body.goodsPhoto)
+ that.setData({
+ title: res.body.goodsName,
+ categoryId: res.body.categoryId,
+ content: res.body.desc,
+ point: res.body.points,
+ stockCount: res.body.stockCount,
+ goodsPhoto: res.body.goodsPhoto,
+ getListImg: that.data.getListImg,
+ mediaList: []
+ })
+ }
+ }
+ )
+ },
+typeEvent(){
+ this.setData({layerHide:true})
+},
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getcategory()
+ console.log(options.id)
+ if(options.id){
+ this.getDetail(options.id)
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ 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/publish1.json b/pages/article/publish1.json
new file mode 100644
index 0000000..779eed1
--- /dev/null
+++ b/pages/article/publish1.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "uploadImages": "/component/upload/index"
+ },
+ "navigationBarTitleText": "发布商品"
+}
\ No newline at end of file
diff --git a/pages/article/publish1.wxml b/pages/article/publish1.wxml
new file mode 100644
index 0000000..62b7e4b
--- /dev/null
+++ b/pages/article/publish1.wxml
@@ -0,0 +1,51 @@
+
+
+ 请选择商品主图
+
+
+
+
+
+
+
+
+ 类型
+
+ {{typeName}}
+
+
+
+ 积分
+
+
+
+
+
+ 库存
+
+
+
+
+
+
+
+
+
+
+
+
+{{item.name}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/article/publish1.wxss b/pages/article/publish1.wxss
new file mode 100644
index 0000000..1bea56a
--- /dev/null
+++ b/pages/article/publish1.wxss
@@ -0,0 +1,93 @@
+/* pages/article/publish.wxss */
+.enter-sty{
+ background: #fff;
+ margin-top: 20rpx;
+ height: 73rpx;
+ font-size: 28rpx;
+ text-align: center;
+}
+.pla-s{
+ color: #A0A0A0;
+}
+.enter-con{
+ background: #fff;
+ margin-top: 20rpx;
+ padding: 30rpx;
+}
+.enter-wrap{
+ width: 100%;
+ font-size: 28rpx;
+}
+.tab-list{
+ margin-top: 20rpx;
+ padding: 0 30rpx;
+ background: #fff;
+}
+.list{
+ align-items: center;
+ height: 98rpx;
+ font-size: 28rpx;
+ color: #484848;
+}
+/* .list:first-child{
+ border-bottom: 1px solid #E6E6E6;
+} */
+.arrow{
+ width: 10rpx;
+ height: 16rpx;
+ margin-left: 12rpx;
+}
+.type-wrap{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ background: #F6F6F9;
+ box-sizing: border-box;
+ z-index: 9999;
+}
+.list-wrap{
+ padding: 0 30rpx;
+ background: #fff;
+}
+.type-list{
+ display: flex;
+ justify-content: space-between;
+ height: 80rpx;
+ align-items: center;
+ font-size: 28rpx;
+ border-bottom: 1px solid #E6E6E6;
+}
+.select{
+ width: 40rpx;
+ height: 27rpx;
+ display: none;
+}
+.list-cur{
+ color: #3D98FF;
+}
+.list-cur .select{
+ display: block;
+}
+.jifen-sty{
+ text-align: right;
+ font-size: 28rpx;
+}
+.group view{
+ display: inline-block;
+}
+.group view:first-child{
+ margin-right: 15rpx;
+}
+.group radio {
+ transform:scale(0.8);
+ vertical-align: 2px;
+}
+.enter-sty-left{
+ background-color: #ffffff;
+ margin-top: 20rpx;
+ padding: 20rpx 30rpx;
+ color: #A0A0A0;
+}
\ No newline at end of file
diff --git a/pages/article/publish2.js b/pages/article/publish2.js
new file mode 100644
index 0000000..d7411c6
--- /dev/null
+++ b/pages/article/publish2.js
@@ -0,0 +1,194 @@
+// pages/article/publish2.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ categoryList:[],
+ currentTab: 0,
+ layerHide:false,
+ typeName:'',
+ countPic:1,//上传图片最大数量
+ showImgUrl: "https://api.fireflysg.com", //路径拼接,一般上传返回的都是文件名,
+ uploadImgUrl:'https://api.fireflysg.com/firefly/media-room/photo/upload',//图片的上传的路径
+ switch: false,
+ content:'',
+ title:'',
+ point:'',
+ imgList:[],
+ categoryId:1,
+ address:'',
+ servicePhone:'',
+ longitude:0,
+ latitude:0
+ },
+ submit(){
+ let datas={
+ storeName:this.data.title,
+ intro:this.data.content,
+ servicePhone:this.data.servicePhone,
+ address:this.data.address,
+ logo:this.data.logo,
+ mediaList:this.data.imgList,
+ longitude:this.data.longitude,
+ latitude:this.data.latitude
+ }
+ console.log(datas)
+ request._post('/firefly/store/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/near/index',
+ })
+ }
+ }
+ )
+ },
+ 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
+ })
+ },
+ getInputTitle(e){
+ this.setData({
+ title: e.detail.value
+ })
+ },
+ getInputAddress(e){
+ this.setData({
+ address: e.detail.value
+ })
+ },
+ getInputservicePhone(e){
+ this.setData({
+ servicePhone: e.detail.value
+ })
+ },
+ getInputContent(e){
+ this.setData({
+ content: e.detail.value
+ })
+ },
+ getInputPoint(e){
+ this.setData({
+ point: e.detail.value
+ })
+ },
+//监听组件事件,返回的结果
+myEventListener:function(e){
+ console.log("上传的图片结果集合")
+ console.log(e.detail.picsList)
+ this.setData({
+ imgList:e.detail.picsList
+ })
+ },
+myEventListener1:function(e){
+ console.log("上传的图片结果集合")
+ console.log(e.detail.picsList)
+ this.setData({
+ logo:e.detail.picsList[0].mediaPath
+ })
+ },
+typeEvent(){
+ this.setData({layerHide:true})
+},
+getAddress(){
+ var _this = this
+ wx.choosePoi({
+ success(res){
+ console.log(res,'成功')
+ _this.setData({
+ address:res.address,
+ longitude:res.longitude,
+ latitude:res.latitude
+ })
+ },
+ fail(res){
+ console.log(res,'失败')
+ },
+ complete(res){
+ console.log(res,'结束')
+ },
+ })
+},
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getcategory()
+ },
+ getcategory(){
+ request._post('/firefly/category/list',{type:2},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ categoryList:res.body
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ 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/publish2.json b/pages/article/publish2.json
new file mode 100644
index 0000000..6753085
--- /dev/null
+++ b/pages/article/publish2.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "uploadImages": "/component/upload/index"
+ },
+ "navigationBarTitleText": "发布店铺"
+}
\ No newline at end of file
diff --git a/pages/article/publish2.wxml b/pages/article/publish2.wxml
new file mode 100644
index 0000000..169c3d9
--- /dev/null
+++ b/pages/article/publish2.wxml
@@ -0,0 +1,36 @@
+
+
+ 请选择店铺logo
+
+
+
+
+ {{address?address:'选择店铺地址'}}
+
+
+
+
+
+
+ 类型
+
+ {{typeName}}
+
+
+
+
+
+
+
+
+
+{{item.name}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/article/publish2.wxss b/pages/article/publish2.wxss
new file mode 100644
index 0000000..b78ff94
--- /dev/null
+++ b/pages/article/publish2.wxss
@@ -0,0 +1,94 @@
+/* pages/article/publish.wxss */
+.enter-sty{
+ background: #fff;
+ margin-top: 20rpx;
+ padding-left: 30rpx;
+ height: 73rpx;
+ font-size: 28rpx;
+ text-align: left;
+}
+.enter-sty-left{
+ background-color: #ffffff;
+ margin-top: 20rpx;
+ padding: 20rpx 30rpx;
+ color: #A0A0A0;
+}
+.pla-s{
+ color: #A0A0A0;
+}
+.enter-con{
+ background: #fff;
+ margin-top: 20rpx;
+ padding: 30rpx;
+}
+.enter-wrap{
+ width: 100%;
+ font-size: 28rpx;
+}
+.tab-list{
+ margin-top: 20rpx;
+ padding: 0 30rpx;
+ background: #fff;
+}
+.list{
+ align-items: center;
+ height: 98rpx;
+ font-size: 28rpx;
+ color: #484848;
+}
+/* .list:first-child{
+ border-bottom: 1px solid #E6E6E6;
+} */
+.arrow{
+ width: 10rpx;
+ height: 16rpx;
+ margin-left: 12rpx;
+}
+.type-wrap{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ background: #F6F6F9;
+ box-sizing: border-box;
+ z-index: 9999;
+}
+.list-wrap{
+ padding: 0 30rpx;
+ background: #fff;
+}
+.type-list{
+ display: flex;
+ justify-content: space-between;
+ height: 80rpx;
+ align-items: center;
+ font-size: 28rpx;
+ border-bottom: 1px solid #E6E6E6;
+}
+.select{
+ width: 40rpx;
+ height: 27rpx;
+ display: none;
+}
+.list-cur{
+ color: #3D98FF;
+}
+.list-cur .select{
+ display: block;
+}
+.jifen-sty{
+ text-align: right;
+ font-size: 28rpx;
+}
+.group view{
+ display: inline-block;
+}
+.group view:first-child{
+ margin-right: 15rpx;
+}
+.group radio {
+ transform:scale(0.8);
+ vertical-align: 2px;
+}
\ No newline at end of file
diff --git a/pages/article/publish3.js b/pages/article/publish3.js
new file mode 100644
index 0000000..1b3c5e2
--- /dev/null
+++ b/pages/article/publish3.js
@@ -0,0 +1,234 @@
+// pages/article/publish2.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ categoryList: [],
+ currentTab: 0,
+ layerHide: false,
+ typeName: '',
+ countPic: 1, //上传图片最大数量
+ showImgUrl: "https://test-firefly-media.oss-cn-shenzhen.aliyuncs.com", //路径拼接,一般上传返回的都是文件名,
+ uploadImgUrl: 'https://api.fireflysg.com/firefly/media-room/file/upload', //图片的上传的路径
+ switch: false,
+ content: '',
+ title: '',
+ point: '',
+ categoryId: 1,
+ videoUrl: '',
+ newVideoUrl: ''
+ },
+ bindlongpressimg() {
+ this.setData({
+ videoUrl: '',
+ newVideoUrl: ''
+ })
+ },
+ submit() {
+ let datas = {
+ categoryId: this.data.categoryId,
+ title: this.data.title,
+ intro: this.data.content,
+ conver: this.data.conver,
+ videoUrl: this.data.newVideoUrl,
+ display: 1
+ }
+ console.log(datas)
+ request._post('/firefly/video/add/new', datas,
+ res => {
+ if (res.retCode == 0) {
+ wx.hideLoading();
+ setTimeout(() => {
+ wx.showToast({
+ title: '发布成功',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 100);
+ wx.switchTab({
+ url: '/pages/home/home',
+ })
+ }
+ }
+ )
+ },
+ 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
+ })
+ },
+ getInputTitle(e) {
+ this.setData({
+ title: e.detail.value
+ })
+ },
+ getInputAddress(e) {
+ this.setData({
+ address: e.detail.value
+ })
+ },
+ getInputContent(e) {
+ this.setData({
+ content: e.detail.value
+ })
+ },
+ getInputPoint(e) {
+ this.setData({
+ point: e.detail.value
+ })
+ },
+ uploadVideo() {
+ var _this = this
+ wx.chooseMedia({
+ mediaType: ['video'],
+ sourceType: ['album', 'camera'],
+ sizeType: ['compressed'],
+ maxDuration: 15,
+ camera: 'back',
+ // compressed:true,
+ success(res) {
+ console.log(res)
+ _this.setData({
+ videoUrl: res.tempFiles[0].tempFilePath
+ })
+ _this.uploadFileVideo(res.tempFiles[0].tempFilePath)
+ // wx.compressVideo(
+ // {
+ // src: res.tempFiles[0].tempFilePath,
+ // quality: 'low',
+ // success(re) {
+ // console.log(re)
+ // _this.uploadFileVideo(re.tempFilePath)
+ // },
+ // fail(err) {
+ // console.log(err)
+ // },
+ // complete() {
+ // console.log('ssssss')
+ // }
+ // }
+ // )
+ },
+ fail(res) {
+ console.log('失败');
+ }
+ })
+ },
+ uploadFileVideo(url) {
+ console.log(url)
+ wx.showLoading({
+ title: '上传中...',
+ mask: true,
+ })
+ var _this = this
+ wx.uploadFile({
+ url: this.data.uploadImgUrl,
+ filePath: url,
+ header: {
+ 'content-type': 'multipart/form-data',
+ 'terminal': 'MINI-PROGRAM',
+ 'token': wx.getStorageSync("token") || '',
+ },
+ timeout: 30000,
+ name: 'file',
+ formData: null,
+ success(res) {
+ wx.hideLoading()
+ var videoData = res.data
+ videoData = JSON.parse(videoData);
+ if (videoData.retCode == 0) {
+ _this.setData({
+ newVideoUrl: videoData.body.mediaURL
+ })
+ }
+ }
+ })
+ },
+ myEventListener1: function (e) {
+ console.log("上传的图片结果集合")
+ console.log(e.detail.picsList)
+ this.setData({
+ conver: e.detail.picsList[0].mediaURL
+ })
+ },
+ typeEvent() {
+ this.setData({
+ layerHide: true
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getcategory()
+ },
+ getcategory() {
+ request._post('/firefly/category/list', {
+ type: 1
+ },
+ res => {
+ if (res.retCode == 0) {
+ this.setData({
+ categoryList: res.body
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ 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/publish3.json b/pages/article/publish3.json
new file mode 100644
index 0000000..0e6df48
--- /dev/null
+++ b/pages/article/publish3.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "uploadImages": "/component/upload/index"
+ },
+ "navigationBarTitleText": "发布视频"
+}
\ No newline at end of file
diff --git a/pages/article/publish3.wxml b/pages/article/publish3.wxml
new file mode 100644
index 0000000..5fc1502
--- /dev/null
+++ b/pages/article/publish3.wxml
@@ -0,0 +1,47 @@
+
+
+ 请选择视频封面
+
+
+
+
+
+
+
+
+
+
+
+
+ 长按对应的视频即可删除
+
+
+
+
+ 类型
+
+ {{typeName}}
+
+
+
+
+
+
+
+
+{{item.name}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/article/publish3.wxss b/pages/article/publish3.wxss
new file mode 100644
index 0000000..c1b3bfe
--- /dev/null
+++ b/pages/article/publish3.wxss
@@ -0,0 +1,164 @@
+/* pages/article/publish3.wxss */
+.enter-sty{
+ background: #fff;
+ margin-top: 20rpx;
+ padding-left: 30rpx;
+ height: 73rpx;
+ font-size: 28rpx;
+ text-align: left;
+}
+.enter-sty-left{
+ background-color: #ffffff;
+ margin-top: 20rpx;
+ padding: 20rpx 30rpx;
+ color: #A0A0A0;
+}
+.v-sty{
+ width: 75%;
+ height: 250rpx;
+}
+.tips {
+ color: #666;
+ font-size: 24rpx;
+ padding-bottom: 20rpx;
+ }
+
+.img-box {
+ /* margin: auto; */
+ padding-top: 20rpx;
+ padding-left: 4%;
+ padding-right: 4%;
+ background: #fff;
+}
+.pla-s{
+ color: #A0A0A0;
+}
+.enter-con{
+ background: #fff;
+ margin-top: 20rpx;
+ padding: 30rpx;
+}
+.enter-wrap{
+ width: 100%;
+ font-size: 28rpx;
+}
+.tab-list{
+ margin-top: 20rpx;
+ padding: 0 30rpx;
+ background: #fff;
+}
+.list{
+ align-items: center;
+ height: 98rpx;
+ font-size: 28rpx;
+ color: #484848;
+}
+/* .list:first-child{
+ border-bottom: 1px solid #E6E6E6;
+} */
+.arrow{
+ width: 10rpx;
+ height: 16rpx;
+ margin-left: 12rpx;
+}
+.type-wrap{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ background: #F6F6F9;
+ box-sizing: border-box;
+ z-index: 9999;
+}
+.list-wrap{
+ padding: 0 30rpx;
+ background: #fff;
+}
+.type-list{
+ display: flex;
+ justify-content: space-between;
+ height: 80rpx;
+ align-items: center;
+ font-size: 28rpx;
+ border-bottom: 1px solid #E6E6E6;
+}
+.select{
+ width: 40rpx;
+ height: 27rpx;
+ display: none;
+}
+.list-cur{
+ color: #3D98FF;
+}
+.list-cur .select{
+ display: block;
+}
+.jifen-sty{
+ text-align: right;
+ font-size: 28rpx;
+}
+.group view{
+ display: inline-block;
+}
+.group view:first-child{
+ margin-right: 15rpx;
+}
+.group radio {
+ transform:scale(0.8);
+ vertical-align: 2px;
+}
+.video-content{
+ width: 100%;
+ background-color: #fff;
+ display: flex;
+ display: -webkit-flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ flex-wrap: wrap;
+}
+.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;
+}
\ No newline at end of file
diff --git a/pages/buy/cart.js b/pages/buy/cart.js
new file mode 100644
index 0000000..1769728
--- /dev/null
+++ b/pages/buy/cart.js
@@ -0,0 +1,289 @@
+// pages/buy/cart.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+/**
+ * 页面的初始数据
+*/
+data: {
+ adminShow: true,//编辑或完成
+ totalPrice: 0,//总金额
+ allselect:false,//是否全选
+ selectArr: [], //已选择的商品
+ cartData:[
+ {
+ "id":1,
+ "amount":2,
+ "price":50,
+ "name":"手机",
+ "checked":false,
+ "image":"https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640"
+ },
+ {
+ "id":2,
+ "amount":1,
+ "price":10,
+ "name":"显示器",
+ "checked": false,
+ "image":"https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640"
+ },
+ {
+ "id":3,
+ "amount":5,
+ "price":120,
+ "name":"可乐",
+ "checked": false,
+ "image":"https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640"
+ },
+ {
+ "id":4,
+ "amount":10,
+ "price":50,
+ "name":"手机",
+ "checked": false,
+ "image":"https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640"
+ },
+ {
+ "id":4,
+ "amount":1,
+ "price":10,
+ "name":"芝麻",
+ "checked": false,
+ "image":"https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640"
+ },
+ ],
+},
+//计算价格
+calculateTotal:function(){
+ var selectArr = this.data.selectArr; //已选择的商品
+ var totalPrice = 0;
+ if(selectArr.length){ //如果存在商品就计算价格
+ for(var i=0;i{
+ if(res.retCode == 0){
+ // this.setData({
+ // cartData: res.body.cartItem
+ // })
+ }
+ })
+},
+//删除商品
+deleteshopTap:function(){ //要删除 肯定是已经选中了的商品, 所以肯定在 selectArr里面
+ var cartData = this.data.cartData; //初始数据
+ var selectArr = this.data.selectArr; //已选择的商品数组
+ var that = this;
+ if(selectArr.length){ //如果以选择的商品数组里有长度
+ for (var i = 0; i < cartData.length; i++) {
+ for (var j = 0; j < selectArr.length; j++) {
+ if (cartData[i].id == selectArr[j].id) { //把初始数据的对应id的数据删掉就好了
+ that.handleDelete(selectArr[j].id)
+ cartData.splice(i, 1);
+ }
+ }
+ }
+ this.setData({ //重置一下数据
+ cartData: cartData,
+ selectArr: [] //已选择的数组置空
+ })
+ this.calculateTotal(); //计算价格
+ }
+},
+//编辑或完成
+adminTap:function(){ //切换四个按钮的显示
+ this.setData({
+ adminShow: !this.data.adminShow
+ })
+},
+//结算
+toApply:function(){
+ console.log("已选择的商品:",this.data.selectArr)
+},
+ change(e){
+ console.log('1')
+ this.setData({
+ test: e.detail.value
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getCartInfo(options.id)
+ },
+ getCartInfo(id){
+ const param = {
+ "goodsId": id,
+ "count": 1
+ }
+ request._post('/firefly/cart/mycart',param,
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ cartData: res.body.cartItem
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/buy/cart.json b/pages/buy/cart.json
new file mode 100644
index 0000000..a664661
--- /dev/null
+++ b/pages/buy/cart.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "stepper": "../../component/stepper/index"
+ },
+ "navigationBarTitleText": "购物车"
+}
\ No newline at end of file
diff --git a/pages/buy/cart.wxml b/pages/buy/cart.wxml
new file mode 100644
index 0000000..cddd02a
--- /dev/null
+++ b/pages/buy/cart.wxml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+ 全选
+ 合计:¥ {{totalPrice}}
+
+ 编辑
+ 去结算({{selectArr.length}})
+
+
+ 删除
+ 完成
+
+
\ No newline at end of file
diff --git a/pages/buy/cart.wxss b/pages/buy/cart.wxss
new file mode 100644
index 0000000..a3bcd0f
--- /dev/null
+++ b/pages/buy/cart.wxss
@@ -0,0 +1,108 @@
+.cart_body{
+ box-sizing: border-box;
+ padding: 0 32rpx;
+}
+.cart_item{
+ box-sizing: border-box;
+ padding-bottom: 100rpx;
+}
+.check_img{
+ width: 60rpx;
+ height: 60rpx;
+ margin-top: 76rpx;
+}
+
+label{
+ display: flex;
+ padding: 46rpx 0;
+}
+.cart_image{
+ width: 192rpx;
+ height: 192rpx;
+ margin-left: 32rpx;
+}
+.cart_img{
+ width: 100%;
+ height: 100%;
+ border-radius: 8rpx;
+
+}
+.cart_content{
+ margin-left: 20rpx;
+ flex:1;
+ display: flex;
+ flex-flow: column wrap;
+ justify-content: space-between;
+}
+.content_title{
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp:2;
+ line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+
+.content_price{
+ display: flex;
+ justify-content: space-between;
+}
+.goods_number_container{
+ width: 150rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.goods_number_icon_container{
+ width: 44rpx;
+ height:44rpx;
+}
+.goods_number_icon{
+ width:100%;
+ height:100%;
+}
+.goods_number{
+ flex:1;
+ text-align: center;
+}
+.cart_total_container{
+ height: 100rpx;
+ line-height: 88rpx;
+ background: #f5f5f5;
+ position: fixed;
+ bottom:0;
+ left:0;
+ right:0;
+ box-sizing: border-box;
+ padding: 12rpx 32rpx;
+ display: flex;
+}
+.checkAllBox{
+ border-radius: 50%;
+ height: 40rpx;
+ width: 40rpx;
+ margin-top: 23rpx;
+ margin-right: 8rpx;
+}
+.totalPrice{
+ flex:1;
+ margin-left: 40rpx;
+}
+.clearingBox{
+ width: 300rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.btn{
+ width: 140rpx;
+ text-align: center;
+ border-radius: 36rpx;
+ line-height: 72rpx;
+}
+.editbtn{
+ border: 1px solid #666666;
+ background: #fff;
+}
+.clearbtn{
+ background: #ff5c4d;
+ color: #fff;
+}
\ No newline at end of file
diff --git a/pages/buy/index.js b/pages/buy/index.js
new file mode 100644
index 0000000..624df0b
--- /dev/null
+++ b/pages/buy/index.js
@@ -0,0 +1,129 @@
+// pages/buy/index.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ cartData:'',
+ layerShow:false,
+ addressInfo:''
+ },
+ buyEvent(){
+ // this.setData({
+ // layerShow: true
+ // })
+ if(!this.data.addressInfo){
+ this.toast('请选择收货地址')
+ return false
+ }
+ let data={
+ addressId:this.data.addressInfo.id
+ }
+ request._post('/firefly/order/add',data,
+ res=>{
+ if(res.retCode == 0){
+ setTimeout(() => {
+ wx.showToast({
+ title: '购买成功',
+ icon: 'none',
+ duration:2000
+ })
+ }, 100);
+ wx.switchTab({
+ url: '/pages/my/index',
+ })
+ }
+ })
+ },
+ toast(msg){
+ wx.hideLoading();
+ setTimeout(() => {
+ wx.showToast({
+ title: msg,
+ icon: 'none',
+ duration:2000
+ })
+ }, 100);
+ },
+ tapClick(e){
+ console.log('反倒是离开金额为',e)
+ this.setData({
+ layerShow: false
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getCartInfo(options.id)
+
+ console.log(wx.getStorageSync('addressInfo'))
+ },
+ getCartInfo(id){
+ request._post('/firefly/cart/mycart',{},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ cartData: res.body
+ })
+ }
+ })
+ },
+ selectAddress(){
+ wx.navigateTo({
+ url: '/pages/my/addressList?flag=1'
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ addressInfo:wx.getStorageSync('addressInfo')
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/buy/index.json b/pages/buy/index.json
new file mode 100644
index 0000000..a55d0d9
--- /dev/null
+++ b/pages/buy/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "play-layer":"../../component/payLayer/index"
+ },
+ "navigationBarTitleText": "购买"
+}
\ No newline at end of file
diff --git a/pages/buy/index.wxml b/pages/buy/index.wxml
new file mode 100644
index 0000000..cd79137
--- /dev/null
+++ b/pages/buy/index.wxml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+ {{addressInfo.name}}
+ {{addressInfo.phone}}
+
+
+ {{addressInfo.province}} {{addressInfo.city}}{{addressInfo.town}}
+
+
+
+
+ 选择地址
+
+
+
+
+
+
+
+
+
+
+ {{item.goodsName}}
+
+
+
+
+
+
+ 所需积分
+
+
+ {{item.points}}
+
+
+
+
+
+
+ 实付积分 {{cartData.points}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/buy/index.wxss b/pages/buy/index.wxss
new file mode 100644
index 0000000..95ae386
--- /dev/null
+++ b/pages/buy/index.wxss
@@ -0,0 +1,125 @@
+.pel-info-wrap{
+ padding: 0 30rpx;
+}
+.pel-info{
+ position: relative;
+ background: #fff;
+ border-radius: 10rpx;
+ padding: 40rpx 24rpx 40rpx 15rpx;
+ font-size: 0;
+}
+.pel-info-left image{
+ width: 77rpx;
+ height: 78rpx;
+}
+.pel-info-left{
+ margin-right: 4rpx;
+}
+.arrow{
+ margin-left: 15rpx;
+ margin-top: 35rpx;
+ width: 10rpx;
+ height: 16rpx;
+}
+.pel-name{
+ color: #333333;
+ font-size: 26rpx;
+}
+.pel-tel{
+ color: #484848;
+ font-size: 24rpx;
+ margin-left: 12rpx;
+}
+.pel-des{
+ font-size: 22rpx;
+ color: #666;
+ padding-top: 5rpx;
+}
+.pel-des1{
+ font-size: 22rpx;
+ color: #666;
+ padding-top: 25rpx;
+}
+.buy-list{
+ margin-top: 20rpx;
+ background: #fff;
+ border-radius: 10rpx;
+ padding: 0 25rpx;
+}
+.list-top{
+ padding-top: 30rpx;
+ font-size: 0;
+}
+.list-top image{
+ width: 108rpx;
+ height: 108rpx;
+}
+.list-title{
+ margin-left: 12rpx;
+ font-size: 28rpx;
+ color: #333;
+}
+.list-price{
+ padding-top: 19rpx;
+ padding-bottom: 30rpx;
+ text-align: right;
+ color: #F31717;
+ font-size: 20rpx;
+ border-bottom: 1px solid #E8E8E8;
+}
+.list-price text{
+ font-size: 28rpx;
+}
+.exp-con{
+ padding: 21rpx 0 24rpx 0;
+}
+.exp-name{
+ font-size: 24rpx;
+ color: #333;
+}
+.exp-price{
+ color: #F31717;
+ font-size: 24rpx;
+}
+.exp-price text{
+ font-size: 28rpx;
+}
+.score-wrap{
+ position: fixed;
+ width: 100%;
+ left: 0;
+ bottom: 0;
+ background: #fff;
+ text-align: right;
+ padding: 16rpx 0;
+ font-size: 0;
+}
+.score-wrap button{
+ display: inline-block;
+ margin-right: 30rpx;
+ width: 170rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ background-image: linear-gradient(to right, #FFAD4A , #FF6925);
+ border-radius: 40rpx;
+ color: #fff;
+ font-size: 28rpx;
+}
+.score-price{
+ vertical-align: 23rpx;
+ font-size: 20rpx;
+ color: #F31717;
+ margin-right: 16rpx;
+}
+.score-price .price{
+ font-size: 28rpx;
+}
+.score-price .ing{
+ margin-left: 6rpx;
+}
+.pel-info-wrap1{
+ padding-bottom: 100rpx;
+}
+.score-wrap button{
+ padding: 0;
+}
\ No newline at end of file
diff --git a/pages/category/category.js b/pages/category/category.js
new file mode 100644
index 0000000..2470e35
--- /dev/null
+++ b/pages/category/category.js
@@ -0,0 +1,82 @@
+// pages/category/category.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ categoryList:[]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getcategory()
+ },
+ getcategory(){
+ request._post('/firefly/category/list',{type:1},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ categoryList:res.body
+ })
+ }
+ })
+ },
+ achievement(e){
+ let id=e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/my/achievement?id='+id,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/category/category.json b/pages/category/category.json
new file mode 100644
index 0000000..ad20798
--- /dev/null
+++ b/pages/category/category.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "成就列表"
+}
\ No newline at end of file
diff --git a/pages/category/category.wxml b/pages/category/category.wxml
new file mode 100644
index 0000000..badf8ac
--- /dev/null
+++ b/pages/category/category.wxml
@@ -0,0 +1,11 @@
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
diff --git a/pages/category/category.wxss b/pages/category/category.wxss
new file mode 100644
index 0000000..b77e18a
--- /dev/null
+++ b/pages/category/category.wxss
@@ -0,0 +1,13 @@
+/* pages/category/category.wxss */
+.sign-list{
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ color: #333;
+}
+.sign-ee{
+ padding: 24rpx 0;
+ border-bottom: 1px solid #E8E8E8;
+}
+.sign-ee:last-child{
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
new file mode 100644
index 0000000..2f650d5
--- /dev/null
+++ b/pages/home/home.js
@@ -0,0 +1,185 @@
+// pages/home.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list: [],
+ categoryId: 0,
+ keyword: '',
+ pageNum: 1,
+ pageSize: 10,
+ listData: [],
+ pageNum1: 1,
+ display: 0
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ // this.getData()
+ },
+ listTap(e) {
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/vedio/detail?id=' + id
+ })
+ },
+ getVedio() {
+ const data = {
+ "keyword": "", // 搜索关键字,视频标题,可选参数
+ "categoryId": 1, //分类 Id,可选参数
+ "pageNum": this.data.pageNum1,
+ "pageSize": 10// ⻚⼤⼩,可选参数
+ }
+ request._post('/firefly/video/list', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body.length > 0) {
+ var listdata = this.data.listData
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ listData: listdata,
+ pageNum1: ++res.pageInfo.pageNum
+ })
+ } else {
+ if (this.data.pageNum1 == res.pageInfo.pages) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+
+ }
+ })
+ },
+ onbindtap(e) {
+ let url = e.currentTarget.dataset.url
+ wx.navigateTo({
+ url: url
+ })
+ },
+ tab(e) {
+ this.setData({
+ pageNum: 1,
+ pageNum1:1,
+ list: [],
+ listData:[],
+ display: e.currentTarget.dataset.id
+ })
+ console.log(this.data.listData)
+ if (e.currentTarget.dataset.id != 1) {
+ this.getData()
+ }else {
+ this.getVedio()
+ }
+ },
+ getData() {
+ let data = {
+ display: this.data.display,
+ categoryId: this.data.categoryId,
+ keyword: this.data.keyword,
+ pageNum: this.data.pageNum,
+ pageSize: this.data.pageSize
+ }
+ request._post('/firefly/article/list', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body.length > 0) {
+ var listdata = this.data.list
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ list: listdata,
+ pageNum: ++res.pageInfo.pageNum
+ })
+ } else {
+ if (this.data.pageNum == res.pageInfo.pages) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ }
+ )
+ },
+ detail(e) {
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/article/detail?id=' + id,
+ })
+ },
+ release(e) {
+ let num = e.currentTarget.dataset.num
+ wx.navigateTo({
+ url: '/pages/article/publish?id=' + num,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ list: [],
+ pageNum: 1
+ })
+ // this.getVedio()
+ this.getData()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ if (this.data.display == 1) {
+ this.getVedio()
+ } else {
+ this.getData()
+ }
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/home/home.json b/pages/home/home.json
new file mode 100644
index 0000000..b2f4587
--- /dev/null
+++ b/pages/home/home.json
@@ -0,0 +1,8 @@
+{
+ "usingComponents": {
+ "tab-list":"../../component/tabList/index"
+ },
+ "navigationBarTitleText": "首页",
+ "navigationBarBackgroundColor": "#FFA11B",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/pages/home/home.wxml b/pages/home/home.wxml
new file mode 100644
index 0000000..4be23ba
--- /dev/null
+++ b/pages/home/home.wxml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 消息
+
+
+
+
+
+
+
+
+
+
+ 推荐
+
+
+ 正能量
+ 视频
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+ {{item.nickName}}
+ {{item.updatedAt}}
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{item.nickName}}
+
+ {{item.updatedAt}}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/home/home.wxss b/pages/home/home.wxss
new file mode 100644
index 0000000..095455d
--- /dev/null
+++ b/pages/home/home.wxss
@@ -0,0 +1,237 @@
+/* pages/home.wxss */
+page{
+ background: #F6F6F9;
+}
+.home-top{
+ padding: 0 30rpx;
+ margin-top: -38rpx;
+}
+.top-menu{
+ background: #fff;
+ padding: 50rpx 0;
+ border-radius: 20rpx;
+}
+.top-menu .img1{
+ width: 51rpx;
+ height: 51rpx;
+}
+.top-menu .img2{
+ width: 45rpx;
+ height: 51rpx;
+}
+.top-menu .img3{
+ width: 51rpx;
+ height: 51rpx;
+}
+.top-menu .img4{
+ width: 51rpx;
+ height: 49rpx;
+}
+.top-name{
+ margin-top: 4rpx;
+ color: #333;
+ font-size: 28rpx;
+}
+.bar-menu{
+ margin-top: 20rpx;
+ padding: 20rpx 0;
+ background: #FFFFFF;
+}
+.bar-menu image{
+ width: 69rpx;
+ height: 69rpx;
+}
+.bar-name{
+ margin-top: 4rpx;
+ color: #333333;
+ font-size: 28rpx;
+}
+
+.article-con{
+ margin-top: 20rpx;
+ padding-left: 30rpx;
+ background: #fff;
+}
+.article-con text{
+ display: inline-block;
+ position: relative;
+ margin-right: 66rpx;
+ color: #333333;
+ font-size: 32rpx;
+ font-weight: bold;
+ height: 60rpx;
+}
+/* .article-con text.tab-active{
+ color: #3D98FF;
+} */
+.tab-con{
+ padding-top: 27rpx;
+}
+.article-con text.tab-active::after{
+ content: '';
+ position: absolute;
+ width: 25rpx;
+ height: 7rpx;
+ background: #FFA11B;
+ bottom: 0;
+ left: 50%;
+ margin-left: -12.5rpx;
+ border-radius: 5rpx;
+}
+.list-title{
+ margin-top: 10rpx;
+ font-size: 30rpx;
+ color: #333;
+ height: 40px;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ overflow: hidden;
+ -webkit-line-clamp:2;
+ -webkit-box-orient:vertical;
+}
+.list-des{
+ margin-top: 10rpx;
+ font-size: 24rpx;
+ color: #666;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ overflow: hidden;
+ -webkit-line-clamp:2;
+ -webkit-box-orient:vertical;
+}
+.goods-img{
+ width: 182rpx;
+ height: 175rpx;
+ margin-left: 20rpx;
+ border-radius: 10rpx;
+}
+.goods-img-list{
+ /* width: 182rpx; */
+ height: 175rpx;
+ margin-right: 5rpx;
+ border-radius: 5rpx;
+}
+.list-func{
+ margin-top: 14rpx;
+}
+.pl-img{
+ vertical-align: middle;
+ width: 43rpx;
+ height: 43rpx;
+ border-radius: 50rpx;
+}
+.list-name{
+ font-size: 24rpx;
+ color: #333;
+ margin-left: 12rpx;
+}
+.list-date{
+ font-size: 22rpx;
+ color: #828282;
+ margin-left: 21rpx;
+}
+.article-list{
+ padding: 0 30rpx;
+ overflow: hidden;
+ background: #fff;
+}
+.list-item{
+ margin-top: 30rpx;
+ padding: 26rpx 17rpx;
+ background: #F8F8F8;
+ border-radius: 30rpx;
+ /* border-bottom: 1px solid #E6E6E6; */
+}
+.search-wrap{
+ background: #FFA11B;
+ padding: 30rpx 30rpx;
+ padding-bottom: 80rpx;
+}
+.search-con{
+ background: #fff;
+ border-radius: 25px;
+ height: 54rpx;
+ padding-left: 30rpx;
+ overflow: hidden;
+ padding-right: 30rpx;
+}
+.icon-search{
+ display: inline-block;
+ width: 32rpx;
+ height: 32rpx;
+ margin-top: 12rpx;
+}
+.search-text{
+ font-size: 24rpx;
+ height: 54rpx;
+ margin-left: 14rpx;
+}
+.search-text::placeholder{
+ color: #C9C9C9;
+}
+img{
+ display: none;
+}
+.icon-code{
+ width: 46rpx;
+ height: 46rpx;
+}
+.icon-msg{
+ width: 40rpx;
+ height: 35rpx;
+}
+.code-con{
+ margin-top: 5rpx;
+ margin-right: 35rpx;
+}
+.msg-con{
+ margin-left: 40rpx;
+ font-size: 20rpx;
+ color: #fff;
+}
+/* pages/vedio/index.wxss */
+.list{
+ overflow: hidden;
+ clear: both;
+ padding: 0 10rpx;
+ padding-bottom: 20rpx;
+}
+.item{
+ margin-top: 15rpx;
+ float: left;
+ width: 49%;
+ overflow: hidden;
+ text-align: center;
+}
+.item:nth-child(odd){
+ margin-right: 2%;
+}
+.item image{
+ max-width: 100%;
+ height: 400rpx !important;
+}
+.title{
+ font-size: 16px;
+ color: #333;
+ text-align: left;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.user-info{
+ font-size: 24rpx;
+}
+.mt{
+ margin-top: 8px;
+}
+.user-info image{
+ width: 30rpx;
+ height: 30rpx !important;
+ border-radius: 50%;
+ vertical-align: -3px;
+ margin-right: 5px;
+}
+.date{
+ color: #666;
+ font-size: 12px;
+}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
new file mode 100644
index 0000000..608a282
--- /dev/null
+++ b/pages/index/index.js
@@ -0,0 +1,54 @@
+//index.js
+//获取应用实例
+const app = getApp()
+
+Page({
+ data: {
+ motto: 'Hello World',
+ userInfo: {},
+ hasUserInfo: false,
+ canIUse: wx.canIUse('button.open-type.getUserInfo')
+ },
+ //事件处理函数
+ bindViewTap: function() {
+ wx.navigateTo({
+ url: '../logs/logs'
+ })
+ },
+ onLoad: function () {
+ if (app.globalData.userInfo) {
+ this.setData({
+ userInfo: app.globalData.userInfo,
+ hasUserInfo: true
+ })
+ } else if (this.data.canIUse){
+ // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
+ // 所以此处加入 callback 以防止这种情况
+ app.userInfoReadyCallback = res => {
+ this.setData({
+ userInfo: res.userInfo,
+ hasUserInfo: true
+ })
+ }
+ } else {
+ // 在没有 open-type=getUserInfo 版本的兼容处理
+ wx.getUserInfo({
+ success: res => {
+ app.globalData.userInfo = res.userInfo
+ this.setData({
+ userInfo: res.userInfo,
+ hasUserInfo: true
+ })
+ }
+ })
+ }
+ },
+ getUserInfo: function(e) {
+ console.log(e)
+ app.globalData.userInfo = e.detail.userInfo
+ this.setData({
+ userInfo: e.detail.userInfo,
+ hasUserInfo: true
+ })
+ }
+})
diff --git a/pages/index/index.json b/pages/index/index.json
new file mode 100644
index 0000000..bfde5e9
--- /dev/null
+++ b/pages/index/index.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "tab-list":"../../component/tabList/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
new file mode 100644
index 0000000..ed5f55a
--- /dev/null
+++ b/pages/index/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ {{userInfo.nickName}}
+
+
+
+ {{motto}}
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
new file mode 100644
index 0000000..ce30de0
--- /dev/null
+++ b/pages/index/index.wxss
@@ -0,0 +1,21 @@
+/**index.wxss**/
+.userinfo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.userinfo-avatar {
+ width: 128rpx;
+ height: 128rpx;
+ margin: 20rpx;
+ border-radius: 50%;
+}
+
+.userinfo-nickname {
+ color: #aaa;
+}
+
+.usermotto {
+ margin-top: 200px;
+}
\ No newline at end of file
diff --git a/pages/logs/logs.js b/pages/logs/logs.js
new file mode 100644
index 0000000..b2b967d
--- /dev/null
+++ b/pages/logs/logs.js
@@ -0,0 +1,15 @@
+//logs.js
+const util = require('../../utils/util.js')
+
+Page({
+ data: {
+ logs: []
+ },
+ onLoad: function () {
+ this.setData({
+ logs: (wx.getStorageSync('logs') || []).map(log => {
+ return util.formatTime(new Date(log))
+ })
+ })
+ }
+})
diff --git a/pages/logs/logs.json b/pages/logs/logs.json
new file mode 100644
index 0000000..3ee76c1
--- /dev/null
+++ b/pages/logs/logs.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "查看启动日志",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml
new file mode 100644
index 0000000..b5a85ac
--- /dev/null
+++ b/pages/logs/logs.wxml
@@ -0,0 +1,6 @@
+
+
+
+ {{index + 1}}. {{log}}
+
+
diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss
new file mode 100644
index 0000000..94d4b88
--- /dev/null
+++ b/pages/logs/logs.wxss
@@ -0,0 +1,8 @@
+.log-list {
+ display: flex;
+ flex-direction: column;
+ padding: 40rpx;
+}
+.log-item {
+ margin: 10rpx;
+}
diff --git a/pages/my/achievement.js b/pages/my/achievement.js
new file mode 100644
index 0000000..4604896
--- /dev/null
+++ b/pages/my/achievement.js
@@ -0,0 +1,119 @@
+// pages/my/jiu.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ listInfo: [],
+ pageNum: 1,
+ pageSize:10,
+ categoryId:0
+ },
+ 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,
+ })
+ },
+getList(){
+ const params = {
+ categoryId:this.data.categoryId,
+ keyword: "", // 搜索关键字,可选
+ orderBy: 1, // 排序:1-时间降序;2-时间升序;,可选
+ pageNum: this.data.pageNum,
+ pageSize:this.data.pageSize
+ }
+ request._post('/firefly/achv-title-task/account/task/list',params,
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.listInfo
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ listInfo:listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ })
+},
+detail(e){
+ let item=e.currentTarget.dataset.item
+ wx.setStorageSync('achieveItem', item);
+ wx.navigateTo({
+ url: '/pages/achieve/detail'
+ })
+},
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ categoryId:options.id
+ })
+ this.getList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/achievement.json b/pages/my/achievement.json
new file mode 100644
index 0000000..cb76fdc
--- /dev/null
+++ b/pages/my/achievement.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "成就任务"
+}
\ No newline at end of file
diff --git a/pages/my/achievement.wxml b/pages/my/achievement.wxml
new file mode 100644
index 0000000..83e7c64
--- /dev/null
+++ b/pages/my/achievement.wxml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.titleName}}
+ ({{item.currCount}}/{{item.taskCount}})
+
+ +{{item.points}}
+
+ {{item.intro}}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/achievement.wxss b/pages/my/achievement.wxss
new file mode 100644
index 0000000..c99bf48
--- /dev/null
+++ b/pages/my/achievement.wxss
@@ -0,0 +1,95 @@
+/* pages/my/jiu.wxss */
+.list-item{
+ margin-top: 20rpx;
+ padding: 30rpx;
+ background: #fff;
+}
+.list-title{
+ font-size: 30rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 1px solid #f0f0f0;
+}
+.list-item:first-child{
+ margin-top: 0;
+}
+.list-con{
+ padding-top: 20rpx;
+}
+.list-img image{
+ width: 180rpx;
+ height: 180rpx;
+ border-radius: 10rpx;
+ margin-right: 20rpx;
+}
+.list-intro{
+ color: #666;
+}
+.jifen-list {
+ font-size: 0;
+}
+
+.icon-tt {
+ width: 70rpx;
+ height: 70rpx;
+}
+
+.jifen-list {
+ background: #fff;
+ padding: 0 30rpx;
+}
+
+.jf-list {
+ border-top: 1px solid #E8E8E8;
+ padding: 30rpx 0;
+}
+
+.day-sign {
+ font-size: 30rpx;
+ color: #333;
+}
+
+.day-sign text {
+ display: inline-block;
+ /* width: 112rpx; */
+ height: 33rpx;
+ /* background: linear-gradient(270deg, #FFBD83 0%, #F05419 100%); */
+ border-radius: 10rpx;
+ font-size: 22rpx;
+ color: #A9A9A9;
+ text-align: center;
+ vertical-align: middle;
+ margin-left: 5rpx;
+}
+.grpup{
+ width: 21rpx;
+ height: 23rpx;
+ vertical-align: -1rpx;
+}
+.group-con{
+ margin-top: 4rpx;
+ color: #A9A9A9;
+ font-size: 20rpx;
+}
+.sign-list{
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ color: #333;
+}
+.sign-ee{
+ padding: 24rpx 0;
+ border-bottom: 1px solid #E8E8E8;
+}
+.sign-ee:last-child{
+ border-bottom: none;
+}
+.sign-btn {
+ width: 129rpx !important;
+ height: 52rpx;
+ background: linear-gradient(270deg, #92BBFF 0%, #3D98FF 100%);
+ border-radius: 29rpx;
+ color: #fff;
+ font-size: 28rpx;
+ line-height: 52rpx;
+ text-align: center;
+ padding: 0;
+}
\ No newline at end of file
diff --git a/pages/my/addressAdd.js b/pages/my/addressAdd.js
new file mode 100644
index 0000000..1961fbd
--- /dev/null
+++ b/pages/my/addressAdd.js
@@ -0,0 +1,212 @@
+// pages/my/addressAdd.js
+import request from '../../utils/request'
+// import { on } from 'cluster'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ region: ['请选择省市区', '', ''],
+ nameValue:'',
+ telValue: '',
+ delValue: '',
+ delId: ''
+ },
+ valueInput(e){
+ console.log(e.detail.value)
+ this.setData({
+ nameValue: e.detail.value
+ })
+ },
+ valueInput1(e){
+ this.setData({
+ telValue: e.detail.value
+ })
+ },
+ valueInput2(e){
+ this.setData({
+ delValue: e.detail.value
+ })
+ },
+ bindRegionChange: function (e) {
+ this.setData({
+ region: e.detail.value
+ })
+},
+saveEvent(){
+ if(!this.data.nameValue){
+ wx.showToast({
+ title: '请输入姓名',
+ icon: 'none',
+ duration:3000
+ })
+ return
+ }
+ if(!this.data.telValue){
+ wx.showToast({
+ title: '请输入联系电话',
+ icon: 'none',
+ duration:3000
+ })
+ return
+ }
+ if(!this.isTel(this.data.telValue)){
+ wx.showToast({
+ title: '手机号码格式错误',
+ icon: 'none',
+ duration:3000
+ })
+ return
+ }
+ if(!this.data.region[1]){
+ wx.showToast({
+ title: '请选择地址',
+ icon: 'none',
+ duration:3000
+ })
+ return
+ }
+ if(!this.data.delValue){
+ wx.showToast({
+ title: '请输入详细地址',
+ icon: 'none',
+ duration:3000
+ })
+ return
+ }
+ const param = {
+ "name": this.data.nameValue, // 收货⼈,必填项
+ "phone": this.data.telValue, // 收货⼈联系电话,必填项
+ // "provinceCode": "45000", // 省编号,必填项
+ "province": this.data.region[0], // 省,必填项
+ // "cityCode": "52100", // 市编号,必填项
+ "city": this.data.region[1], // 市,必填项
+ // "townCode": "00021", // 区域编号,必填项
+ "town": this.data.region[2], // 区域,必填项
+ "address": this.data.delValue, // 具体地址,必填项
+ "isDefault": 1 // 是否默认地址,1是 2否,必填项
+ }
+ if(this.data.delId){ // 编辑
+ param.id = this.data.delId
+ request._post('/firefly/account-address/my-address/update',param,
+ res=>{
+ if(res.retCode == 0){
+ const text = this.data.delId? '更新成功': '添加成功'
+ wx.showToast({
+ title: text,
+ icon: 'none',
+ duration:3000
+ })
+ setTimeout(() => {
+ wx.navigateBack({
+ delta: 1
+ })
+ // wx.redirectTo({
+ // url: '/pages/my/addressList'
+ // })
+ },1500)
+ }
+ })
+ }else{ // 新增
+ request._post('/firefly/account-address/my-address/add/new',param,
+ res=>{
+ if(res.retCode == 0){
+ wx.showToast({
+ title: '添加地址成功',
+ icon: 'none',
+ duration:3000
+ })
+ setTimeout(() => {
+ wx.redirectTo({
+ url: '/pages/my/addressList'
+ })
+ },1500)
+ }
+ })
+ }
+
+},
+getDetail(id){
+ const param = {
+ id: id
+ }
+ request._post('/firefly/account-address/my-address/detail',param,
+ res=>{
+ this.data.region[0] = res.body.province
+ this.data.region[1] = res.body.city
+ this.data.region[2] = res.body.town
+ this.setData({
+ nameValue: res.body.name,
+ telValue: res.body.phone,
+ delValue: res.body.address,
+ region: this.data.region
+ })
+ })
+},
+// 判断手机号
+ isTel(value) {
+ return /^1[3,4,5,6,7,8,9][0-9]{9}$/.test(value.toString());
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(options.id){
+ this.getDetail(options.id)
+ this.setData({
+ delId: options.id
+ })
+ }
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/addressAdd.json b/pages/my/addressAdd.json
new file mode 100644
index 0000000..fa9c9df
--- /dev/null
+++ b/pages/my/addressAdd.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "新增收货地址"
+}
\ No newline at end of file
diff --git a/pages/my/addressAdd.wxml b/pages/my/addressAdd.wxml
new file mode 100644
index 0000000..0069ef0
--- /dev/null
+++ b/pages/my/addressAdd.wxml
@@ -0,0 +1,35 @@
+
+
+
+ 收货人姓名
+
+
+
+
+
+ 联系电话
+
+
+
+
+
+ 所在区域
+
+
+
+ {{region[0]}} {{region[1]}} {{region[2]}}
+
+
+
+
+
+
+ 详细地址
+
+
+
+
+
+
+
+
diff --git a/pages/my/addressAdd.wxss b/pages/my/addressAdd.wxss
new file mode 100644
index 0000000..d30915c
--- /dev/null
+++ b/pages/my/addressAdd.wxss
@@ -0,0 +1,59 @@
+/* pages/my/addressAdd.wxss */
+.add-wrap{
+ background: #fff;
+ padding: 0 30rpx;
+}
+.add-list{
+ border-bottom: 1px solid #E8E8E8;
+}
+.add-list .input-text{
+ height: 100rpx;
+ font-size: 26rpx;
+ text-align: right;
+}
+.add-list .input-text::placeholder{
+ color: yellow;
+}
+.list-left{
+ height: 100rpx;
+ line-height: 100rpx;
+ color: #333333;
+ font-size: 28rpx;
+ margin-right: 30rpx;
+}
+
+.choose-item{
+ display: block;
+ width: 100%;
+ text-align: right;
+ width: 100%;
+ padding-top: 34rpx;
+ padding-bottom: 25rpx;
+ font-size: 26rpx;
+}
+.label-txt{
+ width: 30%;
+ color: #666666;
+ font-size: 32rpx;
+}
+.picker-text{
+ width: 66%;
+ color: #999999;
+ font-size: 26rpx;
+}
+.arrow-down{
+ margin-left: 4rpx;
+ width: 5px;
+ height: 8px;
+}
+.save-btn{
+ margin-top: 120rpx;
+ padding: 0 54rpx;
+}
+.save-btn button{
+ width: 100%;
+ border-radius: 10rpx;
+ background: #FF5603;
+ color: #FFFFFF;
+ font-size: 34rpx;
+}
\ No newline at end of file
diff --git a/pages/my/addressList.js b/pages/my/addressList.js
new file mode 100644
index 0000000..15ed087
--- /dev/null
+++ b/pages/my/addressList.js
@@ -0,0 +1,158 @@
+// pages/my/addressList.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ listInfo: [],
+ selectId: '',
+ flag:0,
+ pageNum: 1,
+ pageSize:10
+ },
+ select(e){
+ console.log(e.currentTarget.dataset.item)
+ if(this.data.flag){
+ wx.setStorageSync('addressInfo', e.currentTarget.dataset.item);
+ wx.navigateBack({
+ delta: 1
+ })
+ }
+ },
+ editEvent(e){
+ wx.navigateTo({
+ url: '/pages/my/addressAdd?id='+e.currentTarget.dataset.id,
+ })
+ },
+ topEvent(e){
+ const that = this
+ const type = e.currentTarget.dataset.default;
+ console.log('荆防颗粒圣诞节fdsfsd来看',type)
+ const param = {
+ "id": e.currentTarget.dataset.id, // 地址⾃增 Id,必填项
+ "isDefault": type == 2?1:2 // 是否默认地址,1是 2否,必填项
+ }
+ console.log('荆防颗粒1111圣诞节来看')
+ request._post('/firefly/account-address/my-address/set/default',param,
+ res=>{
+ if(res.retCode == 0){
+ that.getList()
+ }
+ })
+ },
+ addEvent(){
+ wx.navigateTo({
+ url: '/pages/my/addressAdd',
+ })
+ },
+ radioChange(e) {
+ this.setData({
+ selectId: e.detail.value
+ })
+ },
+ delEvent(e){
+ const param = {
+ id: e.currentTarget.dataset.id
+ }
+ request._post('/firefly/account-address/my-address/delete/one',param,
+ res=>{
+ if(res.retCode == 0){
+ this.getList()
+ wx.showToast({
+ title: '删除成功',
+ icon: 'none',
+ duration:3000
+ })
+ }
+ })
+ },
+ getList(){
+ const param = {
+ pageNum: this.data.pageNum,
+ pageSize:this.data.pageSize
+ }
+ request._post('/firefly/account-address/my-address/list',param,
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.listInfo
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ listInfo:listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ flag:options.flag
+ })
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.getList()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/addressList.json b/pages/my/addressList.json
new file mode 100644
index 0000000..d9987b9
--- /dev/null
+++ b/pages/my/addressList.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "地址管理"
+}
\ No newline at end of file
diff --git a/pages/my/addressList.wxml b/pages/my/addressList.wxml
new file mode 100644
index 0000000..be168c0
--- /dev/null
+++ b/pages/my/addressList.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ {{item.name}}
+ {{item.phone}}
+
+
+ {{item.province+item.city+item.town+item.address}}
+
+
+
+ {{item.isDefault == 1 ? '默认地址':''}}
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/addressList.wxss b/pages/my/addressList.wxss
new file mode 100644
index 0000000..7472aad
--- /dev/null
+++ b/pages/my/addressList.wxss
@@ -0,0 +1,86 @@
+/* pages/my/addressList.wxss */
+.address-wrap{
+ padding: 0 30rpx 150rpx 30rpx;
+}
+.addr-list{
+ margin-top: 20rpx;
+ padding-top: 25rpx;
+ padding-right: 28rpx;
+ padding-left: 28rpx;
+ background: #fff;
+ border-radius: 10rpx;
+}
+.addr-top{
+ padding-top: 25rpx;
+}
+.addr-name{
+ font-size: 28rpx;
+ color: #666666;
+}
+.addr-tel{
+ font-size: 26rpx;
+ color: #484848;
+ margin-left: 53rpx;
+}
+.addr-des{
+ padding-top: 15rpx;
+ padding-bottom: 28rpx;
+ font-size: 28rpx;
+ color: #4D4D4D;
+}
+.addr-bot{
+ border-top: 1px solid #E8E8E8;
+ padding: 23rpx 0;
+}
+.addr-bot .addr-select text{
+ color: #666666;
+ font-size: 26rpx;
+}
+.addr-bot-right text{
+ color: #666666;
+ font-size: 26rpx;
+}
+.addr-bot-right text:first-child{
+ margin-right: 50rpx;
+}
+.btn-con{
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ padding: 25rpx;
+ background: #fff;
+ text-align: center;
+ font-size: 0;
+}
+.btn-con .flex-col{
+ text-align: center;
+}
+.btn-con button{
+ display: inline-block;
+ font-size: 34rpx;
+ width: 80%;
+ border-radius: 10rpx;
+}
+.btn-del{
+ background: #D6D6D6;
+ color: #666666;
+}
+.btn-add{
+ background: #FF5603;
+ color: #fff;
+}
+.addr-bot .addr-select label radio{
+ color: #FF5603;
+ font-size: 26rpx;
+}
+.btn-con{
+ padding: 25rpx 0;
+ text-align: center;
+}
+.btn-con button {
+ padding: 8px 0
+}
+.addr-bot .addr-select .set-top{
+ color: #FF5603;
+}
\ No newline at end of file
diff --git a/pages/my/index.js b/pages/my/index.js
new file mode 100644
index 0000000..e09a52a
--- /dev/null
+++ b/pages/my/index.js
@@ -0,0 +1,109 @@
+// pages/my/index.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ myInfo:{},
+ points:0,
+ reward:''
+ },
+ orderEvent(){
+ wx.navigateTo({
+ url: '/pages/my/orderList',
+ })
+ },
+ pushEvent(){
+ wx.navigateTo({
+ url: '/pages/my/publishList',
+ })
+ },
+ addressEvent(){
+ wx.navigateTo({
+ url: '/pages/my/addressList',
+ })
+ },
+ jiuEvent(){
+ wx.navigateTo({
+ url: '/pages/category/category',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getData()
+ },
+ getPoint(){
+ request._post('/firefly/account-point/my/point',{},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ points:res.body.points
+ })
+ }
+ }
+ )
+ },
+ getData(){
+ request._post('/firefly/account/member/base/info',{},
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ myInfo:res.body
+ })
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.getPoint()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/index.json b/pages/my/index.json
new file mode 100644
index 0000000..c7a4de6
--- /dev/null
+++ b/pages/my/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "个人中心"
+}
\ No newline at end of file
diff --git a/pages/my/index.wxml b/pages/my/index.wxml
new file mode 100644
index 0000000..4549612
--- /dev/null
+++ b/pages/my/index.wxml
@@ -0,0 +1,174 @@
+
+
+
+
+ {{myInfo.realName}}
+
+
+ v5
+
+
+
+
+ 萤火之光
+
+
+
+ {{points}}积分
+
+
+
+
+ v5
+
+
+ 7276
+
+
+ v6
+
+
+ 成长值 7276/10800
+
+ NO.0023 0028 6049 4700
+
+
+
+ 黄金特权
+ 更多
+
+
+
+
+
+ 商城折扣
+
+
+
+ 双倍积分
+
+
+
+ 专属兑换
+
+
+
+ 尊贵标识
+
+
+
+
+ 积分获取 积分可在商城兑换商品
+ 更多
+
+
+
+
+
+
+
+
+
+
+ 每日签到 每日任务
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的发布
+
+
+
+
+
+
+
+ 地址管理
+
+
+
+
+
+
+
+ 订单列表
+
+
+
+
+
+
+
+ 成就列表
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/index.wxss b/pages/my/index.wxss
new file mode 100644
index 0000000..6d17a61
--- /dev/null
+++ b/pages/my/index.wxss
@@ -0,0 +1,270 @@
+/* pages/my/index.wxss */
+page {
+ background: #F6F6F9;
+}
+
+.top-bg {
+ padding: 30rpx 49rpx;
+ height: 312rpx;
+ background: #052B57;
+ border-radius: 0 0 60% 60%;
+ opacity: 0.96;
+ font-size: 30rpx;
+ color: #fff;
+}
+
+.top-bg view {
+ display: inline-block;
+ position: relative;
+}
+
+.top-bg view text {
+ position: absolute;
+ right: 8rpx;
+ bottom: 10rpx;
+ font-size: 16rpx;
+ color: #C99843;
+}
+
+.card-con {
+ width: 683rpx;
+ height: 362rpx;
+ margin: 0 auto;
+ margin-top: -251rpx;
+ position: relative;
+ border-radius: 18px;
+ overflow: hidden;
+}
+
+.card-con image {
+ width: 100%;
+ height: 100%;
+}
+
+.card-tips {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 134rpx;
+ height: 40rpx;
+ background: linear-gradient(132deg, #EED7B0 0%, #FFF2DE 100%);
+ border-radius: 0px 0 0px 26rpx;
+ font-size: 22rpx;
+ line-height: 40rpx;
+ text-align: center;
+ color: #B57F21;
+}
+
+.card-list {
+ position: absolute;
+ z-index: 99;
+ width: 643rpx;
+ /* height: 362rpx; */
+ left: 40rpx;
+ top: 50rpx;
+}
+
+.card-list image {
+ width: 56rpx;
+ height: 56rpx;
+ vertical-align: 4rpx;
+}
+
+.jifen {
+ color: #8B5D0F;
+ font-size: 26rpx;
+}
+
+.jifen text {
+ font-size: 80rpx;
+ margin: 0 10rpx;
+}
+
+.shu {
+ margin-top: 70rpx;
+ padding-right: 50rpx;
+}
+
+.cheng {
+ color: #FFFFFF;
+ font-size: 10px;
+ margin-left: 25rpx;
+}
+
+.line-left,
+.line-right {
+ width: 43rpx;
+ height: 24rpx;
+ width: 43rpx;
+ height: 24rpx;
+ background: #FFFFFF;
+ border-radius: 12rpx;
+ font-size: 22rpx;
+ line-height: 24rpx;
+ font-weight: bold;
+ text-align: center;
+}
+
+.line-left {
+ color: #8B5D0F;
+}
+
+.line-right {
+ background: #8B5D0F;
+ color: #fff;
+}
+
+.line {
+ margin-top: 10rpx;
+ position: relative;
+ width: 100%;
+ height: 7rpx;
+ background: #BD9A62;
+}
+
+.line-cur {
+ position: absolute;
+ left: 0;
+ top: 0;
+ height: 7rpx;
+ background: #FFFFFF;
+}
+
+.per-num {
+ position: absolute;
+ width: 51rpx;
+ height: 17rpx;
+ line-height: 17rpx;
+ background: #F5EDD9;
+ font-size: 14rpx;
+ text-align: center;
+ color: #BD9A62;
+ right: -25rpx;
+ top: -25rpx;
+ border-radius: 4rpx;
+}
+
+.no-dd {
+ font-size: 26rpx;
+ color: #8B5D0F;
+}
+
+.list-head {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 30rpx 30rpx;
+}
+
+.more-ss {
+ color: #A0A0A0;
+ font-size: 22rpx;
+}
+
+.name {
+ color: #333333;
+ font-size: 32rpx;
+}
+
+.name text {
+ color: #9D9D9D;
+ font-size: 20rpx;
+}
+
+.arrow {
+ width: 10rpx;
+ height: 16rpx;
+ margin-left: 12rpx;
+}
+
+.list-te {
+ padding: 20rpx 30rpx 40rpx 30rpx;
+ font-size: 0;
+ text-align: center;
+}
+
+.list-te .flex-col {
+ text-align: center;
+}
+
+.list-te image {
+ width: 74rpx;
+ height: 74rpx;
+}
+
+.list-te .te-title {
+ margin-top: 7rpx;
+ color: #333333;
+ font-size: 24rpx;
+}
+
+.sign-btn {
+ width: 129rpx !important;
+ height: 52rpx;
+ background: linear-gradient(270deg, #92BBFF 0%, #3D98FF 100%);
+ border-radius: 29rpx;
+ color: #fff;
+ font-size: 28rpx;
+ line-height: 52rpx;
+ text-align: center;
+ padding: 0;
+}
+
+.jifen-list {
+ font-size: 0;
+}
+
+.icon-tt {
+ width: 70rpx;
+ height: 70rpx;
+}
+
+.jifen-list {
+ background: #fff;
+ padding: 0 30rpx;
+}
+
+.jf-list {
+ border-top: 1px solid #E8E8E8;
+ padding: 30rpx 0;
+}
+
+.day-sign {
+ font-size: 30rpx;
+ color: #333;
+}
+
+.day-sign text {
+ display: inline-block;
+ width: 112rpx;
+ height: 33rpx;
+ background: linear-gradient(270deg, #FFBD83 0%, #F05419 100%);
+ border-radius: 10rpx;
+ font-size: 22rpx;
+ color: #fff;
+ text-align: center;
+ vertical-align: middle;
+ margin-left: 5rpx;
+}
+.grpup{
+ width: 21rpx;
+ height: 23rpx;
+ vertical-align: -1rpx;
+}
+.group-con{
+ margin-top: 4rpx;
+ color: #A9A9A9;
+ font-size: 20rpx;
+}
+.sign-list{
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ color: #333;
+}
+.sign-ee{
+ padding: 24rpx 0;
+ border-bottom: 1px solid #E8E8E8;
+}
+.sign-ee:last-child{
+ border-bottom: none;
+}
\ No newline at end of file
diff --git a/pages/my/login.js b/pages/my/login.js
new file mode 100644
index 0000000..a8445d9
--- /dev/null
+++ b/pages/my/login.js
@@ -0,0 +1,377 @@
+// pages/baoming/login.js
+import request from '../../utils/request'
+// import qs from '../../utils/qs'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ userInfo: {},
+ pwdcaptchaCode: '',
+ SMScaptchaCode: '',
+ captchaImg: '',
+ captchaToken: '',
+ nav: 1,
+ phoneValue: '',
+ phoneValue1: '',
+ wordValue: '',
+ codeText: '',
+ count: 60,
+ acText: '获取验证码',
+ disabled: false,
+ timeCount: true,
+ smsId: '',
+ openId: ''
+ },
+ getInputValue(e) {
+ this.setData({
+ phoneValue: e.detail.value
+ })
+ },
+ getInputValue1(e) {
+ this.setData({
+ phoneValue1: e.detail.value
+ })
+ },
+ getInputCode(e) {
+ this.setData({
+ codeText: e.detail.value
+ })
+ },
+ getwordValue(e) {
+ this.setData({
+ wordValue: e.detail.value
+ })
+ },
+ getInputPWDCode(e) {
+ this.setData({
+ pwdcaptchaCode: e.detail.value
+ })
+ },
+ getInputSMSCode(e) {
+ this.setData({
+ SMScaptchaCode: e.detail.value
+ })
+ },
+ // 清除事件
+ clearEvent(e) {
+ if (e.currentTarget.dataset.tag == 1) {
+ this.setData({
+ phoneValue: ''
+ })
+ }
+ if (e.currentTarget.dataset.tag == 2) {
+ this.setData({
+ wordValue: ''
+ })
+ }
+ if (e.currentTarget.dataset.tag == 3) {
+ this.setData({
+ phoneValue1: ''
+ })
+ }
+ if (e.currentTarget.dataset.tag == 4) {
+ this.setData({
+ codeText: ''
+ })
+ }
+ },
+ // 获取验证码事件
+ getCode() {
+ if (!this.isTel(this.data.phoneValue1)) {
+ this.toast('请出入正确的手机号')
+ return false
+ }
+ if (this.data.timeCount && !this.data.disabled) {
+ this.setData({ timeCount: false })
+ this.CodeData()
+ setTimeout(() => {
+ this.setData({ timeCount: true })
+ }, 2000);
+ }
+ },
+ // 表单验证
+ verify() {
+ if (!this.isTel(this.data.phoneValue1)) {
+ this.toast('请出入正确的手机号')
+ return false
+ }
+ // if(!this.data.SMScaptchaCode){
+ // this.toast('图形验证码不能为空')
+ // return
+ // }
+ },
+ // 获取验证码接口
+ CodeData() {
+ let that = this
+ // 无网情况下
+ wx.getNetworkType({
+ success: function (res) {
+ if (res.networkType == 'none') {
+ tools.toastTips("发送失败,请重试")
+ return
+ } else {
+ // 获取短信接口
+ request._post('/firefly/public/sms/send/vcode', { mobile: that.data.phoneValue1 }, res => {
+ if (res.retCode == 0) {
+ that.toast('短信发送成功,请注意查收')
+ that.countDown()
+ that.setData({
+ smsId: res.body.smsId
+ })
+ } else {
+ // that.getCaptchaImg()
+ that.toast(res.msg)
+ }
+ }, err => {
+ console.log(err)
+ })
+ }
+ }
+ })
+ },
+ // 倒计时
+ countDown() {
+ let that = this
+ let num = this.data.count;
+ var timer = setInterval(function () {
+ num--;
+ if (num <= 0) {
+ clearInterval(timer);
+ that.setData({
+ acText: '重新发送',
+ disabled: false
+ })
+ } else {
+ that.setData({
+ acText: num + "s",
+ disabled: true
+ })
+ }
+ }, 1000)
+ },
+ navtab(e) {
+ let nav = e.currentTarget.dataset.nav
+ this.setData({
+ nav
+ })
+ // this.getCaptchaImg()
+ },
+ Toregistered(e) {
+ wx.reLaunch({
+ url: '/pages/baoming/registered',
+ })
+ },
+ isTel(value) {
+ return /^1[3,4,5,6,7,8,9][0-9]{9}$/.test(value.toString());
+ },
+ toast(msg) {
+ wx.hideLoading();
+ setTimeout(() => {
+ wx.showToast({
+ title: msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }, 100);
+ },
+ yanzheng() {
+ let param = {}
+ let url = ''
+ if (this.data.nav == 1) {
+ if (!this.data.phoneValue) {
+ this.toast('手机号不能为空')
+ return false
+ }
+ if (!this.isTel(this.data.phoneValue)) {
+ this.toast('手机号码格式错误')
+ return false
+ }
+ if (!this.data.wordValue) {
+ this.toast('密码不能为空')
+ return
+ }
+ // if(!this.data.pwdcaptchaCode){
+ // this.toast('图形验证码不能为空')
+ // return
+ // }
+ param = {
+ userName: this.data.phoneValue,
+ password: this.data.wordValue
+ }
+ url = '/firefly/public/member/login'
+ }
+ if (this.data.nav == 2) {
+ if (!this.data.phoneValue1) {
+ this.toast('手机号不能为空')
+ return false
+ }
+ if (!this.isTel(this.data.phoneValue1)) {
+ this.toast('手机号码格式错误')
+ return false
+ }
+ if (!this.data.codeText) {
+ this.toast('验证码不能为空')
+ return false
+ }
+ param = {
+ mobile: this.data.phoneValue1,
+ smsCode: this.data.codeText,
+ smsId: this.data.smsId
+ }
+ url = '/firefly/public/member/sms/login'
+ }
+ var temp = Object.assign(this.data.userInfo, param)
+ console.log(temp)
+ temp.openId = this.data.openId || ''
+ request._post(url, temp,
+ (res) => {
+ if (res.retCode == 0) {
+ wx.setStorageSync('userInfo', res.body);
+ wx.setStorageSync('token', res.body.token);
+ wx.switchTab({
+ url: '/pages/home/home',
+ })
+ }
+ })
+ },
+ subEvent() {
+ this.getUserProfileInfo()
+ },
+ ergodicJson(obj, prefix) {
+ var s = ""
+ for (var itm in obj) {
+ if (obj[itm] instanceof Array == true) {
+ //是数组
+ s += "&" + prefix + itm + "_count=" + obj[itm].length
+ for (var i = 0; i < obj[itm].length; i++) {
+ if (obj[itm][i] instanceof Array == true) {
+ s += ergodicJson(obj[itm][i], prefix + itm + ",");
+ } else if (obj[itm][i] instanceof Object == true) {
+ s += ergodicJson(obj[itm][i], prefix + itm + ",");
+ } else {
+ s += "&" + prefix + itm + "," + encodeURI(obj[itm][i]) + "=" + encodeURI(obj[itm][i]);
+ }
+ //s += ergodicJson(obj[itm][i]);
+ }
+ } else if (obj[itm] instanceof Object == true) {
+ //是json对象。
+ s += ergodicJson(obj[itm], prefix + itm + ",");
+ }
+ else {
+ //是简单数值
+ s += "&" + prefix + encodeURI(itm) + "=" + encodeURI(obj[itm]);
+ }
+ }
+ return s;
+ },
+ getCaptchaImg() {
+ request._get('/captchaImg?time=' + Math.random(), {},
+ (res) => {
+ if (res.result == 0) {
+ console.log(res.data.captchaRes)
+ this.setData({
+ captchaImg: 'data:image/jpeg;base64,' + res.data.captchaRes,
+ captchaToken: res.data.captchaToken
+ })
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let token = wx.getStorageSync("token") || ''
+ console.log(token)
+ if (token) {
+ wx.switchTab({
+ url: '/pages/home/home',
+ })
+ } else {
+ let _this = this
+ wx.login({
+ success(res) {
+ if (res.code) {
+ //发起网络请求
+ request._post('/firefly/public/wx/auth/code2session', { code: res.code },
+ (res) => {
+ if (res.retCode == 0) {
+ _this.setData({
+ openId: res.body.openId
+ })
+ }
+ })
+ } else {
+ console.log('登录失败!' + res.errMsg)
+ }
+ }
+ })
+ }
+ },
+ getUserProfileInfo() {
+ // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
+ // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
+ console.log('11111')
+ wx.getUserProfile({
+ lang: 'zh_CN',
+ desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+ success: (res) => {
+ console.log(res)
+ this.setData({
+ userInfo: res.userInfo,
+ })
+ this.yanzheng()
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ // this.getCaptchaImg()
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/login.json b/pages/my/login.json
new file mode 100644
index 0000000..a38ebaa
--- /dev/null
+++ b/pages/my/login.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "登录"
+}
\ No newline at end of file
diff --git a/pages/my/login.wxml b/pages/my/login.wxml
new file mode 100644
index 0000000..ec7c6f7
--- /dev/null
+++ b/pages/my/login.wxml
@@ -0,0 +1,45 @@
+
+
+
+ 密码登录
+ 验证码登录
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/login.wxss b/pages/my/login.wxss
new file mode 100644
index 0000000..b654a0d
--- /dev/null
+++ b/pages/my/login.wxss
@@ -0,0 +1,115 @@
+page {
+ height: 100%;
+}
+
+.login-wrap {
+ /* background: url('https://mmbiz.qpic.cn/mmbiz_png/jJtBNByXZuHuxiaoUr9CGcn4ibGpJxeNXRaQf0ngErybIsvulXYQUhtze9ic9Hm8TRLibiab1d6ryswiabtU64Sm4E3A/0?wx_fmt=png') no-repeat; */
+ background-size: cover;
+ height: 95%;
+ width: 100%;
+ border: 1px solid #535353;
+ border-radius: 20rpx;
+ overflow: hidden;
+}
+
+.top-nav {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+}
+
+.top-nav .item {
+ width: 50%;
+ height: 90rpx;
+ line-height: 90rpx;
+ text-align: center;
+ background: #fefefe;
+
+}
+.top-nav .item.num1{
+ border-right: 1px solid #535353;
+ border-bottom: 1px solid #535353;
+}
+.top-nav .item.num2{
+
+ border-bottom: 1px solid #535353;
+}
+.top-nav .item.active{
+ background: #ffb71b;
+}
+
+
+.form-wrap{
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+.input-wrap{
+ border-bottom: 1px solid #e8e9ee;
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ padding-bottom: 10rpx;
+ padding-right: 35rpx;
+ box-sizing: border-box;
+ margin-bottom: 40rpx;
+ justify-content: space-between;
+}
+.text-input{
+ width: 100%;
+ color: #ffb71b;
+ font-size: 26rpx;
+ height: 30rpx;
+ line-height: 30rpx;
+}
+.clear{
+ position: absolute;
+ top: 14rpx;
+ right:0;
+ width: 26rpx;
+ height: 26rpx;
+ z-index: 99;
+}
+.captcha-img{
+ height: 60rpx;
+ width: 225rpx;
+ top: -25rpx;
+}
+.tips{
+ background: #ffb71b;
+ /* border-radius: 10rpx; */
+ /* font-size: 16rpx !important; */
+ padding: 5rpx 15rpx;
+ margin-left: 20rpx;
+ white-space: nowrap;
+ border-radius: 10rpx;
+
+
+}
+.btn-wrap{
+ margin-top:60rpx;
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+.success{
+ background:#ffb71b ;
+ width: 100%;
+ height: 57rpx;
+ line-height: 57rpx;
+ color: #1a1a1a;
+ text-align: center;
+ border-radius: 30rpx;
+ font-size: 30rpx;
+ margin-bottom: 30rpx;
+}
+.success.none{
+
+ background:none ;
+ width: 100%;
+ height: 57rpx;
+ line-height: 57rpx;
+ color: #1a1a1a;
+ text-align: center;
+ border-radius: 30rpx;
+ font-size: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/my/orderList.js b/pages/my/orderList.js
new file mode 100644
index 0000000..5ecf806
--- /dev/null
+++ b/pages/my/orderList.js
@@ -0,0 +1,96 @@
+// pages/my/orderList.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ pageNum:1,
+ pageSize:10,
+ listInfo:[],
+ listData: []
+ },
+ getList(){
+ request._post('/firefly/order/buyer/list',{pageNum:this.data.pageNum,pageSize:this.data.pageSize},
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.listInfo
+ listdata.push.apply(listdata, res.body)
+ console.log('1111111',listdata)
+ this.setData({
+ listData:listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getList()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/orderList.json b/pages/my/orderList.json
new file mode 100644
index 0000000..980adcf
--- /dev/null
+++ b/pages/my/orderList.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "订单列表"
+}
\ No newline at end of file
diff --git a/pages/my/orderList.wxml b/pages/my/orderList.wxml
new file mode 100644
index 0000000..d5a7e67
--- /dev/null
+++ b/pages/my/orderList.wxml
@@ -0,0 +1,63 @@
+
+
+
+
+
+ {{item.orderTitle}}
+
+ {{item.sysRemark}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 共{{listData.length}}种商品
+
+
+
\ No newline at end of file
diff --git a/pages/my/orderList.wxss b/pages/my/orderList.wxss
new file mode 100644
index 0000000..efaff52
--- /dev/null
+++ b/pages/my/orderList.wxss
@@ -0,0 +1,110 @@
+/* pages/my/orderList.wxss */
+.van-tabs__wrap{
+ height: 44px;
+ overflow: hidden;
+}
+.van-tabs__nav--line {
+ box-sizing: content-box;
+ height: 100%;
+ padding-bottom: 15px;
+}
+.van-tabs__nav {
+ position: relative;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ background-color: #fff;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+.van-tab {
+ position: relative;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-flex: 1;
+ -webkit-flex: 1;
+ flex: 1;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ box-sizing: border-box;
+ padding: 0 4px;
+ color: #646566;
+ font-size: 14px;
+ line-height: 20px;
+ cursor: pointer;
+}
+.van-tabs__line {
+ height: 2px;
+ background-color: #ff6925;
+}
+.order-con .van-tabs__line {
+ height: 2px;
+ background-color: #ff6925;
+}
+.van-tabs__line {
+ position: absolute;
+ bottom: 15px;
+ left: 0;
+ z-index: 1;
+ width: 40px;
+ height: 3px;
+ background-color: #ee0a24;
+ border-radius: 3px;
+}
+.van-tab--active text{
+ color: #ff6925;
+ font-weight: 500;
+}
+.pdlr15 {
+ padding: 0 15px;
+}
+.order-card {
+ background-color: #fff;
+ border-radius: 5px;
+ padding-bottom: 10px;
+ padding: 0 15px;
+ margin-top: 10px;
+}
+.order-card .content-title {
+ padding: 10px 0;
+ position: relative;
+ font-size: 16px;
+}
+.flex-row {
+ display: flex;
+ width: 100%;
+}
+.flex-col {
+ flex: 1;
+ width: 0;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-box-pack: left;
+ -webkit-box-align: left;
+}
+.order-card .content-title .more {
+ color: #8f8f8f;
+ font-size: 12px;
+}
+.defaultImg {
+ border-radius: 5px;
+}
+.jz-center {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ text-align: center;
+ -webkit-box-align: center;
+}
+.order-card image{
+ width: 60px;
+ height: 60px;
+}
+.mr10{
+ margin-right: 10px;
+}
\ No newline at end of file
diff --git a/pages/my/publish.js b/pages/my/publish.js
new file mode 100644
index 0000000..dfd133f
--- /dev/null
+++ b/pages/my/publish.js
@@ -0,0 +1,71 @@
+// pages/my/publish.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ currentTab: 0
+ },
+ swichNav(e) {
+ console.log('反倒是粉', e.target.dataset.current)
+ this.setData({
+ currentTab: e.target.dataset.current
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ 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/pages/my/publish.json b/pages/my/publish.json
new file mode 100644
index 0000000..28fc36e
--- /dev/null
+++ b/pages/my/publish.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "article-list":"../../component/articleList/index",
+ "goods-list":"../../component/goodsList/index"
+ },
+ "navigationBarTitleText": "我的发布"
+}
\ No newline at end of file
diff --git a/pages/my/publish.wxml b/pages/my/publish.wxml
new file mode 100644
index 0000000..f145e90
--- /dev/null
+++ b/pages/my/publish.wxml
@@ -0,0 +1,11 @@
+
+
+ 文章
+ 我的商品
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/publish.wxss b/pages/my/publish.wxss
new file mode 100644
index 0000000..bfe5aa7
--- /dev/null
+++ b/pages/my/publish.wxss
@@ -0,0 +1,36 @@
+/* pages/my/publish.wxss */
+.tab-wrap{
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ background: #fff;
+ font-size: 30rpx;
+ color: #333333;
+}
+.tab-con{
+ margin-left: 50rpx;
+ padding: 13rpx;
+}
+.tab-wrap text{
+ display: inline-block;
+ position: relative;
+ margin-right: 120rpx;
+}
+.tab-active{
+ color: #3D98FF;
+}
+.tab-active::after{
+ content: "";
+ position: absolute;
+ width: 25rpx;
+ height: 7rpx;
+ background: #3D98FF;
+ border-radius: 5px;
+ bottom: -12rpx;
+ left: 50%;
+ margin-left: -12.5rpx;
+}
+.pub-container{
+ padding-top: 72rpx;
+}
\ No newline at end of file
diff --git a/pages/my/publishList.js b/pages/my/publishList.js
new file mode 100644
index 0000000..7e8bf0a
--- /dev/null
+++ b/pages/my/publishList.js
@@ -0,0 +1,321 @@
+// pages/my/publish.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ currentTab: 0,
+ list: [],
+ pageNum: 1,
+ pageSize: 10,
+ pageNum1: 1,
+ listData: [],
+ shopInfo: {}
+ },
+ swichNav(e) {
+ this.setData({
+ pageNum: 1,
+ pageNum1: 1,
+ list: [],
+ listData: [],
+ shopInfo: {},
+ currentTab: e.target.dataset.current
+ })
+ if (this.data.currentTab == 3) {
+ this.getVedio()
+ } else {
+ this.getData(e.target.dataset.current)
+ }
+ },
+ listTap(e) {
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/vedio/detail?id=' + id
+ })
+ },
+ // 编辑
+ editEvent(param) {
+ const id = param.currentTarget.dataset.id
+ let url = ''
+ if (this.data.currentTab == 0) {
+ url = '/pages/article/publish?id=' + id
+ } else if (this.data.currentTab == 1) {
+ url = '/pages/article/publish1?id=' + id
+ } else {
+ url = '/pages/article/publish2?id=' + id
+ }
+ wx.navigateTo({
+ url: url
+ })
+ },
+ // 删除
+ delete(param) {
+ const id = param.currentTarget.dataset.id
+ // 删除文章发布
+ if (this.data.currentTab == 0) {
+ let data = {
+ id: id
+ }
+ request._post('/firefly/article/delete', data,
+ res => {
+ if (res.retCode == 0) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '删除成功',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ this.setData({
+ pageNum: 1,
+ list: []
+ })
+ this.getData()
+ }
+ })
+ }
+ // 删除商品发布
+ if (this.data.currentTab == 1) {
+ let data = {
+ goodsId: id
+ }
+ request._post('/firefly/goods/delete', data,
+ res => {
+ if (res.retCode == 0) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '删除成功',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ this.setData({
+ pageNum: 1,
+ list: []
+ })
+ this.getData()
+ }
+ })
+ }
+ // 删除商家发布
+ if (this.data.currentTab == 2) {
+ let data = {
+ storeId: id
+ }
+ request._post('/firefly/store/delete', data,
+ res => {
+ if (res.retCode == 0) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '删除成功',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ this.setData({
+ pageNum: 1,
+ shopInfo: {}
+ })
+ this.getData()
+ }
+ })
+ }
+ if (this.data.currentTab == 3) {
+ let data = {
+ id: id
+ }
+ request._post('/firefly/video/delete', data,
+ res => {
+ if (res.retCode == 0) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '删除成功',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ this.setData({
+ pageNum1: 1,
+ listData: []
+ })
+ this.getVedio()
+ }
+ })
+ }
+ },
+ getVedio() {
+ const data = {
+ "keyword": "", // 搜索关键字,视频标题,可选参数
+ "categoryId": 1, //分类 Id,可选参数
+ "pageNum": this.data.pageNum1,
+ "pageSize": 10 // ⻚⼤⼩,可选参数
+ }
+ request._post('/firefly/video/list', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body.length > 0) {
+ var listdata = this.data.listData
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ listData: listdata,
+ pageNum1: ++res.pageInfo.pageNum
+ })
+ } else {
+ if (this.data.pageNum1 == res.pageInfo.pages) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+
+ }
+ })
+ },
+ getData() {
+ let that = this
+ // 文章发布
+ if (this.data.currentTab == 0) {
+ const data = {
+ categoryId: 0,
+ keyword: '',
+ pageNum: this.data.pageNum,
+ pageSize: this.data.pageSize
+ }
+ request._post('/firefly/article/my/list', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body.length > 0) {
+ var listdata = that.data.list
+ listdata.push.apply(listdata, res.body)
+ that.setData({
+ list: listdata,
+ pageNum: ++res.pageInfo.pageNum
+ })
+ } else {
+ if (that.data.pageNum != 1) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ })
+ }
+ // 商品发布
+ if (this.data.currentTab == 1) {
+ const data = {
+ keyword: "", // 搜索关键字,商家名称,可选参数
+ categoryId: 0, //分类 Id,可选参数
+ startDate: "", // 开始时间,可选参数
+ endDate: "", // 结束时间,可选参数
+ orderBy: 1, //排序,1-发布降序排序;2-发布升序排序,可选参数
+ pageNum: this.data.pageNum,
+ pageSize: this.data.pageSize
+ }
+ request._post('/firefly/goods/my/list', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body) {
+ var listdata = that.data.list
+ listdata.push.apply(listdata, res.body)
+ console.log(listdata)
+ that.setData({
+ list: listdata,
+ pageNum: ++res.pageInfo.pageNum
+ })
+ } else {
+ if (that.data.pageNum != 1) {
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ })
+ }
+ // 商家发布
+ if (this.data.currentTab == 2) {
+ const data = {}
+ request._post('/firefly/store/my', data,
+ res => {
+ if (res.retCode == 0) {
+ if (res.body) {
+ that.setData({
+ shopInfo: res.body,
+ })
+ }
+ }
+ })
+ }
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getData()
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getData()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/my/publishList.json b/pages/my/publishList.json
new file mode 100644
index 0000000..81f5fb6
--- /dev/null
+++ b/pages/my/publishList.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "我的发布"
+}
\ No newline at end of file
diff --git a/pages/my/publishList.wxml b/pages/my/publishList.wxml
new file mode 100644
index 0000000..33bf3c1
--- /dev/null
+++ b/pages/my/publishList.wxml
@@ -0,0 +1,99 @@
+
+
+ 文章
+ 商品
+ 商家
+ 视频
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+ {{item.nickName}}
+ {{item.updatedAt}}
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+ {{item.goodsName}}
+
+
+ {{shopInfo.desc}}
+
+
+
+ {{item.createdAt}}
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+ {{shopInfo.storeName}}
+
+
+ {{shopInfo.intro}}
+
+
+
+ {{shopInfo.createdAt}}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{item.nickName}}
+
+ 删除
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/publishList.wxss b/pages/my/publishList.wxss
new file mode 100644
index 0000000..3c7d174
--- /dev/null
+++ b/pages/my/publishList.wxss
@@ -0,0 +1,127 @@
+/* pages/my/publish.wxss */
+.tab-wrap{
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ background: #fff;
+ font-size: 30rpx;
+ color: #333333;
+}
+.tab-con{
+ margin-left: 50rpx;
+ padding: 13rpx;
+}
+.tab-wrap text{
+ display: inline-block;
+ position: relative;
+ margin-right: 30rpx;
+}
+.tab-active{
+ color: #3D98FF;
+}
+.tab-active::after{
+ content: "";
+ position: absolute;
+ width: 25rpx;
+ height: 7rpx;
+ background: #3D98FF;
+ border-radius: 5px;
+ bottom: -12rpx;
+ left: 50%;
+ margin-left: -12.5rpx;
+}
+.pub-container{
+ padding-top: 72rpx;
+}
+.list-con{
+ background: #fff;
+ padding: 30rpx;
+}
+.list-des{
+ padding-top: 10rpx;
+ font-size: 24rpx;
+ color: #999;
+}
+.list-right view{
+ padding: 0;
+ display: block;
+ width: 100px;
+ height: 60rpx;
+ line-height: 60rpx;
+ margin: 0;
+ text-align: center;
+ /* background: #3D98FF; */
+ /* color: #fff; */
+ font-size: 24rpx;
+ border-radius: 10rpx;
+ margin-top: 10rpx;
+}
+.pl-img{
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ vertical-align: -5rpx;
+ margin-right: 10rpx;
+}
+.pl-img1{
+ width: 130rpx;
+ height: 130rpx;
+ vertical-align: -5rpx;
+ margin-right: 10rpx;
+}
+.list-title{
+ margin-top: 10rpx;
+ /* height: 40px; */
+}
+.list-desc{
+ font-size: 20rpx;
+ /* margin-top: 10rpx; */
+ height: 40px;
+}
+
+.list{
+ overflow: hidden;
+ clear: both;
+ padding: 0 10rpx;
+ padding-bottom: 20rpx;
+}
+.item{
+ margin-top: 15rpx;
+ float: left;
+ width: 49%;
+ overflow: hidden;
+ text-align: center;
+}
+.item:nth-child(odd){
+ margin-right: 2%;
+}
+.item image{
+ max-width: 100%;
+ height: 400rpx !important;
+}
+.title{
+ font-size: 16px;
+ color: #333;
+ text-align: left;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.user-info{
+ font-size: 24rpx;
+}
+.mt{
+ margin-top: 8px;
+}
+.user-info image{
+ width: 30rpx;
+ height: 30rpx !important;
+ border-radius: 50%;
+ vertical-align: -3px;
+ margin-right: 5px;
+}
+.date{
+ color: #666;
+ font-size: 12px;
+}
\ No newline at end of file
diff --git a/pages/my/task.js b/pages/my/task.js
new file mode 100644
index 0000000..e85b2f7
--- /dev/null
+++ b/pages/my/task.js
@@ -0,0 +1,66 @@
+// pages/my/task.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/pages/my/task.json b/pages/my/task.json
new file mode 100644
index 0000000..f8ad2d0
--- /dev/null
+++ b/pages/my/task.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "每日任务"
+}
\ No newline at end of file
diff --git a/pages/my/task.wxml b/pages/my/task.wxml
new file mode 100644
index 0000000..7bec7dd
--- /dev/null
+++ b/pages/my/task.wxml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+ 每日签到每日任务
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+ 发布文章
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+ 阅读文章
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+ 发布一件商品
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+ 完成一笔消费
+
+
+ 积分+20
+
+
+
+
+
+
+
+
+
+ 完成一笔交易
+
+
+ 积分+20
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/my/task.wxss b/pages/my/task.wxss
new file mode 100644
index 0000000..5a4d875
--- /dev/null
+++ b/pages/my/task.wxss
@@ -0,0 +1,65 @@
+.task-wrap{
+ padding: 0 30rpx;
+ background: #fff;
+}
+.task-list{
+ padding: 30rpx 0;
+ border-bottom: 1px solid #E8E8E8;
+}
+.task-left image{
+ width: 70rpx;
+ height: 70rpx;
+ margin-right: 15rpx;
+}
+.task-title{
+ font-size: 30rpx;
+ color: #333;
+}
+.task-title text{
+ display: inline-block;
+ width: 100rpx;
+ height: 36rpx;
+ line-height: 36rpx;
+ margin-left: 12rpx;
+ font-size: 22rpx;
+ color: #FFFFFF;
+ text-align: center;
+ background: linear-gradient( #FFBD83 0%, #F05419 100%);
+ border-radius: 10rpx;
+ vertical-align: 5rpx;
+}
+.con-img{
+ width: 21rpx;
+ height: 23rpx;
+ vertical-align: -3rpx;
+ margin-right: 9rpx;
+}
+.task-con text{
+ color: #A9A9A9;
+ font-size: 20rpx;
+}
+.sign-btn{
+ margin-top: 10rpx;
+ width: 129rpx;
+ height: 52rpx;
+ padding: 0;
+ line-height: 52rpx;
+ text-align: center;
+ font-size: 28rpx;
+ color: #FFFFFF;
+ background: linear-gradient( #92BBFF 0%, #3D98FF 100%);
+ border-radius: 30px;
+}
+.task-mask{
+ top: 300rpx;
+ position: fixed;
+ left: 50%;
+ margin-left: -141rpx;
+ width: 282rpx;
+ height: 278rpx;
+ z-index: 9;
+}
+.mask-img{
+ width: 282rpx;
+ height: 278rpx;
+}
\ No newline at end of file
diff --git a/pages/near/index.js b/pages/near/index.js
new file mode 100644
index 0000000..ef7631e
--- /dev/null
+++ b/pages/near/index.js
@@ -0,0 +1,133 @@
+// pages/near/index.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ categoryId:0,
+ keyword:'',
+ pageNum:1,
+ pageSize:10,
+ longitude:0,
+ latitude:0
+ },
+ listTap(e){
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/shopList/businessDetail?id='+id,
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+
+ },
+ release(e){
+ wx.navigateTo({
+ url: '/pages/article/publish2'
+ })
+ },
+ getData(){
+ let data ={
+ longitude:this.data.longitude,
+ latitude:this.data.latitude,
+ keyword:this.data.keyword,
+ orderBy:1,
+ pageNum:this.data.pageNum,
+ pageSize:this.data.pageSize
+ }
+ request._post('/firefly/store/search/list',data,
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.list
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ list:listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ }
+ )
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ var _this = this
+ _this.getData()
+ // wx.getLocation({
+ // type: 'wgs84',
+ // success(res) {
+ // _this.setData({
+ // latitude:res.latitude,
+ // longitude:res.longitude
+ // })
+ // _this.setData({
+ // list:[],
+ // pageNum:1
+ // })
+ // _this.getData()
+ // }
+ // })
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/near/index.json b/pages/near/index.json
new file mode 100644
index 0000000..01ff902
--- /dev/null
+++ b/pages/near/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "附近商家"
+}
\ No newline at end of file
diff --git a/pages/near/index.wxml b/pages/near/index.wxml
new file mode 100644
index 0000000..4e76ad3
--- /dev/null
+++ b/pages/near/index.wxml
@@ -0,0 +1,67 @@
+
+
+
+
+ 附近
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+福利推荐
+
+
+
+
+
+
+ {{item.storeName}}
+
+
+
+
+
+
+ {{item.score}}分
+
+
+
+
+ {{item.intro}}
+
+ {{item.address}}
+
+ 人均:¥
+ {{item.average}}
+ 凭卡享受9.5折
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/near/index.wxss b/pages/near/index.wxss
new file mode 100644
index 0000000..28940e4
--- /dev/null
+++ b/pages/near/index.wxss
@@ -0,0 +1,160 @@
+.search-wrap {
+ background: #fff;
+ padding: 26rpx 30rpx;
+}
+
+.search-con {
+ background: #F8F8F8;
+ border-radius: 25px;
+ height: 54rpx;
+ padding-left: 30rpx;
+ overflow: hidden;
+ padding-right: 30rpx;
+}
+
+.icon-search {
+ display: inline-block;
+ width: 32rpx;
+ height: 32rpx;
+ margin-top: 12rpx;
+}
+
+.search-text {
+ font-size: 24rpx;
+ height: 54rpx;
+ margin-left: 14rpx;
+}
+
+.search-text::placeholder {
+ color: #C9C9C9;
+}
+
+.near-pos {
+ margin-top: 12rpx;
+ font-size: 26rpx;
+ color: #333;
+ padding-right: 36rpx;
+}
+
+.near-pos image {
+ display: inline-block;
+ width: 24rpx;
+ height: 34rpx;
+ margin-right: 7rpx;
+}
+
+.near-pos text {
+ vertical-align: 8rpx;
+ display: inline-block;
+}
+
+.menu-list {
+ padding: 48rpx 0;
+ background: #fff;
+}
+
+.menu-list .flex-col {
+ text-align: center;
+}
+
+.menu-list image {
+ width: 80rpx;
+ height: 80rpx;
+}
+
+.list-name {
+ color: #484848;
+ font-size: 30rpx;
+ margin-top: -10rpx;
+}
+
+.list-title {
+ padding-left: 30rpx;
+ padding-top: 30rpx;
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #333;
+}
+
+.shop-list {
+ padding: 0 30rpx;
+}
+
+.list-item {
+ margin-top: 20rpx;
+ background: #fff;
+ border-radius: 10rpx;
+ padding: 15rpx 37rpx 25rpx 15rpx;
+}
+
+.item-img {
+ font-size: 0;
+ margin-right: 20rpx;
+}
+
+.item-img image {
+ width: 238rpx;
+ height: 221rpx;
+}
+
+.item-title {
+ font-size: 30rpx;
+ color: #333;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1;
+ overflow: hidden;
+}
+
+.star-con image {
+ width: 18rpx;
+ height: 18rpx;
+ margin-right: 2rpx;
+}
+
+.star-con text {
+ font-size: 20rpx;
+ color: #F31717;
+ margin-left: 5rpx;
+}
+
+.distance {
+ font-size: 20rpx;
+ color: #484848;
+}
+
+.item-score {
+ padding-top: 8rpx;
+}
+
+.item-intro {
+ margin-top: 7rpx;
+ font-size: 20rpx;
+ color: #484848;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+}
+.list-adr{
+ margin-top: 6rpx;
+ font-size: 20rpx;
+ color: #828282;
+}
+.list-bot{
+ padding-top: 8rpx;
+ font-size: 20rpx;
+ color: #333333;
+}
+.list-bot .money-tag{
+ color: #F31717;
+}
+.list-bot .money{
+ font-size: 28rpx;
+ color: #F31717;
+}
+.list-bot .disccount{
+ font-size: 18rpx;
+ color: #F31717;
+ margin-left: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/shopList/businessDetail.js b/pages/shopList/businessDetail.js
new file mode 100644
index 0000000..a650727
--- /dev/null
+++ b/pages/shopList/businessDetail.js
@@ -0,0 +1,80 @@
+// pages/shopList/businessDetail.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ detailInfo:{}
+ },
+ getData(id){
+ const param = {
+ "storeId": id
+ }
+ request._post('/firefly/store/detail',param,
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ detailInfo:res.body
+ })
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getData(options.id)
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/shopList/businessDetail.json b/pages/shopList/businessDetail.json
new file mode 100644
index 0000000..fa29617
--- /dev/null
+++ b/pages/shopList/businessDetail.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "商家详情"
+}
\ No newline at end of file
diff --git a/pages/shopList/businessDetail.wxml b/pages/shopList/businessDetail.wxml
new file mode 100644
index 0000000..bfb856d
--- /dev/null
+++ b/pages/shopList/businessDetail.wxml
@@ -0,0 +1,30 @@
+
+
+
+
+ {{detailInfo.storeName}}
+
+
+
+
+
+
+
+ {{detailInfo.address}}
+
+
+
+
+ {{detailInfo.servicePhone}}
+
+
+ 店铺详情
+
+ {{detailInfo.intro}}
+
+ 优惠力度
+
+ 1.优惠力度,优惠力度,优惠力度,优惠力度优惠力度
+
+
+
diff --git a/pages/shopList/businessDetail.wxss b/pages/shopList/businessDetail.wxss
new file mode 100644
index 0000000..93ef087
--- /dev/null
+++ b/pages/shopList/businessDetail.wxss
@@ -0,0 +1,57 @@
+page{
+ background: #fff;
+}
+.bus-wrap{
+ padding: 0 21px;
+}
+.banner{
+ margin-top: 30rpx;
+ font-size: 0;
+}
+.name-info{
+ padding-top: 14rpx;
+}
+.name-info,.arti{
+ align-items: center;
+}
+.banner image{
+ width: 100%;
+}
+.title{
+ margin-top: 27rpx;
+ color: #333333;
+ font-size: 32rpx;
+}
+.name-left{
+ font-size: 22rpx;
+ color: #666;
+}
+.name-left image{
+ width: 25rpx;
+ height: 35rpx;
+ margin-right: 12rpx;
+}
+.name-right image{
+ width: 34rpx;
+ height: 34rpx;
+ vertical-align: middle;
+ margin-right: 12rpx;
+}
+.name-right{
+ color: #666666;
+ font-size: 22rpx;
+ border-left: 1px solid #93C6FF;
+ margin-left: 50rpx;
+ padding-left: 50rpx;
+}
+.title1{
+ margin-top: 40rpx;
+ color: #333333;
+ font-size: 30rpx;
+}
+.vi-content{
+ margin-top: 14rpx;
+ font-size: 26rpx;
+ color: #666666;
+ line-height: 37rpx;
+}
\ No newline at end of file
diff --git a/pages/shopList/index.js b/pages/shopList/index.js
new file mode 100644
index 0000000..2b5a132
--- /dev/null
+++ b/pages/shopList/index.js
@@ -0,0 +1,119 @@
+// pages/shopList/index.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ categoryId:0,
+ keyword:'',
+ pageNum:1,
+ pageSize:10
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ // this.getData()
+ },
+ listTap(e){
+ let id=e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/shopList/shopDetail?id='+id,
+ })
+ },
+ release(e){
+ let num=e.currentTarget.dataset.num
+ wx.navigateTo({
+ url: '/pages/article/publish1?id='+num,
+ })
+ },
+ getData(){
+ let data ={
+ categoryId:this.data.categoryId,
+ keyword:this.data.keyword,
+ orderBy:1,
+ pageNum:this.data.pageNum,
+ pageSize:this.data.pageSize
+ }
+ request._post('/firefly/goods/search/list',data,
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.list
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ list:listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.setData({
+ list:[],
+ pageNum:1
+ })
+ this.getData()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getData()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/shopList/index.json b/pages/shopList/index.json
new file mode 100644
index 0000000..c98de42
--- /dev/null
+++ b/pages/shopList/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "商品列表"
+}
\ No newline at end of file
diff --git a/pages/shopList/index.wxml b/pages/shopList/index.wxml
new file mode 100644
index 0000000..784c120
--- /dev/null
+++ b/pages/shopList/index.wxml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.goodsName}}
+
+
+ ¥{{item.point}}积分
+
+
+
+
+ {{item.nickName}}
+
+ 数量:{{item.stockCount}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/shopList/index.wxss b/pages/shopList/index.wxss
new file mode 100644
index 0000000..2437bb4
--- /dev/null
+++ b/pages/shopList/index.wxss
@@ -0,0 +1,121 @@
+.search-wrap {
+ background: #fff;
+ padding: 30rpx 30rpx;
+}
+
+.search-con {
+ background: #F8F8F8;
+ border-radius: 25px;
+ height: 54rpx;
+ padding-left: 30rpx;
+ overflow: hidden;
+ padding-right: 30rpx;
+}
+
+.icon-search {
+ display: inline-block;
+ width: 32rpx;
+ height: 32rpx;
+ margin-top: 12rpx;
+}
+
+.search-text {
+ font-size: 24rpx;
+ height: 54rpx;
+ margin-left: 14rpx;
+}
+
+.search-text::placeholder {
+ color: #C9C9C9;
+}
+
+.goods-list {
+ padding: 0 30rpx;
+ clear: both;
+ overflow: hidden;
+}
+
+.list-item {
+ margin-top: 30rpx;
+ float: left;
+ width: 48%;
+ background: #fff;
+ border-radius: 10rpx;
+}
+.list-item:nth-child(odd){
+ margin-right: 4%;
+}
+
+.list-item image {
+ width: 100%;
+ height: 231rpx;
+}
+
+.goods-title {
+ margin-top: 13rpx;
+ font-size: 24rpx;
+ color: #333;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+}
+
+.price {
+ margin-top: 14rpx;
+ color: #F31717;
+ font-size: 18rpx;
+}
+
+.price .tag {
+ font-size: 20rpx;
+}
+
+.price .money {
+ font-size: 26rpx;
+ margin-right: 7rpx;
+}
+
+.list-item .pepl {
+ display: inline-block;
+ vertical-align: -10rpx;
+ width: 34rpx;
+ height: 35rpx;
+ margin-left: 6rpx;
+}
+
+.name-info {
+ font-size: 20rpx;
+ color: #333;
+}
+.pulish{
+ margin-top: 5rpx;
+ color: #666666;
+ font-size: 16rpx;
+}
+.pad12{
+ padding-left: 12rpx;
+ padding-right: 12rpx;
+}
+.name-con{
+ padding-top: 15rpx;
+ padding-bottom: 27rpx;
+}
+.menu-list {
+ padding: 48rpx 0;
+ background: #fff;
+}
+
+.menu-list .flex-col {
+ text-align: center;
+}
+
+.menu-list image {
+ width: 80rpx;
+ height: 80rpx;
+}
+.list-name {
+ color: #484848;
+ font-size: 30rpx;
+ margin-top: -10rpx;
+}
\ No newline at end of file
diff --git a/pages/shopList/shopDetail.js b/pages/shopList/shopDetail.js
new file mode 100644
index 0000000..bd78c0b
--- /dev/null
+++ b/pages/shopList/shopDetail.js
@@ -0,0 +1,120 @@
+// pages/shopList/shopDetail.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ cur:false,
+ goodShow: false,
+ collectShow:false,
+ shopItem:''
+ },
+ goodEvent(){
+ this.setData({
+ cur: !this.data.cur
+ })
+ },
+ tapEvent1(){
+ this.setData({
+ goodShow: !this.data.goodShow
+ })
+ },
+ tapEvent2(){
+ this.setData({
+ collectShow: !this.data.collectShow
+ })
+ },
+ buyEvent(){
+ request._post('/firefly/cart/mycart/empty/all',{},
+ res=>{
+ if(res.retCode == 0){
+ this.buysubmit()
+ }
+ })
+ },
+ buysubmit(){
+ let id = this.data.shopItem.id
+ const param = {
+ "goodsId": id,
+ "count": 1
+ }
+ request._post('/firefly/cart/mycart/add/goods',param,
+ res=>{
+ if(res.retCode == 0){
+ wx.navigateTo({
+ url: '/pages/buy/index?id='+id
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getData(options.id)
+ },
+ getData(id){
+ const param = {
+ "goodsId": id
+ }
+ request._post('/firefly/goods/detail',param,
+ res=>{
+ if(res.retCode == 0){
+ this.setData({
+ shopItem:res.body
+ })
+ }
+ }
+ )
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/shopList/shopDetail.json b/pages/shopList/shopDetail.json
new file mode 100644
index 0000000..ae4a221
--- /dev/null
+++ b/pages/shopList/shopDetail.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "商品详情"
+}
\ No newline at end of file
diff --git a/pages/shopList/shopDetail.wxml b/pages/shopList/shopDetail.wxml
new file mode 100644
index 0000000..7aa7b3a
--- /dev/null
+++ b/pages/shopList/shopDetail.wxml
@@ -0,0 +1,91 @@
+
+
+
+ {{shopItem.goodsName}}
+ {{shopItem.desc}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 立即购买
+
+
diff --git a/pages/shopList/shopDetail.wxss b/pages/shopList/shopDetail.wxss
new file mode 100644
index 0000000..62f95f6
--- /dev/null
+++ b/pages/shopList/shopDetail.wxss
@@ -0,0 +1,137 @@
+/* pages/shopList/shopDetail.wxss */
+page{
+ background: #fff;
+}
+.wrap{
+ padding-left: 30rpx;
+ padding-right: 30rpx;
+}
+.intro{
+ margin-top: 30rpx;
+ color: #333333;
+ font-size: 28rpx;
+ line-height: 40rpx;
+}
+.img-con{
+ font-size: 0;
+}
+.img-con image{
+ margin-top: 20rpx;
+ width: 100%;
+}
+.view{
+ font-size: 16rpx;
+ line-height: 22rpx;
+ color: #828282;
+ text-align: right;
+ margin-top: 20rpx;
+ padding-bottom: 15rpx;
+}
+.line{
+ height: 20rpx;
+ background: #F6F6F9;
+}
+.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;
+}
+.head{
+ width: 59rpx;
+ height: 59rpx;
+ margin-right: 20rpx;
+}
+.enter-text{
+ font-size: 24rpx;
+ background: #F8F8F8;
+ border-radius: 10px;
+ height: 64rpx;
+ width: 96%;
+ padding-left: 4%;
+}
+.list-head{
+ padding-top: 30rpx;
+ font-size: 24rpx;
+ color: #181818;
+}
+.list-head image{
+ vertical-align: -12rpx;
+}
+.content{
+ padding-top: 20rpx;
+ line-height: 33rpx;
+ color: #181818;
+ font-size: 24rpx;
+}
+.list-bottom{
+ padding-top: 22rpx;
+}
+.list-left{
+ color: #828282;
+ font-size: 20rpx;
+}
+.good{
+ width: 28rpx;
+ height: 28rpx;
+ vertical-align: middle;
+ margin-right: 8rpx;
+}
+.list-right{
+ font-size: 20rpx;
+}
+.good-select{
+ color: #3D98FF;
+}
+.list{
+ border-bottom: 1px solid #E6E6E6;
+}
+.list-bottom{
+ padding-bottom: 23rpx;
+}
+.reply{
+ border-top: 1px solid #E6E6E6;
+ padding-bottom: 10px;
+}
+.btn-fix{
+ position: fixed;
+ width: 100%;
+ left: 0;
+ bottom: 0;
+ z-index: 99;
+ background: #fff;
+}
+.buy-btn{
+ width: 170rpx;
+ height: 66rpx;
+ background-image: linear-gradient(to right, #FFAD4A , #FF6925);
+ padding: 0;
+ margin: 0;
+ text-align: center;
+ line-height: 66rpx;
+ border-radius: 20px;
+ font-size: 28rpx;
+ color: #fff;
+ margin: 15rpx 30rpx 15rpx 0;
+}
+.cl-con{
+ clear: both;
+}
+.fl{
+ float: left;
+ margin-left: 30rpx;
+ font-size: 18rpx;
+ color: #828282;
+ text-align: center;
+}
+.fl image{
+ margin-left: 10rpx;
+ margin-bottom: 6rpx;
+}
\ No newline at end of file
diff --git a/pages/shopList/success.js b/pages/shopList/success.js
new file mode 100644
index 0000000..da5bced
--- /dev/null
+++ b/pages/shopList/success.js
@@ -0,0 +1,66 @@
+// pages/shopList/success.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/pages/shopList/success.json b/pages/shopList/success.json
new file mode 100644
index 0000000..bebe3e4
--- /dev/null
+++ b/pages/shopList/success.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "购买"
+}
\ No newline at end of file
diff --git a/pages/shopList/success.wxml b/pages/shopList/success.wxml
new file mode 100644
index 0000000..d2abd9f
--- /dev/null
+++ b/pages/shopList/success.wxml
@@ -0,0 +1,7 @@
+
+
+
+
+ 支付成功
+ 返回首页
+
diff --git a/pages/shopList/success.wxss b/pages/shopList/success.wxss
new file mode 100644
index 0000000..12793f5
--- /dev/null
+++ b/pages/shopList/success.wxss
@@ -0,0 +1,22 @@
+.success-con{
+ text-align: center;
+ padding-top: 69rpx;
+ padding-bottom: 120rpx;
+ background-image: linear-gradient(to right, #A9C0FF , #3D98FF);
+}
+.success-status{
+ font-size: 36rpx;
+ color: #fff;
+}
+.success-status image{
+ display: inline-block;
+ width: 63rpx;
+ height: 63rpx;
+ vertical-align: -12rpx;
+ margin-right: 8rpx;
+}
+.back{
+ margin-top: 55rpx;
+ font-size: 24rpx;
+ color: #fff;
+}
\ No newline at end of file
diff --git a/pages/vedio/detail.js b/pages/vedio/detail.js
new file mode 100644
index 0000000..05e86b4
--- /dev/null
+++ b/pages/vedio/detail.js
@@ -0,0 +1,110 @@
+// pages/vedio/detail.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ detailInfo: {},
+ windowHeight: 0,
+ play: false
+ },
+ back:function(){
+ wx.navigateBack({
+ delta: 1
+ })
+ },
+ //点击暂停/开始
+ videoTap:function(){
+ //获取video
+ this.videoContext = wx.createVideoContext('myVideo')
+ if (this.data.play){
+ //开始播放
+ this.videoContext.play()//开始播放
+ this.setData({
+ play:false
+ })
+ }else{
+ //当play==false 显示图片 暂停
+ this.videoContext.pause()//暂停播放
+ this.setData({
+ play: true
+ })
+ }
+ },
+ getInfo(id){
+ const data = {
+ id: id
+ }
+ request._post('/firefly/video/detail',data,
+ res=>{
+ if(res.retCode == 0){
+ wx.setNavigationBarTitle({
+ title: res.body.title
+ })
+ this.setData({
+ detailInfo: res.body
+ })
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ windowHeight: wx.getSystemInfoSync().windowHeight
+ })
+ this.getInfo(options.id)
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/vedio/detail.json b/pages/vedio/detail.json
new file mode 100644
index 0000000..18173e1
--- /dev/null
+++ b/pages/vedio/detail.json
@@ -0,0 +1,5 @@
+{
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false,
+ "disableScroll":true
+}
\ No newline at end of file
diff --git a/pages/vedio/detail.wxml b/pages/vedio/detail.wxml
new file mode 100644
index 0000000..f7d4fd1
--- /dev/null
+++ b/pages/vedio/detail.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ {{detailInfo.title}}
+ {{detailInfo.intro}}
+
+
+
+
+
diff --git a/pages/vedio/detail.wxss b/pages/vedio/detail.wxss
new file mode 100644
index 0000000..9a8bb97
--- /dev/null
+++ b/pages/vedio/detail.wxss
@@ -0,0 +1,42 @@
+/* pages/vedio/detail.wxss */
+.videoWrap{
+ position: relative;
+}
+.videoBottom{
+ position: absolute;
+ width: 100%;
+ left: 0;
+ bottom: 42rpx;
+}
+.videoContent{
+ padding: 30rpx;
+ color: #fff;
+}
+.title{
+ font-size: 28rpx;
+}
+.intro{
+ padding-top: 8rpx;
+ font-size: 30rpx;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+.backImg{
+ position: fixed;
+ left: 15px;
+ top: 130rpx;
+ width: 45rpx;
+ height: 45rpx;
+opacity: 0.6;
+}
+.playImg{
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%,-50%);
+ width: 110rpx;
+ height: 110rpx;
+ opacity: 0.4;
+}
\ No newline at end of file
diff --git a/pages/vedio/index.js b/pages/vedio/index.js
new file mode 100644
index 0000000..cb07370
--- /dev/null
+++ b/pages/vedio/index.js
@@ -0,0 +1,107 @@
+// pages/vedio/index.js
+import request from '../../utils/request'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ listData: [],
+ pageNum: 1
+ },
+ listTap(e){
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/vedio/detail?id='+id
+ })
+ },
+ getData(){
+ const data = {
+ "keyword": "", // 搜索关键字,视频标题,可选参数
+ "categoryId": 1, //分类 Id,可选参数
+ "pageNum": this.data.pageNum,
+ "pageSize": 10// ⻚⼤⼩,可选参数
+ }
+ request._post('/firefly/video/list',data,
+ res=>{
+ if(res.retCode == 0){
+ if(res.body.length>0){
+ var listdata = this.data.listData
+ listdata.push.apply(listdata, res.body)
+ this.setData({
+ listData: listdata,
+ pageNum:++res.pageInfo.pageNum
+ })
+ }else{
+ if(this.data.pageNum != 1){
+ setTimeout(() => {
+ wx.showToast({
+ title: '没有更多数据',
+ icon: 'none',
+ duration: 2000
+ })
+ }, 200);
+ }
+ }
+
+ }
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.getData()
+ },
+
+
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ // this.getData()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/vedio/index.json b/pages/vedio/index.json
new file mode 100644
index 0000000..c479dc3
--- /dev/null
+++ b/pages/vedio/index.json
@@ -0,0 +1,4 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "视频列表"
+}
\ No newline at end of file
diff --git a/pages/vedio/index.wxml b/pages/vedio/index.wxml
new file mode 100644
index 0000000..c7de7fc
--- /dev/null
+++ b/pages/vedio/index.wxml
@@ -0,0 +1,10 @@
+
+
+
+ {{item.title}}
+
+ {{item.nickName}}
+ {{item.updatedAt}}
+
+
+
\ No newline at end of file
diff --git a/pages/vedio/index.wxss b/pages/vedio/index.wxss
new file mode 100644
index 0000000..e5fac08
--- /dev/null
+++ b/pages/vedio/index.wxss
@@ -0,0 +1,46 @@
+/* pages/vedio/index.wxss */
+.list{
+ overflow: hidden;
+ clear: both;
+ padding: 0 10rpx;
+ padding-bottom: 20rpx;
+}
+.item{
+ margin-top: 15rpx;
+ float: left;
+ width: 49%;
+ overflow: hidden;
+ text-align: center;
+}
+.item:nth-child(odd){
+ margin-right: 2%;
+}
+.item image{
+ max-width: 100%;
+ height: 400rpx !important;
+}
+.title{
+ font-size: 16px;
+ color: #333;
+ text-align: left;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+.user-info{
+ font-size: 24rpx;
+}
+.mt{
+ margin-top: 8px;
+}
+.user-info image{
+ width: 30rpx;
+ height: 30rpx !important;
+ border-radius: 50%;
+ vertical-align: -3px;
+ margin-right: 5px;
+}
+.date{
+ color: #666;
+ font-size: 12px;
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 0000000..2c77787
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,61 @@
+{
+ "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "urlCheck": true,
+ "es6": true,
+ "enhance": false,
+ "postcss": true,
+ "preloadBackgroundData": false,
+ "minified": true,
+ "newFeature": true,
+ "coverView": true,
+ "nodeModules": false,
+ "autoAudits": false,
+ "showShadowRootInWxmlPanel": true,
+ "scopeDataCheck": false,
+ "uglifyFileName": false,
+ "checkInvalidKey": true,
+ "checkSiteMap": true,
+ "uploadWithSourceMap": true,
+ "compileHotReLoad": false,
+ "lazyloadPlaceholderEnable": false,
+ "useMultiFrameRuntime": false,
+ "useApiHook": false,
+ "useApiHostProcess": false,
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ },
+ "useIsolateContext": false,
+ "userConfirmedBundleSwitch": false,
+ "packNpmManually": false,
+ "packNpmRelationList": [],
+ "minifyWXSS": true,
+ "disableUseStrict": false,
+ "minifyWXML": true,
+ "showES6CompileOption": false,
+ "useCompilerPlugins": false,
+ "ignoreUploadUnusedFiles": true,
+ "compileWorklet": false,
+ "localPlugins": false,
+ "condition": false,
+ "swc": false,
+ "disableSWC": true
+ },
+ "compileType": "miniprogram",
+ "libVersion": "2.25.4",
+ "appid": "wx9560f67107876c8b",
+ "projectname": "yhsg-mini",
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ },
+ "condition": {}
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
new file mode 100644
index 0000000..947b6fb
--- /dev/null
+++ b/project.private.config.json
@@ -0,0 +1,25 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "yhsg-mini",
+ "setting": {
+ "compileHotReLoad": true,
+ "urlCheck": false,
+ "coverView": true,
+ "lazyloadPlaceholderEnable": false,
+ "skylineRenderEnable": false,
+ "preloadBackgroundData": false,
+ "autoAudits": false,
+ "useApiHook": false,
+ "useApiHostProcess": false,
+ "showShadowRootInWxmlPanel": true,
+ "useStaticServer": false,
+ "useLanDebug": false,
+ "showES6CompileOption": false,
+ "checkInvalidKey": true,
+ "ignoreDevUnusedFiles": true,
+ "bigPackageSizeSupport": false,
+ "useIsolateContext": false
+ },
+ "libVersion": "2.25.4",
+ "condition": {}
+}
\ No newline at end of file
diff --git a/sitemap.json b/sitemap.json
new file mode 100644
index 0000000..ca02add
--- /dev/null
+++ b/sitemap.json
@@ -0,0 +1,7 @@
+{
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+ "rules": [{
+ "action": "allow",
+ "page": "*"
+ }]
+}
\ No newline at end of file
diff --git a/tools.wxs b/tools.wxs
new file mode 100644
index 0000000..022d23c
--- /dev/null
+++ b/tools.wxs
@@ -0,0 +1,77 @@
+// 金额格式化
+var moneyFormat = function(num) {
+ if (null == "") {
+ return ""
+ }
+ num = parseFloat((num + "").replace('/[^\d\.-]/g', "")).toFixed(2) + "";
+ var integ = num.split(".")[0].split("").reverse(),
+ deci = num.split(".")[1];
+ var space = "";
+ for (i = 0; i < integ.length; i++) {
+ space += integ[i] + ((i + 1) % 3 == 0 && (i + 1) != integ.length ? "," : "");
+ }
+ var text = space.split("").reverse().join("") + "." + deci;
+ if (text.substring(text.length - 3) == ".00") {
+ text = text.substring(0, text.length - 3)
+ } else if (text.substring(text.length - 1) == "0") {
+ text = text.substring(0, text.length - 1)
+ }
+ return text
+}
+// 字符串截取
+var sub = function(val, num) {
+ if (val.length == 0 || val == undefined) {
+ return;
+ }
+ if (val.length > num) {
+ return val.substring(0, num) + "...";
+ } else {
+ return val;
+ }
+}
+var sex = function(type) {
+ return type ? '男' : '女'
+}
+var formatSeconds = function(value) {
+ var theTime = parseInt(value); // 秒
+ var theTime1 = 0; // 分
+ var theTime2 = 0; // 小时
+ if (theTime > 60) {
+ theTime1 = parseInt(theTime / 60);
+ theTime = parseInt(theTime % 60);
+ if (theTime1 > 60) {
+ theTime2 = parseInt(theTime1 / 60);
+ theTime1 = parseInt(theTime1 % 60);
+ }
+ }
+
+ var result = "" + parseInt(theTime); //秒
+ if (10 > theTime > 0) {
+ result = "0" + parseInt(theTime); //秒
+ } else {
+ result = "" + parseInt(theTime); //秒
+ }
+
+ if (10 > theTime1 > 0) {
+ result = "0" + parseInt(theTime1) + ":" + result; //分,不足两位数,首位补充0,
+ } else {
+ result = "" + parseInt(theTime1) + ":" + result; //分
+ }
+ if (theTime2 > 0) {
+ result = "" + parseInt(theTime2) + ":" + result; //时
+ }
+ return result;
+}
+var strFormatObj= function(val){
+ return JSON.parse(val)
+}
+var parseIntFormat = function(val){
+ return parseInt(val)
+}
+module.exports = {
+ moneyFormat: moneyFormat,
+ sub: sub,
+ formatSeconds: formatSeconds,
+ strFormatObj: strFormatObj,
+ parseIntFormat: parseIntFormat
+}
\ No newline at end of file
diff --git a/utils/qs.js b/utils/qs.js
new file mode 100644
index 0000000..b9c1bf4
--- /dev/null
+++ b/utils/qs.js
@@ -0,0 +1,1903 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) {
+ return val.split(',');
+ }
+
+ return val;
+};
+
+// This is what browsers will submit when the ✓ character occurs in an
+// application/x-www-form-urlencoded body and the encoding of the page containing
+// the form is iso-8859-1, or when the submitted form has an accept-charset
+// attribute of iso-8859-1. Presumably also with other charsets that do not contain
+// the ✓ character, such as us-ascii.
+var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
+
+// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
+var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
+
+var parseValues = function parseQueryStringValues(str, options) {
+ var obj = {};
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
+ var parts = cleanStr.split(options.delimiter, limit);
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
+ var i;
+
+ var charset = options.charset;
+ if (options.charsetSentinel) {
+ for (i = 0; i < parts.length; ++i) {
+ if (parts[i].indexOf('utf8=') === 0) {
+ if (parts[i] === charsetSentinel) {
+ charset = 'utf-8';
+ } else if (parts[i] === isoSentinel) {
+ charset = 'iso-8859-1';
+ }
+ skipIndex = i;
+ i = parts.length; // The eslint settings do not allow break;
+ }
+ }
+ }
+
+ for (i = 0; i < parts.length; ++i) {
+ if (i === skipIndex) {
+ continue;
+ }
+ var part = parts[i];
+
+ var bracketEqualsPos = part.indexOf(']=');
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
+
+ var key, val;
+ if (pos === -1) {
+ key = options.decoder(part, defaults.decoder, charset, 'key');
+ val = options.strictNullHandling ? null : '';
+ } else {
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
+ val = utils.maybeMap(
+ parseArrayValue(part.slice(pos + 1), options),
+ function (encodedVal) {
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
+ }
+ );
+ }
+
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
+ val = interpretNumericEntities(val);
+ }
+
+ if (part.indexOf('[]=') > -1) {
+ val = isArray(val) ? [val] : val;
+ }
+
+ if (has.call(obj, key)) {
+ obj[key] = utils.combine(obj[key], val);
+ } else {
+ obj[key] = val;
+ }
+ }
+
+ return obj;
+};
+
+var parseObject = function (chain, val, options, valuesParsed) {
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
+
+ for (var i = chain.length - 1; i >= 0; --i) {
+ var obj;
+ var root = chain[i];
+
+ if (root === '[]' && options.parseArrays) {
+ obj = [].concat(leaf);
+ } else {
+ obj = options.plainObjects ? Object.create(null) : {};
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
+ var index = parseInt(cleanRoot, 10);
+ if (!options.parseArrays && cleanRoot === '') {
+ obj = { 0: leaf };
+ } else if (
+ !isNaN(index)
+ && root !== cleanRoot
+ && String(index) === cleanRoot
+ && index >= 0
+ && (options.parseArrays && index <= options.arrayLimit)
+ ) {
+ obj = [];
+ obj[index] = leaf;
+ } else {
+ obj[cleanRoot] = leaf;
+ }
+ }
+
+ leaf = obj;
+ }
+
+ return leaf;
+};
+
+var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
+ if (!givenKey) {
+ return;
+ }
+
+ // Transform dot notation to bracket notation
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
+
+ // The regex chunks
+
+ var brackets = /(\[[^[\]]*])/;
+ var child = /(\[[^[\]]*])/g;
+
+ // Get the parent
+
+ var segment = options.depth > 0 && brackets.exec(key);
+ var parent = segment ? key.slice(0, segment.index) : key;
+
+ // Stash the parent if it exists
+
+ var keys = [];
+ if (parent) {
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+
+ keys.push(parent);
+ }
+
+ // Loop through children appending to the array until we hit depth
+
+ var i = 0;
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
+ i += 1;
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
+ if (!options.allowPrototypes) {
+ return;
+ }
+ }
+ keys.push(segment[1]);
+ }
+
+ // If there's a remainder, just add whatever is left
+
+ if (segment) {
+ keys.push('[' + key.slice(segment.index) + ']');
+ }
+
+ return parseObject(keys, val, options, valuesParsed);
+};
+
+var normalizeParseOptions = function normalizeParseOptions(opts) {
+ if (!opts) {
+ return defaults;
+ }
+
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
+ throw new TypeError('Decoder has to be a function.');
+ }
+
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
+ }
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
+
+ return {
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
+ charset: charset,
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
+ parseArrays: opts.parseArrays !== false,
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
+ };
+};
+
+module.exports = function (str, opts) {
+ var options = normalizeParseOptions(opts);
+
+ if (str === '' || str === null || typeof str === 'undefined') {
+ return options.plainObjects ? Object.create(null) : {};
+ }
+
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
+ var obj = options.plainObjects ? Object.create(null) : {};
+
+ // Iterate over the keys and setup the new object
+
+ var keys = Object.keys(tempObj);
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
+ obj = utils.merge(obj, newObj, options);
+ }
+
+ if (options.allowSparse === true) {
+ return obj;
+ }
+
+ return utils.compact(obj);
+};
+
+},{"./utils":5}],4:[function(require,module,exports){
+'use strict';
+
+var getSideChannel = require('side-channel');
+var utils = require('./utils');
+var formats = require('./formats');
+var has = Object.prototype.hasOwnProperty;
+
+var arrayPrefixGenerators = {
+ brackets: function brackets(prefix) {
+ return prefix + '[]';
+ },
+ comma: 'comma',
+ indices: function indices(prefix, key) {
+ return prefix + '[' + key + ']';
+ },
+ repeat: function repeat(prefix) {
+ return prefix;
+ }
+};
+
+var isArray = Array.isArray;
+var push = Array.prototype.push;
+var pushToArray = function (arr, valueOrArray) {
+ push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
+};
+
+var toISO = Date.prototype.toISOString;
+
+var defaultFormat = formats['default'];
+var defaults = {
+ addQueryPrefix: false,
+ allowDots: false,
+ charset: 'utf-8',
+ charsetSentinel: false,
+ delimiter: '&',
+ encode: true,
+ encoder: utils.encode,
+ encodeValuesOnly: false,
+ format: defaultFormat,
+ formatter: formats.formatters[defaultFormat],
+ // deprecated
+ indices: false,
+ serializeDate: function serializeDate(date) {
+ return toISO.call(date);
+ },
+ skipNulls: false,
+ strictNullHandling: false
+};
+
+var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
+ return typeof v === 'string'
+ || typeof v === 'number'
+ || typeof v === 'boolean'
+ || typeof v === 'symbol'
+ || typeof v === 'bigint';
+};
+
+var stringify = function stringify(
+ object,
+ prefix,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ format,
+ formatter,
+ encodeValuesOnly,
+ charset,
+ sideChannel
+) {
+ var obj = object;
+
+ if (sideChannel.has(object)) {
+ throw new RangeError('Cyclic object value');
+ }
+
+ if (typeof filter === 'function') {
+ obj = filter(prefix, obj);
+ } else if (obj instanceof Date) {
+ obj = serializeDate(obj);
+ } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
+ obj = utils.maybeMap(obj, function (value) {
+ if (value instanceof Date) {
+ return serializeDate(value);
+ }
+ return value;
+ });
+ }
+
+ if (obj === null) {
+ if (strictNullHandling) {
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
+ }
+
+ obj = '';
+ }
+
+ if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
+ if (encoder) {
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
+ }
+ return [formatter(prefix) + '=' + formatter(String(obj))];
+ }
+
+ var values = [];
+
+ if (typeof obj === 'undefined') {
+ return values;
+ }
+
+ var objKeys;
+ if (generateArrayPrefix === 'comma' && isArray(obj)) {
+ // we need to join elements in
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
+ } else if (isArray(filter)) {
+ objKeys = filter;
+ } else {
+ var keys = Object.keys(obj);
+ objKeys = sort ? keys.sort(sort) : keys;
+ }
+
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+ var value = typeof key === 'object' && key.value !== undefined ? key.value : obj[key];
+
+ if (skipNulls && value === null) {
+ continue;
+ }
+
+ var keyPrefix = isArray(obj)
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
+ : prefix + (allowDots ? '.' + key : '[' + key + ']');
+
+ sideChannel.set(object, true);
+ pushToArray(values, stringify(
+ value,
+ keyPrefix,
+ generateArrayPrefix,
+ strictNullHandling,
+ skipNulls,
+ encoder,
+ filter,
+ sort,
+ allowDots,
+ serializeDate,
+ format,
+ formatter,
+ encodeValuesOnly,
+ charset,
+ sideChannel
+ ));
+ }
+
+ return values;
+};
+
+var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
+ if (!opts) {
+ return defaults;
+ }
+
+ if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
+ throw new TypeError('Encoder has to be a function.');
+ }
+
+ var charset = opts.charset || defaults.charset;
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
+ }
+
+ var format = formats['default'];
+ if (typeof opts.format !== 'undefined') {
+ if (!has.call(formats.formatters, opts.format)) {
+ throw new TypeError('Unknown format option provided.');
+ }
+ format = opts.format;
+ }
+ var formatter = formats.formatters[format];
+
+ var filter = defaults.filter;
+ if (typeof opts.filter === 'function' || isArray(opts.filter)) {
+ filter = opts.filter;
+ }
+
+ return {
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
+ charset: charset,
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
+ filter: filter,
+ format: format,
+ formatter: formatter,
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
+ };
+};
+
+module.exports = function (object, opts) {
+ var obj = object;
+ var options = normalizeStringifyOptions(opts);
+
+ var objKeys;
+ var filter;
+
+ if (typeof options.filter === 'function') {
+ filter = options.filter;
+ obj = filter('', obj);
+ } else if (isArray(options.filter)) {
+ filter = options.filter;
+ objKeys = filter;
+ }
+
+ var keys = [];
+
+ if (typeof obj !== 'object' || obj === null) {
+ return '';
+ }
+
+ var arrayFormat;
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
+ arrayFormat = opts.arrayFormat;
+ } else if (opts && 'indices' in opts) {
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
+ } else {
+ arrayFormat = 'indices';
+ }
+
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
+
+ if (!objKeys) {
+ objKeys = Object.keys(obj);
+ }
+
+ if (options.sort) {
+ objKeys.sort(options.sort);
+ }
+
+ var sideChannel = getSideChannel();
+ for (var i = 0; i < objKeys.length; ++i) {
+ var key = objKeys[i];
+
+ if (options.skipNulls && obj[key] === null) {
+ continue;
+ }
+ pushToArray(keys, stringify(
+ obj[key],
+ key,
+ generateArrayPrefix,
+ options.strictNullHandling,
+ options.skipNulls,
+ options.encode ? options.encoder : null,
+ options.filter,
+ options.sort,
+ options.allowDots,
+ options.serializeDate,
+ options.format,
+ options.formatter,
+ options.encodeValuesOnly,
+ options.charset,
+ sideChannel
+ ));
+ }
+
+ var joined = keys.join(options.delimiter);
+ var prefix = options.addQueryPrefix === true ? '?' : '';
+
+ if (options.charsetSentinel) {
+ if (options.charset === 'iso-8859-1') {
+ // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
+ prefix += 'utf8=%26%2310003%3B&';
+ } else {
+ // encodeURIComponent('✓')
+ prefix += 'utf8=%E2%9C%93&';
+ }
+ }
+
+ return joined.length > 0 ? prefix + joined : '';
+};
+
+},{"./formats":1,"./utils":5,"side-channel":16}],5:[function(require,module,exports){
+'use strict';
+
+var formats = require('./formats');
+
+var has = Object.prototype.hasOwnProperty;
+var isArray = Array.isArray;
+
+var hexTable = (function () {
+ var array = [];
+ for (var i = 0; i < 256; ++i) {
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
+ }
+
+ return array;
+}());
+
+var compactQueue = function compactQueue(queue) {
+ while (queue.length > 1) {
+ var item = queue.pop();
+ var obj = item.obj[item.prop];
+
+ if (isArray(obj)) {
+ var compacted = [];
+
+ for (var j = 0; j < obj.length; ++j) {
+ if (typeof obj[j] !== 'undefined') {
+ compacted.push(obj[j]);
+ }
+ }
+
+ item.obj[item.prop] = compacted;
+ }
+ }
+};
+
+var arrayToObject = function arrayToObject(source, options) {
+ var obj = options && options.plainObjects ? Object.create(null) : {};
+ for (var i = 0; i < source.length; ++i) {
+ if (typeof source[i] !== 'undefined') {
+ obj[i] = source[i];
+ }
+ }
+
+ return obj;
+};
+
+var merge = function merge(target, source, options) {
+ /* eslint no-param-reassign: 0 */
+ if (!source) {
+ return target;
+ }
+
+ if (typeof source !== 'object') {
+ if (isArray(target)) {
+ target.push(source);
+ } else if (target && typeof target === 'object') {
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
+ target[source] = true;
+ }
+ } else {
+ return [target, source];
+ }
+
+ return target;
+ }
+
+ if (!target || typeof target !== 'object') {
+ return [target].concat(source);
+ }
+
+ var mergeTarget = target;
+ if (isArray(target) && !isArray(source)) {
+ mergeTarget = arrayToObject(target, options);
+ }
+
+ if (isArray(target) && isArray(source)) {
+ source.forEach(function (item, i) {
+ if (has.call(target, i)) {
+ var targetItem = target[i];
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
+ target[i] = merge(targetItem, item, options);
+ } else {
+ target.push(item);
+ }
+ } else {
+ target[i] = item;
+ }
+ });
+ return target;
+ }
+
+ return Object.keys(source).reduce(function (acc, key) {
+ var value = source[key];
+
+ if (has.call(acc, key)) {
+ acc[key] = merge(acc[key], value, options);
+ } else {
+ acc[key] = value;
+ }
+ return acc;
+ }, mergeTarget);
+};
+
+var assign = function assignSingleSource(target, source) {
+ return Object.keys(source).reduce(function (acc, key) {
+ acc[key] = source[key];
+ return acc;
+ }, target);
+};
+
+var decode = function (str, decoder, charset) {
+ var strWithoutPlus = str.replace(/\+/g, ' ');
+ if (charset === 'iso-8859-1') {
+ // unescape never throws, no try...catch needed:
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
+ }
+ // utf-8
+ try {
+ return decodeURIComponent(strWithoutPlus);
+ } catch (e) {
+ return strWithoutPlus;
+ }
+};
+
+var encode = function encode(str, defaultEncoder, charset, kind, format) {
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
+ // It has been adapted here for stricter adherence to RFC 3986
+ if (str.length === 0) {
+ return str;
+ }
+
+ var string = str;
+ if (typeof str === 'symbol') {
+ string = Symbol.prototype.toString.call(str);
+ } else if (typeof str !== 'string') {
+ string = String(str);
+ }
+
+ if (charset === 'iso-8859-1') {
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
+ });
+ }
+
+ var out = '';
+ for (var i = 0; i < string.length; ++i) {
+ var c = string.charCodeAt(i);
+
+ if (
+ c === 0x2D // -
+ || c === 0x2E // .
+ || c === 0x5F // _
+ || c === 0x7E // ~
+ || (c >= 0x30 && c <= 0x39) // 0-9
+ || (c >= 0x41 && c <= 0x5A) // a-z
+ || (c >= 0x61 && c <= 0x7A) // A-Z
+ || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
+ ) {
+ out += string.charAt(i);
+ continue;
+ }
+
+ if (c < 0x80) {
+ out = out + hexTable[c];
+ continue;
+ }
+
+ if (c < 0x800) {
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ if (c < 0xD800 || c >= 0xE000) {
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
+ continue;
+ }
+
+ i += 1;
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
+ out += hexTable[0xF0 | (c >> 18)]
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
+ + hexTable[0x80 | (c & 0x3F)];
+ }
+
+ return out;
+};
+
+var compact = function compact(value) {
+ var queue = [{ obj: { o: value }, prop: 'o' }];
+ var refs = [];
+
+ for (var i = 0; i < queue.length; ++i) {
+ var item = queue[i];
+ var obj = item.obj[item.prop];
+
+ var keys = Object.keys(obj);
+ for (var j = 0; j < keys.length; ++j) {
+ var key = keys[j];
+ var val = obj[key];
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
+ queue.push({ obj: obj, prop: key });
+ refs.push(val);
+ }
+ }
+ }
+
+ compactQueue(queue);
+
+ return value;
+};
+
+var isRegExp = function isRegExp(obj) {
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
+};
+
+var isBuffer = function isBuffer(obj) {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
+};
+
+var combine = function combine(a, b) {
+ return [].concat(a, b);
+};
+
+var maybeMap = function maybeMap(val, fn) {
+ if (isArray(val)) {
+ var mapped = [];
+ for (var i = 0; i < val.length; i += 1) {
+ mapped.push(fn(val[i]));
+ }
+ return mapped;
+ }
+ return fn(val);
+};
+
+module.exports = {
+ arrayToObject: arrayToObject,
+ assign: assign,
+ combine: combine,
+ compact: compact,
+ decode: decode,
+ encode: encode,
+ isBuffer: isBuffer,
+ isRegExp: isRegExp,
+ maybeMap: maybeMap,
+ merge: merge
+};
+
+},{"./formats":1}],6:[function(require,module,exports){
+
+},{}],7:[function(require,module,exports){
+'use strict';
+
+var GetIntrinsic = require('get-intrinsic');
+
+var callBind = require('./');
+
+var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
+
+module.exports = function callBoundIntrinsic(name, allowMissing) {
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
+ return callBind(intrinsic);
+ }
+ return intrinsic;
+};
+
+},{"./":8,"get-intrinsic":11}],8:[function(require,module,exports){
+'use strict';
+
+var bind = require('function-bind');
+var GetIntrinsic = require('get-intrinsic');
+
+var $apply = GetIntrinsic('%Function.prototype.apply%');
+var $call = GetIntrinsic('%Function.prototype.call%');
+var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
+
+var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
+var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
+var $max = GetIntrinsic('%Math.max%');
+
+if ($defineProperty) {
+ try {
+ $defineProperty({}, 'a', { value: 1 });
+ } catch (e) {
+ // IE 8 has a broken defineProperty
+ $defineProperty = null;
+ }
+}
+
+module.exports = function callBind(originalFunction) {
+ var func = $reflectApply(bind, $call, arguments);
+ if ($gOPD && $defineProperty) {
+ var desc = $gOPD(func, 'length');
+ if (desc.configurable) {
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
+ $defineProperty(
+ func,
+ 'length',
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
+ );
+ }
+ }
+ return func;
+};
+
+var applyBind = function applyBind() {
+ return $reflectApply(bind, $apply, arguments);
+};
+
+if ($defineProperty) {
+ $defineProperty(module.exports, 'apply', { value: applyBind });
+} else {
+ module.exports.apply = applyBind;
+}
+
+},{"function-bind":10,"get-intrinsic":11}],9:[function(require,module,exports){
+'use strict';
+
+/* eslint no-invalid-this: 1 */
+
+var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
+var slice = Array.prototype.slice;
+var toStr = Object.prototype.toString;
+var funcType = '[object Function]';
+
+module.exports = function bind(that) {
+ var target = this;
+ if (typeof target !== 'function' || toStr.call(target) !== funcType) {
+ throw new TypeError(ERROR_MESSAGE + target);
+ }
+ var args = slice.call(arguments, 1);
+
+ var bound;
+ var binder = function () {
+ if (this instanceof bound) {
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+ }
+ };
+
+ var boundLength = Math.max(0, target.length - args.length);
+ var boundArgs = [];
+ for (var i = 0; i < boundLength; i++) {
+ boundArgs.push('$' + i);
+ }
+
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
+
+ if (target.prototype) {
+ var Empty = function Empty() {};
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+
+ return bound;
+};
+
+},{}],10:[function(require,module,exports){
+'use strict';
+
+var implementation = require('./implementation');
+
+module.exports = Function.prototype.bind || implementation;
+
+},{"./implementation":9}],11:[function(require,module,exports){
+'use strict';
+
+var undefined;
+
+var $SyntaxError = SyntaxError;
+var $Function = Function;
+var $TypeError = TypeError;
+
+// eslint-disable-next-line consistent-return
+var getEvalledConstructor = function (expressionSyntax) {
+ try {
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
+ } catch (e) {}
+};
+
+var $gOPD = Object.getOwnPropertyDescriptor;
+if ($gOPD) {
+ try {
+ $gOPD({}, '');
+ } catch (e) {
+ $gOPD = null; // this is IE 8, which has a broken gOPD
+ }
+}
+
+var throwTypeError = function () {
+ throw new $TypeError();
+};
+var ThrowTypeError = $gOPD
+ ? (function () {
+ try {
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
+ arguments.callee; // IE 8 does not throw here
+ return throwTypeError;
+ } catch (calleeThrows) {
+ try {
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
+ return $gOPD(arguments, 'callee').get;
+ } catch (gOPDthrows) {
+ return throwTypeError;
+ }
+ }
+ }())
+ : throwTypeError;
+
+var hasSymbols = require('has-symbols')();
+
+var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
+
+var needsEval = {};
+
+var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
+
+var INTRINSICS = {
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
+ '%Array%': Array,
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
+ '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
+ '%AsyncFromSyncIteratorPrototype%': undefined,
+ '%AsyncFunction%': needsEval,
+ '%AsyncGenerator%': needsEval,
+ '%AsyncGeneratorFunction%': needsEval,
+ '%AsyncIteratorPrototype%': needsEval,
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
+ '%Boolean%': Boolean,
+ '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
+ '%Date%': Date,
+ '%decodeURI%': decodeURI,
+ '%decodeURIComponent%': decodeURIComponent,
+ '%encodeURI%': encodeURI,
+ '%encodeURIComponent%': encodeURIComponent,
+ '%Error%': Error,
+ '%eval%': eval, // eslint-disable-line no-eval
+ '%EvalError%': EvalError,
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
+ '%Function%': $Function,
+ '%GeneratorFunction%': needsEval,
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
+ '%isFinite%': isFinite,
+ '%isNaN%': isNaN,
+ '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined,
+ '%Map%': typeof Map === 'undefined' ? undefined : Map,
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
+ '%Math%': Math,
+ '%Number%': Number,
+ '%Object%': Object,
+ '%parseFloat%': parseFloat,
+ '%parseInt%': parseInt,
+ '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
+ '%RangeError%': RangeError,
+ '%ReferenceError%': ReferenceError,
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
+ '%RegExp%': RegExp,
+ '%Set%': typeof Set === 'undefined' ? undefined : Set,
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
+ '%String%': String,
+ '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
+ '%Symbol%': hasSymbols ? Symbol : undefined,
+ '%SyntaxError%': $SyntaxError,
+ '%ThrowTypeError%': ThrowTypeError,
+ '%TypedArray%': TypedArray,
+ '%TypeError%': $TypeError,
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
+ '%URIError%': URIError,
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
+};
+
+var doEval = function doEval(name) {
+ var value;
+ if (name === '%AsyncFunction%') {
+ value = getEvalledConstructor('async function () {}');
+ } else if (name === '%GeneratorFunction%') {
+ value = getEvalledConstructor('function* () {}');
+ } else if (name === '%AsyncGeneratorFunction%') {
+ value = getEvalledConstructor('async function* () {}');
+ } else if (name === '%AsyncGenerator%') {
+ var fn = doEval('%AsyncGeneratorFunction%');
+ if (fn) {
+ value = fn.prototype;
+ }
+ } else if (name === '%AsyncIteratorPrototype%') {
+ var gen = doEval('%AsyncGenerator%');
+ if (gen) {
+ value = getProto(gen.prototype);
+ }
+ }
+
+ INTRINSICS[name] = value;
+
+ return value;
+};
+
+var LEGACY_ALIASES = {
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
+ '%ArrayPrototype%': ['Array', 'prototype'],
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
+ '%DataViewPrototype%': ['DataView', 'prototype'],
+ '%DatePrototype%': ['Date', 'prototype'],
+ '%ErrorPrototype%': ['Error', 'prototype'],
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
+ '%FunctionPrototype%': ['Function', 'prototype'],
+ '%Generator%': ['GeneratorFunction', 'prototype'],
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
+ '%JSONParse%': ['JSON', 'parse'],
+ '%JSONStringify%': ['JSON', 'stringify'],
+ '%MapPrototype%': ['Map', 'prototype'],
+ '%NumberPrototype%': ['Number', 'prototype'],
+ '%ObjectPrototype%': ['Object', 'prototype'],
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
+ '%PromisePrototype%': ['Promise', 'prototype'],
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
+ '%Promise_all%': ['Promise', 'all'],
+ '%Promise_reject%': ['Promise', 'reject'],
+ '%Promise_resolve%': ['Promise', 'resolve'],
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
+ '%SetPrototype%': ['Set', 'prototype'],
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
+ '%StringPrototype%': ['String', 'prototype'],
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
+};
+
+var bind = require('function-bind');
+var hasOwn = require('has');
+var $concat = bind.call(Function.call, Array.prototype.concat);
+var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
+var $replace = bind.call(Function.call, String.prototype.replace);
+var $strSlice = bind.call(Function.call, String.prototype.slice);
+
+/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
+var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
+var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
+var stringToPath = function stringToPath(string) {
+ var first = $strSlice(string, 0, 1);
+ var last = $strSlice(string, -1);
+ if (first === '%' && last !== '%') {
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
+ } else if (last === '%' && first !== '%') {
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
+ }
+ var result = [];
+ $replace(string, rePropName, function (match, number, quote, subString) {
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
+ });
+ return result;
+};
+/* end adaptation */
+
+var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
+ var intrinsicName = name;
+ var alias;
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
+ alias = LEGACY_ALIASES[intrinsicName];
+ intrinsicName = '%' + alias[0] + '%';
+ }
+
+ if (hasOwn(INTRINSICS, intrinsicName)) {
+ var value = INTRINSICS[intrinsicName];
+ if (value === needsEval) {
+ value = doEval(intrinsicName);
+ }
+ if (typeof value === 'undefined' && !allowMissing) {
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
+ }
+
+ return {
+ alias: alias,
+ name: intrinsicName,
+ value: value
+ };
+ }
+
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
+};
+
+module.exports = function GetIntrinsic(name, allowMissing) {
+ if (typeof name !== 'string' || name.length === 0) {
+ throw new $TypeError('intrinsic name must be a non-empty string');
+ }
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
+ throw new $TypeError('"allowMissing" argument must be a boolean');
+ }
+
+ var parts = stringToPath(name);
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
+
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
+ var intrinsicRealName = intrinsic.name;
+ var value = intrinsic.value;
+ var skipFurtherCaching = false;
+
+ var alias = intrinsic.alias;
+ if (alias) {
+ intrinsicBaseName = alias[0];
+ $spliceApply(parts, $concat([0, 1], alias));
+ }
+
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
+ var part = parts[i];
+ var first = $strSlice(part, 0, 1);
+ var last = $strSlice(part, -1);
+ if (
+ (
+ (first === '"' || first === "'" || first === '`')
+ || (last === '"' || last === "'" || last === '`')
+ )
+ && first !== last
+ ) {
+ throw new $SyntaxError('property names with quotes must have matching quotes');
+ }
+ if (part === 'constructor' || !isOwn) {
+ skipFurtherCaching = true;
+ }
+
+ intrinsicBaseName += '.' + part;
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
+
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
+ value = INTRINSICS[intrinsicRealName];
+ } else if (value != null) {
+ if (!(part in value)) {
+ if (!allowMissing) {
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
+ }
+ return void undefined;
+ }
+ if ($gOPD && (i + 1) >= parts.length) {
+ var desc = $gOPD(value, part);
+ isOwn = !!desc;
+
+ // By convention, when a data property is converted to an accessor
+ // property to emulate a data property that does not suffer from
+ // the override mistake, that accessor's getter is marked with
+ // an `originalValue` property. Here, when we detect this, we
+ // uphold the illusion by pretending to see that original data
+ // property, i.e., returning the value rather than the getter
+ // itself.
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
+ value = desc.get;
+ } else {
+ value = value[part];
+ }
+ } else {
+ isOwn = hasOwn(value, part);
+ value = value[part];
+ }
+
+ if (isOwn && !skipFurtherCaching) {
+ INTRINSICS[intrinsicRealName] = value;
+ }
+ }
+ }
+ return value;
+};
+
+},{"function-bind":10,"has":14,"has-symbols":12}],12:[function(require,module,exports){
+'use strict';
+
+var origSymbol = typeof Symbol !== 'undefined' && Symbol;
+var hasSymbolSham = require('./shams');
+
+module.exports = function hasNativeSymbols() {
+ if (typeof origSymbol !== 'function') { return false; }
+ if (typeof Symbol !== 'function') { return false; }
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
+
+ return hasSymbolSham();
+};
+
+},{"./shams":13}],13:[function(require,module,exports){
+'use strict';
+
+/* eslint complexity: [2, 18], max-statements: [2, 33] */
+module.exports = function hasSymbols() {
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
+ if (typeof Symbol.iterator === 'symbol') { return true; }
+
+ var obj = {};
+ var sym = Symbol('test');
+ var symObj = Object(sym);
+ if (typeof sym === 'string') { return false; }
+
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
+
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
+ // if (sym instanceof Symbol) { return false; }
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
+ // if (!(symObj instanceof Symbol)) { return false; }
+
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
+
+ var symVal = 42;
+ obj[sym] = symVal;
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
+
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
+
+ var syms = Object.getOwnPropertySymbols(obj);
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
+
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
+
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
+ }
+
+ return true;
+};
+
+},{}],14:[function(require,module,exports){
+'use strict';
+
+var bind = require('function-bind');
+
+module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
+
+},{"function-bind":10}],15:[function(require,module,exports){
+var hasMap = typeof Map === 'function' && Map.prototype;
+var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
+var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
+var mapForEach = hasMap && Map.prototype.forEach;
+var hasSet = typeof Set === 'function' && Set.prototype;
+var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
+var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
+var setForEach = hasSet && Set.prototype.forEach;
+var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
+var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
+var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
+var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
+var booleanValueOf = Boolean.prototype.valueOf;
+var objectToString = Object.prototype.toString;
+var functionToString = Function.prototype.toString;
+var match = String.prototype.match;
+var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
+var gOPS = Object.getOwnPropertySymbols;
+var symToString = typeof Symbol === 'function' ? Symbol.prototype.toString : null;
+var isEnumerable = Object.prototype.propertyIsEnumerable;
+
+var inspectCustom = require('./util.inspect').custom;
+var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
+
+module.exports = function inspect_(obj, options, depth, seen) {
+ var opts = options || {};
+
+ if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
+ }
+ if (
+ has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
+ : opts.maxStringLength !== null
+ )
+ ) {
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
+ }
+ var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
+ if (typeof customInspect !== 'boolean') {
+ throw new TypeError('option "customInspect", if provided, must be `true` or `false`');
+ }
+
+ if (
+ has(opts, 'indent')
+ && opts.indent !== null
+ && opts.indent !== '\t'
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
+ ) {
+ throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');
+ }
+
+ if (typeof obj === 'undefined') {
+ return 'undefined';
+ }
+ if (obj === null) {
+ return 'null';
+ }
+ if (typeof obj === 'boolean') {
+ return obj ? 'true' : 'false';
+ }
+
+ if (typeof obj === 'string') {
+ return inspectString(obj, opts);
+ }
+ if (typeof obj === 'number') {
+ if (obj === 0) {
+ return Infinity / obj > 0 ? '0' : '-0';
+ }
+ return String(obj);
+ }
+ if (typeof obj === 'bigint') {
+ return String(obj) + 'n';
+ }
+
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
+ if (typeof depth === 'undefined') { depth = 0; }
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
+ return isArray(obj) ? '[Array]' : '[Object]';
+ }
+
+ var indent = getIndent(opts, depth);
+
+ if (typeof seen === 'undefined') {
+ seen = [];
+ } else if (indexOf(seen, obj) >= 0) {
+ return '[Circular]';
+ }
+
+ function inspect(value, from, noIndent) {
+ if (from) {
+ seen = seen.slice();
+ seen.push(from);
+ }
+ if (noIndent) {
+ var newOpts = {
+ depth: opts.depth
+ };
+ if (has(opts, 'quoteStyle')) {
+ newOpts.quoteStyle = opts.quoteStyle;
+ }
+ return inspect_(value, newOpts, depth + 1, seen);
+ }
+ return inspect_(value, opts, depth + 1, seen);
+ }
+
+ if (typeof obj === 'function') {
+ var name = nameOf(obj);
+ var keys = arrObjKeys(obj, inspect);
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
+ }
+ if (isSymbol(obj)) {
+ var symString = symToString.call(obj);
+ return typeof obj === 'object' ? markBoxed(symString) : symString;
+ }
+ if (isElement(obj)) {
+ var s = '<' + String(obj.nodeName).toLowerCase();
+ var attrs = obj.attributes || [];
+ for (var i = 0; i < attrs.length; i++) {
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
+ }
+ s += '>';
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
+ s += '' + String(obj.nodeName).toLowerCase() + '>';
+ return s;
+ }
+ if (isArray(obj)) {
+ if (obj.length === 0) { return '[]'; }
+ var xs = arrObjKeys(obj, inspect);
+ if (indent && !singleLineValues(xs)) {
+ return '[' + indentedJoin(xs, indent) + ']';
+ }
+ return '[ ' + xs.join(', ') + ' ]';
+ }
+ if (isError(obj)) {
+ var parts = arrObjKeys(obj, inspect);
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
+ return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
+ }
+ if (typeof obj === 'object' && customInspect) {
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
+ return obj[inspectSymbol]();
+ } else if (typeof obj.inspect === 'function') {
+ return obj.inspect();
+ }
+ }
+ if (isMap(obj)) {
+ var mapParts = [];
+ mapForEach.call(obj, function (value, key) {
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
+ });
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
+ }
+ if (isSet(obj)) {
+ var setParts = [];
+ setForEach.call(obj, function (value) {
+ setParts.push(inspect(value, obj));
+ });
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
+ }
+ if (isWeakMap(obj)) {
+ return weakCollectionOf('WeakMap');
+ }
+ if (isWeakSet(obj)) {
+ return weakCollectionOf('WeakSet');
+ }
+ if (isNumber(obj)) {
+ return markBoxed(inspect(Number(obj)));
+ }
+ if (isBigInt(obj)) {
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
+ }
+ if (isBoolean(obj)) {
+ return markBoxed(booleanValueOf.call(obj));
+ }
+ if (isString(obj)) {
+ return markBoxed(inspect(String(obj)));
+ }
+ if (!isDate(obj) && !isRegExp(obj)) {
+ var ys = arrObjKeys(obj, inspect);
+ if (ys.length === 0) { return '{}'; }
+ if (indent) {
+ return '{' + indentedJoin(ys, indent) + '}';
+ }
+ return '{ ' + ys.join(', ') + ' }';
+ }
+ return String(obj);
+};
+
+function wrapQuotes(s, defaultStyle, opts) {
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
+ return quoteChar + s + quoteChar;
+}
+
+function quote(s) {
+ return String(s).replace(/"/g, '"');
+}
+
+function isArray(obj) { return toStr(obj) === '[object Array]'; }
+function isDate(obj) { return toStr(obj) === '[object Date]'; }
+function isRegExp(obj) { return toStr(obj) === '[object RegExp]'; }
+function isError(obj) { return toStr(obj) === '[object Error]'; }
+function isSymbol(obj) { return toStr(obj) === '[object Symbol]'; }
+function isString(obj) { return toStr(obj) === '[object String]'; }
+function isNumber(obj) { return toStr(obj) === '[object Number]'; }
+function isBigInt(obj) { return toStr(obj) === '[object BigInt]'; }
+function isBoolean(obj) { return toStr(obj) === '[object Boolean]'; }
+
+var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
+function has(obj, key) {
+ return hasOwn.call(obj, key);
+}
+
+function toStr(obj) {
+ return objectToString.call(obj);
+}
+
+function nameOf(f) {
+ if (f.name) { return f.name; }
+ var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
+ if (m) { return m[1]; }
+ return null;
+}
+
+function indexOf(xs, x) {
+ if (xs.indexOf) { return xs.indexOf(x); }
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) { return i; }
+ }
+ return -1;
+}
+
+function isMap(x) {
+ if (!mapSize || !x || typeof x !== 'object') {
+ return false;
+ }
+ try {
+ mapSize.call(x);
+ try {
+ setSize.call(x);
+ } catch (s) {
+ return true;
+ }
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
+ } catch (e) {}
+ return false;
+}
+
+function isWeakMap(x) {
+ if (!weakMapHas || !x || typeof x !== 'object') {
+ return false;
+ }
+ try {
+ weakMapHas.call(x, weakMapHas);
+ try {
+ weakSetHas.call(x, weakSetHas);
+ } catch (s) {
+ return true;
+ }
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
+ } catch (e) {}
+ return false;
+}
+
+function isSet(x) {
+ if (!setSize || !x || typeof x !== 'object') {
+ return false;
+ }
+ try {
+ setSize.call(x);
+ try {
+ mapSize.call(x);
+ } catch (m) {
+ return true;
+ }
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
+ } catch (e) {}
+ return false;
+}
+
+function isWeakSet(x) {
+ if (!weakSetHas || !x || typeof x !== 'object') {
+ return false;
+ }
+ try {
+ weakSetHas.call(x, weakSetHas);
+ try {
+ weakMapHas.call(x, weakMapHas);
+ } catch (s) {
+ return true;
+ }
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
+ } catch (e) {}
+ return false;
+}
+
+function isElement(x) {
+ if (!x || typeof x !== 'object') { return false; }
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
+ return true;
+ }
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
+}
+
+function inspectString(str, opts) {
+ if (str.length > opts.maxStringLength) {
+ var remaining = str.length - opts.maxStringLength;
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
+ return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer;
+ }
+ // eslint-disable-next-line no-control-regex
+ var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
+ return wrapQuotes(s, 'single', opts);
+}
+
+function lowbyte(c) {
+ var n = c.charCodeAt(0);
+ var x = {
+ 8: 'b',
+ 9: 't',
+ 10: 'n',
+ 12: 'f',
+ 13: 'r'
+ }[n];
+ if (x) { return '\\' + x; }
+ return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase();
+}
+
+function markBoxed(str) {
+ return 'Object(' + str + ')';
+}
+
+function weakCollectionOf(type) {
+ return type + ' { ? }';
+}
+
+function collectionOf(type, size, entries, indent) {
+ var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', ');
+ return type + ' (' + size + ') {' + joinedEntries + '}';
+}
+
+function singleLineValues(xs) {
+ for (var i = 0; i < xs.length; i++) {
+ if (indexOf(xs[i], '\n') >= 0) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function getIndent(opts, depth) {
+ var baseIndent;
+ if (opts.indent === '\t') {
+ baseIndent = '\t';
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
+ baseIndent = Array(opts.indent + 1).join(' ');
+ } else {
+ return null;
+ }
+ return {
+ base: baseIndent,
+ prev: Array(depth + 1).join(baseIndent)
+ };
+}
+
+function indentedJoin(xs, indent) {
+ if (xs.length === 0) { return ''; }
+ var lineJoiner = '\n' + indent.prev + indent.base;
+ return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev;
+}
+
+function arrObjKeys(obj, inspect) {
+ var isArr = isArray(obj);
+ var xs = [];
+ if (isArr) {
+ xs.length = obj.length;
+ for (var i = 0; i < obj.length; i++) {
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
+ }
+ }
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
+ if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
+ if ((/[^\w$]/).test(key)) {
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
+ } else {
+ xs.push(key + ': ' + inspect(obj[key], obj));
+ }
+ }
+ if (typeof gOPS === 'function') {
+ var syms = gOPS(obj);
+ for (var j = 0; j < syms.length; j++) {
+ if (isEnumerable.call(obj, syms[j])) {
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
+ }
+ }
+ }
+ return xs;
+}
+
+},{"./util.inspect":6}],16:[function(require,module,exports){
+'use strict';
+
+var GetIntrinsic = require('get-intrinsic');
+var callBound = require('call-bind/callBound');
+var inspect = require('object-inspect');
+
+var $TypeError = GetIntrinsic('%TypeError%');
+var $WeakMap = GetIntrinsic('%WeakMap%', true);
+var $Map = GetIntrinsic('%Map%', true);
+
+var $weakMapGet = callBound('WeakMap.prototype.get', true);
+var $weakMapSet = callBound('WeakMap.prototype.set', true);
+var $weakMapHas = callBound('WeakMap.prototype.has', true);
+var $mapGet = callBound('Map.prototype.get', true);
+var $mapSet = callBound('Map.prototype.set', true);
+var $mapHas = callBound('Map.prototype.has', true);
+
+/*
+ * This function traverses the list returning the node corresponding to the
+ * given key.
+ *
+ * That node is also moved to the head of the list, so that if it's accessed
+ * again we don't need to traverse the whole list. By doing so, all the recently
+ * used nodes can be accessed relatively quickly.
+ */
+var listGetNode = function (list, key) { // eslint-disable-line consistent-return
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
+ if (curr.key === key) {
+ prev.next = curr.next;
+ curr.next = list.next;
+ list.next = curr; // eslint-disable-line no-param-reassign
+ return curr;
+ }
+ }
+};
+
+var listGet = function (objects, key) {
+ var node = listGetNode(objects, key);
+ return node && node.value;
+};
+var listSet = function (objects, key, value) {
+ var node = listGetNode(objects, key);
+ if (node) {
+ node.value = value;
+ } else {
+ // Prepend the new node to the beginning of the list
+ objects.next = { // eslint-disable-line no-param-reassign
+ key: key,
+ next: objects.next,
+ value: value
+ };
+ }
+};
+var listHas = function (objects, key) {
+ return !!listGetNode(objects, key);
+};
+
+module.exports = function getSideChannel() {
+ var $wm;
+ var $m;
+ var $o;
+ var channel = {
+ assert: function (key) {
+ if (!channel.has(key)) {
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
+ }
+ },
+ get: function (key) { // eslint-disable-line consistent-return
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
+ if ($wm) {
+ return $weakMapGet($wm, key);
+ }
+ } else if ($Map) {
+ if ($m) {
+ return $mapGet($m, key);
+ }
+ } else {
+ if ($o) { // eslint-disable-line no-lonely-if
+ return listGet($o, key);
+ }
+ }
+ },
+ has: function (key) {
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
+ if ($wm) {
+ return $weakMapHas($wm, key);
+ }
+ } else if ($Map) {
+ if ($m) {
+ return $mapHas($m, key);
+ }
+ } else {
+ if ($o) { // eslint-disable-line no-lonely-if
+ return listHas($o, key);
+ }
+ }
+ return false;
+ },
+ set: function (key, value) {
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
+ if (!$wm) {
+ $wm = new $WeakMap();
+ }
+ $weakMapSet($wm, key, value);
+ } else if ($Map) {
+ if (!$m) {
+ $m = new $Map();
+ }
+ $mapSet($m, key, value);
+ } else {
+ if (!$o) {
+ /*
+ * Initialize the linked list as an empty node, so that we don't have
+ * to special-case handling of the first node: we can always refer to
+ * it as (previous node).next, instead of something like (list).head
+ */
+ $o = { key: {}, next: null };
+ }
+ listSet($o, key, value);
+ }
+ }
+ };
+ return channel;
+};
+
+},{"call-bind/callBound":7,"get-intrinsic":11,"object-inspect":15}]},{},[2])(2)
+});
diff --git a/utils/request.js b/utils/request.js
new file mode 100644
index 0000000..8dd2ed7
--- /dev/null
+++ b/utils/request.js
@@ -0,0 +1,62 @@
+// 接口请求封装
+// let hasClick = false;
+let app = getApp();
+const http = (method, url, data, response, error) => {
+ wx.request({
+ header: getApp().globalData.header,
+ method: method,
+ url: 'https://api.fireflysg.com' + url,
+ header: {
+ 'content-type': 'application/json;chartset=uft-8',
+ 'Accept': 'application/json',
+ 'terminal': 'MINI-PROGRAM',
+ // 'Cookie': wx.getStorageSync("sessionId") || '',
+ 'token': wx.getStorageSync("token") || '',
+ // 'Authorization': 'Bearer ' + wx.getStorageSync("token") || '',
+ // 'X-SessionId': wx.getStorageSync("sessionId") || ''
+ },
+ data: data,
+ success: res => {
+ // if (res.header["Set-Cookie"] != null) {
+ // //设置cookie
+ // getApp().globalData.header["Cookie"] += res.header["Set-Cookie"]
+ // }
+ // 接口登录过期
+ if (res.data.retCode == 0) {
+ return response(res.data)
+ } else if (res.data.retCode == 1011 || res.data.retCode == 1012 || res.data.retCode == 1018) {
+ wx.showLoading({
+ title: '登录态已过期,请重新登录',
+ mask: true
+ })
+ wx.clearStorageSync();
+ wx.redirectTo({
+ url: '/pages/my/login',
+ });
+ return
+ } else {
+ wx.hideLoading();
+ setTimeout(() => {
+ wx.showToast({
+ title: res.data.errMsg,
+ icon: 'none',
+ duration: 2000
+ })
+ }, 100);
+ }
+ },
+ fail: err => {
+ return error(err)
+ },
+ complete: info => {
+ wx.hideLoading();
+ // hasClick = false
+ }
+ })
+}
+module.exports = {
+ _get: (url, data, response, error) => http('GET', url, data, response, error),
+ _post: (url, data, response, error) => http('POST', url, data, response, error),
+ _put: (url, data, response, error) => http('PUT', url, data, response, error),
+ _delete: (url, data, response, error) => http('DELETE', url, data, response, error),
+}
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
new file mode 100644
index 0000000..dbadbb8
--- /dev/null
+++ b/utils/util.js
@@ -0,0 +1,19 @@
+const formatTime = date => {
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1
+ const day = date.getDate()
+ const hour = date.getHours()
+ const minute = date.getMinutes()
+ const second = date.getSeconds()
+
+ return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
+}
+
+const formatNumber = n => {
+ n = n.toString()
+ return n[1] ? n : '0' + n
+}
+
+module.exports = {
+ formatTime: formatTime
+}