添加长按删除订单功能,添加城市列表搜索功能,添加答题之后提示框,个人资料改成性别可选,手机号可输入,添加取消订单逻辑,参与之后添加返回首页,修改发布文案
正在显示
27 个修改的文件
包含
384 行增加
和
95 行删除
@@ -72,7 +72,7 @@ Page({ | @@ -72,7 +72,7 @@ Page({ | ||
72 | wx.chooseLocation({ | 72 | wx.chooseLocation({ |
73 | success(res) { | 73 | success(res) { |
74 | console.log(res); | 74 | console.log(res); |
75 | - self.setData({address_position: res.address,latng:res.latitude + ',' + res.longitude}) | 75 | + self.setData({address_position: res.address !== ''?res.address:res.name,latng:res.latitude + ',' + res.longitude}) |
76 | }, | 76 | }, |
77 | }) | 77 | }) |
78 | //打开地图导航 | 78 | //打开地图导航 |
@@ -91,7 +91,7 @@ | @@ -91,7 +91,7 @@ | ||
91 | <text class="iconfont icon-location"></text> | 91 | <text class="iconfont icon-location"></text> |
92 | </view> | 92 | </view> |
93 | <view class="time-limit"> | 93 | <view class="time-limit"> |
94 | - <text>时限 活动开始前</text> | 94 | + <text class="limit-title">活动前</text> |
95 | <input type="number" bindinput="inputOverTime" value="{{over_time}}"/> | 95 | <input type="number" bindinput="inputOverTime" value="{{over_time}}"/> |
96 | <text>小时 停止拼单</text> | 96 | <text>小时 停止拼单</text> |
97 | </view> | 97 | </view> |
@@ -98,6 +98,10 @@ | @@ -98,6 +98,10 @@ | ||
98 | width:96rpx; | 98 | width:96rpx; |
99 | text-align:right; | 99 | text-align:right; |
100 | } | 100 | } |
101 | +.limit-title { | ||
102 | + width:96rpx; | ||
103 | + text-align:right; | ||
104 | +} | ||
101 | .min-num .input { | 105 | .min-num .input { |
102 | width: 160rpx; | 106 | width: 160rpx; |
103 | height: 38rpx; | 107 | height: 38rpx; |
@@ -50,7 +50,7 @@ Page({ | @@ -50,7 +50,7 @@ Page({ | ||
50 | }, | 50 | }, |
51 | //完成按钮 | 51 | //完成按钮 |
52 | goBack() { | 52 | goBack() { |
53 | - wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 1}) | 53 | + wx.redirectTo({url:'/pages/index/index'}) |
54 | }, | 54 | }, |
55 | disableScroll() { | 55 | disableScroll() { |
56 | }, | 56 | }, |
@@ -665,8 +665,8 @@ Page({ | @@ -665,8 +665,8 @@ Page({ | ||
665 | y: 0, | 665 | y: 0, |
666 | width: 280, | 666 | width: 280, |
667 | height: 400, | 667 | height: 400, |
668 | - destWidth: 1120, | ||
669 | - destHeight: 1600, | 668 | + destWidth: 840,//是width的3倍 |
669 | + destHeight: 1400,//是高的3.5倍 | ||
670 | canvasId: 'canvas', | 670 | canvasId: 'canvas', |
671 | fileType: 'jpg', | 671 | fileType: 'jpg', |
672 | quality:1, | 672 | quality:1, |
@@ -747,27 +747,54 @@ Page({ | @@ -747,27 +747,54 @@ Page({ | ||
747 | /** | 747 | /** |
748 | * 用户点击右上角分享 | 748 | * 用户点击右上角分享 |
749 | */ | 749 | */ |
750 | - onShareAppMessage: function () { | 750 | + onShareAppMessage: function (res) { |
751 | + console.log('转发res',res); | ||
751 | let self = this; | 752 | let self = this; |
752 | - // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
753 | - var shareObj = { | ||
754 | - title: '火柴西路', // 默认是小程序的名称(可以写slogan等) | ||
755 | - path: '', // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
756 | - imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
757 | - success: function (res) { | ||
758 | - if (res.errMsg == 'shareAppMessage:ok') { | 753 | + if(res.from === 'button') { |
754 | + return { | ||
755 | + title: self.data.detail.title, // 默认是小程序的名称(可以写slogan等) | ||
756 | + path: '/pages/activity/detail/detail?id=' + self.data.detail_id, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
757 | + imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
758 | + success: function (res) { | ||
759 | + if (res.errMsg == 'shareAppMessage:ok') { | ||
760 | + console.log('转发成功之后'); | ||
761 | + } | ||
762 | + }, | ||
763 | + fail: function () { | ||
764 | + // 转发失败之后的回调 | ||
765 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
766 | + // 用户取消转发 | ||
767 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
768 | + // 转发失败,其中 detail message 为详细失败信息 | ||
769 | + } | ||
770 | + }, | ||
771 | + complete: function () { | ||
772 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
773 | + console.log('转发结束之后'); | ||
759 | } | 774 | } |
760 | - }, | ||
761 | - fail: function () { | ||
762 | - // 转发失败之后的回调 | ||
763 | - if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
764 | - // 用户取消转发 | ||
765 | - } else if (res.errMsg == 'shareAppMessage:fail') { | ||
766 | - // 转发失败,其中 detail message 为详细失败信息 | 775 | + } |
776 | + }else { | ||
777 | + return { | ||
778 | + title: self.data.detail.title, // 默认是小程序的名称(可以写slogan等) | ||
779 | + path: '/pages/activity/detail/detail?id=' + self.data.detail_id, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
780 | + imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
781 | + success: function (res) { | ||
782 | + if (res.errMsg == 'shareAppMessage:ok') { | ||
783 | + console.log('转发成功之后'); | ||
784 | + } | ||
785 | + }, | ||
786 | + fail: function () { | ||
787 | + // 转发失败之后的回调 | ||
788 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
789 | + // 用户取消转发 | ||
790 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
791 | + // 转发失败,其中 detail message 为详细失败信息 | ||
792 | + } | ||
793 | + }, | ||
794 | + complete: function () { | ||
795 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
796 | + console.log('转发结束之后'); | ||
767 | } | 797 | } |
768 | - }, | ||
769 | - complete: function () { | ||
770 | - // 转发结束之后的回调(转发成不成功都会执行) | ||
771 | } | 798 | } |
772 | } | 799 | } |
773 | }, | 800 | }, |
@@ -215,7 +215,7 @@ | @@ -215,7 +215,7 @@ | ||
215 | <image class="sorry-img" src="../../../images/success@2x.png"></image> | 215 | <image class="sorry-img" src="../../../images/success@2x.png"></image> |
216 | <view class="title">恭喜您拼活动成功</view> | 216 | <view class="title">恭喜您拼活动成功</view> |
217 | <view class="view-btn" catchtap="goMyOrder">查看我的订单</view> | 217 | <view class="view-btn" catchtap="goMyOrder">查看我的订单</view> |
218 | - <view class="complete-btn" catchtap="goBack">完成</view> | 218 | + <view class="complete-btn" catchtap="goBack">再逛逛</view> |
219 | </view> | 219 | </view> |
220 | <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" | 220 | <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" |
221 | catchtouchmove="disableScroll"></view> | 221 | catchtouchmove="disableScroll"></view> |
@@ -9,6 +9,47 @@ Page({ | @@ -9,6 +9,47 @@ Page({ | ||
9 | current: 0, | 9 | current: 0, |
10 | list:[], | 10 | list:[], |
11 | status:0, | 11 | status:0, |
12 | + searchValue: '', | ||
13 | + searchHistory:[], | ||
14 | + | ||
15 | + }, | ||
16 | + inputFocus() { | ||
17 | + // this.setData({postList:[]}) | ||
18 | + }, | ||
19 | + //输入搜索内容 | ||
20 | + inputKey(e) { | ||
21 | + this.setData({searchValue: e.detail.value}) | ||
22 | + }, | ||
23 | + //搜索结果 | ||
24 | + startSearch() { | ||
25 | + let self = this; | ||
26 | + let url = '/portal/Index/addrFind'; | ||
27 | + let header = { | ||
28 | + "XX-Token": wx.getStorageSync('token') | ||
29 | + }; | ||
30 | + let params = { | ||
31 | + token: wx.getStorageSync('token'), | ||
32 | + keyword:self.data.searchValue, | ||
33 | + }; | ||
34 | + app.post(url, params, header).then((res) => { | ||
35 | + console.log('搜索历史列表', res); | ||
36 | + // wx.hideLoading(); | ||
37 | + if(+res.code === 1) { | ||
38 | + if(res.data.length === 0) { | ||
39 | + wx.showToast({title:'暂无更多内容',icon:'none'}) | ||
40 | + }else { | ||
41 | + const arr = []; | ||
42 | + res.data.forEach((item)=> { | ||
43 | + arr.push(item.title) | ||
44 | + }) | ||
45 | + self.setData({ | ||
46 | + city_picker_list: arr, | ||
47 | + cityList:res.data, | ||
48 | + }); | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
52 | + }) | ||
12 | }, | 53 | }, |
13 | //tab点击事件 | 54 | //tab点击事件 |
14 | chargeTab(e) { | 55 | chargeTab(e) { |
@@ -17,7 +58,7 @@ Page({ | @@ -17,7 +58,7 @@ Page({ | ||
17 | current: current, | 58 | current: current, |
18 | }); | 59 | }); |
19 | if(current === 0) { | 60 | if(current === 0) { |
20 | - this.getCityList() | 61 | + this.getCityList(); |
21 | }else if(current === 1) { | 62 | }else if(current === 1) { |
22 | this.getAbroadList() | 63 | this.getAbroadList() |
23 | } | 64 | } |
@@ -88,7 +129,10 @@ Page({ | @@ -88,7 +129,10 @@ Page({ | ||
88 | onLoad: function (options) { | 129 | onLoad: function (options) { |
89 | this.getCityList(); | 130 | this.getCityList(); |
90 | }, | 131 | }, |
91 | - | 132 | + onPageScroll: function (res) { |
133 | + // console.log(res); | ||
134 | + // this.setData({scroll_top:res.scrollTop}) | ||
135 | + }, | ||
92 | /** | 136 | /** |
93 | * 生命周期函数--监听页面初次渲染完成 | 137 | * 生命周期函数--监听页面初次渲染完成 |
94 | */ | 138 | */ |
@@ -4,7 +4,12 @@ | @@ -4,7 +4,12 @@ | ||
4 | <view class="tab_item {{current==0?'active':''}}" data-current='{{0}}' bindtap='chargeTab'>国内</view> | 4 | <view class="tab_item {{current==0?'active':''}}" data-current='{{0}}' bindtap='chargeTab'>国内</view> |
5 | <view class="tab_item {{current==1?'active':''}}" data-current='{{1}}' bindtap='chargeTab'>国际</view> | 5 | <view class="tab_item {{current==1?'active':''}}" data-current='{{1}}' bindtap='chargeTab'>国际</view> |
6 | </view> | 6 | </view> |
7 | - <view class="city-box"> | 7 | + <view class="right" wx:if="{{current===1}}"> |
8 | + <input class="input" type="text" placeholder="搜索国家" bindinput="inputKey" bindfocus="inputFocus" value="{{searchValue}}" bindconfirm="startSearch" /> | ||
9 | + <image src="../../../images/search@2x.png" class="search-icon" bindtap="startSearch"></image> | ||
10 | + <!--<view class="iconfont icon-arrow-down"></view>--> | ||
11 | + </view> | ||
12 | + <view class="city-box {{current===1?'margin':''}}"> | ||
8 | <view wx:for="{{city_picker_list}}" wx:key="index"> | 13 | <view wx:for="{{city_picker_list}}" wx:key="index"> |
9 | <view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}">{{item}}</view> | 14 | <view class="city-item {{current_city === index?'change-bg':''}}" bindtap="chooseCity" data-index="{{index}}">{{item}}</view> |
10 | </view> | 15 | </view> |
@@ -2,11 +2,24 @@ | @@ -2,11 +2,24 @@ | ||
2 | page { | 2 | page { |
3 | height: 100%; | 3 | height: 100%; |
4 | background-color: #f5f6f8; | 4 | background-color: #f5f6f8; |
5 | + overflow-y:hidden; | ||
6 | +} | ||
7 | +::-webkit-scrollbar { | ||
8 | + width: 0; | ||
9 | + height: 0; | ||
10 | + color: transparent; | ||
11 | + display: none; | ||
5 | } | 12 | } |
6 | .content { | 13 | .content { |
7 | height: 100%; | 14 | height: 100%; |
8 | background-color: #f5f6f8; | 15 | background-color: #f5f6f8; |
9 | } | 16 | } |
17 | +::-webkit-scrollbar { | ||
18 | + width: 0; | ||
19 | + height: 0; | ||
20 | + color: transparent; | ||
21 | + display: none; | ||
22 | +} | ||
10 | .tab_box { | 23 | .tab_box { |
11 | width: 100%; | 24 | width: 100%; |
12 | /* padding: 0 70rpx; */ | 25 | /* padding: 0 70rpx; */ |
@@ -29,21 +42,50 @@ page { | @@ -29,21 +42,50 @@ page { | ||
29 | } | 42 | } |
30 | .tab_item { | 43 | .tab_item { |
31 | width:50%; | 44 | width:50%; |
32 | - display: inline-block; | 45 | + /* display: inline-block; */ |
33 | /* width: 160rpx; */ | 46 | /* width: 160rpx; */ |
34 | font-size: 30rpx; | 47 | font-size: 30rpx; |
35 | color: #333333; | 48 | color: #333333; |
36 | - position: relative; | 49 | + /* position: relative; */ |
37 | text-align: center; | 50 | text-align: center; |
38 | border-bottom: 4rpx solid transparent; | 51 | border-bottom: 4rpx solid transparent; |
39 | /* border: 1rpx solid red; */ | 52 | /* border: 1rpx solid red; */ |
40 | } | 53 | } |
41 | .tab_box .active { | 54 | .tab_box .active { |
42 | - border-bottom: 4rpx solid #DB4E2A; | 55 | + border-bottom: 6rpx solid #DB4E2A; |
43 | /*font-weight: bold;*/ | 56 | /*font-weight: bold;*/ |
44 | /*color: #0E050A;*/ | 57 | /*color: #0E050A;*/ |
45 | } | 58 | } |
46 | - | 59 | +.right { |
60 | + width: 100%; | ||
61 | + /* height: 58rpx; */ | ||
62 | + /*margin-top: 90rpx;*/ | ||
63 | + /*background-color: rgba(255,255,255,0.35);*/ | ||
64 | + background-color: #f5f6f8; | ||
65 | + display: flex; | ||
66 | + align-items: center; | ||
67 | + justify-content: space-between; | ||
68 | + padding: 20rpx 40rpx; | ||
69 | + -webkit-box-sizing: border-box; | ||
70 | + -moz-box-sizing: border-box; | ||
71 | + box-sizing: border-box; | ||
72 | + position: fixed; | ||
73 | + top:90rpx; | ||
74 | + left:0; | ||
75 | +} | ||
76 | +.search-icon { | ||
77 | + width: 34rpx; | ||
78 | + height: 34rpx; | ||
79 | +} | ||
80 | +.input { | ||
81 | + width: 90%; | ||
82 | + height:58rpx; | ||
83 | + color: #666666; | ||
84 | + padding-left: 20rpx; | ||
85 | + font-size: 28rpx; | ||
86 | + background-color: #e9e9e9; | ||
87 | + border-radius: 10rpx; | ||
88 | +} | ||
47 | /*.tab_box .active::after {*/ | 89 | /*.tab_box .active::after {*/ |
48 | /*content: "";*/ | 90 | /*content: "";*/ |
49 | /*!*border: 2rpx solid #DB4E2A;*!*/ | 91 | /*!*border: 2rpx solid #DB4E2A;*!*/ |
@@ -56,7 +98,7 @@ page { | @@ -56,7 +98,7 @@ page { | ||
56 | /*background: #2C82E6;*/ | 98 | /*background: #2C82E6;*/ |
57 | /*}*/ | 99 | /*}*/ |
58 | .city-box { | 100 | .city-box { |
59 | - margin-top: 104rpx; | 101 | + margin-top: 90rpx; |
60 | display: flex; | 102 | display: flex; |
61 | flex-wrap: wrap; | 103 | flex-wrap: wrap; |
62 | align-items: flex-start; | 104 | align-items: flex-start; |
@@ -65,6 +107,12 @@ page { | @@ -65,6 +107,12 @@ page { | ||
65 | -moz-box-sizing: border-box; | 107 | -moz-box-sizing: border-box; |
66 | box-sizing: border-box; | 108 | box-sizing: border-box; |
67 | } | 109 | } |
110 | +::-webkit-scrollbar { | ||
111 | + width: 0; | ||
112 | + height: 0; | ||
113 | + color: transparent; | ||
114 | + display: none; | ||
115 | +} | ||
68 | .city-item { | 116 | .city-item { |
69 | padding: 10rpx 40rpx; | 117 | padding: 10rpx 40rpx; |
70 | font-size: 28rpx; | 118 | font-size: 28rpx; |
@@ -78,4 +126,7 @@ page { | @@ -78,4 +126,7 @@ page { | ||
78 | .change-bg { | 126 | .change-bg { |
79 | background-color: #DB4E2A; | 127 | background-color: #DB4E2A; |
80 | color: #ffffff; | 128 | color: #ffffff; |
129 | +} | ||
130 | +.margin { | ||
131 | + margin-top: 160rpx; | ||
81 | } | 132 | } |
@@ -37,6 +37,7 @@ Page({ | @@ -37,6 +37,7 @@ Page({ | ||
37 | is_showAnswer: false, | 37 | is_showAnswer: false, |
38 | is_showUserInfo: false, | 38 | is_showUserInfo: false, |
39 | is_showRelease: false, | 39 | is_showRelease: false, |
40 | + is_showResult:false, | ||
40 | is_write: 2,//1:已填写,2:未填写 | 41 | is_write: 2,//1:已填写,2:未填写 |
41 | is_answer: false, | 42 | is_answer: false, |
42 | current_swiper: 0, | 43 | current_swiper: 0, |
@@ -57,7 +58,7 @@ Page({ | @@ -57,7 +58,7 @@ Page({ | ||
57 | }, | 58 | }, |
58 | //关闭金火柴勋章弹框 | 59 | //关闭金火柴勋章弹框 |
59 | close() { | 60 | close() { |
60 | - this.setData({show_gold_modal: false, show_normal_modal: false}); | 61 | + this.setData({show_gold_modal: false, show_normal_modal: false,is_showResult:false}); |
61 | try { | 62 | try { |
62 | wx.removeStorageSync('score'); | 63 | wx.removeStorageSync('score'); |
63 | console.log('删除后score', wx.getStorageSync('score')); | 64 | console.log('删除后score', wx.getStorageSync('score')); |
@@ -104,6 +105,7 @@ Page({ | @@ -104,6 +105,7 @@ Page({ | ||
104 | is_showAnswer: false, | 105 | is_showAnswer: false, |
105 | is_showUserInfo: false, | 106 | is_showUserInfo: false, |
106 | is_showRelease: false, | 107 | is_showRelease: false, |
108 | + is_showResult: false, | ||
107 | is_show_city: false, | 109 | is_show_city: false, |
108 | }) | 110 | }) |
109 | }, | 111 | }, |
@@ -269,7 +271,10 @@ Page({ | @@ -269,7 +271,10 @@ Page({ | ||
269 | is_showRelease: true //弹出 发布弹框 | 271 | is_showRelease: true //弹出 发布弹框 |
270 | }); | 272 | }); |
271 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { | 273 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { |
272 | - wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}) | 274 | + // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); |
275 | + self.setData({ | ||
276 | + is_showResult: true //弹出 提示框 | ||
277 | + }); | ||
273 | } | 278 | } |
274 | } | 279 | } |
275 | }, | 280 | }, |
@@ -208,4 +208,14 @@ | @@ -208,4 +208,14 @@ | ||
208 | </view> | 208 | </view> |
209 | <view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" | 209 | <view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" |
210 | catchtouchmove="disableScroll"></view> | 210 | catchtouchmove="disableScroll"></view> |
211 | + | ||
212 | + <!--答完题点击发布按钮弹框--> | ||
213 | + <view class="input-box score-box normal-box" wx:if="{{is_showResult}}" catchtouchmove="disableScroll"> | ||
214 | + <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image> | ||
215 | + <view class="title text margin">已通过测试</view> | ||
216 | + <view class="title text margin">等待开放权限</view> | ||
217 | + <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | ||
218 | + </view> | ||
219 | + <view class="modal_box" wx:if="{{is_showResult}}" bindtap="handleBackground" | ||
220 | + catchtouchmove="disableScroll"></view> | ||
211 | </view> | 221 | </view> |
@@ -50,7 +50,7 @@ Page({ | @@ -50,7 +50,7 @@ Page({ | ||
50 | }, | 50 | }, |
51 | //完成按钮 | 51 | //完成按钮 |
52 | goBack() { | 52 | goBack() { |
53 | - wx.redirectTo({url:'/pages/spell-list/spell-list?current=' + 0}) | 53 | + wx.redirectTo({url:'/pages/index/index'}) |
54 | }, | 54 | }, |
55 | disableScroll() { | 55 | disableScroll() { |
56 | }, | 56 | }, |
@@ -673,8 +673,8 @@ Page({ | @@ -673,8 +673,8 @@ Page({ | ||
673 | y: 0, | 673 | y: 0, |
674 | width: 280, | 674 | width: 280, |
675 | height: 400, | 675 | height: 400, |
676 | - destWidth: 1120, | ||
677 | - destHeight: 1600, | 676 | + destWidth: 840, |
677 | + destHeight: 1400, | ||
678 | canvasId: 'canvas', | 678 | canvasId: 'canvas', |
679 | fileType: 'jpg', | 679 | fileType: 'jpg', |
680 | quality:1, | 680 | quality:1, |
@@ -702,27 +702,52 @@ Page({ | @@ -702,27 +702,52 @@ Page({ | ||
702 | } | 702 | } |
703 | 703 | ||
704 | }, | 704 | }, |
705 | - onShareAppMessage: function() { | 705 | + onShareAppMessage: function(res) { |
706 | + console.log('转发res',res); | ||
706 | let self = this; | 707 | let self = this; |
707 | self.setData({show_canvas:false,}); | 708 | self.setData({show_canvas:false,}); |
708 | - // 设置菜单中的转发按钮触发转发事件时的转发内容 | ||
709 | - var shareObj = { | ||
710 | - title: '火柴西路', // 默认是小程序的名称(可以写slogan等) | ||
711 | - path: '', // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
712 | - imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
713 | - success: function(res) { | ||
714 | - if (res.errMsg == 'shareAppMessage:ok') {} | ||
715 | - }, | ||
716 | - fail: function() { | ||
717 | - // 转发失败之后的回调 | ||
718 | - if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
719 | - // 用户取消转发 | ||
720 | - } else if (res.errMsg == 'shareAppMessage:fail') { | ||
721 | - // 转发失败,其中 detail message 为详细失败信息 | 709 | + if(res.from === 'button') { |
710 | + return { | ||
711 | + title: self.data.detail.title, // 默认是小程序的名称(可以写slogan等) | ||
712 | + path: '/pages/meal/detail/detail?id=' + self.data.detail_id, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
713 | + imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
714 | + success: function (res) { | ||
715 | + if (res.errMsg == 'shareAppMessage:ok') { | ||
716 | + console.log('转发成功之后'); | ||
717 | + } | ||
718 | + }, | ||
719 | + fail: function () { | ||
720 | + // 转发失败之后的回调 | ||
721 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
722 | + // 用户取消转发 | ||
723 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
724 | + // 转发失败,其中 detail message 为详细失败信息 | ||
725 | + } | ||
726 | + }, | ||
727 | + complete: function () { | ||
728 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
729 | + console.log('转发结束之后'); | ||
730 | + } | ||
731 | + } | ||
732 | + }else { | ||
733 | + return { | ||
734 | + title: self.data.detail.title, // 默认是小程序的名称(可以写slogan等) | ||
735 | + path: '/pages/meal/detail/detail?id=' + self.data.detail_id, // 默认是当前页面,必须是以‘/’开头的完整路径 | ||
736 | + imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 | ||
737 | + success: function(res) { | ||
738 | + if (res.errMsg == 'shareAppMessage:ok') {} | ||
739 | + }, | ||
740 | + fail: function() { | ||
741 | + // 转发失败之后的回调 | ||
742 | + if (res.errMsg == 'shareAppMessage:fail cancel') { | ||
743 | + // 用户取消转发 | ||
744 | + } else if (res.errMsg == 'shareAppMessage:fail') { | ||
745 | + // 转发失败,其中 detail message 为详细失败信息 | ||
746 | + } | ||
747 | + }, | ||
748 | + complete: function() { | ||
749 | + // 转发结束之后的回调(转发成不成功都会执行) | ||
722 | } | 750 | } |
723 | - }, | ||
724 | - complete: function() { | ||
725 | - // 转发结束之后的回调(转发成不成功都会执行) | ||
726 | } | 751 | } |
727 | } | 752 | } |
728 | }, | 753 | }, |
@@ -221,7 +221,7 @@ | @@ -221,7 +221,7 @@ | ||
221 | <image class="sorry-img" src="../../../images/success@2x.png"></image> | 221 | <image class="sorry-img" src="../../../images/success@2x.png"></image> |
222 | <view class="title">恭喜您拼餐成功</view> | 222 | <view class="title">恭喜您拼餐成功</view> |
223 | <view class="view-btn" catchtap="goMyRelease">查看我的订单</view> | 223 | <view class="view-btn" catchtap="goMyRelease">查看我的订单</view> |
224 | - <view class="complete-btn" catchtap="goBack">完成</view> | 224 | + <view class="complete-btn" catchtap="goBack">再逛逛</view> |
225 | </view> | 225 | </view> |
226 | <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" | 226 | <view class="modal_box" wx:if="{{is_showRelease_modal}}" bindtap="handleBackground" |
227 | catchtouchmove="disableScroll"></view> | 227 | catchtouchmove="disableScroll"></view> |
@@ -69,7 +69,7 @@ Page({ | @@ -69,7 +69,7 @@ Page({ | ||
69 | wx.chooseLocation({ | 69 | wx.chooseLocation({ |
70 | success(res) { | 70 | success(res) { |
71 | console.log(res); | 71 | console.log(res); |
72 | - self.setData({address_position: res.address,latng:res.latitude + ',' + res.longitude}) | 72 | + self.setData({address_position: res.address !== ''?res.address:res.name,latng:res.latitude + ',' + res.longitude}) |
73 | }, | 73 | }, |
74 | }) | 74 | }) |
75 | //打开地图导航 | 75 | //打开地图导航 |
@@ -100,7 +100,7 @@ | @@ -100,7 +100,7 @@ | ||
100 | <text class="iconfont icon-location"></text> | 100 | <text class="iconfont icon-location"></text> |
101 | </view> | 101 | </view> |
102 | <view class="time-limit"> | 102 | <view class="time-limit"> |
103 | - <text class="limit-title">时限 开餐前</text> | 103 | + <text class="limit-title">开餐前</text> |
104 | <input type="number" bindinput="inputOverTime" value="{{over_time}}"/> | 104 | <input type="number" bindinput="inputOverTime" value="{{over_time}}"/> |
105 | <text>小时 停止拼餐</text> | 105 | <text>小时 停止拼餐</text> |
106 | </view> | 106 | </view> |
@@ -186,8 +186,10 @@ Page({ | @@ -186,8 +186,10 @@ Page({ | ||
186 | }, | 186 | }, |
187 | //保存 | 187 | //保存 |
188 | submit() { | 188 | submit() { |
189 | - console.log('this.data.phone_number.length', this.data.phone_number.length); | ||
190 | - if(this.data.country === '' && this.data.user.country === null) { | 189 | + console.log('this.data.phone_number.length', this.data.phone_number.length,this.data.is_sex_change); |
190 | + if(this.data.userInfo.gender == '未知' && this.data.is_sex_change === undefined) { | ||
191 | + wx.showToast({title:'请选择性别',icon:'none'}) | ||
192 | + }else if(this.data.country === '' && this.data.user.country === null) { | ||
191 | wx.showToast({title:'请填写国家',icon:'none'}) | 193 | wx.showToast({title:'请填写国家',icon:'none'}) |
192 | }else if(this.data.city === '' && this.data.user.city === null) { | 194 | }else if(this.data.city === '' && this.data.user.city === null) { |
193 | wx.showToast({title:'请填写城市',icon:'none'}) | 195 | wx.showToast({title:'请填写城市',icon:'none'}) |
@@ -200,11 +202,12 @@ Page({ | @@ -200,11 +202,12 @@ Page({ | ||
200 | }else if(this.data.introduce === '' && this.data.user.introduce === null) { | 202 | }else if(this.data.introduce === '' && this.data.user.introduce === null) { |
201 | wx.showToast({title:'请填写简介',icon:'none'}) | 203 | wx.showToast({title:'请填写简介',icon:'none'}) |
202 | }else { | 204 | }else { |
205 | + const choose_sex = this.data.is_sex_change&&this.data.sexList[this.data.current_sex] === '男'?1:2; | ||
203 | let url = '/portal/Member/detail'; | 206 | let url = '/portal/Member/detail'; |
204 | let sex = this.data.userInfo.gender; | 207 | let sex = this.data.userInfo.gender; |
205 | let params = { | 208 | let params = { |
206 | token: wx.getStorageSync('token'), | 209 | token: wx.getStorageSync('token'), |
207 | - sex: sex || this.data.user.sex, | 210 | + sex: choose_sex || (this.data.is_sex_change === undefined?sex:''), |
208 | country:this.data.is_choose_country?this.data.country:this.data.user.country, | 211 | country:this.data.is_choose_country?this.data.country:this.data.user.country, |
209 | city:this.data.is_choose_city?this.data.city:this.data.user.city, | 212 | city:this.data.is_choose_city?this.data.city:this.data.user.city, |
210 | // tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel, | 213 | // tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel, |
@@ -3,14 +3,14 @@ | @@ -3,14 +3,14 @@ | ||
3 | <view class="flex-box flex-picker"> | 3 | <view class="flex-box flex-picker"> |
4 | <view class="title">性别:</view> | 4 | <view class="title">性别:</view> |
5 | <view class="variety-text"> | 5 | <view class="variety-text"> |
6 | - {{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}} | ||
7 | - <!--<picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">--> | ||
8 | - <!--<view class="sex-picker">--> | ||
9 | - <!--<text class="variety-text">{{sexList[current_sex] || user.sex === 1?'男':user.sex === 2?'女':''}}</text>--> | ||
10 | - <!--<!–<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>–>--> | 6 | + <!--{{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}}--> |
7 | + <picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker"> | ||
8 | + <view class="sex-picker"> | ||
9 | + <text class="variety-text">{{sexList[current_sex] || userInfo.gender === 1?'男':userInfo.gender === 2?'女':''}}</text> | ||
10 | + <!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>--> | ||
11 | <!--<view class="iconfont icon-arrow-down"></view>--> | 11 | <!--<view class="iconfont icon-arrow-down"></view>--> |
12 | - <!--</view>--> | ||
13 | - <!--</picker>--> | 12 | + </view> |
13 | + </picker> | ||
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
16 | <view class="flex-box"> | 16 | <view class="flex-box"> |
@@ -28,8 +28,8 @@ | @@ -28,8 +28,8 @@ | ||
28 | <view class="flex-box"> | 28 | <view class="flex-box"> |
29 | <view class="title">手机号:</view> | 29 | <view class="title">手机号:</view> |
30 | <view class="phone-box"> | 30 | <view class="phone-box"> |
31 | - <text>{{user.tel!==null?user.tel:''}}</text> | ||
32 | - <!--<input type="number" bindinput="inputPhone" bindblur="blur" value="{{is_choose_phone&&!is_wrong_phone?phone_number:user.tel}}"/>--> | 31 | + <!--<text>{{user.tel!==null?user.tel:''}}</text>--> |
32 | + <input type="number" bindinput="inputPhone" bindblur="blur" value="{{user.tel!==null?user.tel:is_choose_phone&&!is_wrong_phone?phone_number:''}}"/> | ||
33 | <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button> | 33 | <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button> |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
@@ -10,6 +10,7 @@ Page({ | @@ -10,6 +10,7 @@ Page({ | ||
10 | is_showAnswer: false, | 10 | is_showAnswer: false, |
11 | is_showUserInfo:false, | 11 | is_showUserInfo:false, |
12 | is_answer: false, | 12 | is_answer: false, |
13 | + is_showResult:false, | ||
13 | is_class:1, | 14 | is_class:1, |
14 | isLogin: null, | 15 | isLogin: null, |
15 | is_write:2,//1:已填写,2:未填写 | 16 | is_write:2,//1:已填写,2:未填写 |
@@ -18,7 +19,7 @@ Page({ | @@ -18,7 +19,7 @@ Page({ | ||
18 | }, | 19 | }, |
19 | //关闭金火柴勋章弹框 | 20 | //关闭金火柴勋章弹框 |
20 | close() { | 21 | close() { |
21 | - this.setData({show_gold_modal:false,show_normal_modal:false}); | 22 | + this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false,}); |
22 | try { | 23 | try { |
23 | wx.removeStorageSync('score'); | 24 | wx.removeStorageSync('score'); |
24 | console.log('删除后score',wx.getStorageSync('score')); | 25 | console.log('删除后score',wx.getStorageSync('score')); |
@@ -243,7 +244,7 @@ Page({ | @@ -243,7 +244,7 @@ Page({ | ||
243 | disableScroll() {}, | 244 | disableScroll() {}, |
244 | handleBackground() { | 245 | handleBackground() { |
245 | console.log('dianji'); | 246 | console.log('dianji'); |
246 | - this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,}) | 247 | + this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,is_showResult:false}) |
247 | }, | 248 | }, |
248 | //首页-导航 | 249 | //首页-导航 |
249 | service(e) { | 250 | service(e) { |
@@ -308,7 +309,10 @@ Page({ | @@ -308,7 +309,10 @@ Page({ | ||
308 | is_showRelease: true //弹出 去答题弹框 | 309 | is_showRelease: true //弹出 去答题弹框 |
309 | }); | 310 | }); |
310 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { | 311 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { |
311 | - wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}) | 312 | + // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); |
313 | + self.setData({ | ||
314 | + is_showResult: true //弹出 提示框 | ||
315 | + }); | ||
312 | } | 316 | } |
313 | } | 317 | } |
314 | }, | 318 | }, |
@@ -130,4 +130,14 @@ | @@ -130,4 +130,14 @@ | ||
130 | <view class="title text margin">等待开放权限</view> | 130 | <view class="title text margin">等待开放权限</view> |
131 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | 131 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> |
132 | </view> | 132 | </view> |
133 | -<view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> | ||
133 | +<view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> | ||
134 | + | ||
135 | +<!--答完题点击发布按钮弹框--> | ||
136 | +<view class="input-box score-box normal-box" wx:if="{{is_showResult}}" catchtouchmove="disableScroll"> | ||
137 | + <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image> | ||
138 | + <view class="title text margin">已通过测试</view> | ||
139 | + <view class="title text margin">等待开放权限</view> | ||
140 | + <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | ||
141 | +</view> | ||
142 | +<view class="modal_box" wx:if="{{is_showResult}}" bindtap="handleBackground" | ||
143 | + catchtouchmove="disableScroll"></view> |
@@ -50,21 +50,22 @@ | @@ -50,21 +50,22 @@ | ||
50 | 50 | ||
51 | <view class="bottom"> | 51 | <view class="bottom"> |
52 | <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除,10已取消(已拼成取消),11已过期--> | 52 | <!-- // (0全部,2待拼成,3人数不足未拼成,4已拼成,5已取消,6已完成,7已评价,8已拼成(活动未结束),9删除,10已取消(已拼成取消),11已过期--> |
53 | - <text class="cancel-btn" wx:if="{{detail.status === 2}}" bindtap="cancel">取消订单</text> | 53 | + <text class="cancel-btn light" wx:if="{{detail.status === 2}}" bindtap="cancel">取消订单</text> |
54 | <text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text> | 54 | <text class="cancel-btn gray" wx:if="{{detail.status === 2}}">待拼成</text> |
55 | <!--<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>--> | 55 | <!--<text class="cancel-btn gray" wx:if="{{detail.status === 8}}">已拼成</text>--> |
56 | <!--sonType=1发布人,2拼餐/拼活动人--> | 56 | <!--sonType=1发布人,2拼餐/拼活动人--> |
57 | <block wx:if="{{detail.sonType === 1}}"> | 57 | <block wx:if="{{detail.sonType === 1}}"> |
58 | - <text class="cancel-btn" wx:if="{{detail.status === 4 || detail.status === 3 || detail.status === 8}}" bindtap="cancel">取消订单</text><!--开始前6小时内不能取消--> | 58 | + <!--is_canCancel=1 是可以点--> |
59 | + <text class="cancel-btn light" wx:if="{{detail.is_canCancel ===1 && (detail.status === 4 || detail.status === 3 || detail.status === 8)}}" bindtap="cancel">取消订单</text><!--发布人在截止时间以后不能取消--> | ||
59 | <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text> | 60 | <text class="cancel-btn gray" wx:if="{{detail.status === 8}}">待完成</text> |
60 | <text class="cancel-btn gray" wx:if="{{detail.status === 3}}">未拼成</text> | 61 | <text class="cancel-btn gray" wx:if="{{detail.status === 3}}">未拼成</text> |
61 | <block wx:if="{{detail.is_canCheck === 1}}"> | 62 | <block wx:if="{{detail.is_canCheck === 1}}"> |
62 | <!--1是可以点--> | 63 | <!--1是可以点--> |
63 | - <text class="confirm-btn" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成--> | 64 | + <text class="confirm-btn light" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成--> |
64 | </block> | 65 | </block> |
65 | <block wx:if="{{detail.is_canCheck === 2}}"> | 66 | <block wx:if="{{detail.is_canCheck === 2}}"> |
66 | <!--2是不可以点,且灰色--> | 67 | <!--2是不可以点,且灰色--> |
67 | - <text class="confirm-btn gray" wx:if="{{detail.status === 4}}" bindtap="">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成--> | 68 | + <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}" bindtap="">待完成</text><!--待完成时并且活动时间已开始,发布人可点击完成--> |
68 | </block> | 69 | </block> |
69 | <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text> | 70 | <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text> |
70 | </block> | 71 | </block> |
@@ -75,5 +76,6 @@ | @@ -75,5 +76,6 @@ | ||
75 | <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}">待完成</text> | 76 | <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}">待完成</text> |
76 | <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text> | 77 | <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text> |
77 | </block> | 78 | </block> |
79 | + | ||
78 | </view> | 80 | </view> |
79 | </view> | 81 | </view> |
@@ -11,12 +11,13 @@ Page({ | @@ -11,12 +11,13 @@ Page({ | ||
11 | tabcurrent: {tab: 3, bubble: ''}, | 11 | tabcurrent: {tab: 3, bubble: ''}, |
12 | is_showAnswer: false, | 12 | is_showAnswer: false, |
13 | is_showUserInfo: false, | 13 | is_showUserInfo: false, |
14 | + is_showResult:false, | ||
14 | is_answer: true, | 15 | is_answer: true, |
15 | is_write: 0,//1:已填写,2:未填写 | 16 | is_write: 0,//1:已填写,2:未填写 |
16 | }, | 17 | }, |
17 | //关闭金火柴勋章弹框 | 18 | //关闭金火柴勋章弹框 |
18 | close() { | 19 | close() { |
19 | - this.setData({show_gold_modal:false,show_normal_modal:false}); | 20 | + this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false}); |
20 | try { | 21 | try { |
21 | wx.removeStorageSync('score'); | 22 | wx.removeStorageSync('score'); |
22 | console.log('删除后score',wx.getStorageSync('score')); | 23 | console.log('删除后score',wx.getStorageSync('score')); |
@@ -24,10 +25,75 @@ Page({ | @@ -24,10 +25,75 @@ Page({ | ||
24 | // Do something when catch error | 25 | // Do something when catch error |
25 | } | 26 | } |
26 | }, | 27 | }, |
28 | + delete(e) { | ||
29 | + const self = this; | ||
30 | + const id = e.currentTarget.dataset.id; | ||
31 | + const type = +e.currentTarget.dataset.type; | ||
32 | + const status = +e.currentTarget.dataset.status; | ||
33 | + if(type === 1 && (status === 5 || status === 6 || status === 7 || status === 10 || status === 11)) { //发起人 | ||
34 | + wx.showModal({ | ||
35 | + title: '提示', | ||
36 | + content: '确定删除吗?', | ||
37 | + success(res) { | ||
38 | + if (res.confirm) { | ||
39 | + console.log('用户点击确定'); | ||
40 | + let url = '/portal/Order/del'; | ||
41 | + let params = { | ||
42 | + token: wx.getStorageSync('token'), | ||
43 | + orderId: id, | ||
44 | + }; | ||
45 | + let header = { | ||
46 | + "token": wx.getStorageSync('token') | ||
47 | + }; | ||
48 | + app.post(url, params, {}).then((res) => { | ||
49 | + console.log('删除', res); | ||
50 | + if (+res.code === 1) { | ||
51 | + wx.showToast({title:res.message,icon:'none'}); | ||
52 | + self.getOrderList(); | ||
53 | + }else { | ||
54 | + wx.showToast({title:res.message,icon:'none'}) | ||
55 | + } | ||
56 | + }) | ||
57 | + } else if (res.cancel) { | ||
58 | + console.log('用户点击取消') | ||
59 | + } | ||
60 | + } | ||
61 | + }) | ||
62 | + }else if(type === 2 && (status === 5 || status === 6 || status === 7 || status === 10 || status === 11)) { | ||
63 | + wx.showModal({ | ||
64 | + title: '提示', | ||
65 | + content: '确定删除吗?', | ||
66 | + success(res) { | ||
67 | + if (res.confirm) { | ||
68 | + console.log('用户点击确定'); | ||
69 | + let url = '/portal/Order/del'; | ||
70 | + let params = { | ||
71 | + token: wx.getStorageSync('token'), | ||
72 | + orderId: id, | ||
73 | + }; | ||
74 | + let header = { | ||
75 | + "token": wx.getStorageSync('token') | ||
76 | + }; | ||
77 | + app.post(url, params, {}).then((res) => { | ||
78 | + console.log('删除', res); | ||
79 | + if (+res.code === 1) { | ||
80 | + wx.showToast({title:res.message,icon:'none'}); | ||
81 | + self.getOrderList(); | ||
82 | + }else { | ||
83 | + wx.showToast({title:res.message,icon:'none'}) | ||
84 | + } | ||
85 | + }) | ||
86 | + } else if (res.cancel) { | ||
87 | + console.log('用户点击取消') | ||
88 | + } | ||
89 | + } | ||
90 | + }) | ||
91 | + } | ||
92 | + }, | ||
27 | //删除 | 93 | //删除 |
28 | del(e) { | 94 | del(e) { |
29 | const self = this; | 95 | const self = this; |
30 | - const id = e.currentTarget.dataset.id; | 96 | + const id = +e.currentTarget.dataset.id; |
31 | wx.showModal({ | 97 | wx.showModal({ |
32 | title: '提示', | 98 | title: '提示', |
33 | content: '确定删除吗?', | 99 | content: '确定删除吗?', |
@@ -147,7 +213,7 @@ Page({ | @@ -147,7 +213,7 @@ Page({ | ||
147 | }, | 213 | }, |
148 | handleBackground() { | 214 | handleBackground() { |
149 | console.log('dianji'); | 215 | console.log('dianji'); |
150 | - this.setData({is_showAnswer: false, is_showUserInfo: false, is_showRelease: false,}) | 216 | + this.setData({is_showAnswer: false, is_showUserInfo: false, is_showRelease: false,is_showResult:false}) |
151 | }, | 217 | }, |
152 | //首页-导航 | 218 | //首页-导航 |
153 | service(e) { | 219 | service(e) { |
@@ -212,7 +278,10 @@ Page({ | @@ -212,7 +278,10 @@ Page({ | ||
212 | is_showRelease: true //弹出 去答题弹框 | 278 | is_showRelease: true //弹出 去答题弹框 |
213 | }); | 279 | }); |
214 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { | 280 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { |
215 | - wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}) | 281 | + // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); |
282 | + self.setData({ | ||
283 | + is_showResult: true //弹出 提示框 | ||
284 | + }); | ||
216 | } | 285 | } |
217 | } | 286 | } |
218 | }, | 287 | }, |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <view class="no-data" wx:if="{{orderList.length === 0}}">暂无订单</view> | 13 | <view class="no-data" wx:if="{{orderList.length === 0}}">暂无订单</view> |
14 | <view class='content_box post_box' wx:if="{{orderList.length > 0}}"> | 14 | <view class='content_box post_box' wx:if="{{orderList.length > 0}}"> |
15 | <view class='content_item' wx:for="{{orderList}}" wx:key="index" | 15 | <view class='content_item' wx:for="{{orderList}}" wx:key="index" |
16 | - bindtap='goPostDetail' data-index="{{index}}" data-id="{{item.id}}"> | 16 | + bindtap='goPostDetail' data-index="{{index}}" data-id="{{item.id}}" bindlongpress="delete" data-type="{{item.type}}" data-status="{{item.status}}"> |
17 | <!--<image src="../../images/lishi@2x.png" class="thumb"></image>--> | 17 | <!--<image src="../../images/lishi@2x.png" class="thumb"></image>--> |
18 | <image src="{{item.pic}}" class="thumb" mode="aspectFill"></image> | 18 | <image src="{{item.pic}}" class="thumb" mode="aspectFill"></image> |
19 | <view class="lish-right"> | 19 | <view class="lish-right"> |
@@ -39,14 +39,14 @@ | @@ -39,14 +39,14 @@ | ||
39 | </view> | 39 | </view> |
40 | <view class="btn"> | 40 | <view class="btn"> |
41 | <!--2参与人--> | 41 | <!--2参与人--> |
42 | - <block wx:if="{{item.type === 2}}"> | ||
43 | - <text wx:if="{{item.status === 11 ||item.status === 10 ||item.status === 5 || item.status === 6 || item.status === 7}}" | ||
44 | - catchtap="del" data-id="{{item.id}}">删除</text> | ||
45 | - </block> | 42 | + <!--<block wx:if="{{item.type === 2}}">--> |
43 | + <!--<text wx:if="{{item.status === 11 ||item.status === 10 ||item.status === 5 || item.status === 6 || item.status === 7}}"--> | ||
44 | + <!--catchtap="del" data-id="{{item.id}}">删除</text>--> | ||
45 | + <!--</block>--> | ||
46 | <!--1发起人--> | 46 | <!--1发起人--> |
47 | <block wx:if="{{item.type === 1}}"> | 47 | <block wx:if="{{item.type === 1}}"> |
48 | - <text wx:if="{{item.status === 11 || item.status === 5 || item.status === 10 || item.status === 6 || item.status === 7}}" | ||
49 | - catchtap="del" data-id="{{item.id}}">删除</text> | 48 | + <!--<text wx:if="{{item.status === 11 || item.status === 5 || item.status === 10 || item.status === 6 || item.status === 7}}"--> |
49 | + <!--catchtap="del" data-id="{{item.id}}">删除</text>--> | ||
50 | <block wx:if="{{item.is_canCheck !== 2}}"> | 50 | <block wx:if="{{item.is_canCheck !== 2}}"> |
51 | <!--2是不可以点--> | 51 | <!--2是不可以点--> |
52 | <text wx:if="{{item.status === 4}}" catchtap="complete" data-id="{{item.id}}">完成</text> | 52 | <text wx:if="{{item.status === 4}}" catchtap="complete" data-id="{{item.id}}">完成</text> |
@@ -111,4 +111,13 @@ | @@ -111,4 +111,13 @@ | ||
111 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | 111 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> |
112 | </view> | 112 | </view> |
113 | <view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> | 113 | <view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> |
114 | +<!--答完题点击发布按钮弹框--> | ||
115 | +<view class="input-box score-box normal-box" wx:if="{{is_showResult}}" catchtouchmove="disableScroll"> | ||
116 | + <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image> | ||
117 | + <view class="title text margin">已通过测试</view> | ||
118 | + <view class="title text margin">等待开放权限</view> | ||
119 | + <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | ||
120 | +</view> | ||
121 | +<view class="modal_box" wx:if="{{is_showResult}}" bindtap="handleBackground" | ||
122 | + catchtouchmove="disableScroll"></view> | ||
114 | 123 |
@@ -40,6 +40,7 @@ Page({ | @@ -40,6 +40,7 @@ Page({ | ||
40 | hasMore:true, | 40 | hasMore:true, |
41 | is_showAnswer: false, | 41 | is_showAnswer: false, |
42 | is_showUserInfo:false, | 42 | is_showUserInfo:false, |
43 | + is_showResult:false, | ||
43 | is_answer: false, | 44 | is_answer: false, |
44 | is_write:2,//1:已填写,2:未填写 | 45 | is_write:2,//1:已填写,2:未填写 |
45 | cityList:[], | 46 | cityList:[], |
@@ -49,7 +50,7 @@ Page({ | @@ -49,7 +50,7 @@ Page({ | ||
49 | }, | 50 | }, |
50 | //关闭金火柴勋章弹框 | 51 | //关闭金火柴勋章弹框 |
51 | close() { | 52 | close() { |
52 | - this.setData({show_gold_modal:false,show_normal_modal:false}); | 53 | + this.setData({show_gold_modal:false,show_normal_modal:false,is_showResult:false}); |
53 | try { | 54 | try { |
54 | wx.removeStorageSync('score'); | 55 | wx.removeStorageSync('score'); |
55 | console.log('删除后score',wx.getStorageSync('score')); | 56 | console.log('删除后score',wx.getStorageSync('score')); |
@@ -155,7 +156,7 @@ Page({ | @@ -155,7 +156,7 @@ Page({ | ||
155 | disableScroll() {}, | 156 | disableScroll() {}, |
156 | handleBackground() { | 157 | handleBackground() { |
157 | console.log('dianji'); | 158 | console.log('dianji'); |
158 | - this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,}) | 159 | + this.setData({is_showAnswer: false, is_showUserInfo: false,is_showRelease:false,is_showResult:false}) |
159 | }, | 160 | }, |
160 | //搜索 | 161 | //搜索 |
161 | search() { | 162 | search() { |
@@ -330,7 +331,10 @@ Page({ | @@ -330,7 +331,10 @@ Page({ | ||
330 | is_showRelease: true //弹出 去答题弹框 | 331 | is_showRelease: true //弹出 去答题弹框 |
331 | }); | 332 | }); |
332 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { | 333 | } else if (+self.data.is_write === 1 && wx.getStorageSync('is_canSend') === 2 && wx.getStorageSync('is_answer') === 1) { |
333 | - wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}) | 334 | + // wx.showToast({title: '等级不够,无法使用发布功能', icon: 'none'}); |
335 | + self.setData({ | ||
336 | + is_showResult: true //弹出 提示框 | ||
337 | + }); | ||
334 | } | 338 | } |
335 | } | 339 | } |
336 | }, | 340 | }, |
@@ -185,4 +185,13 @@ | @@ -185,4 +185,13 @@ | ||
185 | <view class="title text margin">等待开放权限</view> | 185 | <view class="title text margin">等待开放权限</view> |
186 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | 186 | <view class="answer-btn close close-btn" catchtap="close">随便看看</view> |
187 | </view> | 187 | </view> |
188 | -<view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> | ||
188 | +<view class="modal_box" wx:if="{{show_normal_modal}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view> | ||
189 | +<!--答完题点击发布按钮弹框--> | ||
190 | +<view class="input-box score-box normal-box" wx:if="{{is_showResult}}" catchtouchmove="disableScroll"> | ||
191 | + <image class="sorry-img img" src="../../images/achieve-answer-img@2x.png"></image> | ||
192 | + <view class="title text margin">已通过测试</view> | ||
193 | + <view class="title text margin">等待开放权限</view> | ||
194 | + <view class="answer-btn close close-btn" catchtap="close">随便看看</view> | ||
195 | +</view> | ||
196 | +<view class="modal_box" wx:if="{{is_showResult}}" bindtap="handleBackground" | ||
197 | + catchtouchmove="disableScroll"></view> |
-
请 注册 或 登录 后发表评论