Commit 408fe40f0218c4a97b23c72c81bdd4ba0071fd70

Authored by 夏洋涛
1 parent b966d2bc
Exists in master

feat:mgop更换成接口

1 <template> 1 <template>
2 - <div id="app" :class="isElder?'elder':''">  
3 - 2 + <div id="app" :class="isElder ? 'elder' : ''">
4 <router-view @setElder="setElder" /> 3 <router-view @setElder="setElder" />
5 </div> 4 </div>
6 </template> 5 </template>
7 <script> 6 <script>
8 // import vConsole from 'vconsole' 7 // import vConsole from 'vconsole'
9 export default { 8 export default {
10 - data () { 9 + data() {
11 return { 10 return {
12 - isElder: false 11 + isElder: false,
13 } 12 }
14 }, 13 },
15 - mounted () { 14 + mounted() {
16 // new vConsole() 15 // new vConsole()
17 ZWJSBridge.onReady(() => { 16 ZWJSBridge.onReady(() => {
18 console.log('初始化完成后,执行bridge方法') 17 console.log('初始化完成后,执行bridge方法')
@@ -23,21 +22,23 @@ export default { @@ -23,21 +22,23 @@ export default {
23 } else { 22 } else {
24 ZWJSBridge.getUiStyle({}) 23 ZWJSBridge.getUiStyle({})
25 .then((result) => { 24 .then((result) => {
26 - console.log(result); 25 + console.log(result)
27 if (result.uiStyle == 'elder') { 26 if (result.uiStyle == 'elder') {
28 - this.isElder = true; 27 + this.isElder = true
29 localStorage.setItem('isElder', 1) 28 localStorage.setItem('isElder', 1)
30 } 29 }
31 }) 30 })
32 //浙里办APP 6.11.0 版本以下版本标准模式兼容 31 //浙里办APP 6.11.0 版本以下版本标准模式兼容
33 - .catch((error) => { console.log(error); }); 32 + .catch((error) => {
  33 + console.log(error)
  34 + })
34 } 35 }
35 }, 36 },
36 methods: { 37 methods: {
37 - setElder (e) { 38 + setElder(e) {
38 this.isElder = e 39 this.isElder = e
39 - }  
40 - } 40 + },
  41 + },
41 } 42 }
42 </script> 43 </script>
43 <style> 44 <style>
src/common/index.js
@@ -2,8 +2,10 @@ var common = function() { @@ -2,8 +2,10 @@ var common = function() {
2 return { 2 return {
3 //取地址参数方法 3 //取地址参数方法
4 getUrlParam: function(name) { 4 getUrlParam: function(name) {
  5 + console.log(name)
5 var url = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 6 var url = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
6 var newUrl = window.location.search.substr(1).match(url); 7 var newUrl = window.location.search.substr(1).match(url);
  8 + console.log(window.location)
7 if (newUrl != null) { 9 if (newUrl != null) {
8 return unescape(newUrl[2]); 10 return unescape(newUrl[2]);
9 } else { 11 } else {
@@ -7,7 +7,8 @@ import store from &#39;./store&#39; @@ -7,7 +7,8 @@ import store from &#39;./store&#39;
7 import Moment from 'moment' 7 import Moment from 'moment'
8 Vue.prototype.Moment = Moment; 8 Vue.prototype.Moment = Moment;
9 9
10 -// Vue.prototype.yanxueUrl = 'https://yanxue.myjxt.com'; 10 +Vue.prototype.proxyUrl = 'https://proxy.shunzhi.net/prod';
  11 +Vue.prototype.yanxueUrl = 'https://yanxue.myjxt.com';
11 // Vue.prototype.dataUrl = 'http://47.110.50.251:9010' 12 // Vue.prototype.dataUrl = 'http://47.110.50.251:9010'
12 Vue.prototype.dataUrl = 'https://proxy.shunzhi.net/consulte' 13 Vue.prototype.dataUrl = 'https://proxy.shunzhi.net/consulte'
13 // Vue.prototype.kqUrl = 'http://47.110.50.251:9092/' 14 // Vue.prototype.kqUrl = 'http://47.110.50.251:9092/'
src/router/index.js
@@ -5,9 +5,6 @@ import HomeUserInfo from &#39;@/views/Home/HomeUserInfo.vue&#39; @@ -5,9 +5,6 @@ import HomeUserInfo from &#39;@/views/Home/HomeUserInfo.vue&#39;
5 5
6 import ServiceAbroadDetail from '@/views/Service/AbroadDetail.vue' 6 import ServiceAbroadDetail from '@/views/Service/AbroadDetail.vue'
7 import ServiceAbroadEvaluate from '@/views/Service/AbroadEvaluate.vue' 7 import ServiceAbroadEvaluate from '@/views/Service/AbroadEvaluate.vue'
8 -import ServiceDatePackage from '@/views/Service/DatePackage.vue'  
9 -import ServiceCheckOrder from '@/views/Service/CheckOrder.vue'  
10 -import ServiceCardSelect from '@/views/Service/CardSelect.vue'  
11 import ServiceOrderXST from '@/views/Service/ServiceOrderXST.vue' 8 import ServiceOrderXST from '@/views/Service/ServiceOrderXST.vue'
12 import evaluateCourse from '@/views/Service/evaluateCourse.vue' 9 import evaluateCourse from '@/views/Service/evaluateCourse.vue'
13 import evaluateBase from '@/views/Service/evaluateBase.vue' //基地评价 10 import evaluateBase from '@/views/Service/evaluateBase.vue' //基地评价
@@ -15,8 +12,6 @@ import evaluateDetail from &#39;@/views/Service/evaluateDetail.vue&#39; //评价详情 @@ -15,8 +12,6 @@ import evaluateDetail from &#39;@/views/Service/evaluateDetail.vue&#39; //评价详情
15 12
16 import ServiceKQ from '@/views/Service/ServiceKQ.vue' //柯桥研学 13 import ServiceKQ from '@/views/Service/ServiceKQ.vue' //柯桥研学
17 14
18 -import CardBoxXST from '@/views/Service/CardBoxXST.vue'  
19 -import CardCourseList from '@/views/Service/CardCourseList.vue' //优惠券对应商品列表  
20 import YanxueCode from '@/views/Home/YanxueCode.vue' //研学码 15 import YanxueCode from '@/views/Home/YanxueCode.vue' //研学码
21 import YanxueInfo from '@/views/Home/YanxueInfo.vue' //研学码信息 16 import YanxueInfo from '@/views/Home/YanxueInfo.vue' //研学码信息
22 import chooseSchool from '@/views/Service/component/chooseSchool.vue' //选择学校 17 import chooseSchool from '@/views/Service/component/chooseSchool.vue' //选择学校
@@ -87,46 +82,6 @@ const routes = [{ @@ -87,46 +82,6 @@ const routes = [{
87 } 82 }
88 }, 83 },
89 84
90 - {  
91 - path: '/date_package',  
92 - name: 'ServiceDatePackage',  
93 - component: ServiceDatePackage,  
94 - meta: {  
95 - title: '选择套餐/日期'  
96 - }  
97 - },  
98 - {  
99 - path: '/check_order',  
100 - name: 'ServiceCheckOrder',  
101 - component: ServiceCheckOrder,  
102 - meta: {  
103 - title: '支付'  
104 - }  
105 - },  
106 - {  
107 - path: '/card_select',  
108 - name: 'ServiceCardSelect',  
109 - component: ServiceCardSelect,  
110 - meta: {  
111 - title: '我的优惠券'  
112 - }  
113 - },  
114 - {  
115 - path: '/CardBoxXST',  
116 - name: 'CardBoxXST',  
117 - component: CardBoxXST,  
118 - meta: {  
119 - title: '我的优惠券'  
120 - }  
121 - },  
122 - {  
123 - path: '/CardCourseList',  
124 - name: 'CardCourseList',  
125 - component: CardCourseList,  
126 - meta: {  
127 - title: '限时限量特惠大集合'  
128 - }  
129 - },  
130 85
131 { 86 {
132 path: '/service_orderXST', 87 path: '/service_orderXST',
src/views/Home/Home.vue
@@ -130,10 +130,6 @@ export default { @@ -130,10 +130,6 @@ export default {
130 handleGroup() { 130 handleGroup() {
131 this.$toast('暂未开放,敬请期待!') 131 this.$toast('暂未开放,敬请期待!')
132 }, 132 },
133 - // 我的优惠券  
134 - handleMyCard() {  
135 - this.$router.push({ name: 'CardBoxXST' })  
136 - },  
137 // 个人信息 133 // 个人信息
138 handleMyInfo() { 134 handleMyInfo() {
139 this.$router.push({ name: 'HomeUserInfo' }) 135 this.$router.push({ name: 'HomeUserInfo' })
@@ -201,42 +197,27 @@ export default { @@ -201,42 +197,27 @@ export default {
201 }, 197 },
202 // 获取用户信息 198 // 获取用户信息
203 getUserInfo() { 199 getUserInfo() {
204 - this.mgop({  
205 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
206 - host: 'https://mapi.zjzwfw.gov.cn/',  
207 - dataType: 'JSON',  
208 - type: 'GET',  
209 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
210 - headers: {  
211 - // 'isTestUrl': '1'  
212 - },  
213 - data: {  
214 - userNum: this.centerNo,  
215 - },  
216 - onSuccess: (res) => {  
217 - console.log('getUserInfo', res)  
218 - if (res.data.code == 200) {  
219 - let userInfo = res.data.data.userInfo  
220 - this.userInfo = userInfo  
221 - localStorage.setItem('userInfo', JSON.stringify(userInfo))  
222 - if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') {  
223 - userInfo.schoolNames = userInfo.schoolNames.filter((n) => n)  
224 - localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames))  
225 - this.$store.commit('changeSchool', userInfo.schoolNames)  
226 - if (!localStorage.getItem('schoolNamesChoose') || localStorage.getItem('schoolNamesChoose') == 'null') {  
227 - localStorage.setItem('schoolNamesChoose', JSON.stringify(userInfo.schoolNames[0]))  
228 - this.schoolNamesChoose = userInfo.schoolNames[0]  
229 - }  
230 - } else {  
231 - localStorage.setItem('schoolNames', [])  
232 - this.$store.commit('changeSchool', []) 200 + // alert('getUserInfo:' + this.centerNo)
  201 + this.yxAxios.get(`${this.proxyUrl}/user/info/getPortalUserByNum?userNum=${this.centerNo}`).then((res) => {
  202 + console.log('getUserInfo', res)
  203 + if (res.data.code == 200) {
  204 + let userInfo = res.data.data.userInfo
  205 + this.userInfo = userInfo
  206 + localStorage.setItem('userInfo', JSON.stringify(userInfo))
  207 + if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') {
  208 + userInfo.schoolNames = userInfo.schoolNames.filter((n) => n)
  209 + localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames))
  210 + this.$store.commit('changeSchool', userInfo.schoolNames)
  211 + if (!localStorage.getItem('schoolNamesChoose') || localStorage.getItem('schoolNamesChoose') == 'null') {
  212 + localStorage.setItem('schoolNamesChoose', JSON.stringify(userInfo.schoolNames[0]))
  213 + this.schoolNamesChoose = userInfo.schoolNames[0]
233 } 214 }
  215 + } else {
  216 + localStorage.setItem('schoolNames', [])
  217 + this.$store.commit('changeSchool', [])
234 } 218 }
235 - this.showChildList = true  
236 - },  
237 - onFail: (err) => {  
238 - console.log('err', err)  
239 - }, 219 + }
  220 + this.showChildList = true
240 }) 221 })
241 }, 222 },
242 formatterTime(time) { 223 formatterTime(time) {
src/views/Home/HomeUserInfo.vue
@@ -9,29 +9,28 @@ @@ -9,29 +9,28 @@
9 </van-cell> 9 </van-cell>
10 </template> 10 </template>
11 </van-popover> --> 11 </van-popover> -->
12 - 12 +
13 <van-cell title="身份证" :value="idCard" /> 13 <van-cell title="身份证" :value="idCard" />
14 <van-cell title="手机号" :value="phone" /> 14 <van-cell title="手机号" :value="phone" />
15 <van-cell title="关注主学校" :value="schoolNamesChoose" /> 15 <van-cell title="关注主学校" :value="schoolNamesChoose" />
16 </van-cell-group> 16 </van-cell-group>
17 -  
18 </div> 17 </div>
19 </template> 18 </template>
20 <script> 19 <script>
21 export default { 20 export default {
22 - data () { 21 + data() {
23 return { 22 return {
24 - nickName: '',//姓名  
25 - gender: '',//性别  
26 - idCard: '',//身份证  
27 - phone: '',//手机号  
28 - schoolNamesChoose: '',//学校  
29 - showGenderPopover:false, 23 + nickName: '', //姓名
  24 + gender: '', //性别
  25 + idCard: '', //身份证
  26 + phone: '', //手机号
  27 + schoolNamesChoose: '', //学校
  28 + showGenderPopover: false,
30 actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }], 29 actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }],
31 } 30 }
32 }, 31 },
33 - mounted () {  
34 - this.centerNo = localStorage.getItem('centerNo'); 32 + mounted() {
  33 + this.centerNo = localStorage.getItem('centerNo')
35 const userInfo = JSON.parse(localStorage.getItem('userInfo')) 34 const userInfo = JSON.parse(localStorage.getItem('userInfo'))
36 this.nickName = userInfo.nickName 35 this.nickName = userInfo.nickName
37 this.gender = userInfo.gender 36 this.gender = userInfo.gender
@@ -43,41 +42,25 @@ export default { @@ -43,41 +42,25 @@ export default {
43 } 42 }
44 }, 43 },
45 methods: { 44 methods: {
46 - onSelect(action) {  
47 - Toast(action.text); 45 + onSelect(action) {
  46 + Toast(action.text)
48 }, 47 },
49 // 获取用户信息 48 // 获取用户信息
50 - getUserInfo: function () { 49 + getUserInfo: function() {
51 this.$toast.loading({ 50 this.$toast.loading({
52 message: '加载中...', 51 message: '加载中...',
53 duration: 0, 52 duration: 0,
54 - forbidClick: true 53 + forbidClick: true,
55 }) 54 })
56 - this.mgop({  
57 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
58 - host: 'https://mapi.zjzwfw.gov.cn/',  
59 - dataType: 'JSON',  
60 - type: 'GET',  
61 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
62 - headers: {  
63 - // 'isTestUrl': '1'  
64 - },  
65 - data: {  
66 - "userNum": this.centerNo  
67 - },  
68 - onSuccess: res => { 55 + this.yxAxios.get(`${this.proxyUrl}/user/info/getPortalUserByNum?userNum=${this.centerNo}`).then((res) => {
69 this.$toast.clear() 56 this.$toast.clear()
70 - if (res.data.code == 200) {  
71 - const userInfo = res.data.data.userInfo 57 + if (res.data.code == 200) {
  58 + const userInfo = res.data.data.userInfo
72 localStorage.setItem('userInfo', JSON.stringify(userInfo)) 59 localStorage.setItem('userInfo', JSON.stringify(userInfo))
73 - }  
74 - },  
75 - onFail: err => {  
76 - console.log('err', err)  
77 } 60 }
78 - }); 61 + })
79 }, 62 },
80 - } 63 + },
81 } 64 }
82 </script> 65 </script>
83 <style lang="scss"> 66 <style lang="scss">
@@ -90,4 +73,4 @@ export default { @@ -90,4 +73,4 @@ export default {
90 padding: 30px 32px; 73 padding: 30px 32px;
91 } 74 }
92 } 75 }
93 -</style>  
94 \ No newline at end of file 76 \ No newline at end of file
  77 +</style>
src/views/Home/MyClassList.vue
@@ -3,31 +3,45 @@ @@ -3,31 +3,45 @@
3 <div class="header"> 3 <div class="header">
4 <van-swipe class="my-swipe" indicator-color="white" v-if="baseInfo.coverList && baseInfo.coverList.length > 0"> 4 <van-swipe class="my-swipe" indicator-color="white" v-if="baseInfo.coverList && baseInfo.coverList.length > 0">
5 <van-swipe-item v-for="n in baseInfo.coverList" :key="n.id"> 5 <van-swipe-item v-for="n in baseInfo.coverList" :key="n.id">
6 - <video v-if="n.cover_url.indexOf('.mp4') > -1" id="video" :src="n.cover_url" poster="" controls="controls" windowlessvideo="true" playsinline="true" webkit-playsinline="true" x5-playsinline="true" x-webkit-airplay="allow" width="100%" height="260px" type="video/mp4"></video> 6 + <video
  7 + v-if="n.cover_url.indexOf('.mp4') > -1"
  8 + id="video"
  9 + :src="n.cover_url"
  10 + poster=""
  11 + controls="controls"
  12 + windowlessvideo="true"
  13 + playsinline="true"
  14 + webkit-playsinline="true"
  15 + x5-playsinline="true"
  16 + x-webkit-airplay="allow"
  17 + width="100%"
  18 + height="260px"
  19 + type="video/mp4"
  20 + ></video>
7 <img v-if="n.cover_url.indexOf('.mp4') == -1" :src="n.cover_url" /> 21 <img v-if="n.cover_url.indexOf('.mp4') == -1" :src="n.cover_url" />
8 </van-swipe-item> 22 </van-swipe-item>
9 </van-swipe> 23 </van-swipe>
10 <img v-else src="@/assets/service/defCoure.jpg" alt="" /> 24 <img v-else src="@/assets/service/defCoure.jpg" alt="" />
11 </div> 25 </div>
12 <div class="base_info"> 26 <div class="base_info">
13 - <p class="base_title">{{baseInfo.baseName}}</p> 27 + <p class="base_title">{{ baseInfo.baseName }}</p>
14 <div class="rate"> 28 <div class="rate">
15 <van-rate v-model="baseInfo.baseScore" color="#FFCC00" :size="16" readonly /> 29 <van-rate v-model="baseInfo.baseScore" color="#FFCC00" :size="16" readonly />
16 <span>{{ baseInfo.baseScore }}</span> 30 <span>{{ baseInfo.baseScore }}</span>
17 </div> 31 </div>
18 <p class="address"> 32 <p class="address">
19 <van-icon name="location" class="icon" /> 33 <van-icon name="location" class="icon" />
20 - {{baseInfo.address}} 34 + {{ baseInfo.address }}
21 </p> 35 </p>
22 <p class="phone"> 36 <p class="phone">
23 <van-icon name="phone" class="icon" /> 37 <van-icon name="phone" class="icon" />
24 - {{baseInfo.phone}} 38 + {{ baseInfo.phone }}
25 </p> 39 </p>
26 </div> 40 </div>
27 <div class="select_student" @click="selectStudent"> 41 <div class="select_student" @click="selectStudent">
28 <p class="select_tip">请选择需要打卡的孩子</p> 42 <p class="select_tip">请选择需要打卡的孩子</p>
29 <div class="student" v-if="selectedContact.travelerName"> 43 <div class="student" v-if="selectedContact.travelerName">
30 - <span>{{selectedContact.travelerName}}</span> 44 + <span>{{ selectedContact.travelerName }}</span>
31 <van-icon name="close" class="icon" /> 45 <van-icon name="close" class="icon" />
32 </div> 46 </div>
33 <div class="student" v-else> 47 <div class="student" v-else>
@@ -35,9 +49,9 @@ @@ -35,9 +49,9 @@
35 </div> 49 </div>
36 </div> 50 </div>
37 <div class="btns" @click="getPosition">立即打卡</div> 51 <div class="btns" @click="getPosition">立即打卡</div>
38 - <van-popup v-model="failShow" round closeable :style="{ width:'80%'}"> 52 + <van-popup v-model="failShow" round closeable :style="{ width: '80%' }">
39 <div class="success"> 53 <div class="success">
40 - <img src="@/assets/tip1.png" alt=""> 54 + <img src="@/assets/tip1.png" alt="" />
41 <h3>打卡失败!</h3> 55 <h3>打卡失败!</h3>
42 <p>您当前所在的地理位置不在课程的打卡范围内!</p> 56 <p>您当前所在的地理位置不在课程的打卡范围内!</p>
43 </div> 57 </div>
@@ -47,169 +61,135 @@ @@ -47,169 +61,135 @@
47 61
48 <script> 62 <script>
49 export default { 63 export default {
50 - data () { 64 + data() {
51 return { 65 return {
52 baseInfo: '', 66 baseInfo: '',
53 list: [], 67 list: [],
54 baseId: '', 68 baseId: '',
55 userInfo: '', 69 userInfo: '',
56 failShow: false, 70 failShow: false,
57 - selectedContact: '',//选择的出行人  
58 - 71 + selectedContact: '', //选择的出行人
59 } 72 }
60 }, 73 },
61 - mounted () {  
62 - var userInfo = localStorage.getItem('userInfo'); 74 + mounted() {
  75 + var userInfo = localStorage.getItem('userInfo')
63 if (userInfo) { 76 if (userInfo) {
64 - this.userInfo = JSON.parse(userInfo); 77 + this.userInfo = JSON.parse(userInfo)
65 } 78 }
66 // 选择的出行人 79 // 选择的出行人
67 - let selectedContactArr = localStorage.getItem('selectedContactArr'); 80 + let selectedContactArr = localStorage.getItem('selectedContactArr')
68 if (selectedContactArr) { 81 if (selectedContactArr) {
69 - selectedContactArr = JSON.parse(selectedContactArr); 82 + selectedContactArr = JSON.parse(selectedContactArr)
70 this.selectedContact = selectedContactArr[0] 83 this.selectedContact = selectedContactArr[0]
71 } 84 }
72 - this.baseId = this.$route.query.qrresult;  
73 - this.GetStudyBaseDetail(this.baseId); 85 + this.baseId = this.$route.query.qrresult
  86 + this.GetStudyBaseDetail(this.baseId)
74 }, 87 },
75 methods: { 88 methods: {
76 - AddSign () {  
77 - 89 + AddSign() {
78 this.$toast.loading({ 90 this.$toast.loading({
79 message: '请求中...', 91 message: '请求中...',
80 - });  
81 - this.mgop({  
82 - api: 'mgop.sz.hswsy.AddSign', // 必须  
83 - host: 'https://mapi.zjzwfw.gov.cn/',  
84 - dataType: 'JSON',  
85 - type: 'GET',  
86 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
87 - headers: {  
88 - // 'isTestUrl': '1'  
89 - },  
90 - data: {  
91 - "userId": this.selectedContact.travelerNum,  
92 - "baseId": this.baseId  
93 - },  
94 - onSuccess: res => {  
95 - this.$toast.success('打卡签到成功'); 92 + })
  93 + this.yxAxios
  94 + .get(`${this.yanxueUrl}/api/BaseManage/AddSign?userId=${this.selectedContact.travelerNum}&baseId=${this.baseId}&type=3`)
  95 + .then((res) => {
  96 + this.$toast.success('打卡签到成功')
96 setTimeout(() => { 97 setTimeout(() => {
97 this.$router.push({ name: 'Home' }) 98 this.$router.push({ name: 'Home' })
98 }, 1000) 99 }, 1000)
99 - },  
100 - onFail: err => {  
101 - console.log('err', err)  
102 - }  
103 - }); 100 + })
104 }, 101 },
105 // 获取基地信息 102 // 获取基地信息
106 - GetStudyBaseDetail (baseId) { 103 + GetStudyBaseDetail(baseId) {
107 this.$toast.loading({ 104 this.$toast.loading({
108 message: '请求中...', 105 message: '请求中...',
109 - });  
110 - this.mgop({  
111 - api: 'mgop.sz.hswsy.GetStudyBaseDetail', // 必须  
112 - host: 'https://mapi.zjzwfw.gov.cn/',  
113 - dataType: 'JSON',  
114 - type: 'GET',  
115 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
116 - headers: {  
117 - // 'isTestUrl': '1'  
118 - },  
119 - data: {  
120 - "userId": 0,  
121 - "cs": '绍兴市',  
122 - "id": baseId  
123 - },  
124 - onSuccess: res => { 106 + })
  107 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/GetStudyBaseDetail?userId=0&cs=绍兴市&id=${baseId}`).then((res) => {
  108 + this.$toast.clear()
  109 + console.log('基地信息:', res.data)
  110 + if (res.data.data) {
125 this.$toast.clear() 111 this.$toast.clear()
126 - console.log('基地信息:', res.data)  
127 - if (res.data.data) {  
128 - this.$toast.clear();  
129 - this.baseInfo = res.data.data;  
130 - } else {  
131 - this.$toast.fail(res.data.message)  
132 - }  
133 - },  
134 - onFail: err => {  
135 - console.log('err', err) 112 + this.baseInfo = res.data.data
  113 + } else {
  114 + this.$toast.fail(res.data.message)
136 } 115 }
137 - }); 116 + })
138 }, 117 },
139 - getPosition () { 118 + getPosition() {
140 if (!this.selectedContact.travelerNum) { 119 if (!this.selectedContact.travelerNum) {
141 - this.$toast('请选择需要打卡的孩子');  
142 - return false; 120 + this.$toast('请选择需要打卡的孩子')
  121 + return false
143 } 122 }
144 - if (this.baseInfo.signLong == 0 && this.baseInfo.signLat == 0) { //基地没数坐标  
145 - this.AddSign(); 123 + if (this.baseInfo.signLong == 0 && this.baseInfo.signLat == 0) {
  124 + //基地没数坐标
  125 + this.AddSign()
146 return false 126 return false
147 } 127 }
148 - var basePosition = [this.baseInfo.signLong, this.baseInfo.signLat];  
149 - AMap.convertFrom(basePosition, 'baidu', function (status, result) {  
150 - console.log('基地定位转换:',result) 128 + var basePosition = [this.baseInfo.signLong, this.baseInfo.signLat]
  129 + AMap.convertFrom(basePosition, 'baidu', function(status, result) {
  130 + console.log('基地定位转换:', result)
151 if (result.info === 'ok') { 131 if (result.info === 'ok') {
152 - basePosition = [result.locations[0].lng, result.locations[0].lat]; // Array.<LngLat> 132 + basePosition = [result.locations[0].lng, result.locations[0].lat] // Array.<LngLat>
153 } 133 }
154 - }); 134 + })
155 this.$toast.loading({ 135 this.$toast.loading({
156 message: '请求中...', 136 message: '请求中...',
157 - });  
158 - this.getNowPosition((posi) => { //获取当前位置坐标  
159 - console.log('获取当前位置坐标:',posi)  
160 - this.$toast.clear(); 137 + })
  138 + this.getNowPosition((posi) => {
  139 + //获取当前位置坐标
  140 + console.log('获取当前位置坐标:', posi)
  141 + this.$toast.clear()
161 if (posi) { 142 if (posi) {
162 - var nowPosition = [posi.position.lng, posi.position.lat];  
163 - var distance = AMap.GeometryUtil.distance(nowPosition, basePosition);  
164 - console.log('两点距离:',distance) 143 + var nowPosition = [posi.position.lng, posi.position.lat]
  144 + var distance = AMap.GeometryUtil.distance(nowPosition, basePosition)
  145 + console.log('两点距离:', distance)
165 console.log(parseInt(distance), nowPosition, basePosition) 146 console.log(parseInt(distance), nowPosition, basePosition)
166 if (parseInt(distance) > 500) { 147 if (parseInt(distance) > 500) {
167 - this.failShow = true; 148 + this.failShow = true
168 } else { 149 } else {
169 // alert('定位小于500m') 150 // alert('定位小于500m')
170 - this.AddSign(); 151 + this.AddSign()
171 } 152 }
172 } else { 153 } else {
173 // alert('getNowPosition没有返回') 154 // alert('getNowPosition没有返回')
174 } 155 }
175 - }); 156 + })
176 }, 157 },
177 - getNowPosition: function (callback) {  
178 - let mapObj = new AMap.Map('iCenter');  
179 - mapObj.plugin('AMap.Geolocation', function () { 158 + getNowPosition: function(callback) {
  159 + let mapObj = new AMap.Map('iCenter')
  160 + mapObj.plugin('AMap.Geolocation', function() {
180 let geolocation = new AMap.Geolocation({ 161 let geolocation = new AMap.Geolocation({
181 - enableHighAccuracy: true,//是否使用高精度定位,默认:true  
182 - timeout: 10000, //超过10秒后停止定位,默认:无穷大  
183 - maximumAge: 0, //定位结果缓存0毫秒,默认:0  
184 - convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true  
185 - showButton: true, //显示定位按钮,默认:true  
186 - buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角  
187 - buttonOffset: new AMap.Pixel(0, 0),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)  
188 - showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true  
189 - showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true  
190 - panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true  
191 - zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false  
192 - });  
193 - mapObj.addControl(geolocation);  
194 - geolocation.getCurrentPosition();  
195 - AMap.event.addListener(geolocation, 'complete', function (res) { 162 + enableHighAccuracy: true, //是否使用高精度定位,默认:true
  163 + timeout: 10000, //超过10秒后停止定位,默认:无穷大
  164 + maximumAge: 0, //定位结果缓存0毫秒,默认:0
  165 + convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
  166 + showButton: true, //显示定位按钮,默认:true
  167 + buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
  168 + buttonOffset: new AMap.Pixel(0, 0), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
  169 + showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
  170 + showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
  171 + panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
  172 + zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
  173 + })
  174 + mapObj.addControl(geolocation)
  175 + geolocation.getCurrentPosition()
  176 + AMap.event.addListener(geolocation, 'complete', function(res) {
196 // alert('返回定位信息:' + JSON.stringify(res)) 177 // alert('返回定位信息:' + JSON.stringify(res))
197 console.log('返回定位信息:', res) 178 console.log('返回定位信息:', res)
198 - callback(res);  
199 - });//返回定位信息  
200 - AMap.event.addListener(geolocation, 'error', function (res) { 179 + callback(res)
  180 + }) //返回定位信息
  181 + AMap.event.addListener(geolocation, 'error', function(res) {
201 // alert('返回定位出错信息:' + JSON.stringify(res)) 182 // alert('返回定位出错信息:' + JSON.stringify(res))
202 console.log('返回定位出错信息:', res) 183 console.log('返回定位出错信息:', res)
203 - callback();  
204 - }); //返回定位出错信息 184 + callback()
  185 + }) //返回定位出错信息
205 }) 186 })
206 -  
207 }, 187 },
208 // 选择孩子 188 // 选择孩子
209 - selectStudent () { 189 + selectStudent() {
210 this.$router.push({ name: 'SelectContact', query: { limit: 1, hideParent: 1 } }) 190 this.$router.push({ name: 'SelectContact', query: { limit: 1, hideParent: 1 } })
211 - }  
212 - } 191 + },
  192 + },
213 } 193 }
214 </script> 194 </script>
215 195
src/views/Home/StudentDetail.vue
@@ -3,28 +3,36 @@ @@ -3,28 +3,36 @@
3 <div class="infomation"> 3 <div class="infomation">
4 <div class="top"> 4 <div class="top">
5 <div> 5 <div>
6 - <img class="head" :src="defaultHead" alt=""> 6 + <img class="head" :src="defaultHead" alt="" />
7 <div class="right"> 7 <div class="right">
8 - <p class="name">{{studentInfo.travelerName}}<span v-if="studentInfo.enrollYear">{{studentInfo.enrollYear}}级</span></p>  
9 - <p class="school_name">{{studentInfo.schoolName}}</p> 8 + <p class="name">
  9 + {{ studentInfo.travelerName }}<span v-if="studentInfo.enrollYear">{{ studentInfo.enrollYear }}级</span>
  10 + </p>
  11 + <p class="school_name">{{ studentInfo.schoolName }}</p>
10 </div> 12 </div>
11 </div> 13 </div>
12 <HomeScan></HomeScan> 14 <HomeScan></HomeScan>
13 </div> 15 </div>
14 <div class="count_box"> 16 <div class="count_box">
15 <div class="count_item"> 17 <div class="count_item">
16 - <p class="count"><span>{{signCheckCountInfo.signCount}}</span>/次</p> 18 + <p class="count">
  19 + <span>{{ signCheckCountInfo.signCount }}</span
  20 + >/次
  21 + </p>
17 <p class="des">基地打卡次数</p> 22 <p class="des">基地打卡次数</p>
18 </div> 23 </div>
19 <div class="line"></div> 24 <div class="line"></div>
20 <div class="count_item"> 25 <div class="count_item">
21 - <p class="count"><span>{{signCheckCountInfo.courseDays}}</span>/天</p> 26 + <p class="count">
  27 + <span>{{ signCheckCountInfo.courseDays }}</span
  28 + >/天
  29 + </p>
22 <p class="des">课程实践</p> 30 <p class="des">课程实践</p>
23 </div> 31 </div>
24 </div> 32 </div>
25 <div class="icon_box"> 33 <div class="icon_box">
26 <div class="icon_item" @click="handleYanxue"> 34 <div class="icon_item" @click="handleYanxue">
27 - <img src="@/assets/home/stu_icon1.png" alt=""> 35 + <img src="@/assets/home/stu_icon1.png" alt="" />
28 <p>研学码</p> 36 <p>研学码</p>
29 </div> 37 </div>
30 <!-- <div class="icon_item" @click="contactService"> 38 <!-- <div class="icon_item" @click="contactService">
@@ -40,36 +48,36 @@ @@ -40,36 +48,36 @@
40 <div class="list_box"> 48 <div class="list_box">
41 <van-tabs v-model="active" color="#21A3FF"> 49 <van-tabs v-model="active" color="#21A3FF">
42 <van-tab title="基地记录"> 50 <van-tab title="基地记录">
43 - <div class="list_item" v-for="(item,index) in baseList" :key="index"> 51 + <div class="list_item" v-for="(item, index) in baseList" :key="index">
44 <div class="left"> 52 <div class="left">
45 - <p class="day">{{item.day}}</p>  
46 - <p class="minute">{{item.minute}}</p> 53 + <p class="day">{{ item.day }}</p>
  54 + <p class="minute">{{ item.minute }}</p>
47 </div> 55 </div>
48 <div class="line"></div> 56 <div class="line"></div>
49 <div class="right"> 57 <div class="right">
50 - <img :src="item.baseUrl" alt="">  
51 - <p class="item_title">{{item.baseName}} </p>  
52 - <button class="active" v-if="item.evaluationId==0" @click="evaluateBase(item)">去评价</button> 58 + <img :src="item.baseUrl" alt="" />
  59 + <p class="item_title">{{ item.baseName }}</p>
  60 + <button class="active" v-if="item.evaluationId == 0" @click="evaluateBase(item)">去评价</button>
53 <button v-else @click="evaluateBaseDetail(item)">查看评价</button> 61 <button v-else @click="evaluateBaseDetail(item)">查看评价</button>
54 </div> 62 </div>
55 </div> 63 </div>
56 - <van-empty v-if="baseList.length==0" description="暂无基地记录" /> 64 + <van-empty v-if="baseList.length == 0" description="暂无基地记录" />
57 </van-tab> 65 </van-tab>
58 <van-tab title="课程记录"> 66 <van-tab title="课程记录">
59 - <div class="list_item" v-for="(item,index) in courseList" :key="index"> 67 + <div class="list_item" v-for="(item, index) in courseList" :key="index">
60 <div class="left"> 68 <div class="left">
61 - <p class="day">{{item.day}}</p>  
62 - <p class="minute">{{item.minute}}</p> 69 + <p class="day">{{ item.day }}</p>
  70 + <p class="minute">{{ item.minute }}</p>
63 </div> 71 </div>
64 <div class="line"></div> 72 <div class="line"></div>
65 <div class="right"> 73 <div class="right">
66 - <img :src="item.baseUrl" alt="">  
67 - <p class="item_title">{{item.baseName}} </p>  
68 - <button class="active" v-if="item.evaluationId==0" @click="evaluateCourse(item)">去评价</button> 74 + <img :src="item.baseUrl" alt="" />
  75 + <p class="item_title">{{ item.baseName }}</p>
  76 + <button class="active" v-if="item.evaluationId == 0" @click="evaluateCourse(item)">去评价</button>
69 <button v-else @click="evaluateCourseDetail(item)">查看评价</button> 77 <button v-else @click="evaluateCourseDetail(item)">查看评价</button>
70 </div> 78 </div>
71 </div> 79 </div>
72 - <van-empty v-if="courseList.length==0" description="暂无课程记录" /> 80 + <van-empty v-if="courseList.length == 0" description="暂无课程记录" />
73 </van-tab> 81 </van-tab>
74 </van-tabs> 82 </van-tabs>
75 </div> 83 </div>
@@ -78,28 +86,28 @@ @@ -78,28 +86,28 @@
78 <script> 86 <script>
79 import HomeScan from '@/views/Home/component/HomeScan' 87 import HomeScan from '@/views/Home/component/HomeScan'
80 export default { 88 export default {
81 - data () { 89 + data() {
82 return { 90 return {
83 defaultHead: require('@/assets/head.png'), 91 defaultHead: require('@/assets/head.png'),
84 studentInfo: '', 92 studentInfo: '',
85 - courseList: [],//课程记录  
86 - baseList: [],//基地记录  
87 - signCheckCountInfo: '',//打卡和课程天数信息  
88 - active: 0 93 + courseList: [], //课程记录
  94 + baseList: [], //基地记录
  95 + signCheckCountInfo: '', //打卡和课程天数信息
  96 + active: 0,
89 } 97 }
90 }, 98 },
91 - mounted () { 99 + mounted() {
92 let studentInfo = localStorage.getItem('StudentDetialInfo') 100 let studentInfo = localStorage.getItem('StudentDetialInfo')
93 this.studentInfo = JSON.parse(studentInfo) 101 this.studentInfo = JSON.parse(studentInfo)
94 this.$nextTick(() => { 102 this.$nextTick(() => {
95 if (!this.studentInfo?.travelerNum) { 103 if (!this.studentInfo?.travelerNum) {
96 this.$toast.fail('学生信息缺失,请返回首页重试') 104 this.$toast.fail('学生信息缺失,请返回首页重试')
97 - return; 105 + return
98 } 106 }
99 this.$toast.loading({ 107 this.$toast.loading({
100 message: '加载中...', 108 message: '加载中...',
101 duration: 0, 109 duration: 0,
102 - forbidClick: true 110 + forbidClick: true,
103 }) 111 })
104 this.getCourseList() 112 this.getCourseList()
105 this.getBaseList() 113 this.getBaseList()
@@ -108,22 +116,14 @@ export default { @@ -108,22 +116,14 @@ export default {
108 }, 116 },
109 methods: { 117 methods: {
110 // 获取课程记录 118 // 获取课程记录
111 - getCourseList () {  
112 - this.mgop({  
113 - api: 'mgop.sz.hswsy.CourseCheckDetail', // 必须  
114 - host: 'https://mapi.zjzwfw.gov.cn/',  
115 - dataType: 'JSON',  
116 - type: 'POST',  
117 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
118 - headers: {  
119 - // 'isTestUrl': '1'  
120 - },  
121 - data: {  
122 - "userId": this.studentInfo?.travelerNum,  
123 - "pageIndex": 1,  
124 - "pageSize": 999  
125 - },  
126 - onSuccess: res => { 119 + getCourseList() {
  120 + this.yxAxios
  121 + .post(`${this.yanxueUrl}/api/StudiesWap/CourseCheckDetail/List`, {
  122 + userId: this.studentInfo?.travelerNum,
  123 + pageIndex: 1,
  124 + pageSize: 999,
  125 + })
  126 + .then((res) => {
127 this.$toast.clear() 127 this.$toast.clear()
128 console.log('课程记录:', res.data) 128 console.log('课程记录:', res.data)
129 if (res.data.status == 1) { 129 if (res.data.status == 1) {
@@ -137,29 +137,17 @@ export default { @@ -137,29 +137,17 @@ export default {
137 } else { 137 } else {
138 this.$toast.fail(res.data.message) 138 this.$toast.fail(res.data.message)
139 } 139 }
140 - },  
141 - onFail: err => {  
142 - console.log('err', err)  
143 - }  
144 - }); 140 + })
145 }, 141 },
146 // 获取基地记录 142 // 获取基地记录
147 - getBaseList () {  
148 - this.mgop({  
149 - api: 'mgop.sz.hswsy.SignDetail', // 必须  
150 - host: 'https://mapi.zjzwfw.gov.cn/',  
151 - dataType: 'JSON',  
152 - type: 'POST',  
153 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
154 - headers: {  
155 - // 'isTestUrl': '1'  
156 - },  
157 - data: {  
158 - "userId": this.studentInfo?.travelerNum,  
159 - "pageIndex": 1,  
160 - "pageSize": 999  
161 - },  
162 - onSuccess: res => { 143 + getBaseList() {
  144 + this.yxAxios
  145 + .post(`${this.yanxueUrl}/api/StudiesWap/SignDetail/List`, {
  146 + userId: this.studentInfo?.travelerNum,
  147 + pageIndex: 1,
  148 + pageSize: 999,
  149 + })
  150 + .then((res) => {
163 this.$toast.clear() 151 this.$toast.clear()
164 console.log('基地记录:', res.data) 152 console.log('基地记录:', res.data)
165 if (res.data.status == 1) { 153 if (res.data.status == 1) {
@@ -173,27 +161,13 @@ export default { @@ -173,27 +161,13 @@ export default {
173 } else { 161 } else {
174 this.$toast.fail(res.data.message) 162 this.$toast.fail(res.data.message)
175 } 163 }
176 - },  
177 - onFail: err => {  
178 - console.log('err', err)  
179 - }  
180 - }); 164 + })
181 }, 165 },
182 // 根据用户编号获取打卡和课程天数信息 166 // 根据用户编号获取打卡和课程天数信息
183 - getSignCheckCountInfo () {  
184 - this.mgop({  
185 - api: 'mgop.sz.hswsy.SignCheckCountInfoByUserId', // 必须  
186 - host: 'https://mapi.zjzwfw.gov.cn/',  
187 - dataType: 'JSON',  
188 - type: 'GET',  
189 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
190 - headers: {  
191 - // 'isTestUrl': '1'  
192 - },  
193 - data: {  
194 - "userId": this.studentInfo?.travelerNum,  
195 - },  
196 - onSuccess: res => { 167 + getSignCheckCountInfo() {
  168 + this.yxAxios
  169 + .get(`${this.yanxueUrl}/api/StudiesWap/SignCheckCountInfo/ByUserId?userId=${this.studentInfo?.travelerNum}`)
  170 + .then((res) => {
197 this.$toast.clear() 171 this.$toast.clear()
198 console.log('天数:', res.data) 172 console.log('天数:', res.data)
199 if (res.data.status == 1) { 173 if (res.data.status == 1) {
@@ -201,44 +175,40 @@ export default { @@ -201,44 +175,40 @@ export default {
201 } else { 175 } else {
202 this.$toast.fail(res.data.message) 176 this.$toast.fail(res.data.message)
203 } 177 }
204 - },  
205 - onFail: err => {  
206 - console.log('err', err)  
207 - }  
208 - }); 178 + })
209 }, 179 },
210 // 研学码 180 // 研学码
211 - handleYanxue () { 181 + handleYanxue() {
212 this.$router.push({ name: 'YanxueCode' }) 182 this.$router.push({ name: 'YanxueCode' })
213 }, 183 },
214 // 联系客服 184 // 联系客服
215 - contactService () { 185 + contactService() {
216 // if (this.detailData.mobiles) { 186 // if (this.detailData.mobiles) {
217 // location.href = "tel://" + this.detailData.mobiles.split(",")[0]; 187 // location.href = "tel://" + this.detailData.mobiles.split(",")[0];
218 // } 188 // }
219 }, 189 },
220 // 基地评价 190 // 基地评价
221 - evaluateBase (item) { 191 + evaluateBase(item) {
222 this.$router.push({ name: 'evaluateBase', query: { baseId: item.baseId, signId: item.signId } }) 192 this.$router.push({ name: 'evaluateBase', query: { baseId: item.baseId, signId: item.signId } })
223 }, 193 },
224 // 课程评价 194 // 课程评价
225 - evaluateCourse (item) {  
226 - let courseInfo = item; 195 + evaluateCourse(item) {
  196 + let courseInfo = item
227 courseInfo.id = courseInfo.orderId 197 courseInfo.id = courseInfo.orderId
228 window.localStorage.setItem('courseInfo', JSON.stringify(courseInfo)) 198 window.localStorage.setItem('courseInfo', JSON.stringify(courseInfo))
229 this.$router.push({ name: 'evaluateCourse' }) 199 this.$router.push({ name: 'evaluateCourse' })
230 }, 200 },
231 // 基地评价详情 201 // 基地评价详情
232 - evaluateBaseDetail (item) { 202 + evaluateBaseDetail(item) {
233 this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId, baseId: item.baseId } }) 203 this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId, baseId: item.baseId } })
234 }, 204 },
235 // 课程评价详情 205 // 课程评价详情
236 - evaluateCourseDetail (item) { 206 + evaluateCourseDetail(item) {
237 this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId } }) 207 this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId } })
238 - } 208 + },
239 }, 209 },
240 components: { 210 components: {
241 - HomeScan 211 + HomeScan,
242 }, 212 },
243 } 213 }
244 </script> 214 </script>
@@ -249,7 +219,7 @@ export default { @@ -249,7 +219,7 @@ export default {
249 .infomation { 219 .infomation {
250 width: 100%; 220 width: 100%;
251 height: 852px; 221 height: 852px;
252 - background: url("~@/assets/home/bg_stu.png"); 222 + background: url('~@/assets/home/bg_stu.png');
253 background-size: 100%; 223 background-size: 100%;
254 background-position: center; 224 background-position: center;
255 .top { 225 .top {
@@ -451,22 +421,22 @@ export default { @@ -451,22 +421,22 @@ export default {
451 } 421 }
452 } 422 }
453 .list_box .list_item { 423 .list_box .list_item {
454 - .left{ 424 + .left {
455 font-size: 40px; 425 font-size: 40px;
456 - .minute{ 426 + .minute {
457 font-size: 36px; 427 font-size: 36px;
458 } 428 }
459 } 429 }
460 .right { 430 .right {
461 - button {  
462 - font-size: 32px;  
463 - padding: 0;  
464 - }  
465 - .item_title {  
466 - font-size: 40px; 431 + button {
  432 + font-size: 32px;
  433 + padding: 0;
  434 + }
  435 + .item_title {
  436 + font-size: 40px;
  437 + }
467 } 438 }
468 } 439 }
469 - }  
470 } 440 }
471 } 441 }
472 -</style>  
473 \ No newline at end of file 442 \ No newline at end of file
  443 +</style>
src/views/Home/YanxueInfo.vue
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 12
13 <script> 13 <script>
14 export default { 14 export default {
15 - data () { 15 + data() {
16 return { 16 return {
17 codeNum: '', 17 codeNum: '',
18 userNum: '', 18 userNum: '',
@@ -20,59 +20,41 @@ export default { @@ -20,59 +20,41 @@ export default {
20 name: '', 20 name: '',
21 } 21 }
22 }, 22 },
23 - created () {  
24 -  
25 - let studentInfo = JSON.parse(localStorage.getItem('StudentDetialInfo')); 23 + created() {
  24 + let studentInfo = JSON.parse(localStorage.getItem('StudentDetialInfo'))
26 this.userNum = studentInfo.travelerNum 25 this.userNum = studentInfo.travelerNum
27 this.school = studentInfo.schoolName 26 this.school = studentInfo.schoolName
28 this.name = studentInfo.travelerName 27 this.name = studentInfo.travelerName
29 - this.codeNum = this.GetQueryString('qrresult') || studentInfo.studyCode; 28 + this.codeNum = this.GetQueryString('qrresult') || studentInfo.studyCode
30 }, 29 },
31 methods: { 30 methods: {
32 - getbind () { 31 + getbind() {
33 if (this.userNum == '' || this.codeNum == '') { 32 if (this.userNum == '' || this.codeNum == '') {
34 - this.$toast('请先填写完整信息!');  
35 - return ; 33 + this.$toast('请先填写完整信息!')
  34 + return
36 } 35 }
37 - this.mgop({  
38 - api: 'mgop.sz.hswsy.bingStudyCode', // 必须  
39 - host: 'https://mapi.zjzwfw.gov.cn/',  
40 - dataType: 'JSON',  
41 - type: 'GET',  
42 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
43 - headers: {  
44 - // 'isTestUrl': '1'  
45 - },  
46 - data: {  
47 - "userNum": this.userNum,  
48 - "code": this.codeNum,  
49 - },  
50 - onSuccess: res => {  
51 - if (res.data.code == '200') {  
52 - this.$toast('操作成功');  
53 - this.$router.push({ name: 'YanxueCode' })  
54 - } else {  
55 - this.$toast('操作失败:' + res.data.message);  
56 - }  
57 - },  
58 - onFail: err => {  
59 - console.log('err', err) 36 + this.yxAxios.get(this.proxyUrl + '/user/info/bingStudyCode?userNum=' + this.userNum + '&code=' + this.codeNum).then((res) => {
  37 + console.log('接口返回', res.data)
  38 + if (res.data.code == '200') {
  39 + this.$toast('操作成功')
  40 + this.$router.push({ name: 'YanxueCode' })
  41 + } else {
  42 + this.$toast('操作失败:' + res.data.message)
60 } 43 }
61 - }); 44 + })
62 }, 45 },
63 //扫一扫 46 //扫一扫
64 - saoYiSao () {  
65 - window.location.href = 'http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/YanxueInfo'; 47 + saoYiSao() {
  48 + window.location.href = 'http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/YanxueInfo'
66 }, 49 },
67 // 获取链接参数 50 // 获取链接参数
68 - GetQueryString (name) {  
69 - var reg = new RegExp("\\b" + name + "=([^&]*)");  
70 - var r = location.href.match(reg);  
71 - if (r != null) return decodeURIComponent(r[1]);  
72 - }  
73 - } 51 + GetQueryString(name) {
  52 + var reg = new RegExp('\\b' + name + '=([^&]*)')
  53 + var r = location.href.match(reg)
  54 + if (r != null) return decodeURIComponent(r[1])
  55 + },
  56 + },
74 } 57 }
75 </script> 58 </script>
76 59
77 -<style>  
78 -</style>  
79 \ No newline at end of file 60 \ No newline at end of file
  61 +<style></style>
src/views/Home/component/AddChildPopupGroup.vue
@@ -206,21 +206,13 @@ export default { @@ -206,21 +206,13 @@ export default {
206 duration: 0, 206 duration: 0,
207 forbidClick: true, 207 forbidClick: true,
208 }) 208 })
209 - this.mgop({  
210 - api: 'mgop.sz.hswsy.getMsg', // 必须  
211 - host: 'https://mapi.zjzwfw.gov.cn/',  
212 - dataType: 'JSON',  
213 - type: 'POST',  
214 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
215 - headers: {  
216 - // 'isTestUrl': '1'  
217 - },  
218 - data: { 209 + this.http
  210 + .getMsg({
219 phone: this.phone, 211 phone: this.phone,
220 - },  
221 - onSuccess: (res) => { 212 + })
  213 + .then((res) => {
222 this.$toast.clear() 214 this.$toast.clear()
223 - if (res.data.code == 200 || res.data.success) { 215 + if (res.success) {
224 let i = 60 216 let i = 60
225 codeInterval = setInterval(() => { 217 codeInterval = setInterval(() => {
226 if (i == 0) { 218 if (i == 0) {
@@ -232,13 +224,9 @@ export default { @@ -232,13 +224,9 @@ export default {
232 i-- 224 i--
233 }, 1000) 225 }, 1000)
234 } else { 226 } else {
235 - this.$toast.fail(res.data?.message) 227 + this.$toast.fail(res.message)
236 } 228 }
237 - },  
238 - onFail: (err) => {  
239 - console.log('err', err)  
240 - },  
241 - }) 229 + })
242 }, 230 },
243 // 获取手机号白名单信息,激活认证 231 // 获取手机号白名单信息,激活认证
244 checkPhoneAndCode() { 232 checkPhoneAndCode() {
@@ -259,21 +247,13 @@ export default { @@ -259,21 +247,13 @@ export default {
259 duration: 0, 247 duration: 0,
260 forbidClick: true, 248 forbidClick: true,
261 }) 249 })
262 - this.mgop({  
263 - api: 'mgop.sz.hswsy.checkPhone', // 必须  
264 - host: 'https://mapi.zjzwfw.gov.cn/',  
265 - dataType: 'JSON',  
266 - type: 'POST',  
267 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
268 - headers: {  
269 - // 'isTestUrl': '1'  
270 - },  
271 - data: { 250 + this.yxAxios
  251 + .post(`${this.proxyUrl}/user/info/checkPhone`, {
272 code: this.code, 252 code: this.code,
273 phone: this.phone, 253 phone: this.phone,
274 travelerNum: this.travelerNum, 254 travelerNum: this.travelerNum,
275 - },  
276 - onSuccess: (res) => { 255 + })
  256 + .then((res) => {
277 this.$toast.clear() 257 this.$toast.clear()
278 if (res.data.code == 200) { 258 if (res.data.code == 200) {
279 this.$toast.success('认证成功') 259 this.$toast.success('认证成功')
@@ -281,11 +261,7 @@ export default { @@ -281,11 +261,7 @@ export default {
281 } else { 261 } else {
282 this.$toast.fail(res.data?.message) 262 this.$toast.fail(res.data?.message)
283 } 263 }
284 - },  
285 - onFail: (err) => {  
286 - console.log('err', err)  
287 - },  
288 - }) 264 + })
289 }, 265 },
290 // 获取身份证认证 266 // 获取身份证认证
291 checkCard() { 267 checkCard() {
@@ -302,20 +278,12 @@ export default { @@ -302,20 +278,12 @@ export default {
302 duration: 0, 278 duration: 0,
303 forbidClick: true, 279 forbidClick: true,
304 }) 280 })
305 - this.mgop({  
306 - api: 'mgop.sz.hswsy.checkIdCard', // 必须  
307 - host: 'https://mapi.zjzwfw.gov.cn/',  
308 - dataType: 'JSON',  
309 - type: 'POST',  
310 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
311 - headers: {  
312 - // 'isTestUrl': '1'  
313 - },  
314 - data: { 281 + this.yxAxios
  282 + .post(`${this.proxyUrl}/user/info/checkIdCard`, {
315 idCard: this.cardId, 283 idCard: this.cardId,
316 travelerNum: this.travelerNum, 284 travelerNum: this.travelerNum,
317 - },  
318 - onSuccess: (res) => { 285 + })
  286 + .then((res) => {
319 this.$toast.clear() 287 this.$toast.clear()
320 if (res.data.code == 200) { 288 if (res.data.code == 200) {
321 this.$toast.success('认证成功') 289 this.$toast.success('认证成功')
@@ -323,41 +291,20 @@ export default { @@ -323,41 +291,20 @@ export default {
323 } else { 291 } else {
324 this.$toast.fail(res.data?.message) 292 this.$toast.fail(res.data?.message)
325 } 293 }
326 - },  
327 - onFail: (err) => {  
328 - console.log('err', err)  
329 - },  
330 - }) 294 + })
331 }, 295 },
332 // 初始化入学年份选项 296 // 初始化入学年份选项
333 initYearArr() { 297 initYearArr() {
334 - this.mgop({  
335 - api: 'mgop.sz.hswsy.SchoolManageGradeAll', // 必须  
336 - host: 'https://mapi.zjzwfw.gov.cn/',  
337 - dataType: 'JSON',  
338 - type: 'GET',  
339 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
340 - headers: {  
341 - // 'isTestUrl': '1'  
342 - },  
343 - onSuccess: (res) => {  
344 - if (res.data.status == 1) {  
345 - console.log('入学年份列表:', res)  
346 - let yearArr = res.data.data  
347 - let newYearArr = yearArr.map((x) => {  
348 - return {  
349 - value: x,  
350 - label: x,  
351 - }  
352 - })  
353 - this.yearArr = newYearArr  
354 - } else {  
355 - this.$toast.fail(res.data?.message) 298 + this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/Grade/All`).then((res) => {
  299 + console.log('入学年份列表:', res)
  300 + let yearArr = res.data.data
  301 + let newYearArr = yearArr.map((x) => {
  302 + return {
  303 + value: x,
  304 + label: x,
356 } 305 }
357 - },  
358 - onFail: (err) => {  
359 - console.log('err', err)  
360 - }, 306 + })
  307 + this.yearArr = newYearArr
361 }) 308 })
362 }, 309 },
363 selectYearOver(value) { 310 selectYearOver(value) {
@@ -382,18 +329,8 @@ export default { @@ -382,18 +329,8 @@ export default {
382 }, 329 },
383 // 获取班级列表 330 // 获取班级列表
384 GetSchoolManageClass() { 331 GetSchoolManageClass() {
385 - this.mgop({  
386 - api: 'mgop.sz.hswsy.SchoolManageClassAll', // 必须  
387 - host: 'https://mapi.zjzwfw.gov.cn/',  
388 - dataType: 'JSON',  
389 - type: 'GET',  
390 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
391 - headers: {  
392 - // 'isTestUrl': '1'  
393 - },  
394 - onSuccess: (res) => {  
395 - if (res.data.status == 1) {  
396 - console.log('班级列表:', res) 332 + this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/Class/All`).then((res) => {
  333 + console.log('班级列表:', res)
397 let classTypeArr = res.data.data 334 let classTypeArr = res.data.data
398 let newClassTypeArr = classTypeArr.map((x) => { 335 let newClassTypeArr = classTypeArr.map((x) => {
399 return { 336 return {
@@ -402,13 +339,6 @@ export default { @@ -402,13 +339,6 @@ export default {
402 } 339 }
403 }) 340 })
404 this.classTypeArr = newClassTypeArr 341 this.classTypeArr = newClassTypeArr
405 - } else {  
406 - this.$toast.fail(res.data?.message)  
407 - }  
408 - },  
409 - onFail: (err) => {  
410 - console.log('err', err)  
411 - },  
412 }) 342 })
413 }, 343 },
414 handleSelectArea() { 344 handleSelectArea() {
@@ -455,29 +385,18 @@ export default { @@ -455,29 +385,18 @@ export default {
455 duration: 0, 385 duration: 0,
456 forbidClick: true, 386 forbidClick: true,
457 }) 387 })
458 - this.mgop({  
459 - api: 'mgop.sz.hswsy.addStudent', // 必须  
460 - host: 'https://mapi.zjzwfw.gov.cn/',  
461 - dataType: 'JSON',  
462 - type: 'GET',  
463 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
464 - headers: {  
465 - // 'isTestUrl': '1'  
466 - },  
467 - data: postData,  
468 - onSuccess: (res) => {  
469 - console.log('添加学生:', res)  
470 - this.$toast.clear()  
471 - if (res.data.code == 200) {  
472 - this.$toast.success('添加学生成功') 388 + this.yxAxios.post(`${this.proxyUrl}/user/info/addStudent`, postData).then((res) => {
  389 + console.log('添加学生:', res)
  390 + this.$toast.clear()
  391 + if (res.data.code == 200) {
  392 + this.$toast.success('添加学生成功')
  393 +
  394 + setTimeout(() => {
473 this.$emit('complete') 395 this.$emit('complete')
474 - } else {  
475 - this.$toast.fail(res.data?.message)  
476 - }  
477 - },  
478 - onFail: (err) => {  
479 - console.log('err', err)  
480 - }, 396 + }, 500)
  397 + } else {
  398 + this.$toast.fail(res.data?.message)
  399 + }
481 }) 400 })
482 } 401 }
483 }, 402 },
src/views/Home/component/HomeChildList.vue
@@ -65,20 +65,8 @@ export default { @@ -65,20 +65,8 @@ export default {
65 duration: 0, 65 duration: 0,
66 forbidClick: true 66 forbidClick: true
67 }) 67 })
68 - this.mgop({  
69 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
70 - host: 'https://mapi.zjzwfw.gov.cn/',  
71 - dataType: 'JSON',  
72 - type: 'GET',  
73 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
74 - headers: {  
75 - // 'isTestUrl': '1'  
76 - },  
77 - data: {  
78 - "userNum": localStorage.getItem('centerNo')  
79 - },  
80 - onSuccess: res => {  
81 - console.log('getUserInfo', res) 68 + this.yxAxios.get(`${this.proxyUrl}/user/info/getPortalUserByNum?userNum=${localStorage.getItem('centerNo')}`).then((res) => {
  69 + console.log('getUserInfo', res)
82 this.$toast.clear() 70 this.$toast.clear()
83 if (res.data.code == 200) { 71 if (res.data.code == 200) {
84 const userInfo = res.data.data.userInfo 72 const userInfo = res.data.data.userInfo
@@ -94,11 +82,7 @@ export default { @@ -94,11 +82,7 @@ export default {
94 this.$store.commit('changeSchool', []) 82 this.$store.commit('changeSchool', [])
95 } 83 }
96 } 84 }
97 - },  
98 - onFail: err => {  
99 - console.log('err', err)  
100 - }  
101 - }); 85 + })
102 }, 86 },
103 addStudent () { 87 addStudent () {
104 this.step = 1 88 this.step = 1
src/views/Service/AbroadDetail.vue
@@ -36,23 +36,6 @@ @@ -36,23 +36,6 @@
36 </template> 36 </template>
37 </div> 37 </div>
38 </div> 38 </div>
39 - <!-- <div class="package top_border">  
40 - <p class="package_title">套餐类型/日期</p>  
41 - <div class="package_box" v-if="packageArr.length>0">  
42 - <div style="overflow:auto;">  
43 - <div class="package_item" :class="packageActive==index?'active':''" v-for="(item, index) in packageArr" :key="index" @click="handlePackageDay(index)">  
44 - <p class="date">{{ item.day }}</p>  
45 - <p class="week">{{ item.week }}</p>  
46 - <img class="select" src="@/assets/service/select.png" alt="" />  
47 - </div>  
48 - </div>  
49 - <div class="package_item package_item_more" @click="checkDatePackage()" v-if="packageArr.length>5">  
50 - <img class="more_icon" src="@/assets/service/more.png" alt="" />  
51 - <p class="more_text">查看更多</p>  
52 - </div>  
53 - </div>  
54 - <img class="notime" v-if="packageArr.length==0" src="@/assets/service/notime.png" alt="">  
55 - </div> -->  
56 <div class="package top_border" v-if="packageArr.length>0&&packageArr[packageActive].comboInfoList.length>1"> 39 <div class="package top_border" v-if="packageArr.length>0&&packageArr[packageActive].comboInfoList.length>1">
57 <div class="package_box"> 40 <div class="package_box">
58 <div style="overflow:auto;"> 41 <div style="overflow:auto;">
@@ -93,8 +76,6 @@ @@ -93,8 +76,6 @@
93 import AbroadDes from './component/AbroadDetail/AbroadDes'; 76 import AbroadDes from './component/AbroadDetail/AbroadDes';
94 import AbroadBase from './component/AbroadDetail/AbroadBase'; 77 import AbroadBase from './component/AbroadDetail/AbroadBase';
95 import AbroadEvaluate from './component/AbroadDetail/AbroadEvaluate'; 78 import AbroadEvaluate from './component/AbroadDetail/AbroadEvaluate';
96 -import CountDown from './component/AbroadDetail/CountDown';  
97 -import AbroadCoupon from './component/AbroadDetail/AbroadCoupon';  
98 import './AbroadDetail.scss'; 79 import './AbroadDetail.scss';
99 export default { 80 export default {
100 name: "ServiceAbroadDetail", 81 name: "ServiceAbroadDetail",
@@ -122,12 +103,6 @@ export default { @@ -122,12 +103,6 @@ export default {
122 this.GetCourseDetail(); 103 this.GetCourseDetail();
123 }, 104 },
124 methods: { 105 methods: {
125 - // 点击套餐日期  
126 - handlePackageDay (index) {  
127 - this.packageActive = index;  
128 - this.packageTypeActive = 0;//重置套餐类型选择  
129 - //TODO 获取该日所包含的套餐  
130 - },  
131 106
132 // 点击预约 107 // 点击预约
133 checkDatePackage () { 108 checkDatePackage () {
@@ -161,22 +136,8 @@ export default { @@ -161,22 +136,8 @@ export default {
161 }); 136 });
162 137
163 this.addReadNum(this.courseId) 138 this.addReadNum(this.courseId)
164 -  
165 - this.mgop({  
166 - api: 'mgop.sz.hswsy.GetCourseDetail', // 必须  
167 - host: 'https://mapi.zjzwfw.gov.cn/',  
168 - dataType: 'JSON',  
169 - type: 'POST',  
170 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
171 - headers: {  
172 - // 'isTestUrl': '1'  
173 - },  
174 - data: {  
175 - "id": this.courseId,  
176 - "cs": "绍兴市",  
177 - },  
178 - onSuccess: res => {  
179 - this.$toast.clear(); 139 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/GetCourseDetail?id=${this.courseId}&cs=绍兴市`).then((res) => {
  140 + this.$toast.clear();
180 if (res.data.data && res.data.data.id !== 0) { 141 if (res.data.data && res.data.data.id !== 0) {
181 let detailData = res.data.data; 142 let detailData = res.data.data;
182 console.log('产品详情:', detailData) 143 console.log('产品详情:', detailData)
@@ -191,7 +152,6 @@ export default { @@ -191,7 +152,6 @@ export default {
191 price: detailData.price, 152 price: detailData.price,
192 }) 153 })
193 ); 154 );
194 - this.getPackageData(); //获取套餐列表  
195 } else { 155 } else {
196 let message = res.data.message; 156 let message = res.data.message;
197 if (!message) { 157 if (!message) {
@@ -199,104 +159,9 @@ export default { @@ -199,104 +159,9 @@ export default {
199 } 159 }
200 this.$toast.fail(message) 160 this.$toast.fail(message)
201 } 161 }
202 - },  
203 - onFail: err => {  
204 - console.log('err', err)  
205 - }  
206 - }); 162 + })
207 }, 163 },
208 164
209 - // 获取套餐列表  
210 - getPackageData () {  
211 - let startDate = this.Moment().format("YYYY-MM-DD");  
212 - let endDate = this.Moment().add(60, "days").format("YYYY-MM-DD");  
213 - this.mgop({  
214 - api: 'mgop.sz.hswsy.DateComboBindList', // 必须  
215 - host: 'https://mapi.zjzwfw.gov.cn/',  
216 - dataType: 'JSON',  
217 - type: 'GET',  
218 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
219 - headers: {  
220 - // 'isTestUrl': '1'  
221 - },  
222 - data: {  
223 - "productId": this.detailData.id,  
224 - "startDate": startDate,  
225 - "endDate": endDate,  
226 - },  
227 - onSuccess: res => {  
228 - console.log('套餐列表:', res.data.data);  
229 - if (res.data.data) {  
230 - let allPackage = res.data.data;  
231 - let usefulPackage = [];  
232 - for (let i in allPackage) {  
233 - if (allPackage[i]?.comboList?.length > 0) {  
234 - usefulPackage.push(allPackage[i]);  
235 - }  
236 - }  
237 - this.packageData = usefulPackage;  
238 - localStorage.setItem(  
239 - "packageData",  
240 - JSON.stringify(usefulPackage)  
241 - );  
242 - this.setPackageArr();  
243 - }  
244 - },  
245 - onFail: err => {  
246 - console.log('err', err)  
247 - }  
248 - });  
249 - },  
250 - // 设置套餐价格  
251 - setPackageArr () {  
252 - console.log('含套餐的日期:', this.packageData);  
253 - let packageArr = [];  
254 - for (let i in this.packageData) {  
255 - let packageDate = this.Moment(  
256 - new Date(this.packageData[i]?.dayName.replace(/\-/g, "/"))  
257 - );  
258 - let week = packageDate.format("d");  
259 - week =  
260 - week == 1  
261 - ? "周一"  
262 - : week == 2  
263 - ? "周二"  
264 - : week == 3  
265 - ? "周三"  
266 - : week == 4  
267 - ? "周四"  
268 - : week == 5  
269 - ? "周五"  
270 - : week == 6  
271 - ? "周六"  
272 - : week == 0  
273 - ? "周日"  
274 - : "";  
275 - let comboInfoList = [];  
276 - let comboList = JSON.parse(JSON.stringify(this.packageData[i]?.comboList))  
277 - // 为套餐添加下标  
278 - let marketPrice = 999;  
279 - for (let j in comboList) {  
280 - for (let k in comboList[j].comboInfoList) {  
281 - comboList[j].comboInfoList[k].tagIndex = [j, k]  
282 - comboList[j].comboInfoList[k].bindId = comboList[j].id  
283 - if (comboList[j].comboInfoList[k].actualPrice < marketPrice) {  
284 - marketPrice = comboList[j].comboInfoList[k].actualPrice  
285 - }  
286 - }  
287 - comboInfoList.push(...comboList[j].comboInfoList)  
288 - }  
289 - packageArr.push({  
290 - day: packageDate.format("M/D"),  
291 - date: packageDate.format("YYYY-MM-DD"),  
292 - week: week,  
293 - marketPrice: marketPrice,  
294 - comboInfoList: comboInfoList,  
295 - });  
296 - }  
297 - this.packageArr = packageArr;  
298 - this.initPackageArr = true  
299 - },  
300 // 联系客服 165 // 联系客服
301 contactService () { 166 contactService () {
302 if (this.detailData.mobiles) { 167 if (this.detailData.mobiles) {
@@ -327,8 +192,6 @@ export default { @@ -327,8 +192,6 @@ export default {
327 AbroadDes, 192 AbroadDes,
328 AbroadBase, 193 AbroadBase,
329 AbroadEvaluate, 194 AbroadEvaluate,
330 - CountDown,  
331 - AbroadCoupon  
332 } 195 }
333 }; 196 };
334 </script> 197 </script>
src/views/Service/AbroadEvaluate.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div id="abroadEvaluate"> 2 <div id="abroadEvaluate">
3 <div class="top"> 3 <div class="top">
4 <div class="score"> 4 <div class="score">
5 - <span>{{score}}.0</span> 5 + <span>{{ score }}.0</span>
6 <div> 6 <div>
7 <p>商家评分</p> 7 <p>商家评分</p>
8 <van-rate v-model="score" void-icon="star" void-color="#eee" color="#FFCC00" :size="14" /> 8 <van-rate v-model="score" void-icon="star" void-color="#eee" color="#FFCC00" :size="14" />
@@ -16,83 +16,73 @@ @@ -16,83 +16,73 @@
16 </div> --> 16 </div> -->
17 </div> 17 </div>
18 <div class="evaluate_list"> 18 <div class="evaluate_list">
19 - <div class="evaluate_item" v-for="(item,index) in list" :key="index"> 19 + <div class="evaluate_item" v-for="(item, index) in list" :key="index">
20 <div class="user"> 20 <div class="user">
21 - <img src="@/assets/head.png" alt=""> 21 + <img src="@/assets/head.png" alt="" />
22 <div> 22 <div>
23 - <p>{{item.nickName||'匿名用户'}}</p>  
24 - <span>{{item.intime}}</span> 23 + <p>{{ item.nickName || '匿名用户' }}</p>
  24 + <span>{{ item.intime }}</span>
25 </div> 25 </div>
26 </div> 26 </div>
27 <div class="rate_box"> 27 <div class="rate_box">
28 <van-rate v-model="item.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="18" /> 28 <van-rate v-model="item.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="18" />
29 - <span class="rate">{{item.courseScore}}.0</span> 29 + <span class="rate">{{ item.courseScore }}.0</span>
30 </div> 30 </div>
31 - <p class="evaluation"><span>评价:</span>{{item.evaluation}}</p> 31 + <p class="evaluation"><span>评价:</span>{{ item.evaluation }}</p>
32 <div class="evaluation_img_box"> 32 <div class="evaluation_img_box">
33 <!-- <img class="evaluation_img" src="@/assets/head.png" alt=""> --> 33 <!-- <img class="evaluation_img" src="@/assets/head.png" alt=""> -->
34 - <img class="evaluation_img" v-for="(imgItem,index) in item.imgList" :key="index" :src="imgItem.imgUrl" alt="" @click="previewImg(imgItem.imgUrl)"> 34 + <img
  35 + class="evaluation_img"
  36 + v-for="(imgItem, index) in item.imgList"
  37 + :key="index"
  38 + :src="imgItem.imgUrl"
  39 + alt=""
  40 + @click="previewImg(imgItem.imgUrl)"
  41 + />
35 </div> 42 </div>
36 </div> 43 </div>
37 </div> 44 </div>
38 <van-popup v-model="showPreview" round get-container="body"> 45 <van-popup v-model="showPreview" round get-container="body">
39 - <img class="preview_img" :src="previewUrl" alt=""> 46 + <img class="preview_img" :src="previewUrl" alt="" />
40 </van-popup> 47 </van-popup>
41 </div> 48 </div>
42 </template> 49 </template>
43 <script> 50 <script>
44 export default { 51 export default {
45 - data () { 52 + data() {
46 return { 53 return {
47 score: '', 54 score: '',
48 list: [], 55 list: [],
49 - previewUrl: '',//图片预览  
50 - showPreview: false 56 + previewUrl: '', //图片预览
  57 + showPreview: false,
51 } 58 }
52 }, 59 },
53 - mounted () {  
54 - const courseId = this.$route.query.courseId; 60 + mounted() {
  61 + const courseId = this.$route.query.courseId
55 this.$toast.loading({ 62 this.$toast.loading({
56 message: '加载中...', 63 message: '加载中...',
57 - }); 64 + })
58 this.getEvaluationList(courseId) 65 this.getEvaluationList(courseId)
59 -  
60 }, 66 },
61 methods: { 67 methods: {
62 - getEvaluationList (courseId) {  
63 - this.mgop({  
64 - api: 'mgop.sz.hswsy.EvaluationList', // 必须  
65 - host: 'https://mapi.zjzwfw.gov.cn/',  
66 - dataType: 'JSON',  
67 - type: 'GET',  
68 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
69 - headers: {  
70 - // 'isTestUrl': '1'  
71 - },  
72 - data: {  
73 - "courseId": courseId,  
74 - },  
75 - onSuccess: res => {  
76 - this.$toast.clear();  
77 - if (res.data.status == 1) {  
78 - let list = res.data.data?.evaluationList;  
79 - for (let i in list) {  
80 - list[i].intime = this.Moment(list[i].intime).format("YYYY.MM.DD");  
81 - }  
82 - this.list = list;  
83 - this.score = res.data.data?.shopScore 68 + getEvaluationList(courseId) {
  69 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/Evaluation/List?courseId=${this.courseId}`).then((res) => {
  70 + this.$toast.clear()
  71 + if (res.data.status == 1) {
  72 + let list = res.data.data?.evaluationList
  73 + for (let i in list) {
  74 + list[i].intime = this.Moment(list[i].intime).format('YYYY.MM.DD')
84 } 75 }
85 - },  
86 - onFail: err => {  
87 - console.log('err', err) 76 + this.list = list
  77 + this.score = res.data.data?.shopScore
88 } 78 }
89 - }); 79 + })
90 }, 80 },
91 // 预览图片 81 // 预览图片
92 - previewImg (url) {  
93 - this.previewUrl = url; 82 + previewImg(url) {
  83 + this.previewUrl = url
94 this.showPreview = true 84 this.showPreview = true
95 - } 85 + },
96 }, 86 },
97 } 87 }
98 </script> 88 </script>
@@ -218,10 +208,10 @@ export default { @@ -218,10 +208,10 @@ export default {
218 font-size: 40px; 208 font-size: 40px;
219 } 209 }
220 } 210 }
221 - .evaluation{ 211 + .evaluation {
222 font-size: 40px; 212 font-size: 40px;
223 } 213 }
224 } 214 }
225 } 215 }
226 } 216 }
227 -</style>  
228 \ No newline at end of file 217 \ No newline at end of file
  218 +</style>
src/views/Service/CardBoxXST.vue
@@ -1,445 +0,0 @@ @@ -1,445 +0,0 @@
1 -<template>  
2 - <div>  
3 - <van-tabs v-model="active" :before-change="beforeTabChange" sticky>  
4 - <div id="cardBox">  
5 - <van-tab title="未使用">  
6 - <!-- <div class="exchange_btn" @click="handleExchange">  
7 - <p>  
8 - <van-icon name="coupon-o" />  
9 - 兑换优惠券  
10 - </p>  
11 - <van-icon name="arrow" />  
12 - </div> -->  
13 - <div class="card_item" :class="{'big':item.picsArr.length>1,'margin_bottom':item.desShow}" v-for="(item,index) in cardList" :key="index">  
14 - <div class="left">  
15 - <div class="top" @click="handleUseCard(index)">  
16 - <template v-if="item.picsArr.length==1">  
17 - <img :src="item.picsArr[0]" alt="">  
18 - <p class="title">仅该商品可用:<span>{{item.proNameArr[0]}}</span></p>  
19 - </template>  
20 - <template v-if="item.picsArr.length>1">  
21 - <p class="bigtext">{{item.title}}</p>  
22 - <template v-for="(img,index2) in item.picsArr">  
23 - <img class="bigimg" v-if="index2<3" :src="img" :key="index2" alt="">  
24 - </template>  
25 - </template>  
26 - </div>  
27 - <p class="end_time" @click="item.desShow=!item.desShow">  
28 - <span>有效期至:{{item.couponEndTimeVo}}</span>  
29 - <van-icon v-if="item.desShow" name="arrow-up" />  
30 - <van-icon v-else name="arrow-down" />  
31 - </p>  
32 - </div>  
33 - <div class="right" @click="handleUseCard(index)">  
34 - <p class="discount" :class="item.couponState==1?'':'disable'"><span>¥</span>{{item.couponPrice}}</p>  
35 - <p class="usenow" v-if="item.couponState==1">立即使用</p>  
36 - <p class="usenow disable" v-else>{{item.couponState==2?'已使用':'已过期'}}</p>  
37 - </div>  
38 - <p class="des" v-if="item.desShow">仅限领券中心品类券指定商品内使用</p>  
39 - </div>  
40 -  
41 - <van-empty v-if="cardList.length==0" description="暂无优惠券" />  
42 - </van-tab>  
43 - <van-tab title="领券中心">  
44 - <div class="card_item" :class="{'big':item.picsArr.length>1,'margin_bottom':item.desShow}" v-for="(item,index) in reCardList" :key="index">  
45 - <div class="left">  
46 - <div class="top">  
47 - <template v-if="item.picsArr.length==1">  
48 - <img :src="item.picsArr[0]" alt="">  
49 - <p class="title">仅该商品可用:<span>{{item.proNameArr[0]}}</span></p>  
50 - </template>  
51 - <template v-if="item.picsArr.length>1">  
52 - <p class="bigtext">{{item.title}}</p>  
53 - <template v-for="(img,index2) in item.picsArr">  
54 - <img class="bigimg" v-if="index2<3" :src="img" :key="index2" alt="">  
55 - </template>  
56 - </template>  
57 - </div>  
58 - <p class="end_time" @click="item.desShow=!item.desShow">  
59 - <span v-if="item.lifeFlag==1">领取后当天生效,有效期为:{{item.lifeDay}}天</span>  
60 - <span v-else>有效期至:{{item.lifeTime}}</span>  
61 - <van-icon v-if="item.desShow" name="arrow-up" />  
62 - <van-icon v-else name="arrow-down" />  
63 - </p>  
64 - </div>  
65 - <div class="right" @click="reCard(item)">  
66 - <p class="discount" :class="item.geted?'disable':''"><span>¥</span>{{item.couponPrice}}</p>  
67 - <p class="usenow disable" v-if="item.geted">已领取</p>  
68 - <p class="usenow" v-else>立即领取</p>  
69 - </div>  
70 - <p class="des" v-if="item.desShow">仅限领券中心品类券指定商品内使用,每人仅可领取一次!</p>  
71 - </div>  
72 - <van-empty v-if="reCardList.length==0" description="暂无优惠券" />  
73 -  
74 - </van-tab>  
75 - </div>  
76 - </van-tabs>  
77 - </div>  
78 -</template>  
79 -<script>  
80 -export default {  
81 - name: 'CardBoxXST',  
82 - data () {  
83 - return {  
84 - cardList: [],  
85 - reCardList: [],  
86 - centerNo: '',  
87 - active: 0,  
88 - pickerArr: []  
89 - }  
90 - },  
91 - mounted () {  
92 - let active = this.$route.query.active;  
93 - if (active) {  
94 - this.active = Number(active)  
95 - }  
96 - this.centerNo = localStorage.getItem('centerNo')  
97 - this.getAllCard()  
98 - this.getReCard()  
99 - },  
100 - methods: {  
101 - beforeTabChange (item) {  
102 - if (item == 0) {  
103 - this.getAllCard()  
104 - } else {  
105 - this.getReCard()  
106 - }  
107 - return true;  
108 - },  
109 - // 获取所有优惠券  
110 - getAllCard () {  
111 - this.mgop({  
112 - api: 'mgop.sz.hswsy.CouponList', // 必须  
113 - host: 'https://mapi.zjzwfw.gov.cn/',  
114 - dataType: 'JSON',  
115 - type: 'POST',  
116 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
117 - headers: {  
118 - // 'isTestUrl': '1'  
119 - },  
120 - data: {  
121 - "userId": this.centerNo,  
122 - "state": '',//状态 1-正常 2-已使用 3-已过期 不传为全部,  
123 - "pageNum": '1',  
124 - "pageSize": '999'  
125 - },  
126 - onSuccess: res => {  
127 - console.log('所有优惠券:', res)  
128 - if (res.data.rows) {  
129 - let cardList = res.data.rows  
130 - for (let i in cardList) {  
131 - // cardList[i].useEndTime = this.Moment(cardList[i].useEndTime.replace(/\-/g, "/")).format("YYYY-MM-DD")  
132 - cardList[i].picsArr = cardList[i].pics.split(',');  
133 - cardList[i].proNameArr = cardList[i].proName.split(',');  
134 - cardList[i].desShow = false;  
135 - }  
136 - this.cardList = cardList  
137 - if (this.reCardList.length > 0) {  
138 - this.$nextTick(() => {  
139 - this.resetReCardList()//设置领券中心券的状态  
140 - })  
141 - }  
142 - }  
143 - else {  
144 - this.$toast.fail(res.data.message);  
145 - }  
146 -  
147 - },  
148 - onFail: err => {  
149 - console.log('err', err)  
150 - }  
151 - });  
152 - },  
153 -  
154 - //待领取的优惠券  
155 - getReCard () {  
156 - this.mgop({  
157 - api: 'mgop.sz.hswsy.getNormalCoupons', // 必须  
158 - host: 'https://mapi.zjzwfw.gov.cn/',  
159 - dataType: 'JSON',  
160 - type: 'POST',  
161 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
162 - headers: {  
163 - // 'isTestUrl': '1'  
164 - },  
165 - data: {  
166 - "unionId": this.centerNo,  
167 - },  
168 - onSuccess: res => {  
169 - console.log('待领取的优惠券:', res)  
170 - if (res.data.rows) {  
171 - let reCardList = res.data.rows  
172 - for (let i in reCardList) {  
173 - reCardList[i].lifeTime = this.Moment(new Date(reCardList[i].lifeTime)).format("YYYY-MM-DD HH:mm:ss")  
174 - reCardList[i].picsArr = reCardList[i].pics.split(',');  
175 - reCardList[i].proNameArr = reCardList[i].proName.split(',');  
176 - reCardList[i].desShow = false;  
177 - }  
178 - this.reCardList = reCardList  
179 - if (this.reCardList.length > 0) {  
180 - this.$nextTick(() => {  
181 - this.resetReCardList()//设置领券中心券的状态  
182 - })  
183 - }  
184 - } else {  
185 - this.$toast.fail(res.data.msg);  
186 - }  
187 - },  
188 - onFail: err => {  
189 - console.log('err', err)  
190 - }  
191 - });  
192 -  
193 - },  
194 - //设置领券中心券的状态  
195 - resetReCardList () {  
196 - let cardList = this.cardList;  
197 - let reCardList = this.reCardList;  
198 - for (let i = 0; i < reCardList.length; i++) {  
199 - for (let j = 0; j < cardList.length; j++) {  
200 - if (reCardList[i].id == cardList[j].id) {  
201 - reCardList[i].geted = true  
202 - }  
203 - }  
204 - }  
205 - console.log(this.reCardList)  
206 - this.reCardList = reCardList  
207 - this.$forceUpdate()  
208 -  
209 - },  
210 - //领取优惠券  
211 - reCard (item) {  
212 - this.mgop({  
213 - api: 'mgop.sz.hswsy.CouponGet', // 必须  
214 - host: 'https://mapi.zjzwfw.gov.cn/',  
215 - dataType: 'JSON',  
216 - type: 'POST',  
217 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
218 - headers: {  
219 - // 'isTestUrl': '1'  
220 - },  
221 - data: {  
222 - "unionId": this.centerNo,  
223 - "proId": item.proId,  
224 - "proName": item.proName,  
225 - "pic": item.pics,  
226 - "couponId": item.id,  
227 - },  
228 - onSuccess: res => {  
229 - console.log('领取优惠券:', res)  
230 - if (res.data.code == 200) {  
231 - this.$toast('领取成功!')  
232 - this.$nextTick(() => {  
233 - this.resetReCardList()//设置领券中心券的状态  
234 - })  
235 - } else {  
236 - this.$toast.fail(res.data.message);  
237 - }  
238 - },  
239 - onFail: err => {  
240 - console.log('err', err)  
241 - }  
242 - });  
243 -  
244 - },  
245 - // 使用优惠券  
246 - handleUseCard (index) {  
247 - const item = this.cardList[index];  
248 - // 未使用才触发后续操作  
249 - if (item.couponState == 1) {  
250 - let proIdArr = item.proId.split(',')  
251 - if (proIdArr.length == 1) {  
252 - // 单个商品直接跳转商品  
253 - this.$router.push({ name: 'ServiceAbroadDetail', query: { courseId: proIdArr[0] } })  
254 - } else {  
255 - // 多个商品跳转优惠券详情页  
256 - localStorage.setItem('cardCousreCardId', item.id)  
257 - localStorage.setItem('cardCousreCardPrice', item.couponPrice)  
258 - localStorage.setItem('cardCousreCardTitle', item.title)  
259 - localStorage.setItem('cardCousreProId', item.proId)  
260 - localStorage.setItem('cardCousreProName', item.proName)  
261 - localStorage.setItem('cardCousrePics', item.pics)  
262 - localStorage.setItem('cardCousreGeted', true)//设置详情页优惠券状态为已领取  
263 - this.$router.push({ name: 'CardCourseList' })  
264 - }  
265 - }  
266 - },  
267 -  
268 - handleCard (index) {  
269 - const item = this.reCardList[index];  
270 - let proIdArr = item.proId.split(',')  
271 - // 单个商品直接跳转商品  
272 - if (proIdArr.length == 1) {  
273 - this.$router.push({ name: 'ServiceAbroadDetail', query: { courseId: proIdArr[0] } })  
274 - } else {  
275 - // 多个商品跳转优惠券详情页  
276 - localStorage.setItem('cardCousreCardId', item.id)  
277 - localStorage.setItem('cardCousreCardPrice', item.couponPrice)  
278 - localStorage.setItem('cardCousreCardTitle', item.title)  
279 - localStorage.setItem('cardCousreProId', item.proId)  
280 - localStorage.setItem('cardCousreProName', item.proName)  
281 - localStorage.setItem('cardCousrePics', item.pics)  
282 - localStorage.setItem('cardCousreGeted', false)//设置详情页优惠券状态为待领取  
283 - this.$router.push({ name: 'CardCourseList' })  
284 - }  
285 -  
286 - },  
287 - }  
288 -}  
289 -</script>  
290 -<style lang="scss" scoped>  
291 -#cardBox {  
292 - width: 100%;  
293 - min-height: 100vh;  
294 - background: rgb(246, 246, 250);  
295 - overflow: hidden;  
296 - box-sizing: border-box;  
297 - padding-bottom: 100px;  
298 - .exchange_btn {  
299 - font-size: 28px;  
300 - width: 710px;  
301 - height: 76px;  
302 - background: #ffffff;  
303 - border-radius: 8px;  
304 - display: flex;  
305 - align-items: center;  
306 - justify-content: space-between;  
307 - margin: 16px auto;  
308 - box-sizing: border-box;  
309 - padding: 0 16px;  
310 - }  
311 - .card_item {  
312 - width: 726px;  
313 - height: 210px;  
314 - background: url("../../assets/service/card.png");  
315 - background-size: 100%;  
316 - background-repeat: no-repeat;  
317 - margin: 0 auto;  
318 - margin-top: 20px;  
319 - position: relative;  
320 - &.margin_bottom {  
321 - margin-bottom: 60px;  
322 - }  
323 - &.big {  
324 - height: 250px;  
325 - }  
326 - p {  
327 - width: 100%;  
328 - margin: 0;  
329 - }  
330 - .left {  
331 - display: inline-block;  
332 - width: 68%;  
333 - height: 100%;  
334 - vertical-align: top;  
335 - box-sizing: border-box;  
336 - padding: 24px 40px;  
337 - padding-right: 0;  
338 - padding-bottom: 10px;  
339 - .top {  
340 - display: flex;  
341 - flex-wrap: wrap;  
342 - img {  
343 - width: 66px;  
344 - height: 66px;  
345 - background: #d8d8d8;  
346 - border-radius: 6px;  
347 - }  
348 - .title {  
349 - font-size: 24px;  
350 - font-weight: bold;  
351 - margin-left: 10px;  
352 - word-break: break-all;  
353 - max-width: 370px;  
354 - span {  
355 - color: #7f5316;  
356 - }  
357 - }  
358 - .bigtext {  
359 - font-size: 24px;  
360 - width: 400px;  
361 - font-weight: bold;  
362 - margin-bottom: 10px;  
363 - }  
364 - .bigimg {  
365 - width: 120px;  
366 - height: 120px;  
367 - margin-right: 16px;  
368 - }  
369 - }  
370 - }  
371 - .right {  
372 - width: 32%;  
373 - height: 100%;  
374 - display: inline-flex;  
375 - align-content: center;  
376 - flex-wrap: wrap;  
377 - position: relative;  
378 - }  
379 - .end_time {  
380 - font-size: 24px;  
381 - color: #999;  
382 - left: 40px;  
383 - position: absolute;  
384 - bottom: 20px;  
385 - display: flex;  
386 - align-items: center;  
387 - justify-content: space-between;  
388 - width: 450px;  
389 - }  
390 - .discount {  
391 - text-align: center;  
392 - font-size: 60px;  
393 - font-weight: bold;  
394 - span {  
395 - font-size: 24px;  
396 - }  
397 - &.disable {  
398 - color: #999;  
399 - }  
400 - }  
401 - .usenow {  
402 - font-size: 32px;  
403 - text-align: center;  
404 - font-weight: bold;  
405 - margin-top: 10px;  
406 - &.disable {  
407 - color: #999;  
408 - }  
409 - }  
410 - .des {  
411 - font-size: 26px;  
412 - padding: 10px;  
413 - color: #999;  
414 - }  
415 - }  
416 -}  
417 -</style>  
418 -<style lang="scss">  
419 -.elder {  
420 - #cardBox .card_item {  
421 - height: 300px;  
422 - background-size: 100% 100%;  
423 - &.big {  
424 - height: 330px;  
425 - }  
426 - .left .top {  
427 - .title {  
428 - font-size: 40px;  
429 - }  
430 - .bigtext {  
431 - font-size: 40px;  
432 - }  
433 - }  
434 - .end_time {  
435 - font-size: 36px;  
436 - }  
437 - .des {  
438 - font-size: 36px;  
439 - }  
440 - .usenow{  
441 - font-size: 40px;  
442 - }  
443 - }  
444 -}  
445 -</style>  
446 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/CardCourseList.vue
@@ -1,210 +0,0 @@ @@ -1,210 +0,0 @@
1 -<template>  
2 - <div id="cardCourseList">  
3 - <div class="card_box">  
4 - <img src="../../assets/service/card_bg.png" alt="">  
5 - <p class="card_title">{{cardTitle}}</p>  
6 - <p class="card_tip">仅限相关活动产品使用</p>  
7 - <div class="right" @click="reCard">  
8 - <p class="card_price"><span>¥</span>{{couponPrice}}</p>  
9 - <span class="card_btn nobg" v-if="geted">已领取</span>  
10 - <span class="card_btn" v-else>立即抢券</span>  
11 - </div>  
12 - </div>  
13 - <p class="line">以/下/指/定/商/品/可/用</p>  
14 - <ServiceListSecond :list="proList" :notab="true"></ServiceListSecond>  
15 -  
16 - </div>  
17 -</template>  
18 -<script>  
19 -import ServiceListSecond from '@/views/Service/component/ServiceListSecond.vue'  
20 -export default {  
21 - name: 'CardBoxXST',  
22 - data () {  
23 - return {  
24 - unionId: '',  
25 - cardTitle: '',  
26 - couponPrice: '',  
27 - cardId: '',  
28 - proId: '',  
29 - proName: '',  
30 - pics: '',  
31 - geted: false,  
32 - proList: []  
33 - }  
34 - },  
35 - mounted () {  
36 - this.cardTitle = localStorage.getItem('cardCousreCardTitle');  
37 - this.couponPrice = localStorage.getItem('cardCousreCardPrice');  
38 - this.cardId = localStorage.getItem('cardCousreCardId');  
39 - this.proId = localStorage.getItem('cardCousreProId');  
40 - this.proName = localStorage.getItem('cardCousreProName');  
41 - this.pics = localStorage.getItem('cardCousrePics');  
42 - this.geted = localStorage.getItem('cardCousreGeted') == 'true' ? true : false  
43 - this.getCourseList()  
44 - },  
45 - methods: {  
46 - // 获取优惠券对应的商品列表  
47 - getCourseList () {  
48 - this.$toast.loading({  
49 - message: "加载中...",  
50 - duration: 0,  
51 - forbidClick: true,  
52 - });  
53 - this.mgop({  
54 - api: 'mgop.sz.hswsy.CourseListByIdList', // 必须  
55 - host: 'https://mapi.zjzwfw.gov.cn/',  
56 - dataType: 'JSON',  
57 - type: 'POST',  
58 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
59 - headers: {  
60 - // 'isTestUrl': '1'  
61 - },  
62 - data: {  
63 - idList: this.proId.split(',')  
64 - },  
65 - onSuccess: res => {  
66 - this.$toast.clear();  
67 - let proList = res.data.data;  
68 - for (let i in proList) {  
69 - proList[i].course_labels = proList[i].course_labels?.split(',');  
70 - proList[i].coverUrl = proList[i]?.coverList[0]?.cover_url  
71 - if (proList[i].startDate) {  
72 - proList[i].week = this.formatWeek(this.Moment(proList[i].startDate).format('d'));  
73 - proList[i].startDate = this.Moment(proList[i].startDate).format('YYYY.M.D');  
74 - proList[i].endDate = this.Moment(proList[i].endDate).format('YYYY.M.D');  
75 - }  
76 - }  
77 - console.log(proList)  
78 - this.proList = proList  
79 - },  
80 - onFail: err => {  
81 - console.log('err', err)  
82 - }  
83 - });  
84 - },  
85 - formatWeek (week) {  
86 - return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';  
87 - },  
88 -  
89 - //领取优惠券  
90 - reCard () {  
91 - if (this.geted) return;  
92 - this.mgop({  
93 - api: 'mgop.sz.hswsy.CouponGet', // 必须  
94 - host: 'https://mapi.zjzwfw.gov.cn/',  
95 - dataType: 'JSON',  
96 - type: 'POST',  
97 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
98 - headers: {  
99 - // 'isTestUrl': '1'  
100 - },  
101 - data: {  
102 - "unionId": localStorage.getItem('centerNo'),  
103 - "proId": this.proId,  
104 - "proName": this.proName,  
105 - "pic": this.pics,  
106 - "couponId": this.cardId,  
107 - },  
108 - onSuccess: res => {  
109 - if (res.data.code == 200) {  
110 - localStorage.setItem('cardCousreGeted', true)  
111 - this.geted = true;  
112 - this.$toast('领取成功!')  
113 - } else {  
114 - this.$toast.fail(res.data.message);  
115 - }  
116 - },  
117 - onFail: err => {  
118 - console.log('err', err)  
119 - }  
120 - });  
121 -  
122 - },  
123 - onConfirm (item) {  
124 - this.showPicker = false;  
125 - this.enterAboradDetail(item.proId)  
126 - },  
127 - },  
128 - components: {  
129 - ServiceListSecond  
130 - }  
131 -}  
132 -</script>  
133 -<style lang="scss" scoped>  
134 -#cardCourseList {  
135 - width: 100%;  
136 - min-height: 100vh;  
137 - background: #fff;  
138 - background-image: url("../../assets/service/bg.png");  
139 - background-size: 100%;  
140 - background-repeat: no-repeat;  
141 - // padding-top: 36px;  
142 - overflow: hidden;  
143 - .card_box {  
144 - width: 704px;  
145 - height: 150px;  
146 - margin: 0 auto;  
147 - position: relative;  
148 - margin-top: 36px;  
149 - img {  
150 - width: 100%;  
151 - }  
152 - .card_title {  
153 - font-size: 40px;  
154 - font-weight: bold;  
155 - color: #7f5316;  
156 - position: absolute;  
157 - top: 22px;  
158 - left: 40px;  
159 - }  
160 - .card_tip {  
161 - font-size: 24px;  
162 - color: #7f5316;  
163 - position: absolute;  
164 - top: 94px;  
165 - left: 40px;  
166 - }  
167 - .right {  
168 - height: 100%;  
169 - position: absolute;  
170 - top: 0;  
171 - right: 2px;  
172 - padding-top: 20px;  
173 - box-sizing: border-box;  
174 - }  
175 - .card_price {  
176 - width: 160px;  
177 - font-size: 60px;  
178 - font-weight: bold;  
179 - text-align: center;  
180 - color: #000;  
181 - span {  
182 - font-size: 28px;  
183 - }  
184 - }  
185 - .card_btn {  
186 - display: block;  
187 - margin: 0 auto;  
188 - margin-top: 10px;  
189 - width: 134px;  
190 - line-height: 40px;  
191 - color: #7f5316;  
192 - font-size: 26px;  
193 - text-align: center;  
194 - font-weight: bold;  
195 - background: #fff;  
196 - border-radius: 4px;  
197 - &.nobg {  
198 - background: transparent;  
199 - }  
200 - }  
201 - }  
202 - .line {  
203 - font-size: 32px;  
204 - color: #fff;  
205 - letter-spacing: 4px;  
206 - text-align: center;  
207 - margin-top: 18px;  
208 - }  
209 -}  
210 -</style>  
211 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/CheckOrder.vue
@@ -1,564 +0,0 @@ @@ -1,564 +0,0 @@
1 -<template>  
2 - <div id="checkOrder">  
3 - <div class="goods_data top_border">  
4 - <div class="top">  
5 - <img src="@/assets/service/school_bg.png" alt="">  
6 - <div>  
7 - <p class="goods_title">{{showCourseData.course_name}}</p>  
8 - <p class="package_name">套餐名称:{{selectCombo.comboName}}</p>  
9 - <p class="count">数量:x{{count}}{{selectComboUnitName}}</p>  
10 - </div>  
11 - </div>  
12 - <div class="bottom">  
13 - <p class="time">使用时间: {{date}}</p>  
14 - <p class="price"><span>¥</span>{{selectCombo.actualPrice*1000*count/1000}}</p>  
15 - </div>  
16 - </div>  
17 - <div class="card top_border" v-if="selectCombo.actualPrice>0" @click="openCardBox">  
18 - <p>可用优惠券</p>  
19 - <div>  
20 - <span class="use_card" v-if="useCard">已使用红包抵扣{{useCard.couponPrice}}</span>  
21 - <van-icon name="arrow" />  
22 - </div>  
23 - </div>  
24 - <div class="top_border">  
25 - <contact-box :limit="count" :people="selectCombo.adultCount" :child="selectCombo.chilCount"></contact-box>  
26 - </div>  
27 - <div class="card top_border">  
28 - <p>服务承诺和保障</p>  
29 - <van-icon name="arrow" />  
30 - </div>  
31 - <div class="protocol">  
32 - <van-checkbox v-model="checked" shape="square" icon-size="16px">我已阅读并同意 </van-checkbox>  
33 - <span style="text-decoration: underline;" @click="goPayneed">购买须知</span> <span style="text-decoration: underline;" @click="goProtocol">用户协议</span>  
34 - </div>  
35 - <div class="Collection">  
36 - <div class="box box1">  
37 - <p><span>¥</span>{{paymoney}} <del>{{selectCombo.productPrice*1000*count/1000}}</del></p>  
38 - <p class="coupon" v-if="useCard">优惠券已抵用:{{useCard.couponPrice}}</p>  
39 - </div>  
40 - <div class="box box2" v-if="userInfo">  
41 - <span @click="createOrder()">支付</span>  
42 - </div>  
43 - </div>  
44 - </div>  
45 -</template>  
46 -<script>  
47 -import ContactBox from './component/ContactBox.vue'  
48 -export default {  
49 - name: 'ServiceCheckOrder',  
50 - data () {  
51 - return {  
52 - date: '',  
53 - period: '',  
54 - count: 1,  
55 - checked: false,  
56 - useCard: '',  
57 - orderDetail: '',  
58 - selectCombo: '',//当前套餐信息  
59 - selectComboUnitName:'',//套餐单位 人或份  
60 - showCourseData: '',//当前课程的信息  
61 - selectCombo: '',//已选择的套餐  
62 - userInfo: '',//支付用  
63 - }  
64 - },  
65 - mounted () {  
66 - let userInfo = localStorage.getItem('userInfo');  
67 - if (userInfo) {  
68 - this.userInfo = JSON.parse(userInfo);  
69 - }  
70 -  
71 - this.date = this.$route.query.date;  
72 - this.count = this.$route.query.count;  
73 - this.period = this.$route.query.period;  
74 -  
75 - // 套餐  
76 - let selectCombo = localStorage.getItem('selectCombo')  
77 - if (selectCombo) {  
78 - this.selectCombo = JSON.parse(selectCombo)  
79 - }  
80 - this.selectComboUnitName = localStorage.getItem('selectComboUnitName')  
81 -  
82 - // 如果有优惠券,就展示  
83 - let useCard = localStorage.getItem('useCard')  
84 - let showCourseData = localStorage.getItem('showCourseData')  
85 - if (useCard) {  
86 - this.useCard = JSON.parse(useCard)  
87 - }  
88 - if (showCourseData) {  
89 - this.showCourseData = JSON.parse(showCourseData)  
90 - }  
91 - //判断是否为支付会跳,查询订单状态  
92 - let outTradeNo = localStorage.getItem('outTradeNo')  
93 - if (outTradeNo) {  
94 - this.getOrderStatus(outTradeNo)  
95 - }  
96 - },  
97 - computed: {  
98 - paymoney () {  
99 - let paymoney = (this.selectCombo.actualPrice * 1000 * this.count - (this.useCard.couponPrice * 1000 || 0)) / 1000;  
100 - if (paymoney < 0) paymoney = 0;  
101 - return paymoney  
102 - }  
103 - },  
104 - methods: {  
105 - // 进入选择优惠券  
106 - openCardBox () {  
107 - this.$router.push({ name: 'ServiceCardSelect' })  
108 - },  
109 - //购买须知  
110 - goPayneed () {  
111 - this.$router.push({ name: 'payneed' })  
112 - },  
113 - // 前往查看协议  
114 - goProtocol () {  
115 - this.$router.push({ name: 'protocol' })  
116 - },  
117 - // 创建订单  
118 - createOrder () {  
119 - // 出行人数量判断  
120 - let selectedContactArr = localStorage.getItem('selectedContactArr');  
121 - selectedContactArr = JSON.parse(selectedContactArr);  
122 - let selAdult = 0;  
123 - let selChild = 0;  
124 - for(let i in selectedContactArr){  
125 - if(selectedContactArr[i].userType==2){  
126 - selAdult++  
127 - }else{  
128 - selChild++  
129 - }  
130 - }  
131 - // 判断选择成人和学生数量是否匹配  
132 - if(selAdult!=this.count*this.selectCombo.adultCount||selChild!=this.count*this.selectCombo.chilCount){  
133 - this.$toast.fail('请选择正确数量的出行人');  
134 - return;  
135 - }  
136 - // 协议勾选  
137 - if (!this.checked) {  
138 - this.$toast.fail('请先阅读并同意用户协议');  
139 - return;  
140 - }  
141 -  
142 - // 出行人字段格式  
143 - let selectedContact = []  
144 - for (let i in selectedContactArr) {  
145 - selectedContact.push(selectedContactArr[i].travelerNum)  
146 - }  
147 - selectedContact = selectedContact.join(',')  
148 - this.mgop({  
149 - api: 'mgop.sz.hswsy.AddOrderPay', // 必须  
150 - host: 'https://mapi.zjzwfw.gov.cn/',  
151 - dataType: 'JSON',  
152 - type: 'POST',  
153 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
154 - headers: {  
155 - // 'isTestUrl': '1'  
156 - },  
157 - data: {  
158 - "courseId": this.showCourseData.id,  
159 - "payway": 2,  
160 - "paymoney": this.paymoney,//时段个数*单价*人数-优惠券  
161 - "userId": this.userInfo?.centerNo,//升学汇和其他端接口字段不同  
162 - "orderCount": this.count,//人数  
163 - "orderTime": this.date,//时段集合 2018-10-15  
164 - "comboId": this.selectCombo.id,  
165 - "dateBindComboId": localStorage.getItem('selectComboBindId'),  
166 - "unionId": this.userInfo?.centerNo,  
167 - "price": this.selectCombo.actualPrice * 1000 * this.count / 1000,//商品减掉优惠券之前的价格  
168 - "travelNum": selectedContact,//出行人编号  
169 - "couponId": this.useCard?.id || 0,  
170 - },  
171 - onSuccess: res => {  
172 - if (res.data.data) {  
173 - if (this.paymoney == 0) {  
174 - // 使用后移除优惠券,防止返回继续使用  
175 - localStorage.removeItem('useCard')  
176 - this.$router.push({ name: 'ServiceOrderXST', query: { active: 1, showChatGroupUrl: 1 } })  
177 - } else {  
178 - // 使用后移除优惠券,防止返回继续使用  
179 - localStorage.removeItem('useCard')  
180 - this.openPay(res.data.data);  
181 - this.orderId = res.data.data.orderId;  
182 - }  
183 - } else {  
184 - this.$toast.fail(res.data?.result);  
185 - }  
186 -  
187 - },  
188 - onFail: err => {  
189 - console.log('err', err)  
190 - }  
191 - });  
192 - },  
193 - openPay (data) {  
194 - const sUserAgent = window.navigator.userAgent.toLowerCase()  
195 - const Jupiter = sUserAgent.indexOf("Jupiter") > -1  
196 - if (Jupiter) {  
197 - alert('App')  
198 - // console.log('App')  
199 - // this.mgop({  
200 - // api: 'mgop.sz.hswsy.appPay', // 必须  
201 - // host: 'https://mapi.zjzwfw.gov.cn/',  
202 - // dataType: 'JSON',  
203 - // type: 'POST',  
204 - // appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
205 - // headers: {  
206 - // // 'isTestUrl': '1'  
207 - // },  
208 - // data: {  
209 - // "appid": "2021002189681626",  
210 - // "attach": "string1",  
211 - // "body": "string23",  
212 - // "notify_url": "http://47.110.50.251:9091/api/alipay/pay",  
213 - // "outTradeNo": new Date().getTime(),  
214 - // "payType": 0,  
215 - // "payWay": 0,  
216 - // "productId": "11",  
217 - // "quit_url": location.href,  
218 - // "subject": "string",  
219 - // "totalFee": "0.01",  
220 - // },  
221 - // onSuccess: res => {  
222 - // console.log(res)  
223 - // this.BridgePay(res.data.message)  
224 - // },  
225 - // onFail: err => {  
226 - // console.log('err', err)  
227 - // }  
228 - // });  
229 - } else {  
230 - // alert('H5')  
231 - console.log('h5')  
232 - this.mgop({  
233 - api: 'mgop.sz.hswsy.mobilePay', // 必须  
234 - host: 'https://mapi.zjzwfw.gov.cn/',  
235 - dataType: 'JSON',  
236 - type: 'POST',  
237 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
238 - headers: {  
239 - // 'isTestUrl': '1'  
240 - },  
241 - data: {  
242 - "appid": "2021002189681626",  
243 - "attach": this.showCourseData.course_name + '_' + this.date,  
244 - "body": this.showCourseData.course_name + '_' + this.date,  
245 - "notify_url": "https://yanxue.myjxt.com/api/Manage/AlipayBackInfo",  
246 - "outTradeNo": data.trade_no,  
247 - "payType": 0,  
248 - "payWay": 0,  
249 - "productId": this.showCourseData.id, //商品id  
250 - "quit_url": location.href,  
251 - "subject": this.showCourseData.course_name + '_' + this.date,  
252 - "totalFee": this.selectCombo.actualPrice * 1000 * this.count / 1000  
253 - },  
254 - onSuccess: res => {  
255 - console.log(res)  
256 - localStorage.setItem('outTradeNo', data.trade_no)  
257 - // this.BridgePay(res.data.message)  
258 - let divForm = document.getElementsByTagName('divform')  
259 - if (divForm.length) {  
260 - document.body.removeChild(divForm[0])  
261 - }  
262 - const div = document.createElement('divform')  
263 - div.innerHTML = res.data.message // res.data就是sb支付宝返回给你的form  
264 - document.body.appendChild(div)  
265 - // document.forms[0].setAttribute('target', '_blank') // 加了_blank可能出问题所以我注释了  
266 - document.forms[0].submit()  
267 - },  
268 - onFail: err => {  
269 - console.log('err', err)  
270 - }  
271 - });  
272 - }  
273 - },  
274 - // 支付API  
275 - // BridgePay (credential) {  
276 - // var payMsg = {  
277 - // platform: 1,  
278 - // arg: {  
279 - // "credential": credential,  
280 - // "inSandBox": false  
281 - // }  
282 - // };  
283 - // ZWJSBridge.pay(payMsg).then((result) => {  
284 -  
285 - // alert('支付成功!');  
286 - // console.log('#### ZWJSBridge.pay() result:' + result);  
287 -  
288 - // }).catch((error) => {  
289 - // var errorMsg = JSON.stringify(error);  
290 - // alert('支付失败:' + errorMsg);  
291 - // console.log('#### ZWJSBridge.pay() error:' + error);  
292 - // });  
293 - // },  
294 - //判断是否为支付会跳,查询订单状态  
295 - getOrderStatus (outTradeNo) {  
296 - console.log('getOrderStatus')  
297 - this.$toast.loading()  
298 - this.mgop({  
299 - api: 'mgop.sz.hswsy.IsPayByTradNo', // 必须  
300 - host: 'https://mapi.zjzwfw.gov.cn/',  
301 - dataType: 'JSON',  
302 - type: 'POST',  
303 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
304 - headers: {  
305 - // 'isTestUrl': '1'  
306 - },  
307 - data: {  
308 - "tradNo": outTradeNo,  
309 - },  
310 - onSuccess: res => {  
311 - console.log(res)  
312 - this.$toast.clear()  
313 - localStorage.removeItem('outTradeNo')  
314 - // 如果已支付就跳转  
315 - if (res.data.data) {  
316 - localStorage.removeItem('selectedContactArr')  
317 - this.$router.push({ name: 'ServiceOrderXST', query: { active: 1, showChatGroupUrl: 1 } })  
318 - }  
319 - },  
320 - onFail: err => {  
321 - console.log('err', err)  
322 - }  
323 - });  
324 - }  
325 - },  
326 - components: {  
327 - ContactBox  
328 - }  
329 -}  
330 -</script>  
331 -<style lang="scss" scoped>  
332 -#checkOrder {  
333 - padding-bottom: 260px;  
334 - .top_border {  
335 - border-top: 16px solid #f6f7fa;  
336 - }  
337 - .goods_data {  
338 - padding: 0 22px;  
339 - .top {  
340 - padding: 20px 0;  
341 - img {  
342 - display: inline-block;  
343 - width: 124px;  
344 - height: 124px;  
345 - border-radius: 8px;  
346 - }  
347 - div {  
348 - vertical-align: top;  
349 - display: inline-block;  
350 - margin-left: 20px;  
351 - width: 560px;  
352 - }  
353 - p {  
354 - margin: 0;  
355 - }  
356 - .goods_title {  
357 - font-size: 28px;  
358 - font-weight: bold;  
359 - }  
360 - .package_name {  
361 - font-size: 24px;  
362 - margin-top: 18px;  
363 - }  
364 - .count {  
365 - font-size: 24px;  
366 - }  
367 - }  
368 - .bottom {  
369 - display: flex;  
370 - justify-content: space-between;  
371 - align-items: center;  
372 - padding: 28px 0;  
373 - border-top: 2px solid #f2f4f9;  
374 - .time {  
375 - font-size: 28px;  
376 - }  
377 - .price {  
378 - font-size: 32px;  
379 - font-weight: bold;  
380 - span {  
381 - font-size: 20px;  
382 - }  
383 - }  
384 - }  
385 - }  
386 - .card {  
387 - padding: 0 22px;  
388 - height: 98px;  
389 - display: flex;  
390 - align-items: center;  
391 - justify-content: space-between;  
392 - font-size: 28px;  
393 - font-weight: bold;  
394 - .use_card {  
395 - font-size: 26px;  
396 - color: #f64c37;  
397 - // padding: 2px 24px;  
398 - // background: #ffecc0;  
399 - // border-radius: 8px;  
400 - margin-right: 10px;  
401 - font-weight: normal;  
402 - }  
403 - }  
404 - .protocol {  
405 - display: flex;  
406 - align-items: center;  
407 - padding: 0 22px;  
408 - font-size: 24px;  
409 - span {  
410 - color: #3f92ff;  
411 - margin: 0 4px;  
412 - }  
413 - }  
414 - .Collection {  
415 - background-color: white;  
416 - position: fixed;  
417 - bottom: 0;  
418 - left: 0;  
419 - width: 100%;  
420 - padding: 28px 22px;  
421 - box-sizing: border-box;  
422 - padding-bottom: 50px;  
423 - z-index: 500;  
424 - box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.34);  
425 -  
426 - .box {  
427 - display: inline-block;  
428 - vertical-align: middle;  
429 - color: #666666;  
430 - .icon {  
431 - display: inline-block;  
432 - width: 45%;  
433 - text-align: center;  
434 - font-size: 24px;  
435 - p {  
436 - // margin: 0;  
437 - color: #999999;  
438 - margin-top: 8px;  
439 - }  
440 - i {  
441 - font-size: 48px;  
442 - color: rgb(45, 45, 45);  
443 - font-weight: bold;  
444 - }  
445 - }  
446 -  
447 - > span {  
448 - display: inline-block;  
449 - width: 100%;  
450 - line-height: 92px;  
451 - box-sizing: border-box;  
452 - border-radius: 100px;  
453 - color: white;  
454 - font-size: 32px;  
455 - background: #4092ff;  
456 - text-align: center;  
457 - box-shadow: 0px 10px 40px 0px #a0c9ff;  
458 - b {  
459 - display: inline-block;  
460 - vertical-align: middle;  
461 - margin-left: 20px;  
462 - color: white;  
463 - }  
464 - i {  
465 - vertical-align: middle;  
466 - font-size: 44px;  
467 - font-weight: bold;  
468 - }  
469 - }  
470 - }  
471 - .box1 {  
472 - width: 40%;  
473 - p {  
474 - font-size: 49px;  
475 - font-weight: bold;  
476 - color: #f64c37;  
477 - }  
478 - span {  
479 - font-size: 32px;  
480 - }  
481 - del {  
482 - font-size: 20px;  
483 - color: #999;  
484 - }  
485 - .coupon {  
486 - font-size: 24px;  
487 - color: #999;  
488 - }  
489 - }  
490 - .box2 {  
491 - width: 60%;  
492 - }  
493 - }  
494 -}  
495 -::v-deep .van-calendar__bottom-info {  
496 - color: #f95555;  
497 -}  
498 -::v-deep .van-calendar__selected-day {  
499 - background: #ecf2fc !important;  
500 - border: 4px solid #79abff;  
501 - box-sizing: border-box;  
502 - color: #333;  
503 -}  
504 -.van-checkbox {  
505 - display: inline-flex;  
506 -}  
507 -</style>  
508 -<style lang="scss">  
509 -.elder {  
510 - #checkOrder {  
511 - .goods_data {  
512 - .top {  
513 - img {  
514 - width: 200px;  
515 - height: 200px;  
516 - }  
517 - div {  
518 - width: 470px;  
519 - }  
520 - .goods_title {  
521 - font-size: 40px;  
522 - }  
523 - .package_name {  
524 - font-size: 36px;  
525 - }  
526 - .count {  
527 - font-size: 36px;  
528 - }  
529 - }  
530 - .bottom {  
531 - .time {  
532 - font-size: 36px;  
533 - }  
534 - .price {  
535 - font-size: 36px;  
536 - span {  
537 - font-size: 32px;  
538 - }  
539 - }  
540 - }  
541 - }  
542 - .card {  
543 - font-size: 40px;  
544 - }  
545 - .protocol {  
546 - font-size: 36px;  
547 - }  
548 - .Collection {  
549 - .box1 p {  
550 - font-size: 56px;  
551 - span {  
552 - font-size: 40px;  
553 - }  
554 - del {  
555 - font-size: 40px;  
556 - }  
557 - }  
558 - .box > span {  
559 - font-size: 44px;  
560 - }  
561 - }  
562 - }  
563 -}  
564 -</style>  
565 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/DatePackage.vue
@@ -1,475 +0,0 @@ @@ -1,475 +0,0 @@
1 -<template>  
2 - <div id="datePackage" v-if="comboList">  
3 - <!-- <div class="tag_item">  
4 - <p class="tag_title">商品名称</p>  
5 - <p class="package_name">{{showCourseData.course_name}}</p>  
6 - </div> -->  
7 - <div class="tag_item">  
8 - <p class="tag_title">出行时间</p>  
9 - <p class="package_name" :class="date?'active':''" @click="showCalendar=true">{{date||'选择日期'}}<van-icon name="arrow" /></p>  
10 - <van-calendar v-model="showCalendar" :default-date="defaultDate" @confirm="chooseDate" :show-confirm="false" color="#3F92FF" :formatter="formatCalendar" />  
11 - </div>  
12 - <div class="tag_item" v-if="date">  
13 - <p class="tag_title">行程选择</p>  
14 - <div class="period">  
15 - <div class="period_item" :class="Index1==index?'active':''" v-for="(item,index) in comboList" :key="index" @click="choosePeriod(index)">行程{{index + 1}} :{{item.dateComboName}}</div>  
16 - </div>  
17 - </div>  
18 - <div class="tag_item" v-if="comboList[Index1]">  
19 - <p class="tag_title">成团情况<span class="pintuan_status" v-if="comboList[Index1].clusterName">{{comboList[Index1].clusterName}}</span></p>  
20 - <p class="package_name">最低拼团数 {{comboList[Index1].peopleCount}}{{comboList[Index1].unitName}} 已报名{{comboList[Index1].unitName}}数{{numOne}}/{{comboList[Index1].stockCount}}{{comboList[Index1].unitName}}</p>  
21 - </div>  
22 - <div class="tag_item" v-if="date">  
23 - <p class="tag_title">套餐类型</p>  
24 - <div class="period">  
25 - <div class="period_item" :class="Index2==index?'active':''" v-for="(item,index) in comboList[Index1].comboInfoList" :key="index" @click="choosePeriod2(index)">套餐{{index + 1}} :{{item.comboName}} ¥{{item.actualPrice}}</div>  
26 - </div>  
27 - </div>  
28 - <div class="tag_item">  
29 - <div class="tag_title tag_title_flex">  
30 - <span>请选择套餐数量</span>  
31 - <div class="tag_title_right">  
32 - <span class="btn" @click="countReduce">-</span>  
33 - <span class="count">{{count}}</span>  
34 - <span class="btn" @click="count++">+</span>  
35 - </div>  
36 - </div>  
37 - <div class="package_num">  
38 - <span>库存数量({{numSecond}} /</span>  
39 - <span class="tint">{{numOne+numSecond}}{{comboList[Index1].unitName}})</span>  
40 - </div>  
41 - </div>  
42 - <p class="package_des" v-if="comboList[Index1].comboInfoList[Index2].comboDescrption">套餐说明<br>{{comboList[Index1].comboInfoList[Index2].comboDescrption}}</p>  
43 - <div class="Collection">  
44 - <div class="box box1">  
45 - <p><span>¥</span>{{comboList[Index1].comboInfoList[Index2].actualPrice*1000*count/1000}} <del>{{comboList[Index1].comboInfoList[Index2].productPrice*1000*count/1000}}</del></p>  
46 - </div>  
47 - <div class="box box2">  
48 - <span @click="checkOrder()">去下单</span>  
49 - </div>  
50 - </div>  
51 -  
52 - <van-popup style="background: transparent;" get-container="body" v-model="showSchool" @close='closeSchool'>  
53 - <school-add @closeAdd='closeAdd'></school-add>  
54 - </van-popup>  
55 - </div>  
56 -</template>  
57 -<script>  
58 -import schoolAdd from '@/views/Travel/component/schoolAdd'  
59 -export default {  
60 - name: 'ServiceDatePackage',  
61 - data () {  
62 - return {  
63 - date: null,  
64 - defaultDate: null,  
65 - packageData: '',  
66 - showCourseData: '',  
67 - comboList: '',  
68 - Index1: 0,//选中的档期  
69 - Index2: 0,//选中的套餐  
70 - showCalendar: false,  
71 - count: 1,  
72 - days: 1,  
73 - numOne: 0,  
74 - numSecond: 0,  
75 - showSchool: false  
76 - }  
77 - },  
78 - mounted () {  
79 - localStorage.removeItem('selectedContactArr')  
80 - // date 日期  
81 - const date = this.$route.query.date;  
82 - if (date) {  
83 - this.date = date  
84 - this.defaultDate = new Date(date)  
85 - }  
86 - // 缓存中读取排期  
87 - let packageData = localStorage.getItem('packageData')  
88 - if (packageData) {  
89 - this.packageData = JSON.parse(packageData)  
90 -  
91 - console.log(this.packageData)  
92 - if (this.date) {  
93 - this.setComboList()  
94 - }  
95 - }  
96 - // 当前的商品信息  
97 - let showCourseData = localStorage.getItem('showCourseData')  
98 - if (showCourseData) {  
99 - this.showCourseData = JSON.parse(showCourseData)  
100 - }  
101 - console.log(showCourseData)  
102 - },  
103 - methods: {  
104 - // 获取库存  
105 - GetOrderPayCount (bindId) {  
106 - let showCourseData = JSON.parse(localStorage.getItem('showCourseData'))  
107 - this.mgop({  
108 - api: 'mgop.sz.hswsy.OrderPayCount', // 必须  
109 - host: 'https://mapi.zjzwfw.gov.cn/',  
110 - dataType: 'JSON',  
111 - type: 'GET',  
112 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
113 - headers: {  
114 - // 'isTestUrl': '1'  
115 - },  
116 - data: {  
117 - "bindId":bindId,  
118 - "productId": showCourseData.id,  
119 - "startDate": this.date,  
120 - },  
121 - onSuccess: res => {  
122 - if (res.data.data) {  
123 - this.numOne = res.data.data  
124 - }  
125 - },  
126 - onFail: err => {  
127 - console.log('err', err)  
128 - }  
129 - });  
130 - },  
131 - // 获取库存第二个参数  
132 - getSurplusComboCount (bindId) {  
133 - let showCourseData = JSON.parse(localStorage.getItem('showCourseData'))  
134 - this.mgop({  
135 - api: 'mgop.sz.hswsy.SurplusComboCount', // 必须  
136 - host: 'https://mapi.zjzwfw.gov.cn/',  
137 - dataType: 'JSON',  
138 - type: 'GET',  
139 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
140 - headers: {  
141 - // 'isTestUrl': '1'  
142 - },  
143 - data: {  
144 - "bindId": bindId,  
145 - "productId": showCourseData.id,  
146 - "startDate": this.date,  
147 - },  
148 - onSuccess: res => {  
149 - if (res.data.data) {  
150 - this.numSecond = res.data.data  
151 - }  
152 - },  
153 - onFail: err => {  
154 - console.log('err', err)  
155 - }  
156 - });  
157 - },  
158 - // 选择排期  
159 - choosePeriod (index) {  
160 - this.Index1 = index;  
161 - this.Index2 = 0;  
162 - let bindId = this.comboList[index].id  
163 - console.log(this.comboList[index])  
164 - this.GetOrderPayCount(bindId)  
165 - this.getSurplusComboCount(bindId)  
166 - },  
167 - // 选择套餐  
168 - choosePeriod2 (index) {  
169 - this.Index2 = index;  
170 - },  
171 - // 选择日期  
172 - chooseDate (date) {  
173 - let canChoose = false  
174 - for (let i in this.packageData) {  
175 - if (this.Moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD') == this.Moment(this.packageData[i].dayName, 'YYYY-MM-DD').format('YYYY-MM-DD')) {  
176 - canChoose = true;  
177 - }  
178 - }  
179 - if (!canChoose) {  
180 - this.$toast('当前日期无可选套餐')  
181 - return;  
182 - }  
183 - this.date = this.Moment(date, 'YYYY-MM-DD').format('YYYY-MM-DD')  
184 - this.Index1 = 0;  
185 - this.Index2 = 0;  
186 - this.showCalendar = false;  
187 - this.setComboList()  
188 - },  
189 - // 设置日历文字  
190 - formatCalendar (day) {  
191 - // console.log(day)  
192 - for (let i in this.packageData) {  
193 - if (this.Moment(day.date, 'YYYY-MM-DD').format('YYYY-MM-DD') == this.Moment(this.packageData[i].dayName, 'YYYY-MM-DD').format('YYYY-MM-DD')) {  
194 - day.bottomInfo = '¥' + this.packageData[i].comboList[0].comboInfoList[0].actualPrice;  
195 - }  
196 - }  
197 - return day;  
198 - },  
199 - // 根据日期设置套餐  
200 - setComboList () {  
201 - for (let i in this.packageData) {  
202 - if (this.Moment(this.packageData[i].dayName, 'YYYY-MM-DD').format(('YYYY-MM-DD')) == this.date) {  
203 - let comboList = this.packageData[i].comboList;  
204 - this.comboList = comboList  
205 - let bindId = comboList[this.Index1].id  
206 - this.days = this.packageData[i].days  
207 - this.GetOrderPayCount(bindId)  
208 - this.getSurplusComboCount(bindId)  
209 - break;  
210 - }  
211 - }  
212 - },  
213 - // 减少数量  
214 - countReduce () {  
215 - if (this.count > 1) {  
216 - this.count--  
217 - }  
218 - },  
219 -  
220 - checkOrder () {  
221 - if (this.count > this.numSecond) {  
222 - this.$toast('库存不足');  
223 -  
224 - } else {  
225 - const query = {  
226 - date: this.date,  
227 - count: this.count  
228 - }  
229 - localStorage.setItem('selectCombo', JSON.stringify(this.comboList[this.Index1].comboInfoList[this.Index2]))  
230 - localStorage.setItem('selectComboBindId', JSON.stringify(this.comboList[this.Index1].id))  
231 - localStorage.setItem('selectComboUnitName', this.comboList[this.Index1].unitName)  
232 - this.$router.push({ name: 'ServiceCheckOrder', query: query })  
233 - }  
234 - },  
235 - closeSchool () {  
236 - if (localStorage.getItem('schoolNames') == 'undefined' || !localStorage.getItem('schoolNames')) {  
237 - // this.showSchool = true  
238 - }  
239 - },  
240 - closeAdd () {  
241 - this.showSchool = false  
242 - }  
243 - },  
244 - components: {  
245 - schoolAdd  
246 - }  
247 -}  
248 -</script>  
249 -<style lang="scss" scoped>  
250 -#datePackage {  
251 - padding-top: 40px;  
252 - .tag_item {  
253 - padding: 22px;  
254 - .tag_title {  
255 - font-size: 34px;  
256 - font-weight: bold;  
257 - margin-top: 0;  
258 - margin-bottom: 32px;  
259 - display: flex;  
260 - align-items: center;  
261 - .pintuan_status {  
262 - font-size: 24px;  
263 - padding: 2px 10px;  
264 - background: #ffe9b1;  
265 - border-radius: 6px;  
266 - margin-left: 12px;  
267 - }  
268 - }  
269 - .package_name {  
270 - display: flex;  
271 - justify-content: space-between;  
272 - font-size: 28px;  
273 - width: 100%;  
274 - background: #f5f6fa;  
275 - border-radius: 12px;  
276 - padding: 20px 18px;  
277 - box-sizing: border-box;  
278 - margin: 0;  
279 - &.active {  
280 - background: #3f92ff;  
281 - color: #fff;  
282 - }  
283 - }  
284 - // 时间段  
285 - .period {  
286 - .period_item {  
287 - padding: 10px 20px;  
288 - font-size: 28px;  
289 - margin-bottom: 15px;  
290 - text-align: left;  
291 - background: #f5f6fa;  
292 - border-radius: 10px;  
293 - box-sizing: border-box;  
294 - &.active {  
295 - background: #3f92ff;  
296 - color: #fff;  
297 - }  
298 - }  
299 - }  
300 - .tag_title_flex {  
301 - display: flex;  
302 - justify-content: space-between;  
303 - align-items: center;  
304 - margin-bottom: 0;  
305 - padding: 50px 0;  
306 - .tag_title_right {  
307 - display: flex;  
308 - align-items: center;  
309 - }  
310 - .btn {  
311 - width: 48px;  
312 - height: 48px;  
313 - background: #f5f6fa;  
314 - border-radius: 10px;  
315 - font-size: 32px;  
316 - line-height: 48px;  
317 - text-align: center;  
318 - }  
319 - .count {  
320 - width: 100px;  
321 - text-align: center;  
322 - font-size: 32px;  
323 - }  
324 - }  
325 - .package_num {  
326 - font-size: 30px;  
327 - width: 50%;  
328 - float: right;  
329 - text-align: right;  
330 - border-radius: 12px;  
331 - padding: 0px 18px;  
332 - box-sizing: border-box;  
333 - .tint {  
334 - font-size: 30px;  
335 - font-weight: normal;  
336 - color: #909399;  
337 - }  
338 - }  
339 - }  
340 - .package_des {  
341 - margin: 0 24px;  
342 - margin-top: 28px;  
343 - padding: 20px 0;  
344 - font-size: 26px;  
345 - line-height: 40px;  
346 - color: #a9a9aa;  
347 - border-top: 1px solid #e2e7ee;  
348 - }  
349 - .Collection {  
350 - background-color: white;  
351 - position: fixed;  
352 - bottom: 0;  
353 - left: 0;  
354 - width: 100%;  
355 - padding: 28px 22px;  
356 - box-sizing: border-box;  
357 - padding-bottom: 50px;  
358 - z-index: 500;  
359 - box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.34);  
360 -  
361 - .box {  
362 - display: inline-block;  
363 - vertical-align: middle;  
364 - color: #666666;  
365 - .icon {  
366 - display: inline-block;  
367 - width: 45%;  
368 - text-align: center;  
369 - font-size: 24px;  
370 - p {  
371 - // margin: 0;  
372 - color: #999999;  
373 - margin-top: 8px;  
374 - }  
375 - i {  
376 - font-size: 48px;  
377 - color: rgb(45, 45, 45);  
378 - font-weight: bold;  
379 - }  
380 - }  
381 -  
382 - > span {  
383 - display: inline-block;  
384 - width: 100%;  
385 - line-height: 92px;  
386 - box-sizing: border-box;  
387 - border-radius: 100px;  
388 - color: white;  
389 - font-size: 32px;  
390 - background: #4092ff;  
391 - text-align: center;  
392 - box-shadow: 0px 10px 40px 0px #a0c9ff;  
393 - b {  
394 - display: inline-block;  
395 - vertical-align: middle;  
396 - margin-left: 20px;  
397 - color: white;  
398 - }  
399 - i {  
400 - vertical-align: middle;  
401 - font-size: 44px;  
402 - font-weight: bold;  
403 - }  
404 - }  
405 - }  
406 - .box1 {  
407 - width: 40%;  
408 - p {  
409 - font-size: 49px;  
410 - font-weight: bold;  
411 - color: #f64c37;  
412 - }  
413 - span {  
414 - font-size: 32px;  
415 - }  
416 - del {  
417 - font-size: 20px;  
418 - color: #999;  
419 - }  
420 - }  
421 - .box2 {  
422 - width: 60%;  
423 - }  
424 - }  
425 -}  
426 -::v-deep .van-calendar__bottom-info {  
427 - color: #f95555;  
428 -}  
429 -::v-deep .van-calendar__selected-day {  
430 - background: #ecf2fc !important;  
431 - border: 4px solid #79abff;  
432 - box-sizing: border-box;  
433 - color: #333;  
434 -}  
435 -</style>  
436 -<style lang="scss">  
437 -.elder {  
438 - #datePackage {  
439 - .tag_item {  
440 - .tag_title {  
441 - font-size: 44px;  
442 - }  
443 - .package_name {  
444 - font-size: 40px;  
445 - }  
446 - .period .period_item {  
447 - font-size: 40px;  
448 - }  
449 - .tag_title_flex .count {  
450 - font-size: 40px;  
451 - }  
452 - .package_num {  
453 - font-size: 40px;  
454 - .tint {  
455 - font-size: 40px;  
456 - }  
457 - }  
458 - }  
459 - .Collection {  
460 - .box1 p {  
461 - font-size: 56px;  
462 - span {  
463 - font-size: 40px;  
464 - }  
465 - del {  
466 - font-size: 40px;  
467 - }  
468 - }  
469 - .box > span {  
470 - font-size: 44px;  
471 - }  
472 - }  
473 - }  
474 -}  
475 -</style>  
476 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/EditContact.vue
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </template> 22 </template>
23 <script> 23 <script>
24 export default { 24 export default {
25 - data () { 25 + data() {
26 return { 26 return {
27 id: '', 27 id: '',
28 userType: '', 28 userType: '',
@@ -32,16 +32,16 @@ export default { @@ -32,16 +32,16 @@ export default {
32 gender: '', 32 gender: '',
33 travelerIdCard: '', 33 travelerIdCard: '',
34 travelerNum: '', 34 travelerNum: '',
35 - isAdd: false,//是否为新增家长(新增学生不在此页面) 35 + isAdd: false, //是否为新增家长(新增学生不在此页面)
36 } 36 }
37 }, 37 },
38 - mounted () { 38 + mounted() {
39 let editContact = JSON.parse(localStorage.getItem('editContact')) 39 let editContact = JSON.parse(localStorage.getItem('editContact'))
40 if (this.$route.query.add) { 40 if (this.$route.query.add) {
41 console.log('新增家长') 41 console.log('新增家长')
42 - this.userType = 2; 42 + this.userType = 2
43 this.userTypeName = '家长' 43 this.userTypeName = '家长'
44 - this.isAdd = true; 44 + this.isAdd = true
45 } else { 45 } else {
46 this.userType = editContact?.userType 46 this.userType = editContact?.userType
47 this.userTypeName = editContact?.userType == 1 ? '学生' : '家长' 47 this.userTypeName = editContact?.userType == 1 ? '学生' : '家长'
@@ -63,86 +63,72 @@ export default { @@ -63,86 +63,72 @@ export default {
63 }, 63 },
64 methods: { 64 methods: {
65 // 确认 65 // 确认
66 - addContact () { 66 + addContact() {
67 if (!this.gender) { 67 if (!this.gender) {
68 this.$toast('请选择性别') 68 this.$toast('请选择性别')
69 - return; 69 + return
70 } 70 }
71 if (!this.phone) { 71 if (!this.phone) {
72 this.$toast('请输入手机号') 72 this.$toast('请输入手机号')
73 - return; 73 + return
74 } 74 }
75 if (!this.checkPhone(this.phone)) { 75 if (!this.checkPhone(this.phone)) {
76 this.$toast('请输入正确的手机号') 76 this.$toast('请输入正确的手机号')
77 - return; 77 + return
78 } 78 }
79 if (!this.travelerIdCard) { 79 if (!this.travelerIdCard) {
80 - this.$toast('请输入身份证');  
81 - return; 80 + this.$toast('请输入身份证')
  81 + return
82 } 82 }
83 if (!this.checkCard(this.travelerIdCard)) { 83 if (!this.checkCard(this.travelerIdCard)) {
84 this.$toast('请输入正确的身份证号') 84 this.$toast('请输入正确的身份证号')
85 - return; 85 + return
86 } 86 }
87 let userInfo = localStorage.getItem('userInfo') 87 let userInfo = localStorage.getItem('userInfo')
88 - userInfo = userInfo ? JSON.parse(userInfo) : userInfo; 88 + userInfo = userInfo ? JSON.parse(userInfo) : userInfo
89 let postData = { 89 let postData = {
90 contactsName: this.travelerName, 90 contactsName: this.travelerName,
91 contactsMobile: this.phone, 91 contactsMobile: this.phone,
92 contactsIdCard: this.travelerIdCard, 92 contactsIdCard: this.travelerIdCard,
93 contactsType: this.userType, 93 contactsType: this.userType,
94 gender: Number(this.gender), 94 gender: Number(this.gender),
95 - loginMobile: userInfo?.phone  
96 - };  
97 - if (!this.isAdd) {//新增学生或家长  
98 - postData.userNum = this.travelerNum; 95 + loginMobile: userInfo?.phone,
  96 + }
  97 + if (!this.isAdd) {
  98 + //新增学生或家长
  99 + postData.userNum = this.travelerNum
99 } 100 }
100 this.$toast.loading({ 101 this.$toast.loading({
101 message: '加载中', 102 message: '加载中',
102 duration: 0, 103 duration: 0,
103 - forbidClick: true 104 + forbidClick: true,
104 }) 105 })
105 - this.mgop({  
106 - api: 'mgop.sz.hswsy.addContacts', // 必须  
107 - host: 'https://mapi.zjzwfw.gov.cn/',  
108 - dataType: 'JSON',  
109 - type: 'GET',  
110 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
111 - headers: {  
112 - // 'isTestUrl': '1'  
113 - },  
114 - data: postData,  
115 - onSuccess: res => {  
116 - this.$toast.clear()  
117 - if (res.data.code == 200) {  
118 - this.$toast.success('完善成功')  
119 - this.$router.back()  
120 - } else {  
121 - this.$toast.fail(res.message)  
122 - }  
123 - },  
124 - onFail: err => {  
125 - console.log('err', err) 106 + this.yxAxios.post(`${this.proxyUrl}/user/info/addContacts`, postData).then((res) => {
  107 + this.$toast.clear()
  108 + if (res.data.code == 200) {
  109 + this.$toast.success('完善成功')
  110 + this.$router.back()
  111 + } else {
  112 + this.$toast.fail(res.message)
126 } 113 }
127 - }); 114 + })
128 }, 115 },
129 - checkPhone (phone) {  
130 - if ((/^1[3456789]\d{9}$/.test(phone))) { 116 + checkPhone(phone) {
  117 + if (/^1[3456789]\d{9}$/.test(phone)) {
131 return true 118 return true
132 } else { 119 } else {
133 return false 120 return false
134 } 121 }
135 }, 122 },
136 - checkCard (card) { 123 + checkCard(card) {
137 // 18位身份证校验 124 // 18位身份证校验
138 - if ((/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(card))) { 125 + if (/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(card)) {
139 return true 126 return true
140 } else { 127 } else {
141 return false 128 return false
142 } 129 }
143 }, 130 },
144 - }  
145 - 131 + },
146 } 132 }
147 </script> 133 </script>
148 <style lang="scss" scoped> 134 <style lang="scss" scoped>
@@ -180,4 +166,4 @@ export default { @@ -180,4 +166,4 @@ export default {
180 border-radius: 45px; 166 border-radius: 45px;
181 } 167 }
182 } 168 }
183 -</style>  
184 \ No newline at end of file 169 \ No newline at end of file
  170 +</style>
src/views/Service/SelectContact.vue
1 <template> 1 <template>
2 <div id="selectContact"> 2 <div id="selectContact">
3 <div class="control"> 3 <div class="control">
4 - <div class="add_btn" @click="showAddChildPopupGroup=true"> 4 + <div class="add_btn" @click="showAddChildPopupGroup = true">
5 <van-icon name="add-o" /> 5 <van-icon name="add-o" />
6 新增学生 6 新增学生
7 </div> 7 </div>
@@ -11,21 +11,20 @@ @@ -11,21 +11,20 @@
11 </div> 11 </div>
12 </div> 12 </div>
13 <div class="box"> 13 <div class="box">
14 - <template v-for="(item,index) in contactList">  
15 - <div class="contact_item" v-if="!hideParent&&item.userType!=1||item.userType==1" :key="index"> 14 + <template v-for="(item, index) in contactList">
  15 + <div class="contact_item" v-if="(!hideParent && item.userType != 1) || item.userType == 1" :key="index">
16 <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox> 16 <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox>
17 <div class="info"> 17 <div class="info">
18 - <p class="name">{{item.travelerName}}<span v-if="!item.travelerIdCard||!item.gender">需完善</span></p>  
19 - <p class="des">{{item.userType==1?'学生':'家长'}}·{{showPhone(item.travelerMobile)}}</p> 18 + <p class="name">{{ item.travelerName }}<span v-if="!item.travelerIdCard || !item.gender">需完善</span></p>
  19 + <p class="des">{{ item.userType == 1 ? '学生' : '家长' }}·{{ showPhone(item.travelerMobile) }}</p>
20 </div> 20 </div>
21 <van-icon class="edit" name="edit" @click="editContact(index)" /> 21 <van-icon class="edit" name="edit" @click="editContact(index)" />
22 </div> 22 </div>
23 </template> 23 </template>
24 -  
25 </div> 24 </div>
26 <van-button class="btn" type="primary" @click="selectContact">确定</van-button> 25 <van-button class="btn" type="primary" @click="selectContact">确定</van-button>
27 <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> 26 <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup">
28 - <AddChildPopupGroup @complete="complete" step='1'></AddChildPopupGroup> 27 + <AddChildPopupGroup @complete="complete" step="1"></AddChildPopupGroup>
29 </van-popup> 28 </van-popup>
30 </div> 29 </div>
31 </template> 30 </template>
@@ -33,64 +32,48 @@ @@ -33,64 +32,48 @@
33 import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup' 32 import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup'
34 import IdentityCodeValid from '@/common/validateIdent' 33 import IdentityCodeValid from '@/common/validateIdent'
35 export default { 34 export default {
36 - data () { 35 + data() {
37 return { 36 return {
38 - limit: '',//数量 37 + limit: '', //数量
39 hideParent: false, 38 hideParent: false,
40 contactList: [], 39 contactList: [],
41 - showAddChildPopupGroup: false 40 + showAddChildPopupGroup: false,
42 } 41 }
43 }, 42 },
44 - mounted () {  
45 - this.limit = this.$route.query.limit;  
46 - this.hideParent = this.$route.query.hideParent ? true : false; 43 + mounted() {
  44 + this.limit = this.$route.query.limit
  45 + this.hideParent = this.$route.query.hideParent ? true : false
47 this.getContactList() 46 this.getContactList()
48 }, 47 },
49 methods: { 48 methods: {
50 // 获取联系人列表 49 // 获取联系人列表
51 - getContactList () { 50 + getContactList() {
52 this.$toast.loading({ 51 this.$toast.loading({
53 message: '加载中...', 52 message: '加载中...',
54 duration: 0, 53 duration: 0,
55 - forbidClick: true 54 + forbidClick: true,
56 }) 55 })
57 - this.mgop({  
58 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
59 - host: 'https://mapi.zjzwfw.gov.cn/',  
60 - dataType: 'JSON',  
61 - type: 'GET',  
62 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
63 - headers: {  
64 - // 'isTestUrl': '1'  
65 - },  
66 - data: {  
67 - "userNum": localStorage.getItem('centerNo')  
68 - },  
69 - onSuccess: res => {  
70 - console.log('联系人列表:', res)  
71 - this.$toast.clear()  
72 - if (res.data.code == 200) {  
73 - let userInfo = res.data.data.userInfo;  
74 - let contactList = userInfo.subUsers  
75 - // 把家长添加到列表  
76 - contactList.unshift({  
77 - travelerMobile: userInfo?.phone,  
78 - travelerNum: userInfo?.centerNo,  
79 - travelerIdCard: userInfo?.idCard,  
80 - userType: 2,  
81 - travelerName: userInfo?.nickName,  
82 - gender: userInfo?.gender,  
83 - })  
84 - this.contactList = contactList  
85 - }  
86 - },  
87 - onFail: err => {  
88 - console.log('err', err) 56 + this.yxAxios.get(`${this.proxyUrl}/user/info/getPortalUserByNum?userNum=${localStorage.getItem('centerNo')}`).then((res) => {
  57 + console.log('联系人列表:', res)
  58 + this.$toast.clear()
  59 + if (res.data.code == 200) {
  60 + let userInfo = res.data.data.userInfo
  61 + let contactList = userInfo.subUsers
  62 + // 把家长添加到列表
  63 + contactList.unshift({
  64 + travelerMobile: userInfo?.phone,
  65 + travelerNum: userInfo?.centerNo,
  66 + travelerIdCard: userInfo?.idCard,
  67 + userType: 2,
  68 + travelerName: userInfo?.nickName,
  69 + gender: userInfo?.gender,
  70 + })
  71 + this.contactList = contactList
89 } 72 }
90 - }); 73 + })
91 }, 74 },
92 // 修改联系人 75 // 修改联系人
93 - editContact (index) { 76 + editContact(index) {
94 let contactItem = this.contactList[index] 77 let contactItem = this.contactList[index]
95 let editContact = { 78 let editContact = {
96 travelerMobile: contactItem.travelerMobile, 79 travelerMobile: contactItem.travelerMobile,
@@ -104,25 +87,25 @@ export default { @@ -104,25 +87,25 @@ export default {
104 this.$router.push({ name: 'EditContact' }) 87 this.$router.push({ name: 'EditContact' })
105 }, 88 },
106 // 添加家长 89 // 添加家长
107 - addContact () { 90 + addContact() {
108 this.$router.push({ name: 'EditContact', query: { add: 1 } }) 91 this.$router.push({ name: 'EditContact', query: { add: 1 } })
109 }, 92 },
110 - complete () {  
111 - this.showAddChildPopupGroup = false; 93 + complete() {
  94 + this.showAddChildPopupGroup = false
112 this.getContactList() 95 this.getContactList()
113 }, 96 },
114 // 选择联系人完成 97 // 选择联系人完成
115 - selectContact () {  
116 - let contactList = this.contactList;  
117 - let selectedArr = []; 98 + selectContact() {
  99 + let contactList = this.contactList
  100 + let selectedArr = []
118 for (let i in contactList) { 101 for (let i in contactList) {
119 if (contactList[i]?.checked) { 102 if (contactList[i]?.checked) {
120 if ((!contactList[i].travelerIdCard || !contactList[i].gender) && !this.hideParent) { 103 if ((!contactList[i].travelerIdCard || !contactList[i].gender) && !this.hideParent) {
121 this.$toast('请先完善您选择的出行人信息') 104 this.$toast('请先完善您选择的出行人信息')
122 - return; 105 + return
123 } else if (!IdentityCodeValid(contactList[i].travelerIdCard)) { 106 } else if (!IdentityCodeValid(contactList[i].travelerIdCard)) {
124 this.$toast(`${contactList[i].travelerName}的身份证有误,请重新完善修改`) 107 this.$toast(`${contactList[i].travelerName}的身份证有误,请重新完善修改`)
125 - return; 108 + return
126 } else { 109 } else {
127 selectedArr.push({ 110 selectedArr.push({
128 travelerName: contactList[i].travelerName, 111 travelerName: contactList[i].travelerName,
@@ -136,7 +119,7 @@ export default { @@ -136,7 +119,7 @@ export default {
136 } 119 }
137 console.log(this.limit, selectedArr.length) 120 console.log(this.limit, selectedArr.length)
138 // 判断是否选择学生 121 // 判断是否选择学生
139 - let hasStudent = false; 122 + let hasStudent = false
140 for (let i in selectedArr) { 123 for (let i in selectedArr) {
141 if (selectedArr[i].userType == 1) { 124 if (selectedArr[i].userType == 1) {
142 hasStudent = true 125 hasStudent = true
@@ -146,22 +129,21 @@ export default { @@ -146,22 +129,21 @@ export default {
146 this.$dialog.alert({ 129 this.$dialog.alert({
147 title: '温馨提示', 130 title: '温馨提示',
148 message: '活动参与主体为学生本人,请选择出行学生!未绑定学生,请新增出行学生进行添加。', 131 message: '活动参与主体为学生本人,请选择出行学生!未绑定学生,请新增出行学生进行添加。',
149 - confirmButtonColor: '#3385FF' 132 + confirmButtonColor: '#3385FF',
150 }) 133 })
151 - return; 134 + return
152 } 135 }
153 // console.log(selectedArr) 136 // console.log(selectedArr)
154 localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr)) 137 localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr))
155 this.$router.back() 138 this.$router.back()
156 }, 139 },
157 - showPhone(phone){  
158 - return phone.replace(/^(\d{3})\d{4}(\d+)/,"$1****$2")  
159 - } 140 + showPhone(phone) {
  141 + return phone.replace(/^(\d{3})\d{4}(\d+)/, '$1****$2')
  142 + },
160 }, 143 },
161 components: { 144 components: {
162 - AddChildPopupGroup  
163 - }  
164 - 145 + AddChildPopupGroup,
  146 + },
165 } 147 }
166 </script> 148 </script>
167 <style lang="scss" scoped> 149 <style lang="scss" scoped>
@@ -266,4 +248,4 @@ export default { @@ -266,4 +248,4 @@ export default {
266 } 248 }
267 } 249 }
268 } 250 }
269 -</style>  
270 \ No newline at end of file 251 \ No newline at end of file
  252 +</style>
src/views/Service/ServiceBaseKQ.vue
1 <template> 1 <template>
2 <div id="serviceKQ"> 2 <div id="serviceKQ">
3 - <div v-show="tabName == 'ZZY'">  
4 - <div class="container" style="top:0">  
5 - <van-swipe class="service_swipe" :loop="true" :show-indicators="false">  
6 - <!-- <van-swipe-item @click="handleBanner"> -->  
7 - <van-swipe-item>  
8 - <img style="width:100vw" src="@/assets/service/banner3.jpg" alt="" />  
9 - </van-swipe-item>  
10 - </van-swipe>  
11 - <img class="card_zzy" src="@/assets/service/card_zzy.png" alt="" @click="handleMyCard" />  
12 - <img class="order_btn" src="@/assets/service/order.png" alt="" @click="handleMyOrder" />  
13 - <van-pull-refresh v-model="loading" @refresh="onRefresh('campList')">  
14 - <ServiceListFour :list="campList" :notab="false"></ServiceListFour>  
15 - </van-pull-refresh>  
16 - </div> 3 + <div class="swipeDiv">
  4 + <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  5 + <van-swipe-item>
  6 + <img src="@/assets/keqiao/kq_main1.png" style="width:100%;height:100%" />
  7 + </van-swipe-item>
  8 + <van-swipe-item>
  9 + <img src="@/assets/keqiao/kq_main2.png" style="width:100%;height:100%" />
  10 + </van-swipe-item>
  11 + </van-swipe>
17 </div> 12 </div>
18 - <div v-show="tabName == 'KQ'">  
19 - <div class="swipeDiv">  
20 - <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">  
21 - <van-swipe-item>  
22 - <img src="@/assets/keqiao/kq_main1.png" style="width:100%;height:100%" />  
23 - </van-swipe-item>  
24 - <van-swipe-item>  
25 - <img src="@/assets/keqiao/kq_main2.png" style="width:100%;height:100%" />  
26 - </van-swipe-item>  
27 - </van-swipe>  
28 - </div>  
29 - <div class="container" style="margin-bottom:10">  
30 - <!-- 顶部搜索、扫一扫、个人中心 -->  
31 - <van-sticky>  
32 - <!-- <div class="top_tool"> 13 + <div class="container" style="margin-bottom:10">
  14 + <!-- 顶部搜索、扫一扫、个人中心 -->
  15 + <van-sticky>
  16 + <!-- <div class="top_tool">
33 <van-search class="search" v-model="search" shape="round" background="transparent" left-icon="" right-icon="search" placeholder="搜索活动、研学旅行、服务" @search="onSearch" /> 17 <van-search class="search" v-model="search" shape="round" background="transparent" left-icon="" right-icon="search" placeholder="搜索活动、研学旅行、服务" @search="onSearch" />
34 </div> --> 18 </div> -->
35 - <div class="redLink" @click="handleRedLink">  
36 - <img src="@/assets/keqiao/redlink.png" alt="" />  
37 - </div>  
38 - </van-sticky>  
39 - <div class="tabsCard">  
40 - <van-tabs v-model="active" sticky offset-top="19.73vw" z-index="100" :ellipsis="false" :before-change="beforeChange" ref="tabs">  
41 - <van-tab title="革命遗址">  
42 - <van-pull-refresh v-model="loading" @refresh="onRefresh('uniList')">  
43 - <ServiceListThird :list="uniList" :notab="true"></ServiceListThird>  
44 - </van-pull-refresh>  
45 - </van-tab>  
46 - <van-tab title="文化传承">  
47 - <van-pull-refresh v-model="loading" @refresh="onRefresh('weekList')">  
48 - <ServiceListThird :list="weekList" :notab="true"></ServiceListThird>  
49 - </van-pull-refresh>  
50 - </van-tab>  
51 - <van-tab title="红色军旅">  
52 - <van-pull-refresh v-model="loading" @refresh="onRefresh('cityList')">  
53 - <ServiceListThird :list="cityList" :notab="true"></ServiceListThird>  
54 - </van-pull-refresh>  
55 - </van-tab>  
56 - <van-tab title="共同富裕">  
57 - <van-pull-refresh v-model="loading" @refresh="onRefresh('selectList')">  
58 - <ServiceListThird :list="selectList" :notab="true"></ServiceListThird>  
59 - </van-pull-refresh>  
60 - </van-tab>  
61 - <van-tab title="大好河山">  
62 - <van-pull-refresh v-model="loading" @refresh="onRefresh('riverList')">  
63 - <ServiceListThird :list="riverList" :notab="true"></ServiceListThird>  
64 - </van-pull-refresh>  
65 - </van-tab>  
66 - </van-tabs> 19 + <div class="redLink" @click="handleRedLink">
  20 + <img src="@/assets/keqiao/redlink.png" alt="" />
67 </div> 21 </div>
  22 + </van-sticky>
  23 + <div class="tabsCard">
  24 + <van-tabs v-model="active" sticky offset-top="19.73vw" z-index="100" :ellipsis="false" :before-change="beforeChange" ref="tabs">
  25 + <van-tab title="革命遗址">
  26 + <van-pull-refresh v-model="loading" @refresh="onRefresh('uniList')">
  27 + <ServiceListThird :list="uniList" :notab="true"></ServiceListThird>
  28 + </van-pull-refresh>
  29 + </van-tab>
  30 + <van-tab title="文化传承">
  31 + <van-pull-refresh v-model="loading" @refresh="onRefresh('weekList')">
  32 + <ServiceListThird :list="weekList" :notab="true"></ServiceListThird>
  33 + </van-pull-refresh>
  34 + </van-tab>
  35 + <van-tab title="红色军旅">
  36 + <van-pull-refresh v-model="loading" @refresh="onRefresh('cityList')">
  37 + <ServiceListThird :list="cityList" :notab="true"></ServiceListThird>
  38 + </van-pull-refresh>
  39 + </van-tab>
  40 + <van-tab title="共同富裕">
  41 + <van-pull-refresh v-model="loading" @refresh="onRefresh('selectList')">
  42 + <ServiceListThird :list="selectList" :notab="true"></ServiceListThird>
  43 + </van-pull-refresh>
  44 + </van-tab>
  45 + <van-tab title="大好河山">
  46 + <van-pull-refresh v-model="loading" @refresh="onRefresh('riverList')">
  47 + <ServiceListThird :list="riverList" :notab="true"></ServiceListThird>
  48 + </van-pull-refresh>
  49 + </van-tab>
  50 + </van-tabs>
68 </div> 51 </div>
69 </div> 52 </div>
70 53
@@ -135,16 +118,8 @@ export default { @@ -135,16 +118,8 @@ export default {
135 // 革命遗址 118 // 革命遗址
136 getUniList() { 119 getUniList() {
137 this.$toast.loading() 120 this.$toast.loading()
138 - this.mgop({  
139 - api: 'mgop.sz.hswsy.qxyList', // 必须  
140 - host: 'https://mapi.zjzwfw.gov.cn/',  
141 - dataType: 'JSON',  
142 - type: 'POST',  
143 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
144 - headers: {  
145 - // 'isTestUrl': '1'  
146 - },  
147 - data: { 121 + this.yxAxios
  122 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
148 area: '', 123 area: '',
149 province: '', 124 province: '',
150 city: '', 125 city: '',
@@ -153,10 +128,9 @@ export default { @@ -153,10 +128,9 @@ export default {
153 productTypeId: 'BQ0001', 128 productTypeId: 'BQ0001',
154 businessTypeId: 'BQ0001', 129 businessTypeId: 'BQ0001',
155 channelCode: '', 130 channelCode: '',
156 - },  
157 - onSuccess: (data) => {  
158 - this.$toast.clear()  
159 - let uniList = data.data.data 131 + })
  132 + .then((res) => {
  133 + let uniList = res.data.data
160 for (let i in uniList) { 134 for (let i in uniList) {
161 uniList[i].course_labels = uniList[i].course_labels?.split(',') 135 uniList[i].course_labels = uniList[i].course_labels?.split(',')
162 if (uniList[i].startDate) { 136 if (uniList[i].startDate) {
@@ -167,25 +141,14 @@ export default { @@ -167,25 +141,14 @@ export default {
167 } 141 }
168 this.loading = false 142 this.loading = false
169 this.uniList = uniList 143 this.uniList = uniList
170 - console.log('革命遗址:', data)  
171 - },  
172 - onFail: (err) => {  
173 - console.log('err', err)  
174 - },  
175 - }) 144 + console.log('革命遗址:', uniList)
  145 + })
176 }, 146 },
177 // 文化传承 147 // 文化传承
178 getWeekList() { 148 getWeekList() {
179 - this.mgop({  
180 - api: 'mgop.sz.hswsy.qxyList', // 必须  
181 - host: 'https://mapi.zjzwfw.gov.cn/',  
182 - dataType: 'JSON',  
183 - type: 'POST',  
184 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
185 - headers: {  
186 - // 'isTestUrl': '1'  
187 - },  
188 - data: { 149 + this.$toast.loading()
  150 + this.yxAxios
  151 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
189 area: '', 152 area: '',
190 province: '', 153 province: '',
191 city: '', 154 city: '',
@@ -194,9 +157,9 @@ export default { @@ -194,9 +157,9 @@ export default {
194 productTypeId: 'BQ0002', 157 productTypeId: 'BQ0002',
195 businessTypeId: 'BQ0001', 158 businessTypeId: 'BQ0001',
196 channelCode: '', 159 channelCode: '',
197 - },  
198 - onSuccess: (data) => {  
199 - let weekList = data.data.data 160 + })
  161 + .then((res) => {
  162 + let weekList = res.data.data
200 for (let i in weekList) { 163 for (let i in weekList) {
201 weekList[i].course_labels = weekList[i].course_labels?.split(',') 164 weekList[i].course_labels = weekList[i].course_labels?.split(',')
202 if (weekList[i].startDate) { 165 if (weekList[i].startDate) {
@@ -208,24 +171,13 @@ export default { @@ -208,24 +171,13 @@ export default {
208 this.loading = false 171 this.loading = false
209 this.weekList = weekList 172 this.weekList = weekList
210 console.log('文化传承:', weekList) 173 console.log('文化传承:', weekList)
211 - },  
212 - onFail: (err) => {  
213 - console.log('err', err)  
214 - },  
215 - }) 174 + })
216 }, 175 },
217 // 红色军旅 176 // 红色军旅
218 getCityList() { 177 getCityList() {
219 - this.mgop({  
220 - api: 'mgop.sz.hswsy.qxyList', // 必须  
221 - host: 'https://mapi.zjzwfw.gov.cn/',  
222 - dataType: 'JSON',  
223 - type: 'POST',  
224 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
225 - headers: {  
226 - // 'isTestUrl': '1'  
227 - },  
228 - data: { 178 + this.$toast.loading()
  179 + this.yxAxios
  180 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
229 area: '', 181 area: '',
230 province: '', 182 province: '',
231 city: '', 183 city: '',
@@ -234,9 +186,9 @@ export default { @@ -234,9 +186,9 @@ export default {
234 productTypeId: 'BQ0003', 186 productTypeId: 'BQ0003',
235 businessTypeId: 'BQ0001', 187 businessTypeId: 'BQ0001',
236 channelCode: '', 188 channelCode: '',
237 - },  
238 - onSuccess: (data) => {  
239 - let cityList = data.data.data 189 + })
  190 + .then((res) => {
  191 + let cityList = res.data.data
240 for (let i in cityList) { 192 for (let i in cityList) {
241 cityList[i].course_labels = cityList[i].course_labels?.split(',') 193 cityList[i].course_labels = cityList[i].course_labels?.split(',')
242 if (cityList[i].startDate) { 194 if (cityList[i].startDate) {
@@ -248,24 +200,13 @@ export default { @@ -248,24 +200,13 @@ export default {
248 this.loading = false 200 this.loading = false
249 this.cityList = cityList 201 this.cityList = cityList
250 console.log('红色军旅:', cityList) 202 console.log('红色军旅:', cityList)
251 - },  
252 - onFail: (err) => {  
253 - console.log('err', err)  
254 - },  
255 - }) 203 + })
256 }, 204 },
257 // 乡村振新 205 // 乡村振新
258 getSelectList() { 206 getSelectList() {
259 - this.mgop({  
260 - api: 'mgop.sz.hswsy.qxyList', // 必须  
261 - host: 'https://mapi.zjzwfw.gov.cn/',  
262 - dataType: 'JSON',  
263 - type: 'POST',  
264 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
265 - headers: {  
266 - // 'isTestUrl': '1'  
267 - },  
268 - data: { 207 + this.$toast.loading()
  208 + this.yxAxios
  209 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
269 area: '', 210 area: '',
270 province: '', 211 province: '',
271 city: '', 212 city: '',
@@ -274,9 +215,9 @@ export default { @@ -274,9 +215,9 @@ export default {
274 productTypeId: 'BQ0004', 215 productTypeId: 'BQ0004',
275 businessTypeId: 'BQ0001', 216 businessTypeId: 'BQ0001',
276 channelCode: '', 217 channelCode: '',
277 - },  
278 - onSuccess: (data) => {  
279 - let selectList = data.data.data 218 + })
  219 + .then((res) => {
  220 + let selectList = res.data.data
280 for (let i in selectList) { 221 for (let i in selectList) {
281 selectList[i].course_labels = selectList[i].course_labels?.split(',') 222 selectList[i].course_labels = selectList[i].course_labels?.split(',')
282 if (selectList[i].startDate) { 223 if (selectList[i].startDate) {
@@ -288,24 +229,13 @@ export default { @@ -288,24 +229,13 @@ export default {
288 this.loading = false 229 this.loading = false
289 this.selectList = selectList 230 this.selectList = selectList
290 console.log('乡村振新:', selectList) 231 console.log('乡村振新:', selectList)
291 - },  
292 - onFail: (err) => {  
293 - console.log('err', err)  
294 - },  
295 - }) 232 + })
296 }, 233 },
297 // 大好河山 234 // 大好河山
298 getRiverList() { 235 getRiverList() {
299 - this.mgop({  
300 - api: 'mgop.sz.hswsy.qxyList', // 必须  
301 - host: 'https://mapi.zjzwfw.gov.cn/',  
302 - dataType: 'JSON',  
303 - type: 'POST',  
304 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
305 - headers: {  
306 - // 'isTestUrl': '1'  
307 - },  
308 - data: { 236 + this.$toast.loading()
  237 + this.yxAxios
  238 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
309 area: '', 239 area: '',
310 province: '', 240 province: '',
311 city: '', 241 city: '',
@@ -314,9 +244,9 @@ export default { @@ -314,9 +244,9 @@ export default {
314 productTypeId: 'BQ0005', 244 productTypeId: 'BQ0005',
315 businessTypeId: 'BQ0001', 245 businessTypeId: 'BQ0001',
316 channelCode: '', 246 channelCode: '',
317 - },  
318 - onSuccess: (data) => {  
319 - let riverList = data.data.data 247 + })
  248 + .then((res) => {
  249 + let riverList = res.data.data
320 for (let i in riverList) { 250 for (let i in riverList) {
321 riverList[i].course_labels = riverList[i].course_labels?.split(',') 251 riverList[i].course_labels = riverList[i].course_labels?.split(',')
322 if (riverList[i].startDate) { 252 if (riverList[i].startDate) {
@@ -328,25 +258,14 @@ export default { @@ -328,25 +258,14 @@ export default {
328 this.loading = false 258 this.loading = false
329 this.riverList = riverList 259 this.riverList = riverList
330 console.log('大好河山:', riverList) 260 console.log('大好河山:', riverList)
331 - },  
332 - onFail: (err) => {  
333 - console.log('err', err)  
334 - },  
335 - }) 261 + })
336 }, 262 },
337 263
338 // 每周一营 6 264 // 每周一营 6
339 getCampList() { 265 getCampList() {
340 - this.mgop({  
341 - api: 'mgop.sz.hswsy.qxyList', // 必须  
342 - host: 'https://mapi.zjzwfw.gov.cn/',  
343 - dataType: 'JSON',  
344 - type: 'POST',  
345 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
346 - headers: {  
347 - // 'isTestUrl': '1'  
348 - },  
349 - data: { 266 + this.$toast.loading()
  267 + this.yxAxios
  268 + .post(`${this.yanxueUrl}/api/StudiesWap/SpecialCourse/List`, {
350 area: '', 269 area: '',
351 province: '', 270 province: '',
352 city: '', 271 city: '',
@@ -355,9 +274,9 @@ export default { @@ -355,9 +274,9 @@ export default {
355 productTypeId: 'ZZY001', 274 productTypeId: 'ZZY001',
356 businessTypeId: 'JY0004', 275 businessTypeId: 'JY0004',
357 channelCode: 'GZH002', 276 channelCode: 'GZH002',
358 - },  
359 - onSuccess: (data) => {  
360 - let campList = data.data.data 277 + })
  278 + .then((res) => {
  279 + let campList = res.data.data
361 for (let i in campList) { 280 for (let i in campList) {
362 campList[i].course_labels = campList[i].course_labels?.split(',') 281 campList[i].course_labels = campList[i].course_labels?.split(',')
363 if (campList[i].startDate) { 282 if (campList[i].startDate) {
@@ -368,12 +287,8 @@ export default { @@ -368,12 +287,8 @@ export default {
368 } 287 }
369 this.loading = false 288 this.loading = false
370 this.campList = campList 289 this.campList = campList
371 - console.log('每周一营:', data)  
372 - },  
373 - onFail: (err) => {  
374 - console.log('err', err)  
375 - },  
376 - }) 290 + console.log('每周一营:', campList)
  291 + })
377 }, 292 },
378 beforeChange(index) { 293 beforeChange(index) {
379 // if (index != 0 && index != 1 && index != 2) { 294 // if (index != 0 && index != 1 && index != 2) {
@@ -389,11 +304,6 @@ export default { @@ -389,11 +304,6 @@ export default {
389 handleMyOrder() { 304 handleMyOrder() {
390 this.$router.push({ name: 'ServiceOrderXST' }) 305 this.$router.push({ name: 'ServiceOrderXST' })
391 }, 306 },
392 - // 我的优惠券  
393 - handleMyCard() {  
394 - // this.$toast('暂未开放,敬请期待!');  
395 - this.$router.push({ name: 'CardBoxXST', query: { active: 1 } })  
396 - },  
397 formatWeek(week) { 307 formatWeek(week) {
398 return week == 1 308 return week == 1
399 ? '周一' 309 ? '周一'
@@ -417,7 +327,7 @@ export default { @@ -417,7 +327,7 @@ export default {
417 }, 327 },
418 handleRedLink() { 328 handleRedLink() {
419 let isWechat = localStorage.getItem('isWechat') 329 let isWechat = localStorage.getItem('isWechat')
420 - if (isWechat==1) { 330 + if (isWechat == 1) {
421 return 331 return
422 } else { 332 } else {
423 location.href = 'https://www.wasee.com/wt/b46pjfuln&ua=WaseeVRAndroid' 333 location.href = 'https://www.wasee.com/wt/b46pjfuln&ua=WaseeVRAndroid'
src/views/Service/ServiceKQ.vue
@@ -41,14 +41,14 @@ export default { @@ -41,14 +41,14 @@ export default {
41 let centerNo = localStorage.getItem('centerNo') 41 let centerNo = localStorage.getItem('centerNo')
42 let ticket = this.common.getUrlParam('ticket') //浙里办app访问 42 let ticket = this.common.getUrlParam('ticket') //浙里办app访问
43 let ticketId = this.common.getUrlParam('ticketId') //浙里办微信小程序访问 43 let ticketId = this.common.getUrlParam('ticketId') //浙里办微信小程序访问
44 - // alert(location.href)  
45 - // alert(ticketId)  
46 - if (centerNo) {  
47 - // alert('有中台编号:' + centerNo)  
48 - this.centerNo = centerNo  
49 - localStorage.setItem('centerNo', centerNo)  
50 - this.getUserInfo()  
51 - } else if (ticket) { 44 + console.log(ticket,ticketId)
  45 + // if (centerNo) {
  46 + // // alert('有中台编号:' + centerNo)
  47 + // this.centerNo = centerNo
  48 + // localStorage.setItem('centerNo', centerNo)
  49 + // this.getUserInfo()
  50 + // } else
  51 + if (ticket) {
52 this.getCenterByTicket(ticket) 52 this.getCenterByTicket(ticket)
53 } else if (ticketId) { 53 } else if (ticketId) {
54 // alert('getCenterByTicketId') 54 // alert('getCenterByTicketId')
@@ -77,65 +77,29 @@ export default { @@ -77,65 +77,29 @@ export default {
77 }, 77 },
78 // 通过ticket获取centerNo 78 // 通过ticket获取centerNo
79 getCenterByTicket(ticket) { 79 getCenterByTicket(ticket) {
80 - this.mgop({  
81 - api: 'mgop.sz.hswsy.getCenterNo', // 必须  
82 - host: 'https://mapi.zjzwfw.gov.cn/',  
83 - dataType: 'JSON',  
84 - type: 'GET',  
85 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
86 - headers: {  
87 - // 'isTestUrl': '1'  
88 - },  
89 - data: {  
90 - ticket: ticket,  
91 - },  
92 - onSuccess: (res) => {  
93 - console.log('通过ticket获取centerNo成功:', res)  
94 - // alert('通过ticket获取centerNo成功:' + res.data.message)  
95 - if (res.data.code == 200) {  
96 - this.centerNo = res.data.message  
97 - localStorage.setItem('centerNo', res.data.message)  
98 - this.getUserInfo()  
99 - } else {  
100 - this.reLoad()  
101 - }  
102 - },  
103 - onFail: (err) => {  
104 - // alert('通过ticket获取centerNo失败:' + JSON.stringify(err))  
105 - console.log('通过ticket获取centerNo失败:', JSON.stringify(err)) 80 + this.yxAxios.get(`${this.proxyUrl}/api/third/getCenterNo?ticket=${ticket}`).then((res) => {
  81 + console.log('通过ticket获取centerNo成功:', res)
  82 + if (res.data.code == 200) {
  83 + this.centerNo = res.data.message
  84 + localStorage.setItem('centerNo', res.data.message)
  85 + this.getUserInfo()
  86 + } else {
106 this.reLoad() 87 this.reLoad()
107 - }, 88 + }
108 }) 89 })
109 }, 90 },
110 // 通过ticketId获取centerNo 91 // 通过ticketId获取centerNo
111 getCenterByTicketId(ticketId) { 92 getCenterByTicketId(ticketId) {
112 // alert(ticketId) 93 // alert(ticketId)
113 - this.mgop({  
114 - api: 'mgop.sz.hswsy.getCenterNoWx', // 必须  
115 - host: 'https://mapi.zjzwfw.gov.cn/',  
116 - dataType: 'JSON',  
117 - type: 'GET',  
118 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
119 - headers: {  
120 - // 'isTestUrl': '1'  
121 - },  
122 - data: {  
123 - ticket: ticketId,  
124 - },  
125 - onSuccess: (res) => {  
126 - // alert('通过ticketId获取centerNo Success:' + res.data.message)  
127 - if (res.data.code == 200) {  
128 - // this.centerNo = res.data.message  
129 - localStorage.setItem('centerNo', res.data.message)  
130 - this.getUserInfo()  
131 - } else {  
132 - this.getUserInfo()  
133 - }  
134 - },  
135 - onFail: (err) => {  
136 - // alert('通过ticket获取centerNo Fail:' + JSON.stringify(err))  
137 - // this.reLoad()  
138 - }, 94 + this.yxAxios.get(`${this.proxyUrl}/api/third/getCenterNoWx?ticket=${ticketId}`).then((res) => {
  95 + console.log('通过ticket获取centerNo成功:', res)
  96 + if (res.data.code == 200) {
  97 + this.centerNo = res.data.message
  98 + localStorage.setItem('centerNo', res.data.message)
  99 + this.getUserInfo()
  100 + } else {
  101 + this.reLoad()
  102 + }
139 }) 103 })
140 }, 104 },
141 reLoad() { 105 reLoad() {
@@ -170,30 +134,16 @@ export default { @@ -170,30 +134,16 @@ export default {
170 } 134 }
171 }, 135 },
172 // 获取用户信息 136 // 获取用户信息
173 - getUserInfo: function() { 137 + getUserInfo() {
174 this.centerNo = localStorage.getItem('centerNo') 138 this.centerNo = localStorage.getItem('centerNo')
175 // alert('getUserInfo:' + this.centerNo) 139 // alert('getUserInfo:' + this.centerNo)
176 - this.mgop({  
177 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
178 - // host: 'https://mapi.zjzwfw.gov.cn/',  
179 - // dataType: 'JSON',  
180 - // type: 'GET',  
181 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
182 - headers: {  
183 - // 'isTestUrl': '1'  
184 - },  
185 - data: {  
186 - userNum: localStorage.getItem('centerNo'),  
187 - },  
188 - onSuccess: (res) => {  
189 - // alert('getUserInfo success:' + JSON.stringify(res))  
190 - if (res.data.code == 200) {  
191 - localStorage.setItem('userInfo', JSON.stringify(res.data.data.userInfo))  
192 - }  
193 - },  
194 - onFail: (err) => {  
195 - // alert('getUserInfo fail:' + JSON.stringify(err))  
196 - }, 140 + this.yxAxios.get(`${this.proxyUrl}/user/info/getPortalUserByNum?userNum=${localStorage.getItem('centerNo')}`).then((res) => {
  141 + console.log('获取用户信息getPortalUserByNum:', res)
  142 + if (res.data.code == 200) {
  143 + localStorage.setItem('userInfo', JSON.stringify(res.data.data.userInfo))
  144 + this.userInfo = res.data.data.userInfo
  145 +
  146 + }
197 }) 147 })
198 }, 148 },
199 }, 149 },
src/views/Service/ServiceOrderXST.vue
@@ -119,22 +119,9 @@ export default { @@ -119,22 +119,9 @@ export default {
119 }, 119 },
120 //获取待评价 120 //获取待评价
121 onLoadCareer () { 121 onLoadCareer () {
122 - this.mgop({  
123 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
124 - host: 'https://mapi.zjzwfw.gov.cn/',  
125 - dataType: 'JSON',  
126 - type: 'GET',  
127 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
128 - headers: {  
129 - // 'isTestUrl': '1'  
130 - },  
131 - data: {  
132 - "userId": localStorage.getItem('centerNo'),  
133 - "type": 3,  
134 - "page": 1,  
135 - "pageSize": 999  
136 - },  
137 - onSuccess: res => { 122 + this.yxAxios
  123 + .get(`${this.yanxueUrl}/api/StudiesWap/GetOrderPayList?userId=${localStorage.getItem('centerNo')}&type=${3}&page=1&pageSize=999`)
  124 + .then((res) => {
138 console.log('待评价:', res) 125 console.log('待评价:', res)
139 if (res.data.status == 1) { 126 if (res.data.status == 1) {
140 this.datalist = res.data.data.list; 127 this.datalist = res.data.data.list;
@@ -143,30 +130,13 @@ export default { @@ -143,30 +130,13 @@ export default {
143 } else { 130 } else {
144 this.$toast.fail(res.data.message); 131 this.$toast.fail(res.data.message);
145 } 132 }
146 - },  
147 - onFail: err => {  
148 - console.log('err', err)  
149 - }  
150 - }); 133 + })
151 }, 134 },
152 //获取已评价 135 //获取已评价
153 onLoad () { 136 onLoad () {
154 - this.mgop({  
155 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
156 - host: 'https://mapi.zjzwfw.gov.cn/',  
157 - dataType: 'JSON',  
158 - type: 'GET',  
159 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
160 - headers: {  
161 - // 'isTestUrl': '1'  
162 - },  
163 - data: {  
164 - "userId": localStorage.getItem('centerNo'),  
165 - "type": 4,  
166 - "page": 1,  
167 - "pageSize": 999  
168 - },  
169 - onSuccess: res => { 137 + this.yxAxios
  138 + .get(`${this.yanxueUrl}/api/StudiesWap/GetOrderPayList?userId=${localStorage.getItem('centerNo')}&type=${4}&page=1&pageSize=999`)
  139 + .then((res) => {
170 console.log('已评价:', res) 140 console.log('已评价:', res)
171 if (res.data.status == 1) { 141 if (res.data.status == 1) {
172 this.list = res.data.data.list; 142 this.list = res.data.data.list;
@@ -175,11 +145,7 @@ export default { @@ -175,11 +145,7 @@ export default {
175 } else { 145 } else {
176 this.$toast.fail(res.data.message); 146 this.$toast.fail(res.data.message);
177 } 147 }
178 - },  
179 - onFail: err => {  
180 - console.log('err', err)  
181 - }  
182 - }); 148 + })
183 }, 149 },
184 //评价 150 //评价
185 evaluate (item) { 151 evaluate (item) {
src/views/Service/component/AbroadDetail/AbroadBase.vue
@@ -4,10 +4,8 @@ @@ -4,10 +4,8 @@
4 <img v-if="baseData.coverList.length > 0" :src="baseData.coverList[0].cover_url" alt="" /> 4 <img v-if="baseData.coverList.length > 0" :src="baseData.coverList[0].cover_url" alt="" />
5 <div class="center"> 5 <div class="center">
6 <p class="basename">{{ baseData.baseName }}</p> 6 <p class="basename">{{ baseData.baseName }}</p>
7 - <p class="address">  
8 - <van-icon name="location-o" />{{ baseData.city }}{{ baseData.area}}{{ baseData.address }}  
9 - </p>  
10 - <p class="tag">{{ baseData.baseLabel.join("/") }}</p> 7 + <p class="address"><van-icon name="location-o" />{{ baseData.city }}{{ baseData.area }}{{ baseData.address }}</p>
  8 + <p class="tag">{{ baseData.baseLabel.join('/') }}</p>
11 </div> 9 </div>
12 </div> 10 </div>
13 </div> 11 </div>
@@ -15,39 +13,24 @@ @@ -15,39 +13,24 @@
15 <script> 13 <script>
16 export default { 14 export default {
17 props: ['baseId'], 15 props: ['baseId'],
18 - data () { 16 + data() {
19 return { 17 return {
20 - baseData: "", //基地信息 18 + baseData: '', //基地信息
21 } 19 }
22 }, 20 },
23 - mounted () { 21 + mounted() {
24 this.GetOneBase() 22 this.GetOneBase()
25 }, 23 },
26 methods: { 24 methods: {
27 // 获取单个基地 25 // 获取单个基地
28 - GetOneBase () {  
29 - this.mgop({  
30 - api: 'mgop.sz.hswsy.GetOneBase', // 必须  
31 - host: 'https://mapi.zjzwfw.gov.cn/',  
32 - dataType: 'JSON',  
33 - type: 'GET',  
34 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
35 - headers: {  
36 - // 'isTestUrl': '1'  
37 - },  
38 - data: {  
39 - "id": this.baseId,  
40 - },  
41 - onSuccess: res => {  
42 - if (res.data.data) {  
43 - this.baseData = res.data.data;  
44 - }  
45 - },  
46 - onFail: err => {  
47 - console.log('err', err) 26 + GetOneBase() {
  27 + this.yxAxios.get(`${this.yanxueUrl}/api/Manage/GetOneBase?id=${this.baseId}`).then((res) => {
  28 + // console.log(res.data.data)
  29 + if (res.data.data) {
  30 + this.baseData = res.data.data
48 } 31 }
49 - }); 32 + })
50 }, 33 },
51 - } 34 + },
52 } 35 }
53 -</script>  
54 \ No newline at end of file 36 \ No newline at end of file
  37 +</script>
src/views/Service/component/AbroadDetail/AbroadCoupon.vue
@@ -1,82 +0,0 @@ @@ -1,82 +0,0 @@
1 -<template>  
2 - <div class="course_coupons" v-if="proCoupon.length>0">  
3 - <div>  
4 - <van-tag v-for="(item,index) in proCoupon" :key="index" color="#ffffff" text-color="#FF2B2B">{{proCouponHas?'已领取:':''}}{{item.title}}</van-tag>  
5 - </div>  
6 - <div @click="toCoupons" class="fontBlue">领取 ></div>  
7 - </div>  
8 -</template>  
9 -<script>  
10 -export default {  
11 - props: ['detailDataId', 'centerNo'],  
12 - data () {  
13 - return {  
14 - proCoupon: [],//优惠券  
15 - proCouponHas: false,//优惠券已领取  
16 - }  
17 - },  
18 - mounted () {  
19 - this.getOrderCoupon()  
20 - },  
21 - methods: {  
22 - //获取产品可使用优惠券  
23 - getOrderCoupon () {  
24 - this.mgop({  
25 - api: 'mgop.sz.hswsy.orderCoupon', // 必须  
26 - host: 'https://mapi.zjzwfw.gov.cn/',  
27 - dataType: 'JSON',  
28 - type: 'POST',  
29 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
30 - headers: {  
31 - // 'isTestUrl': '1'  
32 - },  
33 - data: {  
34 - "proId": this.detailDataId,  
35 - "userId": this.centerNo,  
36 - },  
37 - onSuccess: res => {  
38 - if (res.data.data) {  
39 - if (res.data.data.has.length > 0) {  
40 - this.proCoupon = res.data.data.has  
41 - localStorage.setItem("proCoupon", JSON.stringify(this.proCoupon))  
42 - this.chooseDefaultUseCard(res.data.data.has)//设置默认选中的优惠券  
43 - this.proCouponHas = true;  
44 - } else if (res.data.data.get.length > 0) {  
45 - this.proCoupon = {  
46 - title: '您有可领优惠券'  
47 - }  
48 - }  
49 - }  
50 - },  
51 - onFail: err => {  
52 - console.log('err', err)  
53 - }  
54 - });  
55 - },  
56 - // 设置默认选中的优惠券  
57 - chooseDefaultUseCard (has) {  
58 - if (has.length > 1) {  
59 - let useCard = has[0];  
60 - for (let i in has) {  
61 - console.log(Number(has[i].couponPrice) > Number(useCard.couponPrice))  
62 - if (Number(has[i].couponPrice) > Number(useCard.couponPrice)) {  
63 - useCard = has[i]  
64 - }  
65 - }  
66 - // console.log('useCard', useCard)  
67 - this.proCoupon = [useCard]  
68 - localStorage.setItem('useCard', JSON.stringify(useCard))  
69 -  
70 - } else {  
71 - localStorage.setItem('useCard', JSON.stringify(this.proCoupon[0]))  
72 - }  
73 - },  
74 - //领券  
75 - toCoupons () {  
76 - this.$router.push({  
77 - name: "CardBoxXST",  
78 - });  
79 - },  
80 - }  
81 -}  
82 -</script>  
83 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/component/AbroadDetail/AbroadEvaluate.vue
1 <template> 1 <template>
2 <div class="abroad_evaluate"> 2 <div class="abroad_evaluate">
3 <div class="rate" @click="handleEvaluate"> 3 <div class="rate" @click="handleEvaluate">
4 - <div>  
5 - <van-rate v-model="evaluationData.evaluationScore" color="#FFCC00" :size="16" readonly />  
6 - <span>{{ evaluationData.evaluationScore }}</span>  
7 - </div>  
8 - <span>共{{evaluationData.evaluationCount}}个客户评价  
9 - <van-icon name="arrow" />  
10 - </span> 4 + <div>
  5 + <van-rate v-model="evaluationData.evaluationScore" color="#FFCC00" :size="16" readonly />
  6 + <span>{{ evaluationData.evaluationScore }}</span>
11 </div> 7 </div>
  8 + <span
  9 + >共{{ evaluationData.evaluationCount }}个客户评价
  10 + <van-icon name="arrow" />
  11 + </span>
  12 + </div>
12 </div> 13 </div>
13 </template> 14 </template>
14 <script> 15 <script>
15 export default { 16 export default {
16 - props:['courseId'],  
17 - data(){  
18 - return{  
19 - evaluationData: '',//评价 17 + props: ['courseId'],
  18 + data() {
  19 + return {
  20 + evaluationData: '', //评价
20 } 21 }
21 }, 22 },
22 - mounted(){ 23 + mounted() {
23 this.getEvaluationSummary() 24 this.getEvaluationSummary()
24 }, 25 },
25 - methods:{ 26 + methods: {
26 // 获取评价 27 // 获取评价
27 - getEvaluationSummary () {  
28 - this.mgop({  
29 - api: 'mgop.sz.hswsy.EvaluationSummary', // 必须  
30 - host: 'https://mapi.zjzwfw.gov.cn/',  
31 - dataType: 'JSON',  
32 - type: 'GET',  
33 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
34 - headers: {  
35 - // 'isTestUrl': '1'  
36 - },  
37 - data: {  
38 - "courseId": this.courseId,  
39 - },  
40 - onSuccess: res => {  
41 - if (res.data.data) {  
42 - this.evaluationData = res.data.data  
43 - }  
44 - },  
45 - onFail: err => {  
46 - console.log('err', err) 28 + getEvaluationSummary() {
  29 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/Evaluation/Summary?courseId=${this.courseId}`).then((res) => {
  30 + if (res.data.data) {
  31 + this.evaluationData = res.data.data
47 } 32 }
48 - }); 33 + })
49 }, 34 },
50 // 点击评价进入评价详情页 35 // 点击评价进入评价详情页
51 - handleEvaluate () {  
52 - this.$router.push({ name: "ServiceAbroadEvaluate", query: { courseId: this.courseId } }); 36 + handleEvaluate() {
  37 + this.$router.push({ name: 'ServiceAbroadEvaluate', query: { courseId: this.courseId } })
53 }, 38 },
54 - } 39 + },
55 } 40 }
56 -</script>  
57 \ No newline at end of file 41 \ No newline at end of file
  42 +</script>
src/views/Service/component/AbroadDetail/CountDown.vue
@@ -1,146 +0,0 @@ @@ -1,146 +0,0 @@
1 -<template>  
2 - <div class="count_down">  
3 - <div class="countDown" v-show="detailData.clusterTime ">  
4 - <div class="countDownTop">  
5 - <div>{{day}} {{detailData.applyCount>=detailData.minPeopleCount?'报名截止时间:':'团期截止倒计时'}}</div>  
6 - <div v-if="detailData.applyCount>=detailData.minPeopleCount||timeTamp * 1 < 0">{{detailData.periodOfValidity}}</div>  
7 - <div class="countDownTime" v-else>  
8 - <div class="countDownFont">{{ showTime.day }}</div>  
9 - 天  
10 - <div class="countDownFont">{{ showTime.hour }}</div>  
11 - 时  
12 - <div class="countDownFont">{{ showTime.minute }}</div>  
13 - 分  
14 - <div class="countDownFont">{{ showTime.second }}</div>  
15 - 秒  
16 - </div>  
17 - </div>  
18 - <!-- <div class="countDownTop" v-else>  
19 - <div>{{day}}</div>  
20 - </div> -->  
21 - <div class="countDownBottom">  
22 - <div>  
23 - <div class="countDownBottomyellow" v-show="detailData.minPeopleCount">  
24 - {{ detailData.clusterName }}  
25 - </div>  
26 - <span v-if="detailData.applyCount>=detailData.minPeopleCount">已报名 {{detailData.applyCount}}/{{detailData.stockCount}}{{detailData.unitName}}</span>  
27 - <span v-else>最低成团数{{detailData.minPeopleCount}}{{detailData.unitName}}/已报名{{detailData.applyCount}}{{detailData.unitName}}</span>  
28 - <!-- 已报名:<span>{{ detailData.applyCount }}</span><span>/{{ detailData.stockCount }}</span> -->  
29 - </div>  
30 - <div class="countDownAbout" @click="showPintuanAbout=true">关于拼团?</div>  
31 - </div>  
32 - </div>  
33 - <van-popup v-model="showPintuanAbout" round>  
34 - <div class="pintuan_about">  
35 - <img class="about_img" src="@/assets/service/tip.png" alt="">  
36 - <p class="about_title">拼团规则说明</p>  
37 - <p class="about_content">1、拼团展示默认为最近活动档期,选择其它档期请时刻注意成团动态。</p>  
38 - <p class="about_content">2、在限时截止后,报名人数未达最低成团数,则结束本团活动,系统将在72小时内,全额退还!</p>  
39 - <p class="about_content">3、报名人数达到最低成团要求后,则拼团成功,凡在报名截止时间内未达最大限团人数,则可放心参与。</p>  
40 - <p class="about_content">4、已成团的活动,除特殊情况等不可抗拒因素外,活动如期举行。</p>  
41 - <p class="about_know" @click="showPintuanAbout=false">我知道了</p>  
42 - </div>  
43 - </van-popup>  
44 - </div>  
45 -</template>  
46 -<script>  
47 -export default {  
48 - props: ['day','productId', 'packageArr', 'bindId', 'comboId'],  
49 - data () {  
50 - return {  
51 - timeTamp: "",  
52 - showTime: {  
53 - day: "",  
54 - hour: "",  
55 - minute: "",  
56 - second: "",  
57 - },  
58 - showPintuanAbout: false,  
59 - detailData: ''  
60 - }  
61 - },  
62 - watch: {  
63 - bindId (oldVal, newVal) {  
64 - this.getDateInfoById()  
65 - },  
66 - comboId (oldVal, newVal) {  
67 - this.getDateInfoById()  
68 - },  
69 - },  
70 - mounted () {  
71 - // console.log(this.detailData)  
72 - // console.log(this.packageArr)  
73 - this.getDateInfoById()  
74 -  
75 - },  
76 - methods: {  
77 - // 根据选择的档期显示成团状态  
78 - getDateInfoById () {  
79 - const productId = this.productId  
80 - const bindId = this.bindId  
81 - const comboId = this.comboId  
82 - // console.log(productId, bindId, comboId)  
83 - this.mgop({  
84 - api: 'mgop.sz.hswsy.DateInfoById', // 必须  
85 - host: 'https://mapi.zjzwfw.gov.cn/',  
86 - dataType: 'JSON',  
87 - type: 'GET',  
88 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
89 - headers: {  
90 - // 'isTestUrl': '1'  
91 - },  
92 - data: {  
93 - "productId": productId,  
94 - "bindId": bindId,  
95 - "comboId": comboId,  
96 - },  
97 - onSuccess: res => {  
98 - console.log('套餐列表:', res.data.data);  
99 - if (res.data.data) {  
100 - this.detailData = res.data.data  
101 - let timer = setInterval(() => {  
102 - this.timeDown(); //倒计时  
103 - }, 1000);  
104 - this.$once("hook:beforeDestroy", () => {  
105 - clearInterval(timer); //清理定时器  
106 - console.log('清理定时器')  
107 - });  
108 - }  
109 - },  
110 - onFail: err => {  
111 - console.log('err', err)  
112 - }  
113 - });  
114 - },  
115 - //倒计时计算  
116 - timeDown () {  
117 - var clusterTime = Date.parse(new Date(this.detailData.clusterTime.replace(/\-/g, "/"))) + 60 * 60 * 24 * 1000;  
118 - var nowTime = Date.parse(new Date());  
119 - let timeTamp = clusterTime / 1000 - nowTime / 1000;  
120 - // console.log(timeTamp)  
121 - this.timeTamp = timeTamp;  
122 - // console.log(timeTamp)  
123 - let k = this.calculateDiffTime(timeTamp);  
124 - // console.log(k)  
125 - },  
126 - calculateDiffTime (timeDiff) {  
127 - var day = parseInt(timeDiff / 86400);  
128 - var hour = parseInt((timeDiff % 86400) / 3600);  
129 - var minute = parseInt(((timeDiff % 86400) % 3600) / 60);  
130 - var second = parseInt((((timeDiff % 86400) % 3600) % 60) % 60);  
131 -  
132 - this.showTime = {  
133 - day,  
134 - hour,  
135 - minute,  
136 - second,  
137 - };  
138 - day = day ? day + "天" : "";  
139 - hour = hour ? hour + "时" : "";  
140 - minute = minute ? minute + "分" : "";  
141 - second = second ? second + "秒" : "";  
142 - return day + hour + minute + second;  
143 - },  
144 - }  
145 -}  
146 -</script>  
147 \ No newline at end of file 0 \ No newline at end of file
src/views/Service/component/chooseSchool.vue
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
7 </form> 7 </form>
8 </div> 8 </div>
9 <div class="listCardBox"> 9 <div class="listCardBox">
10 - <div v-for="(val,i) in schoolList" :key="i" class="listCard">  
11 - <div @click="schoolClick(val)">{{val.text}}</div> 10 + <div v-for="(val, i) in schoolList" :key="i" class="listCard">
  11 + <div @click="schoolClick(val)">{{ val.text }}</div>
12 </div> 12 </div>
13 </div> 13 </div>
14 </div> 14 </div>
@@ -16,71 +16,55 @@ @@ -16,71 +16,55 @@
16 16
17 <script> 17 <script>
18 export default { 18 export default {
19 - data () { 19 + data() {
20 return { 20 return {
21 searchSchool: '', 21 searchSchool: '',
22 - schoolList: [] 22 + schoolList: [],
23 } 23 }
24 }, 24 },
25 methods: { 25 methods: {
26 - onSearch (val) { 26 + onSearch(val) {
27 console.log(val) 27 console.log(val)
28 this.GetHighSchoolList() 28 this.GetHighSchoolList()
29 }, 29 },
30 - onCancel () { 30 + onCancel() {
31 // this.$toast('取消'); 31 // this.$toast('取消');
32 this.searchSchool = '' 32 this.searchSchool = ''
33 this.schoolList = [] 33 this.schoolList = []
34 this.$emit('input', false) 34 this.$emit('input', false)
35 }, 35 },
36 // 通过学校姓名获取学校 36 // 通过学校姓名获取学校
37 - GetHighSchoolList () {  
38 - this.mgop({  
39 - api: 'mgop.sz.hswsy.GetAllSchoolList', // 必须  
40 - host: 'https://mapi.zjzwfw.gov.cn/',  
41 - dataType: 'JSON',  
42 - type: 'GET',  
43 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
44 - headers: {  
45 - // 'isTestUrl': '1'  
46 - },  
47 - data: {  
48 - "schoolName": this.searchSchool  
49 - },  
50 - onSuccess: res => {  
51 - console.log('学校:', res)  
52 - if (res.data.data) {  
53 - let data = res.data.data;  
54 - let arr = [];  
55 - if (data) {  
56 - data.forEach((n, i) => {  
57 - let obj = {};  
58 - obj.text = n.schoolName;  
59 - obj.id = n.id;  
60 - arr.push(obj);  
61 - });  
62 - this.schoolList = arr;  
63 - console.log(this.schoolList)  
64 - }  
65 - } else {  
66 - this.$toast.fail(res.data.message) 37 + GetHighSchoolList() {
  38 + this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/GetAllSchoolList?schoolName=${this.searchSchool}`).then((res) => {
  39 + console.log('学校:', res)
  40 + if (res.data.data) {
  41 + let data = res.data.data
  42 + let arr = []
  43 + if (data) {
  44 + data.forEach((n, i) => {
  45 + let obj = {}
  46 + obj.text = n.schoolName
  47 + obj.id = n.id
  48 + arr.push(obj)
  49 + })
  50 + this.schoolList = arr
  51 + console.log(this.schoolList)
67 } 52 }
68 - },  
69 - onFail: err => {  
70 - console.log('err', err) 53 + } else {
  54 + this.$toast.fail(res.data.message)
71 } 55 }
72 - }); 56 + })
73 }, 57 },
74 //点击学校 58 //点击学校
75 - schoolClick (val) { 59 + schoolClick(val) {
76 console.log(val) 60 console.log(val)
77 this.$emit('schoolData', val) 61 this.$emit('schoolData', val)
78 this.onCancel() 62 this.onCancel()
79 - } 63 + },
80 }, 64 },
81 - mounted () { 65 + mounted() {
82 // this.GetHighSchoolList() 66 // this.GetHighSchoolList()
83 - } 67 + },
84 } 68 }
85 </script> 69 </script>
86 70
@@ -109,4 +93,4 @@ export default { @@ -109,4 +93,4 @@ export default {
109 } 93 }
110 } 94 }
111 } 95 }
112 -</style>  
113 \ No newline at end of file 96 \ No newline at end of file
  97 +</style>
src/views/Service/evaluateBase.vue
@@ -86,70 +86,40 @@ export default { @@ -86,70 +86,40 @@ export default {
86 this.$toast.loading({ 86 this.$toast.loading({
87 message: '请求中...', 87 message: '请求中...',
88 }); 88 });
89 - this.mgop({  
90 - api: 'mgop.sz.hswsy.AddEvaluation', // 必须  
91 - host: 'https://mapi.zjzwfw.gov.cn/',  
92 - dataType: 'JSON',  
93 - type: 'POST',  
94 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
95 - headers: {  
96 - // 'isTestUrl': '1'  
97 - },  
98 - data: {  
99 - "baseId": this.baseId,  
100 - "signId": this.signId,  
101 - "evaluation": this.content,  
102 - "userId": this.studentInfo.travelerNum,  
103 - "imgList": this.imgsrc,  
104 - "baseScore": this.starsBaseNum  
105 - },  
106 - onSuccess: res => {  
107 - this.$toast.clear();  
108 - if (res.data.status == 1) {  
109 - this.$toast.success('发布成功');  
110 - setTimeout(() => {  
111 - this.$router.back()  
112 - }, 1000)  
113 - }  
114 - },  
115 - onFail: err => {  
116 - console.log('err', err) 89 + this.yxAxios.post(`${this.yanxueUrl}/api/StudiesWap/AddEvaluation`,
  90 + {
  91 + baseId: this.baseId,
  92 + signId:this.signId,
  93 + evaluation: this.content,
  94 + userId: this.studentInfo.travelerNum,
  95 + imgList: this.imgsrc,
  96 + baseScore: this.starsBaseNum
117 } 97 }
118 - }); 98 + ).then((res) => {
  99 + this.$toast.clear();
  100 + if (res.data.status == 1) {
  101 + this.$toast.success('发布成功');
  102 + setTimeout(() => {
  103 + this.$router.back()
  104 + }, 1000)
  105 + }
  106 + })
  107 +
119 }, 108 },
120 // 获取基地信息 109 // 获取基地信息
121 GetStudyBaseDetail () { 110 GetStudyBaseDetail () {
122 this.$toast.loading({ 111 this.$toast.loading({
123 message: '请求中...', 112 message: '请求中...',
124 }); 113 });
125 - this.mgop({  
126 - api: 'mgop.sz.hswsy.GetStudyBaseDetail', // 必须  
127 - host: 'https://mapi.zjzwfw.gov.cn/',  
128 - dataType: 'JSON',  
129 - type: 'GET',  
130 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
131 - headers: {  
132 - // 'isTestUrl': '1'  
133 - },  
134 - data: {  
135 - "userId": 0,  
136 - "cs": '绍兴市',  
137 - "id": this.baseId  
138 - },  
139 - onSuccess: res => {  
140 - this.$toast.clear()  
141 - console.log('基地信息:', res.data)  
142 - if (res.data.data) {  
143 - this.$toast.clear();  
144 - this.baseInfo = res.data.data;  
145 - } else {  
146 - this.$toast.fail(res.data.message)  
147 - }  
148 - },  
149 - onFail: err => {  
150 - console.log('err', err) 114 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/GetStudyBaseDetail?userId=0&cs=绍兴市&id=${this.baseId}`).then((res) => {
  115 + console.log(res.data)
  116 + if (res.data.data) {
  117 + this.$toast.clear();
  118 + this.baseInfo = res.data.data;
  119 + } else {
  120 + this.$toast.fail(res.data.message)
151 } 121 }
152 - }); 122 + })
153 }, 123 },
154 callback (img) { 124 callback (img) {
155 this.imgsrc.push({ 125 this.imgsrc.push({
src/views/Service/evaluateCourse.vue
@@ -93,40 +93,29 @@ export default { @@ -93,40 +93,29 @@ export default {
93 this.$toast.loading({ 93 this.$toast.loading({
94 message: '请求中...', 94 message: '请求中...',
95 }); 95 });
96 - this.mgop({  
97 - api: 'mgop.sz.hswsy.AddEvaluation', // 必须  
98 - host: 'https://mapi.zjzwfw.gov.cn/',  
99 - dataType: 'JSON',  
100 - type: 'POST',  
101 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
102 - headers: {  
103 - // 'isTestUrl': '1'  
104 - },  
105 - data: {  
106 - "baseId": this.courseInfo.baseId,  
107 - "title": this.courseInfo.courseName,  
108 - "evaluation": this.content,  
109 - "courseId": this.courseInfo.courseId,  
110 - "orderId": this.courseInfo.id,  
111 - "userId": this.userInfo.centerNo,  
112 - "imgList": this.imgsrc,  
113 - "courseScore": this.starsCourseNum,  
114 - "baseScore": this.starsBaseNum  
115 - },  
116 - onSuccess: res => {  
117 - this.$toast.clear();  
118 - if (res.data.status == 1) {  
119 - this.$toast.success('发布成功');  
120 - setTimeout(() => {  
121 - // this.$router.push({ name: 'ServiceOrderXST' })  
122 - this.$router.back()  
123 - }, 1000)  
124 - }  
125 - },  
126 - onFail: err => {  
127 - console.log('err', err) 96 + this.yxAxios.post(`${this.yanxueUrl}/api/StudiesWap/AddEvaluation`,
  97 + {
  98 + baseId: this.courseInfo.baseId,
  99 + title: this.courseInfo.courseName,
  100 + evaluation: this.content,
  101 + courseId: this.courseInfo.courseId,
  102 + orderId: this.courseInfo.id,
  103 + userId: this.userInfo.centerNo,
  104 + imgList: this.imgsrc,
  105 + courseScore: this.starsCourseNum,
  106 + baseScore: this.starsBaseNum
128 } 107 }
129 - }); 108 + ).then((res) => {
  109 + this.$toast.clear();
  110 + if (res.data.status == 1) {
  111 + this.$toast.success('发布成功');
  112 + setTimeout(() => {
  113 + // this.$router.push({ name: 'ServiceOrderQYX' })
  114 + this.$router.back()
  115 + }, 1000)
  116 + }
  117 + })
  118 +
130 }, 119 },
131 callback (img) { 120 callback (img) {
132 this.imgsrc.push({ 121 this.imgsrc.push({
src/views/Service/evaluateDetail.vue
@@ -2,22 +2,30 @@ @@ -2,22 +2,30 @@
2 <div class="releaseEvaluate"> 2 <div class="releaseEvaluate">
3 <div class="box top" v-if="baseId"> 3 <div class="box top" v-if="baseId">
4 <div class="pic"> 4 <div class="pic">
5 - <img :src="baseInfo.coverList[0].cover_url ? baseInfo.coverList[0].cover_url : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%"> 5 + <img
  6 + :src="baseInfo.coverList[0].cover_url ? baseInfo.coverList[0].cover_url : require('../../assets/service/defCoure.jpg')"
  7 + alt=""
  8 + style="width:100%;height:100%"
  9 + />
6 </div> 10 </div>
7 <div class="basefont"> 11 <div class="basefont">
8 - <div class="titlefont">{{baseInfo.baseName}}</div>  
9 - <div class="tcfont">{{baseInfo.address}}</div>  
10 - <div class="tcfont">{{baseInfo.phone}}</div> 12 + <div class="titlefont">{{ baseInfo.baseName }}</div>
  13 + <div class="tcfont">{{ baseInfo.address }}</div>
  14 + <div class="tcfont">{{ baseInfo.phone }}</div>
11 </div> 15 </div>
12 </div> 16 </div>
13 <div class="box top" v-else> 17 <div class="box top" v-else>
14 <div class="pic"> 18 <div class="pic">
15 - <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%"> 19 + <img
  20 + :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')"
  21 + alt=""
  22 + style="width:100%;height:100%"
  23 + />
16 </div> 24 </div>
17 <div class="basefont"> 25 <div class="basefont">
18 - <div class="titlefont">{{courseInfo.baseName}}</div>  
19 - <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>  
20 - <div class="tcfont" v-if="courseInfo.orderCount">数量*{{courseInfo.orderCount}}</div> 26 + <div class="titlefont">{{ courseInfo.baseName }}</div>
  27 + <div class="tcfont">套餐名称:{{ courseInfo.courseName }}</div>
  28 + <div class="tcfont" v-if="courseInfo.orderCount">数量*{{ courseInfo.orderCount }}</div>
21 </div> 29 </div>
22 </div> 30 </div>
23 <div class="box"> 31 <div class="box">
@@ -25,21 +33,28 @@ @@ -25,21 +33,28 @@
25 <div class="title">课程评分</div> 33 <div class="title">课程评分</div>
26 <div class="fr"> 34 <div class="fr">
27 <van-rate v-model="evaluationData.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly /> 35 <van-rate v-model="evaluationData.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />
28 - <span class="rate">{{evaluationData.courseScore}}.0</span> 36 + <span class="rate">{{ evaluationData.courseScore }}.0</span>
29 </div> 37 </div>
30 </div> 38 </div>
31 <div class="boxdf"> 39 <div class="boxdf">
32 <div class="title">基地评分</div> 40 <div class="title">基地评分</div>
33 <div class="fr"> 41 <div class="fr">
34 <van-rate v-model="evaluationData.baseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly /> 42 <van-rate v-model="evaluationData.baseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />
35 - <span class="rate">{{evaluationData.baseScore}}.0</span> 43 + <span class="rate">{{ evaluationData.baseScore }}.0</span>
36 </div> 44 </div>
37 </div> 45 </div>
38 - <p class="evaluation"><span>评价:</span>{{evaluationData.evaluation}}</p> 46 + <p class="evaluation"><span>评价:</span>{{ evaluationData.evaluation }}</p>
39 <div class="evaluation_img_box"> 47 <div class="evaluation_img_box">
40 - <img class="evaluation_img" v-for="(imgItem,index) in evaluationData.imgList" :key="index" :src="imgItem.imgUrl" alt="" @click="previewImg(imgItem.imgUrl)"> 48 + <img
  49 + class="evaluation_img"
  50 + v-for="(imgItem, index) in evaluationData.imgList"
  51 + :key="index"
  52 + :src="imgItem.imgUrl"
  53 + alt=""
  54 + @click="previewImg(imgItem.imgUrl)"
  55 + />
41 </div> 56 </div>
42 - <p class="evaluation_time">评价于 {{evaluationData.intime}}</p> 57 + <p class="evaluation_time">评价于 {{ evaluationData.intime }}</p>
43 </div> 58 </div>
44 </div> 59 </div>
45 </template> 60 </template>
@@ -47,9 +62,9 @@ @@ -47,9 +62,9 @@
47 <script> 62 <script>
48 import { imgCut } from 'vue-imgcut' 63 import { imgCut } from 'vue-imgcut'
49 export default { 64 export default {
50 - data () { 65 + data() {
51 return { 66 return {
52 - baseId: '',//有基地id时为基地评价 67 + baseId: '', //有基地id时为基地评价
53 baseInfo: '', 68 baseInfo: '',
54 evaluationId: '', 69 evaluationId: '',
55 evaluationData: '', 70 evaluationData: '',
@@ -68,9 +83,9 @@ export default { @@ -68,9 +83,9 @@ export default {
68 } 83 }
69 }, 84 },
70 components: { 85 components: {
71 - imgCut 86 + imgCut,
72 }, 87 },
73 - mounted () { 88 + mounted() {
74 this.evaluationId = this.$route.query.evaluationId 89 this.evaluationId = this.$route.query.evaluationId
75 let baseId = this.$route.query.baseId 90 let baseId = this.$route.query.baseId
76 // 当前为基地评价 91 // 当前为基地评价
@@ -80,33 +95,21 @@ export default { @@ -80,33 +95,21 @@ export default {
80 } 95 }
81 this.getEvaluationDetail() 96 this.getEvaluationDetail()
82 97
83 - var courseInfo = window.localStorage.getItem('courseInfo'); 98 + var courseInfo = window.localStorage.getItem('courseInfo')
84 if (courseInfo) { 99 if (courseInfo) {
85 - this.courseInfo = JSON.parse(courseInfo); 100 + this.courseInfo = JSON.parse(courseInfo)
86 } 101 }
87 }, 102 },
88 methods: { 103 methods: {
89 - getEvaluationDetail () { 104 + getEvaluationDetail() {
90 this.$toast.loading({ 105 this.$toast.loading({
91 message: '加载中...', 106 message: '加载中...',
92 duration: 0, 107 duration: 0,
93 - forbidClick: true 108 + forbidClick: true,
94 }) 109 })
95 - this.mgop({  
96 - api: 'mgop.sz.hswsy.EvaluationDetailById', // 必须  
97 - host: 'https://mapi.zjzwfw.gov.cn/',  
98 - dataType: 'JSON',  
99 - type: 'GET',  
100 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
101 - headers: {  
102 - // 'isTestUrl': '1'  
103 - },  
104 - data: {  
105 - "id": this.evaluationId  
106 - },  
107 - onSuccess: res => {  
108 - this.$toast.clear()  
109 - console.log('评价详情:', res.data) 110 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/EvaluationDetail/ById?id=${this.evaluationId}`).then((res) => {
  111 + this.$toast.clear()
  112 + console.log('评价详情:', res.data)
110 if (res.data.status == 1) { 113 if (res.data.status == 1) {
111 let evaluationData = res.data.data 114 let evaluationData = res.data.data
112 evaluationData.intime = this.Moment(new Date(evaluationData.intime)).format('YYYY-MM-DD') 115 evaluationData.intime = this.Moment(new Date(evaluationData.intime)).format('YYYY-MM-DD')
@@ -114,47 +117,25 @@ export default { @@ -114,47 +117,25 @@ export default {
114 } else { 117 } else {
115 this.$toast.fail(res.data.message) 118 this.$toast.fail(res.data.message)
116 } 119 }
117 - },  
118 - onFail: err => {  
119 - console.log('err', err)  
120 - }  
121 - }); 120 + })
122 }, 121 },
123 // 获取基地信息 122 // 获取基地信息
124 - GetStudyBaseDetail () { 123 + GetStudyBaseDetail() {
125 this.$toast.loading({ 124 this.$toast.loading({
126 message: '请求中...', 125 message: '请求中...',
127 - });  
128 - this.mgop({  
129 - api: 'mgop.sz.hswsy.GetStudyBaseDetail', // 必须  
130 - host: 'https://mapi.zjzwfw.gov.cn/',  
131 - dataType: 'JSON',  
132 - type: 'GET',  
133 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
134 - headers: {  
135 - // 'isTestUrl': '1'  
136 - },  
137 - data: {  
138 - "userId": 0,  
139 - "cs": '绍兴市',  
140 - "id": this.baseId  
141 - },  
142 - onSuccess: res => { 126 + })
  127 + this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/GetStudyBaseDetail?userId=0&cs=绍兴市&id=${this.baseId}`).then((res) => {
  128 + this.$toast.clear()
  129 + console.log('基地信息:', res.data)
  130 + if (res.data.data) {
143 this.$toast.clear() 131 this.$toast.clear()
144 - console.log('基地信息:', res.data)  
145 - if (res.data.data) {  
146 - this.$toast.clear();  
147 - this.baseInfo = res.data.data;  
148 - } else {  
149 - this.$toast.fail(res.data.message)  
150 - }  
151 - },  
152 - onFail: err => {  
153 - console.log('err', err) 132 + this.baseInfo = res.data.data
  133 + } else {
  134 + this.$toast.fail(res.data.message)
154 } 135 }
155 - }); 136 + })
156 }, 137 },
157 - } 138 + },
158 } 139 }
159 </script> 140 </script>
160 141
src/views/Service/evaluatePubilc.vue
@@ -2,12 +2,16 @@ @@ -2,12 +2,16 @@
2 <div class="releaseEvaluate"> 2 <div class="releaseEvaluate">
3 <div class="box top"> 3 <div class="box top">
4 <div class="pic"> 4 <div class="pic">
5 - <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%"> 5 + <img
  6 + :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')"
  7 + alt=""
  8 + style="width:100%;height:100%"
  9 + />
6 </div> 10 </div>
7 <div class="basefont"> 11 <div class="basefont">
8 - <div class="titlefont">{{courseInfo.baseName}}</div>  
9 - <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>  
10 - <div class="tcfont">数量*{{courseInfo.orderCount}}</div> 12 + <div class="titlefont">{{ courseInfo.baseName }}</div>
  13 + <div class="tcfont">套餐名称:{{ courseInfo.courseName }}</div>
  14 + <div class="tcfont">数量*{{ courseInfo.orderCount }}</div>
11 </div> 15 </div>
12 </div> 16 </div>
13 <div class="box"> 17 <div class="box">
@@ -15,14 +19,14 @@ @@ -15,14 +19,14 @@
15 <div class="title">课程评分</div> 19 <div class="title">课程评分</div>
16 <div class="fr"> 20 <div class="fr">
17 <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" /> 21 <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
18 - <span class="rate">{{starsCourseNum}}.0</span> 22 + <span class="rate">{{ starsCourseNum }}.0</span>
19 </div> 23 </div>
20 </div> 24 </div>
21 <div class="boxdf"> 25 <div class="boxdf">
22 <div class="title">基地评分</div> 26 <div class="title">基地评分</div>
23 <div class="fr"> 27 <div class="fr">
24 <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" /> 28 <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
25 - <span class="rate">{{starsBaseNum}}.0</span> 29 + <span class="rate">{{ starsBaseNum }}.0</span>
26 </div> 30 </div>
27 </div> 31 </div>
28 <div class="cont"> 32 <div class="cont">
@@ -31,7 +35,7 @@ @@ -31,7 +35,7 @@
31 </div> 35 </div>
32 </div> 36 </div>
33 <div class="imgs"> 37 <div class="imgs">
34 - <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i"> 38 + <img :src="n.imgUrl" alt="" v-for="(n, i) in imgsrc" :key="i" />
35 <div class="selectImg"> 39 <div class="selectImg">
36 <imgCut @callback="callback" :width="142" :height="142"> 40 <imgCut @callback="callback" :width="142" :height="142">
37 <van-icon name="cross" /> 41 <van-icon name="cross" />
@@ -40,14 +44,14 @@ @@ -40,14 +44,14 @@
40 <!-- <van-uploader v-model="fileList" multiple /> --> 44 <!-- <van-uploader v-model="fileList" multiple /> -->
41 </div> 45 </div>
42 </div> 46 </div>
43 - <div class="btns" :class="content==''||starsCourseNum==0||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div> 47 + <div class="btns" :class="content == '' || starsCourseNum == 0 || starsBaseNum == 0 ? 'disabled' : ''" @click="AddEvaluation">发布</div>
44 </div> 48 </div>
45 </template> 49 </template>
46 50
47 <script> 51 <script>
48 import { imgCut } from 'vue-imgcut' 52 import { imgCut } from 'vue-imgcut'
49 export default { 53 export default {
50 - data () { 54 + data() {
51 return { 55 return {
52 starsBaseNum: 0, 56 starsBaseNum: 0,
53 starsCourseNum: 0, 57 starsCourseNum: 0,
@@ -64,75 +68,64 @@ export default { @@ -64,75 +68,64 @@ export default {
64 } 68 }
65 }, 69 },
66 components: { 70 components: {
67 - imgCut 71 + imgCut,
68 }, 72 },
69 - created () {  
70 - var userInfo = localStorage.getItem('userInfo'); 73 + created() {
  74 + var userInfo = localStorage.getItem('userInfo')
71 if (userInfo) { 75 if (userInfo) {
72 - this.userInfo = JSON.parse(userInfo); 76 + this.userInfo = JSON.parse(userInfo)
73 } 77 }
74 - var courseInfo = localStorage.getItem('courseInfo'); 78 + var courseInfo = localStorage.getItem('courseInfo')
75 if (courseInfo) { 79 if (courseInfo) {
76 - this.courseInfo = JSON.parse(courseInfo); 80 + this.courseInfo = JSON.parse(courseInfo)
77 } 81 }
78 }, 82 },
79 methods: { 83 methods: {
80 - AddEvaluation () { 84 + AddEvaluation() {
81 if (this.content == '') { 85 if (this.content == '') {
82 this.$toast('请输入评价内容') 86 this.$toast('请输入评价内容')
83 - return; 87 + return
84 } 88 }
85 if (this.starsCourseNum == 0) { 89 if (this.starsCourseNum == 0) {
86 this.$toast('请完成课程评分') 90 this.$toast('请完成课程评分')
87 - return; 91 + return
88 } 92 }
89 if (this.starsBaseNum == 0) { 93 if (this.starsBaseNum == 0) {
90 this.$toast('请完成基地评分') 94 this.$toast('请完成基地评分')
91 - return; 95 + return
92 } 96 }
93 this.$toast.loading({ 97 this.$toast.loading({
94 message: '请求中...', 98 message: '请求中...',
95 - });  
96 - this.mgop({  
97 - api: 'mgop.sz.hswsy.AddEvaluation', // 必须  
98 - host: 'https://mapi.zjzwfw.gov.cn/',  
99 - dataType: 'JSON',  
100 - type: 'POST',  
101 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
102 - headers: {  
103 - // 'isTestUrl': '1'  
104 - },  
105 - data: {  
106 - "baseId": this.courseInfo.baseId,  
107 - "title": this.courseInfo.courseName,  
108 - "evaluation": this.content,  
109 - "courseId": this.courseInfo.courseId,  
110 - "orderId": this.courseInfo.id,  
111 - "userId": this.userInfo.centerNo,  
112 - "imgList": this.imgsrc,  
113 - "courseScore": this.starsCourseNum,  
114 - "baseScore": this.starsBaseNum  
115 - },  
116 - onSuccess: res => {  
117 - this.$toast.clear(); 99 + })
  100 + this.yxAxios
  101 + .post(`${this.yanxueUrl}/api/StudiesWap/AddEvaluation`, {
  102 + baseId: this.courseInfo.baseId,
  103 + title: this.courseInfo.courseName,
  104 + evaluation: this.content,
  105 + courseId: this.courseInfo.courseId,
  106 + orderId: this.courseInfo.id,
  107 + userId: this.userInfo.centerNo,
  108 + imgList: this.imgsrc,
  109 + courseScore: this.starsCourseNum,
  110 + baseScore: this.starsBaseNum,
  111 + })
  112 + .then((res) => {
  113 + this.$toast.clear()
118 if (res.data.status == 1) { 114 if (res.data.status == 1) {
119 - this.$toast.success('发布成功'); 115 + this.$toast.success('发布成功')
120 setTimeout(() => { 116 setTimeout(() => {
121 - this.$router.push({ name: 'ServiceOrderXST' }) 117 + // this.$router.push({ name: 'ServiceOrderQYX' })
  118 + this.$router.back()
122 }, 1000) 119 }, 1000)
123 } 120 }
124 - },  
125 - onFail: err => {  
126 - console.log('err', err)  
127 - }  
128 - }); 121 + })
129 }, 122 },
130 - callback (img) { 123 + callback(img) {
131 this.imgsrc.push({ 124 this.imgsrc.push({
132 - imgUrl: img  
133 - });  
134 - }  
135 - } 125 + imgUrl: img,
  126 + })
  127 + },
  128 + },
136 } 129 }
137 </script> 130 </script>
138 131