├── component ├── bottomLoadMore │ ├── loading.json │ ├── loading.wxss │ ├── loading.wxml │ └── loading.js ├── auth │ ├── auth.json │ ├── auth.wxss │ ├── auth.wxml │ └── auth.js ├── rich-parse │ ├── image-loader │ │ ├── image-loader.json │ │ ├── image-loader.wxml │ │ └── image-loader.js │ ├── rich-parse.json │ ├── rich-parse.wxss │ ├── rich-render │ │ ├── rich-render.json │ │ ├── render-children.wxml │ │ ├── rich-render.js │ │ ├── rich-render.wxml │ │ └── rich-render.wxss │ ├── rich-parse.wxml │ ├── rich-parse.js │ └── helper │ │ ├── htmlparser.js │ │ ├── wx-discode.js │ │ └── html2json.js └── image-loader │ ├── image-loader.json │ ├── prevImage.png │ ├── image-loader.wxss │ ├── image-loader.wxml │ └── image-loader.js ├── pages ├── shophelper │ ├── shophelper.json │ ├── shophelper.wxml │ ├── shophelper.wxss │ └── shophelper.js ├── me │ ├── me.json │ ├── me.wxml │ ├── me.wxss │ └── me.js ├── logs │ ├── logs.json │ ├── logs.wxss │ ├── logs.wxml │ └── logs.js ├── index │ ├── index.json │ ├── index.js │ ├── index.wxml │ └── index.wxss ├── secondhandstore │ ├── detail │ │ ├── detail.json │ │ ├── chat │ │ │ ├── chat.json │ │ │ ├── chat.wxml │ │ │ ├── chat.js │ │ │ └── chat.wxss │ │ ├── detail.wxml │ │ ├── detail.js │ │ └── detail.wxss │ ├── secondhandstore.json │ ├── secondhandstore.wxml │ ├── secondhandstore.js │ └── secondhandstore.wxss └── foundthing │ ├── foundthing.json │ ├── foundthing.wxml │ ├── foundthing.wxss │ └── foundthing.js ├── img ├── +.png ├── add.png ├── addr.png ├── back.jpg ├── call.png ├── key.jpg ├── sale.png ├── goods.png ├── person.png └── toast │ └── warn.png ├── app.wxss ├── README.md ├── app.json ├── utils ├── util.js ├── web.js └── config.js ├── app.js └── project.config.json /component/bottomLoadMore/loading.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /pages/shophelper/shophelper.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /img/+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/+.png -------------------------------------------------------------------------------- /component/auth/auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /component/rich-parse/image-loader/image-loader.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /img/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/add.png -------------------------------------------------------------------------------- /img/addr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/addr.png -------------------------------------------------------------------------------- /img/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/back.jpg -------------------------------------------------------------------------------- /img/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/call.png -------------------------------------------------------------------------------- /img/key.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/key.jpg -------------------------------------------------------------------------------- /img/sale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/sale.png -------------------------------------------------------------------------------- /img/goods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/goods.png -------------------------------------------------------------------------------- /img/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/person.png -------------------------------------------------------------------------------- /pages/me/me.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "个人中心" 4 | } -------------------------------------------------------------------------------- /pages/logs/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "查看启动日志", 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /component/image-loader/image-loader.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /img/toast/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/img/toast/warn.png -------------------------------------------------------------------------------- /pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "auth": "/component/auth/auth" 4 | } 5 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | .container { 3 | box-sizing: border-box; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /pages/secondhandstore/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarTitleText": "物品详情页" 4 | } -------------------------------------------------------------------------------- /pages/secondhandstore/detail/chat/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarTitleText": "微聊" 6 | } -------------------------------------------------------------------------------- /component/image-loader/prevImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangzhangss/wx_campus_helper/HEAD/component/image-loader/prevImage.png -------------------------------------------------------------------------------- /pages/logs/logs.wxss: -------------------------------------------------------------------------------- 1 | .log-list { 2 | display: flex; 3 | flex-direction: column; 4 | padding: 40rpx; 5 | } 6 | .log-item { 7 | margin: 10rpx; 8 | } 9 | -------------------------------------------------------------------------------- /component/rich-parse/rich-parse.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "rich-render": "./rich-render/rich-render" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /component/rich-parse/rich-parse.wxss: -------------------------------------------------------------------------------- 1 | .rich-parse { 2 | font-family: Helvetica, sans-serif; 3 | font-size: 28rpx; 4 | color: #666; 5 | line-height: 1.8; 6 | } 7 | -------------------------------------------------------------------------------- /pages/foundthing/foundthing.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#DC143C", 4 | "navigationBarTitleText": "失物招领", 5 | "navigationBarTextStyle": "white" 6 | } -------------------------------------------------------------------------------- /component/rich-parse/rich-render/rich-render.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "rich-render": "./rich-render", 5 | "image-loader": "../image-loader/image-loader" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /pages/logs/logs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{index + 1}}. {{log}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /component/rich-parse/image-loader/image-loader.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /component/rich-parse/rich-parse.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /pages/secondhandstore/secondhandstore.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "navigationBarBackgroundColor": "#ee0000", 5 | "navigationBarTitleText": "二手商城", 6 | "navigationBarTextStyle": "white" 7 | 8 | 9 | } -------------------------------------------------------------------------------- /component/rich-parse/rich-render/render-children.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component/bottomLoadMore/loading.wxss: -------------------------------------------------------------------------------- 1 | /* pages/component/loading.wxss */ 2 | button{ 3 | background: none; 4 | } 5 | button::after{ 6 | border: none; 7 | } 8 | .loading,.more{ 9 | color: rgba(0, 0, 0, 0.4); 10 | font-size: 25rpx; 11 | margin: 20rpx 0; 12 | text-align: center; 13 | } -------------------------------------------------------------------------------- /component/image-loader/image-loader.wxss: -------------------------------------------------------------------------------- 1 | /* pages/component/imagePrevLoad/imagePrevLoad.wxss */ 2 | @keyframes fadeIn { 3 | 0% { opacity: 0; } 4 | 50% { opacity: 0.5; } 5 | 100% { opacity: 1; } 6 | } 7 | .fade_in { 8 | animation: fadeIn 1s ease; 9 | width: 100%; 10 | height: 100%; 11 | display:block; 12 | } -------------------------------------------------------------------------------- /pages/logs/logs.js: -------------------------------------------------------------------------------- 1 | //logs.js 2 | const util = require('../../utils/util.js') 3 | 4 | Page({ 5 | data: { 6 | logs: [] 7 | }, 8 | onLoad: function () { 9 | this.setData({ 10 | logs: (wx.getStorageSync('logs') || []).map(log => { 11 | return util.formatTime(new Date(log)) 12 | }) 13 | }) 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /component/bottomLoadMore/loading.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pages/index/index.js: -------------------------------------------------------------------------------- 1 | //index.js 2 | //获取应用实例 3 | const app = getApp(); 4 | const config = require("../../utils/config.js"); 5 | 6 | Page({ 7 | data:{ 8 | userInfo:{}, 9 | notice: config.getIndex().notice 10 | }, 11 | authCallback:function(){ 12 | console.log("用户回调用完成....."); 13 | }, 14 | onLoad:function () { 15 | 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /component/rich-parse/image-loader/image-loader.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | properties: { 3 | src: { 4 | type: String, 5 | value: '', 6 | observer() { 7 | this.setData({ displayImg: false }) 8 | } 9 | } 10 | }, 11 | 12 | data: { 13 | displayImg: false, 14 | }, 15 | 16 | methods: { 17 | onImgLoad() { 18 | this.setData({ displayImg: true }) 19 | } 20 | } 21 | }) 22 | -------------------------------------------------------------------------------- /component/image-loader/image-loader.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wx_campus_helper 2 | 微信小程序 毕业设计 校园助手 二手 跑腿 商城... 3 | 4 | #### 首页展示 5 | 6 | ![首页](http://assist-tool.oss-cn-beijing.aliyuncs.com/campus-helper-backimg.png) 7 | 8 | ####程序说明 9 | 10 | 这是一个单机版的小程序.... 11 | 12 | 利用缓存实现动态数据储存交互 13 | 14 | /utils/config.js 为初始化配置和一个默认全局配置,初始化数据自己按照格式更改即可 15 | /utils/web.js 是工具库 16 | 17 | ###### 2019-3-20 complete clone前请star 尊重作者的劳动成果!!! 18 | 19 | -------------------------------------------------------------------------------- /component/bottomLoadMore/loading.js: -------------------------------------------------------------------------------- 1 | // pages/component/loading.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | loading:{ 8 | type: String, 9 | value:"false" 10 | }, 11 | haveMore:{ 12 | type: String, 13 | value: "false" 14 | } 15 | }, 16 | 17 | /** 18 | * 组件的初始数据 19 | */ 20 | data: { 21 | 22 | }, 23 | 24 | /** 25 | * 组件的方法列表 26 | */ 27 | methods: { 28 | 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/logs/logs", 5 | "pages/foundthing/foundthing", 6 | "pages/shophelper/shophelper", 7 | "pages/secondhandstore/secondhandstore", 8 | "pages/me/me", 9 | "pages/secondhandstore/detail/detail", 10 | "pages/secondhandstore/detail/chat/chat" 11 | ], 12 | "window": { 13 | "backgroundTextStyle": "light", 14 | "navigationBarBackgroundColor": "#ee0000", 15 | "navigationBarTitleText": "校园助手", 16 | "navigationBarTextStyle": "white" 17 | } 18 | } -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | module.exports = { 18 | formatTime: formatTime 19 | } 20 | -------------------------------------------------------------------------------- /component/auth/auth.wxss: -------------------------------------------------------------------------------- 1 | /* pages/component/auth/auth.wxss */ 2 | .accredit{ 3 | width:100%; 4 | height: 100%; 5 | position: fixed; 6 | top: 0; 7 | left: 0; 8 | z-index: 99999; 9 | display: flex; 10 | align-items: center; 11 | justify-content: center; 12 | } 13 | .accredit-view{ 14 | width: 400rpx; 15 | height: 400rpx; 16 | background: #fff; 17 | border: 2rpx solid #eee; 18 | border-radius: 10rpx; 19 | position: relative; 20 | } 21 | .accredit-btn{ 22 | 23 | color: #fff; 24 | width:80%; 25 | font-size: 32rpx; 26 | line-height: 80rpx; 27 | position: absolute; 28 | left: 10%; 29 | bottom: 20rpx; 30 | } 31 | -------------------------------------------------------------------------------- /component/auth/auth.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 微信授权 5 | 6 | 7 | 8 | 获取你的公开信息 9 | (昵称、头像) 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{notice}} 7 | 8 | 9 | 10 | 11 | 失物招领 12 | 13 | 14 | 跑腿代购 15 | 16 | 17 | 二手商城 18 | 19 | 20 | 个人中心 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /component/rich-parse/rich-render/rich-render.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | options: { 3 | addGlobalClass: true, 4 | }, 5 | 6 | properties: { 7 | item: { 8 | type: Object, 9 | value: {}, 10 | }, 11 | images: { 12 | type: Array, 13 | value: [], 14 | }, 15 | parse_id: { 16 | type: String, 17 | value: '', 18 | } 19 | }, 20 | 21 | data: { 22 | imageWidths: {} 23 | }, 24 | 25 | methods: { 26 | onImgTap(e) { 27 | global.richParses[this.data.parse_id].onImgTap(e) 28 | }, 29 | 30 | onLinkTap(e) { 31 | global.richParses[this.data.parse_id].onLinkTap(e) 32 | }, 33 | 34 | onImgLoad(e) { 35 | this.data.imageWidths[e.target.dataset.src] = e.detail.width + 'px' 36 | this.setData({ imageWidths: this.data.imageWidths }) 37 | } 38 | } 39 | }) 40 | -------------------------------------------------------------------------------- /pages/secondhandstore/detail/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ... 9 | 10 | 11 | 12 | {{detail.desc}} 13 | 14 | 15 | 16 | 17 | {{detail.name}} 18 | 19 | 20 | 微聊 21 | 电话 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /component/auth/auth.js: -------------------------------------------------------------------------------- 1 | // pages/component/auth/auth.js 2 | const app = getApp(); 3 | 4 | Component({ 5 | /** 6 | * 组件的属性列表 7 | */ 8 | properties: { 9 | //主要按钮背景色 可随着整体背景色改变 自定义 10 | color: { 11 | type: String, 12 | value: "#02c6dc" 13 | }, 14 | }, 15 | 16 | /** 17 | * 组件的初始数据 18 | */ 19 | data: { 20 | userInfo:null 21 | }, 22 | attached:function(e){ 23 | 24 | this.setData({ 25 | userInfo: app.globalData.userInfo 26 | }) 27 | 28 | }, 29 | /** 30 | * 组件的方法列表 31 | */ 32 | methods: { 33 | _bindgetuserinfo:function(e){ 34 | 35 | console.log("用户绑定完成下面回调....",e); 36 | 37 | if (e.detail.userInfo != undefined){ 38 | this.setData({ 39 | userInfo: e.detail.userInfo 40 | }) 41 | console.log("用户授权..."); 42 | wx.setStorageSync("userInfo", e.detail.userInfo); 43 | app.globalData.userInfo = e.detail.userInfo; 44 | } 45 | 46 | this.triggerEvent("authCallback", e.detail); 47 | } 48 | } 49 | }) 50 | -------------------------------------------------------------------------------- /component/image-loader/image-loader.js: -------------------------------------------------------------------------------- 1 | // pages/component/imagePrevLoad/imagePrevLoad.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | //占位图片 8 | prevImage:{ 9 | type: String, 10 | value: "./prevImage.png", 11 | }, 12 | //图片的地址,必须 13 | src:{ 14 | type:String, 15 | value:"" 16 | }, 17 | mode:{ 18 | type: String, 19 | value: "widthFix" 20 | }, 21 | imageStyle:{ 22 | type: String, 23 | value: "" 24 | }, 25 | loaded:{ 26 | type: String, 27 | value: "false" //"true" 非true 28 | }, 29 | index:{ 30 | type: Number, 31 | value: 0 32 | } 33 | }, 34 | /** 35 | * 组件的初始数据 36 | */ 37 | data:{ 38 | 39 | }, 40 | attached:function(){}, 41 | /** 42 | * 组件的方法列表 43 | */ 44 | methods: { 45 | _loadComplete:function(e){ 46 | 47 | this.setData({ 48 | loaded:"true" 49 | }) 50 | 51 | this.triggerEvent('bindload',e); 52 | } 53 | } 54 | }) 55 | -------------------------------------------------------------------------------- /pages/secondhandstore/detail/detail.js: -------------------------------------------------------------------------------- 1 | // pages/secondhandstore/detail/detail.js 2 | const app = getApp(); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | 10 | }, 11 | chat:function(e){ 12 | wx.navigateTo({ 13 | url: './chat/chat?url='+this.data.detail.avatars, 14 | }) 15 | }, 16 | call:function(e){ 17 | wx.makePhoneCall({ 18 | phoneNumber: e.currentTarget.dataset.num, 19 | }) 20 | }, 21 | /** 22 | * 生命周期函数--监听页面加载 23 | */ 24 | onLoad: function (options) { 25 | this.setData({ 26 | detail:app.globalData.goodsdetail 27 | }) 28 | }, 29 | 30 | /** 31 | * 生命周期函数--监听页面初次渲染完成 32 | */ 33 | onReady: function () { 34 | 35 | }, 36 | 37 | /** 38 | * 生命周期函数--监听页面显示 39 | */ 40 | onShow: function () { 41 | 42 | }, 43 | 44 | /** 45 | * 生命周期函数--监听页面隐藏 46 | */ 47 | onHide: function () { 48 | 49 | }, 50 | 51 | /** 52 | * 生命周期函数--监听页面卸载 53 | */ 54 | onUnload: function () { 55 | 56 | }, 57 | 58 | /** 59 | * 页面相关事件处理函数--监听用户下拉动作 60 | */ 61 | onPullDownRefresh: function () { 62 | 63 | }, 64 | 65 | /** 66 | * 页面上拉触底事件的处理函数 67 | */ 68 | onReachBottom: function () { 69 | 70 | }, 71 | 72 | /** 73 | * 用户点击右上角分享 74 | */ 75 | onShareAppMessage: function () { 76 | 77 | } 78 | }) -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | /**index.wxss**/ 2 | auth{ 3 | 4 | } 5 | .backimg{ 6 | position: absolute; 7 | top: 0; 8 | bottom: 0; 9 | left: 0; 10 | right: 0; 11 | width: 100%; 12 | height: 100%; 13 | z-index: 50; 14 | } 15 | .container{ 16 | height:100vh; 17 | position: relative; 18 | z-index: 100; 19 | overflow: hidden; 20 | color: white; 21 | } 22 | .container >view{ 23 | opacity: 0.8; 24 | } 25 | .notice{ 26 | width: 90%; 27 | height: 300rpx; 28 | background-color: rgba(255,255,255,1); 29 | border-radius: 20rpx; 30 | padding:20rpx; 31 | box-sizing: border-box; 32 | margin:50rpx auto; 33 | color: rgba(233, 55, 55, 0.548); 34 | box-shadow: 1px 1px 5px 1px rgb(247, 69, 38); 35 | } 36 | .menu-box{ 37 | position: absolute; 38 | bottom: 5vh; 39 | width:90vw; 40 | left: 5vw; 41 | display: flex; 42 | justify-content: space-around; 43 | align-items: center; 44 | } 45 | .menu-box .one{ 46 | border-radius: 10rpx; 47 | height: 100rpx; 48 | width: 20vw; 49 | font-size: 25rpx; 50 | line-height: 100rpx; 51 | text-align: center; 52 | } 53 | .menu-box .a{ 54 | background-color: rgb(231, 47, 47); 55 | } 56 | .menu-box .b{ 57 | background-color: rgb(74, 211, 19); 58 | } 59 | .menu-box .c{ 60 | background-color: rgb(65, 124, 235); 61 | } 62 | .menu-box .d{ 63 | background-color: rgb(233, 132, 49); 64 | } -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | const config = require("./utils/config.js"); 3 | const webUtil = require("./utils/web.js"); 4 | App({ 5 | onLaunch: function () { 6 | // 展示本地存储能力 7 | var logs = wx.getStorageSync('logs') || [] 8 | 9 | //配置中取出初始化数据 10 | 11 | //1.二手商品 12 | let goodsList = wx.getStorageSync("goodsList"); 13 | if(goodsList){ 14 | console.log("二手商品数据不为空,不需要读取配置"); 15 | }else{ 16 | console.log("二手商品数据为空,需要读取配置"); 17 | goodsList = config.getFoundthing().goodsList; 18 | //更新缓存 19 | wx.setStorageSync("goodsList", goodsList); 20 | } 21 | 22 | //2.个人信息 23 | this.globalData.userInfo = wx.getStorageSync("userInfo") || null; 24 | //console.log(wx.getStorageSync("userInfo")); 25 | 26 | //3.南北校区跑腿代购。。。。转换时间 27 | let shophelper0 = wx.getStorageSync("shophelper0"); 28 | let shophelper1 = wx.getStorageSync("shophelper1"); 29 | this.globalData.shophelper0 = shophelper0 || config.getShopHelper().shophelper0; 30 | this.globalData.shophelper1 = shophelper1 || config.getShopHelper().shophelper1; 31 | 32 | //4.失物招领 33 | let lostGoods = wx.getStorageSync("lostGoods"); 34 | if (!lostGoods){ 35 | lostGoods = config.lostAndFound().goods; 36 | wx.setStorageSync("lostGoods", lostGoods); 37 | } 38 | 39 | }, 40 | globalData: { 41 | userInfo: null, 42 | shophelper0:null, 43 | shophelper1:null, 44 | 45 | goodsdetail:{},//商品详情信息 46 | } 47 | }) -------------------------------------------------------------------------------- /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 | }, 14 | "compileType": "miniprogram", 15 | "libVersion": "2.6.2", 16 | "appid": "wx666d9a39d2780738", 17 | "projectname": "wx_campus_help", 18 | "debugOptions": { 19 | "hidedInDevtools": [] 20 | }, 21 | "isGameTourist": false, 22 | "condition": { 23 | "search": { 24 | "current": -1, 25 | "list": [] 26 | }, 27 | "conversation": { 28 | "current": -1, 29 | "list": [] 30 | }, 31 | "plugin": { 32 | "current": -1, 33 | "list": [] 34 | }, 35 | "game": { 36 | "currentL": -1, 37 | "list": [] 38 | }, 39 | "miniprogram": { 40 | "current": 3, 41 | "list": [ 42 | { 43 | "id": -1, 44 | "name": "shop", 45 | "pathName": "pages/secondhandstore/secondhandstore", 46 | "query": "", 47 | "scene": null 48 | }, 49 | { 50 | "id": -1, 51 | "name": "失物招领", 52 | "pathName": "pages/foundthing/foundthing", 53 | "query": "" 54 | }, 55 | { 56 | "id": -1, 57 | "name": "跑腿代购", 58 | "pathName": "pages/shophelper/shophelper", 59 | "query": "", 60 | "scene": null 61 | }, 62 | { 63 | "id": -1, 64 | "name": "me", 65 | "pathName": "pages/me/me", 66 | "query": "" 67 | } 68 | ] 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /pages/secondhandstore/detail/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/secondhandstore/detail/detail.wxss */ 2 | .container{ 3 | width: 100vw; 4 | } 5 | .show{ 6 | width: 95vw; 7 | margin: 20rpx auto; 8 | display: block; 9 | border-radius: 20rpx; 10 | 11 | } 12 | .bottom{ 13 | position: fixed; 14 | height: 18vh; 15 | bottom: 0; 16 | width: 100vw; 17 | background-color: white; 18 | padding:20rpx 0; 19 | box-sizing: border-box; 20 | } 21 | .bottom image{ 22 | margin-left: 20rpx; 23 | width: 60rpx; 24 | border-radius: 60rpx; 25 | height: 60rpx; 26 | } 27 | .bottom .desc{ 28 | border-bottom: 1rpx solid #eee; 29 | padding-bottom: 10rpx; 30 | height: 8vh; 31 | margin-left: 20rpx; 32 | line-height: 4vh; 33 | font-size: 30rpx; 34 | 35 | } 36 | .base .user{ 37 | display: flex; 38 | justify-content: flex-start; 39 | align-items: center; 40 | } 41 | .base{ 42 | height: 8vh; 43 | color: #777; 44 | display: flex; 45 | justify-content: space-between; 46 | align-items:center; 47 | } 48 | .base .op{ 49 | display: flex; 50 | justify-content: space-around; 51 | } 52 | .base .op .l{ 53 | width: 150rpx; 54 | background-color: rgb(69, 226, 69); 55 | color: white; 56 | height: 8vh; 57 | line-height: 8vh; 58 | text-align: center; 59 | } 60 | .base .op .r{ 61 | height: 8vh; 62 | line-height: 8vh; 63 | width: 150rpx; 64 | background-color: rgb(245, 173, 18); 65 | color: white; 66 | text-align: center; 67 | } 68 | -------------------------------------------------------------------------------- /component/rich-parse/rich-parse.js: -------------------------------------------------------------------------------- 1 | import showdown from './helper/showdown.js' 2 | import { html2json } from './helper/html2json.js' 3 | 4 | global.richParses = {} 5 | 6 | Component({ 7 | options: { 8 | addGlobalClass: true, 9 | }, 10 | 11 | properties: { 12 | content: { 13 | type: String, 14 | value: '', 15 | observer(newVal) { 16 | this.parse(newVal) 17 | } 18 | }, 19 | type: { 20 | type: String, 21 | value: 'html', 22 | } 23 | }, 24 | 25 | data: { 26 | rich: null, 27 | parse_id: null, 28 | }, 29 | 30 | attached() { 31 | // 把组件实例放到全局上,让 rich-render 里面可以访问 32 | global.richParses[this.__wxExparserNodeId__] = this 33 | this.setData({ parse_id: this.__wxExparserNodeId__ }) 34 | }, 35 | 36 | ready() { 37 | this.parse(this.data.content) 38 | }, 39 | 40 | detached() { 41 | delete global.richParses[this.__wxExparserNodeId__] 42 | }, 43 | 44 | methods: { 45 | parse(content) { 46 | const { type } = this.data 47 | if (type === 'md' || type === 'markdown') { 48 | const converter = new showdown.Converter() 49 | content = converter.makeHtml(content) 50 | } 51 | const transData = html2json(content, 'rich') 52 | this.setData({ rich: transData }) 53 | }, 54 | 55 | onImgTap(e) { 56 | wx.previewImage({ 57 | current: e.target.dataset.src, // 当前显示图片的http链接 58 | urls: this.data.rich.imageUrls, // 需要预览的图片http链接列表 59 | }) 60 | }, 61 | 62 | onLinkTap(e) { 63 | const { href } = e.currentTarget.dataset 64 | this.triggerEvent('linkTo', { href }) 65 | } 66 | } 67 | }) 68 | -------------------------------------------------------------------------------- /pages/secondhandstore/detail/chat/chat.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 温馨提示:网络诈骗常存在,切莫傻逼一小时 5 | 6 | 7 | 8 | 9 | 10 | 11 | 离开 12 | 13 | 14 | 15 | 16 | 17 | ... 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {{item.message}} 26 | 27 | 28 | 29 | 30 | 31 | {{item.replytimeshow}} 32 | 33 | 34 | 35 | ---到底了--- 36 | 37 | 38 | 39 | 40 | 41 | 42 | 发送 43 | 44 | 45 | -------------------------------------------------------------------------------- /pages/foundthing/foundthing.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 如发现你丢失的物品,请联系我们! 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ... 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 物品名称:{{item.goods}} 22 | 23 | 24 | {{item.name}} 25 | 26 | 联系方式:{{item.mobile}} 27 | 丢失地址:{{item.addr}} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 物品名称:{{item.goods}} 39 | 40 | 41 | {{item.name}} 42 | 43 | 联系方式:{{item.mobile}} 44 | 丢失地址:{{item.addr}} 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 提交 67 | 68 | -------------------------------------------------------------------------------- /pages/shophelper/shophelper.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 南校区 6 | 7 | 8 | 北校区 9 | 10 | 11 | 我是上面nav的补位块 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{item.name}}{{item.sex}} 22 | 23 | 24 | 跑腿费:¥{{item.money}}{{item.friendly_time}} 25 | 26 | 27 | 28 | 29 | {{item.goods}} 30 | 31 | 32 | {{item.addr}} 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 | -------------------------------------------------------------------------------- /pages/me/me.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{userInfo.nickName}} 6 | 7 | 8 | 9 | 10 | 代购 11 | 我的跑腿代购 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.name}}{{item.sex}} 21 | 22 | 23 | 跑腿费:¥{{item.money}}{{item.friendly_time}} 24 | 25 | 26 | 27 | 28 | {{item.goods}} 29 | 30 | 31 | {{item.addr}} 32 | 33 | 34 | 已经不需要帮助了^_^已处理 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 招领 44 | 我发布的食物招领_长按删除 45 | 46 | 47 | 48 | 49 | 50 | 51 | 物品名称:{{item.goods}} 52 | 53 | 54 | {{item.name}} 55 | 56 | 联系方式:{{item.mobile}} 57 | 丢失地址:{{item.addr}} 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 二手 70 | 我发布的二手商品 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {{item.desc}} 79 | 80 | 已处理 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /pages/foundthing/foundthing.wxss: -------------------------------------------------------------------------------- 1 | /* pages/foundthing/foundthing.wxss */ 2 | 3 | .left{ 4 | width: 48%; 5 | 6 | } 7 | .one:hover{ 8 | border: 1px solid#ee0000; 9 | } 10 | .one{ 11 | border: 1px solid #ddd; 12 | box-shadow: 1px 1px 10px 1px #ddd; 13 | margin-bottom: 20rpx; 14 | 15 | } 16 | .right{ 17 | width: 48%; 18 | } 19 | 20 | .box{ 21 | display: flex; 22 | justify-content: space-between; 23 | padding:1rpx 10rpx; 24 | flex-wrap: wrap; 25 | } 26 | 27 | .mark{ 28 | width: 100%; 29 | text-align: center; 30 | height: 70rpx; 31 | line-height: 70rpx; 32 | color: hsl(300, 33%, 99%); 33 | background-color:#ddd; 34 | } 35 | 36 | .find{ 37 | padding:20rpx 2.5vw; 38 | display: flex; 39 | width: 100vw; 40 | height: 120rpx; 41 | align-items: center; 42 | justify-content: space-between; 43 | } 44 | 45 | .find input{ 46 | width: 70%; 47 | border: 1rpx solid #ddd; 48 | height: 80rpx; 49 | line-height: 80rpx; 50 | border-radius: 10rpx; 51 | padding-left: 10rpx; 52 | } 53 | 54 | .find button{ 55 | width:20%; 56 | height: 80rpx; 57 | line-height: 80rpx; 58 | font-size: 30rpx; 59 | background-color:#DC143C; 60 | color: white; 61 | padding: 0; 62 | } 63 | 64 | .logo{ 65 | width: 100%; 66 | height: 40vw; 67 | } 68 | 69 | .things{ 70 | font-size: 27rpx; 71 | } 72 | 73 | .user{ 74 | width:5vw; 75 | height:5vw; 76 | border-radius: 20rpx; 77 | } 78 | 79 | .name{ 80 | font-size: 27rpx; 81 | padding: 0rpx 90rpx; 82 | } 83 | 84 | .person{ 85 | display: flex; 86 | font-size: 27rpx; 87 | } 88 | 89 | .contact{ 90 | font-size: 27rpx; 91 | } 92 | 93 | .address{ 94 | font-size: 27rpx; 95 | } 96 | 97 | .add{ 98 | position: fixed; 99 | bottom: 1vw; 100 | right:2vw; 101 | } 102 | .top{ 103 | width: 100vw; 104 | height:210rpx; 105 | position: fixed; 106 | background-color: white; 107 | } 108 | .add:hover{ 109 | filter: brightness(0.3); 110 | } 111 | 112 | .add image{ 113 | width: 15vw; 114 | height: 15vw; 115 | background-color: white; 116 | border-radius: 15vw; 117 | } 118 | 119 | 120 | .form-back{ 121 | position: fixed; 122 | top: 0; 123 | left: 0; 124 | right: 0; 125 | bottom: 0; 126 | background-color: rgba(0, 0, 0, 0.7); 127 | z-index: 199; 128 | overflow: hidden; 129 | } 130 | .form-box{ 131 | position: fixed; 132 | top: 10vh; 133 | left: 5vw; 134 | width: 90vw; 135 | box-sizing: border-box; 136 | padding: 50rpx 20rpx; 137 | background-color: white; 138 | border-radius: 20rpx; 139 | z-index: 299; 140 | box-shadow: 1px 1px 3px 1px #eee; 141 | } 142 | .form-box .logo{ 143 | width: 60vw; 144 | height: 60vw; 145 | margin: 0 auto; 146 | display: block; 147 | } 148 | .form-box input{ 149 | height: 80rpx; 150 | line-height: 80rpx; 151 | border-radius: 10rpx; 152 | box-shadow: 1px 1px 2px 1px #DC143C; 153 | padding-left: 10rpx; 154 | margin-top: 20rpx; 155 | } 156 | .form-box .submit{ 157 | height: 80rpx; 158 | line-height: 80rpx; 159 | width: 50vw; 160 | margin:20rpx auto; 161 | border-radius: 20rpx; 162 | background-color: #DC143C; 163 | color: white; 164 | text-align: center; 165 | } 166 | -------------------------------------------------------------------------------- /pages/secondhandstore/secondhandstore.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 如需购买,请拨打卖家电话联系交易 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ... 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {{item.name}} 23 | 24 | 已处理 25 | 26 | 27 | ¥{{item.price}}{{item.area==1?'南':'北'}}校区 28 | 29 | 30 | {{item.desc}} 31 | 32 | 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 | -------------------------------------------------------------------------------- /pages/foundthing/foundthing.js: -------------------------------------------------------------------------------- 1 | // pages/foundthing/foundthing.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | list:[], 9 | inputContent:'', 10 | info:{ 11 | logo:"/img/key.jpg" 12 | } 13 | }, 14 | chooseImage: function () { 15 | var that = this; 16 | wx.chooseImage({ 17 | success: function (res) { 18 | that.setData({ 19 | 'info.logo': res.tempFilePaths[0] 20 | }) 21 | }, 22 | }) 23 | }, 24 | infomodify: function (e) { 25 | let val = e.detail.value; 26 | let col = e.currentTarget.dataset.col; 27 | 28 | let data = "{\"info." + col + "\":\"" + val + "\"}"; 29 | console.log(data); 30 | data = JSON.parse(data); 31 | this.setData(data); 32 | }, 33 | saveFormboxcontent:function(e){ 34 | let info = this.data.info; 35 | console.log(info); 36 | //1.改变缓存 37 | let goods = wx.getStorageSync("lostGoods") || []; 38 | 39 | let id = goods.length; 40 | goods.forEach(function (val, index) { 41 | if (val.id == id) { 42 | id++; 43 | } 44 | }) 45 | info.id = id; 46 | goods.unshift(info); 47 | 48 | wx.setStorageSync("lostGoods",goods); 49 | 50 | //2.改变当前列表 51 | this.setData({ 52 | list:goods 53 | }) 54 | 55 | //3.改变我的失物招领 56 | let myLostGoods = wx.getStorageSync("myLostGoods") || []; 57 | myLostGoods.unshift(info); 58 | wx.setStorageSync("myLostGoods", myLostGoods); 59 | 60 | //4.隐藏box 61 | this.setData({ 62 | form:false 63 | }) 64 | }, 65 | seekChange:function(e){ 66 | this.data.inputContent = e.detail.value; 67 | }, 68 | seekThings:function(){ 69 | 70 | let like = this.data.inputContent; 71 | let goods = wx.getStorageSync("lostGoods") || []; 72 | 73 | let tempArr = []; 74 | goods.forEach(function(val,index){ 75 | if(val.goods.indexOf(like) < 0){ 76 | }else{ 77 | tempArr.push(val); 78 | } 79 | }) 80 | 81 | 82 | this.setData({ 83 | list: tempArr 84 | }) 85 | 86 | }, 87 | 88 | toggleFormBox(e) { 89 | console.log(e); 90 | let val = e.currentTarget.dataset.val; 91 | this.setData({ 92 | form: val == 1 ? true : false 93 | }) 94 | }, 95 | 96 | 97 | 98 | /** 99 | * 生命周期函数--监听页面加载 100 | */ 101 | onLoad: function (options) { 102 | this.setData({ 103 | list:wx.getStorageSync("lostGoods") 104 | }) 105 | }, 106 | 107 | /** 108 | * 生命周期函数--监听页面初次渲染完成 109 | */ 110 | onReady: function () { 111 | 112 | }, 113 | 114 | /** 115 | * 生命周期函数--监听页面显示 116 | */ 117 | onShow: function () { 118 | 119 | }, 120 | 121 | /** 122 | * 生命周期函数--监听页面隐藏 123 | */ 124 | onHide: function () { 125 | 126 | }, 127 | 128 | /** 129 | * 生命周期函数--监听页面卸载 130 | */ 131 | onUnload: function () { 132 | 133 | }, 134 | 135 | /** 136 | * 页面相关事件处理函数--监听用户下拉动作 137 | */ 138 | onPullDownRefresh: function () { 139 | 140 | }, 141 | 142 | /** 143 | * 页面上拉触底事件的处理函数 144 | */ 145 | onReachBottom: function () { 146 | 147 | }, 148 | 149 | /** 150 | * 用户点击右上角分享 151 | */ 152 | onShareAppMessage: function () { 153 | 154 | } 155 | }) -------------------------------------------------------------------------------- /pages/secondhandstore/detail/chat/chat.js: -------------------------------------------------------------------------------- 1 | // pages/consult/chat/chat.js 2 | 3 | const app =getApp(); 4 | const webUtil = require("../../../../utils/web.js"); 5 | var timer; 6 | var exit = 0;//是否离开页面 离开了就不在刷新消息 7 | 8 | Page({ 9 | 10 | /** 11 | * 页面的初始数据 12 | */ 13 | data: { 14 | userInfo:{}, 15 | detailHide:true, 16 | avatars:"", 17 | scroll_bottom:"",//直接下滑到最底下 18 | messageinput:"",//发送文本框 19 | }, 20 | sendMessage:function(){ 21 | let msg = this.data.messageinput; 22 | let that = this; 23 | if(msg == ''){ 24 | webUtil.showToastWithWarnIcon("请输入内容"); 25 | return false; 26 | } 27 | //发送文字消息 28 | var logs = this.data.logs; 29 | logs.push({ 30 | message:msg, 31 | ctype: 1, 32 | replytime: new Date(), 33 | replytimeshow: webUtil.friendly_time(new Date()) 34 | }) 35 | this.setData({ 36 | logs: logs, 37 | messageinput:'', 38 | scroll_bottom: "scroll_bottom",//直接下滑到最底下 39 | }) 40 | wx.setStorageSync("logs", logs); 41 | }, 42 | setMessageinput:function(e){ 43 | this.setData({ 44 | messageinput:e.detail.value 45 | }) 46 | }, 47 | setAssessinput: function (e) { 48 | this.setData({ 49 | 'consult.assessDecode': e.detail.value 50 | }) 51 | }, 52 | //发送图片 53 | sendImage:function(){ 54 | var that = this; 55 | 56 | wx.chooseImage({ 57 | success: function (res) { 58 | var logs = that.data.logs; 59 | logs.push({ 60 | image: res.tempFilePaths[0], 61 | ctype: 2, 62 | replytime: new Date(), 63 | replytimeshow: webUtil.friendly_time(new Date()) 64 | }) 65 | that.setData({ 66 | logs: logs, 67 | scroll_bottom: "scroll_bottom",//直接下滑到最底下 68 | 69 | }) 70 | wx.setStorageSync("logs", logs); 71 | }, 72 | }) 73 | }, 74 | 75 | /** 76 | * 生命周期函数--监听页面加载 77 | */ 78 | onLoad: function (options) { 79 | 80 | let avatars = options.url; 81 | let logs = wx.getStorageSync("logs") || []; 82 | logs = this.formatDateTime(logs); 83 | //获取聊天信息 84 | this.setData({ 85 | avatars:avatars, 86 | userInfo:app.globalData.userInfo, 87 | logs: logs, 88 | scroll_bottom: "scroll_bottom",//直接下滑到最底下 89 | }) 90 | }, 91 | //预览图片 92 | prevImage:function(e){ 93 | wx.previewImage({ 94 | urls: [e.currentTarget.dataset.image], 95 | current: e.currentTarget.dataset.image 96 | }) 97 | }, 98 | //格式化时间_本页渲染数据 99 | formatDateTime: function (obj) { 100 | obj.forEach((val, index) => { 101 | obj[index].replytimeshow = webUtil.friendly_time(obj[index].replytime); 102 | }) 103 | return obj; 104 | }, 105 | /** 106 | * 生命周期函数--监听页面显示 107 | */ 108 | onShow: function () { 109 | 110 | }, 111 | 112 | /** 113 | * 生命周期函数--监听页面隐藏 114 | */ 115 | onHide: function () { 116 | 117 | }, 118 | 119 | /** 120 | * 生命周期函数--监听页面卸载 121 | */ 122 | onUnload: function () { 123 | 124 | }, 125 | 126 | /** 127 | * 页面相关事件处理函数--监听用户下拉动作 128 | */ 129 | onPullDownRefresh: function () { 130 | 131 | }, 132 | 133 | /** 134 | * 页面上拉触底事件的处理函数 135 | */ 136 | onReachBottom: function () { 137 | 138 | }, 139 | 140 | /** 141 | * 用户点击右上角分享 142 | */ 143 | onShareAppMessage: function () { 144 | 145 | } 146 | }) -------------------------------------------------------------------------------- /pages/shophelper/shophelper.wxss: -------------------------------------------------------------------------------- 1 | .nav{ 2 | position: fixed; 3 | height: 80rpx; 4 | top: 0; 5 | left: 0; 6 | width:100vw; 7 | display: flex; 8 | justify-content: space-around; 9 | align-items: center; 10 | border-bottom: 1px solid #ccc; 11 | box-shadow: 1rpx 1rpx 1rpx 10rpx #f7f7f7; 12 | background-color: white; 13 | } 14 | .nav .one{ 15 | height: 80rpx; 16 | line-height: 80rpx; 17 | padding: 0 50rpx; 18 | } 19 | .bound{ 20 | height: 100rpx; 21 | color: white; 22 | } 23 | .selected{ 24 | color: #ee0000; 25 | border-bottom: 5rpx solid #ee0000; 26 | } 27 | .list{ 28 | padding-bottom: 150rpx; 29 | } 30 | .list .one{ 31 | padding: 20rpx 0; 32 | display: flex; 33 | flex-direction: column; 34 | margin-top: 20rpx; 35 | border-bottom: 1px solid #eee; 36 | width: 95vw; 37 | margin: 0 auto; 38 | } 39 | .list .one .user image{ 40 | height: 12vw; 41 | width: 12vw; 42 | border-radius: 12vw; 43 | } 44 | .list .one .user{ 45 | display: flex; 46 | flex-direction: row; 47 | width:100%; 48 | } 49 | .list .one .user .info{ 50 | width: 83vw; 51 | margin-left: 20rpx; 52 | } 53 | .list .one .user .a{ 54 | display: flex; 55 | } 56 | .list .one .user .a text{ 57 | margin-right: 20rpx; 58 | } 59 | .list .one .user .b{ 60 | display: flex; 61 | font-size: 26rpx; 62 | line-height: 50rpx; 63 | justify-content: space-between; 64 | } 65 | .list .one .user .b .money{ 66 | color: rgb(17, 148, 35); 67 | } 68 | .list .one .user .b .time{ 69 | color: #999; 70 | } 71 | .list .one .col{ 72 | color: #777; 73 | margin: 5rpx 0; 74 | display: flex; 75 | align-items: center; 76 | font-size: 32rpx; 77 | } 78 | .list .one .col image{ 79 | width: 30rpx; 80 | height: 30rpx; 81 | margin-right: 10rpx; 82 | } 83 | .sure{ 84 | display: flex; 85 | justify-content: space-between; 86 | align-items: flex-end; 87 | font-size: 25rpx; 88 | color: rgb(182, 177, 177); 89 | } 90 | .sure .help{ 91 | background-color: #ee0000; 92 | height: 50rpx; 93 | line-height: 50rpx; 94 | border-radius: 10rpx; 95 | text-align: center; 96 | color: white; 97 | width: 120rpx; 98 | font-weight: bold; 99 | } 100 | .sure .help1{ 101 | background-color: #3eca13; 102 | height: 50rpx; 103 | line-height: 50rpx; 104 | border-radius: 10rpx; 105 | text-align: center; 106 | color: white; 107 | width: 120rpx; 108 | font-weight: bold; 109 | } 110 | .add{ 111 | position: fixed; 112 | bottom: 1vh; 113 | right: 2vw; 114 | } 115 | .add image{ 116 | height: 120rpx; 117 | width: 120rpx; 118 | border-radius: 100rpx; 119 | background-color: white; 120 | } 121 | .add:Hover{ 122 | filter: brightness(0.7); 123 | } 124 | .form-back{ 125 | position: fixed; 126 | top: 0; 127 | left: 0; 128 | right: 0; 129 | bottom: 0; 130 | background-color: rgba(0, 0, 0, 0.7); 131 | z-index: 199; 132 | overflow: hidden; 133 | } 134 | .form-box{ 135 | position: fixed; 136 | top: 20vh; 137 | left: 5vw; 138 | width: 90vw; 139 | box-sizing: border-box; 140 | padding:20rpx 20rpx; 141 | background-color: white; 142 | border-radius: 20rpx; 143 | z-index: 299; 144 | box-shadow: 1px 1px 3px 1px #eee; 145 | } 146 | .form-box .logo{ 147 | width: 60vw; 148 | height: 60vw; 149 | margin: 0 auto; 150 | display: block; 151 | } 152 | .form-box input{ 153 | height: 80rpx; 154 | line-height: 80rpx; 155 | border-radius: 10rpx; 156 | box-shadow: 1px 1px 2px 1px rgb(63, 159, 214); 157 | padding-left: 10rpx; 158 | margin-top: 20rpx; 159 | } 160 | .form-box .submit{ 161 | height: 80rpx; 162 | line-height: 80rpx; 163 | width: 60vw; 164 | margin:20rpx auto; 165 | border-radius: 20rpx; 166 | background-color: rgb(53, 173, 243); 167 | color: white; 168 | text-align: center; 169 | } 170 | 171 | 172 | -------------------------------------------------------------------------------- /component/rich-parse/rich-render/rich-render.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |