正在显示
13 个修改的文件
包含
217 行增加
和
32 行删除
@@ -4,24 +4,24 @@ App({ | @@ -4,24 +4,24 @@ App({ | ||
4 | console.log('app-onshow'); | 4 | console.log('app-onshow'); |
5 | const self = this; | 5 | const self = this; |
6 | // 查看是否授权 | 6 | // 查看是否授权 |
7 | - wx.getSetting({ | ||
8 | - success(res) { | ||
9 | - if (res.authSetting['scope.userInfo']) { | ||
10 | - console.log('授权过到首页'); | ||
11 | - self.globalData.isLogin = true; | ||
12 | - wx.setStorageSync('isLogin', true) | ||
13 | - // wx.redirectTo({ | ||
14 | - // url: '/pages/index/index', //跳转到首页 | ||
15 | - // }); | ||
16 | - } else { | ||
17 | - console.log('授权失效到授权页'); | ||
18 | - self.globalData.isLogin = false; | ||
19 | - wx.navigateTo({ | ||
20 | - url: '/pages/my/my', //跳转到授权页面 | ||
21 | - }) | ||
22 | - } | ||
23 | - } | ||
24 | - }) | 7 | + // wx.getSetting({ |
8 | + // success(res) { | ||
9 | + // if (res.authSetting['scope.userInfo']) { | ||
10 | + // console.log('授权过到首页'); | ||
11 | + // self.globalData.isLogin = true; | ||
12 | + // wx.setStorageSync('isLogin', true) | ||
13 | + // // wx.redirectTo({ | ||
14 | + // // url: '/pages/index/index', //跳转到首页 | ||
15 | + // // }); | ||
16 | + // } else { | ||
17 | + // console.log('授权失效到授权页'); | ||
18 | + // self.globalData.isLogin = false; | ||
19 | + // wx.redirectTo({ | ||
20 | + // url: '/pages/my/my', //跳转到授权页面 | ||
21 | + // }) | ||
22 | + // } | ||
23 | + // } | ||
24 | + // }) | ||
25 | }, | 25 | }, |
26 | onLaunch: function () { | 26 | onLaunch: function () { |
27 | console.log('app-onLaunch'); | 27 | console.log('app-onLaunch'); |
@@ -95,7 +95,7 @@ App({ | @@ -95,7 +95,7 @@ App({ | ||
95 | //init | 95 | //init |
96 | let that = this; | 96 | let that = this; |
97 | let postData = data; | 97 | let postData = data; |
98 | - let baseUrl = 'http://wmatchrd.com/api'; | 98 | + let baseUrl = 'https://wmatchrd.com/api'; |
99 | //网络请求 | 99 | //网络请求 |
100 | let header = { | 100 | let header = { |
101 | 'content-type': 'application/x-www-form-urlencoded' | 101 | 'content-type': 'application/x-www-form-urlencoded' |
pages/comment/suggest.js
0 → 100644
1 | +// pages/my/suggest/suggest.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
pages/comment/suggest.json
0 → 100644
pages/comment/suggest.wxml
0 → 100644
1 | +<!--pages/my/suggest/suggest.wxml--> | ||
2 | +<view class="content"> | ||
3 | + <!--<view class="title">意见反馈</view>--> | ||
4 | + <view class="input"> | ||
5 | + <textarea name="" id="" cols="30" rows="10" | ||
6 | + placeholder="请输入您的意见" maxlength="200" | ||
7 | + placeholder-class="placeholder" bindinput="input" | ||
8 | + ></textarea> | ||
9 | + <view class="num"> | ||
10 | + <view class="iconfont icon-bianji"></view> | ||
11 | + <text>限200字以内</text> | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + <view class="btn-box" bindtap="submit"> | ||
15 | + <view class="btn">提交</view> | ||
16 | + </view> | ||
17 | +</view> |
pages/comment/suggest.wxss
0 → 100644
1 | +/* pages/my/suggest/suggest.wxss */ | ||
2 | +page { | ||
3 | + width: 100%; | ||
4 | + height: 100%; | ||
5 | + background-color: #f2f2f2; | ||
6 | +} | ||
7 | +.content { | ||
8 | + width: 100%; | ||
9 | + height: 100%; | ||
10 | + position: relative; | ||
11 | +} | ||
12 | +.title { | ||
13 | + border-bottom: 1rpx solid #ebebeb; | ||
14 | + padding: 28rpx 32rpx 28rpx 32rpx; | ||
15 | + color:#292525; | ||
16 | + font-size: 30rpx; | ||
17 | + font-weight: bold; | ||
18 | +} | ||
19 | +.input { | ||
20 | + display: flex; | ||
21 | + flex-direction: column; | ||
22 | + align-items: center; | ||
23 | + justify-content: space-between; | ||
24 | + padding: 68rpx 32rpx 32rpx 32rpx; | ||
25 | + -webkit-box-sizing: border-box; | ||
26 | + -moz-box-sizing: border-box; | ||
27 | + box-sizing: border-box; | ||
28 | + position: relative; | ||
29 | +} | ||
30 | +textarea { | ||
31 | + width:80%; | ||
32 | + border-radius: 16rpx; | ||
33 | + background-color: #ffffff; | ||
34 | + height: 360rpx; | ||
35 | + color: #666666; | ||
36 | + font-size: 28rpx; | ||
37 | + padding: 30rpx; | ||
38 | +} | ||
39 | +.placeholder { | ||
40 | + color: #999999; | ||
41 | + font-size: 28rpx; | ||
42 | +} | ||
43 | +.btn-box { | ||
44 | + width: 100%; | ||
45 | + padding: 0 32rpx; | ||
46 | + -webkit-box-sizing: border-box; | ||
47 | + -moz-box-sizing: border-box; | ||
48 | + box-sizing: border-box; | ||
49 | + margin-top: 102rpx; | ||
50 | +} | ||
51 | +.btn { | ||
52 | + height: 98rpx; | ||
53 | + color: #E1C8AF; | ||
54 | + font-size: 30rpx; | ||
55 | + background-color: #323232; | ||
56 | + border-radius: 16rpx; | ||
57 | + display: flex; | ||
58 | + align-items: center; | ||
59 | + justify-content: center; | ||
60 | +} | ||
61 | +.num { | ||
62 | + position: absolute; | ||
63 | + right:100rpx; | ||
64 | + bottom:50rpx; | ||
65 | + font-size: 24rpx; | ||
66 | + color: #999999; | ||
67 | + display: flex; | ||
68 | + align-items: center; | ||
69 | +} | ||
70 | +.icon-bianji { | ||
71 | + color: #999999; | ||
72 | + font-size: 46rpx; | ||
73 | + margin-right: 20rpx; | ||
74 | +} |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | </view> | 12 | </view> |
13 | <view class="city-box {{current===1?'margin':''}}"> | 13 | <view class="city-box {{current===1?'margin':''}}"> |
14 | <view wx:for="{{city_picker_list}}" wx:key="index"> | 14 | <view wx:for="{{city_picker_list}}" wx:key="index"> |
15 | - <view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}">{{item}}</view> | 15 | + <view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}" >{{item}}</view> |
16 | </view> | 16 | </view> |
17 | </view> | 17 | </view> |
18 | </view> | 18 | </view> |
@@ -238,6 +238,7 @@ Page({ | @@ -238,6 +238,7 @@ Page({ | ||
238 | }, | 238 | }, |
239 | //发布按钮 | 239 | //发布按钮 |
240 | release(e) { | 240 | release(e) { |
241 | + console.log(1) | ||
241 | // console.log('发布', app.globalData.isLogin); | 242 | // console.log('发布', app.globalData.isLogin); |
242 | const self = this; | 243 | const self = this; |
243 | // self.setData({ | 244 | // self.setData({ |
@@ -249,27 +250,29 @@ Page({ | @@ -249,27 +250,29 @@ Page({ | ||
249 | title: '还没登录,先去登录吧~', icon: 'none', | 250 | title: '还没登录,先去登录吧~', icon: 'none', |
250 | success: function () { | 251 | success: function () { |
251 | setTimeout(function () { | 252 | setTimeout(function () { |
252 | - wx.redirectTo({url: '/pages/my/my'}) | 253 | + wx.navigateTo({ |
254 | + url: '/pages/my/my'}) | ||
253 | }, 500) | 255 | }, 500) |
254 | } | 256 | } |
255 | }); | 257 | }); |
256 | } else { | 258 | } else { |
257 | - if (+self.data.is_write === 2 && wx.getStorageSync('is_canSend') === 2) { //没填写个人信息并且不可以发布 =>去填写 | 259 | + console.log(self.data.is_answer, self.data.is_canSend, self.data.is_write) |
260 | + if (+self.data.is_write == 2 && wx.getStorageSync('is_canSend') == 2) { //没填写个人信息并且不可以发布 =>去填写 | ||
258 | self.setData({ | 261 | self.setData({ |
259 | is_showUserInfo: true //弹出 去填写个人信息弹框 | 262 | is_showUserInfo: true //弹出 去填写个人信息弹框 |
260 | }); | 263 | }); |
261 | 264 | ||
262 | - } else if (+self.data.is_write === 1 && wx.getStorageSync('is_answer') === 2) { //已填写且不能发布=>去答题 | 265 | + } else if (+self.data.is_write == 1 && wx.getStorageSync('is_answer') == 2) { //已填写且不能发布=>去答题 |
263 | self.setData({ | 266 | self.setData({ |
264 | is_showAnswer: true, //弹出 去答题弹框 | 267 | is_showAnswer: true, //弹出 去答题弹框 |
265 | is_showRelease: false, | 268 | is_showRelease: false, |
266 | }); | 269 | }); |
267 | - } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 1 && wx.getStorageSync('is_answer') === 1) { //已填写且可以发布 =>去发布 | 270 | + } else if (+self.data.is_write == 1 && wx.getStorageSync('is_canSend') == 1 && wx.getStorageSync('is_answer') == 1) { //已填写且可以发布 =>去发布 |
268 | // console.log('可以发布'); | 271 | // console.log('可以发布'); |
269 | self.setData({ | 272 | self.setData({ |
270 | is_showRelease: true //弹出 发布弹框 | 273 | is_showRelease: true //弹出 发布弹框 |
271 | }); | 274 | }); |
272 | - } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { | 275 | + } else if (self.data.is_write == 1 && wx.getStorageSync('is_canSend') == 2 && wx.getStorageSync('is_answer') == 1) { |
273 | // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); | 276 | // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); |
274 | self.setData({ | 277 | self.setData({ |
275 | is_showResult: true //弹出 提示框 | 278 | is_showResult: true //弹出 提示框 |
@@ -489,6 +492,25 @@ Page({ | @@ -489,6 +492,25 @@ Page({ | ||
489 | // this.getLat();//获取经纬度 | 492 | // this.getLat();//获取经纬度 |
490 | }, | 493 | }, |
491 | onShow() { | 494 | onShow() { |
495 | + if (!app.globalData.isLogin){ | ||
496 | + wx.getSetting({ | ||
497 | + success(res) { | ||
498 | + if (!res.authSetting['scope.userInfo']) { | ||
499 | + app.globalData.isLogin = false; | ||
500 | + wx.showToast({ | ||
501 | + title: '您还没登录,请登录后操作', | ||
502 | + icon: 'none' | ||
503 | + }) | ||
504 | + setTimeout(() => { | ||
505 | + wx.navigateTo({ | ||
506 | + url: '/pages/my/my', //跳转到授权页面 | ||
507 | + }) | ||
508 | + }, 1500) | ||
509 | + } | ||
510 | + } | ||
511 | + }) | ||
512 | + } | ||
513 | + | ||
492 | wx.showLoading({title:'加载中',mask:true}); | 514 | wx.showLoading({title:'加载中',mask:true}); |
493 | if (wx.getStorageSync('isLogin')) { | 515 | if (wx.getStorageSync('isLogin')) { |
494 | this.getLat();//获取经纬度 | 516 | this.getLat();//获取经纬度 |
@@ -186,7 +186,7 @@ Page({ | @@ -186,7 +186,7 @@ Page({ | ||
186 | let uploadImgCount = 0; | 186 | let uploadImgCount = 0; |
187 | for (let i = 0, h = tempFilePaths.length; i < h; i++) { | 187 | for (let i = 0, h = tempFilePaths.length; i < h; i++) { |
188 | wx.uploadFile({ | 188 | wx.uploadFile({ |
189 | - url: 'http://wmatchrd.com/portal/Index/upload', | 189 | + url: 'https://wmatchrd.com/portal/Index/upload', |
190 | filePath: tempFilePaths[i], | 190 | filePath: tempFilePaths[i], |
191 | name: 'file', | 191 | name: 'file', |
192 | formData: { | 192 | formData: { |
@@ -219,11 +219,11 @@ Page({ | @@ -219,11 +219,11 @@ Page({ | ||
219 | app.post(url, params, {}).then((res) => { | 219 | app.post(url, params, {}).then((res) => { |
220 | // console.log('保存', res); | 220 | // console.log('保存', res); |
221 | if (+res.code === 1) { | 221 | if (+res.code === 1) { |
222 | - wx.showToast({title:res.message,icon:'none', | 222 | + wx.showToast({title:'保存成功',icon:'none', |
223 | success:function () { | 223 | success:function () { |
224 | setTimeout(function () { | 224 | setTimeout(function () { |
225 | wx.navigateBack({delta:1}) | 225 | wx.navigateBack({delta:1}) |
226 | - },500) | 226 | + },1200) |
227 | } | 227 | } |
228 | }) | 228 | }) |
229 | } | 229 | } |
@@ -199,9 +199,9 @@ Page({ | @@ -199,9 +199,9 @@ Page({ | ||
199 | app.globalData.isLogin = true; | 199 | app.globalData.isLogin = true; |
200 | self.setData({isLogin: app.globalData.isLogin}); | 200 | self.setData({isLogin: app.globalData.isLogin}); |
201 | self.getIndex(); | 201 | self.getIndex(); |
202 | - // setTimeout(function () { | ||
203 | - // wx.navigateBack({delta:1}) | ||
204 | - // },200) | 202 | + setTimeout(function () { |
203 | + wx.navigateBack({delta:1}) | ||
204 | + },1000) | ||
205 | }) | 205 | }) |
206 | }, | 206 | }, |
207 | fail: function (res) { | 207 | fail: function (res) { |
@@ -66,6 +66,7 @@ Page({ | @@ -66,6 +66,7 @@ Page({ | ||
66 | console.log('取消订单', res); | 66 | console.log('取消订单', res); |
67 | if (+res.code === 1) { | 67 | if (+res.code === 1) { |
68 | wx.showToast({title:'订单已取消',icon:'none'}); | 68 | wx.showToast({title:'订单已取消',icon:'none'}); |
69 | + self.getOrderDetail() | ||
69 | // self.setData({ | 70 | // self.setData({ |
70 | // detail: res.data, | 71 | // detail: res.data, |
71 | // }); | 72 | // }); |
-
请 注册 或 登录 后发表评论