├── miniprogram ├── templates │ ├── login │ │ ├── login.js │ │ └── login.wxml │ ├── twoCol-template │ │ └── twoCol-template.wxml │ ├── oneCol-template │ │ └── oneCol-template.wxml │ └── express-template │ │ └── express-template.wxml ├── pages │ ├── Index │ │ ├── goods │ │ │ ├── goods.json │ │ │ └── goods.wxml │ │ ├── index_main │ │ │ ├── index_main.json │ │ │ ├── index_main.wxml │ │ │ └── index_main.js │ │ ├── coupon │ │ │ ├── coupon.json │ │ │ ├── coupon.wxss │ │ │ ├── coupon.wxml │ │ │ └── coupon.js │ │ ├── search │ │ │ ├── search.json │ │ │ ├── search.wxml │ │ │ ├── search.wxss │ │ │ └── search.js │ │ ├── contact │ │ │ ├── contact.json │ │ │ ├── contact.wxml │ │ │ ├── contact.js │ │ │ └── contact.wxss │ │ ├── contact_express │ │ │ ├── contact_express.json │ │ │ ├── contact_express.wxml │ │ │ └── contact_express.js │ │ ├── contact_recourse │ │ │ ├── contact_recourse.json │ │ │ ├── contact_recourse.wxml │ │ │ ├── contact_recourse.wxss │ │ │ └── contact_recourse.js │ │ ├── coupon.rar │ │ └── modal │ │ │ ├── modal.json │ │ │ ├── modal.wxml │ │ │ ├── modal.wxss │ │ │ └── modal.js │ ├── Admin │ │ ├── admin_main │ │ │ ├── admin_main.wxss │ │ │ ├── admin_main.json │ │ │ ├── admin_main.wxml │ │ │ └── admin_main.js │ │ ├── user │ │ │ ├── user.json │ │ │ ├── user.wxss │ │ │ ├── user.wxml │ │ │ └── user.js │ │ ├── agreement │ │ │ ├── agreement.json │ │ │ ├── agreement.wxss │ │ │ ├── agreement.js │ │ │ └── agreement.wxml │ │ ├── secondHand │ │ │ ├── secondHand.json │ │ │ ├── secondHand.wxss │ │ │ ├── secondHand.wxml │ │ │ └── secondHand.js │ │ └── 佛大叮当协议.wxml │ ├── Mine │ │ ├── mine_main │ │ │ ├── mine_main.json │ │ │ ├── mine_main.wxss │ │ │ ├── mine_main.wxml │ │ │ └── mine_main.js │ │ ├── userInfo │ │ │ ├── userInfo.json │ │ │ ├── userInfo.wxss │ │ │ └── userInfo.wxml │ │ └── registered │ │ │ ├── registered.json │ │ │ ├── registered.wxss │ │ │ └── registered.wxml │ ├── News │ │ ├── myGoods │ │ │ ├── myGoods.json │ │ │ ├── myGoods.wxml │ │ │ └── myGoods.js │ │ ├── myExpress │ │ │ ├── myExpress.json │ │ │ ├── myExpress.wxml │ │ │ ├── myExpress.js │ │ │ └── myExpress.wxss │ │ └── myDiscover │ │ │ ├── myDiscover.json │ │ │ ├── myDiscover.wxml │ │ │ └── myDiscover.js │ └── Post │ │ ├── uploadGoods │ │ ├── uploadGoods.json │ │ ├── uploadGoods.wxss │ │ └── uploadGoods.wxml │ │ ├── uploadDiscover │ │ ├── uploadDiscover.json │ │ ├── uploadDiscover.wxss │ │ └── uploadDiscover.wxml │ │ └── uploadExpress │ │ ├── uploadExpress.json │ │ └── uploadExpress.wxss ├── colorui │ ├── components │ │ ├── cu-custom.wxss │ │ ├── cu-custom.json │ │ ├── cu-custom.wxml │ │ ├── cu-custom.js │ │ └── cu-custom.vue │ ├── animation.css │ └── animation.wxss ├── component │ └── tabbar │ │ ├── tabbar.json │ │ ├── icon │ │ ├── me.png │ │ ├── home.png │ │ ├── center.png │ │ ├── me_selected.png │ │ └── home_selected.png │ │ ├── tabbar.wxml │ │ ├── tabbar.js │ │ └── tabbar.wxss ├── images │ ├── x.png │ ├── light.png │ ├── my │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ └── 4.png │ ├── per.png │ ├── per1.png │ ├── pered.png │ ├── phone.png │ ├── shop.png │ ├── yijie.png │ ├── 合作点击.png │ ├── delete.png │ ├── wechat.png │ ├── weijie.png │ ├── weijie1.png │ ├── yijie1.png │ ├── index │ │ ├── find.png │ │ ├── qian.png │ │ ├── guanbi.png │ │ ├── express.png │ │ ├── makemoney.png │ │ ├── shunfeng.png │ │ ├── xinaixin.png │ │ ├── youhuiquan.png │ │ ├── zhaodianhua.png │ │ ├── shiwuzhaoling.png │ │ └── xianzhishangpin.png │ ├── posttask.png │ ├── tabbar │ │ ├── add.png │ │ ├── me.png │ │ ├── 加号.png │ │ ├── hide.png │ │ ├── home.png │ │ ├── show.png │ │ ├── refresh.png │ │ ├── search.png │ │ ├── home_selected.png │ │ └── me_selected.png │ ├── contact │ │ ├── pay.png │ │ ├── express.png │ │ ├── light.png │ │ ├── search.png │ │ └── cooperation.png │ ├── cooperation.png │ ├── postexpress.png │ ├── postshunfeng.png │ ├── postxianzhi.png │ └── gouwuche1-copy.png ├── sitemap.json ├── project.config.json ├── app.js ├── app.wxss ├── app.json └── style │ └── guide.wxss ├── README.txt ├── images ├── 快递.jpg ├── 我的.jpg ├── 搜索.jpg ├── 个人信息.jpg ├── 小程序码.png ├── 快递页面.jpg ├── 我的闲置.jpg ├── 闲置浏览.jpg ├── 闲置详情.jpg ├── 首页图.png ├── 目前的数据库.PNG └── 导入时appid选择测试号.PNG ├── .gitignore ├── project.config.json └── README.md /miniprogram/templates/login/login.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/goods/goods.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /miniprogram/pages/Admin/admin_main/admin_main.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/index_main/index_main.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /miniprogram/pages/Mine/mine_main/mine_main.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Admin/user/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/coupon/coupon.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/coupon/coupon.wxss: -------------------------------------------------------------------------------- 1 | /* pages/Index/coupon/coupon.wxss */ -------------------------------------------------------------------------------- /miniprogram/pages/Index/search/search.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/News/myGoods/myGoods.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Admin/agreement/agreement.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact/contact.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Mine/userInfo/userInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/News/myExpress/myExpress.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/README.txt -------------------------------------------------------------------------------- /miniprogram/colorui/components/cu-custom.wxss: -------------------------------------------------------------------------------- 1 | /* colorui/components/cu-custom.wxss */ -------------------------------------------------------------------------------- /miniprogram/pages/Admin/admin_main/admin_main.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Admin/secondHand/secondHand.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Mine/registered/registered.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/News/myDiscover/myDiscover.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadGoods/uploadGoods.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /images/快递.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/快递.jpg -------------------------------------------------------------------------------- /images/我的.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/我的.jpg -------------------------------------------------------------------------------- /images/搜索.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/搜索.jpg -------------------------------------------------------------------------------- /miniprogram/pages/Admin/agreement/agreement.wxss: -------------------------------------------------------------------------------- 1 | /* pages/Admin/agreement/agreement.wxss */ -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadDiscover/uploadDiscover.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadExpress/uploadExpress.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /images/个人信息.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/个人信息.jpg -------------------------------------------------------------------------------- /images/小程序码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/小程序码.png -------------------------------------------------------------------------------- /images/快递页面.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/快递页面.jpg -------------------------------------------------------------------------------- /images/我的闲置.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/我的闲置.jpg -------------------------------------------------------------------------------- /images/闲置浏览.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/闲置浏览.jpg -------------------------------------------------------------------------------- /images/闲置详情.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/闲置详情.jpg -------------------------------------------------------------------------------- /images/首页图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/首页图.png -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_express/contact_express.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_recourse/contact_recourse.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /images/目前的数据库.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/目前的数据库.PNG -------------------------------------------------------------------------------- /miniprogram/component/tabbar/tabbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/colorui/components/cu-custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /images/导入时appid选择测试号.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/images/导入时appid选择测试号.PNG -------------------------------------------------------------------------------- /miniprogram/images/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/x.png -------------------------------------------------------------------------------- /miniprogram/images/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/light.png -------------------------------------------------------------------------------- /miniprogram/images/my/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/my/1.png -------------------------------------------------------------------------------- /miniprogram/images/my/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/my/2.png -------------------------------------------------------------------------------- /miniprogram/images/my/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/my/3.png -------------------------------------------------------------------------------- /miniprogram/images/my/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/my/4.png -------------------------------------------------------------------------------- /miniprogram/images/per.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/per.png -------------------------------------------------------------------------------- /miniprogram/images/per1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/per1.png -------------------------------------------------------------------------------- /miniprogram/images/pered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/pered.png -------------------------------------------------------------------------------- /miniprogram/images/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/phone.png -------------------------------------------------------------------------------- /miniprogram/images/shop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/shop.png -------------------------------------------------------------------------------- /miniprogram/images/yijie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/yijie.png -------------------------------------------------------------------------------- /miniprogram/images/合作点击.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/合作点击.png -------------------------------------------------------------------------------- /miniprogram/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/delete.png -------------------------------------------------------------------------------- /miniprogram/images/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/wechat.png -------------------------------------------------------------------------------- /miniprogram/images/weijie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/weijie.png -------------------------------------------------------------------------------- /miniprogram/images/weijie1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/weijie1.png -------------------------------------------------------------------------------- /miniprogram/images/yijie1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/yijie1.png -------------------------------------------------------------------------------- /miniprogram/images/index/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/find.png -------------------------------------------------------------------------------- /miniprogram/images/index/qian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/qian.png -------------------------------------------------------------------------------- /miniprogram/images/posttask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/posttask.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/add.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/me.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/加号.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/加号.png -------------------------------------------------------------------------------- /miniprogram/images/contact/pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/contact/pay.png -------------------------------------------------------------------------------- /miniprogram/images/cooperation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/cooperation.png -------------------------------------------------------------------------------- /miniprogram/images/index/guanbi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/guanbi.png -------------------------------------------------------------------------------- /miniprogram/images/postexpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/postexpress.png -------------------------------------------------------------------------------- /miniprogram/images/postshunfeng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/postshunfeng.png -------------------------------------------------------------------------------- /miniprogram/images/postxianzhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/postxianzhi.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/hide.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/home.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/show.png -------------------------------------------------------------------------------- /miniprogram/pages/Index/coupon.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/pages/Index/coupon.rar -------------------------------------------------------------------------------- /miniprogram/pages/Index/modal/modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "tabbar": "../../../component/tabbar/tabbar" 4 | } 5 | } -------------------------------------------------------------------------------- /miniprogram/images/contact/express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/contact/express.png -------------------------------------------------------------------------------- /miniprogram/images/contact/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/contact/light.png -------------------------------------------------------------------------------- /miniprogram/images/contact/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/contact/search.png -------------------------------------------------------------------------------- /miniprogram/images/gouwuche1-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/gouwuche1-copy.png -------------------------------------------------------------------------------- /miniprogram/images/index/express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/express.png -------------------------------------------------------------------------------- /miniprogram/images/index/makemoney.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/makemoney.png -------------------------------------------------------------------------------- /miniprogram/images/index/shunfeng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/shunfeng.png -------------------------------------------------------------------------------- /miniprogram/images/index/xinaixin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/xinaixin.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/refresh.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/search.png -------------------------------------------------------------------------------- /miniprogram/component/tabbar/icon/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/component/tabbar/icon/me.png -------------------------------------------------------------------------------- /miniprogram/images/index/youhuiquan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/youhuiquan.png -------------------------------------------------------------------------------- /miniprogram/images/index/zhaodianhua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/zhaodianhua.png -------------------------------------------------------------------------------- /miniprogram/component/tabbar/icon/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/component/tabbar/icon/home.png -------------------------------------------------------------------------------- /miniprogram/images/contact/cooperation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/contact/cooperation.png -------------------------------------------------------------------------------- /miniprogram/images/index/shiwuzhaoling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/shiwuzhaoling.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/home_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/home_selected.png -------------------------------------------------------------------------------- /miniprogram/images/tabbar/me_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/tabbar/me_selected.png -------------------------------------------------------------------------------- /miniprogram/component/tabbar/icon/center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/component/tabbar/icon/center.png -------------------------------------------------------------------------------- /miniprogram/images/index/xianzhishangpin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/images/index/xianzhishangpin.png -------------------------------------------------------------------------------- /miniprogram/pages/Admin/user/user.wxss: -------------------------------------------------------------------------------- 1 | .container{ 2 | height: 1500rpx; 3 | padding: 0; 4 | background: #F0F4F3; 5 | color: #000; 6 | } -------------------------------------------------------------------------------- /miniprogram/component/tabbar/icon/me_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/component/tabbar/icon/me_selected.png -------------------------------------------------------------------------------- /miniprogram/pages/Admin/secondHand/secondHand.wxss: -------------------------------------------------------------------------------- 1 | .container{ 2 | height: 1500rpx; 3 | padding: 0; 4 | background: #F0F4F3; 5 | color: #000; 6 | } -------------------------------------------------------------------------------- /miniprogram/component/tabbar/icon/home_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeErrorSleep/FoDa-is-my-house/HEAD/miniprogram/component/tabbar/icon/home_selected.png -------------------------------------------------------------------------------- /miniprogram/pages/Index/modal/modal.wxml: -------------------------------------------------------------------------------- 1 | nihao 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /miniprogram/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows 2 | [Dd]esktop.ini 3 | Thumbs.db 4 | $RECYCLE.BIN/ 5 | 6 | # macOS 7 | .DS_Store 8 | .fseventsd 9 | .Spotlight-V100 10 | .TemporaryItems 11 | .Trashes 12 | 13 | # Node.js 14 | node_modules/ 15 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myDiscover/myDiscover.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myExpress/myExpress.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myGoods/myGoods.wxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/modal/modal.wxss: -------------------------------------------------------------------------------- 1 | /* pages/Index/modal/modal.wxss */ 2 | .zan-dialog__mask { 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | right: 0; 7 | bottom: 0; 8 | z-index: 10; 9 | background: rgba(0, 0, 0, 0); 10 | display: none; 11 | } 12 | 13 | .zan-dialog__container { 14 | position: fixed; 15 | bottom: 400rpx; 16 | width: 650rpx; 17 | height: 350rpx; 18 | margin-left: 50rpx; 19 | background: #f8f8f8; 20 | transform: translateY(300%); 21 | transition: all 0.4s ease; 22 | z-index: 12; 23 | border-radius: 20rpx; 24 | box-shadow: 0px 3px 3px 2px gainsboro; 25 | } 26 | 27 | .zan-dialog--show .zan-dialog__container { 28 | transform: translateY(0); 29 | } 30 | 31 | .zan-dialog--show .zan-dialog__mask { 32 | display: block; 33 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/search/search.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/templates/login/login.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/colorui/components/cu-custom.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /miniprogram/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [] 5 | }, 6 | "setting": { 7 | "urlCheck": true, 8 | "es6": true, 9 | "postcss": true, 10 | "minified": true, 11 | "newFeature": true, 12 | "autoAudits": false, 13 | "coverView": true, 14 | "checkSiteMap":false 15 | }, 16 | "compileType": "miniprogram", 17 | "libVersion": "2.9.0", 18 | "appid": "wx02341bbd54fe2a1a", 19 | "projectname": "miniprogram-1", 20 | "debugOptions": { 21 | "hidedInDevtools": [] 22 | }, 23 | "isGameTourist": false, 24 | "simulatorType": "wechat", 25 | "simulatorPluginLibVersion": {}, 26 | "condition": { 27 | "search": { 28 | "current": -1, 29 | "list": [] 30 | }, 31 | "conversation": { 32 | "current": -1, 33 | "list": [] 34 | }, 35 | "game": { 36 | "currentL": -1, 37 | "list": [] 38 | }, 39 | "miniprogram": { 40 | "current": -1, 41 | "list": [] 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /miniprogram/pages/Admin/agreement/agreement.js: -------------------------------------------------------------------------------- 1 | // pages/Admin/agreement/agreement.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Index/coupon/coupon.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{item.type}} 9 | 10 | {{item.title}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /miniprogram/component/tabbar/tabbar.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{item.text}} 7 | 8 | 9 | 10 | {{item.text}} 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /miniprogram/pages/Mine/registered/registered.wxss: -------------------------------------------------------------------------------- 1 | .cu-form-group+.cu-form-group { 2 | border-top: 0rpx solid #eee; 3 | } 4 | .cu-form-group .title { 5 | text-align: justify; 6 | padding-right: 30rpx; 7 | font-size: 30rpx; 8 | position: relative; 9 | height: 60rpx; 10 | line-height: 60rpx; 11 | font-weight: bold; 12 | color:black; 13 | } 14 | .tower-swiper { 15 | height: 420rpx; 16 | position: relative; 17 | max-width: 750rpx; 18 | overflow: hidden; 19 | background-color: white; 20 | } 21 | .tower-swiper .tower-item { 22 | position: absolute; 23 | width: 300rpx; 24 | height: 300rpx; 25 | top: 0; 26 | bottom: 0; 27 | left: 50%; 28 | margin: auto; 29 | transition: all 0.2s ease-in 0s; 30 | opacity: 1; 31 | transform: scale(calc(0.5 + var(--index) / 10)); 32 | margin-left: calc(var(--left) * 100rpx - 150rpx); 33 | z-index: var(--index); 34 | } 35 | .tower-swiper .tower-item .swiper-item { 36 | width: 100%; 37 | height: 100%; 38 | border-radius: 150rpx; 39 | overflow: hidden; 40 | } 41 | .imgBlur { 42 | filter: blur(5px); 43 | } -------------------------------------------------------------------------------- /miniprogram/colorui/components/cu-custom.js: -------------------------------------------------------------------------------- 1 | const app = getApp(); 2 | Component({ 3 | /** 4 | * 组件的一些选项 5 | */ 6 | options: { 7 | addGlobalClass: true, 8 | multipleSlots: true 9 | }, 10 | /** 11 | * 组件的对外属性 12 | */ 13 | properties: { 14 | bgColor: { 15 | type: String, 16 | default: '' 17 | }, 18 | isCustom: { 19 | type: [Boolean, String], 20 | default: false 21 | }, 22 | isBack: { 23 | type: [Boolean, String], 24 | default: false 25 | }, 26 | bgImage: { 27 | type: String, 28 | default: '' 29 | }, 30 | }, 31 | /** 32 | * 组件的初始数据 33 | */ 34 | data: { 35 | StatusBar: app.globalData.StatusBar, 36 | CustomBar: app.globalData.CustomBar, 37 | Custom: app.globalData.Custom 38 | }, 39 | /** 40 | * 组件的方法列表 41 | */ 42 | methods: { 43 | BackPage() { 44 | wx.navigateBack({ 45 | delta: 1 46 | }); 47 | }, 48 | toHome(){ 49 | wx.reLaunch({ 50 | url: '/pages/index/index', 51 | }) 52 | } 53 | } 54 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Mine/userInfo/userInfo.wxss: -------------------------------------------------------------------------------- 1 | .cu-form-group+.cu-form-group { 2 | border-top: 0rpx solid #eee; 3 | } 4 | .cu-form-group .title { 5 | text-align: justify; 6 | padding-right: 30rpx; 7 | font-size: 30rpx; 8 | position: relative; 9 | height: 60rpx; 10 | line-height: 60rpx; 11 | font-weight: bold; 12 | color:black; 13 | } 14 | .tower-swiper { 15 | height: 420rpx; 16 | position: relative; 17 | max-width: 750rpx; 18 | overflow: hidden; 19 | background-color: white; 20 | } 21 | .tower-swiper .tower-item { 22 | position: absolute; 23 | width: 300rpx; 24 | height: 300rpx; 25 | top: 0; 26 | bottom: 0; 27 | left: 50%; 28 | margin: auto; 29 | transition: all 0.2s ease-in 0s; 30 | opacity: 1; 31 | transform: scale(calc(0.5 + var(--index) / 10)); 32 | margin-left: calc(var(--left) * 100rpx - 150rpx); 33 | z-index: var(--index); 34 | } 35 | .tower-swiper .tower-item .swiper-item { 36 | width: 100%; 37 | height: 100%; 38 | border-radius: 150rpx; 39 | overflow: hidden; 40 | } 41 | .imgBlur { 42 | filter: blur(5px); 43 | } 44 | .approve { 45 | font-weight: bold; 46 | color: red; 47 | } -------------------------------------------------------------------------------- /miniprogram/component/tabbar/tabbar.js: -------------------------------------------------------------------------------- 1 | // tabBarComponent/tabBar.js 2 | const app = getApp(); 3 | Component({ 4 | /** 5 | * 组件的属性列表 6 | */ 7 | properties: { 8 | tabbar: { 9 | type: Object, 10 | value: { 11 | "backgroundColor": "#ffffff", 12 | "color": "#979795", 13 | "selectedColor": "#E74552", 14 | "list": [ 15 | { 16 | "pagePath": "/pages/index/index", 17 | "iconPath": "icon/home.png", 18 | "selectedIconPath": "icon/home_selected.png", 19 | "text": "我要买" 20 | }, 21 | { 22 | "pagePath": "/pages/sell/sell", 23 | "iconPath": "icon/icon_release.png", 24 | "isSpecial": true, 25 | "text": "我要卖" 26 | }, 27 | { 28 | "pagePath": "/pages/mine/mine", 29 | "iconPath": "icon/mine.png", 30 | "selectedIconPath": "icon/mine_selected.png", 31 | "text": "我的" 32 | } 33 | ] 34 | } 35 | } 36 | }, 37 | 38 | /** 39 | * 组件的初始数据 40 | */ 41 | data:{ 42 | }, 43 | 44 | /** 45 | * 组件的方法列表 46 | */ 47 | methods: { 48 | 49 | } 50 | }) 51 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/modal/modal.js: -------------------------------------------------------------------------------- 1 | // pages/Index/modal/modal.js 2 | var util = require('../../../utils/util.js') 3 | var app = getApp() 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | tabbar: {},//自定义tabbar 11 | showDialog: false 12 | 13 | }, 14 | toggleDialog() { 15 | this.setData({ 16 | showDialog: !this.data.showDialog 17 | }); 18 | 19 | }, 20 | 21 | /** 22 | * 生命周期函数--监听页面加载 23 | */ 24 | onLoad: function (options) { 25 | app.editTabbar(); //自定义tabbar 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面初次渲染完成 30 | */ 31 | onReady: function () { 32 | 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面显示 37 | */ 38 | onShow: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面隐藏 44 | */ 45 | onHide: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面卸载 51 | */ 52 | onUnload: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 页面相关事件处理函数--监听用户下拉动作 58 | */ 59 | onPullDownRefresh: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面上拉触底事件的处理函数 65 | */ 66 | onReachBottom: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 用户点击右上角分享 72 | */ 73 | onShareAppMessage: function () { 74 | 75 | } 76 | }) -------------------------------------------------------------------------------- /miniprogram/component/tabbar/tabbar.wxss: -------------------------------------------------------------------------------- 1 | .tabbar_box{ 2 | display: flex; 3 | flex-direction: row; 4 | justify-content: space-around; 5 | position: fixed; 6 | bottom: 0; 7 | left: 0; 8 | z-index: 999; 9 | width: 100%; 10 | height: 98rpx; 11 | box-shadow: 0 0 2px rgba(0, 0, 0, 0.1); 12 | } 13 | 14 | .middle-wrapper{ 15 | position: absolute; 16 | right: 310rpx; 17 | bottom: 0; 18 | background-color: #fff; 19 | width: 120rpx; 20 | height: 120rpx; 21 | border-radius: 50%; 22 | border-top: 2rpx solid #f2f2f3; 23 | } 24 | 25 | .tabbar_nav{ 26 | flex: 1; 27 | display: flex; 28 | flex-direction: column; 29 | justify-content: center; 30 | align-items: center; 31 | font-size: 20rpx; 32 | height: 100%; 33 | position: relative; 34 | } 35 | .tabbar_icon{ 36 | width: 56rpx; 37 | height: 56rpx; 38 | } 39 | .special-wrapper{ 40 | position: absolute; 41 | left: 47rpx; 42 | top:-86rpx; 43 | width: 160rpx; 44 | height: 160rpx; 45 | border-radius: 50%; 46 | border-top: 1rpx solid rgb(79, 115, 156); 47 | background-color: #fff; 48 | text-align: center; 49 | box-sizing: border-box; 50 | padding: 6rpx; 51 | box-shadow:0px 0px 5px 1px rgb(79, 115, 156); 52 | } 53 | .special-wrapper .tabbar_icon{ 54 | width: 152rpx; 55 | height: 152rpx; 56 | } 57 | .special-text-wrapper{ 58 | width: 56rpx; 59 | height: 56rpx; 60 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/search/search.wxss: -------------------------------------------------------------------------------- 1 | /* miniprogram/pages/Index/search/search.wxss */ 2 | .search_main { 3 | display: flex; 4 | height: 600px; 5 | justify-content: center; 6 | align-items: center; 7 | } 8 | 9 | .search_main image{ 10 | width: 400rpx; 11 | height: 400rpx; 12 | } 13 | 14 | .container { 15 | margin-top: 100rpx; 16 | padding: 0 12.5rpx 0 12.5rpx; 17 | width:750rpx; 18 | display: flex; 19 | flex-direction:row; 20 | flex-wrap:wrap; 21 | justify-content:space-between; 22 | } 23 | 24 | .item_each{ 25 | margin: 7.5rpx 5rpx 7.5rpx 5rpx; 26 | display: inline-block; 27 | width: 352.5rpx; 28 | border-radius: 3%; 29 | background-color: #fff; 30 | } 31 | 32 | .item_cell{ 33 | margin: 20rpx 20rpx 20rpx 20rpx; 34 | display: flex; 35 | align-items: center; 36 | justify-content: space-between; 37 | } 38 | 39 | .item_text { 40 | overflow: hidden; 41 | text-overflow: ellipsis; 42 | display: -webkit-box; 43 | -webkit-line-clamp: 1; 44 | -webkit-box-orient: vertical; 45 | align-content: center; 46 | color:black; 47 | } 48 | 49 | .item_price{ 50 | display:inline-block; 51 | font-size: 30rpx; 52 | font-weight: bold; 53 | color:#FF4F64; 54 | 55 | } 56 | 57 | .item_price_before{ 58 | display:inline-block; 59 | flex:1rpx; 60 | font-size: 25rpx; 61 | text-decoration:line-through; 62 | color:#B2B2B2; 63 | } -------------------------------------------------------------------------------- /miniprogram/pages/Mine/mine_main/mine_main.wxss: -------------------------------------------------------------------------------- 1 | /* pages/mine_main/mine_main.wxss */ 2 | 3 | 4 | .title{ 5 | margin-top: 35rpx; 6 | display: flex; 7 | flex-direction: row; 8 | padding: 16rpx 0 18rpx 26rpx; 9 | margin-bottom: 30rpx; 10 | border-bottom: 1rpx solid #abb4bf; 11 | background: #F4F6F9; 12 | } 13 | 14 | .title .bindViewTap{width: 94rpx;height: 94rpx;border-radius: 8rpx;margin-right: 24rpx;} 15 | .title .userinfo-nickname{line-height: 50rpx;display: block; } 16 | 17 | 18 | .mine_top { 19 | display:flex; 20 | width: 100%; 21 | height: 230rpx; 22 | background:#ffffff; 23 | justify-content: left; 24 | align-items: left; 25 | 26 | }s 27 | 28 | .mine_index{ 29 | display:flex; 30 | flex-direction:column; 31 | width:300rpx; 32 | justify-content: center; 33 | align-items: center; 34 | } 35 | 36 | 37 | .mine_top button{ 38 | color: #d5dffc; 39 | 40 | } 41 | /*头像容器*/ 42 | .mine_avatar_bd{ 43 | 44 | padding:39rpx 10rpx; 45 | width:180rpx; 46 | height:200rpx; 47 | 48 | } 49 | .mine_avatar{ 50 | width:500rpx; 51 | height:500rpx; 52 | border-radius: 50%; 53 | 54 | 55 | } 56 | .mine_nickName{ 57 | /* flex:1; */ 58 | color:rgb(0, 0, 0); 59 | font-size:16px; 60 | padding:90rpx 23rpx; 61 | } 62 | .mine_login{ 63 | flex:1; 64 | color:#fff; 65 | font-size:16px; 66 | } 67 | 68 | .cu-avatar.xl { 69 | width: 150rpx; 70 | height: 150rpx; 71 | font-size: 2.5em; 72 | } 73 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/search/search.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | // miniprogram/pages/Index/search/search.js 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | //搜索关键词 12 | keyword: "", 13 | //闲置数据库 14 | database: "post", 15 | //数据库数据 16 | feed: [], 17 | //下拉更新数据库数据个数 18 | nextPage: 0, 19 | //我的页面 20 | searchPage: true, 21 | }, 22 | 23 | /** 24 | * 生命周期函数--监听页面加载 25 | */ 26 | onLoad: function (options) { 27 | 28 | }, 29 | 30 | // 记录搜索关键词 31 | inputKeyword: function (e) { 32 | var data = e.detail.value; 33 | this.setData({ 34 | keyword: data, 35 | }) 36 | }, 37 | 38 | //通过关键词搜索闲置商品 39 | searchByKeyword: function() { 40 | this.setData({ 41 | feed: [], 42 | nextPage: 0, 43 | }) 44 | if (this.data.keyword == '') { 45 | this.setData({ 46 | keyword: '.', 47 | }) 48 | } 49 | var that = this 50 | util.searchLoad(that) 51 | }, 52 | 53 | // 拖到最下面更新数据 54 | lower: function (e) { 55 | wx.showNavigationBarLoading(); 56 | var that = this; 57 | util.searchLoad(that); 58 | console.log("lower"); 59 | }, 60 | 61 | //跳转到点击页面 62 | jumpToPost: function (e) { 63 | var id = e.currentTarget.id 64 | console.log(e.currentTarget.id) 65 | console.log(this.data.feed[id]) 66 | 67 | var post_data = JSON.stringify(this.data.feed[id]) 68 | 69 | wx.navigateTo({ 70 | // url: '../posttest/posttest?post_data=' + post_data 71 | url: '../contact/contact?post_data=' + post_data 72 | }) 73 | }, 74 | 75 | }) -------------------------------------------------------------------------------- /miniprogram/app.js: -------------------------------------------------------------------------------- 1 | App({ 2 | onLaunch: function () { 3 | 4 | if (!wx.cloud) { 5 | console.error('请使用 2.2.3 或以上的基础库以使用云能力') 6 | } else { 7 | wx.cloud.init({ 8 | traceUser: true, 9 | }) 10 | } 11 | 12 | wx.getSystemInfo({ 13 | success: e => { 14 | this.globalData.StatusBar = e.statusBarHeight; 15 | let custom = wx.getMenuButtonBoundingClientRect(); 16 | this.globalData.Custom = custom; 17 | this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight; 18 | } 19 | }) 20 | }, 21 | globalData: { 22 |    swiperList: [{ 23 |       id: 0, 24 |       type: 'image', 25 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/1.jpg' 26 |     }, { 27 |       id: 1, 28 |       type: 'image', 29 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/2.jpg', 30 |     }, { 31 |       id: 2, 32 |       type: 'image', 33 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/3.jpg' 34 |     }, { 35 |       id: 3, 36 |       type: 'image', 37 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/4.jpg' 38 |     }, { 39 |       id: 4, 40 |       type: 'image', 41 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/5.jpg' 42 |     }, { 43 |       id: 5, 44 |       type: 'image', 45 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/6.jpg' 46 |     }, { 47 |       id: 6, 48 |       type: 'image', 49 |       url: 'cloud://yf-ab2989.7966-yf-ab2989-1258230310/head_imgs/7.jpg' 50 |     }], 51 | } 52 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Admin/secondHand/secondHand.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{item.title}} 8 | 9 | 10 | ¥{{item.price}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {{item.content}} 23 | 24 | 25 | 26 | 27 | 删除 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /miniprogram/app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | @import "colorui/main.wxss"; 3 | @import "colorui/icon.wxss"; 4 | 5 | 6 | page { 7 | background-color:#f6f6f6; 8 | } 9 | .container { 10 | height: 100%; 11 | /* height: 1500rpx; */ 12 | display: flex; 13 | flex-direction: column; 14 | align-items: center; 15 | justify-content: space-between; 16 | padding: 10rpx 0; 17 | box-sizing: border-box; 18 | } 19 | 20 | 21 | .container .feed-item{ 22 | width: 690rpx; 23 | padding: 30rpx 30rpx 20rpx ; 24 | margin: 7rpx 0 6rpx 0; 25 | background: #ffffff; 26 | border-top: 1px solid #eee; 27 | border-bottom: 1px solid #eee; 28 | box-shadow: 0 2px 5px #eeeeee; 29 | } 30 | 31 | .container .feed-item .feed-content{ 32 | padding: 10rpx 40rpx 0 0; 33 | } 34 | .container .feed-item .feed-content .item-title { 35 | display: inline-block; 36 | font-size: 40rpx; 37 | font-weight: 600rpx; 38 | line-height: 40rpx; 39 | } 40 | 41 | .container .feed-item .feed-content .item-price { 42 | display: inline-block; 43 | width: 40rpx; 44 | height: 45rpx; 45 | float: right; 46 | color: red; 47 | } 48 | 49 | .container .feed-item .feed-content .item-img { 50 | display: flex; 51 | width: 180rpx; 52 | height: 180rpx; 53 | } 54 | 55 | .container .feed-item .feed-content .item-img image{ 56 | display: inline-block; 57 | padding-right: 10rpx; 58 | width: 180rpx; 59 | height: 180rpx; 60 | } 61 | 62 | 63 | .container .feed-item .feed-content .item-content text{ 64 | display: block; 65 | padding: 10rpx 10rpx 0 10rpx; 66 | /*height: 10rpx;*/ 67 | font-size: 30rpx; 68 | line-height: 40rpx; 69 | color: #5b5b5b; 70 | word-wrap:break-word; 71 | overflow:hidden; 72 | white-space: nowrap; 73 | text-overflow:ellipsis; 74 | } -------------------------------------------------------------------------------- /miniprogram/colorui/components/cu-custom.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 66 | 67 | 70 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/coupon/coupon.js: -------------------------------------------------------------------------------- 1 | // pages/Index/coupon/coupon.js 2 | var util = require('../../../utils/util.js') 3 | const app = getApp() 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | //窗口宽度 11 | windowWidth: 0, 12 | // 优惠券列表 13 | feed: [], 14 | // 页数 15 | nextPage: 0, 16 | 17 | }, 18 | 19 | /** 20 | * 生命周期函数--监听页面加载 21 | */ 22 | onLoad: function (options) { 23 | this.setData({ 24 | windowWidth: wx.getSystemInfoSync().windowWidth, 25 | }) 26 | 27 | this.allLoad() 28 | 29 | }, 30 | 31 | 32 | // 跳转到公众号文章 33 | jumpToPublic:function(e){ 34 | var id = e.currentTarget.id 35 | // console.log(id) 36 | 37 | // 判断用户的注册类型 38 | util.isRegistered() 39 | 40 | 41 | }, 42 | 43 | 44 | 45 | 46 | // 读取数据库中所有优惠券信息 47 | allLoad: function () { 48 | var that = this; 49 | const db = wx.cloud.database() 50 | db.collection('coupon') 51 | .orderBy('date', 'desc') 52 | .skip(that.data.nextPage) 53 | .get({ 54 | //成功读取写入数据 55 | success: res => { 56 | that.setData({ 57 | feed: this.data.feed.concat(res.data), 58 | nextPage: this.data.nextPage + 10 59 | }) 60 | console.log('[数据库] [查询记录] 成功: ', that.data.feed) 61 | }, 62 | fail: err => { 63 | wx.showToast({ 64 | icon: 'none', 65 | title: '查询记录失败' 66 | }) 67 | console.error('[数据库] [查询记录] 失败:', err) 68 | } 69 | }); 70 | console.log(this.data.feed) 71 | 72 | 73 | }, 74 | 75 | showCooperationPhoto: function () { 76 | var images = ["cloud://yf-ab2989.7966-yf-ab2989-1258230310/没有实物图.png"] 77 | wx.previewImage({ 78 | current: images[0], //当前预览的图片 79 | urls: images, //所有要预览的图片 80 | }) 81 | 82 | 83 | } 84 | }) -------------------------------------------------------------------------------- /miniprogram/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/Index/index_main/index_main", 4 | "pages/Index/goods/goods", 5 | "pages/Index/contact/contact", 6 | "pages/Index/contact_express/contact_express", 7 | "pages/Index/contact_recourse/contact_recourse", 8 | "pages/Index/coupon/coupon", 9 | "pages/News/myGoods/myGoods", 10 | "pages/News/myDiscover/myDiscover", 11 | "pages/News/myExpress/myExpress", 12 | "pages/Mine/mine_main/mine_main", 13 | "pages/Mine/registered/registered", 14 | "pages/Post/uploadGoods/uploadGoods", 15 | "pages/Post/uploadExpress/uploadExpress", 16 | "pages/Post/uploadDiscover/uploadDiscover", 17 | "pages/Admin/admin_main/admin_main", 18 | "pages/Admin/secondHand/secondHand", 19 | "pages/Admin/user/user", 20 | "pages/Admin/agreement/agreement", 21 | "pages/Mine/userInfo/userInfo", 22 | "pages/Index/search/search" 23 | ], 24 | "window": { 25 | "backgroundTextStyle": "light", 26 | "navigationBarBackgroundColor": "#fff", 27 | "navigationBarTitleText": "佛大叮当", 28 | "navigationBarTextStyle": "black" 29 | }, 30 | "usingComponents": { 31 | "cu-custom": "/colorui/components/cu-custom" 32 | }, 33 | "tabBar": { 34 | "color": "#666666", 35 | "selectedColor": "#0e80d1", 36 | "borderStyle": "white", 37 | "backgroundColor": "#f6f8f9", 38 | "position": "bottom", 39 | "list": [ 40 | { 41 | "pagePath": "pages/Index/index_main/index_main", 42 | "text": "主页", 43 | "iconPath": "images/tabbar/home.png", 44 | "selectedIconPath": "images/tabbar/home_selected.png" 45 | }, 46 | { 47 | "pagePath": "pages/Mine/mine_main/mine_main", 48 | "text": "我的", 49 | "iconPath": "images/tabbar/me.png", 50 | "selectedIconPath": "images/tabbar/me_selected.png" 51 | } 52 | ] 53 | }, 54 | "sitemapLocation": "sitemap.json" 55 | } -------------------------------------------------------------------------------- /miniprogram/pages/Admin/user/user.wxml: -------------------------------------------------------------------------------- 1 | 2 | 暂时没有注册的人,不过等一下应该就会有的,自信点 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 用户名:{{item.nick_name}}\n 13 | 真实姓名:{{item.real_name}}\n 14 | 微信号:{{item.wechat_id}}\n 15 | 电话号码:{{item.phone}}\n 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 通过 28 | 不通过 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "miniprogramRoot": "miniprogram/", 3 | "cloudfunctionRoot": "cloudfunctions/", 4 | "setting": { 5 | "urlCheck": true, 6 | "es6": false, 7 | "enhance": false, 8 | "postcss": true, 9 | "preloadBackgroundData": false, 10 | "minified": true, 11 | "newFeature": true, 12 | "coverView": true, 13 | "nodeModules": false, 14 | "autoAudits": false, 15 | "showShadowRootInWxmlPanel": true, 16 | "scopeDataCheck": false, 17 | "uglifyFileName": false, 18 | "checkInvalidKey": true, 19 | "checkSiteMap": true, 20 | "uploadWithSourceMap": true, 21 | "compileHotReLoad": false, 22 | "useMultiFrameRuntime": false, 23 | "useApiHook": true, 24 | "babelSetting": { 25 | "ignore": [], 26 | "disablePlugins": [], 27 | "outputPath": "" 28 | }, 29 | "useIsolateContext": true, 30 | "useCompilerModule": true, 31 | "userConfirmedUseCompilerModuleSwitch": false, 32 | "packNpmManually": false, 33 | "packNpmRelationList": [] 34 | }, 35 | "libVersion": "2.10.1", 36 | "simulatorType": "wechat", 37 | "simulatorPluginLibVersion": {}, 38 | "cloudfunctionTemplateRoot": "cloudfunctionTemplate", 39 | "scripts": { 40 | "beforeCompile": "", 41 | "beforePreview": "", 42 | "beforeUpload": "" 43 | }, 44 | "appid": "wx779446ec481e3593", 45 | "projectname": "%E4%BD%9B%E5%A4%A7%E5%8F%AE%E5%BD%93%E6%B5%8B%E8%AF%95", 46 | "condition": { 47 | "search": { 48 | "current": -1, 49 | "list": [] 50 | }, 51 | "conversation": { 52 | "current": -1, 53 | "list": [] 54 | }, 55 | "plugin": { 56 | "current": -1, 57 | "list": [] 58 | }, 59 | "game": { 60 | "list": [] 61 | }, 62 | "miniprogram": { 63 | "current": 0, 64 | "list": [ 65 | { 66 | "id": -1, 67 | "name": "db guide", 68 | "pathName": "pages/databaseGuide/databaseGuide" 69 | } 70 | ] 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/goods/goods.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{item}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 20 | 21 | 22 | 25 | 26 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /miniprogram/style/guide.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | background: #f6f6f6; 3 | display: flex; 4 | flex-direction: column; 5 | justify-content: flex-start; 6 | } 7 | 8 | .list { 9 | margin-top: 40rpx; 10 | height: auto; 11 | width: 100%; 12 | background: #fff; 13 | padding: 0 40rpx; 14 | border: 1px solid rgba(0, 0, 0, 0.1); 15 | border-left: none; 16 | border-right: none; 17 | transition: all 300ms ease; 18 | display: flex; 19 | flex-direction: column; 20 | align-items: stretch; 21 | box-sizing: border-box; 22 | } 23 | 24 | .list-item { 25 | width: 100%; 26 | padding: 0; 27 | line-height: 104rpx; 28 | font-size: 34rpx; 29 | color: #007aff; 30 | border-top: 1px solid rgba(0, 0, 0, 0.1); 31 | display: flex; 32 | flex-direction: row; 33 | align-content: center; 34 | justify-content: space-between; 35 | box-sizing: border-box; 36 | } 37 | 38 | .list-item:first-child { 39 | border-top: none; 40 | } 41 | 42 | .list-item image { 43 | max-width: 100%; 44 | max-height: 20vh; 45 | margin: 20rpx 0; 46 | } 47 | 48 | .request-text { 49 | color: #222; 50 | padding: 20rpx 0; 51 | font-size: 24rpx; 52 | line-height: 36rpx; 53 | word-break: break-all; 54 | } 55 | 56 | .guide { 57 | width: 100%; 58 | padding: 40rpx; 59 | box-sizing: border-box; 60 | display: flex; 61 | flex-direction: column; 62 | } 63 | 64 | .guide .headline { 65 | font-size: 34rpx; 66 | font-weight: bold; 67 | color: #555; 68 | line-height: 40rpx; 69 | } 70 | 71 | .guide .p { 72 | margin-top: 20rpx; 73 | font-size: 28rpx; 74 | line-height: 36rpx; 75 | color: #666; 76 | } 77 | 78 | .guide .code { 79 | margin-top: 20rpx; 80 | font-size: 28rpx; 81 | line-height: 36rpx; 82 | color: #666; 83 | background: white; 84 | white-space: pre; 85 | } 86 | 87 | .guide .code-dark { 88 | margin-top: 20rpx; 89 | background: rgba(0, 0, 0, 0.8); 90 | padding: 20rpx; 91 | font-size: 28rpx; 92 | line-height: 36rpx; 93 | border-radius: 6rpx; 94 | color: #fff; 95 | white-space: pre 96 | } 97 | 98 | .guide image { 99 | max-width: 100%; 100 | } 101 | 102 | .guide .image1 { 103 | margin-top: 20rpx; 104 | max-width: 100%; 105 | width: 356px; 106 | height: 47px; 107 | } 108 | 109 | .guide .image2 { 110 | margin-top: 20rpx; 111 | width: 264px; 112 | height: 100px; 113 | } 114 | 115 | .guide .flat-image { 116 | height: 100px; 117 | } 118 | 119 | .guide .code-image { 120 | max-width: 100%; 121 | } 122 | 123 | .guide .copyBtn { 124 | width: 180rpx; 125 | font-size: 20rpx; 126 | margin-top: 16rpx; 127 | margin-left: 0; 128 | } 129 | 130 | .guide .nav { 131 | margin-top: 50rpx; 132 | display: flex; 133 | flex-direction: row; 134 | align-content: space-between; 135 | } 136 | 137 | .guide .nav .prev { 138 | margin-left: unset; 139 | } 140 | 141 | .guide .nav .next { 142 | margin-right: unset; 143 | } 144 | 145 | -------------------------------------------------------------------------------- /miniprogram/pages/Mine/mine_main/mine_main.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{userData.nick_name}} 13 | 14 | 15 | 16 | 17 | 登录/注册 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 个人信息 27 | 28 | 29 | 30 | 31 | 32 | 我的闲置 33 | 34 | 35 | 36 | 37 | 38 | 我的快递 39 | 40 | 41 | 42 | 43 | 44 | 我的发现 45 | 46 | 47 | 48 | 49 | 50 | 打赏支持 51 | 52 | 53 | 54 | 58 | 59 | 60 | 61 | 62 | 联系客服 63 | 64 | 65 | 66 | 67 | 68 | 后台管理 69 | 70 | 71 | -------------------------------------------------------------------------------- /miniprogram/pages/Admin/admin_main/admin_main.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 帖子管理 6 | 7 | 8 | 9 | 10 | 11 | 用户验证 12 | 13 | 14 | {{userNum}} 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 26 |
27 |
28 | 29 | 30 |
31 | 35 |
36 |
37 | 38 | 39 |
40 | 44 |
45 |
46 | 47 | 48 |
49 | 53 |
54 |
55 | 56 | 57 | 58 | 59 |
60 | 64 |
65 |
66 | 67 | 68 | 69 |
70 | 74 |
75 |
76 | 77 | 78 | 79 | 80 | 84 | 85 |
86 | 87 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact/contact.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{user_data.nick_name}} 8 | 9 | 10 | 13 | 14 | 20 | 21 | 27 | 32 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 联系方式 52 | 53 | 54 | 55 | 56 | 57 | 58 | 62 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /miniprogram/pages/Mine/mine_main/mine_main.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | Page({ 5 | data: { 6 | // 判断是否为管理员 7 | admin: false, 8 | userData:[], 9 | //头像列表 10 | swiperList: [], 11 | openid:"", 12 | }, 13 | 14 | onLoad: function () { 15 | // this.uploadUser() 16 | // 判断是否显示管理员页面 17 | this.showAdmin(); 18 | // 初始化用户数据 19 | this.setData({ 20 | swiperList: app.globalData.swiperList, 21 | userData:app.globalData.userCloudData 22 | }) 23 | 24 | 25 | }, 26 | 27 | 28 | 29 | 30 | 31 | 32 | onShow: function (options) { 33 | // this.uploadUser() 34 | // 判断是否显示管理员页面 35 | this.showAdmin(); 36 | 37 | this.setData({ 38 | swiperList: app.globalData.swiperList, 39 | userData: app.globalData.userCloudData 40 | }) 41 | 42 | //获取用户的openid并设置为全局变量 43 | this.login(); 44 | 45 | }, 46 | 47 | 48 | 49 | // 登录操作(从云上获取用户信息) 50 | login: function(){ 51 | //获取用户的openid并设置为全局变量 52 | wx.cloud.callFunction({ 53 | name: 'login', 54 | complete: res => { 55 | console.log('callFunction test result: ', res) 56 | this.setData({ 57 | openid: res.result.openid 58 | }) 59 | util.getUserInCloud(this.data.openid); 60 | } 61 | }) 62 | }, 63 | 64 | 65 | 66 | // 判断是否显示管理员入口 67 | showAdmin:function(){ 68 | // 判断全局变量中用户的数据 69 | if(app.globalData.userCloudData.admin){ 70 | this.setData({ 71 | admin:true 72 | }) 73 | } 74 | }, 75 | 76 | 77 | // 跳转我的页面 78 | showMyGoods:function(e){ 79 | console.log(e.currentTarget.id) 80 | if(e.currentTarget.id=="2"){ 81 | wx.navigateTo({ 82 | // url:"../../News/myGoods/myGoods?tab_id=" +e.currentTarget.id 83 | url:"../../News/myDiscover/myDiscover?tab_id=" +e.currentTarget.id 84 | }) 85 | }else if(e.currentTarget.id=="1"){ 86 | wx.navigateTo({ 87 | // url:"../../News/myGoods/myGoods?tab_id=" +e.currentTarget.id 88 | url:"../../News/myExpress/myExpress?tab_id=" +e.currentTarget.id 89 | }) 90 | }else if(e.currentTarget.id=="0"){ 91 | wx.navigateTo({ 92 | // url:"../../News/myGoods/myGoods?tab_id=" +e.currentTarget.id 93 | url:"../../News/myGoods/myGoods?tab_id=" +e.currentTarget.id 94 | }) 95 | } 96 | }, 97 | 98 | 99 | // 跳转管理员页面 100 | administrator:function(){ 101 | wx.navigateTo({ 102 | url:"../../Admin/admin_main/admin_main" 103 | }) 104 | 105 | }, 106 | 107 | //检查用户是否已经注册(决定点击跳转到的页面) 108 | checkUser:function(){ 109 | console.log(this.data.userData) 110 | if (app.globalData.userCloudData.approve==="0") { 111 | wx.navigateTo({ 112 | url:"../registered/registered" 113 | }) 114 | }else { 115 | wx.navigateTo({ 116 | url: "../userInfo/userInfo" 117 | }) 118 | } 119 | }, 120 | 121 | 122 | 123 | //联系客服 124 | getCustomer:function() { 125 | 126 | var images = ["cloud://yf-ab2989.7966-yf-ab2989-1258230310/联系客服图.jpg"] 127 | wx.previewImage({ 128 | current: "cloud://yf-ab2989.7966-yf-ab2989-1258230310/联系客服图.jpg", //当前预览的图片 129 | urls: images, //所有要预览的图片 130 | }) 131 | } 132 | }) 133 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_recourse/contact_recourse.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 微信号:{{user_data.wechat_id}} 5 | 手机电话: {{user_data.phone}} 6 | 7 | 8 | 9 | 微信号:{{accepter_wechat_id}} 10 | 手机电话: {{accepter_phone}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{user_data.nick_name}} 21 | 22 | 23 | 26 | 27 | 33 | 34 | 39 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 是否确定接单 56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/index_main/index_main.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 闲置 24 | 25 | 26 | 27 | 快递 28 | 29 | 30 | 31 | 求助 32 | 33 | 34 | 35 | 36 | 37 | 寻物 38 | 39 | 40 | 41 | 找队友 42 | 43 | 44 | 45 | 优惠券 46 | 47 | 48 | 49 | 50 | 51 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 发布闲置 63 | 64 | 65 | 66 | 发布快递 67 | 68 | 69 | 70 | 发布任务 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadGoods/uploadGoods.wxss: -------------------------------------------------------------------------------- 1 | .tips { 2 | background-color: rgb(157, 217, 245); 3 | text-align: center; 4 | } 5 | .tips_text{ 6 | color: rgb(255, 255, 255); 7 | } 8 | .sell_cells { 9 | margin: 30rpx 0; 10 | padding: 0 30rpx; 11 | background-color: #fff; 12 | } 13 | 14 | .sell_cell { 15 | display: flex; 16 | padding: 20rpx 0; 17 | align-items: center; 18 | } 19 | 20 | .sell_title { 21 | width: 80px; 22 | font-size: 15px; 23 | font-weight: bold; 24 | } 25 | 26 | .placeholder{ 27 | font-size: 15px; 28 | color: #b2b2b2; 29 | } 30 | 31 | 32 | .sell_input { 33 | flex: 1; 34 | font-size:15px; 35 | } 36 | 37 | .sell_select { 38 | font-size: 16px; 39 | color: #b2b2b2; 40 | } 41 | 42 | /*伪元素实现右箭头*/ 43 | .sell_select:after{ 44 | content: " "; 45 | display: inline-block; 46 | height:6px; 47 | width:6px; 48 | border-top:2px solid #768df3; 49 | border-right: 2px solid #768df3; 50 | transform: rotate(45deg); 51 | margin-left: 5rpx; 52 | } 53 | 54 | .sell_text{ 55 | color: #b2b2b2; 56 | } 57 | 58 | .sell_hint_text { 59 | color: #FF4F64; 60 | } 61 | 62 | .sell_btn{ 63 | width: 90%; 64 | margin-top: 50rpx; 65 | margin-bottom: 50rpx; 66 | background-color:cornflowerblue; 67 | color: white; 68 | border-radius: 98rpx; 69 | display: flex; 70 | flex-direction: row; 71 | align-items: center; 72 | justify-content: center; 73 | } 74 | 75 | .sell-cell_uploader{ 76 | display:inline-block; 77 | padding:5rpx 0 10rpx 0; 78 | } 79 | 80 | .sell_uploader_imgbox{ 81 | float:left; 82 | position:relative; 83 | margin-right: 10rpx; 84 | margin-bottom: 10rpx; 85 | } 86 | 87 | .sell_uploader_img, .sell_uploader_img_cover { 88 | width: 150rpx; 89 | height: 150rpx; 90 | 91 | } 92 | 93 | /*伪元素实现封面图片设置蒙层*/ 94 | .sell_uploader_img_cover::before{ 95 | position:absolute; 96 | top:70%; 97 | right:0; 98 | bottom:5.8%; 99 | left:0; 100 | font-size:13px; 101 | color: #fff; 102 | text-align: center; 103 | background-color:rgba(0,0,0,0.4); 104 | } 105 | 106 | /*右上角删除按钮*/ 107 | .sell_uploader_img_del{ 108 | position:absolute; 109 | z-index: 1; 110 | width:13px; 111 | height:13px; 112 | transform: translate(-100%,0); 113 | } 114 | 115 | .sell_uploader_box{ 116 | float:left; 117 | position:relative; 118 | margin-right: 10rpx; 119 | margin-bottom: 10rpx; 120 | width: 150rpx; 121 | height: 150rpx; 122 | background-color:#f8f8f8; 123 | } 124 | 125 | /*伪元素实现上传图片的加号*/ 126 | .sell_uploader_box:before, .sell_uploader_box:after{ 127 | content:" "; 128 | position:absolute; 129 | top:50%; 130 | left:50%; 131 | transform:translate(-50%,-50%); 132 | background-color: #d5dffc; 133 | } 134 | .sell_uploader_box:before{ 135 | width:2px; 136 | height:75rpx; 137 | } 138 | .sell_uploader_box:after{ 139 | width:75rpx; 140 | height:2px; 141 | } 142 | /**/ 143 | 144 | .sell_uploader_input { 145 | position: absolute; 146 | z-index: 1; 147 | top: 0; 148 | left: 0; 149 | width: 100%; 150 | height: 100%; 151 | opacity: 0; 152 | } 153 | 154 | 155 | 156 | /* 图片 */ 157 | .goodsImage{ 158 | display: flex; 159 | flex-direction: row; 160 | flex-wrap: wrap; 161 | justify-content: left 162 | 163 | } 164 | 165 | .goodsImage .q-image-wrap .q-image{ 166 | width: 150rpx; 167 | height: 150rpx; 168 | padding: 20rpx 20rpx; 169 | 170 | } 171 | 172 | 173 | -------------------------------------------------------------------------------- /miniprogram/pages/Mine/userInfo/userInfo.wxml: -------------------------------------------------------------------------------- 1 |
2 | 3 | 验证状态 4 | {{al_approve?(approve?'通过':'未通过'):'待检验'}} 5 | 6 | 7 | 8 | 头像 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 昵称 20 | 21 | 22 | 23 | 校区 24 | 25 | 26 | {{region_index!=null?choose[region_index]:'请选择您所在的校区'}} 27 | 28 | 29 | 30 | 31 | 手机号码 32 | 33 | 34 | 35 | +86 36 | 37 | 38 | 中国大陆 39 | 40 | 41 | 42 | 47 | 48 | 微信号 49 | 50 | 51 | 52 | 53 | 校园卡认证 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 提示 76 | 77 | 78 | 79 | 80 | 81 | {{warning}} 82 | 83 | 84 | 85 |
-------------------------------------------------------------------------------- /miniprogram/colorui/animation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Animation 微动画 3 | 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28 4 | */ 5 | 6 | /* css 滤镜 控制黑白底色gif的 */ 7 | .gif-black{ 8 | mix-blend-mode: screen; 9 | } 10 | .gif-white{ 11 | mix-blend-mode: multiply; 12 | } 13 | 14 | 15 | /* Animation css */ 16 | [class*=animation-] { 17 | animation-duration: .5s; 18 | animation-timing-function: ease-out; 19 | animation-fill-mode: both 20 | } 21 | 22 | .animation-fade { 23 | animation-name: fade; 24 | animation-duration: .8s; 25 | animation-timing-function: linear 26 | } 27 | 28 | .animation-scale-up { 29 | animation-name: scale-up 30 | } 31 | 32 | .animation-scale-down { 33 | animation-name: scale-down 34 | } 35 | 36 | .animation-slide-top { 37 | animation-name: slide-top 38 | } 39 | 40 | .animation-slide-bottom { 41 | animation-name: slide-bottom 42 | } 43 | 44 | .animation-slide-left { 45 | animation-name: slide-left 46 | } 47 | 48 | .animation-slide-right { 49 | animation-name: slide-right 50 | } 51 | 52 | .animation-shake { 53 | animation-name: shake 54 | } 55 | 56 | .animation-reverse { 57 | animation-direction: reverse 58 | } 59 | 60 | @keyframes fade { 61 | 0% { 62 | opacity: 0 63 | } 64 | 65 | 100% { 66 | opacity: 1 67 | } 68 | } 69 | 70 | @keyframes scale-up { 71 | 0% { 72 | opacity: 0; 73 | transform: scale(.2) 74 | } 75 | 76 | 100% { 77 | opacity: 1; 78 | transform: scale(1) 79 | } 80 | } 81 | 82 | @keyframes scale-down { 83 | 0% { 84 | opacity: 0; 85 | transform: scale(1.8) 86 | } 87 | 88 | 100% { 89 | opacity: 1; 90 | transform: scale(1) 91 | } 92 | } 93 | 94 | @keyframes slide-top { 95 | 0% { 96 | opacity: 0; 97 | transform: translateY(-100%) 98 | } 99 | 100 | 100% { 101 | opacity: 1; 102 | transform: translateY(0) 103 | } 104 | } 105 | 106 | @keyframes slide-bottom { 107 | 0% { 108 | opacity: 0; 109 | transform: translateY(100%) 110 | } 111 | 112 | 100% { 113 | opacity: 1; 114 | transform: translateY(0) 115 | } 116 | } 117 | 118 | @keyframes shake { 119 | 120 | 0%, 121 | 100% { 122 | transform: translateX(0) 123 | } 124 | 125 | 10% { 126 | transform: translateX(-9px) 127 | } 128 | 129 | 20% { 130 | transform: translateX(8px) 131 | } 132 | 133 | 30% { 134 | transform: translateX(-7px) 135 | } 136 | 137 | 40% { 138 | transform: translateX(6px) 139 | } 140 | 141 | 50% { 142 | transform: translateX(-5px) 143 | } 144 | 145 | 60% { 146 | transform: translateX(4px) 147 | } 148 | 149 | 70% { 150 | transform: translateX(-3px) 151 | } 152 | 153 | 80% { 154 | transform: translateX(2px) 155 | } 156 | 157 | 90% { 158 | transform: translateX(-1px) 159 | } 160 | } 161 | 162 | @keyframes slide-left { 163 | 0% { 164 | opacity: 0; 165 | transform: translateX(-100%) 166 | } 167 | 168 | 100% { 169 | opacity: 1; 170 | transform: translateX(0) 171 | } 172 | } 173 | 174 | @keyframes slide-right { 175 | 0% { 176 | opacity: 0; 177 | transform: translateX(100%) 178 | } 179 | 180 | 100% { 181 | opacity: 1; 182 | transform: translateX(0) 183 | } 184 | } -------------------------------------------------------------------------------- /miniprogram/colorui/animation.wxss: -------------------------------------------------------------------------------- 1 | /* 2 | Animation 微动画 3 | 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28 4 | */ 5 | 6 | /* css 滤镜 控制黑白底色gif的 */ 7 | .gif-black{ 8 | mix-blend-mode: screen; 9 | } 10 | .gif-white{ 11 | mix-blend-mode: multiply; 12 | } 13 | 14 | 15 | /* Animation css */ 16 | [class*=animation-] { 17 | animation-duration: .5s; 18 | animation-timing-function: ease-out; 19 | animation-fill-mode: both 20 | } 21 | 22 | .animation-fade { 23 | animation-name: fade; 24 | animation-duration: .8s; 25 | animation-timing-function: linear 26 | } 27 | 28 | .animation-scale-up { 29 | animation-name: scale-up 30 | } 31 | 32 | .animation-scale-down { 33 | animation-name: scale-down 34 | } 35 | 36 | .animation-slide-top { 37 | animation-name: slide-top 38 | } 39 | 40 | .animation-slide-bottom { 41 | animation-name: slide-bottom 42 | } 43 | 44 | .animation-slide-left { 45 | animation-name: slide-left 46 | } 47 | 48 | .animation-slide-right { 49 | animation-name: slide-right 50 | } 51 | 52 | .animation-shake { 53 | animation-name: shake 54 | } 55 | 56 | .animation-reverse { 57 | animation-direction: reverse 58 | } 59 | 60 | @keyframes fade { 61 | 0% { 62 | opacity: 0 63 | } 64 | 65 | 100% { 66 | opacity: 1 67 | } 68 | } 69 | 70 | @keyframes scale-up { 71 | 0% { 72 | opacity: 0; 73 | transform: scale(.2) 74 | } 75 | 76 | 100% { 77 | opacity: 1; 78 | transform: scale(1) 79 | } 80 | } 81 | 82 | @keyframes scale-down { 83 | 0% { 84 | opacity: 0; 85 | transform: scale(1.8) 86 | } 87 | 88 | 100% { 89 | opacity: 1; 90 | transform: scale(1) 91 | } 92 | } 93 | 94 | @keyframes slide-top { 95 | 0% { 96 | opacity: 0; 97 | transform: translateY(-100%) 98 | } 99 | 100 | 100% { 101 | opacity: 1; 102 | transform: translateY(0) 103 | } 104 | } 105 | 106 | @keyframes slide-bottom { 107 | 0% { 108 | opacity: 0; 109 | transform: translateY(100%) 110 | } 111 | 112 | 100% { 113 | opacity: 1; 114 | transform: translateY(0) 115 | } 116 | } 117 | 118 | @keyframes shake { 119 | 120 | 0%, 121 | 100% { 122 | transform: translateX(0) 123 | } 124 | 125 | 10% { 126 | transform: translateX(-9px) 127 | } 128 | 129 | 20% { 130 | transform: translateX(8px) 131 | } 132 | 133 | 30% { 134 | transform: translateX(-7px) 135 | } 136 | 137 | 40% { 138 | transform: translateX(6px) 139 | } 140 | 141 | 50% { 142 | transform: translateX(-5px) 143 | } 144 | 145 | 60% { 146 | transform: translateX(4px) 147 | } 148 | 149 | 70% { 150 | transform: translateX(-3px) 151 | } 152 | 153 | 80% { 154 | transform: translateX(2px) 155 | } 156 | 157 | 90% { 158 | transform: translateX(-1px) 159 | } 160 | } 161 | 162 | @keyframes slide-left { 163 | 0% { 164 | opacity: 0; 165 | transform: translateX(-100%) 166 | } 167 | 168 | 100% { 169 | opacity: 1; 170 | transform: translateX(0) 171 | } 172 | } 173 | 174 | @keyframes slide-right { 175 | 0% { 176 | opacity: 0; 177 | transform: translateX(100%) 178 | } 179 | 180 | 100% { 181 | opacity: 1; 182 | transform: translateX(0) 183 | } 184 | } -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadExpress/uploadExpress.wxss: -------------------------------------------------------------------------------- 1 | .tips { 2 | background-color: rgb(157, 217, 245); 3 | text-align: center; 4 | } 5 | .tips_text{ 6 | color: rgb(255, 255, 255); 7 | } 8 | .sell_cells { 9 | margin: 30rpx 15rpx; 10 | border-radius: 5%; 11 | padding: 0 30rpx; 12 | background-color: #fff; 13 | } 14 | 15 | .sell_cell { 16 | display: flex; 17 | padding: 20rpx 0; 18 | align-items: center; 19 | } 20 | 21 | .sell_title { 22 | width: 120px; 23 | font-size: 15px; 24 | font-weight: bold; 25 | } 26 | 27 | .placeholder{ 28 | font-size: 15px; 29 | color: #b2b2b2; 30 | } 31 | 32 | 33 | .sell_input { 34 | flex: 1; 35 | font-size:15px; 36 | } 37 | 38 | .sell_select { 39 | font-size: 16px; 40 | color: #b2b2b2; 41 | } 42 | 43 | /*伪元素实现右箭头*/ 44 | .sell_select:after{ 45 | content: " "; 46 | display: inline-block; 47 | height:6px; 48 | width:6px; 49 | border-top:2px solid #768df3; 50 | border-right: 2px solid #768df3; 51 | transform: rotate(45deg); 52 | margin-left: 5rpx; 53 | } 54 | 55 | .sell_text{ 56 | color: #b2b2b2; 57 | } 58 | 59 | .sell_hint_text { 60 | color: #FF4F64; 61 | } 62 | 63 | .sell_btn{ 64 | width: 90%; 65 | margin-top: 50rpx; 66 | margin-bottom: 50rpx; 67 | background-color:cornflowerblue; 68 | color: white; 69 | border-radius: 98rpx; 70 | display: flex; 71 | flex-direction: row; 72 | align-items: center; 73 | justify-content: center; 74 | } 75 | 76 | .sell-cell_uploader{ 77 | display:inline-block; 78 | padding:5rpx 0 10rpx 0; 79 | } 80 | 81 | .sell_uploader_imgbox{ 82 | float:left; 83 | position:relative; 84 | margin-right: 10rpx; 85 | margin-bottom: 10rpx; 86 | } 87 | 88 | .sell_uploader_img, .sell_uploader_img_cover { 89 | width: 150rpx; 90 | height: 150rpx; 91 | 92 | } 93 | 94 | /*伪元素实现封面图片设置蒙层*/ 95 | .sell_uploader_img_cover::before{ 96 | position:absolute; 97 | top:70%; 98 | right:0; 99 | bottom:5.8%; 100 | left:0; 101 | font-size:13px; 102 | color: #fff; 103 | text-align: center; 104 | background-color:rgba(0,0,0,0.4); 105 | } 106 | 107 | /*右上角删除按钮*/ 108 | .sell_uploader_img_del{ 109 | position:absolute; 110 | z-index: 1; 111 | width:13px; 112 | height:13px; 113 | transform: translate(-100%,0); 114 | } 115 | 116 | .sell_uploader_box{ 117 | float:left; 118 | position:relative; 119 | margin-right: 10rpx; 120 | margin-bottom: 10rpx; 121 | width: 150rpx; 122 | height: 150rpx; 123 | background-color:#f8f8f8; 124 | } 125 | 126 | /*伪元素实现上传图片的加号*/ 127 | .sell_uploader_box:before, .sell_uploader_box:after{ 128 | content:" "; 129 | position:absolute; 130 | top:50%; 131 | left:50%; 132 | transform:translate(-50%,-50%); 133 | background-color: #d5dffc; 134 | } 135 | .sell_uploader_box:before{ 136 | width:2px; 137 | height:75rpx; 138 | } 139 | .sell_uploader_box:after{ 140 | width:75rpx; 141 | height:2px; 142 | } 143 | /**/ 144 | 145 | .sell_uploader_input { 146 | position: absolute; 147 | z-index: 1; 148 | top: 0; 149 | left: 0; 150 | width: 100%; 151 | height: 100%; 152 | opacity: 0; 153 | } 154 | 155 | 156 | 157 | /* 图片 */ 158 | .goodsImage{ 159 | display: flex; 160 | flex-direction: row; 161 | flex-wrap: wrap; 162 | justify-content: left 163 | 164 | } 165 | 166 | .goodsImage .q-image-wrap .q-image{ 167 | width: 150rpx; 168 | height: 150rpx; 169 | padding: 20rpx 20rpx; 170 | 171 | } 172 | 173 | .payNote{ 174 | display: flex; 175 | padding: 5rpx; 176 | text-align: left; 177 | } 178 | 179 | 180 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 佛大叮当 校园小程序 2 | 3 | - 服务端使用微信自带的云开发进行开发 4 | - 部分界面与功能参考了szu帮帮 5 | 6 | **可参考很程序来二次开发自己学校的小程序** 7 | 8 | 目前整个小程序准备推倒重写了,计划在11月或者是12月开始.如果有兴趣的话可以合作一起开发推广什么的. 9 | 10 | 可以直接加qq: 504250439 11 | 12 | 13 | 14 | ## TODO 15 | 16 | #### 优化 17 | 18 | - 将用户表划分成 用户-角色-权限表,目前所有用户数据都存到用户表中,表中数据过多了,先初步实现 用户-角色 表,后面有内容可以直接添加到权限表上. 19 | - 获取当前手机屏幕高度的算法有问题(需要去优化) 20 | - UI需要重新设计编写(找一个想做前端的人去实现,最好可以找到一个对ui设计有兴趣的最好) 21 | 22 | 23 | 24 | #### 功能 25 | 26 | - 接入公众号,小程序优惠模块跳转到 公众号的推文(大概能够实现优惠卷点击查看这个功能) 27 | - 同样的,首页上的轮播图也需要接入到推文的那边(看能不能将这些推文跳转些到数据库上方便修改) 28 | - 闲置物品的评论功能,这个比较难,可以后面做 29 | - 后台管理页面过于简陋,需要重写,添加一下数据统计的功能 30 | - 后续时间充足添加课程表等功能. 31 | 32 | 33 | 34 | 35 | 36 | ## 部署问题 37 | 38 | 目前的小程序已经在实际运行阶段了,所以暂时不开发云开发的数据查看功能哈 39 | 40 | 你可以进行简答的部署去查看目前小程序的大致效果.后台的一些方法可以根据函数名就大概知道是什么方法了,到时候可以自己去实现 41 | 42 | 43 | 44 | ## 代码树形结构图 45 | 46 | ``` 47 | Pages 48 | ├─Admin 后台管理模块 49 | │ ├─admin_main 后台管理首页 50 | │ ├─agreement 佛大叮当服务协议 51 | │ ├─secondHand 闲置交易管理页面 52 | │ └─user 用户验证通过页面 53 | ├─Index 主要页面模块 54 | │ ├─contact 闲置商品列表页面 55 | │ ├─contact_express 快递列表页面 56 | │ ├─contact_recourse 发现列表页面 57 | │ ├─coupon 优惠卷 58 | │ ├─goods 物品详情页面 59 | │ ├─index_main 首页 60 | │ ├─modal 这个是下面那个tabbar 61 | │ └─search 搜索页面 62 | ├─Mine 个人模块 63 | │ ├─mine_main 个人模块主页 64 | │ ├─registered 注册页面 65 | │ └─userInfo 个人信息页面 66 | ├─News 个人物品页面 67 | │ ├─myDiscover 我的发现 68 | │ ├─myExpress 我的快递 69 | │ └─myGoods 我的二手闲置物品 70 | └─Post 上传帖子页面 71 | ├─uploadDiscover 上传发现页面之类的 72 | ├─uploadExpress 上传快递 73 | └─uploadGoods 上传闲置物品 74 | ``` 75 | 76 | 77 | 78 | 79 | 80 | ## 项目截图 81 | [![首页](https://s1.ax1x.com/2020/05/03/YSpJj1.md.png)](https://imgchr.com/i/YSpJj1) 82 | [![YSpr3d.md.jpg](https://s1.ax1x.com/2020/05/03/YSpr3d.md.jpg)](https://imgchr.com/i/YSpr3d) 83 | [![YSpdAO.md.jpg](https://s1.ax1x.com/2020/05/03/YSpdAO.md.jpg)](https://imgchr.com/i/YSpdAO) 84 | [![YSpNB6.md.jpg](https://s1.ax1x.com/2020/05/03/YSpNB6.md.jpg)](https://imgchr.com/i/YSpNB6) 85 | [![YSpwND.md.jpg](https://s1.ax1x.com/2020/05/03/YSpwND.md.jpg)](https://imgchr.com/i/YSpwND) 86 | [![YSpD9H.md.jpg](https://s1.ax1x.com/2020/05/03/YSpD9H.md.jpg)](https://imgchr.com/i/YSpD9H) 87 | [![YSp04e.md.jpg](https://s1.ax1x.com/2020/05/03/YSp04e.md.jpg)](https://imgchr.com/i/YSp04e) 88 | 89 | 90 | 91 | ## 更多图片可扫描小程序码 92 | 93 | [![YSptnx.md.png](https://s1.ax1x.com/2020/05/03/YSptnx.md.png)](https://imgchr.com/i/YSptnx) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | ## 功能列表 106 | 107 | - 首页 108 | 109 | - 闲置页面,能够发表和联系卖家 110 | 111 | - 快递页面,能够详细地查看快递信息 112 | 113 | - 互帮页面,能够解决给校园内的各种事情(约人跑步,借书等等) 114 | 115 | - 闲置物品搜索功能 116 | 117 | - 个人页面,能够通过校园卡与手机号码进行注册(提供短信验证) 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | ## 已完成内容 133 | ### 功能 134 | - 已将快递,求助模板消息更换至订阅消息(已测试快递) 135 | ### 优化 136 | - 优化快递页面代码 137 | - 完成上传快递与求助页面的重构 138 | - 快递页面数据库搜索优化 139 | - 清除所有"加载中,加载完成"等提示 140 | - 优化获取快递列表逻辑 141 | - 合并求助页面的数据库并优化获取列表逻辑 142 | - 优化我的闲置快递页面的逻辑 143 | - 修改for循环,减少开发者工具警告 144 | - 注册页面逻辑优化 145 | 146 | ## 版本更新 147 | 148 | ### v1.02 149 | - 模板信息转为订阅消息 150 | 151 | 152 | ### v1.01 153 | - 开始重构,优化代码 154 | - 已完成对主页与我的页面优化 155 | - 封装部分函数 156 | - 添加对旧校园卡照片的删除 157 | - 优化个人信息页面(40%) 158 | 159 | ### v9.5 160 | - 完成 "我的" 页面开发 161 | 162 | ### v9.41 163 | - 重写我的快递页面 164 | 165 | 166 | ### v0.93 167 | - 求助功能重写 168 | 169 | 170 | ### v0.92 171 | - 优先显示未接单的快递 172 | - 发现页面细分选项优化 173 | 174 | 175 | ### v0.9 176 | - 快递功能可以接单并显示相关信息系 177 | - 后台管理重写 178 | - 优化用户验证的步骤 179 | 180 | 181 | ### v0.8 182 | - 快递选项卡的制作 183 | - 我的页面的样式 184 | - 我的发现等添加删除功能 185 | 186 | 187 | ### v0.6 188 | 189 | - 发布快递信息 190 | - 发布信息列表样式 191 | - 更新云函数,添加快递数据库的修改 192 | - 添加快速方法快速测试模板消息 193 | 194 | -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadDiscover/uploadDiscover.wxss: -------------------------------------------------------------------------------- 1 | .tips { 2 | background-color: rgb(157, 217, 245); 3 | text-align: center; 4 | } 5 | .tips_text{ 6 | color: rgb(255, 255, 255); 7 | } 8 | .sell_cells { 9 | margin: 30rpx 0; 10 | padding: 0 30rpx; 11 | background-color: #fff; 12 | } 13 | 14 | .sell_cell { 15 | display: flex; 16 | padding: 20rpx 0; 17 | align-items: center; 18 | } 19 | 20 | .sell_title { 21 | width: 70px; 22 | font-size: 15px; 23 | font-weight: bold; 24 | } 25 | 26 | .placeholder{ 27 | font-size: 15px; 28 | color: #b2b2b2; 29 | } 30 | 31 | 32 | .sell_input { 33 | flex: 1; 34 | font-size:15px; 35 | } 36 | 37 | .sell_select { 38 | font-size: 16px; 39 | color: #b2b2b2; 40 | } 41 | 42 | /*伪元素实现右箭头*/ 43 | .sell_select:after{ 44 | content: " "; 45 | display: inline-block; 46 | height:6px; 47 | width:6px; 48 | border-top:2px solid #768df3; 49 | border-right: 2px solid #768df3; 50 | transform: rotate(45deg); 51 | margin-left: 5rpx; 52 | } 53 | 54 | .sell_text{ 55 | color: #b2b2b2; 56 | } 57 | 58 | .sell_hint_text { 59 | color: #FF4F64; 60 | } 61 | 62 | .sell_btn{ 63 | width: 90%; 64 | margin-top: 50rpx; 65 | margin-bottom: 50rpx; 66 | background-color:cornflowerblue; 67 | color: white; 68 | border-radius: 98rpx; 69 | display: flex; 70 | flex-direction: row; 71 | align-items: center; 72 | justify-content: center; 73 | } 74 | 75 | .sell-cell_uploader{ 76 | display:inline-block; 77 | padding:5rpx 0 10rpx 0; 78 | } 79 | 80 | .sell_uploader_imgbox{ 81 | float:left; 82 | position:relative; 83 | margin-right: 10rpx; 84 | margin-bottom: 10rpx; 85 | } 86 | 87 | .sell_uploader_img, .sell_uploader_img_cover { 88 | width: 150rpx; 89 | height: 150rpx; 90 | 91 | } 92 | 93 | /*伪元素实现封面图片设置蒙层*/ 94 | .sell_uploader_img_cover::before{ 95 | position:absolute; 96 | top:70%; 97 | right:0; 98 | bottom:5.8%; 99 | left:0; 100 | font-size:13px; 101 | color: #fff; 102 | text-align: center; 103 | background-color:rgba(0,0,0,0.4); 104 | } 105 | 106 | /*右上角删除按钮*/ 107 | .sell_uploader_img_del{ 108 | position:absolute; 109 | z-index: 1; 110 | width:13px; 111 | height:13px; 112 | transform: translate(-100%,0); 113 | } 114 | 115 | .sell_uploader_box{ 116 | float:left; 117 | position:relative; 118 | margin-right: 10rpx; 119 | margin-bottom: 10rpx; 120 | width: 150rpx; 121 | height: 150rpx; 122 | background-color:#f8f8f8; 123 | } 124 | 125 | /*伪元素实现上传图片的加号*/ 126 | .sell_uploader_box:before, .sell_uploader_box:after{ 127 | content:" "; 128 | position:absolute; 129 | top:50%; 130 | left:50%; 131 | transform:translate(-50%,-50%); 132 | background-color: #d5dffc; 133 | } 134 | .sell_uploader_box:before{ 135 | width:2px; 136 | height:75rpx; 137 | } 138 | .sell_uploader_box:after{ 139 | width:75rpx; 140 | height:2px; 141 | } 142 | /**/ 143 | 144 | .sell_uploader_input { 145 | position: absolute; 146 | z-index: 1; 147 | top: 0; 148 | left: 0; 149 | width: 100%; 150 | height: 100%; 151 | opacity: 0; 152 | } 153 | 154 | 155 | 156 | /* 图片 */ 157 | .goodsImage{ 158 | display: flex; 159 | flex-direction: row; 160 | flex-wrap: wrap; 161 | justify-content: left 162 | 163 | } 164 | 165 | .goodsImage .q-image-wrap .q-image{ 166 | width: 150rpx; 167 | height: 150rpx; 168 | padding: 20rpx 20rpx; 169 | 170 | } 171 | 172 | 173 | -------------------------------------------------------------------------------- /miniprogram/pages/Admin/佛大叮当协议.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 佛大叮当服务协议 4 | 5 | 佛大叮当平台依据以下条件和条款为您提供所享有的服务,请仔细阅读并遵守。 6 | 7 | 一总则 8 | 9 | 1.1本《佛大叮当服务协议》(以下简称本协议)为您(即用户)与佛山一本真经科技有限公司(以下简称本公司)就帮取快递,求助,等服务达成的协议。哿帮在此特别提醒您认真阅读,充分理解本协议。用户应认真阅读。充分理解本协议中各条款,特别涉及免除或者限制责任的免贡条款,对用户的权利限制的条款,法律适用、争议解决方式的条款。 10 | 11 | 1.2请您审慎阅读并选择同意或不同意本协议,除非您接受本协议所有条款,否则您无权使用本协议项下相关服务。您的申请,付款。使用、帐号获取和登录等行为表明您自愿接受本协议的全部内容并受其约束,不得以任何理由包括但不限于未能认真阅读本协议等作为纠纷抗辩理由。 12 | 13 | 1.3本协议可由本公司随时更新,更新后的协议条款一旦公布即代替原行通在修改本协议条款后,如果您不接受修改后的条款,请立即停止使用本公司所提供的服务,您继续使用本公司提供的服务将被视力已接受了修改后的协议。 14 | 15 | 16 | 二定义 17 | 2.1服务平台:足搭建,提供及维护帮取帮送服务信息发布的平台,用户和跑腿服务提供者通过服务平台达成合意。 18 | 19 | 2.2发单者:是指在服务平台上发布求助需求创建任务事项信息的,具有完全民事权利能力和行力能力的自然人。 20 | 21 | 2.3接单者:是指在服务平台上接受求助需求创建任务事项信息的,具有完全民事权利能力和行为能力的自然人,与服务平台无任何雇佣关系。发单者在服务平台发出订单后,服务平台将向接单者推送订单,在成功接受订单后,将在规定时间内为发单者提供帮取帮送服务,任务事项完成后发单者支付相应服务费用。 22 | 23 | 24 | 三,服务平台 25 | 26 | 3.1搭建,提供及维护服务信息,为用户和接单者提供信息发布和撮合服务 27 | 28 | 3.2用户可以通过服务平台创建、发布帮取快递等信息。 29 | 30 | 3.3用户可以在平台内接受发布的任务事项,完成后并获得一定对应 31 | 32 | 3.4服务平台在收到用户发送的任务事项后将用户的任务需求推造给其他用户,由其他用户接受您的委托,按照您的指示,为您提供跑腿服务。您理解并同意,服务平台仅供您发布任务事项,但并不保证在指定时间内一定会有接单者承接处理您的任务事项 33 | 34 | 3.5服务平台代为接单者收取服务费用,发单者在发布事项后向平台预支服务费用,待接单者完成发单者发布的任务事项且发单者点击确认后,平台向接单若支付相应服务用 35 | 36 | 3.6接单者向发单者实际提供服务之前,双方均有权单方取消任务事项,但服务平台有权根据双方放弃任务事项的情况,降低其相应的平台信用评级或禁止其继续使用平台服务。 37 | 38 | 3.7在本协议项下,服务平台仅为发单者和接单者提供达成双方帮取船送服务的撮合服务。发单者与接单者达成的帮取帮送服务过程中产生的金部权利义务,包括但不限于未及时配送,物品机失,丢失,灭失物品品质,质量和价值分歧等,由发单著或接单者承担,与服务合物品品质质 39 | 40 | 3.8服务平台受理发单者和接单者的申诉,并联系对方对投诉进行调查核实。预支的平台服务费用将会冻结,直到纠纷解除,双方达成和解后,将费用打入对应的账户中 41 | 42 | 43 | 四权利与义务 44 | 45 | 4.1发单若与接单者通过服务平台发布与接受帮取初送任务事项,成功发布或接受的任务事项通过微信小程序实时告知进展。 46 | 47 | 4.2发单者保证,通过服务平台发布信息时,需如实,准确,完整详细地填写任务事项的具体信息,包括但不限于物品信息(类似重量)·带取(送)地址,联系人信息,愿意支付的物品金额,指定购买地址(如有)·收贷地址,特殊要求等。由于发单者提供虚假,不完整,填写错课信息导致的任何责任或损失,应由发单者自行承担不利后果。 48 | 49 | 4.3接单者接受帮买任务事项需求后,将收到平台发送的任务线事项约详细信息,要求接单者在一定的时限内完成任务并确认,在任务进行的过程中可与发单若进行电话联系 50 | 51 | 4.4服务平台向接单者推送发单者发布的帮取帮送任务事项需求并由接单者接受后,发单者不得取消该订单,若任务事项需要临时进行解决,应直接联系接单者。否则,所造成的损失应由发单者承担。 52 | 53 | 4.5接单者就已接受的帮取帮送任务事项,但无法完成的,应由接单者及时直接与发单著协商解决。否则,所造成的损失应由接单者承担。 54 | 55 | 4.6发单者理解并同意,接单者并非专业的快递员或运输服务提供者,在帮取帮送过程中出现的分歧,应由双方友好协商解决。发单者应尽到谨慎注意义务,在发布信息或与接单者沟通过程中应注意保护自身隐私。 56 | 57 | 4.7双方应当严格遵守本服务协议,因违反本服务协议的行为给第三方、或给服务平台造成损失的,应当承担赔偿责任。 58 | 59 | 4.8用户在使用服务平台的各项服务中,不得在平台内发布各项违规内容,如包含庸俗挑逗性,暴力,赌博,涉黑,推广营销的视频,图片,文字。同时,也不允许发布任何有违反佛山科学技术学院相关规定的信息。否则,服务平台有权进行违规处理,包括但不限于撤回订单,拉入黑名单,禁用平台使用权等。 60 | 61 | 62 | 五。责任范围与责任限制 63 | 64 | 5.1用户需确认,您在实际使用服务平台的服务时,应当具备中华人民共和国法律规定的与您行为相适应的民事行为能力。若您不具备前述与您行为相适应的民事行为能力,则您及您的监护人应依照法律规定承担因此而导致的一切后果,服务平台有权注销您的账户或停止向 65 | 66 | 5.2用户在服务平台注册成功后,将产生用户名和密码等账户信息,您可以根据服务平台的规侧改变您的密码,用户应谨慎合理的保存。使用其用户名和密码对通过您的账户和密码实施的所有行为·活动及事件负全责。用户若发现任何不当使用用户账号或存在安全漏洞等其他可能危及用户账户安全的情况,应当立即以有效方式通知服务平台,要求服务平台新停相关服务,并向公安机关报案。您理解服务平台对您的请求采取行动需要合理时间,服务平合对在采取行动前已经产生的后果(包括但不限于您的任何损失)不承担任何责任。用户不得将在本服务平台账户借(租)给他人使用,否则您应承担由此产生 67 | 68 | 5.3用户同意自行承担使用网络服务的风险,服务平台不作任何类型约担保,包括但不限于:不担保服务一定能满足用户的要求;不担保服务不会受中断,对服务的及时性,安全性,出错发生不担保;对右服务平台上以及第三方合作得到的任何服务或交易进程,不作担保; 69 | 对平台服务所涉及的技术及信息的有效性,准确性,正确性。可靠性,稳定性,完整性和及时性不作出任何承诺和保证;不担保平台服务的适用性没有错误或疏漏。 70 | 71 | 5.4用户理解并同意服务平台作为信息发布,居间服务平台,无法控制每一任务事项所涉及的物品质量,安全或合法性。任务事项内容的真实性或准确性,以及任务事项所涉各方履行任务事项的能力。您应自行谨慎判断确定相关信息的真实性,合法性和有效性,并自行承担因此产生的责任与损失,用户应在接收带取,帮买物品时检查物品的改量是否正确及物品是否完整,在签单后/从接单者处接受物品或向接单者支付帮买物品款项后应视为认可物品不存在数量缺失或损坏,认可帮买物品符合您的要求。 72 | 73 | 5.5用户同意并确认,服务平台拥有独自决定拒绝服务、关闭用户账户或取消任务事项的权利。 74 | 75 | 5.6用户在通过服务平台进行在线发布任务事项信息等活动时,涉及用户真实姓名/名称,履行地址。联系电话等隐私信息的,服务平台将予以严格保密,除非得到用户的授权或法律法规,本条款另规(约)定外,服务平台不会向外界披露用户隐私信息。 76 | 77 | 5.7为提供平台服务的进一步改善,服务平台有权对整个用户数据库进行分析并对用户数据库进行商业上的利用,但不会池露给第三方使 78 | 79 | 5.8用户同意服务平台拥有通过信息推送,平台公示、短信,电话等形式向您通知告知信息的权利。 80 | 81 | 82 | 六不可抗力 83 | 84 | 6.1不论在何种情况下,本服务平台均不对由于互联网正常的设备维护,互联网络连接故阿,电脑,通讯或其他系统的故障,电力故障,黑客攻击。病毒侵数,罢工,劳动争议,暴乱,起义,骚乱,生产力或生产资料不足,火灾,洪水,风暴,烬炸,战争,政府行为,司法行政机关的命令或第三方的不作为而造成的不能服务或延迟服务承担责任。 85 | 86 | 87 | 七争议解决 88 | 89 | 7.1本服务协议的订立,执行和解释及争议的解决均应适用中华人民共和国法律。 90 | 91 | 7.2就本服务协议内容或执行发生任何争议,应友好协商解决,协商不成时,均可向被告所在地的有管辖权的法院诉讼解决。 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /miniprogram/pages/Admin/agreement/agreement.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 佛大叮当服务协议 4 | 5 | 佛大叮当平台依据以下条件和条款为您提供所享有的服务,请仔细阅读并遵守。 6 | 7 | 一总则 8 | 9 | 1.1本《佛大叮当服务协议》(以下简称本协议)为您(即用户)与佛山一本真经科技有限公司(以下简称本公司)就帮取快递,求助,等服务达成的协议。哿帮在此特别提醒您认真阅读,充分理解本协议。用户应认真阅读。充分理解本协议中各条款,特别涉及免除或者限制责任的免贡条款,对用户的权利限制的条款,法律适用、争议解决方式的条款。 10 | 11 | 1.2请您审慎阅读并选择同意或不同意本协议,除非您接受本协议所有条款,否则您无权使用本协议项下相关服务。您的申请,付款。使用、帐号获取和登录等行为表明您自愿接受本协议的全部内容并受其约束,不得以任何理由包括但不限于未能认真阅读本协议等作为纠纷抗辩理由。 12 | 13 | 1.3本协议可由本公司随时更新,更新后的协议条款一旦公布即代替原行通在修改本协议条款后,如果您不接受修改后的条款,请立即停止使用本公司所提供的服务,您继续使用本公司提供的服务将被视力已接受了修改后的协议。 14 | 15 | 16 | 二定义 17 | 2.1服务平台:足搭建,提供及维护帮取帮送服务信息发布的平台,用户和跑腿服务提供者通过服务平台达成合意。 18 | 19 | 2.2发单者:是指在服务平台上发布求助需求创建任务事项信息的,具有完全民事权利能力和行力能力的自然人。 20 | 21 | 2.3接单者:是指在服务平台上接受求助需求创建任务事项信息的,具有完全民事权利能力和行为能力的自然人,与服务平台无任何雇佣关系。发单者在服务平台发出订单后,服务平台将向接单者推送订单,在成功接受订单后,将在规定时间内为发单者提供帮取帮送服务,任务事项完成后发单者支付相应服务费用。 22 | 23 | 24 | 三,服务平台 25 | 26 | 3.1搭建,提供及维护服务信息,为用户和接单者提供信息发布和撮合服务 27 | 28 | 3.2用户可以通过服务平台创建、发布帮取快递等信息。 29 | 30 | 3.3用户可以在平台内接受发布的任务事项,完成后并获得一定对应 31 | 32 | 3.4服务平台在收到用户发送的任务事项后将用户的任务需求推造给其他用户,由其他用户接受您的委托,按照您的指示,为您提供跑腿服务。您理解并同意,服务平台仅供您发布任务事项,但并不保证在指定时间内一定会有接单者承接处理您的任务事项 33 | 34 | 3.5服务平台代为接单者收取服务费用,发单者在发布事项后向平台预支服务费用,待接单者完成发单者发布的任务事项且发单者点击确认后,平台向接单若支付相应服务用 35 | 36 | 3.6接单者向发单者实际提供服务之前,双方均有权单方取消任务事项,但服务平台有权根据双方放弃任务事项的情况,降低其相应的平台信用评级或禁止其继续使用平台服务。 37 | 38 | 3.7在本协议项下,服务平台仅为发单者和接单者提供达成双方帮取船送服务的撮合服务。发单者与接单者达成的帮取帮送服务过程中产生的金部权利义务,包括但不限于未及时配送,物品机失,丢失,灭失物品品质,质量和价值分歧等,由发单著或接单者承担,与服务合物品品质质 39 | 40 | 3.8服务平台受理发单者和接单者的申诉,并联系对方对投诉进行调查核实。预支的平台服务费用将会冻结,直到纠纷解除,双方达成和解后,将费用打入对应的账户中 41 | 42 | 43 | 四权利与义务 44 | 45 | 4.1发单若与接单者通过服务平台发布与接受帮取初送任务事项,成功发布或接受的任务事项通过微信小程序实时告知进展。 46 | 47 | 4.2发单者保证,通过服务平台发布信息时,需如实,准确,完整详细地填写任务事项的具体信息,包括但不限于物品信息(类似重量)·带取(送)地址,联系人信息,愿意支付的物品金额,指定购买地址(如有)·收贷地址,特殊要求等。由于发单者提供虚假,不完整,填写错课信息导致的任何责任或损失,应由发单者自行承担不利后果。 48 | 49 | 4.3接单者接受帮买任务事项需求后,将收到平台发送的任务线事项约详细信息,要求接单者在一定的时限内完成任务并确认,在任务进行的过程中可与发单若进行电话联系 50 | 51 | 4.4服务平台向接单者推送发单者发布的帮取帮送任务事项需求并由接单者接受后,发单者不得取消该订单,若任务事项需要临时进行解决,应直接联系接单者。否则,所造成的损失应由发单者承担。 52 | 53 | 4.5接单者就已接受的帮取帮送任务事项,但无法完成的,应由接单者及时直接与发单著协商解决。否则,所造成的损失应由接单者承担。 54 | 55 | 4.6发单者理解并同意,接单者并非专业的快递员或运输服务提供者,在帮取帮送过程中出现的分歧,应由双方友好协商解决。发单者应尽到谨慎注意义务,在发布信息或与接单者沟通过程中应注意保护自身隐私。 56 | 57 | 4.7双方应当严格遵守本服务协议,因违反本服务协议的行为给第三方、或给服务平台造成损失的,应当承担赔偿责任。 58 | 59 | 4.8用户在使用服务平台的各项服务中,不得在平台内发布各项违规内容,如包含庸俗挑逗性,暴力,赌博,涉黑,推广营销的视频,图片,文字。同时,也不允许发布任何有违反佛山科学技术学院相关规定的信息。否则,服务平台有权进行违规处理,包括但不限于撤回订单,拉入黑名单,禁用平台使用权等。 60 | 61 | 62 | 五。责任范围与责任限制 63 | 64 | 5.1用户需确认,您在实际使用服务平台的服务时,应当具备中华人民共和国法律规定的与您行为相适应的民事行为能力。若您不具备前述与您行为相适应的民事行为能力,则您及您的监护人应依照法律规定承担因此而导致的一切后果,服务平台有权注销您的账户或停止向 65 | 66 | 5.2用户在服务平台注册成功后,将产生用户名和密码等账户信息,您可以根据服务平台的规侧改变您的密码,用户应谨慎合理的保存。使用其用户名和密码对通过您的账户和密码实施的所有行为·活动及事件负全责。用户若发现任何不当使用用户账号或存在安全漏洞等其他可能危及用户账户安全的情况,应当立即以有效方式通知服务平台,要求服务平台新停相关服务,并向公安机关报案。您理解服务平台对您的请求采取行动需要合理时间,服务平合对在采取行动前已经产生的后果(包括但不限于您的任何损失)不承担任何责任。用户不得将在本服务平台账户借(租)给他人使用,否则您应承担由此产生 67 | 68 | 5.3用户同意自行承担使用网络服务的风险,服务平台不作任何类型约担保,包括但不限于:不担保服务一定能满足用户的要求;不担保服务不会受中断,对服务的及时性,安全性,出错发生不担保;对右服务平台上以及第三方合作得到的任何服务或交易进程,不作担保; 69 | 对平台服务所涉及的技术及信息的有效性,准确性,正确性。可靠性,稳定性,完整性和及时性不作出任何承诺和保证;不担保平台服务的适用性没有错误或疏漏。 70 | 71 | 5.4用户理解并同意服务平台作为信息发布,居间服务平台,无法控制每一任务事项所涉及的物品质量,安全或合法性。任务事项内容的真实性或准确性,以及任务事项所涉各方履行任务事项的能力。您应自行谨慎判断确定相关信息的真实性,合法性和有效性,并自行承担因此产生的责任与损失,用户应在接收带取,帮买物品时检查物品的改量是否正确及物品是否完整,在签单后/从接单者处接受物品或向接单者支付帮买物品款项后应视为认可物品不存在数量缺失或损坏,认可帮买物品符合您的要求。 72 | 73 | 5.5用户同意并确认,服务平台拥有独自决定拒绝服务、关闭用户账户或取消任务事项的权利。 74 | 75 | 5.6用户在通过服务平台进行在线发布任务事项信息等活动时,涉及用户真实姓名/名称,履行地址。联系电话等隐私信息的,服务平台将予以严格保密,除非得到用户的授权或法律法规,本条款另规(约)定外,服务平台不会向外界披露用户隐私信息。 76 | 77 | 5.7为提供平台服务的进一步改善,服务平台有权对整个用户数据库进行分析并对用户数据库进行商业上的利用,但不会池露给第三方使 78 | 79 | 5.8用户同意服务平台拥有通过信息推送,平台公示、短信,电话等形式向您通知告知信息的权利。 80 | 81 | 82 | 六不可抗力 83 | 84 | 6.1不论在何种情况下,本服务平台均不对由于互联网正常的设备维护,互联网络连接故阿,电脑,通讯或其他系统的故障,电力故障,黑客攻击。病毒侵数,罢工,劳动争议,暴乱,起义,骚乱,生产力或生产资料不足,火灾,洪水,风暴,烬炸,战争,政府行为,司法行政机关的命令或第三方的不作为而造成的不能服务或延迟服务承担责任。 85 | 86 | 87 | 七争议解决 88 | 89 | 7.1本服务协议的订立,执行和解释及争议的解决均应适用中华人民共和国法律。 90 | 91 | 7.2就本服务协议内容或执行发生任何争议,应友好协商解决,协商不成时,均可向被告所在地的有管辖权的法院诉讼解决。 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myExpress/myExpress.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | 11 | //闲置分类导航栏 12 | categories: ["我的发布", "我的接单"], 13 | //主导航栏下标 14 | currentIndex: 0, 15 | //分类导航栏下标 16 | currentData: 0, 17 | //所要读取的数据库 18 | database: 'express', 19 | //数据库数据 20 | feed: [], 21 | //下拉更新数据库数据个数 22 | nextPage: 0, 23 | //我的页面 24 | myPage: true, 25 | //用户openid 26 | user_openid: "", 27 | //数据库待接单数量 28 | count: 0, 29 | 30 | }, 31 | 32 | //页面加载时读取数据库 33 | onLoad: function (options) { 34 | 35 | this.setData({ 36 | user_openid: app.globalData.userCloudData._openid, 37 | }) 38 | // 根据点击查找数据库 39 | this.categoriesTab(); 40 | }, 41 | 42 | onShow:function(res){ 43 | }, 44 | 45 | //点击更新主导航栏下标 46 | categoriesTab: function (e) { 47 | if (e) { 48 | this.setData({ 49 | currentData: e.currentTarget.dataset.index 50 | }); 51 | } 52 | var that = this; 53 | that.setData({ 54 | feed: [], 55 | nextPage: 0, 56 | count: 0, 57 | database: 'express', 58 | }) 59 | console.log(this.data.currentData) 60 | this.databaseLoad(); 61 | }, 62 | 63 | //更新副导航栏下标 64 | // 我的快递没可以滑动 65 | categoriesChange: function (e) { 66 | let current = e.detail.current; 67 | let source = e.detail.source 68 | //console.log(source); 69 | // 这里的source是判断是否是手指触摸 触发的事件 70 | if (source === 'touch') { 71 | this.setData({ 72 | currentData: current 73 | }) 74 | console.log(this.data.currentData) 75 | // 判断如果为寻物和找队友则更改搜索的数据库 76 | } 77 | }, 78 | 79 | 80 | 81 | 82 | // 拖到最下面更新数据 83 | lower: function (e) { 84 | wx.showNavigationBarLoading(); 85 | var that = this; 86 | // setTimeout(function(){wx.hideNavigationBarLoading();that.databaseLoad();}, 1000); 87 | that.databaseLoad(); 88 | console.log("lower") 89 | }, 90 | 91 | // 调用util.js中读取数据库函数 92 | databaseLoad: function () { 93 | var that = this; 94 | if (that.data.currentData==0){ 95 | // util.countUnAcc(that, that.data.user_openid); 96 | // util.accUnAccLoad(that, that.data.user_openid); 97 | util.onlyLoad(that); 98 | }else{ 99 | util.accLoad(that); 100 | } 101 | }, 102 | 103 | 104 | //快递跳转到点击页面 105 | jumpToExpress: function(e) { 106 | var id = e.currentTarget.id 107 | var express_data = JSON.stringify(this.data.feed[id]) 108 | wx.navigateTo({ 109 | url: '../../Index/contact_express/contact_express?express_data=' + express_data 110 | }) 111 | }, 112 | 113 | 114 | 115 | //删除未接单快递 116 | deleteExpress: function (e) { 117 | var that=this 118 | var id = e.currentTarget.id 119 | //获得帖子id 120 | var express_id = this.data.feed[id]._id 121 | wx.showModal({ 122 | title: '删除快递', 123 | content:'是否删除快递点在'+this.data.feed[id].pickUp+'的快递', 124 | success(res) { 125 | //用户点击删除就删除帖子 126 | if (res.confirm) { 127 | const db = wx.cloud.database() 128 | db.collection('express').doc(express_id).remove({ 129 | //删除成功显示提示 130 | success: function (res) { 131 | console.log("删除成功") 132 | wx.showToast({ 133 | title: '删除成功', 134 | icon: 'success', 135 | duration: 1000 136 | }) 137 | that.setData({ 138 | count: 0, 139 | feed: [], 140 | nextPage: 0, 141 | }) 142 | that.databaseLoad(); 143 | } 144 | }) 145 | } 146 | } 147 | }) 148 | }, 149 | 150 | 151 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Admin/secondHand/secondHand.js: -------------------------------------------------------------------------------- 1 | // pages/myGoods/myGoods.js 2 | 3 | var util = require('../../../utils/util.js') 4 | var app = getApp() 5 | 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | //获取的二手物品数据 13 | feed: [], 14 | feed_length: 0, 15 | //下拉继续读取数据 16 | nextPage: 0, 17 | //用户id openid 18 | openid: "", 19 | //读取的数据库 20 | database: 'post', 21 | 22 | }, 23 | 24 | /** 25 | * 生命周期函数--监听页面加载 26 | */ 27 | onLoad: function (options) { 28 | console.log('onLoad') 29 | var that = this 30 | // 改变选项卡的值 31 | console.log(options.tab_id) 32 | that.setData({ 33 | currentData: options.tab_id, 34 | openid: app.globalData.openid 35 | }) 36 | //调用获取二手商品数据 37 | this.allLoad(); 38 | }, 39 | 40 | // 完成选项卡的跳转 41 | // bindchange: function (e) { 42 | // const that = this; 43 | // that.setData({ 44 | // currentData: e.detail.current 45 | // }) 46 | 47 | // }, 48 | 49 | // 分析选项卡是否正确 50 | // checkCurrent: function (e) { 51 | // const that = this; 52 | // if (that.data.currentData === e.target.dataset.current) { 53 | // return false; 54 | // } else { 55 | // that.setData({ 56 | // currentData: e.target.dataset.current 57 | // }) 58 | // } 59 | // }, 60 | 61 | 62 | // 拖到最下面更新数据 63 | lower: function (e) { 64 | wx.showNavigationBarLoading(); 65 | var that = this; 66 | // setTimeout(function(){wx.hideNavigationBarLoading();that.allLoad();}, 1000); 67 | that.allLoad(); 68 | console.log("lower") 69 | }, 70 | 71 | // 在云数据库上查找数据(查找10条) 72 | allLoad: function () { 73 | var that = this; 74 | util.allLoad(that); 75 | }, 76 | 77 | //跳转到点击页面 78 | jumpToPost: function (e) { 79 | var id = e.currentTarget.id 80 | console.log(e.currentTarget.id) 81 | console.log(this.data.feed[id]) 82 | var post_data = JSON.stringify(this.data.feed[id]) 83 | wx.navigateTo({ 84 | // url: '../posttest/posttest?post_data=' + post_data 85 | url: '../../Index/contact/contact?post_data=' + post_data 86 | }) 87 | }, 88 | 89 | 90 | // 删除云上的图片 91 | removeImage: function (post_imgs) { 92 | console.log(post_imgs) 93 | // 不删除默认图片 94 | if(post_imgs[0]!="cloud://yf-ab2989.7966-yf-ab2989-1258230310/没有实物图.png"){ 95 | wx.cloud.deleteFile({ 96 | fileList: post_imgs 97 | }).then(res => { 98 | console.log(res.fileList) 99 | }).catch(error => { 100 | }) 101 | console.log("成功删除图片") 102 | } 103 | 104 | }, 105 | 106 | 107 | 108 | 109 | //点击删除帖子 110 | removePost: function (e) { 111 | var idx = e.target.dataset.idx 112 | //获得帖子id 113 | var post_id = this.data.feed[idx]._id 114 | var goods_Name = this.data.feed[idx].title 115 | var post_imgs=this.data.feed[idx].imgs 116 | var that=this 117 | wx.showModal({ 118 | title: '删除物品', 119 | content: goods_Name, 120 | success(res) { 121 | //用户点击删除就删除帖子 122 | if (res.confirm) { 123 | // 删除云上的帖子的图片 124 | that.removeImage(post_imgs) 125 | // 调用云函数删除数据库中的数据 126 | wx.cloud.callFunction({ 127 | name: 'deletePost', 128 | data: { 129 | post_id: post_id, 130 | database:"post", 131 | }, success: function (res) { 132 | console.log("删除成功") 133 | wx.showToast({ 134 | title: '删除成功', 135 | icon: 'success', 136 | duration: 1000 137 | }) 138 | }, fail: function (res) { 139 | console.log(res) 140 | } 141 | }) 142 | 143 | 144 | 145 | } 146 | } 147 | }) 148 | }, 149 | 150 | 151 | 152 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Admin/admin_main/admin_main.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | // 用户提交注册的数量 11 | userNum: 0 12 | }, 13 | 14 | 15 | onShow: function (options) { 16 | this.userCount() 17 | }, 18 | 19 | 20 | 21 | userCount: function (e) { 22 | var that = this 23 | const db = wx.cloud.database() 24 | db.collection('users').where({ 25 | "al_approve": false 26 | }).count().then(res => { 27 | console.log(res) 28 | console.log(res.total) 29 | that.setData({ 30 | userNum: res.total 31 | }) 32 | }) 33 | }, 34 | 35 | // 跳转到注册页面 36 | adminSH: function (e) { 37 | wx.navigateTo({ 38 | url: "../secondHand/secondHand" 39 | }) 40 | 41 | }, 42 | 43 | // 跳转管理员页面 44 | adminUA: function (e) { 45 | wx.navigateTo({ 46 | url: "../user/user" 47 | }) 48 | 49 | }, 50 | 51 | 52 | 53 | // 发送注册模板消息 54 | sendRegistered: function (e) { 55 | var id = e.detail.target.id 56 | var approve = "" 57 | if (id == "1") { 58 | var approve = "认证成功" 59 | } 60 | else if (id == "2") { 61 | var approve = "认证不成功" 62 | } 63 | 64 | wx.cloud.init() 65 | wx.cloud.callFunction({ 66 | name: 'openapi', 67 | data: { 68 | action: 'sendRegisteredMessage', 69 | approve: approve, 70 | user_openid: app.globalData.userCloudData._openid 71 | }, 72 | success: res => { 73 | console.warn('[云函数] [openapi] subscribeMessage.send 调用成功:', res) 74 | }, 75 | fail: err => { 76 | console.error('[云函数] [openapi] subscribeMessage.send 调用失败:', err) 77 | } 78 | }) 79 | }, 80 | 81 | 82 | // 发送快递模板消息 83 | sendExpress: function (e) { 84 | var id = e.detail.target.id 85 | if (id == "3") { 86 | var orders = "代收成功" 87 | // var orders = "求助成功" 88 | 89 | } else if (id == "4") { 90 | var orders = "代收失败" 91 | } 92 | 93 | wx.cloud.init() 94 | wx.cloud.callFunction({ 95 | name: 'openapi', 96 | data: { 97 | action: 'sendExpressTemplate', 98 | orders: orders, 99 | user_openid: app.globalData.userCloudData._openid 100 | }, 101 | success: res => { 102 | console.warn('[云函数] [openapi] subscribeMessage.send 调用成功:', res) 103 | }, 104 | fail: err => { 105 | console.error('[云函数] [openapi] subscribeMessage.send 调用失败:', err) 106 | } 107 | }) 108 | }, 109 | 110 | 111 | 112 | // 发送求助模板消息 113 | sendRecourse: function (e) { 114 | var id = e.detail.target.id 115 | if (id == "5") { 116 | var orders = "求助成功" 117 | // var orders = "求助成功" 118 | 119 | } else if (id == "6") { 120 | var orders = "求助失败" 121 | } 122 | 123 | wx.cloud.init() 124 | wx.cloud.callFunction({ 125 | name: 'openapi', 126 | data: { 127 | action: 'sendRecourseTemplate', 128 | orders: orders, 129 | user_openid: app.globalData.userCloudData._openid 130 | }, 131 | success: res => { 132 | console.warn('[云函数] [openapi] subscribeMessage.send 调用成功:', res) 133 | }, 134 | fail: err => { 135 | console.error('[云函数] [openapi] subscribeMessage.send 调用失败:', err) 136 | } 137 | }) 138 | }, 139 | 140 | 141 | 142 | 143 | 144 | // 测试任何东西 145 | testDing: function (e) { 146 | 147 | wx.requestSubscribeMessage({ 148 | // 依次为注册,快递,帮帮这三个订阅消息 149 | tmplIds: ['5PHcG60eH76swsvB351m8G6SENp1IKQceZqivYQkUA4', 150 | 'l3MDM8SSqxszV1FJ-TY-LxJTKo5m0Djf--ZVXrWLbzA', 151 | 'ILE1bwSQDi7ctxacKh7yYhgBuh7esx6xfr68OKOhTCs' 152 | ], 153 | success (res) { 154 | console.log("订阅成功") 155 | }, 156 | fail(err) { 157 | //失败 158 | console.error(err); 159 | } 160 | }) 161 | 162 | }, 163 | 164 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Mine/registered/registered.wxml: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 头像 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 昵称 16 | 17 | 18 | 19 | 校区 20 | 21 | 22 | {{region_index!=null?choose[region_index]:'请选择您所在的校区'}} 23 | 24 | 25 | 26 | 27 | 手机号码 28 | 29 | 30 | 31 | +86 32 | 33 | 34 | 中国大陆 35 | 36 | 37 | 38 | 39 | 验证码 40 | 41 | 42 | 43 | 44 |
45 |
46 | 47 |
48 |
49 | 微信号与手机号关联 50 | 微信号与手机号不关联 51 |
52 |
53 |
54 | 55 | 微信号 56 | 57 | 58 | 59 | 60 | 校园卡认证 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 我已阅读并同意 79 | 《佛大叮当服务用户协议》 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 提示 88 | 89 | 90 | 91 | 92 | 93 | {{warning}} 94 | 95 | 96 | 97 |
-------------------------------------------------------------------------------- /miniprogram/pages/Index/contact/contact.js: -------------------------------------------------------------------------------- 1 | // pages/contact/contact.js 2 | var util = require('../../../utils/util.js') 3 | var app = getApp() 4 | 5 | 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | //用户信息 13 | user_id: "", 14 | user_data: {}, 15 | //帖子信息 16 | post_data:{}, 17 | //头像列表 18 | swiperList:[], 19 | //窗口宽度 20 | windowWidth: 0, 21 | // json格式的帖子信息 22 | ori_post_data: {}, 23 | }, 24 | showModal(e) { 25 | this.setData({ 26 | modalName: e.currentTarget.dataset.target 27 | }) 28 | 29 | }, 30 | hideModal(e) { 31 | this.setData({ 32 | modalName: null 33 | }) 34 | }, 35 | 36 | /** 37 | * 生命周期函数--监听页面加载 38 | */ 39 | onLoad: function (options) { 40 | var post_data=JSON.parse(options.post_data) 41 | this.setData({ 42 | swiperList: app.globalData.swiperList, 43 | post_data:post_data, 44 | user_id:post_data._openid, 45 | windowWidth: wx.getSystemInfoSync().windowWidth, 46 | ori_post_data: options.post_data, 47 | }) 48 | 49 | // 允许此页面进行转发 50 | wx.showShareMenu({ 51 | withShareTicket: true 52 | }); 53 | 54 | console.log(this.data.post_data) 55 | console.log(this.data.user_id) 56 | 57 | this.getUserData() 58 | }, 59 | 60 | 61 | 62 | 63 | // 页面分享函数 64 | onShareAppMessage: function (options) { 65 | var post_type = "闲置" 66 | if (this.data.post_data.type == "寻物") { 67 | post_type = "寻物" 68 | } else if (this.data.post_data.type == "找队友") { 69 | post_type = "找队友" 70 | } 71 | 72 | if (options.from === 'button') { 73 | // 来自页面内转发按钮 74 | console.log(options.target) 75 | } 76 | return { 77 | //## 此为转发页面所显示的标题 78 | title: post_type + ": " + this.data.post_data.title, 79 | path: 'pages/Index/contact/contact?post_data=' + this.data.ori_post_data, 80 | imageUrl: this.data.post_data.imgs[0], 81 | success: function (res) { 82 | console.log("发送成功") 83 | }, 84 | fail: function () { 85 | console.log("发送失败") 86 | } 87 | } 88 | }, 89 | 90 | 91 | 92 | // 获取物品主人的信息 93 | getUserData:function(){ 94 | const db = wx.cloud.database() 95 | // 查询当前物品的主人信息 96 | db.collection('users').where({ 97 | _openid:this.data.user_id 98 | }).get({ 99 | success: res => { 100 | this.setData({ 101 | user_data:res.data[0] 102 | }) 103 | console.log('[数据库] [查询记录] 成功: ', this.data.user_data) 104 | }, 105 | fail: err => { 106 | wx.showToast({ 107 | icon: 'none', 108 | title: '查询记录失败' 109 | }) 110 | console.error('[数据库] [查询记录] 失败:', err) 111 | } 112 | }); 113 | }, 114 | 115 | 116 | //用户联系方式复制 117 | showConnect: function (e) { 118 | // 判断当前用户是否为以注册用户 119 | var isRegistered=util.isRegistered() 120 | 121 | 122 | if(isRegistered) 123 | { 124 | // 判断微信定系手机 125 | var promptTitle="" 126 | var content="" 127 | if(e.currentTarget.id==="wechatButton"){ 128 | promptTitle="卖家微信" 129 | content=this.data.user_data.wechat_id 130 | } 131 | else{ 132 | promptTitle="卖家手机号码" 133 | content=this.data.user_data.phone 134 | } 135 | console.log(promptTitle) 136 | console.log(content) 137 | wx.showModal({ 138 | title: promptTitle, 139 | content: content, 140 | confirmText:"复制", 141 | success: function (res) { 142 | if (res.confirm) { 143 | wx.setClipboardData({ 144 | data: content, 145 | success: function (res) { 146 | wx.showToast({ 147 | title: '复制成功', 148 | }); 149 | } 150 | }) 151 | } else if (res.cancel) { 152 | console.log('用户点击取消') 153 | } 154 | } 155 | }) 156 | 157 | } 158 | 159 | }, 160 | 161 | // 复制功能函数 162 | copyText:function(connectWay){ 163 | var that = this; 164 | wx.setClipboardData({ 165 | data: that.data, 166 | success: function (res) { 167 | wx.showToast({ 168 | title: '复制成功', 169 | }); 170 | } 171 | }); 172 | }, 173 | 174 | 175 | //用户点击放大图片 176 | handleImagePreview:function(e) { 177 | var index = e.target.dataset.index 178 | var images = this.data.post_data.imgs 179 | wx.previewImage({ 180 | current: images[index], //当前预览的图片 181 | urls: images, //所有要预览的图片 182 | }) 183 | }, 184 | 185 | 186 | }) -------------------------------------------------------------------------------- /miniprogram/templates/twoCol-template/twoCol-template.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myGoods/myGoods.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | //闲置分类导航栏 11 | categories: ["全部", "化妆类", "电器类", "学习类", "衣物类", "生活类"], 12 | //分类导航栏下标 13 | currentData: 0, 14 | //所要读取的数据库 15 | database: 'post', 16 | //数据库数量 17 | count: "", 18 | //数据库数据 19 | feed: [], 20 | //下拉更新数据库数据个数 21 | nextPage: 0, 22 | //我的页面 23 | myPage: true, 24 | //用户openid 25 | user_openid: "", 26 | 27 | }, 28 | 29 | //页面加载时读取数据库 30 | onLoad: function (options) { 31 | this.setData({ 32 | user_openid: app.globalData.userCloudData._openid, 33 | }) 34 | var that = this 35 | // 根据电机查找数据库 36 | this.navbarTab(); 37 | 38 | console.log(this.data.feed) 39 | 40 | }, 41 | 42 | onShow:function(res){ 43 | console.log(res) 44 | // 计算屏幕可用高度 45 | try { 46 | const res = wx.getSystemInfoSync() 47 | console.log(res.windowHeight) 48 | this.setData({ 49 | windowHeight:0.8*res.windowHeight-10 50 | }) 51 | } catch (e) {} 52 | 53 | }, 54 | 55 | //点击更新主导航栏下标 56 | navbarTab: function (e) { 57 | if (e) { 58 | this.setData({ 59 | currentIndex: e.currentTarget.dataset.index 60 | }); 61 | } 62 | var that = this; 63 | that.setData({ 64 | feed: [], 65 | nextPage: 0, 66 | categories: ["全部", "化妆类", "电器类", "学习类", "衣物类", "生活类"], 67 | currentData: 0, 68 | }) 69 | 70 | this.userLoad(); 71 | }, 72 | 73 | //滑动更新主导航栏下标 74 | categoriesTab: function (e) { 75 | this.setData({ 76 | // currentIndex: e.currentTarget.dataset.index 77 | currentData: e.currentTarget.dataset.index 78 | }) 79 | console.log(this.data.currentData) 80 | }, 81 | 82 | //更新副导航栏下标 83 | categoriesChange: function (e) { 84 | let current = e.detail.current; 85 | let source = e.detail.source 86 | //console.log(source); 87 | // 这里的source是判断是否是手指触摸 触发的事件 88 | if (source === 'touch') { 89 | this.setData({ 90 | currentData: current 91 | }) 92 | console.log(this.data.currentData) 93 | } 94 | }, 95 | 96 | 97 | 98 | 99 | // 拖到最下面更新数据 100 | lower: function (e) { 101 | wx.showNavigationBarLoading(); 102 | var that = this; 103 | // setTimeout(function(){wx.hideNavigationBarLoading();that.userLoad();}, 1000); 104 | that.userLoad(); 105 | console.log("lower") 106 | }, 107 | 108 | // 调用util.js中读取数据库函数 109 | userLoad: function () { 110 | var that = this; 111 | if (that.data.currentIndex==1){ 112 | util.accUnAccLoad(that, '.'); 113 | }else{ 114 | console.log('ask:', that.data.database); 115 | util.userLoad(that); 116 | } 117 | }, 118 | 119 | //跳转到点击页面 120 | jumpToPost: function (e) { 121 | var id = e.currentTarget.id 122 | console.log(e.currentTarget.id) 123 | console.log(this.data.feed[id]) 124 | var post_data = JSON.stringify(this.data.feed[id]) 125 | wx.navigateTo({ 126 | // url: '../posttest/posttest?post_data=' + post_data 127 | url: '../../Index/contact/contact?post_data=' + post_data 128 | 129 | }) 130 | }, 131 | 132 | //删除商品 133 | deleteGood: function(e) { 134 | var that=this 135 | var id = e.currentTarget.id 136 | //获得帖子id 137 | var post_id = this.data.feed[id]._id 138 | var goods_name = this.data.feed[id].title 139 | wx.showModal({ 140 | title: '删除物品', 141 | content: goods_name, 142 | success(res) { 143 | // 删除云上的帖子的图片 144 | that.removeImage(that.data.feed[id].imgs) 145 | //用户点击删除就删除帖子 146 | if (res.confirm) { 147 | const db = wx.cloud.database() 148 | db.collection('post').doc(post_id).remove({ 149 | //删除成功显示提示 150 | success: function (res) { 151 | console.log("删除成功") 152 | wx.showToast({ 153 | title: '删除成功', 154 | icon: 'success', 155 | duration: 1000 156 | }) 157 | that.setData({ 158 | feed: [], 159 | nextPage: 0, 160 | }) 161 | that.userLoad(); 162 | } 163 | }) 164 | } 165 | } 166 | }) 167 | }, 168 | 169 | 170 | 171 | // 删除云上的图片 172 | removeImage: function (imgs) { 173 | console.log(imgs) 174 | // 不删除默认图片 175 | if(imgs[0]!="cloud://yf-ab2989.7966-yf-ab2989-1258230310/没有实物图.png"){ 176 | wx.cloud.deleteFile({ 177 | fileList: imgs 178 | }).then(res => { 179 | console.log(res.fileList) 180 | }).catch(error => { 181 | }) 182 | console.log("成功删除图片") 183 | } 184 | 185 | }, 186 | 187 | 188 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Index/index_main/index_main.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | var app = getApp() 3 | 4 | Page({ 5 | data: { 6 | 7 | // 轮播图 8 | cardCur: 0, 9 | swiperList: [{ 10 | id: 0, 11 | type: 'image', 12 | url: 'http://tva1.sinaimg.cn/large/007X8olVly1g786i9e923j31400u078p.jpg' 13 | }, { 14 | id: 1, 15 | type: 'image', 16 | url: 'http://tva1.sinaimg.cn/large/007X8olVly1g786i9e923j31400u078p.jpg', 17 | }, { 18 | id: 2, 19 | type: 'image', 20 | url: 'http://tva1.sinaimg.cn/large/007X8olVly1g786i9rs01j31at0psdgh.jpg' 21 | }], 22 | 23 | //用户的信息 24 | openid:"", 25 | 26 | 27 | //这里不写第一次启动展示的时候会有问题 28 | // 目前轮播图显示的位置 29 | swiperCurrent: 0 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面加载 34 | */ 35 | onLoad: function (options) { 36 | // 初始化towerSwiper 传已有的数组名即可 37 | this.towerSwiper('swiperList'); 38 | // 登录 39 | this.login(); 40 | // 获取手机屏幕可用高度 41 | this.getPhoneHight(); 42 | }, 43 | 44 | 45 | onShow: function (options) { 46 | this.login(); 47 | }, 48 | 49 | 50 | 51 | // 获取手机屏幕可用高度 52 | getPhoneHight:function(){ 53 | try { 54 | var res = wx.getSystemInfoSync() 55 | // var windowHeight = res.windowHeight 56 | var windowHeight = 0.88 * res.windowHeight - 10 57 | app.globalData.windowHeight=windowHeight 58 | console.log(app.globalData.windowHeight) 59 | } catch (e) { } 60 | }, 61 | 62 | 63 | 64 | // 登录操作(从云上获取用户信息) 65 | login: function(){ 66 | //获取用户的openid并设置为全局变量 67 | wx.cloud.callFunction({ 68 | name: 'login', 69 | complete: res => { 70 | console.log('callFunction test result: ', res) 71 | this.setData({ 72 | openid: res.result.openid 73 | }) 74 | util.getUserInCloud(this.data.openid); 75 | } 76 | }) 77 | }, 78 | 79 | 80 | 81 | 82 | 83 | ////////////////////////////////轮播图 滑动控制//////////////////////////////// 84 | // cardSwiper 85 | cardSwiper: function(e) { 86 | this.setData({ 87 | cardCur: e.detail.current 88 | }) 89 | }, 90 | // towerSwiper 91 | // 初始化towerSwiper 92 | towerSwiper: function(name) { 93 | let list = this.data[name]; 94 | for (let i = 0; i < list.length; i++) { 95 | list[i].zIndex = parseInt(list.length / 2) + 1 - Math.abs(i - parseInt(list.length / 2)) 96 | list[i].mLeft = i - parseInt(list.length / 2) 97 | } 98 | this.setData({ 99 | swiperList: list 100 | }) 101 | }, 102 | ////////////////////////////////轮播图 滑动控制//////////////////////////////// 103 | 104 | 105 | 106 | // 改变现在的图片点 107 | swiperChange: function(e) { 108 | this.setData({ 109 | swiperCurrent: e.detail.current 110 | }) 111 | }, 112 | 113 | // 跳转到轮播图地址 114 | swipclick: function (e) { 115 | console.log(this.data.swiperCurrent); 116 | wx.navigateTo({ 117 | url: this.data.cardLinks[this.data.swiperCurrent] 118 | }) 119 | }, 120 | 121 | // 跳转到指定的列表地址 122 | jumpToList: function (e) { 123 | var tab_id = 0 124 | var category_id = 0 125 | // 判断跳转的选项卡 126 | switch (e.currentTarget.id) { 127 | case "secondHand": 128 | tab_id = 0; 129 | break; 130 | case "express": 131 | tab_id = 1; 132 | break; 133 | case "help": 134 | tab_id = 2; 135 | category_id = 0; 136 | break; 137 | case "find": 138 | tab_id = 2; 139 | category_id = 1; 140 | break; 141 | case "team": 142 | tab_id = 2; 143 | category_id = 2; 144 | break; 145 | case "coupon": 146 | // 优惠券直接设置路径 147 | url = "../coupon/coupon" 148 | } 149 | if (e.currentTarget.id != "coupon") { 150 | url = "../goods/goods?tab_id=" + tab_id + "&category_id=" + category_id 151 | } 152 | wx.navigateTo({ 153 | // url:"../goods/goods?tab_id=" + tab_id + "&category_id=" + category_id 154 | // url:"../../BackUp/test/test" 155 | url: url 156 | }) 157 | }, 158 | 159 | 160 | // 发布二手交易信息 161 | publishPost:function(){ 162 | wx.navigateTo({ 163 | url:"../../Post/uploadGoods/uploadGoods" 164 | }) 165 | }, 166 | 167 | //发布快递交易信息 168 | publishExpress:function(){ 169 | wx.navigateTo({ 170 | url: "../../Post/uploadExpress/uploadExpress" 171 | }) 172 | }, 173 | 174 | // 发布发现信息 175 | publishDiscover:function(){ 176 | wx.navigateTo({ 177 | url:"../../Post/uploadDiscover/uploadDiscover" 178 | }) 179 | }, 180 | 181 | // 弹出发布选择框 182 | showModal:function(e) { 183 | this.setData({ 184 | modalName: e.currentTarget.dataset.target 185 | }) 186 | }, 187 | // 隐藏发布选择框 188 | hideModal:function(e) { 189 | this.setData({ 190 | modalName: null 191 | }) 192 | }, 193 | 194 | 195 | 196 | 197 | 198 | 199 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadGoods/uploadGoods.wxml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 不需要的物品都可以在这里发布哦 7 | 8 | 9 | 10 | * 11 | 分类 12 | 13 | {{goods_type!=""?goods_type:"请选择闲置物品分类"}} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | * 23 | 校区 24 | 25 | {{goods_region!=""?goods_region:"请选择闲置物品所在校区"}} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | * 35 | 标题 36 | 37 | 38 | 39 | 40 | * 41 | 描述 42 | 43 | 44 | 45 | 46 | 47 | 48 | {{inputLength}} 49 | /140 50 | 51 | 52 | {{inputLength}}/140 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | * 76 | 价格 77 | 78 | 79 | 80 | 81 | * 82 | 原价 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | * 92 | 联系方式 93 | 94 | 95 | 通过微信联系 96 | 97 | 98 | 99 | 通过电话联系 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 113 |
114 |
-------------------------------------------------------------------------------- /miniprogram/pages/Index/contact/contact.wxss: -------------------------------------------------------------------------------- 1 | /* pages/contact/contact.wxss */ 2 | 3 | .btn1 { 4 | width: 200rpx; 5 | height: 200rpx; 6 | margin-top: 20rpx; 7 | color: #999; 8 | border-radius: 100%; 9 | display: flex; 10 | flex-direction: column; 11 | align-items: center; 12 | justify-content: center; 13 | font-size: 30rpx; 14 | background-color: transparent; /*按钮透明*/ 15 | } 16 | 17 | .btn1::after { 18 | border: none; 19 | } 20 | 21 | .btn2 { 22 | width: 200rpx; 23 | height: 200rpx; 24 | border-radius: 100%; 25 | margin-top: 20rpx; 26 | color: #999; 27 | background-color: transparent; /*按钮透明*/ 28 | display: flex; 29 | flex-direction: column; 30 | align-items: center; 31 | justify-content: center; 32 | font-size: 30rpx; 33 | } 34 | 35 | .btn2::after { 36 | border: none; 37 | } 38 | 39 | .block1 { 40 | height: 200rpx; 41 | background: rgb(241, 241, 241); 42 | } 43 | 44 | .circle { 45 | display: flex; 46 | flex-direction: column; 47 | align-items: center; 48 | justify-content: center; 49 | margin-top: 30rpx; 50 | width: 70px; 51 | height: 70px; 52 | background: rgb(229, 77, 66); 53 | border-radius: 100%; 54 | margin: 0 290rpx; 55 | } 56 | 57 | .want { 58 | color: #fff; 59 | } 60 | 61 | .btnImg { 62 | width: 60rpx; 63 | height: 60rpx; 64 | } 65 | 66 | /* 下划线 */ 67 | 68 | .bottom_line { 69 | border-bottom: 1px solid rgb(226, 226, 226); 70 | } 71 | 72 | .post .userInformation { 73 | display: flex; 74 | border-radius: 10px 10px 0 0; 75 | width: 722rpx; /**宽度*/ 76 | height: 110rpx; 77 | margin: 15rpx 15rpx 1rpx 15rpx; 78 | flex-direction: row; 79 | background: #fff; 80 | padding: 0 30rpx; 81 | } 82 | 83 | .post .userInformation .userImg { 84 | width: 110rpx; 85 | height: 110rpx; 86 | padding: 0 20rpx; 87 | line-height: 100rpx; 88 | background: #fff; 89 | border-radius: 100%; 90 | } 91 | 92 | .post .userInformation .userImg image { 93 | width: 70rpx; 94 | height: 70rpx; 95 | border-radius: 90rpx; 96 | line-height: 100rpx; 97 | vertical-align: middle; 98 | } 99 | 100 | .post .userInformation .userName { 101 | padding: 10rpx 10rpx; 102 | font-size: 28rpx; 103 | line-height: 100rpx; 104 | color: rgb(0, 0, 0); 105 | } 106 | 107 | .post .postInformation { 108 | display: flex; 109 | flex-direction: row; 110 | flex-wrap: wrap; 111 | background: #fff; 112 | border-radius: 0; 113 | margin: 2.5rpx 15rpx 0 15rpx; 114 | justify-content: space-between; 115 | height: 80rpx; 116 | padding: 15rpx 15rpx; 117 | align-items: center; 118 | } 119 | 120 | .postInformation3 { 121 | height: 90rpx; 122 | display: flex; 123 | flex-direction: row; 124 | flex-wrap: wrap; 125 | background: #fff; 126 | border-radius: 0; 127 | margin: 0 15rpx 0 15rpx; 128 | align-items: center; 129 | justify-content: space-between; 130 | padding: 15rpx 15rpx; 131 | } 132 | 133 | .post .postInformation2 { 134 | display: flex; 135 | flex-direction: row; 136 | flex-wrap: wrap; 137 | background: #fff; 138 | margin: 0 15rpx 0 15rpx; 139 | padding: 30rpx 30rpx 5rpx 45rpx; 140 | } 141 | 142 | .post .postInformation4 { 143 | display: flex; 144 | flex-direction: column; 145 | flex-wrap: wrap; 146 | background: #fff; 147 | border-radius: 0 0 10px 10px; 148 | margin: 0 15rpx 0 15rpx; 149 | align-items: center; 150 | } 151 | 152 | .post .postInformation .postTitle { 153 | padding: 20rpx 40rpx; 154 | display: inline-block; 155 | flex: 1; 156 | overflow: hidden; 157 | white-space: nowrap; 158 | text-overflow: ellipsis; 159 | font-size: 40rpx; 160 | color: #3d3a3a; 161 | } 162 | 163 | .post .postInformation .goodsPrice { 164 | padding: 20rpx 40rpx; 165 | display: inline-block; 166 | color: #e74552; 167 | font-size: 40rpx; 168 | font-weight: bold; 169 | } 170 | 171 | .item_price_before { 172 | padding: 20rpx 40rpx; 173 | display: inline-block; 174 | color: #b2b2b2; 175 | font-weight: bold; 176 | font-size: 30rpx; 177 | text-decoration: line-through; 178 | } 179 | 180 | .post .postInformation2 .postContent { 181 | font-size: 33rpx; 182 | color: rgb(117, 117, 117); 183 | text-align: justify; 184 | text-justify: newspaper; 185 | word-break: break-all; 186 | } 187 | 188 | .goodsImg { 189 | flex-direction: column; 190 | justify-content: center; 191 | padding-top: 100rpx; 192 | align-items: center; 193 | padding-bottom: 50rpx; 194 | } 195 | 196 | .post .contact { 197 | width: 100%; 198 | height: 100%; 199 | position: fixed; 200 | } 201 | 202 | .good_cell { 203 | padding: 15rpx 0; 204 | align-items: center; 205 | } 206 | 207 | .user_nickname { 208 | display: inline-block; 209 | flex: 1; 210 | overflow: hidden; 211 | white-space: nowrap; 212 | text-overflow: ellipsis; 213 | } 214 | 215 | .user_location { 216 | display: inline-block; 217 | color: #e74552; 218 | } 219 | 220 | .share { 221 | margin-top: auto; 222 | margin-bottom: auto; 223 | margin-left: auto; 224 | } 225 | 226 | .share button { 227 | background-color: rgb(111, 200, 255); 228 | } 229 | -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_express/contact_express.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 姓名: {{express_data.real_name}} 5 | 微信号:{{express_data.wechat_id}} 6 | 手机电话: {{express_data.phone}} 7 | 取件码: {{express_data.code}} 8 | 9 | 10 | 11 | 姓名: {{accepter_real_name}} 12 | 微信号:{{accepter_wechat_id}} 13 | 手机电话: {{accepter_phone}} 14 | 15 | 16 | 17 | 20 | 21 | 26 | 27 | 28 | 29 | 快递点 30 | {{express_data.pickUp}} 31 | 目的地 32 | 33 | {{express_data.destination_1}} 34 | {{express_data.destination_2}} 35 | 36 | {{express_data.destination_detail}} 37 | ****** 38 | 39 | 快递件数 40 | 重量 41 | 42 | 43 | {{express_data.num}}件 44 | {{express_weight}} 45 | 46 | 截止时间 47 | {{express_data.deadline_date}} {{express_data.deadline_time}}之前 48 | 备注 49 | 50 | 51 | {{express_data.note}} 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 温馨提示 63 | 64 | 点击“接单”按钮即可抢单,订单详细信息请在“我的”页面“我的快递”中查看 65 | 66 | 67 | 68 | 69 | 70 | 温馨提示:该订单已经被接啦! 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 是否确定接单 81 | 82 | 83 | 84 | 85 | 86 | 87 | 90 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myDiscover/myDiscover.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | //主导航栏 11 | categories: ["求助", "寻物", "找队友"], 12 | //闲置分类导航栏 13 | categories1: ["我的发布", "我的接单"], 14 | //分类导航栏下标 15 | currentData: 0, 16 | currentData1: 0, 17 | //所要读取的数据库 18 | database: 'recourse', 19 | //数据库数量 20 | count: "", 21 | //数据库数据 22 | feed: [], 23 | //下拉更新数据库数据个数 24 | nextPage: 0, 25 | //我的页面 26 | myPage: true, 27 | //用户openid 28 | user_openid: "", 29 | }, 30 | 31 | //页面加载时读取数据库 32 | onLoad: function (options) { 33 | this.setData({ 34 | user_openid: app.globalData.userCloudData._openid, 35 | }) 36 | // 根据点击查找数据库 37 | this.categoriesTab(); 38 | }, 39 | 40 | //滑动更新主导航栏下标 41 | categoriesTab: function (e) { 42 | if (e) { 43 | this.setData({ 44 | currentData: e.currentTarget.dataset.index 45 | }); 46 | } 47 | var that = this; 48 | that.setData({ 49 | feed: [], 50 | nextPage: 0, 51 | count: 0, 52 | }) 53 | console.log(this.data.currentData) 54 | this.discoverType(); 55 | }, 56 | 57 | //滑动更新主导航栏下标 58 | categories1Tab: function (e) { 59 | if (e) { 60 | this.setData({ 61 | currentData1: e.currentTarget.dataset.index 62 | }); 63 | } 64 | var that = this; 65 | that.setData({ 66 | feed: [], 67 | nextPage: 0, 68 | count: 0, 69 | }) 70 | console.log(this.data.currentData1) 71 | this.discoverType(); 72 | }, 73 | 74 | //更新副导航栏下标 75 | categoriesChange: function (e) { 76 | var that = this; 77 | that.setData({ 78 | feed: [], 79 | nextPage: 0, 80 | count: 0, 81 | }) 82 | let current = e.detail.current; 83 | let source = e.detail.source 84 | //console.log(source); 85 | // 这里的source是判断是否是手指触摸 触发的事件 86 | if (source === 'touch') { 87 | this.setData({ 88 | currentData: current 89 | }) 90 | console.log(this.data.currentData) 91 | // 判断如果为寻物和找队友则更改搜索的数据库 92 | // 根据所选tab更改查找的数据库 93 | this.discoverType() 94 | } 95 | }, 96 | 97 | 98 | // 判断发现 的分类(求助 寻物 找队友) 99 | discoverType: function () { 100 | var that = this; 101 | if (this.data.currentData == 0) { 102 | this.setData({ 103 | database: "recourse", 104 | categories1: ["我的发布", "我的接单"], 105 | }) 106 | if (this.data.currentData1 == 0) { 107 | util.onlyLoad(that); 108 | }else { 109 | util.accLoad(that); 110 | } 111 | } else if (this.data.currentData == 1) { 112 | this.setData({ 113 | database: "discover", 114 | categories1: "", 115 | }) 116 | util.discoverLoad("寻物", that); 117 | }else { 118 | this.setData({ 119 | database: "discover", 120 | categories1: "", 121 | }) 122 | util.discoverLoad("找队友", that); 123 | } 124 | }, 125 | 126 | 127 | // 拖到最下面更新数据 128 | lower: function (e) { 129 | wx.showNavigationBarLoading(); 130 | var that = this; 131 | // setTimeout(function(){wx.hideNavigationBarLoading();that.userLoad();}, 1000); 132 | that.discoverType(); 133 | console.log("lower") 134 | }, 135 | 136 | //跳转到点击页面 137 | jumpToPost: function (e) { 138 | var id = e.currentTarget.id 139 | console.log(e.currentTarget.id) 140 | console.log(this.data.feed[id]) 141 | var post_data = JSON.stringify(this.data.feed[id]) 142 | 143 | if (this.data.feed[id].type == "求助") { 144 | wx.navigateTo({ 145 | // url: '../posttest/posttest?post_data=' + post_data 146 | url: '../../Index/contact_recourse/contact_recourse?post_data=' + post_data 147 | }) 148 | } else { 149 | wx.navigateTo({ 150 | // url: '../posttest/posttest?post_data=' + post_data 151 | url: '../../Index/contact/contact?post_data=' + post_data 152 | }) 153 | } 154 | }, 155 | 156 | 157 | 158 | //删除发现 159 | deletePost: function(e) { 160 | var that=this 161 | var id = e.currentTarget.id 162 | //获得帖子id 163 | var post_id = this.data.feed[id]._id 164 | var post_name = this.data.feed[id].title 165 | 166 | var database="recourse" 167 | if(this.data.feed[id].type!="求助"){ 168 | database="discover" 169 | } 170 | console.log(post_id) 171 | console.log(post_name) 172 | wx.showModal({ 173 | title: '删除发现', 174 | content:"是否删除标题为"+post_name+" 的发现", 175 | success(res) { 176 | //用户点击删除就删除帖子 177 | if (res.confirm) { 178 | const db = wx.cloud.database() 179 | db.collection(database).doc(post_id).remove({ 180 | //删除成功显示提示 181 | success: function (res) { 182 | console.log("删除成功") 183 | wx.showToast({ 184 | title: '删除成功', 185 | icon: 'success', 186 | duration: 1000 187 | }) 188 | that.setData({ 189 | count: 0, 190 | feed: [], 191 | nextPage: 0, 192 | }) 193 | that.discoverType(); 194 | } 195 | }) 196 | } 197 | } 198 | }) 199 | }, 200 | 201 | 202 | 203 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Post/uploadDiscover/uploadDiscover.wxml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 需要帮忙的消息都可以在这里发布哦 6 | 7 | 8 | 9 | * 10 | 分类 11 | 12 | {{type!=""?type:"请输入消息的分类"}} 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | * 21 | 标题 22 | 23 | 24 | 25 | 内容 26 | 27 | 28 | 29 | 30 | 31 | {{inputLength}} 32 | /140 33 | 34 | 35 | {{inputLength}}/140 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | * 58 | 酬金 59 | 60 | 61 | 62 | 63 | 64 | * 65 | 日期选择 66 | 67 | 68 | {{date!=""?date:"请选择日期"}} 69 | 70 | 71 | 72 | 73 | * 74 | 时间选择 75 | 76 | 77 | {{time!=""?time:"请选择时间"}} 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | * 90 | 联系方式 91 | 92 | 93 | 通过微信联系 94 | 95 | 96 | 97 | 通过电话联系 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 提示 112 | 113 | 114 | 115 | 116 | 117 | {{warning}} 118 | 119 | 120 | 121 |
122 |
-------------------------------------------------------------------------------- /miniprogram/pages/Admin/user/user.js: -------------------------------------------------------------------------------- 1 | var app = getApp() 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | //获取的二手物品数据 9 | feed: [], 10 | //下拉继续读取数据 11 | nextPage: 0, 12 | //用户id openid 13 | openid: "" 14 | 15 | }, 16 | 17 | /** 18 | * 生命周期函数--监听页面加载 19 | */ 20 | onLoad: function (options) { 21 | const db = wx.cloud.database() 22 | 23 | console.log('onLoad') 24 | 25 | //调用获取用户信息数据 26 | this.allLoad(); 27 | 28 | console.log(this.data.feed) 29 | }, 30 | 31 | 32 | 33 | // 拖到最下面更新数据 34 | lower: function (e) { 35 | wx.showNavigationBarLoading(); 36 | var that = this; 37 | // setTimeout(function(){wx.hideNavigationBarLoading();that.allLoad();}, 1000); 38 | that.allLoad(); 39 | console.log("lower") 40 | }, 41 | 42 | // 在云数据库上查找数据(查找10条) 43 | allLoad: function () { 44 | var that = this; 45 | // util.allLoad('users', that, '.'); 46 | //查询所有用户 47 | const db = wx.cloud.database() 48 | db.collection('users') 49 | .where({ 50 | "al_approve": false 51 | }) 52 | .orderBy('date', 'desc') 53 | .skip(that.data.nextPage) 54 | .limit(10) // 限制返回数量为 10 条 55 | .get({ 56 | //成功读取写入数据 57 | success: res => { 58 | that.setData({ 59 | feed: this.data.feed.concat(res.data), 60 | nextPage: this.data.nextPage + 10 61 | }) 62 | console.log('[数据库] [查询记录] 成功: ', that.data.feed) 63 | }, 64 | fail: err => { 65 | wx.showToast({ 66 | icon: 'none', 67 | title: '查询记录失败' 68 | }) 69 | console.error('[数据库] [查询记录] 失败:', err) 70 | } 71 | }); 72 | console.log(this.data.feed) 73 | }, 74 | 75 | // 通过用户信息验证 76 | updateUser: function (e) { 77 | console.log(this.data.feed) 78 | var that = this 79 | const idx = e.target.dataset.idx 80 | //获得用户记录id 不是oppenid 81 | var user_id = this.data.feed[idx]._id 82 | var user_openid = this.data.feed[idx]._openid 83 | var users_Name = this.data.feed[idx].nick_name 84 | 85 | // 更新数据库 用户消息 86 | wx.showModal({ 87 | title: '认证通过', 88 | content: users_Name, 89 | success(res) { 90 | if (res.confirm) { 91 | // 调用云函数修改用户信息 92 | wx.cloud.callFunction({ 93 | name: 'approvePass', 94 | data: { 95 | user_id: user_id, 96 | approve: true, 97 | al_approve: true 98 | }, success: function (res) { 99 | console.log("修改成功" + res) 100 | }, fail: function (res) { 101 | console.log(res) 102 | } 103 | }) 104 | // 调用模板消息发送消息 105 | that.sendTemplate("认证成功", user_openid) 106 | } 107 | } 108 | }) 109 | 110 | 111 | 112 | 113 | 114 | 115 | }, 116 | 117 | // 发送模板消息 118 | sendTemplate: function (approve, user_openid) { 119 | console.log(user_openid) 120 | wx.cloud.init() 121 | wx.cloud.callFunction({ 122 | name: 'openapi', 123 | data: { 124 | action: 'sendRegisteredMessage', 125 | approve: approve, 126 | user_openid: user_openid 127 | }, 128 | success: res => { 129 | console.warn('[云函数] [openapi] templateMessage.send 调用成功:', res) 130 | wx.showModal({ 131 | title: '发送成功', 132 | content: '成功发送信息', 133 | showCancel: false, 134 | }) 135 | }, 136 | fail: err => { 137 | wx.showToast({ 138 | icon: 'none', 139 | title: '调用失败', 140 | }) 141 | console.error('[云函数] [openapi] templateMessage.send 调用失败:', err) 142 | } 143 | }) 144 | }, 145 | 146 | //不通过用户验证 147 | removeUser: function (e) { 148 | const idx = e.target.dataset.idx 149 | //获得帖子id 150 | var that = this 151 | var user_id = this.data.feed[idx]._id 152 | var users_Name = this.data.feed[idx].nick_name 153 | var user_openid  =  this.data.feed[idx]._openid 154 | wx.showModal({ 155 | title: '认证不通过', 156 | content: users_Name, 157 | success(res) { 158 | if (res.confirm) { 159 | // 通过用户验证 160 | const db = wx.cloud.database() 161 | wx.cloud.callFunction({ 162 | name: 'approvePass', 163 | data: { 164 | user_id: user_id, 165 | approve: false, 166 | al_approve: true 167 | }, success: function (res) { 168 | console.log("修改成功" + res) 169 | }, fail: function (res) { 170 | console.log(res) 171 | } 172 | }) 173 | // 调用模板消息发送消息 174 | that.sendTemplate("认证不成功", user_openid) 175 | } 176 | } 177 | 178 | }) 179 | 180 | 181 | 182 | }, 183 | 184 | //用户点击放大图片 185 | handleImagePreview:function(e) { 186 | var index = e.target.dataset.index 187 | console.log(e) 188 | var images = this.data.feed[index].approve_img 189 | wx.previewImage({ 190 | current: images[index], //当前预览的图片 191 | urls: images, //所有要预览的图片 192 | }) 193 | }, 194 | 195 | //刷新注册用户 196 | refresh:function() { 197 | this.setData({ 198 | //获取的二手物品数据 199 | feed: [], 200 | //下拉继续读取数据 201 | nextPage: 0, 202 | }) 203 | this.allLoad(); 204 | } 205 | 206 | 207 | }) -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_recourse/contact_recourse.wxss: -------------------------------------------------------------------------------- 1 | /* pages/Index/contact_recourse/contact_recourse.wxss */ 2 | 3 | .userPhone{ 4 | display: flex; 5 | flex-direction: column; 6 | background-color: var(--white); 7 | overflow: hidden; 8 | border-radius:25rpx; 9 | margin: 20rpx 20rpx 0 20rpx; 10 | padding: 15rpx 60rpx; 11 | } 12 | 13 | .text-user{ 14 | font-size: 40rpx; 15 | color: rgb(110, 110, 110); 16 | height: 1.7em; 17 | overflow: hidden; 18 | } 19 | 20 | .btn1 { 21 | width: 200rpx; 22 | height: 200rpx; 23 | margin-top: 20rpx; 24 | color: #999999; 25 | border-radius: 100%; 26 | display: flex; 27 | flex-direction: column; 28 | align-items: center; 29 | justify-content: center; 30 | font-size: 30rpx; 31 | background-color: transparent; /*按钮透明*/ 32 | 33 | } 34 | .btn1::after { 35 | border: none; 36 | 37 | } 38 | .btn2 { 39 | width: 200rpx; 40 | height: 200rpx; 41 | border-radius: 100%; 42 | margin-top: 20rpx; 43 | color: #999999; 44 | background-color: transparent; /*按钮透明*/ 45 | display: flex; 46 | flex-direction: column; 47 | align-items: center; 48 | justify-content: center; 49 | font-size: 30rpx; 50 | } 51 | 52 | .btn2::after { 53 | border: none; 54 | } 55 | .block1{ 56 | height: 200rpx; 57 | background:rgb(241, 241, 241) 58 | 59 | } 60 | .want{ 61 | color: #ffffff; 62 | 63 | } 64 | 65 | .btnImg { 66 | width: 60rpx; 67 | height: 60rpx; 68 | } 69 | /* 下划线 */ 70 | .bottom_line { 71 | border-bottom: 1px solid rgb(226, 226, 226); 72 | } 73 | 74 | .post .userInformation{ 75 | display: flex; 76 | border-radius: 10px 10px 0 0; 77 | width:722rpx; /**宽度*/ 78 | height:110rpx; 79 | margin: 15rpx 15rpx 1rpx 15rpx; 80 | flex-direction: row; 81 | background:#fff; 82 | padding:0 30rpx; 83 | } 84 | 85 | .post .userInformation .userImg{ 86 | width: 110rpx; 87 | height: 110rpx; 88 | padding: 0 20rpx; 89 | line-height:100rpx; 90 | background:#fff; 91 | border-radius: 100%; 92 | } 93 | 94 | .post .userInformation .userImg image{ 95 | width: 70rpx; 96 | height: 70rpx; 97 | border-radius: 90rpx; 98 | line-height:100rpx; 99 | vertical-align: middle; 100 | } 101 | 102 | .post .userInformation .userName { 103 | padding: 10rpx 10rpx; 104 | font-size: 28rpx; 105 | line-height:100rpx; 106 | color: rgb(0, 0, 0); 107 | 108 | } 109 | 110 | .post .postInformation{ 111 | display: flex; 112 | flex-direction: row; 113 | flex-wrap: wrap; 114 | background:#fff; 115 | border-radius: 0; 116 | margin: 2.5rpx 15rpx 0 15rpx; 117 | justify-content: space-between; 118 | height: 80rpx; 119 | padding: 15rpx 15rpx; 120 | align-items: center; 121 | } 122 | .postInformation3{ 123 | height: 90rpx; 124 | display: flex; 125 | flex-direction: row; 126 | flex-wrap: wrap; 127 | background:#fff; 128 | border-radius: 0; 129 | margin: 0 15rpx 0 15rpx; 130 | align-items: center; 131 | justify-content: space-between; 132 | padding: 15rpx 15rpx; 133 | } 134 | 135 | .post .postInformation4{ 136 | display: flex; 137 | flex-direction: column; 138 | flex-wrap: wrap; 139 | background:#fff; 140 | border-radius: 0 0 10px 10px; 141 | margin: 0 15rpx 0 15rpx; 142 | align-items: center; 143 | } 144 | 145 | 146 | 147 | .post .postInformation .postTitle{ 148 | padding: 20rpx 40rpx; 149 | display: inline-block; 150 | flex: 1; 151 | overflow: hidden; 152 | white-space: nowrap; 153 | text-overflow: ellipsis; 154 | font-size:40rpx; 155 | color: #3d3a3a 156 | 157 | } 158 | 159 | .post .postInformation .goodsPrice{ 160 | padding: 20rpx 40rpx; 161 | display: inline-block; 162 | color: #e74552; 163 | font-size:40rpx; 164 | font-weight:bold; 165 | } 166 | 167 | .item_price_before{ 168 | padding: 20rpx 40rpx; 169 | display: inline-block; 170 | color:#B2B2B2; 171 | font-weight:bold; 172 | font-size: 30rpx; 173 | text-decoration:line-through; 174 | } 175 | .post .postInformation2{ 176 | display: flex; 177 | flex-direction: row; 178 | flex-wrap: wrap; 179 | background:#fff; 180 | margin: 0 15rpx 0 15rpx; 181 | padding:65rpx 30rpx 5rpx 45rpx; 182 | } 183 | .post .postInformation2 .postContent{ 184 | font-size:33rpx; 185 | color: rgb(117, 117, 117); 186 | word-break: break-all; 187 | } 188 | 189 | .goodsImg{ 190 | flex-direction: column; 191 | justify-content: center; 192 | padding-top: 100rpx; 193 | align-items:center; 194 | padding-bottom: 50rpx; 195 | } 196 | 197 | .post .contact{ 198 | width: 100%; 199 | height: 100%; 200 | position: fixed; 201 | } 202 | 203 | .good_cell { 204 | padding: 15rpx 0; 205 | align-items: center; 206 | } 207 | .user_nickname { 208 | display: inline-block; 209 | flex: 1; 210 | overflow: hidden; 211 | white-space: nowrap; 212 | text-overflow: ellipsis; 213 | } 214 | 215 | .user_location { 216 | display: inline-block; 217 | color: #e74552; 218 | } 219 | 220 | .share { 221 | margin-top: auto; 222 | margin-bottom: auto; 223 | margin-left: auto; 224 | } 225 | 226 | .share button { 227 | background-color: rgb(111, 200, 255); 228 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_express/contact_express.js: -------------------------------------------------------------------------------- 1 | var util = require('../../../utils/util.js') 2 | const app = getApp(); 3 | Page({ 4 | 5 | data: { 6 | //快递信息 7 | express_data: {}, 8 | //劫取快递重量 9 | express_weight: "", 10 | //用户openid 11 | user_openid: "", 12 | //接收者真实姓名 13 | accepter_real_name: "", 14 | //接收者微信 15 | accepter_wechat_id: "", 16 | //接收者电话号码 17 | accepter_phone: "", 18 | //接收者取件码 19 | accepter_code: "", 20 | //窗口宽度 21 | windowWidth: 0, 22 | // json格式的帖子信息 23 | ori_express_data: {}, 24 | }, 25 | 26 | onLoad: function (options) { 27 | var express_data = JSON.parse(options.express_data) 28 | this.setData({ 29 | express_data: express_data, 30 | // user_openid: app.globalData.userCloudData._openid, 31 | windowWidth: wx.getSystemInfoSync().windowWidth, 32 | ori_express_data: options.express_data, 33 | }) 34 | // 判断是否已有全局的用户信息 35 | if (typeof app.globalData.userCloudData._openid != "undefined") { 36 | this.setData({ 37 | user_openid: app.globalData.userCloudData._openid, 38 | }) 39 | } 40 | 41 | // 检查是否有人接单 42 | this.getAccepter() 43 | 44 | console.log(express_data.accepter_openid) 45 | console.log(express_data._openid) 46 | console.log(this.data.user_openid) 47 | 48 | 49 | }, 50 | 51 | showModal(e) { 52 | this.setData({ 53 | modalName: e.currentTarget.dataset.target 54 | }) 55 | 56 | }, 57 | hideModal(e) { 58 | this.setData({ 59 | modalName: null 60 | }) 61 | }, 62 | 63 | 64 | 65 | // 页面分享函数 66 | onShareAppMessage: function (options) { 67 | if (options.from === 'button') { 68 | // 来自页面内转发按钮 69 | console.log(options.target) 70 | } 71 | return { 72 | //## 此为转发页面所显示的标题 73 | // title: "快递: "+this.data.express_data.region+" "+this.data.express_data.destination_1+this.data.express_data.destination_2, 74 | title: "帮拿快递", 75 | path: 'pages/Index/contact_express/contact_express?express_data=' + this.data.ori_express_data + "&scene=1", 76 | // imageUrl:this.data.express_data.imgs[0], 77 | success: function (res) { 78 | console.log("发送成功") 79 | }, 80 | fail: function () { 81 | console.log("发送失败") 82 | } 83 | } 84 | }, 85 | 86 | 87 | 88 | //接收快递任务 89 | accept: function () { 90 | 91 | console.log(this.data.express_data._id) 92 | console.log(this.data.user_openid) 93 | 94 | // 判断当前用户是否为以注册用户 95 | var isRegistered = util.isRegistered() 96 | if (isRegistered) { 97 | // 通过转发进来的需要设置他的openid 98 | if (!this.data.user_openid) { 99 | this.setData({ 100 | user_openid: app.globalData.userCloudData._openid 101 | }) 102 | } 103 | 104 | if (this.data.express_data._openid == this.data.user_openid) { 105 | wx.showToast({ 106 | title: "本人不能接自己发的单,还是让人来帮忙吧", 107 | icon: 'none', 108 | duration: 1500, 109 | mask: true 110 | }); 111 | } else { 112 | // 添加接单者信息到数据库 113 | this.addAccepter(); 114 | } 115 | } 116 | 117 | }, 118 | 119 | // 添加接单者到数据库 120 | addAccepter:function(){ 121 | wx.cloud.callFunction({ 122 | name: 'updateAccepter', 123 | data: { 124 | _id: this.data.express_data._id, 125 | user_openid: this.data.user_openid, 126 | database: "express" 127 | }, 128 | success: res => { 129 | console.warn('[云函数] [updateExpress] updateExpress 调用成功:', res) 130 | wx.showModal({ 131 | title: '成功接单', 132 | content: '你已成功接单', 133 | showCancel: false, 134 | }) 135 | // 发送接单成功的模板信息 136 | this.sendExpress("true") 137 | }, 138 | fail: err => { 139 | wx.showToast({ 140 | icon: 'none', 141 | title: '接单失败', 142 | }) 143 | console.error('[云函数] [updateExpress] updateExpress 调用失败:', err) 144 | }, 145 | complete:res => { 146 | wx.redirectTo({ 147 | url: "../../News/myExpress/myExpress" 148 | }) 149 | }, 150 | }) 151 | }, 152 | 153 | 154 | 155 | // 发送快递模板消息 156 | sendExpress: function (id) { 157 | if (id == "true") { 158 | var orders = "代收成功" 159 | } else if (id == "false") { 160 | var orders = "代收失败" 161 | } 162 | 163 | wx.cloud.init() 164 | wx.cloud.callFunction({ 165 | name: 'openapi', 166 | data: { 167 | action: 'sendExpressTemplate', 168 | orders: orders, 169 | user_openid: this.data.express_data._openid 170 | }, 171 | success: res => { 172 | console.warn('[云函数] [openapi] sendExpressTemplate 调用成功:', res) 173 | }, 174 | fail: err => { 175 | console.error('[云函数] [openapi] sendExpressTemplate 调用失败:', err) 176 | } 177 | }) 178 | }, 179 | 180 | 181 | 182 | //获取接收者信息 183 | async getAccepter(){ 184 | console.log(this.data.express_data.accepter_openid) 185 | var that=this 186 | if (this.data.express_data.accepter_openid!=""){ 187 | const db = wx.cloud.database() 188 | await db.collection('users').where({ 189 | _openid: this.data.express_data.accepter_openid, 190 | }).get({ 191 | success: async function(res) { 192 | console.log(res.data[0]) 193 | await that.setData({ 194 | accepter_real_name: res.data[0].real_name, 195 | accepter_wechat_id: res.data[0].wechat_id, 196 | accepter_phone: res.data[0].phone, 197 | accepter_code: res.data[0].code, 198 | }) 199 | } 200 | }) 201 | }else { 202 | that.setData({ 203 | accepter_real_name: "", 204 | accepter_wechat_id: "", 205 | accepter_phone: "", 206 | accepter_code: "", 207 | }) 208 | } 209 | } 210 | }) -------------------------------------------------------------------------------- /miniprogram/templates/oneCol-template/oneCol-template.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/templates/express-template/express-template.wxml: -------------------------------------------------------------------------------- 1 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /miniprogram/pages/News/myExpress/myExpress.wxss: -------------------------------------------------------------------------------- 1 | /* pages/News/myExpress/myExpress.wxss */ 2 | .navbar{ 3 | display: flex; 4 | width: 100%; 5 | flex-direction: row; 6 | line-height: 80rpx; 7 | } 8 | .navbar .item{ 9 | flex: auto; 10 | font-size: 30rpx; 11 | text-align: center; 12 | background: #fff; 13 | /* font-weight: bold; */ 14 | } 15 | .navbar .item.active{ 16 | color: #1296DB; 17 | position: relative; 18 | } 19 | .navbar .item.active::after{ 20 | content: ""; 21 | display: block; 22 | position: absolute; 23 | margin-left: auto; 24 | margin-right:auto; 25 | width: 50%; 26 | height: 4rpx; 27 | bottom: 0; 28 | left: 0; 29 | right: 0; 30 | background: #1296DB; 31 | } 32 | .categories{ 33 | display: flex; 34 | width: 100%; 35 | flex-direction: row; 36 | line-height: 80rpx; 37 | } 38 | .categories .item{ 39 | flex: auto; 40 | font-size: 30rpx; 41 | text-align: center; 42 | background: #fff; 43 | /* font-weight: bold; */ 44 | } 45 | .categories .item.active{ 46 | color: #1296DB; 47 | position: relative; 48 | } 49 | .categories .item.active::after{ 50 | content: ""; 51 | display: block; 52 | position: absolute; 53 | margin-left: auto; 54 | margin-right:auto; 55 | width: 50%; 56 | height: 4rpx; 57 | bottom: 0; 58 | left: 0; 59 | right: 0; 60 | background: #1296DB; 61 | } 62 | 63 | 64 | 65 | .swiper{ 66 | display: flex; 67 | width: 100%; 68 | flex-direction: row; 69 | line-height: 80rpx; 70 | position: fixed; 71 | max-height: 100%; 72 | height: 100%; 73 | } 74 | 75 | 76 | 77 | .container { 78 | padding: 0 12.5rpx 0 12.5rpx; 79 | width:750rpx; 80 | display: flex; 81 | flex-direction:row; 82 | flex-wrap:wrap; 83 | justify-content:space-between; 84 | } 85 | 86 | 87 | .item_each{ 88 | margin: 7.5rpx 5rpx 7.5rpx 5rpx; 89 | display: inline-block; 90 | width: 352.5rpx; 91 | border-radius: 3%; 92 | background-color: #fff; 93 | } 94 | 95 | .item_cell{ 96 | margin: 0 20rpx 0 20rpx; 97 | display: flex; 98 | align-items: center; 99 | justify-content: space-between; 100 | } 101 | 102 | .item_text { 103 | overflow: hidden; 104 | text-overflow: ellipsis; 105 | display: -webkit-box; 106 | -webkit-line-clamp: 1; 107 | -webkit-box-orient: vertical; 108 | align-content: center; 109 | color:black; 110 | } 111 | 112 | .item_price{ 113 | display:inline-block; 114 | font-size: 30rpx; 115 | font-weight: bold; 116 | color:#FF4F64; 117 | 118 | } 119 | 120 | .item_price_before{ 121 | display:inline-block; 122 | flex:1rpx; 123 | font-size: 25rpx; 124 | text-decoration:line-through; 125 | color:#B2B2B2; 126 | } 127 | 128 | 129 | /* 快递页面 */ 130 | 131 | .express-card { 132 | display: block; 133 | overflow: hidden; 134 | } 135 | 136 | /* / */ 137 | .express-card>.express-item { 138 | display: block; 139 | background-color: var(--white); 140 | overflow: hidden; 141 | border-radius: 25rpx; 142 | margin: 10rpx 20rpx; 143 | } 144 | 145 | .express-card.article { 146 | display: block; 147 | } 148 | 149 | .express-card.article>.express-item { 150 | padding-bottom: 30rpx; 151 | } 152 | /* */ 153 | .express-card.article>.express-item .title .text-cut{ 154 | font-size: 40rpx; 155 | font-weight: 350; 156 | color: var(--black); 157 | line-height: 100rpx; 158 | padding: 0 0 0 20rpx; 159 | } 160 | 161 | .express-card.article>.express-item .title .text-price{ 162 | font-size: 40rpx; 163 | font-weight: 350; 164 | line-height: 100rpx; 165 | padding: 0 30rpx; 166 | color: red; 167 | } 168 | 169 | 170 | .express-card.article>.express-item .content { 171 | display: flex; 172 | padding: 15rpx 30rpx; 173 | } 174 | 175 | 176 | .express-card.article>.express-item .content .desc { 177 | flex: 1; 178 | display: flex; 179 | flex-direction: column; 180 | justify-content: space-between; 181 | /* 截止日期与备注的间距 */ 182 | line-height: 10rpx; 183 | } 184 | 185 | .express-card.article>.express-item .content .text-content { 186 | font-size: 30rpx; 187 | color: #888; 188 | height: 1.4em; 189 | overflow: hidden; 190 | } 191 | .express-card.article>.express-item .content .text-content2 { 192 | font-size: 30rpx; 193 | color: #888; 194 | height: 1.4em; 195 | overflow: hidden; 196 | padding: 20rpx 40rpx; 197 | } 198 | .express-card.article>.express-item .content .text-content3 { 199 | font-size: 30rpx; 200 | padding: 35rpx 0 10rpx 0; 201 | color:#1296DB; 202 | width:250px; 203 | white-space:nowrap; 204 | overflow:hidden; 205 | text-overflow:ellipsis; 206 | } 207 | 208 | .express-card .express-item .content .desc .block1{ 209 | /* flex-direction: row; */ 210 | display: flex; 211 | flex-direction: row; 212 | flex-wrap: wrap; 213 | background:#fff; 214 | border-radius: 0; 215 | /* margin: 2.5rpx 15rpx 0 15rpx; */ 216 | justify-content: flex-start; 217 | height: 80rpx; 218 | /* padding: 15rpx 15rpx; */ 219 | align-items: center; 220 | } 221 | 222 | .express-card .express-item .content .desc .condition{ 223 | position: absolute;/*这里一定要设置*/ 224 | margin-top: 10rpx; 225 | margin-left: 463rpx; 226 | } 227 | .express-card .express-item .content .desc .condition .cond{ 228 | width: 215rpx; 229 | height: 215rpx; 230 | /* float: right; */ 231 | transform:rotate(-15deg); 232 | } 233 | 234 | .express-card.delete { 235 | height: 80rpx; 236 | background: #fff; 237 | border-radius: 10rpx; 238 | margin: 0rpx 20rpx 20rpx 20rpx; 239 | display: flex; 240 | justify-content: center; 241 | align-items: center; 242 | } -------------------------------------------------------------------------------- /miniprogram/pages/Index/contact_recourse/contact_recourse.js: -------------------------------------------------------------------------------- 1 | // pages/contact/contact.js 2 | var util = require('../../../utils/util.js') 3 | var app = getApp() 4 | 5 | 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | //用户信息 13 | user_id: "", 14 | user_data: {}, 15 | //帖子信息 16 | post_data:{}, 17 | //头像列表 18 | swiperList:[], 19 | // 当前使用者的id 20 | user_openid:"", 21 | // 接单者的信息 22 | accepter_wechat_id: "", 23 | accepter_phone: "", 24 | //窗口宽度 25 | windowWidth: 0, 26 | // json格式的帖子信息 27 | ori_post_data: {}, 28 | }, 29 | showModal(e) { 30 | this.setData({ 31 | modalName: e.currentTarget.dataset.target 32 | }) 33 | 34 | }, 35 | hideModal(e) { 36 | this.setData({ 37 | modalName: null 38 | }) 39 | }, 40 | 41 | /** 42 | * 生命周期函数--监听页面加载 43 | */ 44 | onLoad: function (options) { 45 | var post_data = JSON.parse(options.post_data) 46 | this.setData({ 47 | swiperList: app.globalData.swiperList, 48 | post_data: post_data, 49 | user_id: post_data._openid, 50 | // user_openid: app.globalData.userCloudData._openid, 51 | windowWidth: wx.getSystemInfoSync().windowWidth, 52 | ori_post_data: options.post_data, 53 | }) 54 | // 判断是否已有全局的用户信息 55 | if (typeof app.globalData.userCloudData._openid != "undefined") { 56 | this.setData({ 57 | user_openid: app.globalData.userCloudData._openid, 58 | }) 59 | } 60 | 61 | console.log(this.data.post_data) 62 | console.log(this.data.user_id) 63 | 64 | // 获取求助主人的信息 65 | this.getUserData() 66 | // 检查是否有人接单 67 | this.getAccepter() 68 | }, 69 | 70 | // 页面分享函数 71 | onShareAppMessage: function (options) { 72 | if (options.from === 'button') { 73 | // 来自页面内转发按钮 74 | console.log(options.target) 75 | } 76 | return { 77 | //## 此为转发页面所显示的标题 78 | title: "求助: " + this.data.post_data.title, 79 | path: 'pages/Index/contact_recourse/contact_recourse?post_data=' + this.data.ori_post_data, 80 | // imageUrl:this.data.post_data.imgs[0], 81 | success: function (res) { 82 | console.log("发送成功") 83 | }, 84 | fail: function () { 85 | console.log("发送失败") 86 | } 87 | } 88 | }, 89 | 90 | 91 | // 获取物品主人的信息 92 | getUserData:function(){ 93 | const db = wx.cloud.database() 94 | // 查询当前物品的主人信息 95 | db.collection('users').where({ 96 | _openid:this.data.user_id 97 | }).get({ 98 | success: res => { 99 | this.setData({ 100 | user_data:res.data[0] 101 | }) 102 | console.log('[数据库] [查询记录] 成功: ', this.data.user_data) 103 | }, 104 | fail: err => { 105 | wx.showToast({ 106 | icon: 'none', 107 | title: '查询记录失败' 108 | }) 109 | console.error('[数据库] [查询记录] 失败:', err) 110 | } 111 | }); 112 | }, 113 | 114 | //接收快递任务 115 | accept: function () { 116 | console.log(this.data.post_data._id) 117 | console.log(this.data.user_openid) 118 | 119 | // 判断当前用户是否为以注册用户 120 | var isRegistered = util.isRegistered() 121 | if (isRegistered) { 122 | // 通过转发进来的需要设置他的openid 123 | if (!this.data.user_openid) { 124 | this.setData({ 125 | user_openid: app.globalData.userCloudData._openid 126 | }) 127 | } 128 | 129 | if (this.data.post_data._openid == this.data.user_openid) { 130 | wx.showToast({ 131 | title: "本人不能接自己的帖子,还是让别人来帮忙吧", 132 | icon: 'none', 133 | duration: 1500, 134 | mask: true 135 | }); 136 | } else { 137 | // 添加接单者到数据库 138 | this.addAccepter(); 139 | } 140 | } 141 | }, 142 | 143 | // 添加接单者到数据库 144 | addAccepter:function(){ 145 | wx.cloud.callFunction({ 146 | name: 'updateAccepter', 147 | data: { 148 | _id: this.data.post_data._id, 149 | user_openid: this.data.user_openid, 150 | database: "recourse" 151 | }, 152 | success: res => { 153 | console.warn('[云函数] [updateAccepter] updateAccepter 调用成功:', res) 154 | wx.showModal({ 155 | title: '成功接单', 156 | content: '你已成功接单', 157 | showCancel: false, 158 | }) 159 | // 成功后发送求助的模板信息 160 | this.sendRecourse("求助成功") 161 | }, 162 | fail: err => { 163 | wx.showToast({ 164 | icon: 'none', 165 | title: '调用失败', 166 | }) 167 | console.error('[云函数] [updateAccepter] updateAccepter 调用失败:', err) 168 | }, 169 | complete:res => { 170 | // 直接跳转到我的求助 171 | wx.redirectTo({ 172 | url: "../../News/myDiscover/myDiscover" 173 | }) 174 | }, 175 | }) 176 | 177 | 178 | 179 | }, 180 | 181 | 182 | 183 | 184 | 185 | // 发送求助模板消息 186 | sendRecourse: function (orders) { 187 | var orders = orders 188 | wx.cloud.init() 189 | wx.cloud.callFunction({ 190 | name: 'openapi', 191 | data: { 192 | action: 'sendRecourseTemplate', 193 | orders: orders, 194 | user_openid: this.data.post_data._openid 195 | }, 196 | success: res => { 197 | console.warn('[云函数] [openapi] sendRecourseTemplate 调用成功:', res) 198 | }, 199 | fail: err => { 200 | console.error('[云函数] [openapi] sendRecourseTemplate 调用失败:', err) 201 | } 202 | }) 203 | }, 204 | 205 | 206 | 207 | //获取接收者信息 208 | async getAccepter(){ 209 | console.log('fuck',this.data.post_data.accepter_openid) 210 | var that=this 211 | if (this.data.post_data.accepter_openid!=""){ 212 | const db = wx.cloud.database() 213 | await db.collection('users').where({ 214 | _openid: this.data.post_data.accepter_openid, 215 | }).get({ 216 | success: async function(res) { 217 | console.log(res.data[0]) 218 | await that.setData({ 219 | accepter_wechat_id: res.data[0].wechat_id, 220 | accepter_phone: res.data[0].phone, 221 | }) 222 | } 223 | }) 224 | } 225 | }, 226 | 227 | //用户点击放大图片 228 | handleImagePreview:function(e) { 229 | var index = e.target.dataset.index 230 | var images = this.data.post_data.imgs 231 | wx.previewImage({ 232 | current: images[index], //当前预览的图片 233 | urls: images, //所有要预览的图片 234 | }) 235 | }, 236 | 237 | }) --------------------------------------------------------------------------------