b76deb00 by 杨炀

no message

1 parent 6d5c091f
...@@ -2,6 +2,13 @@ import request from './request.js' ...@@ -2,6 +2,13 @@ import request from './request.js'
2 import config from '@/config.js' 2 import config from '@/config.js'
3 import * as loginServer from '@/common/login.js'; 3 import * as loginServer from '@/common/login.js';
4 4
5 function checkReport() {
6 return request({
7 url: `/train/apply/getUserApplyInfo`,
8 method: 'get'
9 })
10 }
11
5 function getVenue() { 12 function getVenue() {
6 return request({ 13 return request({
7 url: `/systemj/venue/appId`, 14 url: `/systemj/venue/appId`,
...@@ -220,7 +227,7 @@ function miniappData(params) { ...@@ -220,7 +227,7 @@ function miniappData(params) {
220 227
221 228
222 229
223 export { 230 export {checkReport,
224 getVenue, 231 getVenue,
225 getOwnMemberInfo, 232 getOwnMemberInfo,
226 getSiteList, 233 getSiteList,
......
1 <template> 1 <template>
2 <view class="graybg"> 2 <view class="graybg">
3 <view v-if="formData.type=='0'"> 3 <view class="formBox">
4 <view v-html="formData.content" class="richContent"></view>
5 </view>
6 <view v-if="formData.type=='1'" class="formBox">
7 <view @click="clickImg">
8 <image style="width: 100%;height: 50vw;" mode="aspectFit" v-for="p in formData.picArr" :src="p"/>
9 </view>
10
11 <view v-if="formData.content2" v-html="formData.content2" class="richContent2"></view>
12
13 <uni-forms ref="baseForm" :modelValue="baseFormData"> 4 <uni-forms ref="baseForm" :modelValue="baseFormData">
14 <uni-forms-item label="姓名" required v-if="formData.fields.indexOf('0')>-1"> 5 <uni-forms-item label="姓名" required>
15 <uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" /> 6 <uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" />
16 </uni-forms-item> 7 </uni-forms-item>
17 <uni-forms-item label="手机号" required v-if="formData.fields.indexOf('1')>-1"> 8 <uni-forms-item label="身份证" required>
18 <uni-easyinput v-model="baseFormData.telno" placeholder="请输入手机号" /> 9 <uni-easyinput v-model="baseFormData.telno" placeholder="请输入身份证号码" />
19 </uni-forms-item> 10 </uni-forms-item>
20 <uni-forms-item label="需求描述" required v-if="formData.fields.indexOf('2')>-1"> 11 <uni-forms-item label="备注说明">
21 <uni-easyinput type="textarea" v-model="baseFormData.requirement" placeholder="请输入需求描述" /> 12 <uni-easyinput type="textarea" v-model="baseFormData.requirement" placeholder="请输入需求描述" />
22 </uni-forms-item> 13 </uni-forms-item>
23 </uni-forms> 14 </uni-forms>
24 <button type="primary" @click="submit">提交</button> 15 <button type="primary" @click="submit">核实报名信息</button>
25 </view> 16 </view>
26 </view> 17 </view>
27 18
28 <uni-popup ref="alertPayOk" type="dialog"> 19 <uni-popup ref="alertPayOk" type="dialog">
29 <uni-popup-dialog type="success" confirmText="返回主页" content="提交成功" @confirm="goIndex"> 20 <uni-popup-dialog type="success" confirmText="确定" content="用户不存在或信息填写错误请再次核实" @confirm="goIndex">
30 </uni-popup-dialog> 21 </uni-popup-dialog>
31 </uni-popup> 22 </uni-popup>
32 </template> 23 </template>
...@@ -47,11 +38,6 @@ ...@@ -47,11 +38,6 @@
47 const isActive = ref(null); 38 const isActive = ref(null);
48 const formData = ref({}) 39 const formData = ref({})
49 const baseFormData = ref({}) 40 const baseFormData = ref({})
50 const rules= ref({
51 name: {rules: [{required: true,errorMessage: '请输入姓名'}]},
52 telno: {rules: [{required: true,errorMessage: '请输入手机号'}]},
53 requirement: {rules: [{required: true,errorMessage: '请输入需求描述'}]},
54 })
55 41
56 onReady(()=>{ 42 onReady(()=>{
57 // 修改页头标题 43 // 修改页头标题
...@@ -60,18 +46,15 @@ ...@@ -60,18 +46,15 @@
60 }); 46 });
61 }) 47 })
62 onShow(() => { 48 onShow(() => {
63 formData.value = JSON.parse(app.globalData.venue.miniappCustConfig) 49
64 formData.value.picArr = formData.value.pics.split(',') 50 })
65 });
66 51
67 function goIndex() { 52 function goIndex() {
68 uni.redirectTo({ 53
69 url: `/pages/index/index`
70 })
71 } 54 }
72 function submit(){ 55 function submit(){
73 // 姓名 56 // 姓名
74 if((formData.value.fields.indexOf('0')>-1) && baseFormData.value.name==undefined){ 57 if(!baseFormData.value.name){
75 uni.showToast({ 58 uni.showToast({
76 title: '请输入姓名', 59 title: '请输入姓名',
77 icon: 'none', 60 icon: 'none',
...@@ -80,7 +63,7 @@ ...@@ -80,7 +63,7 @@
80 return 63 return
81 } 64 }
82 // 手机号 65 // 手机号
83 if(formData.value.fields.indexOf('1')>-1&&baseFormData.value.telno==undefined){ 66 if(!baseFormData.value.telno){
84 uni.showToast({ 67 uni.showToast({
85 title: '请输入手机号', 68 title: '请输入手机号',
86 icon: 'none', 69 icon: 'none',
...@@ -88,39 +71,16 @@ ...@@ -88,39 +71,16 @@
88 }); 71 });
89 return 72 return
90 } 73 }
91 // 需求描述
92 if(formData.value.fields.indexOf('2')>-1&&baseFormData.value.requirement==undefined){
93 uni.showToast({
94 title: '请输入需求描述',
95 icon: 'none',
96 duration: 2000
97 });
98 return
99 }
100
101 74
102 75 api.checkReport().then((res)=>{
103 api.miniappData(baseFormData.value).then((res)=>{ 76 if(res.data.userNo){
104 baseFormData.value = [] 77
105 alertPayOk.value.open() 78 } else {
79 alertPayOk.value.open()
80 }
106 }) 81 })
107 82
108 } 83 }
109 function clickImg() {
110 uni.previewImage({
111 urls: formData.value.picArr,
112 // current: 0,
113 success: function(res) {
114 console.log('success', res)
115 },
116 fail: function(res) {
117 console.log('fail', res)
118 },
119 complete: function(res) {
120 console.log('complete', res)
121 }
122 })
123 }
124 </script> 84 </script>
125 85
126 <style scoped> 86 <style scoped>
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
7 </swiper> 7 </swiper>
8 <view class="whitepobox"> 8 <view class="whitepobox">
9 <view>{{form.name}}</view> 9 <view>{{form.name}}</view>
10 <view class="pp">培训时间:{{form.hdStart?.substring(0, 10)}}{{form.hdEnd?.substring(0, 10)}}</view> 10 <view class="pp">培训时间:{{form.trainStart?.substring(0, 10)}}{{form.trainEnd?.substring(0, 10)}}</view>
11 <view class="pp">培训地点:{{form.address}}</view> 11 <view class="pp">培训地点:{{form.address}}</view>
12 <view class="pp">报道时间:{{form.address}}</view> 12 <view class="pp">报道时间:{{form.reportDate?.substring(0, 10)}}</view>
13 <view class="pp">主办单位:{{form.address}}</view> 13 <view class="pp">主办单位:{{form.address}}</view>
14 <view class="pp">承办单位:{{form.address}}</view> 14 <view class="pp">承办单位:{{form.address}}</view>
15 </view> 15 </view>
...@@ -26,12 +26,10 @@ ...@@ -26,12 +26,10 @@
26 26
27 <view class="whiteItem"> 27 <view class="whiteItem">
28 <view class="qbox"> 28 <view class="qbox">
29 <image class="m1" v-if="form.isJdView == 1" @click="gohotelList" src="./img/btn01.png"></image> 29 <image class="m1" v-if="isApply == '0'" @click="goTrainForm" src="./img/btn01.png"></image>
30 <image class="m1" v-else style="filter: grayscale(1);" src="./img/btn01.png"></image> 30 <image class="m1" v-else style="filter: grayscale(1);" src="./img/btn01.png"></image>
31 <image class="m2" v-if="form.isCarView == 1" @click="gocarList" src="./img/btn02.png"></image> 31 <image class="m2" style="filter: grayscale(1);" src="./img/btn02.png"></image>
32 <image class="m2" v-else style="filter: grayscale(1);" src="./img/btn02.png"></image> 32 <image class="m3" style="filter: grayscale(1);" src="./img/btn03.png"></image>
33 <image class="m3" v-if="form.isFoodView == 1" @click="gomealList" src="./img/btn03.png"></image>
34 <image class="m3" v-else style="filter: grayscale(1);" src="./img/btn03.png"></image>
35 </view> 33 </view>
36 </view> 34 </view>
37 <view class="whiteItem"> 35 <view class="whiteItem">
...@@ -78,7 +76,6 @@ ...@@ -78,7 +76,6 @@
78 </view> 76 </view>
79 77
80 78
81 <view class="myEnter" @click="goMycenter"><image src="./img/user.png" mode="aspectFill"></image></view>
82 79
83 <uni-popup class="popYanZhengBox" ref="popYanZheng" type="center"> 80 <uni-popup class="popYanZhengBox" ref="popYanZheng" type="center">
84 <view class="popup-content"> 81 <view class="popup-content">
...@@ -114,15 +111,19 @@ ...@@ -114,15 +111,19 @@
114 const data = reactive({ 111 const data = reactive({
115 id: null, 112 id: null,
116 form:{}, 113 form:{},
117 allNow:false 114 allNow:false,
115 isApply: '0'
118 }) 116 })
119 const { 117 const {
120 id,form,allNow 118 id,form,allNow,isApply
121 } = toRefs(data); 119 } = toRefs(data);
122 onLoad(option => { 120 onLoad(option => {
123 if (option.id) { 121 if (option.id) {
124 id.value = option.id 122 id.value = option.id
125 } 123 }
124 if (option.isApply) {
125 isApply.value = option.isApply
126 }
126 if(option.scene){ 127 if(option.scene){
127 id.value = decodeURIComponent(option.scene); 128 id.value = decodeURIComponent(option.scene);
128 } 129 }
...@@ -141,48 +142,6 @@ ...@@ -141,48 +142,6 @@
141 getData() 142 getData()
142 }) 143 })
143 let goPath 144 let goPath
144 let currUser
145 function checkUserPhone(path) {
146 currUser = uni.getStorageSync('currUser')
147 if(!currUser){
148 loginServer.pcLogin().then(()=>{
149 currUser = uni.getStorageSync('currUser')
150 if (currUser.phonenumber) {
151 // debugger
152 return true
153 } else {
154 popYanZheng.value.open()
155 goPath = path
156 return false;
157 }
158 });
159 } else {
160 if (currUser.phonenumber) {
161 return true
162 } else {
163 popYanZheng.value.open()
164 goPath = path
165 return false;
166 }
167 }
168 }
169 function decryptPhoneNumber(res) {
170 // console.log(res)
171 loading.value = true
172 if (res.detail.errMsg.indexOf('ok') > -1) {
173 getWxUserPhone(res.detail).then((data) => {
174 console.log(data)
175 popYanZheng.value.close()
176 uni.redirectTo({
177 url: goPath
178 })
179 }).finally(() => {
180 loading.value = false
181 });
182 } else {
183 loading.value = false
184 }
185 }
186 145
187 function getData() { 146 function getData() {
188 hotel.getTrainDetail(id.value).then(res => { 147 hotel.getTrainDetail(id.value).then(res => {
...@@ -194,46 +153,42 @@ ...@@ -194,46 +153,42 @@
194 }) 153 })
195 } 154 }
196 155
197 function gohotelList() { 156 function goTrainForm() {
198 let path = `/pages_hotel/hotel/hotelList?id=${id.value}`; 157 let path = `/pages/form/index`;
199 if (checkUserPhone(path)) {
200 uni.navigateTo({ 158 uni.navigateTo({
201 url: path 159 url: path
202 }); 160 });
203 }
204 } 161 }
205 function gocarList() { 162 function gocarList() {
206 let path = `/pages_hotel/car/index?activeId=${id.value}`; 163 let path = `/pages_hotel/car/index?activeId=${id.value}`;
207 if (checkUserPhone(path)) { 164
208 uni.navigateTo({ 165 uni.navigateTo({
209 url: path 166 url: path
210 }); 167 });
211 } 168
212 } 169 }
213 function gomealList() { 170 function gomealList() {
214 let path = `/pages_hotel/eat/index?activeId=${id.value}`; 171 let path = `/pages_hotel/eat/index?activeId=${id.value}`;
215 if (checkUserPhone(path)) { 172
216 uni.navigateTo({ 173 uni.navigateTo({
217 url: path 174 url: path
218 }); 175 });
219 } 176
220 } 177 }
221 function goInvoice(){ 178 function goInvoice(){
222 const remarks = encodeURIComponent(JSON.stringify(form.value.remarks)) 179 const remarks = encodeURIComponent(JSON.stringify(form.value.remarks))
223 let path = `/pages_hotel/hotel/invoice?activeId=${id.value}&remarks=${remarks}&kpType=${form.value.kpType}`; 180 let path = `/pages_hotel/hotel/invoice?activeId=${id.value}&remarks=${remarks}&kpType=${form.value.kpType}`;
224 if (checkUserPhone(path)) { 181
225 uni.navigateTo({ 182 uni.navigateTo({
226 url: path 183 url: path
227 }); 184 });
228 } 185
229 } 186 }
230 function goIllustrate(){ 187 function goIllustrate(){
231 let path = `/pages_hotel/hotel/illustrate?trainId=${id.value}`; 188 let path = `/pages_hotel/hotel/illustrate?trainId=${id.value}`;
232 if (checkUserPhone(path)) {
233 uni.navigateTo({ 189 uni.navigateTo({
234 url: path 190 url: path
235 }); 191 });
236 }
237 } 192 }
238 function callphone(number){ 193 function callphone(number){
239 uni.makePhoneCall({ 194 uni.makePhoneCall({
...@@ -249,14 +204,6 @@ ...@@ -249,14 +204,6 @@
249 } 204 }
250 function changeIntroductionHeight(){ 205 function changeIntroductionHeight(){
251 allNow.value = !allNow.value 206 allNow.value = !allNow.value
252 }
253 function goMycenter(){
254 let path = `/pages_hotel/hotel/mycenter`;
255 if (checkUserPhone(path)) {
256 uni.navigateTo({
257 url: path
258 });
259 }
260 } 207 }
261 </script> 208 </script>
262 209
......

25 KB | W: | H:

12.8 KB | W: | H:

pages_hotel/hotel/img/btn01.png
pages_hotel/hotel/img/btn01.png
pages_hotel/hotel/img/btn01.png
pages_hotel/hotel/img/btn01.png
  • 2-up
  • Swipe
  • Onion skin

19 KB | W: | H:

7.29 KB | W: | H:

pages_hotel/hotel/img/btn02.png
pages_hotel/hotel/img/btn02.png
pages_hotel/hotel/img/btn02.png
pages_hotel/hotel/img/btn02.png
  • 2-up
  • Swipe
  • Onion skin

16.9 KB | W: | H:

8.67 KB | W: | H:

pages_hotel/hotel/img/btn03.png
pages_hotel/hotel/img/btn03.png
pages_hotel/hotel/img/btn03.png
pages_hotel/hotel/img/btn03.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
75 }); 75 });
76 } 76 }
77 function goDetail(item){ 77 function goDetail(item){
78 let path = `/pages_hotel/hotel/detail?id=${item.trainId}`; 78 let path = `/pages_hotel/hotel/detail?id=${item.trainId}&isApply=${item.isApply}`;
79 uni.navigateTo({ 79 uni.navigateTo({
80 url: path 80 url: path
81 }); 81 });
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!