├── app.js
├── app.json
├── app.wxss
├── image
├── 11.png
├── 12.png
├── 31.png
├── 32.png
├── 41.png
├── 42.png
├── 549c9d9ca5d8a.png
├── Noline.png
├── email.png
├── loading.gif
├── logo.png
├── map.png
├── pl.png
├── tel.png
├── time.png
├── upic.png
└── weixin.png
├── pages
├── ._.DS_Store
├── about
│ ├── about.js
│ ├── about.json
│ ├── about.wxml
│ └── about.wxss
├── add
│ ├── add.js
│ ├── add.json
│ ├── add.wxml
│ └── add.wxss
├── index
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ ├── index.wxss
│ └── listData.wxml
├── lianx
│ ├── lianx.js
│ ├── lianx.json
│ ├── lianx.wxml
│ └── lianx.wxss
├── mobile
│ ├── mobile.js
│ ├── mobile.json
│ ├── mobile.wxml
│ └── mobile.wxss
├── ulist
│ ├── list-a.wxml
│ ├── ulist.js
│ ├── ulist.json
│ ├── ulist.wxml
│ └── ulist.wxss
├── user
│ ├── user.js
│ ├── user.json
│ ├── user.wxml
│ └── user.wxss
└── view
│ ├── view.js
│ ├── view.json
│ ├── view.wxml
│ └── view.wxss
├── project.config.json
├── readme.md
├── sitemap.json
├── template
└── loading.wxml
└── utils
├── bmap-wx.js
├── network.js
└── util.js
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | globalData:{
4 | apiHost:'https://mhxj.jqyish.top/shiwu/',
5 | imgHost:'https://mhxj.jqyish.top/',
6 | userInfo: null
7 | },
8 |
9 | //监听小程序初始化,当小程序初始化完成时会触发发,且全局只触发一次
10 | onLaunch: function() {
11 | //console.log('app----------------执行');
12 | //调用API从本地缓存中获取数据
13 | //var logs = wx.getStorageSync('logs') || []
14 | //logs.unshift(Date.now())
15 | //wx.setStorageSync('logs', logs)
16 | },
17 | //用户自定义的全局数据,可以通过var app = getApp()获取app实例,再通过app.globalData.userInfo获取数据
18 | getUserInfo: function(cb) {
19 | var that = this
20 | if (this.globalData.userInfo) {
21 | typeof cb == "function" && cb(this.globalData.userInfo)
22 | } else {
23 | //调用登录接口
24 | wx.getUserInfo({
25 | withCredentials: false,
26 | success: function(res) {
27 | that.globalData.userInfo = res.userInfo
28 | typeof cb == "function" && cb(that.globalData.userInfo)
29 | }
30 | })
31 | }
32 | }
33 | })
34 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/add/add",
5 | "pages/mobile/mobile",
6 | "pages/view/view",
7 | "pages/user/user",
8 | "pages/ulist/ulist",
9 | "pages/about/about",
10 | "pages/lianx/lianx"
11 | ],
12 | "window": {
13 | "navigationBarTextStyle": "white",
14 | "navigationBarTitleText": "附近失物认领",
15 | "navigationBarBackgroundColor": "#00AC2C",
16 | "backgroundColor": "#EEEEEE",
17 | "enablePullDownRefresh": true,
18 | "backgroundTextStyle": "dark"
19 | },
20 | "tabBar": {
21 | "color": "#b7b7b7",
22 | "selectedColor": "#00AC2C",
23 | "borderStyle": "white",
24 | "backgroundColor": "#f5f5f5",
25 | "list": [
26 | {
27 | "pagePath": "pages/index/index",
28 | "iconPath": "image/12.png",
29 | "selectedIconPath": "image/11.png",
30 | "text": "首页"
31 | },
32 | {
33 | "pagePath": "pages/add/add",
34 | "iconPath": "image/32.png",
35 | "selectedIconPath": "image/31.png",
36 | "text": "发布"
37 | },
38 | {
39 | "pagePath": "pages/user/user",
40 | "iconPath": "image/42.png",
41 | "selectedIconPath": "image/41.png",
42 | "text": "个人"
43 | }
44 | ]
45 | },
46 | "networkTimeout": {
47 | "request": 10000
48 | },
49 | "sitemapLocation": "sitemap.json",
50 | "permission": {
51 | "scope.userLocation": {
52 | "desc": "你的位置信息将用于小程序位置接口的效果展示"
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 0 0;
9 | box-sizing: border-box;
10 | font-size: 32rpx;
11 | }
12 | .footer{
13 | width: 100%; font-size: 12px;
14 | text-align: center;
15 | color: #C6C6C6;
16 | padding-top: 30rpx
17 | }
18 | .navigator-hover{
19 | background: none
20 | }
21 |
--------------------------------------------------------------------------------
/image/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/11.png
--------------------------------------------------------------------------------
/image/12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/12.png
--------------------------------------------------------------------------------
/image/31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/31.png
--------------------------------------------------------------------------------
/image/32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/32.png
--------------------------------------------------------------------------------
/image/41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/41.png
--------------------------------------------------------------------------------
/image/42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/42.png
--------------------------------------------------------------------------------
/image/549c9d9ca5d8a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/549c9d9ca5d8a.png
--------------------------------------------------------------------------------
/image/Noline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/Noline.png
--------------------------------------------------------------------------------
/image/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/email.png
--------------------------------------------------------------------------------
/image/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/loading.gif
--------------------------------------------------------------------------------
/image/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/logo.png
--------------------------------------------------------------------------------
/image/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/map.png
--------------------------------------------------------------------------------
/image/pl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/pl.png
--------------------------------------------------------------------------------
/image/tel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/tel.png
--------------------------------------------------------------------------------
/image/time.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/time.png
--------------------------------------------------------------------------------
/image/upic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/upic.png
--------------------------------------------------------------------------------
/image/weixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/image/weixin.png
--------------------------------------------------------------------------------
/pages/._.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melodyne/laf-wx/2423bd953fad469950f1255135d812fb42afd6fb/pages/._.DS_Store
--------------------------------------------------------------------------------
/pages/about/about.js:
--------------------------------------------------------------------------------
1 |
2 | Page({
3 |
4 | data: {
5 | loadingHide: true,
6 | loadingText: "加载中"
7 | },
8 |
9 | onLoad: function (options) {
10 | var that = this;
11 | that.setData({ loadingHide: false });
12 | setTimeout(function () {
13 | that.setData({ loadingHide: true });
14 | }, 1000)
15 | }
16 | })
--------------------------------------------------------------------------------
/pages/about/about.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/about/about.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{loadingText}}
3 |
4 |
5 |
6 |
7 | 山西互联创想科技有限公司是一家致力于互联网产品设计、开发、销售为一体的公司。
8 |
9 |
10 | 公司一贯注重高新技术的不断探索与提升,凭借优秀的研发团队,丰富的行业经验积累,自行研发出多款实用性很强的互联网产品。对诸多企业的信息化建设,从运营、管理、到盈利起到了不容忽视的作用。
11 |
12 |
13 | 截止目前,据不完全统计,我们的产品在互联网上已经突破了数万次的下载与安装量。不论是从产品自身的建设、或者是从产品的售前和售后服务等,我们都对其进行 严格把关,从而获得了良好的用户口碑与相当优秀的客户好评率,同时也积累了相当一部分的忠实客户。这也是我们飞速发展的一个重要原因,同时也是我们的宗旨和荣誉。
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/about/about.wxss:
--------------------------------------------------------------------------------
1 | /* pages/view/view.wxss */
2 | .viewNr{
3 | width: 84%;
4 | display: block;
5 | margin: 0 8%;
6 | padding: 24rpx 0;
7 | color: #333
8 | }
9 | .viewNr text{
10 | width: 100%;
11 | display: block;
12 | text-indent: 25px;
13 | }
--------------------------------------------------------------------------------
/pages/add/add.js:
--------------------------------------------------------------------------------
1 | var bmap = require('../../utils/bmap-wx.js');
2 | const API_URL = getApp().globalData.apiHost;
3 | var wxMarkerData = [];
4 | Page({
5 | data: {
6 | ak:"TpuxEYW71E4KUKiukAvfBHackibmfa6E",
7 | markers: [],
8 | longitude:'',
9 | latitude:'',
10 | address:'获取中...',
11 | index: 0,
12 | date: '2017-01-01',
13 | isChecked: true,
14 | isChecksd: false,
15 | labels:"丢失日期",
16 | openid: 0,
17 | imglist: [],
18 | item: '../../image/upic.png',
19 | loading: false,
20 | disabled: false,
21 | loadingHide: true,
22 | loadingText: "位置获取中",
23 | content:''
24 | },
25 |
26 | bindDateChange: function (e) {
27 | this.setData({
28 | date: e.detail.value
29 | })
30 | },
31 |
32 | diushi:function(){
33 | this.setData({
34 | isChecksd: false,
35 | isChecked: true,
36 | labels:"丢失日期"
37 | })
38 | },
39 |
40 | jiandao: function () {
41 | this.setData({
42 | isChecked: false,
43 | isChecksd: true,
44 | labels: "捡到日期"
45 | })
46 | },
47 |
48 | formSubmit: function (e) {
49 | var that = this;
50 | var imglist = that.data.imglist;
51 | var formData = e.detail.value;
52 | var content = e.detail.value.content;
53 | var isChecked = that.data.isChecked;
54 | var isChecksd = that.data.isChecksd;
55 | if (isChecked == true){
56 | var rid = 0;
57 | }else if (isChecksd == true) {
58 | var rid = 1;
59 | }
60 | var openid = that.data.openid;
61 | if (content.length === 0){
62 | wx.showToast({
63 | title: '描述没填写',
64 | icon: 'loading',
65 | duration: 2000
66 | })
67 | }else{
68 | wx.showToast({
69 | title: '请稍后',
70 | icon: 'loading',
71 | duration: 4000
72 | })
73 | wx.request({
74 | url: API_URL + 'addData/rid/' + rid + '/openid/' + openid,
75 | data: formData,
76 | header: {
77 | 'Content-Type': 'application/json'
78 | },
79 | method: 'GET',
80 | success: function (res) {
81 | var aid = res.data;
82 | if (imglist != '') {
83 | for (var i = 0; i < imglist.length; i++) {
84 | wx.uploadFile({
85 | url: API_URL + 'upload/pid/' + aid,
86 | filePath: imglist[0],
87 | name: 'files',
88 | formData: {
89 | 'pid': aid
90 | },
91 | method: 'GET',
92 | header: {
93 | 'Content-Type': 'application/json'
94 | },
95 | success: function (res) {
96 | if (i >= imglist.length) {
97 | wx.showToast({
98 | title: '发布成功',
99 | icon: 'success',
100 | duration: 3000
101 | })
102 | that.setData({
103 | imglist: [],
104 | loading: true,
105 | disabled: true
106 | })
107 | setTimeout(function () {
108 | wx.switchTab({
109 | url: '../index/index',
110 | })
111 | }, 2000)
112 | }
113 | }
114 | })
115 | }
116 |
117 | }else {
118 | wx.showToast({
119 | title: '发布成功',
120 | icon: 'success',
121 | duration: 3000
122 | })
123 | that.setData({
124 | loading: true,
125 | disabled: true
126 | })
127 | setTimeout(function () {
128 | wx.switchTab({
129 | url: '../index/index',
130 | })
131 | }, 2000)
132 | }
133 | }
134 | })
135 | }
136 | },
137 |
138 | upsUid: function(e){
139 | var openid = e.data;
140 | wx.request({
141 | url: API_URL + 'seachUser/openid/' + openid,
142 | header: {
143 | 'content-type': 'application/json'
144 | },
145 | success: function (res) {
146 | if(res.data != 0){
147 | wx.navigateTo({
148 | url: '../mobile/mobile',
149 | })
150 | }
151 | }
152 | })
153 | },
154 |
155 | onLoad:function(){
156 | this.getBaiduMap();
157 | },
158 |
159 | onShow: function(){
160 | var that = this;
161 | that.setData({
162 | disabled: false,
163 | loading: false,
164 | content:''
165 | })
166 | wx.login({
167 | success: function (loginCode) {
168 | wx.request({
169 | url: API_URL + 'GetOpenid/code/' + loginCode.code,
170 | header: {
171 | 'content-type': 'application/json'
172 | },
173 | success: function (res) {
174 | that.upsUid(res);
175 | that.setData({
176 | openid: res.data
177 | })
178 | }
179 | })
180 | }
181 | })
182 |
183 | },
184 |
185 | checkimg: function () {
186 | self = this
187 | wx.chooseImage({
188 | count: 1,
189 | sizeType: ['original', 'compressed'],
190 | sourceType: ['album', 'camera'],
191 | success: function (res) {
192 | var tempFilePaths = res.tempFilePaths
193 | self.setData({
194 | imglist: tempFilePaths
195 | })
196 | }
197 | })
198 | },
199 |
200 | clearGps: function(){
201 | this.getBaiduMap();
202 | },
203 | getBaiduMap: function (){
204 | var that = this;
205 | that.setData({ loadingHide: false });
206 | var BMap = new bmap.BMapWX({
207 | ak: that.data.ak
208 | });
209 | var fail = function(data) {
210 | var errMsg = data.errMsg;
211 | if(errMsg == 'getLocation:fail auth deny'){
212 | that.setData({
213 | latitude: 0,
214 | longitude: 0,
215 | address:'火星网友一枚'
216 | })
217 | }else{
218 | that.setData({
219 | latitude: 0,
220 | longitude: 0,
221 | address:'火星网友一枚'
222 | })
223 | }
224 | setTimeout(function () {
225 | that.setData({ loadingHide: true });
226 | }, 1000)
227 | };
228 | var success = function(data) {
229 | wxMarkerData = data.wxMarkerData;
230 | that.setData({
231 | markers: wxMarkerData,
232 | latitude: wxMarkerData[0].latitude,
233 | longitude: wxMarkerData[0].longitude,
234 | address: wxMarkerData[0].address,
235 | });
236 | setTimeout(function () {
237 | that.setData({ loadingHide: true });
238 | }, 1000)
239 | };
240 | BMap.regeocoding({
241 | fail: fail,
242 | success: success
243 | });
244 | }
245 |
246 | })
--------------------------------------------------------------------------------
/pages/add/add.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/add/add.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{loadingText}}
5 |
6 |
7 |
8 |
9 |
10 | 【注】当前所发信息将覆盖周边50公里范围
11 | 【意】全太原市附近小程序基本都可以看到
12 | 【啦】违法广告信息将会被管理员永久禁言
13 |
14 |
44 |
45 |
--------------------------------------------------------------------------------
/pages/add/add.wxss:
--------------------------------------------------------------------------------
1 | /* pages/add/add.wxss */
2 | page {
3 | background-color: #F5F5F5;
4 | height: 100%;
5 | line-height: 1.6;
6 | }
7 | .mbInput{
8 | background: #fff;
9 | width: 90%;
10 | padding: 0 5%;
11 | border-top: 2rpx #ECECEC solid;
12 | border-bottom: 2rpx #ECECEC solid;
13 | }
14 | .tels{
15 | border-bottom: 2rpx #F5F5F5 solid; padding: 25rpx 0
16 | }
17 |
18 | .section{
19 | padding: 25rpx 0 10rpx 0; width: 100%;
20 | }
21 |
22 | .mbBtn{ width: 90%; margin: 40rpx auto 0}
23 |
24 | .mbBtn button::after {
25 | border:0;
26 | }
27 |
28 | .mbBtn .vBtn_ok{
29 | border: 0; background: #FF8F2B; color: #fff;
30 | margin-top: 30rpx; margin-bottom: 20rpx; border-radius: 100rpx
31 | }
32 |
33 | .mbTxing{
34 | width: 90%; background: #FFF5EC; padding:2% 5%; margin-bottom: 30rpx;
35 | border-bottom: 2rpx #FFE2C8 solid; color: #FF8E28; font-size: 10pt
36 | }
37 | .mbTxing text{ width: 100%; display: block }
38 | .xuanBtn{
39 | display: flex;
40 | flex-direction: row;
41 | padding: 0 40rpx
42 | }
43 | .diuBtn{
44 | flex: 6; background: #FFF5EC;
45 | height: 120rpx; line-height: 120rpx; border-radius:0px;
46 | }
47 | .is_checked{
48 | flex: 6; background: #40AF0A;
49 | height: 120rpx; line-height: 120rpx; border-radius:0px; color: #fff
50 | }
51 | .jianBtn{
52 | flex: 6; background: #FFF5EC;
53 | height: 120rpx; line-height: 120rpx; border-radius:0px;
54 | }
55 | .is_checksd{
56 | flex: 6; background: #40AF0A;
57 | height: 120rpx; line-height: 120rpx; border-radius:0px; color: #fff
58 | }
59 | .xuanLine{
60 | flex: 1;
61 | height: 120rpx;
62 | }
63 | .xuanBtn button::after {
64 | border-radius:0px;
65 | }
66 |
67 | .uploadPic{ width: 20%; margin-right: 20rpx}
68 | .uploadPics{ width: 20%; height: 130rpx; margin-right: 20rpx;}
69 | .miaoshu{ padding-bottom: 20rpx}
70 |
71 | /* 获取当前位置 */
72 | .getGps{
73 | width: 92%; background: #FCFCFC; border-top: 2rpx #ECECEC solid; padding:3% 4%; font-size: 14px; color: #999; margin-top: 30rpx;
74 | }
75 | .getGps label{
76 | margin-right: 20rpx;
77 | }
78 | image.mapIco{
79 | width: 3%;
80 | margin-right: 15rpx
81 | }
82 |
83 |
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | var url = getApp().globalData.apiHost;
2 | var page = 0;
3 | var page_size = 5;
4 | var GetList = function (that) {
5 | var activeIndex = that.data.activeIndex;
6 | that.setData({
7 | hidden: false
8 | });
9 | wx.showNavigationBarLoading();
10 | wx.request({
11 | url: url + 'index/rid/' + activeIndex,
12 | data: {
13 | page: page,
14 | page_size: page_size
15 | },
16 | header: {
17 | 'Content-Type': 'application/json'
18 | },
19 | success: function (res) {
20 | var list = that.data.list;
21 | var whdthNum = res.data;
22 | if (whdthNum == 0) {
23 | that.setData({
24 | ShdthNum: whdthNum
25 | });
26 | }
27 | if (res.data != 0){
28 | for (var i = 0; i < res.data.length; i++) {
29 | list.push(res.data[i]);
30 | }
31 | setTimeout(function () {
32 | that.setData({
33 | list: list
34 | });
35 | }, 300)
36 | page++;
37 | setTimeout(function () {
38 | that.setData({
39 | hidden: true
40 | });
41 | }, 4000)
42 | }else{
43 | that.setData({
44 | hidden: true,
45 | display: false
46 | });
47 | }
48 | },
49 | complete: function () {
50 | wx.hideNavigationBarLoading();
51 | wx.stopPullDownRefresh();
52 | }
53 | })
54 | }
55 | Page({
56 | data: {
57 | picUrl: getApp().globalData.imgHost,
58 | hidden: true,
59 | list: [],
60 | scrollTop: 0,
61 | tabs: ["丢失的物品", "捡到的物品"],
62 | activeIndex: 0,
63 | ShdthNum: 1,
64 | display: true
65 | },
66 | onLoad: function () {
67 |
68 | },
69 | onShow: function () {
70 | var that = this;
71 | var ShdthNum = that.data.ShdthNum;
72 | if (ShdthNum == 1){
73 | GetList(that);
74 | }
75 |
76 | },
77 |
78 | onReachBottom: function (e) {
79 | var that = this;
80 | var ShdthNum = that.data.ShdthNum;
81 | if (ShdthNum != 0){
82 | GetList(that);
83 | }
84 | },
85 |
86 | tabClick: function (e) {
87 | page = 0;
88 | this.setData({
89 | list: [],
90 | activeIndex: e.currentTarget.id,
91 | ShdthNum: 1,
92 | display: true
93 | });
94 | GetList(this)
95 | },
96 |
97 | onShareAppMessage: function () {
98 | var that = this;
99 | var picUrl = that.data.picUrl;
100 | return {
101 | title: '来看看大家都捡到了什么【太原】',
102 | path: '/pages/index/index'
103 | }
104 | }
105 | })
106 |
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ..加载中..
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | page{
3 | background: #EEEDF2
4 | }
5 | .item{
6 | width: 86%; height: auto; background: #fff; margin:0 3% 20rpx 3%; padding: 4%
7 | }
8 | .textCms{ width: 100%; color: #333;}
9 | .viPhoto{ width: 100%; padding-top: 20rpx}
10 | .wiPhoto{
11 | width: 100%; height: 350rpx; overflow: hidden;
12 | }
13 | .textBg-a,.textBg-b{
14 | width: 100%; border-bottom: 2rpx #F5F5F5 solid; margin-bottom: 40rpx; color: #999; padding-bottom: 30rpx
15 | }
16 | .textBg-a image,.textBg-b image{
17 | width: 29px; height: 20px;
18 | }
19 | .poster{
20 | width: 100%; opacity:0.6; z-index: 8
21 | }
22 |
23 | .UserName{
24 | display:flex; flex-direction:row;
25 | padding-bottom: 20rpx; margin-bottom: 10rpx
26 | }
27 | .UserName .UserPic{
28 | flex: 4;
29 | height: 80rpx;overflow: hidden
30 | }
31 | .UserName .UserPic image{width: 72rpx; height: 72rpx; border-radius: 50%; border: 2rpx #e3e3e3 solid; padding: 2rpx; background:#fff}
32 |
33 | .UserName .UserPic text{
34 | width: 300rpx;
35 | height: 80rpx;
36 | line-height: 80rpx;
37 | margin-left: 10rpx;
38 | position: absolute;
39 | overflow: hidden;
40 | color: #666
41 | }
42 |
43 | .UserName .UserDate-a,.UserName .UserDate-b{
44 | flex: 2;
45 | text-align: left; height: 50rpx; line-height: 50rpx; color: #B4B4B4;
46 | margin-top: 15rpx
47 | }
48 | .UserDate-a{ border-right: 6rpx #00AC2C solid}
49 | .UserDate-b{ border-right: 6rpx #FF9428 solid}
50 |
51 | .loading{
52 | padding: 80rpx 0; color: #999;
53 | }
54 | .loadingImg{
55 | width: 100%; padding-bottom: 10rpx; text-align: center
56 | }
57 | .loadingImg image{ width: 20px; height: 20px}
58 | .loadingTxt{
59 | width: 100%; text-align: center; color: #999
60 | }
61 | .datetime{ font-size: 26rpx; color: #CDCDCD; width: 100%; padding-top: 20rpx; border-top: 2rpx #F5F5F5 solid; margin-top: 40rpx; display: flex; }
62 | .datetime .pl{
63 | flex: 1; text-align: left; overflow: hidden
64 | }
65 | .datetime .plimg{ width: 18px; height: 18px; padding-right: 8rpx}
66 | .datetime .tm{
67 | flex: 1; text-align: right; overflow: hidden
68 | }
69 | .datetime .tmimg{ width: 18px; height: 18px; padding-right: 8rpx; }
70 |
71 | .displayNo{ color: #999; padding: 20rpx 0 40rpx 0; width: 100%; text-align: center}
72 |
73 | /**index.wxss**/
74 | .weui-tab{ width: 100%;}
75 | .weui-navbar{
76 | width: 90%;
77 | line-height: 80rpx;
78 | background: #fff;
79 | display: block;
80 | z-index: 9999;
81 | padding: 0 5%;
82 | position: fixed
83 | }
84 | .weui-navbar__item{
85 | font-size: 30rpx;
86 | display: inline-block;
87 | width: 50%;
88 | color: #333;
89 | text-align: center;
90 | }
91 | .weui-bar__item_on{
92 | color: #00AC2C;
93 | border-bottom: 4rpx solid #00AC2C;
94 | }
95 | .weui-tab__panel{
96 | z-index: 9000;
97 | margin-top: 55px;
98 | }
--------------------------------------------------------------------------------
/pages/index/listData.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.wxname}}
8 |
9 |
10 | 捡到如下物品
11 |
12 |
13 | 丢失如下物品
14 |
15 |
16 | {{item.content}}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/lianx/lianx.js:
--------------------------------------------------------------------------------
1 |
2 | Page({
3 |
4 |
5 | data: {
6 | loadingHide: true,
7 | loadingText: "加载中"
8 | },
9 | callmeTap: function () {
10 | wx.makePhoneCall({
11 | phoneNumber: '0351-7171839'
12 | })
13 | },
14 |
15 | onLoad: function (options) {
16 | var that = this;
17 | that.setData({ loadingHide: false });
18 | setTimeout(function () {
19 | that.setData({ loadingHide: true });
20 | }, 1000)
21 | }
22 | })
--------------------------------------------------------------------------------
/pages/lianx/lianx.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/lianx/lianx.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{loadingText}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 电话 / 0351-7171839
13 |
14 |
15 |
16 | 微信 / 131-0000-0351
17 |
18 |
19 |
20 | 邮件 / 114512039@QQ.Com
21 |
22 |
23 |
24 | 和平北路诚泰商务西区1010室
25 |
26 |
27 |
30 |
--------------------------------------------------------------------------------
/pages/lianx/lianx.wxss:
--------------------------------------------------------------------------------
1 | /* pages/about/about.wxss */
2 | .IndexHome{
3 | width: 100%;
4 | display: block;
5 | background-color: #00AC2C;
6 | height: 500rpx;
7 | overflow: hidden;
8 | text-align: center
9 | }
10 | .img{
11 | width: 55%; margin: 0 auto; padding: 60rpx 0 0 0;
12 | }
13 | .IndexList{
14 | width: 100%;
15 | display: block;
16 | margin-top: 40rpx;
17 | }
18 | .IndexList view{
19 | border-bottom: 1px solid #F5F5F5;
20 | width: 84%;
21 | display: block;
22 | margin: 0 8%;
23 | color: #333;
24 | height: 100rpx;
25 | line-height: 100rpx
26 | }
27 | .IndexList image.telIco{
28 | width: 3%;
29 | margin-right: 15rpx
30 | }
31 | .IndexList image.weixinIco{
32 | width: 4%;
33 | margin-right: 15rpx
34 | }
35 | .IndexList image.eIco{
36 | width: 4%;
37 | margin-right: 15rpx
38 | }
39 | .IndexList image.mapIco{
40 | width: 3%;
41 | margin-right: 15rpx
42 | }
--------------------------------------------------------------------------------
/pages/mobile/mobile.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | var maxTime = 60
3 | var currentTime = maxTime
4 | var interval = null
5 | const API_URL = getApp().globalData.apiHost;
6 | Page({
7 | data: {
8 | userInfo: {},
9 | btnName: '获取验证码',
10 | disabled: false,
11 | mobile: '1234567890',
12 | msCodes: '0',
13 | openid: 0
14 | },
15 |
16 | mobileInputEvent: function (ev) {
17 | var mobile = ev.detail.value;
18 | if (mobile.length == 11){
19 | this.setData({
20 | mobile: ev.detail.value
21 | })
22 | }
23 | },
24 |
25 | reSendPhoneNum: function (e) {
26 | var that = this;
27 | var tel = that.data.mobile;
28 | if (tel == '1234567890') {
29 | wx.showToast({
30 | title: '请填手机号',
31 | icon: 'loading',
32 | duration: 1000
33 | })
34 | } else {
35 | currentTime = maxTime;
36 | interval = setInterval(function () {
37 | currentTime--
38 | that.setData({
39 | time: '(' + currentTime + 's)',
40 | disabled: true,
41 | btnName: '请稍后'
42 | })
43 | if (currentTime <= 0) {
44 | currentTime = -1
45 | clearInterval(interval)
46 | that.setData({
47 | time: '',
48 | disabled: false,
49 | btnName: '重新获取'
50 | })
51 | }
52 | }, 1000)
53 | setTimeout(function () {
54 | wx.request({
55 | url: API_URL + 'msCode/tel/' + tel,
56 | data: '',
57 | header: {
58 | 'Content-Type': 'application/json'
59 | },
60 | success: function (e) {
61 | that.setData({
62 | msCodes: e.data
63 | })
64 | }
65 | })
66 | }, 1000)
67 | wx.showToast({
68 | title: '发送成功',
69 | icon: 'loading',
70 | duration: 700
71 | })
72 | }
73 | },
74 |
75 | formBindsubmit: function (e) {
76 | var that = this;
77 | var formData = e.detail.value;
78 | var openid = that.data.openid;
79 | var msCode = that.data.msCodes;
80 | var telCode = e.detail.value.telCode;
81 | var mobile = that.data.mobile;
82 | if (mobile == '1234567890'){
83 | wx.showToast({
84 | title: '请填手机号',
85 | icon: 'loading',
86 | duration: 1000
87 | })
88 | }else{
89 | if (msCode == telCode) {
90 | wx.request({
91 | url: API_URL + 'userChick' + '/openid/' + openid,
92 | data: formData,
93 | header: {
94 | 'Content-Type': 'application/json'
95 | },
96 | success: function (e) {
97 | wx.showToast({
98 | title: '验证通过',
99 | icon: 'loading',
100 | duration: 1000
101 | })
102 | setTimeout(function () {
103 | wx.switchTab({
104 | url: '../add/add',
105 | })
106 | }, 1200)
107 | }
108 | })
109 | } else {
110 | wx.showToast({
111 | title: '验证码错误',
112 | icon: 'loading',
113 | duration: 1000
114 | })
115 | }
116 | }
117 | },
118 |
119 | onLoad: function (options) {
120 | var that = this
121 | wx.login({
122 | success: function (loginCode) {
123 | wx.request({
124 | url: API_URL + '/GetOpenid/code/' + loginCode.code,
125 | header: {
126 | 'content-type': 'application/json'
127 | },
128 | success: function (res) {
129 | that.setData({
130 | openid: res.data
131 | })
132 | }
133 | })
134 | }
135 | })
136 |
137 | app.getUserInfo(function (userInfo) {
138 | that.setData({
139 | userInfo: userInfo
140 | })
141 | })
142 | }
143 | })
--------------------------------------------------------------------------------
/pages/mobile/mobile.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/mobile/mobile.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 第一次发布需要填写个人信息
6 |
7 |
8 |
27 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/mobile/mobile.wxss:
--------------------------------------------------------------------------------
1 | /* pages/mobile/mobile.wxss */
2 | page {
3 | background-color: #F5F5F5;
4 | height: 100%;
5 | line-height: 1.6;
6 | }
7 |
8 | .mobileMain{
9 | height: 100%;
10 | justify-content: space-between;
11 | padding: 0 0 30rpx 0;
12 | box-sizing: border-box;
13 | }
14 |
15 | .userinfo {
16 | display: flex;
17 | flex-direction: column;
18 | align-items: center;
19 | }
20 |
21 | .userinfo-avatar {
22 | width: 128rpx;
23 | height: 128rpx;
24 | margin: 20rpx;
25 | border-radius: 50%;
26 | }
27 |
28 | .userinfo-nickname {
29 | color: #aaa;
30 | }
31 |
32 | .mbInput{
33 | background: #fff;
34 | width: 90%;
35 | margin-bottom: 30rpx;
36 | padding: 0 5%;
37 | margin-top: 30rpx;
38 | border-top: 2rpx #ECECEC solid;
39 | border-bottom: 2rpx #ECECEC solid;
40 | position: relative
41 | }
42 | .tels{
43 | border-bottom: 2rpx #F5F5F5 solid; padding: 25rpx 0
44 | }
45 | .xing{
46 | border-bottom: 2rpx #F5F5F5 solid; padding: 25rpx 0
47 | }
48 |
49 | .msCode{
50 | padding: 25rpx 0
51 | }
52 |
53 | .mbBtn{ width: 90%; margin: 40rpx auto 0}
54 |
55 | .mbBtn button::after {
56 | border:0;
57 | }
58 |
59 | .mbBtn .vBtn_add{
60 | border-radius: 100rpx; background: #FFF; border:2rpx solid #F1F1F1
61 | }
62 | .mbTxing{
63 | width: 90%; background: #FFF5EC; padding:2% 5%; margin-bottom: 30rpx;
64 | border-bottom: 2rpx #FFE2C8 solid; color: #FF8E28
65 | }
66 | button.Dtime{ position: absolute; right: 40rpx; bottom: 20rpx; z-index: 999}
--------------------------------------------------------------------------------
/pages/ulist/list-a.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | No.Photo
11 |
12 |
13 |
14 | {{item.content}}
15 |
16 |
17 | 删除
18 |
--------------------------------------------------------------------------------
/pages/ulist/ulist.js:
--------------------------------------------------------------------------------
1 | const API_URL = getApp().globalData.apiHost;
2 | Page({
3 | data: {
4 | picUrl: getApp().globalData.imgHost,
5 | openid: null,
6 | items: [],
7 | startX: 0,
8 | startY: 0,
9 | tabs: ["丢失信息", "捡到信息"],
10 | activeIndex: 0
11 | },
12 |
13 | onLoad: function (e) {
14 | var that = this;
15 | var activeIndex = that.data.activeIndex;
16 | if (activeIndex){
17 | var openid = e;
18 | }else{
19 | var openid = e.openid;
20 | }
21 | wx.showNavigationBarLoading();
22 | wx.request({
23 | url: API_URL + 'userMore/openid/' + openid + '/activeIndex/' + activeIndex,
24 | data: '',
25 | header: {
26 | 'content-type': 'application/json'
27 | },
28 | success: function (res) {
29 | var datas = res.data;
30 | if(datas == 0){
31 | wx.navigateTo({
32 | url: '../mobile/mobile',
33 | })
34 | }else{
35 | for (var i = 0; i < 10; i++) {
36 | that.data.items.push({
37 | isTouchMove: false
38 | })
39 | }
40 | that.setData({
41 | items: res.data,
42 | openid: openid
43 | })
44 | }
45 | },
46 | complete: function () {
47 | wx.hideNavigationBarLoading();
48 | },
49 | })
50 | },
51 | touchstart: function (e) {
52 | this.data.items.forEach(function (v, i) {
53 | if (v.isTouchMove)
54 | v.isTouchMove = false;
55 | })
56 | this.setData({
57 | startX: e.changedTouches[0].clientX,
58 | startY: e.changedTouches[0].clientY,
59 | items: this.data.items
60 | })
61 | },
62 | touchmove: function (e) {
63 | var that = this,
64 | index = e.currentTarget.dataset.index,
65 | startX = that.data.startX,
66 | startY = that.data.startY,
67 | touchMoveX = e.changedTouches[0].clientX,
68 | touchMoveY = e.changedTouches[0].clientY,
69 | angle = that.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY });
70 | that.data.items.forEach(function (v, i) {
71 | v.isTouchMove = false
72 | if (Math.abs(angle) > 30) return;
73 | if (i == index) {
74 | if (touchMoveX > startX)
75 | v.isTouchMove = false
76 | else
77 | v.isTouchMove = true
78 | }
79 | })
80 | that.setData({
81 | items: that.data.items
82 | })
83 | },
84 |
85 | angle: function (start, end) {
86 | var _X = end.X - start.X,
87 | _Y = end.Y - start.Y
88 | return 360 * Math.atan(_Y / _X) / (2 * Math.PI);
89 | },
90 |
91 | del: function (e) {
92 | var that = this;
93 | var txtId = e.currentTarget.dataset.id;
94 | that.data.items.splice(e.currentTarget.dataset.index, 1)
95 | wx.request({
96 | url: API_URL + 'delTxt/id/' + txtId,
97 | data: '',
98 | header: {
99 | 'content-type': 'application/json'
100 | },
101 | success: function (res) {
102 | that.clearData();
103 | wx.showToast({
104 | title: '已删除',
105 | icon: 'success',
106 | duration: 2000
107 | })
108 | that.setData({
109 | items: that.data.items
110 | })
111 | }
112 | })
113 |
114 | },
115 | clearData: function () {
116 | var that = this;
117 | var openid = that.data.openid;
118 | wx.request({
119 | url: API_URL + 'userMore/openid/' + openid,
120 | data: '',
121 | header: {
122 | 'content-type': 'application/json'
123 | },
124 | success: function (res) {
125 | that.setData({
126 | views: res.data,
127 | openid: openid
128 | });
129 | },
130 | complete: function () {
131 | wx.hideNavigationBarLoading();
132 | },
133 | })
134 |
135 |
136 | },
137 |
138 | tabClick: function (e) {
139 | var openid = e.currentTarget.dataset.opid;
140 | this.setData({
141 | activeIndex: e.currentTarget.id,
142 | items: []
143 | });
144 | this.onLoad(openid);
145 | }
146 |
147 | })
--------------------------------------------------------------------------------
/pages/ulist/ulist.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/ulist/ulist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/ulist/ulist.wxss:
--------------------------------------------------------------------------------
1 | /* pages/ulist/ulist.wxss */
2 | .navigator-item{
3 | display:flex;
4 | flex-direction:row;
5 | }
6 | .viPhoto{
7 | flex: 2;
8 | height: 150rpx; overflow: hidden;
9 | }
10 | .poster{
11 | width: 100%; height: 150rpx; z-index: 8;
12 | }
13 | .noPhoto{
14 | width: 100%; background: #EEEEEE; height: 150rpx; line-height: 150rpx; text-align: center; color: #999; font-size: 26rpx
15 | }
16 | .wiPhoto{
17 | width: 100%; height: 150rpx; overflow: hidden; position: relative;
18 | }
19 | .textCms{
20 | flex: 4; width: 97%; color: #333; padding-left: 3%; overflow: hidden
21 | }
22 |
23 | .touch-item {
24 | display: flex;
25 | justify-content: space-between;
26 | width: 100%;
27 | overflow: hidden;
28 | border-bottom: 2rpx #f5f5f5 solid;
29 | }
30 | .content {
31 | width: 100%;
32 | padding: 15px;
33 | margin-right:0;
34 | -webkit-transition: all 0.4s;
35 | transition: all 0.4s;
36 | -webkit-transform: translateX(90px);
37 | transform: translateX(90px);
38 | margin-left: -90px
39 | }
40 |
41 | .del {
42 | background-color: orangered;
43 | width: 90px;
44 | display: flex;
45 | flex-direction: column;
46 | align-items: center;
47 | justify-content: center;
48 | color: #fff;
49 | -webkit-transform: translateX(90px);
50 | transform: translateX(90px);
51 | -webkit-transition: all 0.4s;
52 | transition: all 0.4s;
53 | }
54 |
55 | .touch-move-active .content,
56 | .touch-move-active .del {
57 | -webkit-transform: translateX(0);
58 | transform: translateX(0);
59 | }
60 |
61 |
62 |
63 | /**index.wxss**/
64 | .weui-tab{ width: 100%}
65 | .weui-navbar{
66 | width: 90%;
67 | line-height: 80rpx;
68 | background: #F7F7F7;
69 | display: block;
70 | position: fixed;
71 | z-index: 9999;
72 | padding: 0 5%
73 | }
74 | .weui-navbar__item{
75 | font-size: 30rpx;
76 | display: inline-block;
77 | width: 50%;
78 | color: #333;
79 | text-align: center;
80 | }
81 | .weui-bar__item_on{
82 | color: #00AC2C;
83 | border-bottom: 4rpx solid #00AC2C;
84 | }
85 | .weui-tab__panel{
86 | z-index: 9000;
87 | margin-top: 42px;
88 | }
--------------------------------------------------------------------------------
/pages/user/user.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | const API_URL = getApp().globalData.apiHost;
3 | Page({
4 | data: {
5 | userInfo: {},
6 | openid: null
7 | },
8 |
9 | txtMore:function(){
10 | var that = this;
11 | var openid = that.data.openid;
12 | if(openid != null){
13 | wx.switchTab({
14 | url: '../index/index',
15 | })
16 | }else{
17 | console.log('尚未登录');
18 | }
19 | },
20 |
21 | onLoad: function () {
22 | var that = this;
23 | wx.login({
24 | success: function (loginCode) {
25 | wx.request({
26 | url: API_URL + 'GetOpenid/code/' + loginCode.code,
27 | header: {
28 | 'content-type': 'application/json'
29 | },
30 | success: function (res) {
31 | that.setData({
32 | openid: res.data
33 | })
34 | }
35 | })
36 | }
37 | })
38 | app.getUserInfo(function (userInfo) {
39 | that.setData({
40 | userInfo: userInfo
41 | })
42 | })
43 | }
44 | })
--------------------------------------------------------------------------------
/pages/user/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "enablePullDownRefresh": false
3 | }
--------------------------------------------------------------------------------
/pages/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{userInfo.nickName}}
6 |
7 |
8 |
9 |
10 | 信息管理
11 |
12 |
13 | 联系我们
14 |
15 |
16 | 关于我们
17 |
18 |
19 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user.wxss */
2 | page{
3 | background: #F5F5F5
4 | }
5 | .userinfo {
6 | display: flex;
7 | flex-direction: column;
8 | align-items: center;
9 | background: #00AC2C;
10 | width: 100%;
11 | padding: 50rpx 0
12 | }
13 |
14 | .userinfo-avatar {
15 | width: 148rpx;
16 | height: 148rpx;
17 | margin: 20rpx;
18 | border-radius: 50%;
19 | border: 4rpx #fff solid;
20 | background: #fff;
21 | }
22 |
23 | .userinfo-nickname {
24 | color: #fff;
25 | }
26 |
27 | .usermotto {
28 | width: 92%;
29 | background: #FFF;
30 | border-bottom: 2rpx #F1F1F1 solid;
31 | padding: 0 4%
32 | }
33 | .list_a{ width: 100%; padding: 30rpx 0}
34 | .list_b{
35 | border-top: 2rpx #F1F1F1 solid; padding: 30rpx 0
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/pages/view/view.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | var util = require("../../utils/util.js");
3 | var network = require('../../utils/network.js');
4 | const API_URL = getApp().globalData.apiHost;
5 | Page({
6 | data: {
7 | views:'',
8 | picUrl: getApp().globalData.imgHost,
9 | openid:'',
10 | windowWidth:'',
11 | windowHeight:'',
12 | contents:'',
13 | vid:'',
14 | tel:'0123456789',
15 | mobile:'',
16 | isShow: false,
17 | isLoad: true,
18 | content: "",
19 | isLoading: true,
20 | cfBg: false,
21 | comments: [],
22 | emojiChar: "----------------------------------------------------------------------------",
23 | //0x1f---
24 | emoji: [
25 | "60a", "60b", "60c", "60d", "60f",
26 | "61b", "61d", "61e", "61f",
27 | "62a", "62c", "62e",
28 | "602", "603", "605", "606", "608",
29 | "612", "613", "614", "615", "616", "618", "619", "620", "621", "623", "624", "625", "627", "629", "633", "635", "637",
30 | "63a", "63b", "63c", "63d", "63e", "63f",
31 | "64a", "64b", "64f", "681",
32 | "68a", "68b", "68c",
33 | "344", "345", "346", "347", "348", "349", "351", "352", "353",
34 | "414", "415", "416",
35 | "466", "467", "468", "469", "470", "471", "472", "473",
36 | "483", "484", "485", "486", "487", "490", "491", "493", "498", "6b4"
37 | ],
38 | emojis: [],
39 | alipayEmoji: [],
40 | view_id: 0,
41 | userInfo: {},
42 | nsdata: true,
43 | page: 1,
44 | pageSize: 5,
45 | gzList:[]
46 | },
47 |
48 | onShow: function (e) {
49 | wx.getSystemInfo({
50 | success: (res) => {
51 | this.setData({
52 | windowHeight: res.windowHeight,
53 | windowWidth: res.windowWidth * 0.92
54 | })
55 | }
56 | })
57 | },
58 |
59 |
60 | getGuanzhu:function(ev){
61 | var that = this;
62 | var userInfo = that.data.userInfo;
63 | if(ev == 1){
64 | wx.request({
65 | url: API_URL + 'getGuanzhu/',
66 | data: {
67 | cid: 1,
68 | openid: that.data.openid,
69 | vid: that.data.vid,
70 | avatar: userInfo.avatarUrl,
71 | uname: userInfo.nickName
72 | },
73 | method: 'GET',
74 | success: function (res) {
75 |
76 | }
77 | })
78 | }else if(ev == 2){
79 | wx.request({
80 | url: API_URL + 'getGuanzhu/',
81 | data: {
82 | cid: 2,
83 | vid: that.data.vid
84 | },
85 | method: 'GET',
86 | success: function (res) {
87 | that.setData({
88 | gzList: res.data
89 | })
90 | }
91 | })
92 | }
93 |
94 | },
95 |
96 | onLoad: function (params) {
97 | var that = this;
98 | wx.showNavigationBarLoading();
99 | var em = {}, emChar = that.data.emojiChar.split("-");
100 | var emojis = []
101 | that.data.emoji.forEach(function (v, i) {
102 | em = {
103 | char: emChar[i],
104 | emoji: "0x1f" + v
105 | };
106 | emojis.push(em)
107 | });
108 | that.setData({
109 | emojis: emojis
110 | })
111 | that.umessage(params.id);
112 | wx.request({
113 | url: API_URL + 'view/id/' + params.id,
114 | data: {},
115 | method: 'GET',
116 | success: function (res) {
117 | var mobile = res.data.tel.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
118 | that.setData({
119 | views: res.data,
120 | contents: res.data.contents,
121 | vid: res.data.id,
122 | tel: res.data.tel,
123 | mobile:mobile,
124 | view_id: params.id,
125 | gzList: res.data.gzlist
126 | })
127 | wx.showLoading({
128 | title: '加载中'
129 | })
130 | },
131 | complete: function () {
132 | setTimeout(function () {
133 | wx.hideLoading()
134 | }, 1000)
135 | wx.hideNavigationBarLoading()
136 | }
137 | })
138 | wx.login({
139 | success: function (loginCode) {
140 | wx.request({
141 | url: API_URL + '/GetOpenid/code/' + loginCode.code,
142 | header: {
143 | 'content-type': 'application/json'
144 | },
145 | success: function (res) {
146 | that.setData({
147 | openid: res.data
148 | })
149 | }
150 | })
151 | }
152 | })
153 |
154 | app.getUserInfo(function (userInfo) {
155 | that.setData({
156 | userInfo: userInfo
157 | })
158 | })
159 | setTimeout(function () {
160 | that.getGuanzhu(1);
161 | }, 5000)
162 | setTimeout(function () {
163 | that.getGuanzhu(2);
164 | }, 7000)
165 | },
166 |
167 | callmeTap: function () {
168 | wx.makePhoneCall({
169 | phoneNumber: this.data.tel
170 | })
171 | },
172 | previewImage: function (e) {
173 | var current = e.target.dataset.src;
174 | var urlink = new Array(current);
175 | wx.previewImage({
176 | current: 'current',
177 | urls: urlink
178 | })
179 | },
180 |
181 | openMaps:function(e){
182 | var lat = e.currentTarget.dataset.lat;
183 | var long = e.currentTarget.dataset.long;
184 | var address = e.currentTarget.dataset.address;
185 | wx.openLocation({
186 | latitude: Number(lat),
187 | longitude: Number(long),
188 | scale: 28,
189 | name:'信息发出位置',
190 | address: address
191 | })
192 | },
193 |
194 | umessage: function (vid){
195 | var that = this;
196 | wx.request({
197 | url: API_URL + 'up_message/vid/' + vid,
198 | data: {
199 | page: 0,
200 | page_size: that.data.pageSize
201 | },
202 | method: 'GET',
203 | header: {
204 | 'content-type': 'application/json'
205 | },
206 | success: function (res) {
207 | var msNum = res.data.length;
208 |
209 | if (msNum == undefined){
210 | that.setData({
211 | nsdata: false
212 | })
213 | }else{
214 | that.setData({
215 | comments: res.data,
216 | view_id: vid
217 | })
218 | }
219 | }
220 | })
221 |
222 | },
223 |
224 | getMusicInfo: function (message) {
225 | var that = this;
226 | var data = {
227 | vid: that.data.view_id
228 | }
229 | network.requestLoading(API_URL + 'up_message/', data, message, function (res) {
230 | var contentlistTem = that.data.comments
231 | if (that.data.page == 1) {
232 | contentlistTem = []
233 | }
234 | var contentlist = res
235 | if (contentlist.length > that.data.pageSize) {
236 | that.setData({
237 | comments: contentlistTem.concat(contentlist),
238 | isLoading: false
239 | })
240 | } else {
241 | that.setData({
242 | comments: contentlistTem.concat(contentlist),
243 | isLoading: false,
244 | page: that.data.page + 1
245 | })
246 | }
247 |
248 | }, function (res) {
249 | wx.showToast({
250 | title: '加载失败',
251 | })
252 |
253 | })
254 | },
255 |
256 | onPullDownRefresh: function () {
257 | this.data.page = 1
258 | this.getMusicInfo('刷新数据')
259 | },
260 |
261 | onReachBottom: function () {
262 |
263 | if (this.data.isLoading) {
264 | this.getMusicInfo('..加载中..')
265 | } else {
266 | wx.showToast({
267 | title: '加载完成',
268 | })
269 | }
270 | },
271 |
272 | emojiScroll: function (e) {
273 |
274 | },
275 |
276 | textAreaBlur: function (e) {
277 | this.setData({
278 | content: e.detail.value
279 | })
280 |
281 | },
282 | textAreaFocus: function () {
283 | this.setData({
284 | isShow: false,
285 | cfBg: false
286 | })
287 | },
288 | emojiShowHide: function () {
289 | this.setData({
290 | isShow: !this.data.isShow,
291 | isLoad: false,
292 | cfBg: !this.data.false
293 | })
294 | },
295 | emojiChoose: function (e) {
296 | this.setData({
297 | content: this.data.content + e.currentTarget.dataset.emoji
298 | })
299 | },
300 | cemojiCfBg: function () {
301 | this.setData({
302 | isShow: false,
303 | cfBg: false
304 | })
305 | },
306 | send: function () {
307 | var that = this, conArr = [];
308 | var vid = that.data.view_id;
309 | var userInfo = that.data.userInfo;
310 | setTimeout(function () {
311 | wx.request({
312 | url: API_URL + 'ad_message/vid/' + vid,
313 | data: {
314 | content: that.data.content,
315 | openid: that.data.openid,
316 | avatar: userInfo.avatarUrl,
317 | uname: userInfo.nickName,
318 | time: util.formatTime(new Date())
319 | },
320 | header: {
321 | 'Content-Type': 'application/json'
322 | },
323 | success: function (res) {
324 | if (that.data.content.trim().length > 0) {
325 | conArr.push({
326 | avatar: userInfo.avatarUrl,
327 | uname: userInfo.nickName,
328 | time: util.formatTime(new Date()),
329 | content: that.data.content
330 | })
331 | that.setData({
332 | comments: that.data.comments.concat(conArr),
333 | content: "",
334 | isShow: false,
335 | cfBg: false
336 | })
337 | wx.showToast({
338 | title: '发送成功',
339 | icon: 'loading',
340 | duration: 1000
341 | })
342 | } else {
343 | that.setData({
344 | content: ""
345 | })
346 | }
347 |
348 | }
349 | })
350 | }, 100)
351 | },
352 |
353 | onShareAppMessage: function (res) {
354 | var that = this;
355 | return {
356 | title: '【丢失】请各位朋友帮我找一找',
357 | path: '/pages/view/view?id=' + that.data.vid
358 | }
359 | }
360 |
361 | })
--------------------------------------------------------------------------------
/pages/view/view.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/view/view.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{views.wxname}}
12 |
13 |
14 | {{views.datetime}}
15 |
16 |
17 |
18 |
19 |
20 |
21 | 联系电话 {{mobile}} 【已认证】
22 |
23 |
24 | {{views.content}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 发布于:{{views.address}}
42 |
43 |
44 |
45 | 【温馨提示】接到陌生人来电或者短信时,凡涉及到钱财交易,广大网友请提高警惕,谨防上当受骗!
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 评论列表
55 |
56 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
108 |
109 |
--------------------------------------------------------------------------------
/pages/view/view.wxss:
--------------------------------------------------------------------------------
1 | /* pages/view/view.wxss */
2 |
3 | .containes {
4 | padding-bottom: 45px;
5 | }
6 |
7 | .viewMain{
8 | width: 92%;
9 | margin: 30rpx auto 0
10 | }
11 |
12 | .UserName{
13 | display:flex;
14 | border-bottom: 2rpx #FAFAFA dashed; padding-bottom: 20rpx
15 | }
16 | .UserName .UserPic{
17 | flex: 4;
18 | width: 80rpx; height: 80rpx; flex-direction:row;
19 | }
20 | .UserName .UserPic image{width: 72rpx; height: 72rpx; border-radius: 50%; border: 2rpx #e3e3e3 solid; padding: 2rpx; background: #fff}
21 | .UserName .UserPic text{
22 | width: 300rpx;
23 | height: 80rpx;
24 | line-height: 80rpx;
25 | margin-left: 10rpx;
26 | position: absolute;
27 | overflow: hidden
28 | }
29 |
30 | .UserName .UserDate{
31 | flex: 2;
32 | text-align: right; height: 80rpx; line-height: 80rpx; color: #999
33 | }
34 |
35 | .content{
36 | margin: 30rpx auto; width: 100%;
37 | }
38 |
39 | .mbTxing{
40 | width: 92%; background: #FFF5EC; padding:3% 4%;
41 | color: #FF8E28; font-size: 10pt;
42 | }
43 | .mbTxing text{ width: 100%; display: block }
44 |
45 | .content-a{ width: 100%; margin-bottom: 20rpx; font-size: 16px}
46 | .content-b{ width: 100%; text-align: center}
47 | .content-tel{border-bottom: 2rpx #F5F5F5 solid; width: 100%; padding-bottom: 25rpx; color: #999; margin-bottom: 40rpx; }
48 | .content-tel image{ width: 10px;}
49 | .content-tel text{ padding-left: 20rpx}
50 |
51 | .line{ width: 100%; background-color: #EEEDF2; height: 10px}
52 | .pinglun{
53 | width: 100%; display: block; margin-top: 10rpx
54 | }
55 | .pinglun text{
56 | padding: 20rpx 30rpx; display: block; font-size: 14px; color: #999
57 | }
58 | .comments {
59 | border-top: 2rpx #F5F5F5 solid;
60 | padding: 0 20rpx; background-color: #fff;
61 | }
62 |
63 | .content {
64 | word-break: break-all;
65 | font-size: 14px;
66 | }
67 |
68 | .item {
69 | display: flex;
70 | position: relative;
71 | padding: 15px;
72 | border-bottom: 2rpx #F5F5F5 solid
73 | }
74 |
75 | .i-right {
76 | width: 100%;
77 | }
78 |
79 | .c-u-img {
80 | width: 30px;
81 | height: 30px;
82 | border-radius: 50%;
83 | margin-right: 8px;
84 | }
85 |
86 | .item .top {
87 | display: flex;
88 | justify-content: space-between;
89 | margin-bottom: 3px;
90 | }
91 |
92 | .item .u-name {
93 | color: deepskyblue;
94 | font-size: 12px;
95 | overflow: hidden;
96 | padding-top: 15rpx;
97 | }
98 |
99 | .item .time {
100 | color: #888;
101 | font-size: 12px;
102 | padding-top: 15rpx
103 | }
104 |
105 | .comment-fixed {
106 | position: fixed;
107 | left: 0; bottom: 0;
108 |
109 | background-color: #fff;
110 | box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
111 | z-index: 9999;
112 | }
113 |
114 | .cf-bg {
115 | position: fixed;
116 | top: 0;
117 | left: 0;
118 | bottom: 0;
119 | right: 0;
120 | background-color: #000;
121 | z-index: 99;
122 | opacity: 0.5;
123 | }
124 |
125 | .cf-box {
126 | padding: 8px 5px;
127 | display: flex;
128 | justify-content: center;
129 | }
130 |
131 | .t-info textarea {
132 | background: red;
133 | padding: 8px;
134 | height: 30px;
135 | box-sizing: border-box;
136 | width: 100%;
137 | display: block;
138 | }
139 |
140 | .cf-content {
141 | background-color: #f2f2f2;
142 | padding: 8px 5px;
143 | font-size: 12px;
144 | height: 30px;
145 | max-height: 40px;
146 | width: 100%;
147 | }
148 |
149 | .cf-send {
150 | width: 80px;
151 | display: flex !important;
152 | flex-direction: column;
153 | justify-content: center;
154 | margin-left: 5px;
155 | border-radius: 2px;
156 | text-align: center;
157 | padding: 0 2px !important;
158 | font-size: 12px;
159 | background-color: #E95854;
160 | color: #fff;
161 | }
162 |
163 | .cf-send.touch-active:active {
164 | background-color: #b03f3e;
165 | }
166 |
167 | .emoji {
168 | background-color: #fff;
169 | width: 30px;
170 | height: 30px;
171 | text-align: center;
172 | padding-top: 2px;
173 | box-sizing: border-box;
174 | font-size: 20px;
175 | }
176 |
177 | .emoji-box {
178 | position: relative;
179 | height: 200px;
180 | padding: 5px 0;
181 | box-sizing: border-box;
182 | margin-bottom: -200px;
183 | }
184 |
185 | .emoji-cell {
186 | width: 9.09%;
187 | height: 33px;
188 | display: inline-block;
189 | }
190 |
191 | .emoji-cell image {
192 | width: 23px;
193 | height: 23px;
194 | padding: 5px;
195 | border-radius: 3px;
196 | }
197 |
198 | .emoji-move-in {
199 | -webkit-animation: emoji-move-in 0.3s forwards;
200 | animation: emoji-move-in 0.3s forwards;
201 | }
202 |
203 | .emoji-move-out {
204 | -webkit-animation: emoji-move-out 0.3s forwards;
205 | animation: emoji-move-out 0.3s forwards;
206 | }
207 |
208 | .no-emoji-move {
209 | -webkit-animation: none;
210 | animation: none;
211 | }
212 |
213 | @-webkit-keyframes emoji-move-in {
214 | 0% {
215 | margin-bottom: -200px;
216 | }
217 |
218 | 100% {
219 | margin-bottom: 0;
220 | }
221 | }
222 |
223 | @keyframes emoji-move-in {
224 | 0% {
225 | margin-bottom: -200px;
226 | }
227 |
228 | 100% {
229 | margin-bottom: 0;
230 | }
231 | }
232 |
233 | @-webkit-keyframes emoji-move-out {
234 | 0% {
235 | margin-bottom: 0;
236 | }
237 |
238 | 100% {
239 | margin-bottom: -200px;
240 | }
241 | }
242 |
243 | @keyframes emoji-move-out {
244 | 0% {
245 | margin-bottom: 0;
246 | }
247 |
248 | 100% {
249 | margin-bottom: -200px;
250 | }
251 | }
252 |
253 | @-webkit-keyframes pd-left-move {
254 | 0% {
255 | padding-left: 5px;
256 | }
257 |
258 | 100% {
259 | padding-left: 15px;
260 | }
261 | }
262 |
263 | @keyframes pd-left-move {
264 | 0% {
265 | padding-left: 5px;
266 | }
267 |
268 | 100% {
269 | padding-left: 15px;
270 | }
271 | }
272 |
273 | @font-face {font-family: "iconfont";
274 | src: url('//at.alicdn.com/t/font_4n1crpa4urpv6lxr.eot?t=1482133471430'); /* IE9*/
275 | src: url('//at.alicdn.com/t/font_4n1crpa4urpv6lxr.eot?t=1482133471430#iefix') format('embedded-opentype'), /* IE6-IE8 */
276 | url('//at.alicdn.com/t/font_4n1crpa4urpv6lxr.woff?t=1482133471430') format('woff'), /* chrome, firefox */
277 | url('//at.alicdn.com/t/font_4n1crpa4urpv6lxr.ttf?t=1482133471430') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
278 | url('//at.alicdn.com/t/font_4n1crpa4urpv6lxr.svg?t=1482133471430#iconfont') format('svg'); /* iOS 4.1- */
279 | }
280 |
281 | .iconfont {
282 | font-family:"iconfont" !important;
283 | font-size:24px;
284 | font-style:normal;
285 | -webkit-font-smoothing: antialiased;
286 | -moz-osx-font-smoothing: grayscale;
287 | padding-right: 8rpx
288 | }
289 |
290 | .icon-xiazai:before { content: "\e62c"; }
291 | .icon-svg35:before { content: "\e848"; }
292 | .icon-pinglun:before { content: "\e612"; }
293 | .icon-biaoqing:before { content: "\e60d"; }
294 | .icon-my:before { content: "\e63e"; }
295 | .icon-ku:before { content: "\e60e"; }
296 | .icon-pinglun1:before { content: "\e606"; }
297 | .icon-8:before { content: "\e60a"; }
298 | .icon-iconfontfasong:before { content: "\e61d"; }
299 | .icon-shoucangyishoucang-copy:before { content: "\e600"; }
300 | .icon-send:before { content: "\e6a6"; }
301 | .icon-liulan:before { content: "\e613"; }
302 | .icon-shouyeshouye:before { content: "\e631"; }
303 | .icon-emoji:before { content: "\e614"; }
304 | .icon-xihuan:before { content: "\e6bd"; }
305 | .icon-liulan1:before { content: "\e67b"; }
306 |
307 | .weui-loadmore__tips{ font-size: 12px; color: #C1C1C1; width: 100%; text-align: center; padding:30rpx 0 120rpx 0;}
308 |
309 |
310 | /* 获取当前位置 */
311 | .getGps{
312 | width: 92%; background: #FFF; padding:3% 4%; font-size: 12px; color: #C1C1C1;
313 | text-align: right
314 | }
315 | image.mapIco{
316 | width: 2%;
317 | margin-left: 13rpx
318 | }
319 |
320 | /* 关注度 */
321 | .Guanzhu{
322 | padding:4% 0; width: 100%
323 | }
324 | .Guanzhu label{
325 | width: 100%; display: block; text-align: center; color: #C1C1C1; font-size: 12px;
326 | margin-bottom: 10px
327 | }
328 | .gzList{
329 | width: 100%; display: block;
330 | }
331 | .gzAuthor{ width: 7%; margin: 2% 2% 0 0; opacity:0.6;}
332 |
333 | /* 转发按钮 */
334 | .zhuan{ width: 90%; padding:3% 5%; background: #FAFAFA;}
335 | .zhuan button{ border-radius: 50px; background: #fff; font-size: 15px; color:#999; border: 2rpx #F4F4F4 solid;}
336 | .zhuan button::after {
337 | border: 0;
338 | }
339 |
--------------------------------------------------------------------------------
/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 | "showShadowRootInWxmlPanel": true,
15 | "scopeDataCheck": false
16 | },
17 | "compileType": "miniprogram",
18 | "libVersion": "2.11.1",
19 | "appid": "wxd25180319dd4b970",
20 | "projectname": "miniprogram-1",
21 | "debugOptions": {
22 | "hidedInDevtools": []
23 | },
24 | "isGameTourist": false,
25 | "simulatorType": "wechat",
26 | "simulatorPluginLibVersion": {},
27 | "condition": {
28 | "search": {
29 | "current": -1,
30 | "list": []
31 | },
32 | "conversation": {
33 | "current": -1,
34 | "list": []
35 | },
36 | "game": {
37 | "currentL": -1,
38 | "list": []
39 | },
40 | "miniprogram": {
41 | "current": -1,
42 | "list": []
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | ## 失物招领小程序端
2 |
3 | >失物招领主要包括了微信小程序端,微信公众号wap端,后端管理。
4 | >小程序,wap端主要包括失物信息发布,失物认领,短信认证,自动屏蔽广告。
5 | >关键技术:ThinkPHP3.2 ,JQuery,Angular,MySql,Restful Api
6 | >wap端,小程序端 (两端UI基本一致,效果图如下):
7 |
8 | ### 服务端 [传送门](https://github.com/melodyne/laf-server)
9 |
10 | 效果图:
11 |

12 |

13 |
14 | 扫一扫,就可以体验
15 |
16 | 
17 |
18 |
19 |
20 | 相关连接1:https://www.yunyii.cn
21 |
22 | 相关连接2:http://lf.yunyii.cn
23 | ---------------------
24 | 原文:https://blog.csdn.net/veloi/article/details/83479370
25 |
26 |
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/template/loading.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ..正在加载..
6 |
7 |
8 |
9 |
10 |
11 | ---- 我是有底线的 ----
12 |
13 |
14 |
15 |
16 |
17 | ---- 暂无评论 ----
18 |
19 |
--------------------------------------------------------------------------------
/utils/bmap-wx.js:
--------------------------------------------------------------------------------
1 | "use strict";function _classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,a){for(var e=0;e