Commit f02585ece90430a9e6969d2ae607e6ee99ce5a3c

Authored by 夏洋涛
1 parent 03a79e0f
Exists in master

feat: 文件结构调整

Showing 51 changed files with 6181 additions and 7775 deletions   Show diff stats
src/component/MiniProgramPopup.vue
@@ -1,67 +0,0 @@ @@ -1,67 +0,0 @@
1 -<template>  
2 - <div id="mini_program">  
3 - <img src="../assets/success.png" alt="">  
4 - <p class="title">激活成功</p>  
5 - <p class="content">请点击下方按钮直接进入<br>(学事通升学汇志愿填报系统)登录</p>  
6 - <div class="btn_box">  
7 - <p class="text">点击进入</p>  
8 - <wx-open-launch-weapp id="launch-btn" username="gh_c0f904a5ee0c" path="pages/index/index?type=zkedt">  
9 - <script type="text/wxtag-template">  
10 - <style>.mini_btn { width:500px;height:500px;background:transparent;border:0; }</style>  
11 - <button class="mini_btn"></button>  
12 - </script>  
13 - </wx-open-launch-weapp>  
14 - </div>  
15 - </div>  
16 -</template>  
17 -<script>  
18 -export default {  
19 -  
20 -}  
21 -</script>  
22 -<style lang="scss" scoped>  
23 -#mini_program {  
24 - background: #fff;  
25 - border-radius: 10px;  
26 - padding: 60px 40px;  
27 - img {  
28 - width: 342px;  
29 - display: block;  
30 - margin: 0 auto;  
31 - }  
32 - .title {  
33 - font-size: 40px;  
34 - font-weight: bold;  
35 - text-align: center;  
36 - padding: 20px 0;  
37 - color: rgb(8, 130, 250);  
38 - }  
39 - .content {  
40 - white-space: nowrap;  
41 - font-size: 32px;  
42 - text-align: center;  
43 - line-height: 50px;  
44 - padding: 40px 0;  
45 - }  
46 - .btn_box {  
47 - width: 300px;  
48 - height: 100px;  
49 - border-radius: 50px;  
50 - background: rgb(8, 130, 250);  
51 - display: block;  
52 - margin: 0 auto;  
53 - position: relative;  
54 - overflow: hidden;  
55 - z-index: 1;  
56 - .text {  
57 - font-size: 4.3vw;  
58 - color: #fff;  
59 - position: absolute;  
60 - top: 50%;  
61 - left: 50%;  
62 - transform: translate(-50%, -50%);  
63 - z-index: -1;  
64 - }  
65 - }  
66 -}  
67 -</style>  
68 \ No newline at end of file 0 \ No newline at end of file
src/component/PrefectBox.vue
@@ -1,298 +0,0 @@ @@ -1,298 +0,0 @@
1 -<template>  
2 - <div>  
3 - <div id="prefect_box">  
4 - <img class="bg" src="../assets/msg.png" alt="">  
5 - <div class="content">  
6 - <div class="item">  
7 - <input type="text" placeholder="请输入您的姓名" v-model="studentName">  
8 - </div>  
9 - <div class="item" @click="handleYear">  
10 - <p :class="!year||yearDisable?'nodata':''">{{year?year:'请选择当前所处高中年级'}}</p>  
11 - <img src="../assets/more.png" alt="">  
12 - </div>  
13 - <div class="item" @click="showAreaSelect = true">  
14 - <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>  
15 - <img src="../assets/more.png" alt="">  
16 - </div>  
17 - <div class="item" @click="handleSchool">  
18 - <p :class="!school?'nodata':''">{{school?school:'请选择学校'}}</p>  
19 - <img src="../assets/more.png" alt="">  
20 - </div>  
21 - <div class="tip">  
22 - <img src="../assets/tip2.png" alt="">  
23 - <p>所处高中年级与会员有效期相关,请认真填写</p>  
24 - </div>  
25 - <button class="submit" @click="submit">完成</button>  
26 - </div>  
27 - </div>  
28 - <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
29 - <van-picker title="当前所处高中年级" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />  
30 - </van-popup>  
31 - <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
32 - <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />  
33 - </van-popup>  
34 - <van-popup v-model="showSchoolSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
35 - <van-picker title="学校" show-toolbar :columns="schoolList" @cancel="showSchoolSelect = false" @confirm="selectSchoolOver" />  
36 - </van-popup>  
37 - </div>  
38 -</template>  
39 -  
40 -<script>  
41 -  
42 -export default {  
43 - data () {  
44 - return {  
45 - studentName: '',  
46 - year: '',  
47 - yearDisable: false,  
48 - showYearSelect: false,  
49 - yearArr: [],  
50 - area: '',  
51 - areaCode: '',  
52 - showAreaSelect: false,  
53 - areaList: [],  
54 - school: '',  
55 - schoolId: '',  
56 - showSchoolSelect: false,  
57 - schoolList: [],  
58 - }  
59 - },  
60 -  
61 - mounted () {  
62 - let userInfo = sessionStorage.getItem('userInfo')  
63 - this.userInfo = userInfo ? JSON.parse(userInfo) : userInfo;  
64 - this.studentName = this.userInfo?.studentName;  
65 - this.initYearArr()  
66 - this.GetSysAreaList()  
67 - },  
68 - methods: {  
69 - // 初始化入学年份选项  
70 - initYearArr () {  
71 - // 页面创建时执行  
72 - let year = new Date().getFullYear(),  
73 - Month = new Date().getMonth() + 1,  
74 - yearArr = [];  
75 - // if (Month > 8) {  
76 - // // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份  
77 - // year = year + 1  
78 - // }  
79 - for (let index = year - 2; index < year + 1; index++) {  
80 - yearArr.push({ value: index, label: '' })  
81 - }  
82 - yearArr[0].label = `高三(${yearArr[0].value})级`;  
83 - yearArr[1].label = `高二(${yearArr[1].value})级`;  
84 - yearArr[2].label = `高一(${yearArr[2].value})级`;  
85 - this.yearArr = yearArr  
86 - if (this.userInfo?.year) {  
87 - for (let i in yearArr) {  
88 - if (yearArr[i].value == this.userInfo.year) {  
89 - this.year = yearArr[i].label  
90 - this.yearDisable = true  
91 - }  
92 - }  
93 - }  
94 - },  
95 - selectYearOver (value) {  
96 - this.year = value.label;  
97 - this.showYearSelect = false;  
98 - },  
99 - handleYear () {  
100 - if (!this.yearDisable) {  
101 - this.showYearSelect = true;  
102 - }  
103 - },  
104 - // 获取地区列表  
105 - GetSysAreaList () {  
106 - this.http.GetSysAreaList({  
107 - areaCode: 33  
108 - }).then((res) => {  
109 - if (res.success) {  
110 - let data = res.data;  
111 - let obj = {  
112 - province_list: {  
113 - 330000: '浙江省'  
114 - },  
115 - city_list: {},  
116 - county_list: {}  
117 - };  
118 - if (data) {  
119 - data.forEach((n, i) => {  
120 - obj.city_list[n.area_code + '00'] = n.area_name;  
121 - if (n.areaList.length > 0) {  
122 - n.areaList.forEach((k, j) => {  
123 - obj.county_list[k.area_code] = k.area_name;  
124 - })  
125 - }  
126 - });  
127 - this.areaList = obj;  
128 - }  
129 - } else {  
130 - this.$toast.fail(res.message)  
131 - }  
132 - })  
133 - },  
134 - selectAreaOver (value) {  
135 - let data = value;  
136 - var city = data[1].code;  
137 - city = city.substring(0, city.length - 2);  
138 - // console.log(city)  
139 - this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;  
140 - this.areaCode = [data[0].code, city, data[2].code];  
141 - this.quCode = data[2].code;  
142 - this.school = '',  
143 - this.schoolId = '',  
144 - this.showAreaSelect = false  
145 - this.GetHighSchoolList(data[2].code);// 通过地区获取学校  
146 - },  
147 - // 点击选择学校  
148 - handleSchool () {  
149 - if (!this.area) {  
150 - this.$toast('请先选择地区');  
151 - return;  
152 - }  
153 - this.showSchoolSelect = true  
154 - },  
155 - // 通过地区获取学校  
156 - GetHighSchoolList (areaCode) {  
157 - this.http.GetHighSchoolList({  
158 - areaCode: areaCode  
159 - }).then((res) => {  
160 - if (res.success) {  
161 - let data = res.data;  
162 - let arr = [];  
163 - if (data) {  
164 - data.forEach((n, i) => {  
165 - let obj = {};  
166 - obj.text = n.schoolName;  
167 - obj.value = n.id;  
168 - arr.push(obj);  
169 - });  
170 - this.schoolList = arr;  
171 - }  
172 - } else {  
173 - this.$toast.fail(res.message)  
174 - }  
175 - })  
176 - },  
177 - selectSchoolOver (value) {  
178 - this.school = value.text;  
179 - this.schoolId = value.value  
180 - this.showSchoolSelect = false  
181 - },  
182 -  
183 - submit () {  
184 - if (!this.year) {  
185 - this.$toast('请选择入学年份');  
186 - return;  
187 - }  
188 - let postData = {  
189 - studentName: this.studentName,  
190 - province: this.area.split(',')[0],  
191 - city: this.area.split(',')[1],  
192 - areaCode: this.areaCode[2],  
193 - areaName: this.area.split(',')[2],  
194 - school: this.school,  
195 - schoolAddress: this.areaCode[2] ? JSON.stringify(this.areaCode) : '',  
196 - year: this.year=='高一'?this.yearArr[2].value:this.year=='高二'?this.yearArr[1].value:this.yearArr[0].value  
197 - }  
198 - this.$toast.loading({  
199 - message: '加载中',  
200 - duration: 0,  
201 - forbidClick: true  
202 - })  
203 - this.http.updateUserInfo(postData).then((res) => {  
204 - this.$toast.clear()  
205 - if (res.success) {  
206 - this.$toast.success(res.message)  
207 - this.$emit('complete')  
208 - this.$emit('hidePrefectBox')  
209 - } else {  
210 - this.$toast.fail(res.message)  
211 - }  
212 - })  
213 - }  
214 - }  
215 -}  
216 -</script>  
217 -<style lang="scss" scoped>  
218 -#prefect_box {  
219 - width: 638px;  
220 - height: 836px;  
221 - background: #ffffff;  
222 - border-radius: 24px;  
223 - position: relative;  
224 - .bg {  
225 - width: 100%;  
226 - position: absolute;  
227 - top: 0;  
228 - left: 0;  
229 - }  
230 - .content {  
231 - width: 100%;  
232 - box-sizing: border-box;  
233 - padding: 0 40px;  
234 - position: absolute;  
235 - top: 236px;  
236 - left: 0;  
237 - .item {  
238 - width: 558px;  
239 - height: 72px;  
240 - border-radius: 36px;  
241 - background: #f7f7f7;  
242 - box-sizing: border-box;  
243 - font-size: 28px;  
244 - padding: 0 32px;  
245 - display: flex;  
246 - justify-content: space-between;  
247 - align-items: center;  
248 - margin-bottom: 28px;  
249 - p {  
250 - color: #333333;  
251 - &.nodata {  
252 - color: #999999;  
253 - }  
254 - }  
255 - img {  
256 - width: 40px;  
257 - }  
258 - input {  
259 - width: 100%;  
260 - background: transparent;  
261 - border: 0;  
262 - color: #333333;  
263 - padding: 0;  
264 - &::-webkit-input-placeholder {  
265 - color: #999999;  
266 - }  
267 - }  
268 - }  
269 - .tip {  
270 - display: flex;  
271 - align-items: center;  
272 - justify-content: center;  
273 - margin-bottom: 40px;  
274 - img {  
275 - width: 32px;  
276 - }  
277 - p {  
278 - font-size: 24px;  
279 - color: #f7b500;  
280 - margin-left: 8px;  
281 - }  
282 - }  
283 - .submit {  
284 - width: 294px;  
285 - height: 72px;  
286 - border: 0;  
287 - background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);  
288 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
289 - 0px 8px 12px 0px rgba(87, 137, 255, 0.5);  
290 - border-radius: 34px;  
291 - font-size: 34px;  
292 - color: #ffffff;  
293 - margin: 0 auto;  
294 - display: block;  
295 - }  
296 - }  
297 -}  
298 -</style>  
src/component/PrefectBoxXST.vue
@@ -1,394 +0,0 @@ @@ -1,394 +0,0 @@
1 -<template>  
2 - <div>  
3 - <div id="prefect_box">  
4 - <img class="bg" src="@/assets/msg.png" alt="">  
5 - <div class="content">  
6 - <div class="name">学生信息:</div>  
7 - <div class="item">  
8 - <input type="text" placeholder="请输入学生姓名" v-model="studentName">  
9 - </div>  
10 - <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;">  
11 - <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p>  
12 - <img src="@/assets/more.png" alt="">  
13 - </div>  
14 - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;">  
15 - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p>  
16 - <img src="@/assets/more.png" alt="">  
17 - </div>  
18 - <div class="item" @click="showAreaSelect=true">  
19 - <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>  
20 - <img src="@/assets/more.png" alt="">  
21 - </div>  
22 - <!-- <div class="item">  
23 - <form action="/" style="width:100%;">  
24 - <van-search v-model="searchSchool" placeholder="请输入学校关键字" @search="handleSchool" />  
25 - </form>  
26 - </div> -->  
27 - <div class="item">  
28 - <input type="text" placeholder="请选择学校" readonly v-model="school">  
29 - <button type="info" class="btn" @click="chooseSchool">选择学校</button>  
30 - </div>  
31 - <!-- <p class="school_select" v-if="school">已选择学校:{{school}}</p> -->  
32 - <button class="submit" @click="submit">完成</button>  
33 - </div>  
34 - </div>  
35 - <van-popup v-model="showUserTypeSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
36 - <van-picker title="当前阶段" show-toolbar :columns="userTypeArr" value-key="label" @cancel="showUserTypeSelect = false" @confirm="selectUserTypeOver" />  
37 - </van-popup>  
38 - <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
39 - <van-picker title="入学年份" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />  
40 - </van-popup>  
41 - <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
42 - <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />  
43 - </van-popup>  
44 - <van-popup v-model="showSchoolSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
45 - <van-picker title="学校" show-toolbar :columns="schoolList" :loading="schoolListLoading" @cancel="showSchoolSelect = false" @confirm="selectSchoolOver" />  
46 - </van-popup>  
47 -  
48 - <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true">  
49 - <div v-if="chooseSchoolisShow"><chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool></div>  
50 - </van-popup>  
51 - </div>  
52 -</template>  
53 -  
54 -<script>  
55 -  
56 -import chooseSchool from '@/views/PublicService/component/chooseSchool'  
57 -export default {  
58 - props: [  
59 - "phone",  
60 - "id",  
61 - "publicName"  
62 - ],  
63 - components: {chooseSchool},  
64 - data () {  
65 - return {  
66 - studentName: '',  
67 -  
68 - year: '',//入学年份  
69 - yearDisable: false,  
70 - showYearSelect: false,  
71 - yearArr: [],  
72 -  
73 - userType: '',  
74 - userTypeVal: '',//所处阶段1-小学 2-初中 3-高中  
75 - showUserTypeSelect: false,  
76 - userTypeArr: [{  
77 - label: '小学',  
78 - value: 1  
79 - }, {  
80 - label: '初中',  
81 - value: 2  
82 - }, {  
83 - label: '高中',  
84 - value: 3  
85 - }],  
86 -  
87 - area: '',  
88 - areaCode: '',  
89 - showAreaSelect: false,  
90 - areaList: [],  
91 -  
92 - searchSchool: '',  
93 - school: '',  
94 - schoolId: '',  
95 - showSchoolSelect: false,  
96 - schoolListLoading: false,  
97 - schoolList: [],  
98 -  
99 - appId: '',  
100 - chooseSchoolisShow: false  
101 - }  
102 - },  
103 -  
104 - mounted () {  
105 - if (this.publicName == 'SXYX') {  
106 - this.appId = 'wx1305e88d2bc74073'  
107 - } else if (this.publicName == 'XST') {  
108 - this.appId = 'wx1c630c8773c482f1'  
109 - } else if (this.publicName == 'KQ') {  
110 - this.appId = 'wx1305e88d2bc74073'  
111 - }  
112 - let userInfo = sessionStorage.getItem('userInfo')  
113 - this.userInfo = userInfo ? JSON.parse(userInfo) : userInfo;  
114 - this.studentName = this.userInfo?.studentName;  
115 - this.initYearArr()  
116 - this.GetSysAreaList()  
117 - },  
118 - methods: {  
119 - // 初始化入学年份选项  
120 - initYearArr () {  
121 - // 页面创建时执行  
122 - let year = new Date().getFullYear(),  
123 - Month = new Date().getMonth() + 1,  
124 - yearArr = [];  
125 - if (Month > 8) {  
126 - // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份  
127 - year = year  
128 - }  
129 - for (let index = year; index > year - 6; index--) {  
130 - yearArr.push({ value: index, label: index })  
131 - }  
132 - this.yearArr = yearArr  
133 - },  
134 - selectYearOver (value) {  
135 - this.year = value.label;  
136 - this.showYearSelect = false;  
137 - },  
138 - handleYear () {  
139 - if (!this.yearDisable) {  
140 - this.showYearSelect = true;  
141 - }  
142 - },  
143 - selectUserTypeOver (value) {  
144 - this.userType = value.label;  
145 - this.userTypeVal = value.value;  
146 - this.showUserTypeSelect = false;  
147 - },  
148 - // 获取地区列表  
149 - GetSysAreaList () {  
150 - this.http.GetSysAreaList({  
151 - areaCode: 33  
152 - }).then((res) => {  
153 - if (res.success) {  
154 - let data = res.data;  
155 - let obj = {  
156 - province_list: {  
157 - 330000: '浙江省'  
158 - },  
159 - city_list: {},  
160 - county_list: {}  
161 - };  
162 - if (data) {  
163 - data.forEach((n, i) => {  
164 - obj.city_list[n.area_code + '00'] = n.area_name;  
165 - if (n.areaList.length > 0) {  
166 - n.areaList.forEach((k, j) => {  
167 - obj.county_list[k.area_code] = k.area_name;  
168 - })  
169 - }  
170 - });  
171 - this.areaList = obj;  
172 - }  
173 - } else {  
174 - this.$toast.fail(res.message)  
175 - }  
176 - })  
177 - },  
178 - selectAreaOver (value) {  
179 - let data = value;  
180 - var city = data[1].code;  
181 - city = city.substring(0, city.length - 2);  
182 - // console.log(city)  
183 - this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;  
184 - this.areaCode = [data[0].code, city, data[2].code];  
185 - this.quCode = data[2].code;  
186 - this.school = '',  
187 - this.schoolId = '',  
188 - this.showAreaSelect = false  
189 - },  
190 - // 点击选择学校  
191 - handleSchool () {  
192 - if (!this.searchSchool) {  
193 - this.$toast('请输入学校关键字');  
194 - return;  
195 - }  
196 - this.showSchoolSelect = true;  
197 - this.GetHighSchoolList();  
198 - },  
199 - // 通过地区获取学校  
200 - GetHighSchoolList () {  
201 - this.schoolListLoading = true;  
202 - this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/GetAllSchoolList?schoolName=${this.searchSchool}`).then((res) => {  
203 - if (res.data.data) {  
204 - let data = res.data.data;  
205 - let arr = [];  
206 - if (data) {  
207 - data.forEach((n, i) => {  
208 - let obj = {};  
209 - obj.text = n.schoolName;  
210 - obj.id = n.id;  
211 - arr.push(obj);  
212 - });  
213 - this.schoolList = arr;  
214 - this.schoolListLoading = false  
215 - }  
216 - } else {  
217 - this.schoolListLoading = false  
218 - this.$toast.fail(res.data.message)  
219 - }  
220 - })  
221 - },  
222 - selectSchoolOver (value) {  
223 - console.log(value)  
224 - this.school = value.text;  
225 - this.schoolId = value.id;  
226 - this.showSchoolSelect = false;  
227 - },  
228 -  
229 - submit () {  
230 - if (!this.studentName) {  
231 - this.$toast('请输入姓名');  
232 - }  
233 - else if (!this.userType) {  
234 - this.$toast('请选择阶段');  
235 - }  
236 - else if (!this.year) {  
237 - this.$toast('请选择入学年份');  
238 - }  
239 - else if (!this.area) {  
240 - this.$toast('请选择地区');  
241 - }  
242 - else if (!this.school) {  
243 - this.$toast('请选择学校');  
244 - } else {  
245 - let postData = {  
246 - id: this.userInfo.id,  
247 - userName: this.studentName,  
248 - mobile: this.userInfo.phone,  
249 - province: this.area.split(',')[0],//省份  
250 - city: this.area.split(',')[1],//城市  
251 - area: this.area.split(',')[2],//地区  
252 - schoolName: this.school,//学校名称  
253 - enrollYear: this.year,//入学年份  
254 - userType: this.userTypeVal,//1-小学 2-初中 3-高中  
255 - }  
256 - this.$toast.loading({  
257 - message: '加载中',  
258 - duration: 0,  
259 - forbidClick: true  
260 - })  
261 - this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/updateUserInfo`, postData).then((res) => {  
262 - this.$toast.clear()  
263 - if (res.data.code == 200) {  
264 - this.$toast.success(res.data?.message)  
265 - this.$emit('complete')  
266 - this.$emit('hidePrefectBox')  
267 - } else {  
268 - this.$toast.fail(res.message)  
269 - }  
270 - this.getUserInfoff()  
271 - })  
272 - }  
273 - },  
274 - //选择学校  
275 - chooseSchool() {  
276 - // this.$router.push({name: 'chooseSchool'})  
277 - this.chooseSchoolisShow = true  
278 - },  
279 - schoolData(val) {  
280 - this.school = val.text;  
281 - this.schoolId = val.id;  
282 - }  
283 - }  
284 -}  
285 -</script>  
286 -<style lang="scss" scoped>  
287 -#prefect_box {  
288 - width: 638px;  
289 - height: 836px;  
290 - background: #ffffff;  
291 - border-radius: 24px;  
292 - position: relative;  
293 - .bg {  
294 - width: 100%;  
295 - position: absolute;  
296 - top: 0;  
297 - left: 0;  
298 - }  
299 - .content {  
300 - width: 100%;  
301 - box-sizing: border-box;  
302 - padding: 0 40px;  
303 - position: absolute;  
304 - top: 236px;  
305 - left: 0;  
306 - .name {  
307 - width: 558px;  
308 - height: 50px;  
309 - font-size: 28px;  
310 - color: #000;  
311 - padding-left: 20px;  
312 - box-sizing: border-box;  
313 - }  
314 - .item {  
315 - width: 558px;  
316 - height: 72px;  
317 - border-radius: 36px;  
318 - background: #f7f7f7;  
319 - box-sizing: border-box;  
320 - font-size: 28px;  
321 - padding: 0 32px;  
322 - display: flex;  
323 - justify-content: space-between;  
324 - align-items: center;  
325 - margin-bottom: 28px;  
326 - p {  
327 - color: #333333;  
328 - &.nodata {  
329 - color: #999999;  
330 - }  
331 - }  
332 - img {  
333 - width: 40px;  
334 - }  
335 - input {  
336 - width: 100%;  
337 - background: transparent;  
338 - border: 0;  
339 - color: #333333;  
340 - padding: 0;  
341 - &::-webkit-input-placeholder {  
342 - color: #999999;  
343 - }  
344 - }  
345 - .btn {  
346 - width: 240px;  
347 - height: 55px;  
348 - float: right;  
349 - font-size: 28px;  
350 - background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%);  
351 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
352 - 0px 8px 12px 0px rgba(89, 199, 171, 0.5);  
353 - border-radius: 34px;  
354 - border: transparent;  
355 - color: #333333;  
356 - }  
357 - }  
358 - .school_select {  
359 - font-size: 28px;  
360 - padding: 0 32px;  
361 - margin-bottom: 28px;  
362 - }  
363 - .submit {  
364 - width: 294px;  
365 - height: 72px;  
366 - border: 0;  
367 - background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);  
368 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
369 - 0px 8px 12px 0px rgba(87, 137, 255, 0.5);  
370 - border-radius: 34px;  
371 - font-size: 34px;  
372 - color: #ffffff;  
373 - margin: 0 auto;  
374 - display: block;  
375 - }  
376 - }  
377 -}  
378 -::v-deep .van-search {  
379 - background: transparent;  
380 - padding: 0;  
381 - width: 100%;  
382 -}  
383 -::v-deep .van-search__content {  
384 - padding: 0;  
385 -}  
386 -.schoolBoxF {  
387 - width: 100vw;  
388 - height: 100vh;  
389 - position: absolute;  
390 - top: 0;  
391 - left: 0;  
392 - background-color: #fff;  
393 -}  
394 -</style>  
src/component/Tabbar4.vue
@@ -31,7 +31,7 @@ export default { @@ -31,7 +31,7 @@ export default {
31 this.$router.push({ name: 'ServiceKQ', query: { showTab: 'KQ' } }) 31 this.$router.push({ name: 'ServiceKQ', query: { showTab: 'KQ' } })
32 }, 32 },
33 handleCenter () { 33 handleCenter () {
34 - this.$router.push({ name: 'HomeKQ' }) 34 + this.$router.push({ name: 'Home' })
35 } 35 }
36 } 36 }
37 } 37 }
src/router/index.js
1 import Vue from 'vue' 1 import Vue from 'vue'
2 import VueRouter from 'vue-router' 2 import VueRouter from 'vue-router'
3 -import HomeKQ from '@/views/PublicHome/HomeKQ.vue' 3 +import Home from '@/views/Home/Home.vue'
4 4
5 import ServiceAbroadDetail from '@/views/Service/AbroadDetail.vue' 5 import ServiceAbroadDetail from '@/views/Service/AbroadDetail.vue'
6 import ServiceAbroadEvaluate from '@/views/Service/AbroadEvaluate.vue' 6 import ServiceAbroadEvaluate from '@/views/Service/AbroadEvaluate.vue'
7 import ServiceDatePackage from '@/views/Service/DatePackage.vue' 7 import ServiceDatePackage from '@/views/Service/DatePackage.vue'
8 import ServiceCheckOrder from '@/views/Service/CheckOrder.vue' 8 import ServiceCheckOrder from '@/views/Service/CheckOrder.vue'
9 import ServiceCardSelect from '@/views/Service/CardSelect.vue' 9 import ServiceCardSelect from '@/views/Service/CardSelect.vue'
10 -import ServiceOrderXST from '@/views/PublicService/ServiceOrderXST.vue'  
11 -import evaluateCourse from '@/views/PublicService/evaluateCourse.vue'  
12 -import evaluateBase from '@/views/PublicService/evaluateBase.vue'//基地评价  
13 -import evaluateDetail from '@/views/PublicService/evaluateDetail.vue'//评价详情 10 +import ServiceOrderXST from '@/views/Service/ServiceOrderXST.vue'
  11 +import evaluateCourse from '@/views/Service/evaluateCourse.vue'
  12 +import evaluateBase from '@/views/Service/evaluateBase.vue' //基地评价
  13 +import evaluateDetail from '@/views/Service/evaluateDetail.vue' //评价详情
14 14
15 -import ServiceKQ from '@/views/PublicService/ServiceKQ.vue' //柯桥研学  
16 -import LoginPublic from '@/views/PublicService/LoginPublic.vue'  
17 -import ServiceCardBoxPublic from '@/views/PublicService/CardBoxPublic.vue' 15 +import ServiceKQ from '@/views/Service/ServiceKQ.vue' //柯桥研学
  16 +import LoginPublic from '@/views/Service/LoginPublic.vue'
  17 +import ServiceCardBoxPublic from '@/views/Service/CardBoxPublic.vue'
18 18
19 -import privateXST from '@/views/PublicService/privateXST.vue' //学事通 修改个人  
20 -import CardBoxXST from '@/views/PublicService/CardBoxXST.vue'  
21 -import CardCourseList from '@/views/PublicService/CardCourseList.vue'//优惠券对应商品列表  
22 -import YanxueCode from '@/views/PublicHome/YanxueCode.vue' //研学码  
23 -import YanxueInfo from '@/views/PublicHome/YanxueInfo.vue' //研学码信息  
24 -import chooseSchool from '@/views/PublicService/component/chooseSchool.vue' //选择学校  
25 -import SelectContact from '@/views/Service/SelectContact.vue' //选择联系人  
26 -import EditContact from '@/views/Service/EditContact.vue' //新增联系人  
27 -import MyClassList from '@/views/PublicHome/MyClassList.vue' //扫码基地签到  
28 -import StudentDetail from '@/views/PublicHome/StudentDetail.vue' //学生信息 19 +import CardBoxXST from '@/views/Service/CardBoxXST.vue'
  20 +import CardCourseList from '@/views/Service/CardCourseList.vue' //优惠券对应商品列表
  21 +import YanxueCode from '@/views/Home/YanxueCode.vue' //研学码
  22 +import YanxueInfo from '@/views/Home/YanxueInfo.vue' //研学码信息
  23 +import chooseSchool from '@/views/Service/component/chooseSchool.vue' //选择学校
  24 +import SelectContact from '@/views/Service/SelectContact.vue' //选择联系人
  25 +import EditContact from '@/views/Service/EditContact.vue' //新增联系人
  26 +import MyClassList from '@/views/Home/MyClassList.vue' //扫码基地签到
  27 +import StudentDetail from '@/views/Home/StudentDetail.vue' //学生信息
29 28
30 29
31 30
32 31
33 Vue.use(VueRouter) 32 Vue.use(VueRouter)
34 const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace]; 33 const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace];
35 -VueRouter.prototype.push = function push (to) {  
36 - return routerPush.call(this, to).catch(err => err) 34 +VueRouter.prototype.push = function push(to) {
  35 + return routerPush.call(this, to).catch(err => err)
37 } 36 }
38 -VueRouter.prototype.replace = function replace (location) {  
39 - return routerReplace.call(this, location).catch(error => error); 37 +VueRouter.prototype.replace = function replace(location) {
  38 + return routerReplace.call(this, location).catch(error => error);
40 }; 39 };
41 const routes = [{ 40 const routes = [{
42 - path: '/',  
43 - name: 'ServiceKQ',  
44 - component: ServiceKQ,  
45 - meta: {  
46 - }  
47 -}, {  
48 - path: '/HomeKQ',  
49 - name: 'HomeKQ',  
50 - component: HomeKQ,  
51 - meta: {  
52 - title: '个人中心(柯桥研学)'  
53 - }  
54 -},  
55 -{  
56 - path: '/login_public',  
57 - name: 'LoginPublic',  
58 - component: LoginPublic,  
59 - meta: {  
60 - title: '绑定手机号'  
61 - }  
62 -}, 41 + path: '/',
  42 + name: 'ServiceKQ',
  43 + component: ServiceKQ,
  44 + meta: {}
  45 + }, {
  46 + path: '/home',
  47 + name: 'Home',
  48 + component: Home,
  49 + meta: {
  50 + title: '个人中心(柯桥研学)'
  51 + }
  52 + },
  53 + {
  54 + path: '/login_public',
  55 + name: 'LoginPublic',
  56 + component: LoginPublic,
  57 + meta: {
  58 + title: '绑定手机号'
  59 + }
  60 + },
63 61
64 -{  
65 - path: '/abroad_detail',  
66 - name: 'ServiceAbroadDetail',  
67 - component: ServiceAbroadDetail,  
68 - meta: {  
69 - title: '详情'  
70 - }  
71 -}, 62 + {
  63 + path: '/abroad_detail',
  64 + name: 'ServiceAbroadDetail',
  65 + component: ServiceAbroadDetail,
  66 + meta: {
  67 + title: '详情'
  68 + }
  69 + },
72 70
73 -{  
74 - path: '/date_package',  
75 - name: 'ServiceDatePackage',  
76 - component: ServiceDatePackage,  
77 - meta: {  
78 - title: '选择套餐/日期'  
79 - }  
80 -},  
81 -{  
82 - path: '/check_order',  
83 - name: 'ServiceCheckOrder',  
84 - component: ServiceCheckOrder,  
85 - meta: {  
86 - title: '支付'  
87 - }  
88 -},  
89 -{  
90 - path: '/card_select',  
91 - name: 'ServiceCardSelect',  
92 - component: ServiceCardSelect,  
93 - meta: {  
94 - title: '我的优惠券'  
95 - }  
96 -},  
97 -{  
98 - path: '/card_box_public',  
99 - name: 'ServiceCardBoxPublic',  
100 - component: ServiceCardBoxPublic,  
101 - meta: {  
102 - title: '我的优惠券'  
103 - }  
104 -},  
105 -{  
106 - path: '/CardBoxXST',  
107 - name: 'CardBoxXST',  
108 - component: CardBoxXST,  
109 - meta: {  
110 - title: '我的优惠券'  
111 - }  
112 -},  
113 -{  
114 - path: '/CardCourseList',  
115 - name: 'CardCourseList',  
116 - component: CardCourseList,  
117 - meta: {  
118 - title: '限时限量特惠大集合'  
119 - }  
120 -},  
121 -{  
122 - path: '/privateXST',  
123 - name: 'privateXST',  
124 - component: privateXST,  
125 - meta: {  
126 - title: '修改个人'  
127 - }  
128 -},  
129 -{  
130 - path: '/service_orderXST',  
131 - name: 'ServiceOrderXST',  
132 - component: ServiceOrderXST,  
133 - meta: {  
134 - title: '我的订单'  
135 - }  
136 -},  
137 -{  
138 - path: '/evaluateCourse',  
139 - name: 'evaluateCourse',  
140 - component: evaluateCourse,  
141 - meta: {  
142 - title: '评价'  
143 - }  
144 -},  
145 -{  
146 - path: '/evaluateBase',  
147 - name: 'evaluateBase',  
148 - component: evaluateBase,  
149 - meta: {  
150 - title: '基地评价'  
151 - }  
152 -},  
153 -{  
154 - path: '/evaluateDetail',  
155 - name: 'evaluateDetail',  
156 - component: evaluateDetail,  
157 - meta: {  
158 - title: '评价详情'  
159 - }  
160 -},  
161 -{  
162 - path: '/service_abroad_evaluate',  
163 - name: 'ServiceAbroadEvaluate',  
164 - component: ServiceAbroadEvaluate,  
165 - meta: {  
166 - title: '评价'  
167 - }  
168 -},  
169 -{  
170 - path: '/YanxueCode',  
171 - name: 'YanxueCode',  
172 - component: YanxueCode,  
173 - meta: {  
174 - title: '研学码'  
175 - }  
176 -},  
177 -{  
178 - path: '/YanxueInfo',  
179 - name: 'YanxueInfo',  
180 - component: YanxueInfo,  
181 - meta: {  
182 - title: '研学码信息'  
183 - }  
184 -},  
185 -{  
186 - path: '/chooseSchool',  
187 - name: 'chooseSchool',  
188 - component: chooseSchool,  
189 - meta: {  
190 - title: '选择学校'  
191 - }  
192 -},  
193 -{  
194 - path: '/select_contact',  
195 - name: 'SelectContact',  
196 - component: SelectContact,  
197 - meta: {  
198 - title: '选择出行人'  
199 - }  
200 -},  
201 -{  
202 - path: '/edit_contact',  
203 - name: 'EditContact',  
204 - component: EditContact,  
205 - meta: {  
206 - title: '修改出行人'  
207 - }  
208 -},  
209 -{  
210 - path: '/MyClassList',  
211 - name: 'MyClassList',  
212 - component: MyClassList,  
213 - meta: {  
214 - title: '基地签到'  
215 - }  
216 -},  
217 -{  
218 - path: '/StudentDetail',  
219 - name: 'StudentDetail',  
220 - component: StudentDetail,  
221 - meta: {  
222 - title: '学生信息'  
223 - }  
224 -}, 71 + {
  72 + path: '/date_package',
  73 + name: 'ServiceDatePackage',
  74 + component: ServiceDatePackage,
  75 + meta: {
  76 + title: '选择套餐/日期'
  77 + }
  78 + },
  79 + {
  80 + path: '/check_order',
  81 + name: 'ServiceCheckOrder',
  82 + component: ServiceCheckOrder,
  83 + meta: {
  84 + title: '支付'
  85 + }
  86 + },
  87 + {
  88 + path: '/card_select',
  89 + name: 'ServiceCardSelect',
  90 + component: ServiceCardSelect,
  91 + meta: {
  92 + title: '我的优惠券'
  93 + }
  94 + },
  95 + {
  96 + path: '/card_box_public',
  97 + name: 'ServiceCardBoxPublic',
  98 + component: ServiceCardBoxPublic,
  99 + meta: {
  100 + title: '我的优惠券'
  101 + }
  102 + },
  103 + {
  104 + path: '/CardBoxXST',
  105 + name: 'CardBoxXST',
  106 + component: CardBoxXST,
  107 + meta: {
  108 + title: '我的优惠券'
  109 + }
  110 + },
  111 + {
  112 + path: '/CardCourseList',
  113 + name: 'CardCourseList',
  114 + component: CardCourseList,
  115 + meta: {
  116 + title: '限时限量特惠大集合'
  117 + }
  118 + },
  119 +
  120 + {
  121 + path: '/service_orderXST',
  122 + name: 'ServiceOrderXST',
  123 + component: ServiceOrderXST,
  124 + meta: {
  125 + title: '我的订单'
  126 + }
  127 + },
  128 + {
  129 + path: '/evaluateCourse',
  130 + name: 'evaluateCourse',
  131 + component: evaluateCourse,
  132 + meta: {
  133 + title: '评价'
  134 + }
  135 + },
  136 + {
  137 + path: '/evaluateBase',
  138 + name: 'evaluateBase',
  139 + component: evaluateBase,
  140 + meta: {
  141 + title: '基地评价'
  142 + }
  143 + },
  144 + {
  145 + path: '/evaluateDetail',
  146 + name: 'evaluateDetail',
  147 + component: evaluateDetail,
  148 + meta: {
  149 + title: '评价详情'
  150 + }
  151 + },
  152 + {
  153 + path: '/service_abroad_evaluate',
  154 + name: 'ServiceAbroadEvaluate',
  155 + component: ServiceAbroadEvaluate,
  156 + meta: {
  157 + title: '评价'
  158 + }
  159 + },
  160 + {
  161 + path: '/YanxueCode',
  162 + name: 'YanxueCode',
  163 + component: YanxueCode,
  164 + meta: {
  165 + title: '研学码'
  166 + }
  167 + },
  168 + {
  169 + path: '/YanxueInfo',
  170 + name: 'YanxueInfo',
  171 + component: YanxueInfo,
  172 + meta: {
  173 + title: '研学码信息'
  174 + }
  175 + },
  176 + {
  177 + path: '/chooseSchool',
  178 + name: 'chooseSchool',
  179 + component: chooseSchool,
  180 + meta: {
  181 + title: '选择学校'
  182 + }
  183 + },
  184 + {
  185 + path: '/select_contact',
  186 + name: 'SelectContact',
  187 + component: SelectContact,
  188 + meta: {
  189 + title: '选择出行人'
  190 + }
  191 + },
  192 + {
  193 + path: '/edit_contact',
  194 + name: 'EditContact',
  195 + component: EditContact,
  196 + meta: {
  197 + title: '修改出行人'
  198 + }
  199 + },
  200 + {
  201 + path: '/MyClassList',
  202 + name: 'MyClassList',
  203 + component: MyClassList,
  204 + meta: {
  205 + title: '基地签到'
  206 + }
  207 + },
  208 + {
  209 + path: '/StudentDetail',
  210 + name: 'StudentDetail',
  211 + component: StudentDetail,
  212 + meta: {
  213 + title: '学生信息'
  214 + }
  215 + },
225 ] 216 ]
226 const router = new VueRouter({ 217 const router = new VueRouter({
227 - mode: 'hash',  
228 - // base: process.env.BASE_URL+'/center',  
229 - base: process.env.BASE_URL,  
230 - routes 218 + mode: 'hash',
  219 + // base: process.env.BASE_URL+'/center',
  220 + base: process.env.BASE_URL,
  221 + routes
231 }) 222 })
232 router.beforeEach((to, from, next) => { 223 router.beforeEach((to, from, next) => {
233 - /* 路由发生变化修改页面title */  
234 - if (to.meta.title) {  
235 - // console.log(to)  
236 - document.title = to.meta.title  
237 - }  
238 - next() 224 + /* 路由发生变化修改页面title */
  225 + if (to.meta.title) {
  226 + // console.log(to)
  227 + document.title = to.meta.title
  228 + }
  229 + next()
239 }) 230 })
240 231
241 -export default router 232 -export default router
  233 +export default router
242 \ No newline at end of file 234 \ No newline at end of file
src/views/Home/Home.vue 0 → 100644
@@ -0,0 +1,262 @@ @@ -0,0 +1,262 @@
  1 +<template>
  2 + <div class="home">
  3 + <div class="infomation">
  4 + <div class="top">
  5 + <div>
  6 + <img class="head" :src="headImgUrl?headImgUrl:defaultHead" alt="">
  7 + <div class="right">
  8 + <p class="name">{{userInfo.nickName}}</p>
  9 + <p class="phone">{{userInfo.phone}}</p>
  10 + </div>
  11 + </div>
  12 + <HomeScan></HomeScan>
  13 + </div>
  14 + </div>
  15 + <HomeOrder></HomeOrder>
  16 + <div class="function">
  17 + <div class="item" @click="handleGroup">
  18 + <div class="left">
  19 + <van-icon class="icon" name="orders-o" />
  20 + <span>集团权限</span>
  21 + </div>
  22 + <van-icon name="arrow" />
  23 + </div>
  24 + <div class="item" @click="handleMyCard">
  25 + <div class="left">
  26 + <van-icon class="icon" name="discount" />
  27 + <span>我的优惠券</span>
  28 + </div>
  29 + <van-icon name="arrow" />
  30 + </div>
  31 + </div>
  32 + <HomeChildList v-if="showChildList"></HomeChildList>
  33 +
  34 + <!-- <div class="cardPic" v-show='isShow'>
  35 + <div class="boxPic" @click="isShow = false">
  36 + <img style="width:100%;height:100%" src="../assets/coupon.png" />
  37 + </div>
  38 + </div> -->
  39 + <tabbar4 active="center"></tabbar4>
  40 + </div>
  41 +</template>
  42 +
  43 +<script>
  44 +import HomeChildList from '@/views/Home/component/HomeChildList'
  45 +import HomeOrder from '@/views/Home/component/HomeOrder'
  46 +import HomeScan from '@/views/Home/component/HomeScan'
  47 +import Tabbar4 from '@/component/Tabbar4'
  48 +export default {
  49 + data () {
  50 + return {
  51 + centerNo: '',
  52 + userInfo: {
  53 + openId: '',
  54 + headImg: '',
  55 + nickName: '',
  56 + phone: '',
  57 + roleType: '',
  58 + time: '',
  59 + year: '',
  60 + studentName: '',
  61 + school: '',
  62 + },
  63 + nicknameUser: '',
  64 + headImgUrl: '',
  65 + defaultHead: require('@/assets/head.png'),
  66 + isShow: false,
  67 + showChildList: false
  68 + }
  69 + },
  70 +
  71 + mounted () {
  72 +
  73 + this.checkAuth()
  74 + },
  75 + methods: {
  76 + checkAuth () {
  77 + let centerNo = this.common.getUrlParam('center_no') || sessionStorage.getItem('centerNo');
  78 + if (centerNo) {
  79 + this.centerNo = centerNo
  80 + sessionStorage.setItem('centerNo', centerNo);
  81 + this.getUserInfo()
  82 + } else {
  83 + const sUserAgent = window.navigator.userAgent.toLowerCase()
  84 + const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1
  85 + const miniprogram = sUserAgent.indexOf("miniprogram") > -1 && sUserAgent.indexOf("alipay") > -1
  86 + if (dtdreamweb) {
  87 + alert('浙里办')
  88 + window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy`;
  89 + }
  90 + // else if (miniprogram) {
  91 + // alert('支付宝')
  92 + // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;
  93 + // }
  94 + else {
  95 + console.log('非浙里办渠道访问,显示测试用户数据')
  96 + this.centerNo = '20210930160466993660'
  97 + sessionStorage.setItem('centerNo', '20210930160466993660');
  98 + this.getUserInfo()
  99 + }
  100 + }
  101 + },
  102 + // 研学码
  103 + handleYanxue () {
  104 + this.$router.push({ name: 'YanxueCode' })
  105 + },
  106 + // 我的订单
  107 + handleOrder () {
  108 + this.$router.push({ name: 'ServiceOrderXST' })
  109 + },
  110 + // 集团认证
  111 + handleGroup () {
  112 + this.$toast('暂未开放,敬请期待!');
  113 + },
  114 + // 我的优惠券
  115 + handleMyCard () {
  116 + this.$router.push({ name: 'CardBoxXST' })
  117 + },
  118 + // 合伙人中心
  119 + handlePartner () {
  120 + this.$toast('暂未开放,敬请期待!');
  121 + // this.$router.push({ name: 'Partner' })
  122 + },
  123 + // 获取用户信息
  124 + getUserInfo: function () {
  125 + this.mgop({
  126 + api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须
  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 + "userNum": this.centerNo
  136 + },
  137 + onSuccess: res => {
  138 + console.log('getUserInfo', res)
  139 + if (res.data.code == 200) {
  140 + let userInfo = res.data.data.userInfo
  141 + this.userInfo = userInfo
  142 + sessionStorage.setItem('userInfo', JSON.stringify(userInfo))
  143 + }
  144 + this.showChildList = true
  145 +
  146 + },
  147 + onFail: err => {
  148 + console.log('err', err)
  149 + }
  150 + });
  151 + },
  152 + formatterTime (time) {
  153 + if (time) {
  154 + return time.split(' ')[0]
  155 + } else {
  156 + return ''
  157 + }
  158 + },
  159 + complete () {
  160 + this.getUserInfo()
  161 + }
  162 + },
  163 + components: {
  164 + Tabbar4,
  165 + HomeChildList,
  166 + HomeOrder,
  167 + HomeScan
  168 + },
  169 +}
  170 +</script>
  171 +<style lang="scss" scoped>
  172 +.home {
  173 + width: 100%;
  174 + min-height: 100%;
  175 + background: #f8f8f8;
  176 + padding-bottom: 196px;
  177 + .infomation {
  178 + width: 100%;
  179 + height: 320px;
  180 + background: url("~@/assets/home/bg_kq.png");
  181 + background-size: 100%;
  182 + background-position: center;
  183 + .top {
  184 + display: flex;
  185 + flex-wrap: wrap;
  186 + align-items: center;
  187 + justify-content: space-between;
  188 + padding: 40px 28px;
  189 + > div {
  190 + display: flex;
  191 + }
  192 + .head {
  193 + width: 96px;
  194 + height: 96px;
  195 + border-radius: 50%;
  196 + overflow: hidden;
  197 + }
  198 + .right {
  199 + height: 96px;
  200 + margin-left: 24px;
  201 + display: flex;
  202 + align-content: space-around;
  203 + flex-wrap: wrap;
  204 + color: #fff;
  205 + .name {
  206 + font-size: 34px;
  207 + font-weight: bold;
  208 + width: 100%;
  209 + }
  210 + .phone {
  211 + font-size: 26px;
  212 + }
  213 + }
  214 + }
  215 + }
  216 +
  217 + .function {
  218 + background: #ffffff;
  219 + border-radius: 12px;
  220 + margin: 24px;
  221 + .item {
  222 + margin: 0 32px;
  223 + height: 96px;
  224 + display: flex;
  225 + align-items: center;
  226 + justify-content: space-between;
  227 + font-size: 34px;
  228 + &:not(:first-of-type) {
  229 + border-top: 1px solid #e2e2e2;
  230 + }
  231 + .left {
  232 + display: flex;
  233 + align-items: center;
  234 + .icon {
  235 + font-size: 40px;
  236 + margin-right: 20px;
  237 + }
  238 + span {
  239 + font-size: 30px;
  240 + }
  241 + }
  242 + }
  243 + }
  244 +}
  245 +
  246 +.boxPic {
  247 + width: 85vw;
  248 + height: 115vw;
  249 + margin: 10vh 7.5vw;
  250 + position: absolute;
  251 + top: 0;
  252 + z-index: 99;
  253 +}
  254 +.cardPic {
  255 + position: absolute;
  256 + top: 0;
  257 + width: 100vw;
  258 + height: 100vh;
  259 + background: #0000008a;
  260 + z-index: 99;
  261 +}
  262 +</style>
src/views/Home/MyClassList.vue 0 → 100644
@@ -0,0 +1,289 @@ @@ -0,0 +1,289 @@
  1 +<template>
  2 + <div class="sign_in">
  3 + <div class="header">
  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">
  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>
  7 + <img v-if="n.cover_url.indexOf('.mp4') == -1" :src="n.cover_url" />
  8 + </van-swipe-item>
  9 + </van-swipe>
  10 + <img v-else src="@/assets/service/defCoure.jpg" alt="" />
  11 + </div>
  12 + <div class="base_info">
  13 + <p class="base_title">{{baseInfo.baseName}}</p>
  14 + <div class="rate">
  15 + <van-rate v-model="baseInfo.baseScore" color="#FFCC00" :size="16" readonly />
  16 + <span>{{ baseInfo.baseScore }}</span>
  17 + </div>
  18 + <p class="address">
  19 + <van-icon name="location" class="icon" />
  20 + {{baseInfo.address}}
  21 + </p>
  22 + <p class="phone">
  23 + <van-icon name="phone" class="icon" />
  24 + {{baseInfo.phone}}
  25 + </p>
  26 + </div>
  27 + <div class="select_student" @click="selectStudent">
  28 + <p class="select_tip">请选择需要打卡的孩子</p>
  29 + <div class="student" v-if="selectedContact.travelerName">
  30 + <span>{{selectedContact.travelerName}}</span>
  31 + <van-icon name="close" class="icon" />
  32 + </div>
  33 + <div class="student" v-else>
  34 + <span>点击选择</span>
  35 + </div>
  36 + </div>
  37 + <div class="btns" @click="getPosition">立即打卡</div>
  38 + <van-popup v-model="failShow" round closeable :style="{ width:'80%'}">
  39 + <div class="success">
  40 + <img src="@/assets/tip1.png" alt="">
  41 + <h3>打卡失败!</h3>
  42 + <p>您当前所在的地理位置不在课程的打卡范围内!</p>
  43 + </div>
  44 + </van-popup>
  45 + </div>
  46 +</template>
  47 +
  48 +<script>
  49 +export default {
  50 + data () {
  51 + return {
  52 + baseInfo: '',
  53 + list: [],
  54 + baseId: '',
  55 + userInfo: '',
  56 + failShow: false,
  57 + selectedContact: '',//选择的出行人
  58 +
  59 + }
  60 + },
  61 + mounted () {
  62 + var userInfo = sessionStorage.getItem('userInfo');
  63 + if (userInfo) {
  64 + this.userInfo = JSON.parse(userInfo);
  65 + }
  66 + // 选择的出行人
  67 + let selectedContactArr = sessionStorage.getItem('selectedContactArr');
  68 + if (selectedContactArr) {
  69 + selectedContactArr = JSON.parse(selectedContactArr);
  70 + this.selectedContact = selectedContactArr[0]
  71 + }
  72 + this.baseId = this.$route.query.qrresult;
  73 + this.GetStudyBaseDetail(this.baseId);
  74 + },
  75 + methods: {
  76 + AddSign () {
  77 +
  78 + this.$toast.loading({
  79 + message: '请求中...',
  80 + });
  81 + this.yxAxios.get(`${this.yanxueUrl}/api/BaseManage/AddSign?userId=${this.selectedContact.travelerNum}&baseId=${this.baseId}`).then((res) => {
  82 + this.$toast.success('打卡签到成功');
  83 + console.log(res.data)
  84 + // alert('打卡签到成功:',JSON.stringify(res))
  85 + setTimeout(() => {
  86 + let publicName = sessionStorage.getItem('publicName');
  87 + this.$router.push({ name: 'Home' + publicName })
  88 + }, 1000)
  89 + })
  90 + },
  91 + // 获取基地信息
  92 + GetStudyBaseDetail (baseId) {
  93 + this.$toast.loading({
  94 + message: '请求中...',
  95 + });
  96 + this.mgop({
  97 + api: 'mgop.sz.hswsy.GetStudyBaseDetail', // 必须
  98 + host: 'https://mapi.zjzwfw.gov.cn/',
  99 + dataType: 'JSON',
  100 + type: 'GET',
  101 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  102 + headers: {
  103 + // 'isTestUrl': '1'
  104 + },
  105 + data: {
  106 + "userId": 0,
  107 + "cs": '绍兴市',
  108 + "id": baseId
  109 + },
  110 + onSuccess: res => {
  111 + this.$toast.clear()
  112 + console.log('基地信息:', res.data)
  113 + if (res.data.data) {
  114 + this.$toast.clear();
  115 + this.baseInfo = res.data.data;
  116 + } else {
  117 + this.$toast.fail(res.data.message)
  118 + }
  119 + },
  120 + onFail: err => {
  121 + console.log('err', err)
  122 + }
  123 + });
  124 + },
  125 + getPosition () {
  126 + if (!this.selectedContact.travelerNum) {
  127 + this.$toast('请选择需要打卡的孩子');
  128 + return false;
  129 + }
  130 + if (this.baseInfo.signLong == 0 && this.baseInfo.signLat == 0) { //基地没数坐标
  131 + this.AddSign();
  132 + return false
  133 + }
  134 + var basePosition = [this.baseInfo.signLong, this.baseInfo.signLat];
  135 + AMap.convertFrom(basePosition, 'baidu', function (status, result) {
  136 + console.log(result)
  137 + if (result.info === 'ok') {
  138 + basePosition = [result.locations[0].lng, result.locations[0].lat]; // Array.<LngLat>
  139 + }
  140 + });
  141 + this.$toast.loading({
  142 + message: '请求中...',
  143 + });
  144 + this.getNowPosition((posi) => { //获取当前位置坐标
  145 + this.$toast.clear();
  146 + if (posi) {
  147 + var nowPosition = [posi.position.lng, posi.position.lat];
  148 + var distance = AMap.GeometryUtil.distance(nowPosition, basePosition);
  149 + console.log(parseInt(distance), nowPosition, basePosition)
  150 + if (parseInt(distance) > 500) {
  151 + this.failShow = true;
  152 + } else {
  153 + // alert('定位小于500m')
  154 + this.AddSign();
  155 + }
  156 + } else {
  157 + // alert('getNowPosition没有返回')
  158 + }
  159 + });
  160 + },
  161 + getNowPosition: function (callback) {
  162 + let mapObj = new AMap.Map('iCenter');
  163 + mapObj.plugin('AMap.Geolocation', function () {
  164 + let geolocation = new AMap.Geolocation({
  165 + enableHighAccuracy: true,//是否使用高精度定位,默认:true
  166 + timeout: 10000, //超过10秒后停止定位,默认:无穷大
  167 + maximumAge: 0, //定位结果缓存0毫秒,默认:0
  168 + convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
  169 + showButton: true, //显示定位按钮,默认:true
  170 + buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
  171 + buttonOffset: new AMap.Pixel(0, 0),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
  172 + showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
  173 + showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
  174 + panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
  175 + zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
  176 + });
  177 + mapObj.addControl(geolocation);
  178 + geolocation.getCurrentPosition();
  179 + AMap.event.addListener(geolocation, 'complete', function (res) {
  180 + // alert('返回定位信息:' + JSON.stringify(res))
  181 + console.log('返回定位信息:', res)
  182 + callback(res);
  183 + });//返回定位信息
  184 + AMap.event.addListener(geolocation, 'error', function (res) {
  185 + // alert('返回定位出错信息:' + JSON.stringify(res))
  186 + console.log('返回定位出错信息:', res)
  187 + callback();
  188 + }); //返回定位出错信息
  189 + })
  190 +
  191 + },
  192 + // 选择孩子
  193 + selectStudent () {
  194 + this.$router.push({ name: 'SelectContact', query: { limit: 1, hideParent: 1 } })
  195 + }
  196 + }
  197 +}
  198 +</script>
  199 +
  200 +<style lang="scss" scoped>
  201 +.sign_in {
  202 + padding-bottom: 100px;
  203 + .header {
  204 + img {
  205 + width: 100%;
  206 + }
  207 + }
  208 + .base_info {
  209 + width: 702px;
  210 + margin: 0 auto;
  211 + padding-top: 20px;
  212 + .base_title {
  213 + font-size: 34px;
  214 + font-weight: bold;
  215 + }
  216 + .rate {
  217 + margin-top: 20px;
  218 + span {
  219 + font-size: 30px;
  220 + color: #ffcc00;
  221 + margin-left: 30px;
  222 + }
  223 + }
  224 + .address,
  225 + .phone {
  226 + font-size: 24px;
  227 + color: #999;
  228 + margin-top: 16px;
  229 + .icon {
  230 + color: #000;
  231 + }
  232 + }
  233 + }
  234 + .select_student {
  235 + width: 702px;
  236 + margin: 0 auto;
  237 + margin-top: 30px;
  238 + padding-top: 30px;
  239 + border-top: 2px solid #d8d8d8;
  240 + .select_tip {
  241 + font-size: 30px;
  242 + color: #999;
  243 + }
  244 + .student {
  245 + position: relative;
  246 + width: 532px;
  247 + line-height: 78px;
  248 + margin: 0 auto;
  249 + margin-top: 24px;
  250 + background: #f5f6fa;
  251 + border-radius: 8px;
  252 + font-size: 28px;
  253 + text-align: center;
  254 + .icon {
  255 + position: absolute;
  256 + top: 50%;
  257 + right: 20px;
  258 + transform: translateY(-50%);
  259 + }
  260 + }
  261 + }
  262 +
  263 + .btns {
  264 + width: 702px;
  265 + margin: 0 auto;
  266 + margin-top: 100px;
  267 + text-align: center;
  268 + line-height: 90px;
  269 + border-radius: 100px;
  270 + font-size: 30px;
  271 + background: #4092ff;
  272 + color: #fff;
  273 + }
  274 + .success {
  275 + padding: 40px 0;
  276 + text-align: center;
  277 + img {
  278 + width: 30%;
  279 + }
  280 + h3 {
  281 + font-size: 36px;
  282 + }
  283 + p {
  284 + font-size: 30px;
  285 + color: #999999;
  286 + }
  287 + }
  288 +}
  289 +</style>
src/views/Home/StudentDetail.vue 0 → 100644
@@ -0,0 +1,419 @@ @@ -0,0 +1,419 @@
  1 +<template>
  2 + <div class="student_detail">
  3 + <div class="infomation">
  4 + <div class="top">
  5 + <div>
  6 + <img class="head" :src="defaultHead" alt="">
  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>
  10 + </div>
  11 + </div>
  12 + <HomeScan></HomeScan>
  13 + </div>
  14 + <div class="count_box">
  15 + <div class="count_item">
  16 + <p class="count"><span>{{signCheckCountInfo.signCount}}</span>/次</p>
  17 + <p class="des">基地打卡次数</p>
  18 + </div>
  19 + <div class="line"></div>
  20 + <div class="count_item">
  21 + <p class="count"><span>{{signCheckCountInfo.courseDays}}</span>/天</p>
  22 + <p class="des">课程实践</p>
  23 + </div>
  24 + </div>
  25 + <div class="icon_box">
  26 + <div class="icon_item" @click="handleYanxue">
  27 + <img src="@/assets/home/stu_icon1.png" alt="">
  28 + <p>研学码</p>
  29 + </div>
  30 + <div class="icon_item" @click="contactService">
  31 + <img src="@/assets/home/stu_icon2.png" alt="">
  32 + <p>专属客服</p>
  33 + </div>
  34 + <div class="icon_item">
  35 + <img src="@/assets/home/stu_icon3.png" alt="">
  36 + <p>敬请期待</p>
  37 + </div>
  38 + </div>
  39 + </div>
  40 + <div class="list_box">
  41 + <van-tabs v-model="active" color="#21A3FF">
  42 + <van-tab title="基地记录">
  43 + <div class="list_item" v-for="(item,index) in baseList" :key="index">
  44 + <div class="left">
  45 + <p class="day">{{item.day}}</p>
  46 + <p class="minute">{{item.minute}}</p>
  47 + </div>
  48 + <div class="line"></div>
  49 + <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>
  53 + <button v-else @click="evaluateBaseDetail(item)">查看评价</button>
  54 + </div>
  55 + </div>
  56 + <van-empty v-if="baseList.length==0" description="暂无基地记录" />
  57 + </van-tab>
  58 + <van-tab title="课程记录">
  59 + <div class="list_item" v-for="(item,index) in courseList" :key="index">
  60 + <div class="left">
  61 + <p class="day">{{item.day}}</p>
  62 + <p class="minute">{{item.minute}}</p>
  63 + </div>
  64 + <div class="line"></div>
  65 + <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>
  69 + <button v-else @click="evaluateCourseDetail(item)">查看评价</button>
  70 + </div>
  71 + </div>
  72 + <van-empty v-if="courseList.length==0" description="暂无课程记录" />
  73 + </van-tab>
  74 + </van-tabs>
  75 + </div>
  76 + </div>
  77 +</template>
  78 +<script>
  79 +import HomeScan from '@/views/Home/component/HomeScan'
  80 +export default {
  81 + data () {
  82 + return {
  83 + defaultHead: require('@/assets/head.png'),
  84 + studentInfo: '',
  85 + courseList: [],//课程记录
  86 + baseList: [],//基地记录
  87 + signCheckCountInfo: '',//打卡和课程天数信息
  88 + active: 0
  89 + }
  90 + },
  91 + mounted () {
  92 + let studentInfo = sessionStorage.getItem('StudentDetialInfo')
  93 + this.studentInfo = JSON.parse(studentInfo)
  94 + this.$nextTick(() => {
  95 + if (!this.studentInfo?.travelerNum) {
  96 + this.$toast.fail('学生信息缺失,请返回首页重试')
  97 + return;
  98 + }
  99 + this.$toast.loading({
  100 + message: '加载中...',
  101 + duration: 0,
  102 + forbidClick: true
  103 + })
  104 + this.getCourseList()
  105 + this.getBaseList()
  106 + this.getSignCheckCountInfo()
  107 + })
  108 + },
  109 + methods: {
  110 + // 获取课程记录
  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 => {
  127 + this.$toast.clear()
  128 + console.log('课程记录:', res.data)
  129 + if (res.data.status == 1) {
  130 + let courseList = res.data.data.data
  131 + for (let i in courseList) {
  132 + courseList[i].day = this.Moment(new Date(courseList[i].time)).format('MM-DD')
  133 + courseList[i].minute = this.Moment(new Date(courseList[i].time)).format('HH:mm')
  134 + }
  135 + this.courseList = courseList
  136 + console.log(this.courseList)
  137 + } else {
  138 + this.$toast.fail(res.data.message)
  139 + }
  140 + },
  141 + onFail: err => {
  142 + console.log('err', err)
  143 + }
  144 + });
  145 + },
  146 + // 获取基地记录
  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 => {
  163 + this.$toast.clear()
  164 + console.log('基地记录:', res.data)
  165 + if (res.data.status == 1) {
  166 + let baseList = res.data.data.data
  167 + for (let i in baseList) {
  168 + baseList[i].day = this.Moment(new Date(baseList[i].time)).format('MM-DD')
  169 + baseList[i].minute = this.Moment(new Date(baseList[i].time)).format('HH:mm')
  170 + }
  171 + console.log(baseList)
  172 + this.baseList = baseList
  173 + } else {
  174 + this.$toast.fail(res.data.message)
  175 + }
  176 + },
  177 + onFail: err => {
  178 + console.log('err', err)
  179 + }
  180 + });
  181 + },
  182 + // 根据用户编号获取打卡和课程天数信息
  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 => {
  197 + this.$toast.clear()
  198 + console.log('天数:', res.data)
  199 + if (res.data.status == 1) {
  200 + this.signCheckCountInfo = res.data.data
  201 + } else {
  202 + this.$toast.fail(res.data.message)
  203 + }
  204 + },
  205 + onFail: err => {
  206 + console.log('err', err)
  207 + }
  208 + });
  209 + },
  210 + // 研学码
  211 + handleYanxue () {
  212 + this.$router.push({ name: 'YanxueCode' })
  213 + },
  214 + // 联系客服
  215 + contactService () {
  216 + // if (this.detailData.mobiles) {
  217 + // location.href = "tel://" + this.detailData.mobiles.split(",")[0];
  218 + // }
  219 + },
  220 + // 基地评价
  221 + evaluateBase (item) {
  222 + this.$router.push({ name: 'evaluateBase', query: { baseId: item.baseId, signId: item.signId } })
  223 + },
  224 + // 课程评价
  225 + evaluateCourse (item) {
  226 + let courseInfo = item;
  227 + courseInfo.id = courseInfo.orderId
  228 + window.sessionStorage.setItem('courseInfo', JSON.stringify(courseInfo))
  229 + this.$router.push({ name: 'evaluateCourse' })
  230 + },
  231 + // 基地评价详情
  232 + evaluateBaseDetail (item) {
  233 + this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId, baseId: item.baseId } })
  234 + },
  235 + // 课程评价详情
  236 + evaluateCourseDetail (item) {
  237 + this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId } })
  238 + }
  239 + },
  240 + components: {
  241 + HomeScan
  242 + },
  243 +}
  244 +</script>
  245 +<style lang="scss" scoped>
  246 +.student_detail {
  247 + height: 100%;
  248 + background: rgb(247, 247, 251);
  249 + .infomation {
  250 + width: 100%;
  251 + height: 852px;
  252 + background: url("~@/assets/home/bg_stu.png");
  253 + background-size: 100%;
  254 + background-position: center;
  255 + .top {
  256 + display: flex;
  257 + flex-wrap: wrap;
  258 + align-items: center;
  259 + justify-content: space-between;
  260 + padding: 40px 28px;
  261 + > div {
  262 + display: flex;
  263 + }
  264 + .head {
  265 + width: 96px;
  266 + height: 96px;
  267 + border-radius: 50%;
  268 + overflow: hidden;
  269 + }
  270 + .right {
  271 + width: 450px;
  272 + height: 96px;
  273 + margin-left: 24px;
  274 + display: flex;
  275 + align-content: space-around;
  276 + flex-wrap: wrap;
  277 + color: #fff;
  278 + .name {
  279 + font-size: 34px;
  280 + font-weight: bold;
  281 + width: 100%;
  282 + span {
  283 + display: inline-block;
  284 + padding: 0 14px;
  285 + margin-left: 14px;
  286 + line-height: 34px;
  287 + border-radius: 17px;
  288 + font-size: 22px;
  289 + background: #2d90d2;
  290 + vertical-align: middle;
  291 + }
  292 + }
  293 + .school_name {
  294 + font-size: 26px;
  295 + }
  296 + }
  297 + }
  298 + .count_box {
  299 + display: flex;
  300 + align-items: center;
  301 + justify-content: space-around;
  302 + padding: 0 24px;
  303 + margin-top: 30px;
  304 + .count_item {
  305 + color: #fff;
  306 + text-align: center;
  307 + .count {
  308 + font-size: 24px;
  309 + span {
  310 + font-size: 38px;
  311 + font-weight: bold;
  312 + margin-right: 6px;
  313 + }
  314 + }
  315 + .des {
  316 + margin-top: 14px;
  317 + font-size: 28px;
  318 + }
  319 + }
  320 + .line {
  321 + width: 4px;
  322 + height: 48px;
  323 + background: #fff;
  324 + }
  325 + }
  326 + .icon_box {
  327 + display: flex;
  328 + align-items: center;
  329 + justify-content: space-around;
  330 + width: 702px;
  331 + height: 158px;
  332 + background: #ffffff;
  333 + border-radius: 16px;
  334 + margin: 0 auto;
  335 + margin-top: 30px;
  336 + .icon_item {
  337 + text-align: center;
  338 + img {
  339 + width: 70px;
  340 + }
  341 + p {
  342 + font-size: 26px;
  343 + }
  344 + }
  345 + .line {
  346 + width: 4px;
  347 + height: 48px;
  348 + background: #fff;
  349 + }
  350 + }
  351 + }
  352 + .list_box {
  353 + width: 702px;
  354 + margin: 0 auto;
  355 + margin-top: -300px;
  356 + overflow: hidden;
  357 + border-radius: 16px;
  358 + background: #fff;
  359 + .list_item {
  360 + position: relative;
  361 + display: flex;
  362 + align-items: center;
  363 + &:first-of-type {
  364 + margin-top: 20px;
  365 + }
  366 + .left {
  367 + width: 110px;
  368 + padding-right: 30px;
  369 + text-align: right;
  370 + font-size: 34px;
  371 + .day {
  372 + }
  373 + .minute {
  374 + font-size: 30px;
  375 + color: #999;
  376 + }
  377 + }
  378 + .line {
  379 + width: 2px;
  380 + height: 188px;
  381 + background: #e5e5e5;
  382 + border-radius: 1px;
  383 + }
  384 + .right {
  385 + margin-left: 30px;
  386 + img {
  387 + display: inline-block;
  388 + width: 128px;
  389 + height: 128px;
  390 + border-radius: 16px;
  391 + }
  392 + .item_title {
  393 + display: inline-block;
  394 + width: 360px;
  395 + margin-left: 22px;
  396 + font-size: 30px;
  397 + vertical-align: top;
  398 + }
  399 + button {
  400 + position: absolute;
  401 + bottom: 30px;
  402 + right: 20px;
  403 + width: 144px;
  404 + line-height: 44px;
  405 + background: #fff;
  406 + color: #21a3ff;
  407 + border-radius: 8px;
  408 + border: 2px solid #21a3ff;
  409 + font-size: 26px;
  410 + &.active {
  411 + background: #21a3ff;
  412 + color: #fff;
  413 + }
  414 + }
  415 + }
  416 + }
  417 + }
  418 +}
  419 +</style>
0 \ No newline at end of file 420 \ No newline at end of file
src/views/Home/YanxueCode.vue 0 → 100644
@@ -0,0 +1,154 @@ @@ -0,0 +1,154 @@
  1 +<template>
  2 + <div id="codeBox">
  3 + <div class="blueCard">
  4 + <div class="name">{{studentInfo.travelerName ? studentInfo.travelerName : ''}}</div>
  5 + <div class="school">
  6 + <div class="pic"><img src="@/assets/yxCode/school.png" style="width:100%;height:100%" /></div>
  7 + <div class="gray">学校:</div>
  8 + <div>{{studentInfo.schoolName ? studentInfo.schoolName : ''}}</div>
  9 + </div>
  10 + <div class="school">
  11 + <div class="pic"><img src="@/assets/yxCode/classroom.png" style="width:100%;height:100%" /></div>
  12 + <div class="gray">入学年份:</div>
  13 + <div>{{studentInfo.enrollYear ? studentInfo.enrollYear : ''}}</div>
  14 + </div>
  15 + </div>
  16 + <div id="qrcode" ref="imageWrapper" v-if="!imgUrl"></div>
  17 + <div class="codeDiv">
  18 + <img :src="imgUrl" v-if="imgUrl" style="width:100%;height:100%" />
  19 + </div>
  20 + <div class="fontDiv">
  21 + <div @click="sweep">绑定研学码</div>
  22 + <div class="blueLine"></div>
  23 + <div @click="downQrCode">下载一生一码</div>
  24 + </div>
  25 +
  26 + </div>
  27 +</template>
  28 +
  29 +<script>
  30 +import QRCode from 'qrcodejs2';
  31 +import html2canvas from "html2canvas"
  32 +export default {
  33 + data () {
  34 + return {
  35 + studentInfo: {},
  36 + qrcodePIc: {},
  37 + imgUrl: ''
  38 + }
  39 + },
  40 + mounted () {
  41 + this.studentInfo = JSON.parse(sessionStorage.getItem('StudentDetialInfo'));
  42 + this.creatQrCode()
  43 + },
  44 + methods: {
  45 + //扫一扫页面
  46 + sweep () {
  47 + this.$router.push({ name: 'YanxueInfo' })
  48 + },
  49 + //创建qrcode
  50 + creatQrCode () {
  51 + let text = this.studentInfo.studyCode ? this.studentInfo.studyCode : ""
  52 + if (text == '') {
  53 + this.$toast('请先绑定研学码');
  54 + }
  55 + // let text = 'https://www.baidu.com/'
  56 + console.log(text)
  57 + document.getElementById('qrcode').innerHTML = '';
  58 + this.qrcodePIc = new QRCode('qrcode', {
  59 + text: text,
  60 + width: 240,
  61 + height: 240,
  62 + colorDark: '#333333', // 二维码颜色
  63 + colorLight: '#ffffff', // 二维码背景色
  64 + correctLevel: QRCode.CorrectLevel.L // 容错率,L/M/H
  65 + });
  66 + let canvas = document.getElementById('qrcode').innerHTML
  67 + console.log(canvas)
  68 + this.canvanqrCode()
  69 + },
  70 + canvanqrCode () {
  71 + html2canvas(this.$refs.imageWrapper, {
  72 + width: 240,
  73 + height: 240
  74 + }).then(canvas => {
  75 + let dataURL = canvas.toDataURL("image/png");
  76 + this.imgUrl = dataURL;
  77 + });
  78 + },
  79 + downQrCode () {
  80 + //下载二维码
  81 + this.$toast('请长按二维码进行保存!')
  82 + },
  83 + }
  84 +}
  85 +</script>
  86 +
  87 +<style lang="scss" scoped>
  88 +#codeBox {
  89 + width: 100%;
  90 + height: 100%;
  91 + overflow: hidden;
  92 + .blueCard {
  93 + width: 94vw;
  94 + height: 35vw;
  95 + margin: 5vw auto;
  96 + // background-color: royalblue;
  97 + background-image: url("~@/assets/yxCode/bck.png");
  98 + -moz-background-size: 100% 100%;
  99 + background-size: 100% 100%;
  100 + padding: 5vw 7vw;
  101 + box-sizing: border-box;
  102 + border-radius: 3vw;
  103 +
  104 + .name {
  105 + color: #fff;
  106 + font-size: 4.5vw;
  107 + margin-bottom: 4vw;
  108 + }
  109 + .school {
  110 + color: #fff;
  111 + display: flex;
  112 + font-size: 3.7vw;
  113 + margin-bottom: 4vw;
  114 + display: flex;
  115 + align-items: center;
  116 + .pic {
  117 + width: 4.7vw;
  118 + height: 4.7vw;
  119 + margin-right: 2vw;
  120 + }
  121 + .gray {
  122 + color: #f3f3f3;
  123 + }
  124 + }
  125 + }
  126 + .codeDiv {
  127 + width: 67vw;
  128 + height: 67vw;
  129 + margin: 8vw auto;
  130 + }
  131 + .fontDiv {
  132 + width: 56vw;
  133 + margin: 0 auto;
  134 + font-size: 4vw;
  135 + color: #4092ff;
  136 + display: flex;
  137 + justify-content: space-between;
  138 +
  139 + .blueLine {
  140 + height: 3.8vw;
  141 + width: 0.5px;
  142 + margin-top: 1vw;
  143 + background-color: #000000;
  144 + display: flex;
  145 + align-items: center;
  146 + }
  147 + }
  148 + #qrcode {
  149 + position: absolute;
  150 + top: -100vh;
  151 + left: -100vw;
  152 + }
  153 +}
  154 +</style>
0 \ No newline at end of file 155 \ No newline at end of file
src/views/Home/YanxueInfo.vue 0 → 100644
@@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
  1 +<template>
  2 + <div>
  3 + <van-field v-model="school" label="学校" readonly placeholder="学校" />
  4 + <van-field v-model="name" label="学生姓名" readonly placeholder="姓名" />
  5 + <van-field v-model="userNum" label="用户编号" readonly placeholder="用户编号" />
  6 + <van-field v-model="codeNum" label="研学码" readonly placeholder="研学码">
  7 + <van-button slot="button" size="small" native-type="button" @click="saoYiSao">扫一扫</van-button>
  8 + </van-field>
  9 + <van-button type="primary" block @click="getbind">提交</van-button>
  10 + </div>
  11 +</template>
  12 +
  13 +<script>
  14 +export default {
  15 + data () {
  16 + return {
  17 + codeNum: '',
  18 + userNum: '',
  19 + school: '',
  20 + name: ''
  21 + }
  22 + },
  23 + created () {
  24 +
  25 + let studentInfo = JSON.parse(sessionStorage.getItem('StudentDetialInfo'));
  26 + this.userNum = studentInfo.travelerNum
  27 + this.school = studentInfo.schoolName
  28 + this.name = studentInfo.travelerName
  29 + this.codeNum = this.GetQueryString('qrresult') || studentInfo.studyCode;
  30 + },
  31 + methods: {
  32 + getbind () {
  33 + if (this.userNum == '' || this.codeNum == '') {
  34 + return this.$toast('请先填写完整信息!');
  35 + }
  36 + this.yxAxios.get(this.proxyUrl + '/prod/user/info/bingStudyCode?userNum=' + this.userNum + '&code=' + this.codeNum)
  37 + .then((res) => {
  38 + console.log('接口返回', res.data)
  39 + if (res.data.code == '200') {
  40 + this.$toast('操作成功');
  41 + this.$router.push({ name: 'YanxueCode' })
  42 + } else {
  43 + this.$toast('操作失败:' + res.data.message);
  44 + }
  45 + })
  46 + },
  47 + //扫一扫
  48 + saoYiSao () {
  49 + window.location.href = 'http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/YanxueInfo';
  50 + },
  51 + // 获取链接参数
  52 + GetQueryString (name) {
  53 + var reg = new RegExp("\\b" + name + "=([^&]*)");
  54 + var r = location.href.match(reg);
  55 + if (r != null) return decodeURIComponent(r[1]);
  56 + }
  57 + }
  58 +}
  59 +</script>
  60 +
  61 +<style>
  62 +</style>
0 \ No newline at end of file 63 \ No newline at end of file
src/views/Home/component/AddChildPopupGroup.vue 0 → 100644
@@ -0,0 +1,662 @@ @@ -0,0 +1,662 @@
  1 +<template>
  2 + <div>
  3 + <div class="addchild_group" v-if="step==1">
  4 + <img class="bg" src="@/assets/home/bg2.png" alt="">
  5 + <p class="title">添加学生</p>
  6 + <p class="des">完善相关信息可帮助获得最佳使用体验 </p>
  7 + <div class="phone_content">
  8 + <div class="item">
  9 + <p class="phone_title">手机号</p>
  10 + <div class="flex">
  11 + <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号">
  12 + <span class="getcode" @click="getCode">{{codeText}}</span>
  13 + </div>
  14 + </div>
  15 + <div class="item">
  16 + <p class="phone_title">验证码</p>
  17 + <input class="code" type="text" v-model="code" placeholder="请输入验证码">
  18 + </div>
  19 + <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button>
  20 + </div>
  21 + </div>
  22 + <div class="addchild_group" v-if="step==2">
  23 + <img class="bg" src="@/assets/home/bg2.png" alt="">
  24 + <p class="title">已查询到{{claimChildList.length}}位学生信息</p>
  25 + <p class="des">请仔细确认学生信息后再认领</p>
  26 + <div class="child_content">
  27 + <div class="child_box">
  28 + <div class="child_item" v-for="(item,index) in claimChildList" :key="index">
  29 + <p><span>姓名</span>{{item.travelerName}}</p>
  30 + <p><span>阶段</span>{{item.travelerType==1?'小学':item.travelerType==2?'初中':'高中'}}</p>
  31 + <p><span>所在地区</span>{{item.province+item.city+item.area}}</p>
  32 + <p><span>学校</span>{{item.schoolName}}</p>
  33 + <p><span>入学年份</span>{{item.enrollYear}}</p>
  34 + <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox>
  35 + </div>
  36 + </div>
  37 + <button class="submit" @click="claimChild">认领</button>
  38 + </div>
  39 + </div>
  40 + <div class="addchild_group" v-if="step==3">
  41 + <img class="bg" src="@/assets/home/bg2.png" alt="">
  42 + <p class="title">添加学生信息</p>
  43 + <p class="des">如验证号码非学校预留号码,请按步骤自行添加完善学生信息。</p>
  44 + <div class="content">
  45 + <div class="name">学生信息</div>
  46 + <div class="item">
  47 + <input type="text" placeholder="请输入学生姓名" v-model="studentName">
  48 + </div>
  49 + <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;">
  50 + <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p>
  51 + <img src="@/assets/more.png" alt="">
  52 + </div>
  53 + <div class="item" @click="handleYear" style="width:48%;display:inline-flex;">
  54 + <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p>
  55 + <img src="@/assets/more.png" alt="">
  56 + </div>
  57 + <div class="item" @click="showAreaSelect=true">
  58 + <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>
  59 + <img src="@/assets/more.png" alt="">
  60 + </div>
  61 + <div class="item">
  62 + <input type="text" placeholder="请选择学校" readonly v-model="school">
  63 + <button type="info" class="btn" @click="chooseSchool">选择学校</button>
  64 + </div>
  65 + <button class="submit" @click="submit">完成</button>
  66 + </div>
  67 + </div>
  68 + <van-popup v-model="showUserTypeSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">
  69 + <van-picker title="当前阶段" show-toolbar :columns="userTypeArr" value-key="label" @cancel="showUserTypeSelect = false" @confirm="selectUserTypeOver" />
  70 + </van-popup>
  71 + <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">
  72 + <van-picker title="入学年份" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />
  73 + </van-popup>
  74 + <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">
  75 + <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />
  76 + </van-popup>
  77 +
  78 + <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true">
  79 + <div v-if="chooseSchoolisShow">
  80 + <chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool>
  81 + </div>
  82 + </van-popup>
  83 + </div>
  84 +</template>
  85 +
  86 +<script>
  87 +
  88 +import chooseSchool from '@/views/Service/component/chooseSchool'
  89 +var codeInterval;
  90 +export default {
  91 + components: { chooseSchool },
  92 + data () {
  93 + return {
  94 + step: 1,
  95 + publicName: '',
  96 + phone: '',
  97 + codeText: '获取验证码',//获取验证码按钮文字
  98 + code: '',//验证码
  99 + studentName: '',
  100 + showDialog: true,
  101 +
  102 + claimChildList: [],
  103 +
  104 + year: '',//入学年份
  105 + yearDisable: false,
  106 + showYearSelect: false,
  107 + yearArr: [],
  108 +
  109 + userType: '',
  110 + userTypeVal: '',//所处阶段1-小学 2-初中 3-高中
  111 + showUserTypeSelect: false,
  112 + userTypeArr: [{
  113 + label: '小学',
  114 + value: 1
  115 + }, {
  116 + label: '初中',
  117 + value: 2
  118 + }, {
  119 + label: '高中',
  120 + value: 3
  121 + }],
  122 +
  123 + area: '',
  124 + areaCode: '',
  125 + showAreaSelect: false,
  126 + areaList: [],
  127 +
  128 + searchSchool: '',
  129 + school: '',
  130 + schoolId: '',
  131 +
  132 + appId: '',
  133 + chooseSchoolisShow: false
  134 + }
  135 + },
  136 +
  137 + mounted () {
  138 + let publicName = sessionStorage.getItem('publicName')
  139 + this.publicName = publicName
  140 + let userInfo = sessionStorage.getItem('userInfo')
  141 + this.userInfo = JSON.parse(userInfo);
  142 + this.initYearArr()
  143 + this.GetSysAreaList()
  144 + },
  145 + methods: {
  146 + // 获取验证码
  147 + getCode () {
  148 + if (this.codeText != '获取验证码') return;
  149 + if (!this.phone) {
  150 + this.$toast('请输入手机号')
  151 + return;
  152 + }
  153 + if (!this.checkPhone(this.phone)) {
  154 + this.$toast('请输入正确的手机号')
  155 + return;
  156 + }
  157 + this.$toast.loading({
  158 + message: '加载中',
  159 + duration: 0,
  160 + forbidClick: true
  161 + })
  162 + this.http.getMsg({
  163 + phone: this.phone
  164 + }).then((res) => {
  165 + this.$toast.clear()
  166 + if (res.success) {
  167 + let i = 60;
  168 + codeInterval = setInterval(() => {
  169 + if (i == 0) {
  170 + this.codeText = `获取验证码`;
  171 + clearInterval(codeInterval);
  172 + return;
  173 + }
  174 + this.codeText = `重试(${i})`;
  175 + i--
  176 + }, 1000)
  177 + } else {
  178 + this.$toast.fail(res.message)
  179 + }
  180 + })
  181 + },
  182 + // 获取手机号白名单信息
  183 + checkPhoneAndCode () {
  184 + if (!this.phone) {
  185 + this.$toast('请输入手机号')
  186 + return;
  187 + }
  188 + if (!this.checkPhone(this.phone)) {
  189 + this.$toast('请输入正确的手机号')
  190 + return;
  191 + }
  192 + if (!this.code) {
  193 + this.$toast('请输入验证码')
  194 + return;
  195 + }
  196 + this.$toast.loading({
  197 + message: '加载中',
  198 + duration: 0,
  199 + forbidClick: true
  200 + })
  201 +
  202 + this.yxAxios.post(`${this.proxyUrl}/prod/user/info/checkPhoneAndCode`, {
  203 + "code": this.code,
  204 + "phone": this.phone,
  205 + "unionId": sessionStorage.getItem('centerNo')
  206 + }).then((res) => {
  207 + this.$toast.clear()
  208 + if (res.data.code == 200) {
  209 + if (res.data.data.length == 0) {
  210 + // 白名单无用户
  211 + this.step = 3;
  212 + } else {
  213 + // 白名单有用户
  214 + let claimChildList = res.data.data
  215 + for (let i in claimChildList) {
  216 + claimChildList[i].checked = false
  217 + }
  218 + this.claimChildList = claimChildList
  219 + this.step = 2;
  220 + }
  221 + } else {
  222 + this.$toast.fail(res.data?.message)
  223 + }
  224 + })
  225 + },
  226 +
  227 +
  228 + // 认领孩子
  229 + claimChild () {
  230 + const claimChildList = this.claimChildList;
  231 + let claimChildId = ''
  232 + for (let i in claimChildList) {
  233 + if (claimChildList[i].checked) {
  234 + if (claimChildId == '') {
  235 + claimChildId = claimChildList[i].travelerNum
  236 + } else {
  237 + claimChildId = claimChildId + ',' + claimChildList[i].travelerNum
  238 + }
  239 + }
  240 + }
  241 + this.$toast.loading({
  242 + message: '加载中...',
  243 + duration: 0,
  244 + forbidClick: true
  245 + })
  246 + this.mgop({
  247 + api: 'mgop.sz.hswsy.claimChildren', // 必须
  248 + host: 'https://mapi.zjzwfw.gov.cn/',
  249 + dataType: 'JSON',
  250 + type: 'POST',
  251 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  252 + headers: {
  253 + // 'isTestUrl': '1'
  254 + },
  255 + data: {
  256 + "loginMobile": this.phone,
  257 + "subUserNums": claimChildId
  258 + },
  259 + onSuccess: res => {
  260 + this.$toast.clear()
  261 + if (res.data.code == 200) {
  262 + this.$toast.success('认领成功')
  263 + this.$emit('complete')
  264 + } else {
  265 + this.$toast.fail(res.data?.message)
  266 + }
  267 + },
  268 + onFail: err => {
  269 + console.log('err', err)
  270 + }
  271 + });
  272 + },
  273 +
  274 +
  275 + // 初始化入学年份选项
  276 + initYearArr () {
  277 + // 页面创建时执行
  278 + let year = new Date().getFullYear(),
  279 + Month = new Date().getMonth() + 1,
  280 + yearArr = [];
  281 + if (Month > 8) {
  282 + // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份
  283 + year = year
  284 + }
  285 + for (let index = year; index > year - 6; index--) {
  286 + yearArr.push({ value: index, label: index })
  287 + }
  288 + this.yearArr = yearArr
  289 + },
  290 + selectYearOver (value) {
  291 + this.year = value.label;
  292 + this.showYearSelect = false;
  293 + },
  294 + handleYear () {
  295 + if (!this.yearDisable) {
  296 + this.showYearSelect = true;
  297 + }
  298 + },
  299 + selectUserTypeOver (value) {
  300 + this.userType = value.label;
  301 + this.userTypeVal = value.value;
  302 + this.showUserTypeSelect = false;
  303 + },
  304 + // 获取地区列表
  305 + GetSysAreaList () {
  306 + this.mgop({
  307 + api: 'mgop.sz.hswsy.GetSysAreaList', // 必须
  308 + host: 'https://mapi.zjzwfw.gov.cn/',
  309 + dataType: 'JSON',
  310 + type: 'GET',
  311 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  312 + headers: {
  313 + // 'isTestUrl': '1'
  314 + },
  315 + data: {
  316 + "areaCode": 33
  317 + },
  318 + onSuccess: res => {
  319 + console.log('获取地区列表', res)
  320 + if (res.data.success) {
  321 + let data = res.data.data;
  322 + let obj = {
  323 + province_list: {
  324 + 330000: '浙江省'
  325 + },
  326 + city_list: {},
  327 + county_list: {}
  328 + };
  329 + if (data) {
  330 + data.forEach((n, i) => {
  331 + obj.city_list[n.area_code + '00'] = n.area_name;
  332 + if (n.areaList.length > 0) {
  333 + n.areaList.forEach((k, j) => {
  334 + obj.county_list[k.area_code] = k.area_name;
  335 + })
  336 + }
  337 + });
  338 + this.areaList = obj;
  339 + }
  340 + } else {
  341 + this.$toast.fail(res.message)
  342 + }
  343 + },
  344 + onFail: err => {
  345 + console.log('err', err)
  346 + }
  347 + });
  348 + },
  349 + selectAreaOver (value) {
  350 + let data = value;
  351 + var city = data[1].code;
  352 + city = city.substring(0, city.length - 2);
  353 + // console.log(city)
  354 + this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;
  355 + this.areaCode = [data[0].code, city, data[2].code];
  356 + this.quCode = data[2].code;
  357 + this.school = '',
  358 + this.schoolId = '',
  359 + this.showAreaSelect = false
  360 + },
  361 +
  362 + submit () {
  363 + if (!this.studentName) {
  364 + this.$toast('请输入姓名');
  365 + }
  366 + else if (!this.userType) {
  367 + this.$toast('请选择阶段');
  368 + }
  369 + else if (!this.year) {
  370 + this.$toast('请选择入学年份');
  371 + }
  372 + else if (!this.area) {
  373 + this.$toast('请选择地区');
  374 + }
  375 + else if (!this.school) {
  376 + this.$toast('请选择学校');
  377 + } else {
  378 + let postData = {
  379 + contactsName: this.studentName,
  380 + contactsMobile: this.phone,
  381 + contactsType: 1,
  382 + province: this.area.split(',')[0],//省份
  383 + city: this.area.split(',')[1],//城市
  384 + area: this.area.split(',')[2],//地区
  385 + schoolName: this.school,//学校名称
  386 + enrollYear: this.year,//入学年份
  387 + travelerType: this.userTypeVal,//1-小学 2-初中 3-高中
  388 + loginMobile: this.userInfo?.phone
  389 + }
  390 + this.$toast.loading({
  391 + message: '加载中',
  392 + duration: 0,
  393 + forbidClick: true
  394 + })
  395 + this.mgop({
  396 + api: 'mgop.sz.hswsy.addStudent', // 必须
  397 + host: 'https://mapi.zjzwfw.gov.cn/',
  398 + dataType: 'JSON',
  399 + type: 'GET',
  400 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  401 + headers: {
  402 + // 'isTestUrl': '1'
  403 + },
  404 + data: postData,
  405 + onSuccess: res => {
  406 + console.log('添加学生:', res)
  407 + this.$toast.clear()
  408 + if (res.data.code == 200) {
  409 + this.$toast.success('添加学生成功')
  410 + this.$emit('complete')
  411 + } else {
  412 + this.$toast.fail(res.data?.message)
  413 + }
  414 + },
  415 + onFail: err => {
  416 + console.log('err', err)
  417 + }
  418 + });
  419 + }
  420 + },
  421 + //选择学校
  422 + chooseSchool () {
  423 + // this.$router.push({name: 'chooseSchool'})
  424 + this.chooseSchoolisShow = true
  425 + },
  426 + schoolData (val) {
  427 + this.school = val.text;
  428 + this.schoolId = val.id;
  429 + },
  430 + checkPhone (phone) {
  431 + if ((/^1[3456789]\d{9}$/.test(phone))) {
  432 + return true
  433 + } else {
  434 + return false
  435 + }
  436 + },
  437 + },
  438 + destroyed () {
  439 + clearInterval(codeInterval);
  440 + },
  441 +}
  442 +</script>
  443 +<style lang="scss" scoped>
  444 +.addchild_group {
  445 + width: 638px;
  446 + height: 836px;
  447 + background: #ffffff;
  448 + border-radius: 24px;
  449 + position: relative;
  450 + .bg {
  451 + width: 100%;
  452 + position: absolute;
  453 + top: 0;
  454 + left: 0;
  455 + }
  456 + .title {
  457 + position: relative;
  458 + width: 100%;
  459 + padding-top: 70px;
  460 + padding-bottom: 8px;
  461 + text-align: center;
  462 + font-size: 34px;
  463 + font-weight: bold;
  464 + color: #0857ff;
  465 + }
  466 + .des {
  467 + position: relative;
  468 + width: 100%;
  469 + box-sizing: border-box;
  470 + padding: 0 15%;
  471 + text-align: center;
  472 + font-size: 24px;
  473 + color: #6596ff;
  474 + }
  475 + .content {
  476 + width: 100%;
  477 + box-sizing: border-box;
  478 + padding: 0 40px;
  479 + position: absolute;
  480 + top: 236px;
  481 + left: 0;
  482 + .name {
  483 + width: 558px;
  484 + height: 50px;
  485 + font-size: 28px;
  486 + color: #000;
  487 + padding-left: 20px;
  488 + box-sizing: border-box;
  489 + }
  490 + .item {
  491 + width: 558px;
  492 + height: 72px;
  493 + border-radius: 36px;
  494 + background: #f7f7f7;
  495 + box-sizing: border-box;
  496 + font-size: 28px;
  497 + padding: 0 32px;
  498 + display: flex;
  499 + justify-content: space-between;
  500 + align-items: center;
  501 + margin-bottom: 28px;
  502 + p {
  503 + color: #333333;
  504 + &.nodata {
  505 + color: #999999;
  506 + }
  507 + }
  508 + img {
  509 + width: 40px;
  510 + }
  511 + input {
  512 + width: 100%;
  513 + background: transparent;
  514 + border: 0;
  515 + color: #333333;
  516 + padding: 0;
  517 + &::-webkit-input-placeholder {
  518 + color: #999999;
  519 + }
  520 + }
  521 + .btn {
  522 + width: 240px;
  523 + height: 55px;
  524 + float: right;
  525 + font-size: 28px;
  526 + background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%);
  527 + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),
  528 + 0px 8px 12px 0px rgba(89, 199, 171, 0.5);
  529 + border-radius: 34px;
  530 + border: transparent;
  531 + color: #333333;
  532 + }
  533 + }
  534 + .school_select {
  535 + font-size: 28px;
  536 + padding: 0 32px;
  537 + margin-bottom: 28px;
  538 + }
  539 + .submit {
  540 + width: 294px;
  541 + height: 72px;
  542 + border: 0;
  543 + background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);
  544 + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),
  545 + 0px 8px 12px 0px rgba(87, 137, 255, 0.5);
  546 + border-radius: 34px;
  547 + font-size: 34px;
  548 + color: #ffffff;
  549 + margin: 0 auto;
  550 + display: block;
  551 + }
  552 + }
  553 + .child_content {
  554 + position: relative;
  555 + margin-top: 40px;
  556 + .child_box {
  557 + height: 500px;
  558 + overflow: auto;
  559 + padding-left: 100px;
  560 + .child_item {
  561 + position: relative;
  562 + margin-bottom: 50px;
  563 + p {
  564 + font-size: 28px;
  565 + padding: 8px 0;
  566 + span {
  567 + display: inline-block;
  568 + width: 140px;
  569 + margin-right: 28px;
  570 + color: #999;
  571 + }
  572 + }
  573 + .checkbox {
  574 + position: absolute;
  575 + top: 115px;
  576 + right: 20px;
  577 + }
  578 + }
  579 + }
  580 + .submit {
  581 + width: 438px;
  582 + height: 78px;
  583 + background: #3385ff;
  584 + border-radius: 37px;
  585 + border-radius: 39px;
  586 + border: 0;
  587 + font-size: 34px;
  588 + color: #ffffff;
  589 + margin: 0 auto;
  590 + display: block;
  591 + }
  592 + }
  593 + .phone_content {
  594 + width: 100%;
  595 + position: absolute;
  596 + top: 180px;
  597 + left: 0;
  598 + box-sizing: border-box;
  599 + padding: 40px;
  600 + .item {
  601 + border-bottom: 1px solid #e2e2e2;
  602 + margin-bottom: 30px;
  603 + }
  604 + .phone_title {
  605 + font-size: 34px;
  606 + font-weight: bold;
  607 + margin-bottom: 28px;
  608 + }
  609 + .flex {
  610 + display: flex;
  611 + align-items: center;
  612 + justify-content: space-between;
  613 + margin-bottom: 22px;
  614 + }
  615 + .code {
  616 + border: 0;
  617 + background: transparent;
  618 + font-size: 28px;
  619 + margin-bottom: 32px;
  620 + width: 100%;
  621 + }
  622 + .phone {
  623 + width: 50%;
  624 + margin: 0;
  625 + }
  626 + .getcode {
  627 + color: #5789ff;
  628 + font-size: 28px;
  629 + padding: 10px;
  630 + }
  631 + .submit {
  632 + width: 438px;
  633 + height: 78px;
  634 + background: #3385ff;
  635 + border-radius: 37px;
  636 + border-radius: 39px;
  637 + border: 0;
  638 + font-size: 34px;
  639 + color: #ffffff;
  640 + margin: 0 auto;
  641 + margin-top: 120px;
  642 + display: block;
  643 + }
  644 + }
  645 +}
  646 +::v-deep .van-search {
  647 + background: transparent;
  648 + padding: 0;
  649 + width: 100%;
  650 +}
  651 +::v-deep .van-search__content {
  652 + padding: 0;
  653 +}
  654 +.schoolBoxF {
  655 + width: 100vw;
  656 + height: 100vh;
  657 + position: absolute;
  658 + top: 0;
  659 + left: 0;
  660 + background-color: #fff;
  661 +}
  662 +</style>
src/views/Home/component/HomeChildList.vue 0 → 100644
@@ -0,0 +1,201 @@ @@ -0,0 +1,201 @@
  1 +<template>
  2 + <div class="home_child_list home_child_list_kq">
  3 + <div class="stu_info" v-for="(item,index) in childList" :key="index" @click="handleStudentDetail(index)">
  4 + <div class="title">
  5 + <p>学生信息</p>
  6 + <!-- <button @click="handleYanxue(index)">出示研学码</button> -->
  7 + </div>
  8 + <img v-if="item.whiteFlag" class="img_auth" src="@/assets/home/auth.png" alt="">
  9 + <div class="item">
  10 + <van-icon name="manager" /><span>{{item.travelerName}}</span>
  11 + </div>
  12 + <div class="item">
  13 + <van-icon name="medal" /><span>{{item.enrollYear}}</span>
  14 + </div>
  15 + <div class="item">
  16 + <van-icon name="wap-home" /><span>{{item.schoolName}}</span>
  17 + </div>
  18 + </div>
  19 + <div class="add_btn" @click="addStudent">
  20 + <van-icon name="add" />
  21 + 添加学生信息
  22 + </div>
  23 + <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup">
  24 + <AddChildPopupGroup @complete="complete"></AddChildPopupGroup>
  25 + </van-popup>
  26 + </div>
  27 +</template>
  28 +<script>
  29 +import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup'
  30 +
  31 +export default {
  32 + props: {
  33 + parent: {
  34 + type: String,
  35 + default: ''
  36 + }
  37 + },
  38 + data () {
  39 + return {
  40 + showAddChildPopupGroup: false,//新增孩子弹出框
  41 + childList: [],//孩子列表
  42 + }
  43 + },
  44 + mounted () {
  45 + this.getChildList()
  46 + },
  47 + methods: {
  48 + // 研学码
  49 + // handleYanxue (index) {
  50 + // sessionStorage.setItem('bindYanxueCodeChildInfo',JSON.stringify(this.childList[index]))
  51 + // this.$router.push({ name: 'YanxueCode' })
  52 + // },
  53 + // 进入学生详情页
  54 + handleStudentDetail (index) {
  55 + sessionStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index]))
  56 + this.$router.push({ name: 'StudentDetail' })
  57 + },
  58 + // 获取孩子列表
  59 + getChildList () {
  60 + this.$toast.loading({
  61 + message: '加载中...',
  62 + duration: 0,
  63 + forbidClick: true
  64 + })
  65 + this.mgop({
  66 + api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须
  67 + host: 'https://mapi.zjzwfw.gov.cn/',
  68 + dataType: 'JSON',
  69 + type: 'GET',
  70 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  71 + headers: {
  72 + // 'isTestUrl': '1'
  73 + },
  74 + data: {
  75 + "userNum": sessionStorage.getItem('centerNo')
  76 + },
  77 + onSuccess: res => {
  78 + console.log('getUserInfo', res)
  79 + this.$toast.clear()
  80 + if (res.data.code == 200) {
  81 + this.childList = res.data.data.userInfo.subUsers
  82 + }
  83 + },
  84 + onFail: err => {
  85 + console.log('err', err)
  86 + }
  87 + });
  88 + },
  89 + addStudent(){
  90 + this.showAddChildPopupGroup=true
  91 + },
  92 + complete () {
  93 + this.showAddChildPopupGroup = false;
  94 + this.getChildList()
  95 + },
  96 + },
  97 + components: {
  98 + AddChildPopupGroup
  99 + }
  100 +
  101 +}
  102 +</script>
  103 +<style lang="scss">
  104 +.home_child_list {
  105 + width: 100%;
  106 + padding: 16px 24px;
  107 + box-sizing: border-box;
  108 + .stu_info {
  109 + position: relative;
  110 + width: 100%;
  111 + height: 252px;
  112 + box-sizing: border-box;
  113 + padding: 24px 28px;
  114 + margin-bottom: 16px;
  115 + border-radius: 12px;
  116 + &:nth-of-type(2n) {
  117 + background: linear-gradient(47deg, #ff7371 0%, #fdd17c 100%);
  118 + box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11);
  119 + }
  120 + &:nth-of-type(2n-1) {
  121 + background: linear-gradient(41deg, #316ff0 0%, #2afffb 100%);
  122 + box-shadow: 0px 4px 8px 0px rgba(37, 171, 255, 0.34);
  123 + }
  124 + .title {
  125 + // margin-top: 30px;
  126 + display: flex;
  127 + align-items: center;
  128 + justify-content: space-between;
  129 + margin-bottom: 42px;
  130 + p {
  131 + font-size: 32px;
  132 + font-weight: bold;
  133 + color: #fff;
  134 + }
  135 + button {
  136 + color: #ffffff;
  137 + font-size: 20px;
  138 + height: 40px;
  139 + border-radius: 30px;
  140 + border: 0;
  141 + background: linear-gradient(137deg, #83b2ff 0%, #3c80ef 100%);
  142 + box-shadow: 0px 4px 8px 0px rgba(106, 154, 232, 0.5);
  143 + }
  144 + }
  145 + .img_auth {
  146 + position: absolute;
  147 + bottom: 0;
  148 + right: 0;
  149 + width: 196px;
  150 + }
  151 + .item {
  152 + display: inline-block;
  153 + margin-bottom: 24px;
  154 + color: #fff;
  155 + font-size: 28px;
  156 + span {
  157 + margin-left: 16px;
  158 + }
  159 + &:nth-of-type(2) {
  160 + margin-right: 60px;
  161 + }
  162 + &:last-of-type {
  163 + display: block;
  164 + }
  165 + }
  166 + }
  167 + .add_btn {
  168 + width: 100%;
  169 + box-sizing: border-box;
  170 + line-height: 96px;
  171 + border-radius: 16px;
  172 + border: 4px dashed #3074ff;
  173 + text-align: center;
  174 + font-size: 30px;
  175 + color: #3074ff;
  176 + }
  177 +}
  178 +// 柯桥个人中心红色主题
  179 +.home_child_list_kq {
  180 + .stu_info {
  181 + &:nth-of-type(2n) {
  182 + background: linear-gradient(47deg, #ff7371 0%, #fdd17c 100%);
  183 + box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11);
  184 + }
  185 + &:nth-of-type(2n-1) {
  186 + background: linear-gradient(41deg, #f03131 0%, #ff90a8 100%);
  187 + box-shadow: 0px 4px 8px 0px rgba(37, 171, 255, 0.34);
  188 + }
  189 + .title {
  190 + button {
  191 + background: linear-gradient(137deg, #ff83a2 0%, #ef3c63 100%);
  192 + box-shadow: 0px 4px 8px 0px rgba(232, 106, 165, 0.5);
  193 + }
  194 + }
  195 + }
  196 + .add_btn {
  197 + border-color: #f63837;
  198 + color: #f63837;
  199 + }
  200 +}
  201 +</style>
0 \ No newline at end of file 202 \ No newline at end of file
src/views/Home/component/HomeOrder.vue 0 → 100644
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
  1 +<template>
  2 + <div class="home_order">
  3 + <div class="top">
  4 + <p>我的订单</p>
  5 + </div>
  6 + <div class="icon_box">
  7 + <div @click="handleCustom">
  8 + <img src="@/assets/home/icon_kq1.png" alt="">
  9 + <p>定制研学</p>
  10 + </div>
  11 + <div @click="handleServiceOrder(0)">
  12 + <img src="@/assets/home/icon_kq2.png" alt="">
  13 + <p>待付款</p>
  14 + </div>
  15 + <div @click="handleServiceOrder(1)">
  16 + <img src="@/assets/home/icon_kq3.png" alt="">
  17 + <p>待使用</p>
  18 + </div>
  19 + <div @click="handleServiceOrder(2)">
  20 + <img src="@/assets/home/icon_kq4.png" alt="">
  21 + <p>待评价</p>
  22 + </div>
  23 + <div @click="handleServiceOrder(3)">
  24 + <img src="@/assets/home/icon_kq5.png" alt="">
  25 + <p>已评价</p>
  26 + </div>
  27 +
  28 + </div>
  29 + </div>
  30 +</template>
  31 +<script>
  32 +export default {
  33 + props:{
  34 + parent:{
  35 + type:String,
  36 + default:''
  37 + }
  38 + },
  39 + methods: {
  40 + // 定制研学
  41 + handleCustom () {
  42 + this.$toast('暂未开放,敬请期待!');
  43 + },
  44 + handleServiceOrder (active) {
  45 + this.$router.push({ name: 'ServiceOrderXST', query: { active: active } })
  46 + }
  47 + }
  48 +}
  49 +</script>
  50 +<style lang="scss" scoped>
  51 +.home_order {
  52 + width: 702px;
  53 + margin: 0 auto;
  54 + margin-top: -130px;
  55 + box-sizing: border-box;
  56 + padding: 24px;
  57 + background: #fff;
  58 + border-radius: 16px;
  59 + .top {
  60 + p {
  61 + font-size: 28px;
  62 + font-weight: bold;
  63 + }
  64 + }
  65 + .icon_box {
  66 + display: flex;
  67 + align-items: center;
  68 + justify-content: space-between;
  69 + height: 140px;
  70 + margin-top: 20px;
  71 + img {
  72 + display: block;
  73 + width: 62px;
  74 + margin: 0 auto;
  75 + }
  76 + p {
  77 + margin-top: 14px;
  78 + font-size: 26px;
  79 + }
  80 + }
  81 +}
  82 +</style>
0 \ No newline at end of file 83 \ No newline at end of file
src/views/Home/component/HomeScan.vue 0 → 100644
@@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
  1 +<template>
  2 + <div class="scan" @click="saoYiSao">
  3 + <van-icon name="scan" />
  4 + <img class="tishi" src="@/assets/home/tishi.png" alt="扫码打卡">
  5 + </div>
  6 +</template>
  7 +<script>
  8 +export default {
  9 + methods: {
  10 + saoYiSao () {
  11 + let isLogin = this.checkLogin()
  12 + if (!isLogin) return;
  13 + if (process.env.NODE_ENV === "production" && this.common.isWeiXin()) {
  14 + location.href = `http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/MyClassList`;
  15 + } else {
  16 + this.$router.push({ name: 'MyClassList', query: { qrresult: '188' } })
  17 + }
  18 + },
  19 + // 判断是否已登录
  20 + checkLogin () {
  21 + if (process.env.NODE_ENV != "production") return true;
  22 + const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
  23 + if (!userInfo?.phone) {
  24 + sessionStorage.setItem('prePage', 'Home' + sessionStorage.getItem('publicName'));
  25 + sessionStorage.setItem('prePageQuery', JSON.stringify({ showTab: this.$route.query.showTab }));
  26 + this.$router.push({ name: 'LoginPublic', query: { publicName: sessionStorage.getItem('publicName') } })
  27 + return false;
  28 + }
  29 + return true;
  30 + },
  31 + }
  32 +}
  33 +</script>
  34 +<style lang="scss" scoped>
  35 +.scan {
  36 + position: relative;
  37 + // position:absolute;
  38 + // right:20px;
  39 + // top :20px;
  40 + // z-index :100;
  41 + color: white;
  42 + font-size: 50px;
  43 + .tishi {
  44 + position: absolute;
  45 + left: -90px;
  46 + bottom: -30px;
  47 + width: 112px;
  48 + }
  49 +}
  50 +</style>
0 \ No newline at end of file 51 \ No newline at end of file
src/views/PublicHome/HomeKQ.vue
@@ -1,264 +0,0 @@ @@ -1,264 +0,0 @@
1 -<template>  
2 - <div class="home">  
3 - <div class="infomation">  
4 - <div class="top">  
5 - <div>  
6 - <img class="head" :src="headImgUrl?headImgUrl:defaultHead" alt="">  
7 - <div class="right">  
8 - <p class="name">{{userInfo.nickName}}</p>  
9 - <p class="phone">{{userInfo.phone}}</p>  
10 - </div>  
11 - </div>  
12 - <HomeScan></HomeScan>  
13 - </div>  
14 - </div>  
15 - <HomeOrder parent="HomeKQ"></HomeOrder>  
16 - <div class="function">  
17 - <div class="item" @click="handleGroup">  
18 - <div class="left">  
19 - <van-icon class="icon" name="orders-o" />  
20 - <span>集团权限</span>  
21 - </div>  
22 - <van-icon name="arrow" />  
23 - </div>  
24 - <div class="item" @click="handleMyCard">  
25 - <div class="left">  
26 - <van-icon class="icon" name="discount" />  
27 - <span>我的优惠券</span>  
28 - </div>  
29 - <van-icon name="arrow" />  
30 - </div>  
31 - </div>  
32 - <HomeChildList v-if="showChildList" parent="HomeKQ"></HomeChildList>  
33 -  
34 - <!-- <div class="cardPic" v-show='isShow'>  
35 - <div class="boxPic" @click="isShow = false">  
36 - <img style="width:100%;height:100%" src="../assets/coupon.png" />  
37 - </div>  
38 - </div> -->  
39 - <tabbar4 active="center"></tabbar4>  
40 - </div>  
41 -</template>  
42 -  
43 -<script>  
44 -import PrefectBoxXST from '@/component/PrefectBoxXST'  
45 -import HomeChildList from '@/views/PublicHome/component/HomeChildList'  
46 -import HomeOrder from '@/views/PublicHome/component/HomeOrder'  
47 -import HomeScan from '@/views/PublicHome/component/HomeScan'  
48 -import Tabbar4 from '@/component/Tabbar4'  
49 -export default {  
50 - data () {  
51 - return {  
52 - centerNo: '',  
53 - userInfo: {  
54 - openId: '',  
55 - headImg: '',  
56 - nickName: '',  
57 - phone: '',  
58 - roleType: '',  
59 - time: '',  
60 - year: '',  
61 - studentName: '',  
62 - school: '',  
63 - },  
64 - nicknameUser: '',  
65 - headImgUrl: '',  
66 - defaultHead: require('@/assets/head.png'),  
67 - isShow: false,  
68 - showChildList: false  
69 - }  
70 - },  
71 -  
72 - mounted () {  
73 -  
74 - this.checkAuth()  
75 - },  
76 - methods: {  
77 - checkAuth () {  
78 - let centerNo = this.common.getUrlParam('center_no') || sessionStorage.getItem('centerNo');  
79 - if (centerNo) {  
80 - this.centerNo = centerNo  
81 - sessionStorage.setItem('centerNo', centerNo);  
82 - this.getUserInfo()  
83 - } else {  
84 - const sUserAgent = window.navigator.userAgent.toLowerCase()  
85 - const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1  
86 - const miniprogram = sUserAgent.indexOf("miniprogram") > -1 && sUserAgent.indexOf("alipay") > -1  
87 - if (dtdreamweb) {  
88 - alert('浙里办')  
89 - window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy`;  
90 - }  
91 - // else if (miniprogram) {  
92 - // alert('支付宝')  
93 - // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;  
94 - // }  
95 - else {  
96 - console.log('非浙里办渠道访问,显示测试用户数据')  
97 - this.centerNo = '20210930160466993660'  
98 - sessionStorage.setItem('centerNo', '20210930160466993660');  
99 - this.getUserInfo()  
100 - }  
101 - }  
102 - },  
103 - // 研学码  
104 - handleYanxue () {  
105 - this.$router.push({ name: 'YanxueCode' })  
106 - },  
107 - // 我的订单  
108 - handleOrder () {  
109 - this.$router.push({ name: 'ServiceOrderXST' })  
110 - },  
111 - // 集团认证  
112 - handleGroup () {  
113 - this.$toast('暂未开放,敬请期待!');  
114 - },  
115 - // 我的优惠券  
116 - handleMyCard () {  
117 - this.$router.push({ name: 'CardBoxXST' })  
118 - },  
119 - // 合伙人中心  
120 - handlePartner () {  
121 - this.$toast('暂未开放,敬请期待!');  
122 - // this.$router.push({ name: 'Partner' })  
123 - },  
124 - // 获取用户信息  
125 - getUserInfo: function () {  
126 - this.mgop({  
127 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
128 - host: 'https://mapi.zjzwfw.gov.cn/',  
129 - dataType: 'JSON',  
130 - type: 'GET',  
131 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
132 - headers: {  
133 - // 'isTestUrl': '1'  
134 - },  
135 - data: {  
136 - "userNum": this.centerNo  
137 - },  
138 - onSuccess: res => {  
139 - console.log('getUserInfo', res)  
140 - if (res.data.code == 200) {  
141 - let userInfo = res.data.data.userInfo  
142 - this.userInfo = userInfo  
143 - sessionStorage.setItem('userInfo', JSON.stringify(userInfo))  
144 - }  
145 - this.showChildList = true  
146 -  
147 - },  
148 - onFail: err => {  
149 - console.log('err', err)  
150 - }  
151 - });  
152 - },  
153 - formatterTime (time) {  
154 - if (time) {  
155 - return time.split(' ')[0]  
156 - } else {  
157 - return ''  
158 - }  
159 - },  
160 - complete () {  
161 - this.getUserInfo()  
162 - }  
163 - },  
164 - components: {  
165 - Tabbar4,  
166 - PrefectBoxXST,  
167 - HomeChildList,  
168 - HomeOrder,  
169 - HomeScan  
170 - },  
171 -}  
172 -</script>  
173 -<style lang="scss" scoped>  
174 -.home {  
175 - width: 100%;  
176 - min-height: 100%;  
177 - background: #f8f8f8;  
178 - padding-bottom: 196px;  
179 - .infomation {  
180 - width: 100%;  
181 - height: 320px;  
182 - background: url("~@/assets/home/bg_kq.png");  
183 - background-size: 100%;  
184 - background-position: center;  
185 - .top {  
186 - display: flex;  
187 - flex-wrap: wrap;  
188 - align-items: center;  
189 - justify-content: space-between;  
190 - padding: 40px 28px;  
191 - > div {  
192 - display: flex;  
193 - }  
194 - .head {  
195 - width: 96px;  
196 - height: 96px;  
197 - border-radius: 50%;  
198 - overflow: hidden;  
199 - }  
200 - .right {  
201 - height: 96px;  
202 - margin-left: 24px;  
203 - display: flex;  
204 - align-content: space-around;  
205 - flex-wrap: wrap;  
206 - color: #fff;  
207 - .name {  
208 - font-size: 34px;  
209 - font-weight: bold;  
210 - width: 100%;  
211 - }  
212 - .phone {  
213 - font-size: 26px;  
214 - }  
215 - }  
216 - }  
217 - }  
218 -  
219 - .function {  
220 - background: #ffffff;  
221 - border-radius: 12px;  
222 - margin: 24px;  
223 - .item {  
224 - margin: 0 32px;  
225 - height: 96px;  
226 - display: flex;  
227 - align-items: center;  
228 - justify-content: space-between;  
229 - font-size: 34px;  
230 - &:not(:first-of-type) {  
231 - border-top: 1px solid #e2e2e2;  
232 - }  
233 - .left {  
234 - display: flex;  
235 - align-items: center;  
236 - .icon {  
237 - font-size: 40px;  
238 - margin-right: 20px;  
239 - }  
240 - span {  
241 - font-size: 30px;  
242 - }  
243 - }  
244 - }  
245 - }  
246 -}  
247 -  
248 -.boxPic {  
249 - width: 85vw;  
250 - height: 115vw;  
251 - margin: 10vh 7.5vw;  
252 - position: absolute;  
253 - top: 0;  
254 - z-index: 99;  
255 -}  
256 -.cardPic {  
257 - position: absolute;  
258 - top: 0;  
259 - width: 100vw;  
260 - height: 100vh;  
261 - background: #0000008a;  
262 - z-index: 99;  
263 -}  
264 -</style>  
src/views/PublicHome/MyClassList.vue
@@ -1,289 +0,0 @@ @@ -1,289 +0,0 @@
1 -<template>  
2 - <div class="sign_in">  
3 - <div class="header">  
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">  
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>  
7 - <img v-if="n.cover_url.indexOf('.mp4') == -1" :src="n.cover_url" />  
8 - </van-swipe-item>  
9 - </van-swipe>  
10 - <img v-else src="@/assets/service/defCoure.jpg" alt="" />  
11 - </div>  
12 - <div class="base_info">  
13 - <p class="base_title">{{baseInfo.baseName}}</p>  
14 - <div class="rate">  
15 - <van-rate v-model="baseInfo.baseScore" color="#FFCC00" :size="16" readonly />  
16 - <span>{{ baseInfo.baseScore }}</span>  
17 - </div>  
18 - <p class="address">  
19 - <van-icon name="location" class="icon" />  
20 - {{baseInfo.address}}  
21 - </p>  
22 - <p class="phone">  
23 - <van-icon name="phone" class="icon" />  
24 - {{baseInfo.phone}}  
25 - </p>  
26 - </div>  
27 - <div class="select_student" @click="selectStudent">  
28 - <p class="select_tip">请选择需要打卡的孩子</p>  
29 - <div class="student" v-if="selectedContact.travelerName">  
30 - <span>{{selectedContact.travelerName}}</span>  
31 - <van-icon name="close" class="icon" />  
32 - </div>  
33 - <div class="student" v-else>  
34 - <span>点击选择</span>  
35 - </div>  
36 - </div>  
37 - <div class="btns" @click="getPosition">立即打卡</div>  
38 - <van-popup v-model="failShow" round closeable :style="{ width:'80%'}">  
39 - <div class="success">  
40 - <img src="@/assets/tip1.png" alt="">  
41 - <h3>打卡失败!</h3>  
42 - <p>您当前所在的地理位置不在课程的打卡范围内!</p>  
43 - </div>  
44 - </van-popup>  
45 - </div>  
46 -</template>  
47 -  
48 -<script>  
49 -export default {  
50 - data () {  
51 - return {  
52 - baseInfo: '',  
53 - list: [],  
54 - baseId: '',  
55 - userInfo: '',  
56 - failShow: false,  
57 - selectedContact: '',//选择的出行人  
58 -  
59 - }  
60 - },  
61 - mounted () {  
62 - var userInfo = sessionStorage.getItem('userInfo');  
63 - if (userInfo) {  
64 - this.userInfo = JSON.parse(userInfo);  
65 - }  
66 - // 选择的出行人  
67 - let selectedContactArr = sessionStorage.getItem('selectedContactArr');  
68 - if (selectedContactArr) {  
69 - selectedContactArr = JSON.parse(selectedContactArr);  
70 - this.selectedContact = selectedContactArr[0]  
71 - }  
72 - this.baseId = this.$route.query.qrresult;  
73 - this.GetStudyBaseDetail(this.baseId);  
74 - },  
75 - methods: {  
76 - AddSign () {  
77 -  
78 - this.$toast.loading({  
79 - message: '请求中...',  
80 - });  
81 - this.yxAxios.get(`${this.yanxueUrl}/api/BaseManage/AddSign?userId=${this.selectedContact.travelerNum}&baseId=${this.baseId}`).then((res) => {  
82 - this.$toast.success('打卡签到成功');  
83 - console.log(res.data)  
84 - // alert('打卡签到成功:',JSON.stringify(res))  
85 - setTimeout(() => {  
86 - let publicName = sessionStorage.getItem('publicName');  
87 - this.$router.push({ name: 'Home' + publicName })  
88 - }, 1000)  
89 - })  
90 - },  
91 - // 获取基地信息  
92 - GetStudyBaseDetail (baseId) {  
93 - this.$toast.loading({  
94 - message: '请求中...',  
95 - });  
96 - this.mgop({  
97 - api: 'mgop.sz.hswsy.GetStudyBaseDetail', // 必须  
98 - host: 'https://mapi.zjzwfw.gov.cn/',  
99 - dataType: 'JSON',  
100 - type: 'GET',  
101 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
102 - headers: {  
103 - // 'isTestUrl': '1'  
104 - },  
105 - data: {  
106 - "userId": 0,  
107 - "cs": '绍兴市',  
108 - "id": baseId  
109 - },  
110 - onSuccess: res => {  
111 - this.$toast.clear()  
112 - console.log('基地信息:', res.data)  
113 - if (res.data.data) {  
114 - this.$toast.clear();  
115 - this.baseInfo = res.data.data;  
116 - } else {  
117 - this.$toast.fail(res.data.message)  
118 - }  
119 - },  
120 - onFail: err => {  
121 - console.log('err', err)  
122 - }  
123 - });  
124 - },  
125 - getPosition () {  
126 - if (!this.selectedContact.travelerNum) {  
127 - this.$toast('请选择需要打卡的孩子');  
128 - return false;  
129 - }  
130 - if (this.baseInfo.signLong == 0 && this.baseInfo.signLat == 0) { //基地没数坐标  
131 - this.AddSign();  
132 - return false  
133 - }  
134 - var basePosition = [this.baseInfo.signLong, this.baseInfo.signLat];  
135 - AMap.convertFrom(basePosition, 'baidu', function (status, result) {  
136 - console.log(result)  
137 - if (result.info === 'ok') {  
138 - basePosition = [result.locations[0].lng, result.locations[0].lat]; // Array.<LngLat>  
139 - }  
140 - });  
141 - this.$toast.loading({  
142 - message: '请求中...',  
143 - });  
144 - this.getNowPosition((posi) => { //获取当前位置坐标  
145 - this.$toast.clear();  
146 - if (posi) {  
147 - var nowPosition = [posi.position.lng, posi.position.lat];  
148 - var distance = AMap.GeometryUtil.distance(nowPosition, basePosition);  
149 - console.log(parseInt(distance), nowPosition, basePosition)  
150 - if (parseInt(distance) > 500) {  
151 - this.failShow = true;  
152 - } else {  
153 - // alert('定位小于500m')  
154 - this.AddSign();  
155 - }  
156 - } else {  
157 - // alert('getNowPosition没有返回')  
158 - }  
159 - });  
160 - },  
161 - getNowPosition: function (callback) {  
162 - let mapObj = new AMap.Map('iCenter');  
163 - mapObj.plugin('AMap.Geolocation', function () {  
164 - let geolocation = new AMap.Geolocation({  
165 - enableHighAccuracy: true,//是否使用高精度定位,默认:true  
166 - timeout: 10000, //超过10秒后停止定位,默认:无穷大  
167 - maximumAge: 0, //定位结果缓存0毫秒,默认:0  
168 - convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true  
169 - showButton: true, //显示定位按钮,默认:true  
170 - buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角  
171 - buttonOffset: new AMap.Pixel(0, 0),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)  
172 - showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true  
173 - showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true  
174 - panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true  
175 - zoomToAccuracy: true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false  
176 - });  
177 - mapObj.addControl(geolocation);  
178 - geolocation.getCurrentPosition();  
179 - AMap.event.addListener(geolocation, 'complete', function (res) {  
180 - // alert('返回定位信息:' + JSON.stringify(res))  
181 - console.log('返回定位信息:', res)  
182 - callback(res);  
183 - });//返回定位信息  
184 - AMap.event.addListener(geolocation, 'error', function (res) {  
185 - // alert('返回定位出错信息:' + JSON.stringify(res))  
186 - console.log('返回定位出错信息:', res)  
187 - callback();  
188 - }); //返回定位出错信息  
189 - })  
190 -  
191 - },  
192 - // 选择孩子  
193 - selectStudent () {  
194 - this.$router.push({ name: 'SelectContact', query: { limit: 1, hideParent: 1 } })  
195 - }  
196 - }  
197 -}  
198 -</script>  
199 -  
200 -<style lang="scss" scoped>  
201 -.sign_in {  
202 - padding-bottom: 100px;  
203 - .header {  
204 - img {  
205 - width: 100%;  
206 - }  
207 - }  
208 - .base_info {  
209 - width: 702px;  
210 - margin: 0 auto;  
211 - padding-top: 20px;  
212 - .base_title {  
213 - font-size: 34px;  
214 - font-weight: bold;  
215 - }  
216 - .rate {  
217 - margin-top: 20px;  
218 - span {  
219 - font-size: 30px;  
220 - color: #ffcc00;  
221 - margin-left: 30px;  
222 - }  
223 - }  
224 - .address,  
225 - .phone {  
226 - font-size: 24px;  
227 - color: #999;  
228 - margin-top: 16px;  
229 - .icon {  
230 - color: #000;  
231 - }  
232 - }  
233 - }  
234 - .select_student {  
235 - width: 702px;  
236 - margin: 0 auto;  
237 - margin-top: 30px;  
238 - padding-top: 30px;  
239 - border-top: 2px solid #d8d8d8;  
240 - .select_tip {  
241 - font-size: 30px;  
242 - color: #999;  
243 - }  
244 - .student {  
245 - position: relative;  
246 - width: 532px;  
247 - line-height: 78px;  
248 - margin: 0 auto;  
249 - margin-top: 24px;  
250 - background: #f5f6fa;  
251 - border-radius: 8px;  
252 - font-size: 28px;  
253 - text-align: center;  
254 - .icon {  
255 - position: absolute;  
256 - top: 50%;  
257 - right: 20px;  
258 - transform: translateY(-50%);  
259 - }  
260 - }  
261 - }  
262 -  
263 - .btns {  
264 - width: 702px;  
265 - margin: 0 auto;  
266 - margin-top: 100px;  
267 - text-align: center;  
268 - line-height: 90px;  
269 - border-radius: 100px;  
270 - font-size: 30px;  
271 - background: #4092ff;  
272 - color: #fff;  
273 - }  
274 - .success {  
275 - padding: 40px 0;  
276 - text-align: center;  
277 - img {  
278 - width: 30%;  
279 - }  
280 - h3 {  
281 - font-size: 36px;  
282 - }  
283 - p {  
284 - font-size: 30px;  
285 - color: #999999;  
286 - }  
287 - }  
288 -}  
289 -</style>  
src/views/PublicHome/StudentDetail.vue
@@ -1,419 +0,0 @@ @@ -1,419 +0,0 @@
1 -<template>  
2 - <div class="student_detail">  
3 - <div class="infomation">  
4 - <div class="top">  
5 - <div>  
6 - <img class="head" :src="defaultHead" alt="">  
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>  
10 - </div>  
11 - </div>  
12 - <HomeScan></HomeScan>  
13 - </div>  
14 - <div class="count_box">  
15 - <div class="count_item">  
16 - <p class="count"><span>{{signCheckCountInfo.signCount}}</span>/次</p>  
17 - <p class="des">基地打卡次数</p>  
18 - </div>  
19 - <div class="line"></div>  
20 - <div class="count_item">  
21 - <p class="count"><span>{{signCheckCountInfo.courseDays}}</span>/天</p>  
22 - <p class="des">课程实践</p>  
23 - </div>  
24 - </div>  
25 - <div class="icon_box">  
26 - <div class="icon_item" @click="handleYanxue">  
27 - <img src="@/assets/home/stu_icon1.png" alt="">  
28 - <p>研学码</p>  
29 - </div>  
30 - <div class="icon_item" @click="contactService">  
31 - <img src="@/assets/home/stu_icon2.png" alt="">  
32 - <p>专属客服</p>  
33 - </div>  
34 - <div class="icon_item">  
35 - <img src="@/assets/home/stu_icon3.png" alt="">  
36 - <p>敬请期待</p>  
37 - </div>  
38 - </div>  
39 - </div>  
40 - <div class="list_box">  
41 - <van-tabs v-model="active" color="#21A3FF">  
42 - <van-tab title="基地记录">  
43 - <div class="list_item" v-for="(item,index) in baseList" :key="index">  
44 - <div class="left">  
45 - <p class="day">{{item.day}}</p>  
46 - <p class="minute">{{item.minute}}</p>  
47 - </div>  
48 - <div class="line"></div>  
49 - <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>  
53 - <button v-else @click="evaluateBaseDetail(item)">查看评价</button>  
54 - </div>  
55 - </div>  
56 - <van-empty v-if="baseList.length==0" description="暂无基地记录" />  
57 - </van-tab>  
58 - <van-tab title="课程记录">  
59 - <div class="list_item" v-for="(item,index) in courseList" :key="index">  
60 - <div class="left">  
61 - <p class="day">{{item.day}}</p>  
62 - <p class="minute">{{item.minute}}</p>  
63 - </div>  
64 - <div class="line"></div>  
65 - <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>  
69 - <button v-else @click="evaluateCourseDetail(item)">查看评价</button>  
70 - </div>  
71 - </div>  
72 - <van-empty v-if="courseList.length==0" description="暂无课程记录" />  
73 - </van-tab>  
74 - </van-tabs>  
75 - </div>  
76 - </div>  
77 -</template>  
78 -<script>  
79 -import HomeScan from '@/views/PublicHome/component/HomeScan'  
80 -export default {  
81 - data () {  
82 - return {  
83 - defaultHead: require('@/assets/head.png'),  
84 - studentInfo: '',  
85 - courseList: [],//课程记录  
86 - baseList: [],//基地记录  
87 - signCheckCountInfo: '',//打卡和课程天数信息  
88 - active: 0  
89 - }  
90 - },  
91 - mounted () {  
92 - let studentInfo = sessionStorage.getItem('StudentDetialInfo')  
93 - this.studentInfo = JSON.parse(studentInfo)  
94 - this.$nextTick(() => {  
95 - if (!this.studentInfo?.travelerNum) {  
96 - this.$toast.fail('学生信息缺失,请返回首页重试')  
97 - return;  
98 - }  
99 - this.$toast.loading({  
100 - message: '加载中...',  
101 - duration: 0,  
102 - forbidClick: true  
103 - })  
104 - this.getCourseList()  
105 - this.getBaseList()  
106 - this.getSignCheckCountInfo()  
107 - })  
108 - },  
109 - methods: {  
110 - // 获取课程记录  
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 => {  
127 - this.$toast.clear()  
128 - console.log('课程记录:', res.data)  
129 - if (res.data.status == 1) {  
130 - let courseList = res.data.data.data  
131 - for (let i in courseList) {  
132 - courseList[i].day = this.Moment(new Date(courseList[i].time)).format('MM-DD')  
133 - courseList[i].minute = this.Moment(new Date(courseList[i].time)).format('HH:mm')  
134 - }  
135 - this.courseList = courseList  
136 - console.log(this.courseList)  
137 - } else {  
138 - this.$toast.fail(res.data.message)  
139 - }  
140 - },  
141 - onFail: err => {  
142 - console.log('err', err)  
143 - }  
144 - });  
145 - },  
146 - // 获取基地记录  
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 => {  
163 - this.$toast.clear()  
164 - console.log('基地记录:', res.data)  
165 - if (res.data.status == 1) {  
166 - let baseList = res.data.data.data  
167 - for (let i in baseList) {  
168 - baseList[i].day = this.Moment(new Date(baseList[i].time)).format('MM-DD')  
169 - baseList[i].minute = this.Moment(new Date(baseList[i].time)).format('HH:mm')  
170 - }  
171 - console.log(baseList)  
172 - this.baseList = baseList  
173 - } else {  
174 - this.$toast.fail(res.data.message)  
175 - }  
176 - },  
177 - onFail: err => {  
178 - console.log('err', err)  
179 - }  
180 - });  
181 - },  
182 - // 根据用户编号获取打卡和课程天数信息  
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 => {  
197 - this.$toast.clear()  
198 - console.log('天数:', res.data)  
199 - if (res.data.status == 1) {  
200 - this.signCheckCountInfo = res.data.data  
201 - } else {  
202 - this.$toast.fail(res.data.message)  
203 - }  
204 - },  
205 - onFail: err => {  
206 - console.log('err', err)  
207 - }  
208 - });  
209 - },  
210 - // 研学码  
211 - handleYanxue () {  
212 - this.$router.push({ name: 'YanxueCode' })  
213 - },  
214 - // 联系客服  
215 - contactService () {  
216 - // if (this.detailData.mobiles) {  
217 - // location.href = "tel://" + this.detailData.mobiles.split(",")[0];  
218 - // }  
219 - },  
220 - // 基地评价  
221 - evaluateBase (item) {  
222 - this.$router.push({ name: 'evaluateBase', query: { baseId: item.baseId, signId: item.signId } })  
223 - },  
224 - // 课程评价  
225 - evaluateCourse (item) {  
226 - let courseInfo = item;  
227 - courseInfo.id = courseInfo.orderId  
228 - window.sessionStorage.setItem('courseInfo', JSON.stringify(courseInfo))  
229 - this.$router.push({ name: 'evaluateCourse' })  
230 - },  
231 - // 基地评价详情  
232 - evaluateBaseDetail (item) {  
233 - this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId, baseId: item.baseId } })  
234 - },  
235 - // 课程评价详情  
236 - evaluateCourseDetail (item) {  
237 - this.$router.push({ name: 'evaluateDetail', query: { evaluationId: item.evaluationId } })  
238 - }  
239 - },  
240 - components: {  
241 - HomeScan  
242 - },  
243 -}  
244 -</script>  
245 -<style lang="scss" scoped>  
246 -.student_detail {  
247 - height: 100%;  
248 - background: rgb(247, 247, 251);  
249 - .infomation {  
250 - width: 100%;  
251 - height: 852px;  
252 - background: url("~@/assets/home/bg_stu.png");  
253 - background-size: 100%;  
254 - background-position: center;  
255 - .top {  
256 - display: flex;  
257 - flex-wrap: wrap;  
258 - align-items: center;  
259 - justify-content: space-between;  
260 - padding: 40px 28px;  
261 - > div {  
262 - display: flex;  
263 - }  
264 - .head {  
265 - width: 96px;  
266 - height: 96px;  
267 - border-radius: 50%;  
268 - overflow: hidden;  
269 - }  
270 - .right {  
271 - width: 450px;  
272 - height: 96px;  
273 - margin-left: 24px;  
274 - display: flex;  
275 - align-content: space-around;  
276 - flex-wrap: wrap;  
277 - color: #fff;  
278 - .name {  
279 - font-size: 34px;  
280 - font-weight: bold;  
281 - width: 100%;  
282 - span {  
283 - display: inline-block;  
284 - padding: 0 14px;  
285 - margin-left: 14px;  
286 - line-height: 34px;  
287 - border-radius: 17px;  
288 - font-size: 22px;  
289 - background: #2d90d2;  
290 - vertical-align: middle;  
291 - }  
292 - }  
293 - .school_name {  
294 - font-size: 26px;  
295 - }  
296 - }  
297 - }  
298 - .count_box {  
299 - display: flex;  
300 - align-items: center;  
301 - justify-content: space-around;  
302 - padding: 0 24px;  
303 - margin-top: 30px;  
304 - .count_item {  
305 - color: #fff;  
306 - text-align: center;  
307 - .count {  
308 - font-size: 24px;  
309 - span {  
310 - font-size: 38px;  
311 - font-weight: bold;  
312 - margin-right: 6px;  
313 - }  
314 - }  
315 - .des {  
316 - margin-top: 14px;  
317 - font-size: 28px;  
318 - }  
319 - }  
320 - .line {  
321 - width: 4px;  
322 - height: 48px;  
323 - background: #fff;  
324 - }  
325 - }  
326 - .icon_box {  
327 - display: flex;  
328 - align-items: center;  
329 - justify-content: space-around;  
330 - width: 702px;  
331 - height: 158px;  
332 - background: #ffffff;  
333 - border-radius: 16px;  
334 - margin: 0 auto;  
335 - margin-top: 30px;  
336 - .icon_item {  
337 - text-align: center;  
338 - img {  
339 - width: 70px;  
340 - }  
341 - p {  
342 - font-size: 26px;  
343 - }  
344 - }  
345 - .line {  
346 - width: 4px;  
347 - height: 48px;  
348 - background: #fff;  
349 - }  
350 - }  
351 - }  
352 - .list_box {  
353 - width: 702px;  
354 - margin: 0 auto;  
355 - margin-top: -300px;  
356 - overflow: hidden;  
357 - border-radius: 16px;  
358 - background: #fff;  
359 - .list_item {  
360 - position: relative;  
361 - display: flex;  
362 - align-items: center;  
363 - &:first-of-type {  
364 - margin-top: 20px;  
365 - }  
366 - .left {  
367 - width: 110px;  
368 - padding-right: 30px;  
369 - text-align: right;  
370 - font-size: 34px;  
371 - .day {  
372 - }  
373 - .minute {  
374 - font-size: 30px;  
375 - color: #999;  
376 - }  
377 - }  
378 - .line {  
379 - width: 2px;  
380 - height: 188px;  
381 - background: #e5e5e5;  
382 - border-radius: 1px;  
383 - }  
384 - .right {  
385 - margin-left: 30px;  
386 - img {  
387 - display: inline-block;  
388 - width: 128px;  
389 - height: 128px;  
390 - border-radius: 16px;  
391 - }  
392 - .item_title {  
393 - display: inline-block;  
394 - width: 360px;  
395 - margin-left: 22px;  
396 - font-size: 30px;  
397 - vertical-align: top;  
398 - }  
399 - button {  
400 - position: absolute;  
401 - bottom: 30px;  
402 - right: 20px;  
403 - width: 144px;  
404 - line-height: 44px;  
405 - background: #fff;  
406 - color: #21a3ff;  
407 - border-radius: 8px;  
408 - border: 2px solid #21a3ff;  
409 - font-size: 26px;  
410 - &.active {  
411 - background: #21a3ff;  
412 - color: #fff;  
413 - }  
414 - }  
415 - }  
416 - }  
417 - }  
418 -}  
419 -</style>  
420 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicHome/YanxueCode.vue
@@ -1,154 +0,0 @@ @@ -1,154 +0,0 @@
1 -<template>  
2 - <div id="codeBox">  
3 - <div class="blueCard">  
4 - <div class="name">{{studentInfo.travelerName ? studentInfo.travelerName : ''}}</div>  
5 - <div class="school">  
6 - <div class="pic"><img src="@/assets/yxCode/school.png" style="width:100%;height:100%" /></div>  
7 - <div class="gray">学校:</div>  
8 - <div>{{studentInfo.schoolName ? studentInfo.schoolName : ''}}</div>  
9 - </div>  
10 - <div class="school">  
11 - <div class="pic"><img src="@/assets/yxCode/classroom.png" style="width:100%;height:100%" /></div>  
12 - <div class="gray">入学年份:</div>  
13 - <div>{{studentInfo.enrollYear ? studentInfo.enrollYear : ''}}</div>  
14 - </div>  
15 - </div>  
16 - <div id="qrcode" ref="imageWrapper" v-if="!imgUrl"></div>  
17 - <div class="codeDiv">  
18 - <img :src="imgUrl" v-if="imgUrl" style="width:100%;height:100%" />  
19 - </div>  
20 - <div class="fontDiv">  
21 - <div @click="sweep">绑定研学码</div>  
22 - <div class="blueLine"></div>  
23 - <div @click="downQrCode">下载一生一码</div>  
24 - </div>  
25 -  
26 - </div>  
27 -</template>  
28 -  
29 -<script>  
30 -import QRCode from 'qrcodejs2';  
31 -import html2canvas from "html2canvas"  
32 -export default {  
33 - data () {  
34 - return {  
35 - studentInfo: {},  
36 - qrcodePIc: {},  
37 - imgUrl: ''  
38 - }  
39 - },  
40 - mounted () {  
41 - this.studentInfo = JSON.parse(sessionStorage.getItem('StudentDetialInfo'));  
42 - this.creatQrCode()  
43 - },  
44 - methods: {  
45 - //扫一扫页面  
46 - sweep () {  
47 - this.$router.push({ name: 'YanxueInfo' })  
48 - },  
49 - //创建qrcode  
50 - creatQrCode () {  
51 - let text = this.studentInfo.studyCode ? this.studentInfo.studyCode : ""  
52 - if (text == '') {  
53 - this.$toast('请先绑定研学码');  
54 - }  
55 - // let text = 'https://www.baidu.com/'  
56 - console.log(text)  
57 - document.getElementById('qrcode').innerHTML = '';  
58 - this.qrcodePIc = new QRCode('qrcode', {  
59 - text: text,  
60 - width: 240,  
61 - height: 240,  
62 - colorDark: '#333333', // 二维码颜色  
63 - colorLight: '#ffffff', // 二维码背景色  
64 - correctLevel: QRCode.CorrectLevel.L // 容错率,L/M/H  
65 - });  
66 - let canvas = document.getElementById('qrcode').innerHTML  
67 - console.log(canvas)  
68 - this.canvanqrCode()  
69 - },  
70 - canvanqrCode () {  
71 - html2canvas(this.$refs.imageWrapper, {  
72 - width: 240,  
73 - height: 240  
74 - }).then(canvas => {  
75 - let dataURL = canvas.toDataURL("image/png");  
76 - this.imgUrl = dataURL;  
77 - });  
78 - },  
79 - downQrCode () {  
80 - //下载二维码  
81 - this.$toast('请长按二维码进行保存!')  
82 - },  
83 - }  
84 -}  
85 -</script>  
86 -  
87 -<style lang="scss" scoped>  
88 -#codeBox {  
89 - width: 100%;  
90 - height: 100%;  
91 - overflow: hidden;  
92 - .blueCard {  
93 - width: 94vw;  
94 - height: 35vw;  
95 - margin: 5vw auto;  
96 - // background-color: royalblue;  
97 - background-image: url("~@/assets/yxCode/bck.png");  
98 - -moz-background-size: 100% 100%;  
99 - background-size: 100% 100%;  
100 - padding: 5vw 7vw;  
101 - box-sizing: border-box;  
102 - border-radius: 3vw;  
103 -  
104 - .name {  
105 - color: #fff;  
106 - font-size: 4.5vw;  
107 - margin-bottom: 4vw;  
108 - }  
109 - .school {  
110 - color: #fff;  
111 - display: flex;  
112 - font-size: 3.7vw;  
113 - margin-bottom: 4vw;  
114 - display: flex;  
115 - align-items: center;  
116 - .pic {  
117 - width: 4.7vw;  
118 - height: 4.7vw;  
119 - margin-right: 2vw;  
120 - }  
121 - .gray {  
122 - color: #f3f3f3;  
123 - }  
124 - }  
125 - }  
126 - .codeDiv {  
127 - width: 67vw;  
128 - height: 67vw;  
129 - margin: 8vw auto;  
130 - }  
131 - .fontDiv {  
132 - width: 56vw;  
133 - margin: 0 auto;  
134 - font-size: 4vw;  
135 - color: #4092ff;  
136 - display: flex;  
137 - justify-content: space-between;  
138 -  
139 - .blueLine {  
140 - height: 3.8vw;  
141 - width: 0.5px;  
142 - margin-top: 1vw;  
143 - background-color: #000000;  
144 - display: flex;  
145 - align-items: center;  
146 - }  
147 - }  
148 - #qrcode {  
149 - position: absolute;  
150 - top: -100vh;  
151 - left: -100vw;  
152 - }  
153 -}  
154 -</style>  
155 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicHome/YanxueInfo.vue
@@ -1,62 +0,0 @@ @@ -1,62 +0,0 @@
1 -<template>  
2 - <div>  
3 - <van-field v-model="school" label="学校" readonly placeholder="学校" />  
4 - <van-field v-model="name" label="学生姓名" readonly placeholder="姓名" />  
5 - <van-field v-model="userNum" label="用户编号" readonly placeholder="用户编号" />  
6 - <van-field v-model="codeNum" label="研学码" readonly placeholder="研学码">  
7 - <van-button slot="button" size="small" native-type="button" @click="saoYiSao">扫一扫</van-button>  
8 - </van-field>  
9 - <van-button type="primary" block @click="getbind">提交</van-button>  
10 - </div>  
11 -</template>  
12 -  
13 -<script>  
14 -export default {  
15 - data () {  
16 - return {  
17 - codeNum: '',  
18 - userNum: '',  
19 - school: '',  
20 - name: ''  
21 - }  
22 - },  
23 - created () {  
24 -  
25 - let studentInfo = JSON.parse(sessionStorage.getItem('StudentDetialInfo'));  
26 - this.userNum = studentInfo.travelerNum  
27 - this.school = studentInfo.schoolName  
28 - this.name = studentInfo.travelerName  
29 - this.codeNum = this.GetQueryString('qrresult') || studentInfo.studyCode;  
30 - },  
31 - methods: {  
32 - getbind () {  
33 - if (this.userNum == '' || this.codeNum == '') {  
34 - return this.$toast('请先填写完整信息!');  
35 - }  
36 - this.yxAxios.get(this.proxyUrl + '/prod/user/info/bingStudyCode?userNum=' + this.userNum + '&code=' + this.codeNum)  
37 - .then((res) => {  
38 - console.log('接口返回', res.data)  
39 - if (res.data.code == '200') {  
40 - this.$toast('操作成功');  
41 - this.$router.push({ name: 'YanxueCode' })  
42 - } else {  
43 - this.$toast('操作失败:' + res.data.message);  
44 - }  
45 - })  
46 - },  
47 - //扫一扫  
48 - saoYiSao () {  
49 - window.location.href = 'http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/YanxueInfo';  
50 - },  
51 - // 获取链接参数  
52 - GetQueryString (name) {  
53 - var reg = new RegExp("\\b" + name + "=([^&]*)");  
54 - var r = location.href.match(reg);  
55 - if (r != null) return decodeURIComponent(r[1]);  
56 - }  
57 - }  
58 -}  
59 -</script>  
60 -  
61 -<style>  
62 -</style>  
63 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicHome/component/AddChildPopupGroup.vue
@@ -1,662 +0,0 @@ @@ -1,662 +0,0 @@
1 -<template>  
2 - <div>  
3 - <div class="addchild_group" v-if="step==1">  
4 - <img class="bg" src="@/assets/home/bg2.png" alt="">  
5 - <p class="title">添加学生</p>  
6 - <p class="des">完善相关信息可帮助获得最佳使用体验 </p>  
7 - <div class="phone_content">  
8 - <div class="item">  
9 - <p class="phone_title">手机号</p>  
10 - <div class="flex">  
11 - <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号">  
12 - <span class="getcode" @click="getCode">{{codeText}}</span>  
13 - </div>  
14 - </div>  
15 - <div class="item">  
16 - <p class="phone_title">验证码</p>  
17 - <input class="code" type="text" v-model="code" placeholder="请输入验证码">  
18 - </div>  
19 - <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button>  
20 - </div>  
21 - </div>  
22 - <div class="addchild_group" v-if="step==2">  
23 - <img class="bg" src="@/assets/home/bg2.png" alt="">  
24 - <p class="title">已查询到{{claimChildList.length}}位学生信息</p>  
25 - <p class="des">请仔细确认学生信息后再认领</p>  
26 - <div class="child_content">  
27 - <div class="child_box">  
28 - <div class="child_item" v-for="(item,index) in claimChildList" :key="index">  
29 - <p><span>姓名</span>{{item.travelerName}}</p>  
30 - <p><span>阶段</span>{{item.travelerType==1?'小学':item.travelerType==2?'初中':'高中'}}</p>  
31 - <p><span>所在地区</span>{{item.province+item.city+item.area}}</p>  
32 - <p><span>学校</span>{{item.schoolName}}</p>  
33 - <p><span>入学年份</span>{{item.enrollYear}}</p>  
34 - <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox>  
35 - </div>  
36 - </div>  
37 - <button class="submit" @click="claimChild">认领</button>  
38 - </div>  
39 - </div>  
40 - <div class="addchild_group" v-if="step==3">  
41 - <img class="bg" src="@/assets/home/bg2.png" alt="">  
42 - <p class="title">添加学生信息</p>  
43 - <p class="des">如验证号码非学校预留号码,请按步骤自行添加完善学生信息。</p>  
44 - <div class="content">  
45 - <div class="name">学生信息</div>  
46 - <div class="item">  
47 - <input type="text" placeholder="请输入学生姓名" v-model="studentName">  
48 - </div>  
49 - <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;">  
50 - <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p>  
51 - <img src="@/assets/more.png" alt="">  
52 - </div>  
53 - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;">  
54 - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p>  
55 - <img src="@/assets/more.png" alt="">  
56 - </div>  
57 - <div class="item" @click="showAreaSelect=true">  
58 - <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>  
59 - <img src="@/assets/more.png" alt="">  
60 - </div>  
61 - <div class="item">  
62 - <input type="text" placeholder="请选择学校" readonly v-model="school">  
63 - <button type="info" class="btn" @click="chooseSchool">选择学校</button>  
64 - </div>  
65 - <button class="submit" @click="submit">完成</button>  
66 - </div>  
67 - </div>  
68 - <van-popup v-model="showUserTypeSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
69 - <van-picker title="当前阶段" show-toolbar :columns="userTypeArr" value-key="label" @cancel="showUserTypeSelect = false" @confirm="selectUserTypeOver" />  
70 - </van-popup>  
71 - <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
72 - <van-picker title="入学年份" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />  
73 - </van-popup>  
74 - <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
75 - <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />  
76 - </van-popup>  
77 -  
78 - <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true">  
79 - <div v-if="chooseSchoolisShow">  
80 - <chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool>  
81 - </div>  
82 - </van-popup>  
83 - </div>  
84 -</template>  
85 -  
86 -<script>  
87 -  
88 -import chooseSchool from '@/views/PublicService/component/chooseSchool'  
89 -var codeInterval;  
90 -export default {  
91 - components: { chooseSchool },  
92 - data () {  
93 - return {  
94 - step: 1,  
95 - publicName: '',  
96 - phone: '',  
97 - codeText: '获取验证码',//获取验证码按钮文字  
98 - code: '',//验证码  
99 - studentName: '',  
100 - showDialog: true,  
101 -  
102 - claimChildList: [],  
103 -  
104 - year: '',//入学年份  
105 - yearDisable: false,  
106 - showYearSelect: false,  
107 - yearArr: [],  
108 -  
109 - userType: '',  
110 - userTypeVal: '',//所处阶段1-小学 2-初中 3-高中  
111 - showUserTypeSelect: false,  
112 - userTypeArr: [{  
113 - label: '小学',  
114 - value: 1  
115 - }, {  
116 - label: '初中',  
117 - value: 2  
118 - }, {  
119 - label: '高中',  
120 - value: 3  
121 - }],  
122 -  
123 - area: '',  
124 - areaCode: '',  
125 - showAreaSelect: false,  
126 - areaList: [],  
127 -  
128 - searchSchool: '',  
129 - school: '',  
130 - schoolId: '',  
131 -  
132 - appId: '',  
133 - chooseSchoolisShow: false  
134 - }  
135 - },  
136 -  
137 - mounted () {  
138 - let publicName = sessionStorage.getItem('publicName')  
139 - this.publicName = publicName  
140 - let userInfo = sessionStorage.getItem('userInfo')  
141 - this.userInfo = JSON.parse(userInfo);  
142 - this.initYearArr()  
143 - this.GetSysAreaList()  
144 - },  
145 - methods: {  
146 - // 获取验证码  
147 - getCode () {  
148 - if (this.codeText != '获取验证码') return;  
149 - if (!this.phone) {  
150 - this.$toast('请输入手机号')  
151 - return;  
152 - }  
153 - if (!this.checkPhone(this.phone)) {  
154 - this.$toast('请输入正确的手机号')  
155 - return;  
156 - }  
157 - this.$toast.loading({  
158 - message: '加载中',  
159 - duration: 0,  
160 - forbidClick: true  
161 - })  
162 - this.http.getMsg({  
163 - phone: this.phone  
164 - }).then((res) => {  
165 - this.$toast.clear()  
166 - if (res.success) {  
167 - let i = 60;  
168 - codeInterval = setInterval(() => {  
169 - if (i == 0) {  
170 - this.codeText = `获取验证码`;  
171 - clearInterval(codeInterval);  
172 - return;  
173 - }  
174 - this.codeText = `重试(${i})`;  
175 - i--  
176 - }, 1000)  
177 - } else {  
178 - this.$toast.fail(res.message)  
179 - }  
180 - })  
181 - },  
182 - // 获取手机号白名单信息  
183 - checkPhoneAndCode () {  
184 - if (!this.phone) {  
185 - this.$toast('请输入手机号')  
186 - return;  
187 - }  
188 - if (!this.checkPhone(this.phone)) {  
189 - this.$toast('请输入正确的手机号')  
190 - return;  
191 - }  
192 - if (!this.code) {  
193 - this.$toast('请输入验证码')  
194 - return;  
195 - }  
196 - this.$toast.loading({  
197 - message: '加载中',  
198 - duration: 0,  
199 - forbidClick: true  
200 - })  
201 -  
202 - this.yxAxios.post(`${this.proxyUrl}/prod/user/info/checkPhoneAndCode`, {  
203 - "code": this.code,  
204 - "phone": this.phone,  
205 - "unionId": sessionStorage.getItem('centerNo')  
206 - }).then((res) => {  
207 - this.$toast.clear()  
208 - if (res.data.code == 200) {  
209 - if (res.data.data.length == 0) {  
210 - // 白名单无用户  
211 - this.step = 3;  
212 - } else {  
213 - // 白名单有用户  
214 - let claimChildList = res.data.data  
215 - for (let i in claimChildList) {  
216 - claimChildList[i].checked = false  
217 - }  
218 - this.claimChildList = claimChildList  
219 - this.step = 2;  
220 - }  
221 - } else {  
222 - this.$toast.fail(res.data?.message)  
223 - }  
224 - })  
225 - },  
226 -  
227 -  
228 - // 认领孩子  
229 - claimChild () {  
230 - const claimChildList = this.claimChildList;  
231 - let claimChildId = ''  
232 - for (let i in claimChildList) {  
233 - if (claimChildList[i].checked) {  
234 - if (claimChildId == '') {  
235 - claimChildId = claimChildList[i].travelerNum  
236 - } else {  
237 - claimChildId = claimChildId + ',' + claimChildList[i].travelerNum  
238 - }  
239 - }  
240 - }  
241 - this.$toast.loading({  
242 - message: '加载中...',  
243 - duration: 0,  
244 - forbidClick: true  
245 - })  
246 - this.mgop({  
247 - api: 'mgop.sz.hswsy.claimChildren', // 必须  
248 - host: 'https://mapi.zjzwfw.gov.cn/',  
249 - dataType: 'JSON',  
250 - type: 'POST',  
251 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
252 - headers: {  
253 - // 'isTestUrl': '1'  
254 - },  
255 - data: {  
256 - "loginMobile": this.phone,  
257 - "subUserNums": claimChildId  
258 - },  
259 - onSuccess: res => {  
260 - this.$toast.clear()  
261 - if (res.data.code == 200) {  
262 - this.$toast.success('认领成功')  
263 - this.$emit('complete')  
264 - } else {  
265 - this.$toast.fail(res.data?.message)  
266 - }  
267 - },  
268 - onFail: err => {  
269 - console.log('err', err)  
270 - }  
271 - });  
272 - },  
273 -  
274 -  
275 - // 初始化入学年份选项  
276 - initYearArr () {  
277 - // 页面创建时执行  
278 - let year = new Date().getFullYear(),  
279 - Month = new Date().getMonth() + 1,  
280 - yearArr = [];  
281 - if (Month > 8) {  
282 - // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份  
283 - year = year  
284 - }  
285 - for (let index = year; index > year - 6; index--) {  
286 - yearArr.push({ value: index, label: index })  
287 - }  
288 - this.yearArr = yearArr  
289 - },  
290 - selectYearOver (value) {  
291 - this.year = value.label;  
292 - this.showYearSelect = false;  
293 - },  
294 - handleYear () {  
295 - if (!this.yearDisable) {  
296 - this.showYearSelect = true;  
297 - }  
298 - },  
299 - selectUserTypeOver (value) {  
300 - this.userType = value.label;  
301 - this.userTypeVal = value.value;  
302 - this.showUserTypeSelect = false;  
303 - },  
304 - // 获取地区列表  
305 - GetSysAreaList () {  
306 - this.mgop({  
307 - api: 'mgop.sz.hswsy.GetSysAreaList', // 必须  
308 - host: 'https://mapi.zjzwfw.gov.cn/',  
309 - dataType: 'JSON',  
310 - type: 'GET',  
311 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
312 - headers: {  
313 - // 'isTestUrl': '1'  
314 - },  
315 - data: {  
316 - "areaCode": 33  
317 - },  
318 - onSuccess: res => {  
319 - console.log('获取地区列表', res)  
320 - if (res.data.success) {  
321 - let data = res.data.data;  
322 - let obj = {  
323 - province_list: {  
324 - 330000: '浙江省'  
325 - },  
326 - city_list: {},  
327 - county_list: {}  
328 - };  
329 - if (data) {  
330 - data.forEach((n, i) => {  
331 - obj.city_list[n.area_code + '00'] = n.area_name;  
332 - if (n.areaList.length > 0) {  
333 - n.areaList.forEach((k, j) => {  
334 - obj.county_list[k.area_code] = k.area_name;  
335 - })  
336 - }  
337 - });  
338 - this.areaList = obj;  
339 - }  
340 - } else {  
341 - this.$toast.fail(res.message)  
342 - }  
343 - },  
344 - onFail: err => {  
345 - console.log('err', err)  
346 - }  
347 - });  
348 - },  
349 - selectAreaOver (value) {  
350 - let data = value;  
351 - var city = data[1].code;  
352 - city = city.substring(0, city.length - 2);  
353 - // console.log(city)  
354 - this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;  
355 - this.areaCode = [data[0].code, city, data[2].code];  
356 - this.quCode = data[2].code;  
357 - this.school = '',  
358 - this.schoolId = '',  
359 - this.showAreaSelect = false  
360 - },  
361 -  
362 - submit () {  
363 - if (!this.studentName) {  
364 - this.$toast('请输入姓名');  
365 - }  
366 - else if (!this.userType) {  
367 - this.$toast('请选择阶段');  
368 - }  
369 - else if (!this.year) {  
370 - this.$toast('请选择入学年份');  
371 - }  
372 - else if (!this.area) {  
373 - this.$toast('请选择地区');  
374 - }  
375 - else if (!this.school) {  
376 - this.$toast('请选择学校');  
377 - } else {  
378 - let postData = {  
379 - contactsName: this.studentName,  
380 - contactsMobile: this.phone,  
381 - contactsType: 1,  
382 - province: this.area.split(',')[0],//省份  
383 - city: this.area.split(',')[1],//城市  
384 - area: this.area.split(',')[2],//地区  
385 - schoolName: this.school,//学校名称  
386 - enrollYear: this.year,//入学年份  
387 - travelerType: this.userTypeVal,//1-小学 2-初中 3-高中  
388 - loginMobile: this.userInfo?.phone  
389 - }  
390 - this.$toast.loading({  
391 - message: '加载中',  
392 - duration: 0,  
393 - forbidClick: true  
394 - })  
395 - this.mgop({  
396 - api: 'mgop.sz.hswsy.addStudent', // 必须  
397 - host: 'https://mapi.zjzwfw.gov.cn/',  
398 - dataType: 'JSON',  
399 - type: 'GET',  
400 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
401 - headers: {  
402 - // 'isTestUrl': '1'  
403 - },  
404 - data: postData,  
405 - onSuccess: res => {  
406 - console.log('添加学生:', res)  
407 - this.$toast.clear()  
408 - if (res.data.code == 200) {  
409 - this.$toast.success('添加学生成功')  
410 - this.$emit('complete')  
411 - } else {  
412 - this.$toast.fail(res.data?.message)  
413 - }  
414 - },  
415 - onFail: err => {  
416 - console.log('err', err)  
417 - }  
418 - });  
419 - }  
420 - },  
421 - //选择学校  
422 - chooseSchool () {  
423 - // this.$router.push({name: 'chooseSchool'})  
424 - this.chooseSchoolisShow = true  
425 - },  
426 - schoolData (val) {  
427 - this.school = val.text;  
428 - this.schoolId = val.id;  
429 - },  
430 - checkPhone (phone) {  
431 - if ((/^1[3456789]\d{9}$/.test(phone))) {  
432 - return true  
433 - } else {  
434 - return false  
435 - }  
436 - },  
437 - },  
438 - destroyed () {  
439 - clearInterval(codeInterval);  
440 - },  
441 -}  
442 -</script>  
443 -<style lang="scss" scoped>  
444 -.addchild_group {  
445 - width: 638px;  
446 - height: 836px;  
447 - background: #ffffff;  
448 - border-radius: 24px;  
449 - position: relative;  
450 - .bg {  
451 - width: 100%;  
452 - position: absolute;  
453 - top: 0;  
454 - left: 0;  
455 - }  
456 - .title {  
457 - position: relative;  
458 - width: 100%;  
459 - padding-top: 70px;  
460 - padding-bottom: 8px;  
461 - text-align: center;  
462 - font-size: 34px;  
463 - font-weight: bold;  
464 - color: #0857ff;  
465 - }  
466 - .des {  
467 - position: relative;  
468 - width: 100%;  
469 - box-sizing: border-box;  
470 - padding: 0 15%;  
471 - text-align: center;  
472 - font-size: 24px;  
473 - color: #6596ff;  
474 - }  
475 - .content {  
476 - width: 100%;  
477 - box-sizing: border-box;  
478 - padding: 0 40px;  
479 - position: absolute;  
480 - top: 236px;  
481 - left: 0;  
482 - .name {  
483 - width: 558px;  
484 - height: 50px;  
485 - font-size: 28px;  
486 - color: #000;  
487 - padding-left: 20px;  
488 - box-sizing: border-box;  
489 - }  
490 - .item {  
491 - width: 558px;  
492 - height: 72px;  
493 - border-radius: 36px;  
494 - background: #f7f7f7;  
495 - box-sizing: border-box;  
496 - font-size: 28px;  
497 - padding: 0 32px;  
498 - display: flex;  
499 - justify-content: space-between;  
500 - align-items: center;  
501 - margin-bottom: 28px;  
502 - p {  
503 - color: #333333;  
504 - &.nodata {  
505 - color: #999999;  
506 - }  
507 - }  
508 - img {  
509 - width: 40px;  
510 - }  
511 - input {  
512 - width: 100%;  
513 - background: transparent;  
514 - border: 0;  
515 - color: #333333;  
516 - padding: 0;  
517 - &::-webkit-input-placeholder {  
518 - color: #999999;  
519 - }  
520 - }  
521 - .btn {  
522 - width: 240px;  
523 - height: 55px;  
524 - float: right;  
525 - font-size: 28px;  
526 - background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%);  
527 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
528 - 0px 8px 12px 0px rgba(89, 199, 171, 0.5);  
529 - border-radius: 34px;  
530 - border: transparent;  
531 - color: #333333;  
532 - }  
533 - }  
534 - .school_select {  
535 - font-size: 28px;  
536 - padding: 0 32px;  
537 - margin-bottom: 28px;  
538 - }  
539 - .submit {  
540 - width: 294px;  
541 - height: 72px;  
542 - border: 0;  
543 - background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);  
544 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
545 - 0px 8px 12px 0px rgba(87, 137, 255, 0.5);  
546 - border-radius: 34px;  
547 - font-size: 34px;  
548 - color: #ffffff;  
549 - margin: 0 auto;  
550 - display: block;  
551 - }  
552 - }  
553 - .child_content {  
554 - position: relative;  
555 - margin-top: 40px;  
556 - .child_box {  
557 - height: 500px;  
558 - overflow: auto;  
559 - padding-left: 100px;  
560 - .child_item {  
561 - position: relative;  
562 - margin-bottom: 50px;  
563 - p {  
564 - font-size: 28px;  
565 - padding: 8px 0;  
566 - span {  
567 - display: inline-block;  
568 - width: 140px;  
569 - margin-right: 28px;  
570 - color: #999;  
571 - }  
572 - }  
573 - .checkbox {  
574 - position: absolute;  
575 - top: 115px;  
576 - right: 20px;  
577 - }  
578 - }  
579 - }  
580 - .submit {  
581 - width: 438px;  
582 - height: 78px;  
583 - background: #3385ff;  
584 - border-radius: 37px;  
585 - border-radius: 39px;  
586 - border: 0;  
587 - font-size: 34px;  
588 - color: #ffffff;  
589 - margin: 0 auto;  
590 - display: block;  
591 - }  
592 - }  
593 - .phone_content {  
594 - width: 100%;  
595 - position: absolute;  
596 - top: 180px;  
597 - left: 0;  
598 - box-sizing: border-box;  
599 - padding: 40px;  
600 - .item {  
601 - border-bottom: 1px solid #e2e2e2;  
602 - margin-bottom: 30px;  
603 - }  
604 - .phone_title {  
605 - font-size: 34px;  
606 - font-weight: bold;  
607 - margin-bottom: 28px;  
608 - }  
609 - .flex {  
610 - display: flex;  
611 - align-items: center;  
612 - justify-content: space-between;  
613 - margin-bottom: 22px;  
614 - }  
615 - .code {  
616 - border: 0;  
617 - background: transparent;  
618 - font-size: 28px;  
619 - margin-bottom: 32px;  
620 - width: 100%;  
621 - }  
622 - .phone {  
623 - width: 50%;  
624 - margin: 0;  
625 - }  
626 - .getcode {  
627 - color: #5789ff;  
628 - font-size: 28px;  
629 - padding: 10px;  
630 - }  
631 - .submit {  
632 - width: 438px;  
633 - height: 78px;  
634 - background: #3385ff;  
635 - border-radius: 37px;  
636 - border-radius: 39px;  
637 - border: 0;  
638 - font-size: 34px;  
639 - color: #ffffff;  
640 - margin: 0 auto;  
641 - margin-top: 120px;  
642 - display: block;  
643 - }  
644 - }  
645 -}  
646 -::v-deep .van-search {  
647 - background: transparent;  
648 - padding: 0;  
649 - width: 100%;  
650 -}  
651 -::v-deep .van-search__content {  
652 - padding: 0;  
653 -}  
654 -.schoolBoxF {  
655 - width: 100vw;  
656 - height: 100vh;  
657 - position: absolute;  
658 - top: 0;  
659 - left: 0;  
660 - background-color: #fff;  
661 -}  
662 -</style>  
src/views/PublicHome/component/HomeChildList.vue
@@ -1,201 +0,0 @@ @@ -1,201 +0,0 @@
1 -<template>  
2 - <div class="home_child_list" :class="parent=='HomeKQ'?'home_child_list_kq':''">  
3 - <div class="stu_info" v-for="(item,index) in childList" :key="index" @click="handleStudentDetail(index)">  
4 - <div class="title">  
5 - <p>学生信息</p>  
6 - <!-- <button @click="handleYanxue(index)">出示研学码</button> -->  
7 - </div>  
8 - <img v-if="item.whiteFlag" class="img_auth" src="@/assets/home/auth.png" alt="">  
9 - <div class="item">  
10 - <van-icon name="manager" /><span>{{item.travelerName}}</span>  
11 - </div>  
12 - <div class="item">  
13 - <van-icon name="medal" /><span>{{item.enrollYear}}</span>  
14 - </div>  
15 - <div class="item">  
16 - <van-icon name="wap-home" /><span>{{item.schoolName}}</span>  
17 - </div>  
18 - </div>  
19 - <div class="add_btn" @click="addStudent">  
20 - <van-icon name="add" />  
21 - 添加学生信息  
22 - </div>  
23 - <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup">  
24 - <AddChildPopupGroup @complete="complete"></AddChildPopupGroup>  
25 - </van-popup>  
26 - </div>  
27 -</template>  
28 -<script>  
29 -import AddChildPopupGroup from '@/views/PublicHome/component/AddChildPopupGroup'  
30 -  
31 -export default {  
32 - props: {  
33 - parent: {  
34 - type: String,  
35 - default: ''  
36 - }  
37 - },  
38 - data () {  
39 - return {  
40 - showAddChildPopupGroup: false,//新增孩子弹出框  
41 - childList: [],//孩子列表  
42 - }  
43 - },  
44 - mounted () {  
45 - this.getChildList()  
46 - },  
47 - methods: {  
48 - // 研学码  
49 - // handleYanxue (index) {  
50 - // sessionStorage.setItem('bindYanxueCodeChildInfo',JSON.stringify(this.childList[index]))  
51 - // this.$router.push({ name: 'YanxueCode' })  
52 - // },  
53 - // 进入学生详情页  
54 - handleStudentDetail (index) {  
55 - sessionStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index]))  
56 - this.$router.push({ name: 'StudentDetail' })  
57 - },  
58 - // 获取孩子列表  
59 - getChildList () {  
60 - this.$toast.loading({  
61 - message: '加载中...',  
62 - duration: 0,  
63 - forbidClick: true  
64 - })  
65 - this.mgop({  
66 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
67 - host: 'https://mapi.zjzwfw.gov.cn/',  
68 - dataType: 'JSON',  
69 - type: 'GET',  
70 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
71 - headers: {  
72 - // 'isTestUrl': '1'  
73 - },  
74 - data: {  
75 - "userNum": sessionStorage.getItem('centerNo')  
76 - },  
77 - onSuccess: res => {  
78 - console.log('getUserInfo', res)  
79 - this.$toast.clear()  
80 - if (res.data.code == 200) {  
81 - this.childList = res.data.data.userInfo.subUsers  
82 - }  
83 - },  
84 - onFail: err => {  
85 - console.log('err', err)  
86 - }  
87 - });  
88 - },  
89 - addStudent(){  
90 - this.showAddChildPopupGroup=true  
91 - },  
92 - complete () {  
93 - this.showAddChildPopupGroup = false;  
94 - this.getChildList()  
95 - },  
96 - },  
97 - components: {  
98 - AddChildPopupGroup  
99 - }  
100 -  
101 -}  
102 -</script>  
103 -<style lang="scss">  
104 -.home_child_list {  
105 - width: 100%;  
106 - padding: 16px 24px;  
107 - box-sizing: border-box;  
108 - .stu_info {  
109 - position: relative;  
110 - width: 100%;  
111 - height: 252px;  
112 - box-sizing: border-box;  
113 - padding: 24px 28px;  
114 - margin-bottom: 16px;  
115 - border-radius: 12px;  
116 - &:nth-of-type(2n) {  
117 - background: linear-gradient(47deg, #ff7371 0%, #fdd17c 100%);  
118 - box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11);  
119 - }  
120 - &:nth-of-type(2n-1) {  
121 - background: linear-gradient(41deg, #316ff0 0%, #2afffb 100%);  
122 - box-shadow: 0px 4px 8px 0px rgba(37, 171, 255, 0.34);  
123 - }  
124 - .title {  
125 - // margin-top: 30px;  
126 - display: flex;  
127 - align-items: center;  
128 - justify-content: space-between;  
129 - margin-bottom: 42px;  
130 - p {  
131 - font-size: 32px;  
132 - font-weight: bold;  
133 - color: #fff;  
134 - }  
135 - button {  
136 - color: #ffffff;  
137 - font-size: 20px;  
138 - height: 40px;  
139 - border-radius: 30px;  
140 - border: 0;  
141 - background: linear-gradient(137deg, #83b2ff 0%, #3c80ef 100%);  
142 - box-shadow: 0px 4px 8px 0px rgba(106, 154, 232, 0.5);  
143 - }  
144 - }  
145 - .img_auth {  
146 - position: absolute;  
147 - bottom: 0;  
148 - right: 0;  
149 - width: 196px;  
150 - }  
151 - .item {  
152 - display: inline-block;  
153 - margin-bottom: 24px;  
154 - color: #fff;  
155 - font-size: 28px;  
156 - span {  
157 - margin-left: 16px;  
158 - }  
159 - &:nth-of-type(2) {  
160 - margin-right: 60px;  
161 - }  
162 - &:last-of-type {  
163 - display: block;  
164 - }  
165 - }  
166 - }  
167 - .add_btn {  
168 - width: 100%;  
169 - box-sizing: border-box;  
170 - line-height: 96px;  
171 - border-radius: 16px;  
172 - border: 4px dashed #3074ff;  
173 - text-align: center;  
174 - font-size: 30px;  
175 - color: #3074ff;  
176 - }  
177 -}  
178 -// 柯桥个人中心红色主题  
179 -.home_child_list_kq {  
180 - .stu_info {  
181 - &:nth-of-type(2n) {  
182 - background: linear-gradient(47deg, #ff7371 0%, #fdd17c 100%);  
183 - box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11);  
184 - }  
185 - &:nth-of-type(2n-1) {  
186 - background: linear-gradient(41deg, #f03131 0%, #ff90a8 100%);  
187 - box-shadow: 0px 4px 8px 0px rgba(37, 171, 255, 0.34);  
188 - }  
189 - .title {  
190 - button {  
191 - background: linear-gradient(137deg, #ff83a2 0%, #ef3c63 100%);  
192 - box-shadow: 0px 4px 8px 0px rgba(232, 106, 165, 0.5);  
193 - }  
194 - }  
195 - }  
196 - .add_btn {  
197 - border-color: #f63837;  
198 - color: #f63837;  
199 - }  
200 -}  
201 -</style>  
202 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicHome/component/HomeOrder.vue
@@ -1,87 +0,0 @@ @@ -1,87 +0,0 @@
1 -<template>  
2 - <div class="home_order">  
3 - <div class="top">  
4 - <p>我的订单</p>  
5 - </div>  
6 - <div class="icon_box">  
7 - <div @click="handleCustom">  
8 - <img v-if="parent=='HomeKQ'" src="@/assets/home/icon_kq1.png" alt="">  
9 - <img v-else src="@/assets/home/icon1.png" alt="">  
10 - <p>定制研学</p>  
11 - </div>  
12 - <div @click="handleServiceOrder(0)">  
13 - <img v-if="parent=='HomeKQ'" src="@/assets/home/icon_kq2.png" alt="">  
14 - <img v-else src="@/assets/home/icon2.png" alt="">  
15 - <p>待付款</p>  
16 - </div>  
17 - <div @click="handleServiceOrder(1)">  
18 - <img v-if="parent=='HomeKQ'" src="@/assets/home/icon_kq3.png" alt="">  
19 - <img v-else src="@/assets/home/icon3.png" alt="">  
20 - <p>待使用</p>  
21 - </div>  
22 - <div @click="handleServiceOrder(2)">  
23 - <img v-if="parent=='HomeKQ'" src="@/assets/home/icon_kq4.png" alt="">  
24 - <img v-else src="@/assets/home/icon4.png" alt="">  
25 - <p>待评价</p>  
26 - </div>  
27 - <div @click="handleServiceOrder(3)">  
28 - <img v-if="parent=='HomeKQ'" src="@/assets/home/icon_kq5.png" alt="">  
29 - <img v-else src="@/assets/home/icon5.png" alt="">  
30 - <p>已评价</p>  
31 - </div>  
32 -  
33 - </div>  
34 - </div>  
35 -</template>  
36 -<script>  
37 -export default {  
38 - props:{  
39 - parent:{  
40 - type:String,  
41 - default:''  
42 - }  
43 - },  
44 - methods: {  
45 - // 定制研学  
46 - handleCustom () {  
47 - this.$toast('暂未开放,敬请期待!');  
48 - },  
49 - handleServiceOrder (active) {  
50 - this.$router.push({ name: 'ServiceOrderXST', query: { active: active } })  
51 - }  
52 - }  
53 -}  
54 -</script>  
55 -<style lang="scss" scoped>  
56 -.home_order {  
57 - width: 702px;  
58 - margin: 0 auto;  
59 - margin-top: -130px;  
60 - box-sizing: border-box;  
61 - padding: 24px;  
62 - background: #fff;  
63 - border-radius: 16px;  
64 - .top {  
65 - p {  
66 - font-size: 28px;  
67 - font-weight: bold;  
68 - }  
69 - }  
70 - .icon_box {  
71 - display: flex;  
72 - align-items: center;  
73 - justify-content: space-between;  
74 - height: 140px;  
75 - margin-top: 20px;  
76 - img {  
77 - display: block;  
78 - width: 62px;  
79 - margin: 0 auto;  
80 - }  
81 - p {  
82 - margin-top: 14px;  
83 - font-size: 26px;  
84 - }  
85 - }  
86 -}  
87 -</style>  
88 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicHome/component/HomeScan.vue
@@ -1,50 +0,0 @@ @@ -1,50 +0,0 @@
1 -<template>  
2 - <div class="scan" @click="saoYiSao">  
3 - <van-icon name="scan" />  
4 - <img class="tishi" src="@/assets/home/tishi.png" alt="扫码打卡">  
5 - </div>  
6 -</template>  
7 -<script>  
8 -export default {  
9 - methods: {  
10 - saoYiSao () {  
11 - let isLogin = this.checkLogin()  
12 - if (!isLogin) return;  
13 - if (process.env.NODE_ENV === "production" && this.common.isWeiXin()) {  
14 - location.href = `http://sao315.com/w/api/saoyisao?redirect_uri=https://payment.myjxt.com/center/%23/MyClassList`;  
15 - } else {  
16 - this.$router.push({ name: 'MyClassList', query: { qrresult: '188' } })  
17 - }  
18 - },  
19 - // 判断是否已登录  
20 - checkLogin () {  
21 - if (process.env.NODE_ENV != "production") return true;  
22 - const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))  
23 - if (!userInfo?.phone) {  
24 - sessionStorage.setItem('prePage', 'Home' + sessionStorage.getItem('publicName'));  
25 - sessionStorage.setItem('prePageQuery', JSON.stringify({ showTab: this.$route.query.showTab }));  
26 - this.$router.push({ name: 'LoginPublic', query: { publicName: sessionStorage.getItem('publicName') } })  
27 - return false;  
28 - }  
29 - return true;  
30 - },  
31 - }  
32 -}  
33 -</script>  
34 -<style lang="scss" scoped>  
35 -.scan {  
36 - position: relative;  
37 - // position:absolute;  
38 - // right:20px;  
39 - // top :20px;  
40 - // z-index :100;  
41 - color: white;  
42 - font-size: 50px;  
43 - .tishi {  
44 - position: absolute;  
45 - left: -90px;  
46 - bottom: -30px;  
47 - width: 112px;  
48 - }  
49 -}  
50 -</style>  
51 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/AuthorizeKQ.vue
@@ -1,65 +0,0 @@ @@ -1,65 +0,0 @@
1 -<template>  
2 - <!-- 柯桥研学研学授权 -->  
3 - <div>  
4 - <p class="authorize">授权中...</p>  
5 - </div>  
6 -</template>  
7 -<script>  
8 -export default {  
9 - data () {  
10 - return {  
11 - appId: 'wx1305e88d2bc74073'  
12 - }  
13 - },  
14 - mounted () {  
15 - let code = this.$route.query.code;  
16 - let openId = sessionStorage.getItem('openIdKQ');  
17 - if (!openId) {  
18 - if (!code) {  
19 - location.href = `${this.proxyUrl}/prod/api/wx/${this.appId}/getCode/kq`;  
20 - } else {  
21 - // 通过code获取openId和token  
22 - this.$toast.loading({  
23 - message: '加载中...',  
24 - duration: 0,  
25 - forbidClick: true  
26 - })  
27 - this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${this.appId}/getMsgByCode?appId=${this.appId}&code=${code}`).then((res) => {  
28 - this.$toast.clear()  
29 - if (res.data.code == 200) {  
30 - sessionStorage.setItem('openIdKQ', res.data.data.openid)  
31 - sessionStorage.setItem('unionId', res.data.data.unionId)  
32 - sessionStorage.setItem('nicknameUser', res.data.data.nickname)  
33 - sessionStorage.setItem('headImgUrl', res.data.data.headImgUrl)  
34 - this.backPage()  
35 - } else {  
36 - sessionStorage.removeItem('openIdKQ')  
37 - location.href = `${this.proxyUrl}/prod/api/wx/${this.appId}/getCode/kq`;  
38 - }  
39 - })  
40 - }  
41 - } else {  
42 - this.backPage()  
43 - }  
44 - },  
45 - methods: {  
46 - backPage () {  
47 - let prePage = sessionStorage.getItem('prePage');  
48 - let prePageQuery = sessionStorage.getItem('prePageQuery');  
49 - if (prePage) {  
50 - this.$router.push({ name: prePage, query: JSON.parse(prePageQuery) })  
51 - }  
52 -  
53 - },  
54 - }  
55 -}  
56 -</script>  
57 -<style lang="scss">  
58 -.authorize {  
59 - font-size: 32px;  
60 - position: absolute;  
61 - top: 50%;  
62 - left: 50%;  
63 - transform: translate(-50%, -50%);  
64 -}  
65 -</style>  
66 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/CardBoxPublic.vue
@@ -1,164 +0,0 @@ @@ -1,164 +0,0 @@
1 -<template>  
2 - <div id="cardBox">  
3 - <div class="card_item" v-for="(item,index) in cardList" :key="index" @click="handleCard(index)">  
4 - <div class="left">  
5 - <div class="top">  
6 - <img v-if="item.img" :src="item.img" alt="">  
7 - <p class="title">仅该商品可用:<span>{{item.title}}</span></p>  
8 - </div>  
9 - <p class="end_time">有效期至:{{item.useEndTime}}</p>  
10 - </div>  
11 - <div class="right">  
12 - <p class="discount" :class="item.couponState==1?'':'disable'"><span>¥</span>{{item.couponPrice}}</p>  
13 - <p class="usenow" v-if="item.couponState==1">立即使用</p>  
14 - <p class="usenow disable" v-else>{{item.couponState==2?'已使用':'已过期'}}</p>  
15 - </div>  
16 - </div>  
17 - <van-empty v-if="cardList.length==0" description="暂无优惠券" />  
18 -  
19 - </div>  
20 -</template>  
21 -<script>  
22 -export default {  
23 - name: 'ServiceCardBoxPublic',  
24 - data () {  
25 - return {  
26 - cardList: [],  
27 - publicName: '',  
28 - unionId: ''  
29 - }  
30 - },  
31 - mounted () {  
32 - let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');  
33 - if (publicName) {  
34 - sessionStorage.setItem('publicName', publicName)  
35 - this.publicName = publicName  
36 - }  
37 - if (process.env.NODE_ENV === "production"&&this.common.isWeiXin()) {  
38 - let openId = sessionStorage.getItem('openId' + this.publicName);  
39 - if (!openId) {  
40 - sessionStorage.setItem('prePage', 'ServiceCardBoxPublic');  
41 - this.$router.push({ name: 'Authorize' + this.publicName })  
42 - return;  
43 - }  
44 - this.unionId = sessionStorage.getItem('unionId');  
45 - } else {  
46 - this.unionId = 'oJPmPuLaAx2x2DaRGfCFeYuLWzLU';  
47 - }  
48 -  
49 - this.$nextTick(() => {  
50 - this.getAllCard()  
51 - })  
52 - },  
53 - methods: {  
54 - // 获取所有优惠券  
55 - getAllCard () {  
56 - this.yxAxios.post(`${this.proxyUrl}/prod/api/coupon/list`, {  
57 - userId: this.unionId,  
58 - state: '',//状态 1-正常 2-已使用 3-已过期 不传为全部,  
59 - pageNum: '1',  
60 - pageSize: '999'  
61 - }).then((res) => {  
62 - if (res.data.rows) {  
63 - let cardList = res.data.rows  
64 - for (let i in cardList) {  
65 - cardList[i].useEndTime = this.Moment(cardList[i].useEndTime.replace(/\-/g, "/")).format("YYYY-MM-DD")  
66 - }  
67 - this.cardList = cardList  
68 - }  
69 - else {  
70 - this.$toast.fail(res.data.message);  
71 - }  
72 - })  
73 - },  
74 - handleCard (index) {  
75 - if (this.cardList[index].couponState == 1) {  
76 - this.$router.push({ name: 'ServiceAbroadDetail', query: { courseId: 499 } })  
77 - }  
78 - },  
79 - }  
80 -}  
81 -</script>  
82 -<style lang="scss" scoped>  
83 -#cardBox {  
84 - width: 100%;  
85 - min-height: 100%;  
86 - background: rgb(246, 246, 250);  
87 - overflow: hidden;  
88 - .card_item {  
89 - width: 726px;  
90 - height: 216px;  
91 - background: url("../../assets/service/card.png");  
92 - background-size: 100%;  
93 - margin: 0 auto;  
94 - margin-top: 20px;  
95 - position: relative;  
96 - p {  
97 - width: 100%;  
98 - margin: 0;  
99 - }  
100 - .left {  
101 - display: inline-block;  
102 - width: 68%;  
103 - height: 100%;  
104 - vertical-align: top;  
105 - box-sizing: border-box;  
106 - padding: 24px 40px;  
107 - padding-right: 0;  
108 - .top {  
109 - display: flex;  
110 - img {  
111 - width: 66px;  
112 - height: 66px;  
113 - background: #d8d8d8;  
114 - border-radius: 6px;  
115 - }  
116 - .title {  
117 - font-size: 24px;  
118 - font-weight: bold;  
119 - margin-left: 10px;  
120 - word-break: break-all;  
121 - span {  
122 - color: #7f5316;  
123 - }  
124 - }  
125 - }  
126 - }  
127 - .right {  
128 - width: 32%;  
129 - height: 100%;  
130 - display: inline-flex;  
131 - align-content: center;  
132 - flex-wrap: wrap;  
133 - position: relative;  
134 - }  
135 - .end_time {  
136 - font-size: 24px;  
137 - color: #999;  
138 - left: 40px;  
139 - position: absolute;  
140 - bottom: 30px;  
141 - }  
142 - .discount {  
143 - text-align: center;  
144 - font-size: 60px;  
145 - font-weight: bold;  
146 - span {  
147 - font-size: 24px;  
148 - }  
149 - &.disable {  
150 - color: #999;  
151 - }  
152 - }  
153 - .usenow {  
154 - font-size: 32px;  
155 - text-align: center;  
156 - font-weight: bold;  
157 - margin-top: 10px;  
158 - &.disable {  
159 - color: #999;  
160 - }  
161 - }  
162 - }  
163 -}  
164 -</style>  
165 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/CardBoxXST.vue
@@ -1,417 +0,0 @@ @@ -1,417 +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 = sessionStorage.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 - sessionStorage.setItem('cardCousreCardId', item.id)  
257 - sessionStorage.setItem('cardCousreCardPrice', item.couponPrice)  
258 - sessionStorage.setItem('cardCousreCardTitle', item.title)  
259 - sessionStorage.setItem('cardCousreProId', item.proId)  
260 - sessionStorage.setItem('cardCousreProName', item.proName)  
261 - sessionStorage.setItem('cardCousrePics', item.pics)  
262 - sessionStorage.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 - sessionStorage.setItem('cardCousreCardId', item.id)  
277 - sessionStorage.setItem('cardCousreCardPrice', item.couponPrice)  
278 - sessionStorage.setItem('cardCousreCardTitle', item.title)  
279 - sessionStorage.setItem('cardCousreProId', item.proId)  
280 - sessionStorage.setItem('cardCousreProName', item.proName)  
281 - sessionStorage.setItem('cardCousrePics', item.pics)  
282 - sessionStorage.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 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/CardCourseList.vue
@@ -1,199 +0,0 @@ @@ -1,199 +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 - publicName: '',  
25 - unionId: '',  
26 - cardTitle: '',  
27 - couponPrice: '',  
28 - cardId: '',  
29 - proId: '',  
30 - proName: '',  
31 - pics: '',  
32 - geted: false,  
33 - proList: []  
34 - }  
35 - },  
36 - mounted () {  
37 - let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');  
38 - if (publicName) {  
39 - sessionStorage.setItem('publicName', publicName)  
40 - this.publicName = publicName  
41 - }  
42 - this.cardTitle = sessionStorage.getItem('cardCousreCardTitle');  
43 - this.couponPrice = sessionStorage.getItem('cardCousreCardPrice');  
44 - this.cardId = sessionStorage.getItem('cardCousreCardId');  
45 - this.proId = sessionStorage.getItem('cardCousreProId');  
46 - this.proName = sessionStorage.getItem('cardCousreProName');  
47 - this.pics = sessionStorage.getItem('cardCousrePics');  
48 - this.geted = sessionStorage.getItem('cardCousreGeted') == 'true' ? true : false  
49 - if (process.env.NODE_ENV === "production") {  
50 - let openId = sessionStorage.getItem('openId' + this.publicName);  
51 - if (!openId) {  
52 - sessionStorage.setItem('prePage', 'CardBoxXST');  
53 - this.$router.push({ name: 'Authorize' + this.publicName })  
54 - return;  
55 - }  
56 - this.unionId = sessionStorage.getItem('unionId');  
57 - } else {  
58 - this.unionId = 'oJPmPuLaAx2x2DaRGfCFeYuLWzLU';  
59 - }  
60 - this.getCourseList()  
61 - },  
62 - methods: {  
63 - // 获取优惠券对应的商品列表  
64 - getCourseList () {  
65 - this.$toast.loading({  
66 - message: "加载中...",  
67 - duration: 0,  
68 - forbidClick: true,  
69 - });  
70 - this.yxAxios.post(`${this.yanxueUrl}/api/StudiesWap/CourseList/ByIdList`, this.proId.split(',')).then((res) => {  
71 - this.$toast.clear();  
72 - let proList = res.data.data;  
73 - for (let i in proList) {  
74 - proList[i].course_labels = proList[i].course_labels?.split(',');  
75 - proList[i].coverUrl = proList[i]?.coverList[0]?.cover_url  
76 - if (proList[i].startDate) {  
77 - proList[i].week = this.formatWeek(this.Moment(proList[i].startDate).format('d'));  
78 - proList[i].startDate = this.Moment(proList[i].startDate).format('YYYY.M.D');  
79 - proList[i].endDate = this.Moment(proList[i].endDate).format('YYYY.M.D');  
80 - }  
81 - }  
82 - console.log(proList)  
83 - this.proList = proList  
84 - })  
85 - },  
86 - formatWeek (week) {  
87 - return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';  
88 - },  
89 -  
90 - //领取优惠券  
91 - reCard () {  
92 - if (this.geted) return;  
93 - this.yxAxios.post(`${this.proxyUrl}/prod/api/coupon/get`, {  
94 - unionId: this.unionId,  
95 - "proId": this.proId,  
96 - "proName": this.proName,  
97 - "pic": this.pics,  
98 - couponId: this.cardId,  
99 - })  
100 - .then((res) => {  
101 - // console.log(res.data)  
102 - if (res.data.code == 200) {  
103 - sessionStorage.setItem('cardCousreGeted', true)  
104 - this.geted = true;  
105 - this.$toast('领取成功!')  
106 - } else {  
107 - this.$toast.fail(res.data.message);  
108 - }  
109 - })  
110 -  
111 - },  
112 - onConfirm (item) {  
113 - this.showPicker = false;  
114 - this.enterAboradDetail(item.proId)  
115 - },  
116 - },  
117 - components: {  
118 - ServiceListSecond  
119 - }  
120 -}  
121 -</script>  
122 -<style lang="scss" scoped>  
123 -#cardCourseList {  
124 - width: 100%;  
125 - min-height: 100vh;  
126 - background: #fff;  
127 - background-image: url("../../assets/service/bg.png");  
128 - background-size: 100%;  
129 - background-repeat: no-repeat;  
130 - // padding-top: 36px;  
131 - overflow: hidden;  
132 - .card_box {  
133 - width: 704px;  
134 - height: 150px;  
135 - margin: 0 auto;  
136 - position: relative;  
137 - margin-top: 36px;  
138 - img {  
139 - width: 100%;  
140 - }  
141 - .card_title {  
142 - font-size: 40px;  
143 - font-weight: bold;  
144 - color: #7f5316;  
145 - position: absolute;  
146 - top: 22px;  
147 - left: 40px;  
148 - }  
149 - .card_tip {  
150 - font-size: 24px;  
151 - color: #7f5316;  
152 - position: absolute;  
153 - top: 94px;  
154 - left: 40px;  
155 - }  
156 - .right {  
157 - height: 100%;  
158 - position: absolute;  
159 - top: 0;  
160 - right: 2px;  
161 - padding-top: 20px;  
162 - box-sizing: border-box;  
163 - }  
164 - .card_price {  
165 - width: 160px;  
166 - font-size: 60px;  
167 - font-weight: bold;  
168 - text-align: center;  
169 - color: #000;  
170 - span {  
171 - font-size: 28px;  
172 - }  
173 - }  
174 - .card_btn {  
175 - display: block;  
176 - margin: 0 auto;  
177 - margin-top: 10px;  
178 - width: 134px;  
179 - line-height: 40px;  
180 - color: #7f5316;  
181 - font-size: 26px;  
182 - text-align: center;  
183 - font-weight: bold;  
184 - background: #fff;  
185 - border-radius: 4px;  
186 - &.nobg {  
187 - background: transparent;  
188 - }  
189 - }  
190 - }  
191 - .line {  
192 - font-size: 32px;  
193 - color: #fff;  
194 - letter-spacing: 4px;  
195 - text-align: center;  
196 - margin-top: 18px;  
197 - }  
198 -}  
199 -</style>  
200 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/LoginPublic.vue
@@ -1,234 +0,0 @@ @@ -1,234 +0,0 @@
1 -<template>  
2 - <div id="login">  
3 - <img class="bg" src="@/assets/login_bg.png" alt="">  
4 - <div class="box">  
5 - <p class="login_title">绑定手机号</p>  
6 - <div class="item">  
7 - <p class="title">手机号</p>  
8 - <div class="flex">  
9 - <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号">  
10 - <span class="getcode" @click="getCode">{{codeText}}</span>  
11 - </div>  
12 - </div>  
13 - <div class="item">  
14 - <p class="title">验证码</p>  
15 - <input class="code" type="text" v-model="code" placeholder="请输入验证码">  
16 - </div>  
17 - <button class="submit" @click="submitOperator">立即绑定</button>  
18 - </div>  
19 - </div>  
20 -</template>  
21 -<script>  
22 -var codeInterval;  
23 -export default {  
24 - name: 'LoginPublic',  
25 - data () {  
26 - return {  
27 - code: '',  
28 - phone: '',  
29 -  
30 - codeText: '获取验证码',//获取验证码按钮文字  
31 - appId: '',  
32 - unionId: '',  
33 - openId: '',  
34 - prefectId: '',  
35 - publicName: '',//SXYX绍兴研学 XST学事通  
36 - }  
37 - },  
38 - mounted () {  
39 - let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');  
40 - if (publicName == 'SXYX') {  
41 - this.appId = 'wx1305e88d2bc74073'  
42 - } else if (publicName == 'XST') {  
43 - this.appId = 'wx1c630c8773c482f1'  
44 - } else if (publicName == 'KQ') {  
45 - this.appId = 'wx1305e88d2bc74073'  
46 - }  
47 - this.openId = sessionStorage.getItem('openId' + publicName);  
48 - this.unionId = sessionStorage.getItem('unionId');  
49 - if (process.env.NODE_ENV === "production"&&this.common.isWeiXin()) {  
50 - if (!this.openId) {  
51 - this.$router.push({ name: 'Authorize' + publicName })  
52 - }  
53 - }  
54 -  
55 - },  
56 - methods: {  
57 - getCode () {  
58 - if (this.codeText != '获取验证码') return;  
59 - if (!this.phone) {  
60 - this.$toast('请输入手机号')  
61 - return;  
62 - }  
63 - if (!this.checkPhone(this.phone)) {  
64 - this.$toast('请输入正确的手机号')  
65 - return;  
66 - }  
67 - this.$toast.loading({  
68 - message: '加载中',  
69 - duration: 0,  
70 - forbidClick: true  
71 - })  
72 - this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/getMsg?phone=${this.phone}`).then((res) => {  
73 - this.$toast.clear()  
74 - if (res.data.code == 200) {  
75 - let i = 60;  
76 - codeInterval = setInterval(() => {  
77 - if (i == 0) {  
78 - this.codeText = `获取验证码`;  
79 - clearInterval(codeInterval);  
80 - return;  
81 - }  
82 - this.codeText = `重试(${i})`;  
83 - i--  
84 - }, 1000)  
85 - } else {  
86 - this.$toast.fail(res.data.message)  
87 - }  
88 - })  
89 - },  
90 - submitOperator () {  
91 - if (!this.phone) {  
92 - this.$toast('请输入手机号')  
93 - return;  
94 - }  
95 - if (!this.checkPhone(this.phone)) {  
96 - this.$toast('请输入正确的手机号')  
97 - return;  
98 - }  
99 - if (!this.code) {  
100 - this.$toast('请输入验证码')  
101 - return;  
102 - }  
103 - this.$toast.loading({  
104 - message: '加载中',  
105 - duration: 0,  
106 - forbidClick: true  
107 - })  
108 - this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/checkPhoneAndCode`, {  
109 - phone: this.phone,  
110 - code: this.code,  
111 - unionId: this.unionId,  
112 - openId: this.openId  
113 - }).then((res) => {  
114 - this.$toast.clear()  
115 - if (res.data.code == 200) {  
116 - this.getUserInfo()  
117 - } else {  
118 - this.$toast.fail(res.data.message)  
119 - }  
120 - })  
121 - },  
122 - checkPhone (phone) {  
123 - if ((/^1[3456789]\d{9}$/.test(phone))) {  
124 - return true  
125 - } else {  
126 - return false  
127 - }  
128 - },  
129 - complete () {  
130 - this.getUserInfo()  
131 - },  
132 - // 获取用户信息  
133 - getUserInfo () {  
134 - this.$toast.loading({  
135 - message: '加载中...',  
136 - duration: 0,  
137 - forbidClick: true  
138 - })  
139 - this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${this.appId}/getUserInfo?unionId=${this.unionId}`).then((res) => {  
140 - this.$toast.clear()  
141 - if (res.data.code == 200) {  
142 - sessionStorage.setItem('userInfo', JSON.stringify(res.data.data))  
143 - let prePage = sessionStorage.getItem('prePage');  
144 - let prePageQuery = sessionStorage.getItem('prePageQuery');  
145 - if (prePage) {  
146 - this.$router.push({ name: prePage, query: JSON.parse(prePageQuery) })  
147 - }  
148 - } else {  
149 - this.$toast.fail(res.data.message)  
150 - }  
151 - })  
152 - },  
153 - },  
154 - destroyed () {  
155 - clearInterval(codeInterval);  
156 - }  
157 -}  
158 -</script>  
159 -<style lang="scss" scoped>  
160 -#login {  
161 - .bg {  
162 - width: 100%;  
163 - }  
164 - .login_title {  
165 - font-size: 36px;  
166 - font-weight: bold;  
167 - text-align: center;  
168 - color: #000;  
169 - padding-bottom: 40px;  
170 - }  
171 - .box {  
172 - width: 702px;  
173 - height: 540px;  
174 - background: linear-gradient(  
175 - 180deg,  
176 - rgba(251, 251, 251, 0.99) 0%,  
177 - #ffffff 100%  
178 - );  
179 - box-shadow: 0px 4px 12px 0px rgba(87, 214, 255, 0.2);  
180 - border-radius: 20px;  
181 - position: absolute;  
182 - top: 240px;  
183 - left: 24px;  
184 - box-sizing: border-box;  
185 - padding: 40px;  
186 - .item {  
187 - border-bottom: 1px solid #e2e2e2;  
188 - margin-bottom: 30px;  
189 - }  
190 - .title {  
191 - font-size: 34px;  
192 - font-weight: bold;  
193 - margin-bottom: 28px;  
194 - }  
195 - .flex {  
196 - display: flex;  
197 - align-items: center;  
198 - justify-content: space-between;  
199 - margin-bottom: 22px;  
200 - }  
201 - .code {  
202 - border: 0;  
203 - background: transparent;  
204 - font-size: 28px;  
205 - margin-bottom: 32px;  
206 - width: 100%;  
207 - }  
208 - .phone {  
209 - width: 50%;  
210 - margin: 0;  
211 - }  
212 - .getcode {  
213 - color: #5789ff;  
214 - font-size: 28px;  
215 - padding: 10px;  
216 - }  
217 - .submit {  
218 - width: 622px;  
219 - height: 88px;  
220 - background: linear-gradient(137deg, #83b2ff 0%, #3c80ef 100%);  
221 - box-shadow: 0px 4px 8px 0px rgba(87, 169, 255, 0.5);  
222 - border-radius: 44px;  
223 - border: 0;  
224 - font-size: 34px;  
225 - color: #ffffff;  
226 - margin: 0 auto;  
227 - display: block;  
228 - }  
229 - }  
230 -}  
231 -.prefect_pop {  
232 - background: transparent;  
233 -}  
234 -</style>  
235 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/ServiceBaseKQ.vue
@@ -1,571 +0,0 @@ @@ -1,571 +0,0 @@
1 -<template>  
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 - <ServiceListFour :list="campList" :notab="false"></ServiceListFour>  
14 - </div>  
15 - </div>  
16 - <div v-show="tabName=='KQ'">  
17 - <div class="swipeDiv">  
18 - <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">  
19 - <van-swipe-item>  
20 - <img src="../../assets/keqiao/kq_main1.png" style="width:100%;height:100%" />  
21 - </van-swipe-item>  
22 - <van-swipe-item>  
23 - <img src="../../assets/keqiao/kq_main1.png" style="width:100%;height:100%" />  
24 - </van-swipe-item>  
25 - </van-swipe>  
26 - </div>  
27 - <div class="container" style="margin-bottom:10">  
28 - <!-- 顶部搜索、扫一扫、个人中心 -->  
29 - <van-sticky>  
30 - <div class="top_tool">  
31 - <van-search class="search" v-model="search" shape="round" background="transparent" placeholder="搜索活动、研学旅行、服务" @search="onSearch" />  
32 - </div>  
33 - <div class="redLink">轻纺城小学红色网上游主题教育馆</div>  
34 - </van-sticky>  
35 - <div class="tabsCard">  
36 - <van-tabs v-model="active" sticky offset-top="24vw" z-index='100' :ellipsis="false" :before-change="beforeChange">  
37 - <van-tab title="革命遗址">  
38 - <ServiceListThird :list="uniList" :notab="true"></ServiceListThird>  
39 - </van-tab>  
40 - <van-tab title="文化传承">  
41 - <ServiceListThird :list="weekList" :notab="true"></ServiceListThird>  
42 - </van-tab>  
43 - <van-tab title="红色军旅">  
44 - <ServiceListThird :list="cityList" :notab="true"></ServiceListThird>  
45 - </van-tab>  
46 - <van-tab title="乡村振新">  
47 - <ServiceListThird :list="selectList" :notab="true"></ServiceListThird>  
48 - </van-tab>  
49 - <van-tab title="大好河山">  
50 - <ServiceListThird :list="riverList" :notab="true"></ServiceListThird>  
51 - </van-tab>  
52 - </van-tabs>  
53 - </div>  
54 -  
55 - </div>  
56 - </div>  
57 -  
58 - <Tabbar4 :active="tabName"></Tabbar4>  
59 - <!-- <screen :reload="false"></screen> -->  
60 - </div>  
61 -</template>  
62 -  
63 -<script>  
64 -import Tabbar4 from '@/component/Tabbar4'  
65 -import ServiceList from '@/views/Service/component/ServiceList.vue'  
66 -import ServiceListSecond from '@/views/Service/component/ServiceListSecond.vue'  
67 -import ServiceListThird from '@/views/Service/component/ServiceListThird.vue'  
68 -import ServiceListFour from '@/views/Service/component/ServiceListFour.vue'  
69 -import Screen from '@/views/Service/component/Screen.vue'  
70 -export default {  
71 - props: [  
72 - 'centerNo'  
73 - ],  
74 - data () {  
75 - return {  
76 - search: '',  
77 - defaultHead: require('@/assets/head.png'),  
78 - top_tab_active: 0,  
79 - active: 1,  
80 - uniList: [],  
81 - weekList: [],  
82 - cityList: [],  
83 - selectList: [],  
84 - riverList: [],  
85 - tabName: 'KQ',  
86 - campList: [],  
87 - }  
88 - },  
89 - watch: {  
90 - $route: {  
91 - immediate: true,  
92 - handler () {  
93 - // 设置tabbar状态  
94 - this.tabName = this.$route.query.showTab || 'KQ'  
95 - document.title = this.$route.query.showTab == 'ZZY' ? '周周营' : '柯桥研学'  
96 - }  
97 - }  
98 - },  
99 - mounted () {  
100 - console.log('base mounted')  
101 - this.initService()  
102 -  
103 - },  
104 - activated () {  
105 - console.log('base activated')  
106 - this.initService()  
107 - },  
108 - methods: {  
109 - initService () {  
110 - this.getUniList()  
111 - this.getWeekList()  
112 - this.getCityList()  
113 - this.getSelectList()  
114 - this.getRiverList()  
115 - this.getCampList()  
116 - },  
117 -  
118 - // 革命遗址  
119 - getUniList () {  
120 - this.$toast.loading()  
121 - this.mgop({  
122 - api: 'mgop.sz.hswsy.qxyList', // 必须  
123 - host: 'https://mapi.zjzwfw.gov.cn/',  
124 - dataType: 'JSON',  
125 - type: 'POST',  
126 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
127 - headers: {  
128 - // 'isTestUrl': '1'  
129 - },  
130 - data: {  
131 - "area": "",  
132 - "province": "",  
133 - "city": "",  
134 - "searchType": "5",  
135 - "userId": this.centerNo,  
136 - "productTypeId": "BQ0001",  
137 - "businessTypeId": "BQ0001",  
138 - "channelCode": ""  
139 - },  
140 - onSuccess: data => {  
141 - console.log('data', data)  
142 - this.$toast.clear()  
143 - let uniList = data.data.data;  
144 - for (let i in uniList) {  
145 - uniList[i].course_labels = uniList[i].course_labels?.split(',');  
146 - if (uniList[i].startDate) {  
147 - uniList[i].week = this.formatWeek(this.Moment(uniList[i].startDate).format('d'));  
148 - uniList[i].startDate = this.Moment(uniList[i].startDate).format('YYYY.M.D');  
149 - uniList[i].endDate = this.Moment(uniList[i].endDate).format('YYYY.M.D');  
150 - }  
151 - }  
152 - this.uniList = uniList  
153 - },  
154 - onFail: err => {  
155 - console.log('err', err)  
156 - }  
157 - });  
158 - },  
159 - // 文化传承  
160 - getWeekList () {  
161 - this.mgop({  
162 - api: 'mgop.sz.hswsy.qxyList', // 必须  
163 - host: 'https://mapi.zjzwfw.gov.cn/',  
164 - dataType: 'JSON',  
165 - type: 'POST',  
166 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
167 - headers: {  
168 - // 'isTestUrl': '1'  
169 - },  
170 - data: {  
171 - "area": "",  
172 - "province": "",  
173 - "city": "",  
174 - "searchType": "5",  
175 - "userId": this.centerNo,  
176 - "productTypeId": "BQ0002",  
177 - "businessTypeId": "BQ0001",  
178 - "channelCode": ""  
179 - },  
180 - onSuccess: data => {  
181 - console.log('data', data)  
182 - let weekList = data.data.data;  
183 - for (let i in weekList) {  
184 - weekList[i].course_labels = weekList[i].course_labels?.split(',');  
185 - if (weekList[i].startDate) {  
186 - weekList[i].week = this.formatWeek(this.Moment(weekList[i].startDate).format('d'));  
187 - weekList[i].startDate = this.Moment(weekList[i].startDate).format('YYYY.M.D');  
188 - weekList[i].endDate = this.Moment(weekList[i].endDate).format('YYYY.M.D');  
189 - }  
190 - }  
191 - this.weekList = weekList  
192 - },  
193 - onFail: err => {  
194 - console.log('err', err)  
195 - }  
196 - });  
197 - },  
198 - // 红色军旅  
199 - getCityList () {  
200 - this.mgop({  
201 - api: 'mgop.sz.hswsy.qxyList', // 必须  
202 - host: 'https://mapi.zjzwfw.gov.cn/',  
203 - dataType: 'JSON',  
204 - type: 'POST',  
205 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
206 - headers: {  
207 - // 'isTestUrl': '1'  
208 - },  
209 - data: {  
210 - "area": "",  
211 - "province": "",  
212 - "city": "",  
213 - "searchType": "5",  
214 - "userId": this.centerNo,  
215 - "productTypeId": "BQ0003",  
216 - "businessTypeId": "BQ0001",  
217 - "channelCode": ""  
218 - },  
219 - onSuccess: data => {  
220 - console.log('data', data)  
221 - let cityList = data.data.data;  
222 - for (let i in cityList) {  
223 - cityList[i].course_labels = cityList[i].course_labels?.split(',');  
224 - if (cityList[i].startDate) {  
225 - cityList[i].week = this.formatWeek(this.Moment(cityList[i].startDate).format('d'));  
226 - cityList[i].startDate = this.Moment(cityList[i].startDate).format('YYYY.M.D');  
227 - cityList[i].endDate = this.Moment(cityList[i].endDate).format('YYYY.M.D');  
228 - }  
229 - }  
230 - this.cityList = cityList  
231 - },  
232 - onFail: err => {  
233 - console.log('err', err)  
234 - }  
235 - });  
236 - },  
237 - // 乡村振新  
238 - getSelectList () {  
239 - this.mgop({  
240 - api: 'mgop.sz.hswsy.qxyList', // 必须  
241 - host: 'https://mapi.zjzwfw.gov.cn/',  
242 - dataType: 'JSON',  
243 - type: 'POST',  
244 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
245 - headers: {  
246 - // 'isTestUrl': '1'  
247 - },  
248 - data: {  
249 - "area": "",  
250 - "province": "",  
251 - "city": "",  
252 - "searchType": "5",  
253 - "userId": this.centerNo,  
254 - "productTypeId": "BQ0004",  
255 - "businessTypeId": "BQ0001",  
256 - "channelCode": ""  
257 - },  
258 - onSuccess: data => {  
259 - console.log('data', data)  
260 - let selectList = data.data.data;  
261 - for (let i in selectList) {  
262 - selectList[i].course_labels = selectList[i].course_labels?.split(',');  
263 - if (selectList[i].startDate) {  
264 - selectList[i].week = this.formatWeek(this.Moment(selectList[i].startDate).format('d'));  
265 - selectList[i].startDate = this.Moment(selectList[i].startDate).format('YYYY.M.D');  
266 - selectList[i].endDate = this.Moment(selectList[i].endDate).format('YYYY.M.D');  
267 - }  
268 - }  
269 - this.selectList = selectList  
270 - },  
271 - onFail: err => {  
272 - console.log('err', err)  
273 - }  
274 - });  
275 - },  
276 - // 大好河山  
277 - getRiverList () {  
278 - this.mgop({  
279 - api: 'mgop.sz.hswsy.qxyList', // 必须  
280 - host: 'https://mapi.zjzwfw.gov.cn/',  
281 - dataType: 'JSON',  
282 - type: 'POST',  
283 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
284 - headers: {  
285 - // 'isTestUrl': '1'  
286 - },  
287 - data: {  
288 - "area": "",  
289 - "province": "",  
290 - "city": "",  
291 - "searchType": "5",  
292 - "userId": this.centerNo,  
293 - "productTypeId": "BQ0005",  
294 - "businessTypeId": "BQ0001",  
295 - "channelCode": ""  
296 - },  
297 - onSuccess: data => {  
298 - console.log('data', data)  
299 - let riverList = data.data.data;  
300 - for (let i in riverList) {  
301 - riverList[i].course_labels = riverList[i].course_labels?.split(',');  
302 - if (riverList[i].startDate) {  
303 - riverList[i].week = this.formatWeek(this.Moment(riverList[i].startDate).format('d'));  
304 - riverList[i].startDate = this.Moment(riverList[i].startDate).format('YYYY.M.D');  
305 - riverList[i].endDate = this.Moment(riverList[i].endDate).format('YYYY.M.D');  
306 - }  
307 - }  
308 - this.riverList = riverList  
309 - },  
310 - onFail: err => {  
311 - console.log('err', err)  
312 - }  
313 - });  
314 - },  
315 -  
316 - // 每周一营 6  
317 - getCampList () {  
318 - this.mgop({  
319 - api: 'mgop.sz.hswsy.qxyList', // 必须  
320 - host: 'https://mapi.zjzwfw.gov.cn/',  
321 - dataType: 'JSON',  
322 - type: 'POST',  
323 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
324 - headers: {  
325 - // 'isTestUrl': '1'  
326 - },  
327 - data: {  
328 - "area": "",  
329 - "province": "",  
330 - "city": "",  
331 - "searchType": "6",  
332 - "userId": this.centerNo,  
333 - "productTypeId": "ZZY001",  
334 - "businessTypeId": "JY0004",  
335 - "channelCode": "GZH002"  
336 - },  
337 - onSuccess: data => {  
338 - console.log('data', data)  
339 - let campList = data.data.data;  
340 - for (let i in campList) {  
341 - campList[i].course_labels = campList[i].course_labels?.split(',');  
342 - if (campList[i].startDate) {  
343 - campList[i].week = this.formatWeek(this.Moment(campList[i].startDate).format('d'));  
344 - campList[i].startDate = this.Moment(campList[i].startDate).format('YYYY.M.D');  
345 - campList[i].endDate = this.Moment(campList[i].endDate).format('YYYY.M.D');  
346 - }  
347 - }  
348 - this.campList = campList  
349 - },  
350 - onFail: err => {  
351 - console.log('err', err)  
352 - }  
353 - });  
354 - },  
355 - beforeChange (index) {  
356 - // if (index != 0 && index != 1 && index != 2) {  
357 - // this.$toast('暂未开放,敬请期待!')  
358 - // return false  
359 - // }  
360 - return true  
361 - },  
362 - onSearch () {  
363 - this.$toast('暂未开放,敬请期待!')  
364 - },  
365 - // 我的订单  
366 - handleMyOrder () {  
367 - this.$router.push({ name: 'ServiceOrderXST' })  
368 - },  
369 - // 我的优惠券  
370 - handleMyCard () {  
371 - this.$router.push({ name: 'ServiceCardBoxPublic' })  
372 - },  
373 - formatWeek (week) {  
374 - return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';  
375 - },  
376 - // 点击轮播  
377 - handleBanner () {  
378 - location.href = 'https://mp.weixin.qq.com/s/a4N3xr2nXZ-aG3OEakv-Dg'  
379 - },  
380 - },  
381 - components: {  
382 - Tabbar4,  
383 - ServiceList,  
384 - Screen,  
385 - ServiceListSecond,  
386 - ServiceListThird,  
387 - ServiceListFour  
388 - }  
389 -}  
390 -</script>  
391 -<style lang="scss" scoped>  
392 -#serviceKQ {  
393 - width: 100%;  
394 - height: 100%;  
395 - background: #f8f8f8;  
396 - overflow: hidden;  
397 - .swipeDiv {  
398 - // height: 400px;  
399 - height: 60vw;  
400 - width: 100%;  
401 - }  
402 - .container {  
403 - height: 100%;  
404 - position: absolute;  
405 - // top: 410px;  
406 - top: 60vw;  
407 - background: #f6f7fa;  
408 - background-image: url("../../assets/keqiao/kq_white.png");  
409 - // background-image: url("../../assets/service/bg.png");  
410 - background-size: 100%;  
411 - background-repeat: no-repeat;  
412 - // border-radius: 50px;  
413 - .redLink {  
414 - height: 10vw;  
415 - font-size: 4vw;  
416 - display: flex;  
417 - align-items: center;  
418 - justify-content: center;  
419 - color: #fff;  
420 - // background-color: aquamarine;  
421 - background-image: linear-gradient(  
422 - to right,  
423 - rgba(255, 0, 0, 0),  
424 - #ff696a,  
425 - rgba(255, 0, 0, 0)  
426 - );  
427 - background-color: #fff;  
428 - }  
429 - .tabsCard {  
430 - width: 100vw;  
431 - }  
432 - .top_tool {  
433 - display: flex;  
434 - align-items: center;  
435 - // justify-content: center;  
436 - justify-content: space-between;  
437 - padding: 20px 24px;  
438 - box-sizing: border-box;  
439 - height: 108px;  
440 - background-color: #fff;  
441 - .logo {  
442 - width: 82px;  
443 - }  
444 - .search {  
445 - padding: 0;  
446 - width: 100%;  
447 - // width: 400px;  
448 - }  
449 - .scan {  
450 - width: 44px;  
451 - }  
452 - .head {  
453 - width: 60px;  
454 - }  
455 - .top_tab {  
456 - width: 366px;  
457 - border-radius: 33px;  
458 - overflow: hidden;  
459 - span {  
460 - display: inline-block;  
461 - width: 50%;  
462 - line-height: 66px;  
463 - text-align: center;  
464 - font-size: 28px;  
465 - color: #f3f3f3;  
466 - background: rgba(255, 255, 255, 0.24);  
467 - &.active {  
468 - // color: #fff;  
469 - color: black;  
470 - background: rgba(255, 255, 255, 0.21);  
471 - }  
472 - }  
473 - }  
474 - }  
475 - .service_swipe {  
476 - img {  
477 - width: 100%;  
478 - }  
479 - }  
480 - .card_zzy {  
481 - display: block;  
482 - width: 704px;  
483 - margin: 0 auto;  
484 - margin-top: 20px;  
485 - }  
486 - .order_btn {  
487 - width: 160px;  
488 - position: fixed;  
489 - bottom: 200px;  
490 - right: 20px;  
491 - z-index: 99;  
492 - }  
493 - }  
494 -  
495 - ::v-deep .van-search__content {  
496 - background: rgba(255, 255, 255, 0.36);  
497 - .van-cell {  
498 - // color: #fff;  
499 - color: black;  
500 - }  
501 - .van-field__control {  
502 - // color: #fff;  
503 - color: black;  
504 - &::-webkit-input-placeholder {  
505 - // color: #fff;  
506 - color: #909399;  
507 - }  
508 - }  
509 - }  
510 - ::v-deep .van-tabs__wrap {  
511 - box-shadow: 0 10px 10px rgba(238, 238, 238, 0.295);  
512 - height: 88px;  
513 - }  
514 - ::v-deep .van-tabs__nav {  
515 - background: transparent;  
516 - }  
517 - ::v-deep .van-tab {  
518 - // color: #fff;  
519 - color: black;  
520 - font-size: 28px;  
521 - background-color: #fff;  
522 - }  
523 - ::v-deep .van-tab--active {  
524 - // color: #fff;  
525 - color: black;  
526 - font-size: 32px;  
527 - font-weight: bold;  
528 - }  
529 - ::v-deep .van-tabs__line {  
530 - width: 48px;  
531 - height: 6px;  
532 - // background: #ffffff;  
533 - background: black;  
534 - border-radius: 10px 10px 0px 0px;  
535 - }  
536 - .tab_img {  
537 - width: 146px;  
538 - transition: 0.3s linear;  
539 - }  
540 - .van-tab--active {  
541 - .tab_img {  
542 - transform: scale(1.2);  
543 - }  
544 - }  
545 - .fixed_btn {  
546 - position: fixed;  
547 - bottom: 20vw;  
548 - right: 0;  
549 - span {  
550 - display: block;  
551 - width: 200px;  
552 - text-align: center;  
553 - line-height: 60px;  
554 - font-size: 30px;  
555 - background: rgb(100, 200, 250);  
556 - border-top-left-radius: 30px;  
557 - border-bottom-left-radius: 30px;  
558 - margin-bottom: 30px;  
559 - }  
560 - }  
561 -}  
562 -.my-swipe .van-swipe-item {  
563 - color: #fff;  
564 - height: 60vw;  
565 - font-size: 20px;  
566 - // line-height: 400px;  
567 - // line-height: 60vw;  
568 - text-align: center;  
569 - background-color: #39a9ed;  
570 -}  
571 -</style>  
src/views/PublicService/ServiceKQ.vue
@@ -1,81 +0,0 @@ @@ -1,81 +0,0 @@
1 -<template>  
2 - <service-basekq :centerNo="centerNo" v-if="centerNo"></service-basekq>  
3 -</template>  
4 -  
5 -<script>  
6 -import ServiceBasekq from './ServiceBaseKQ.vue'  
7 -export default {  
8 - name: 'ServiceKQ',  
9 - data () {  
10 - return {  
11 - centerNo: '',  
12 - }  
13 - },  
14 -  
15 - mounted () {  
16 - console.log('xst mounted')  
17 - this.checkAuth()  
18 -  
19 - },  
20 - activated () {  
21 - console.log('KQ activated')  
22 - this.checkAuth()  
23 - },  
24 - methods: {  
25 - checkAuth () {  
26 - let centerNo = this.common.getUrlParam('center_no') || sessionStorage.getItem('centerNo');  
27 - if (centerNo) {  
28 - this.centerNo = centerNo  
29 - sessionStorage.setItem('centerNo', centerNo);  
30 - this.getUserInfo()  
31 - } else {  
32 - const sUserAgent = window.navigator.userAgent.toLowerCase()  
33 - const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1  
34 - const miniprogram = sUserAgent.indexOf("miniprogram") > -1 && sUserAgent.indexOf("alipay") > -1  
35 - if (dtdreamweb) {  
36 - alert('浙里办')  
37 - window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy`;  
38 - }  
39 - // else if (miniprogram) {  
40 - // alert('支付宝')  
41 - // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;  
42 - // }  
43 - else {  
44 - console.log('非浙里办渠道访问,显示测试用户数据')  
45 - this.centerNo = '20210930160466993660'  
46 - sessionStorage.setItem('centerNo', '20210930160466993660');  
47 - this.getUserInfo()  
48 - }  
49 - }  
50 - },  
51 - // 获取用户信息  
52 - getUserInfo: function () {  
53 - this.mgop({  
54 - api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须  
55 - host: 'https://mapi.zjzwfw.gov.cn/',  
56 - dataType: 'JSON',  
57 - type: 'GET',  
58 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
59 - headers: {  
60 - // 'isTestUrl': '1'  
61 - },  
62 - data: {  
63 - "userNum": this.centerNo  
64 - },  
65 - onSuccess: res => {  
66 - console.log('getUserInfo', res)  
67 - if (res.data.code == 200) {  
68 - sessionStorage.setItem('userInfo', JSON.stringify(res.data.data.userInfo))  
69 - }  
70 - },  
71 - onFail: err => {  
72 - console.log('err', err)  
73 - }  
74 - });  
75 - },  
76 - },  
77 - components: {  
78 - ServiceBasekq  
79 - }  
80 -}  
81 -</script>  
src/views/PublicService/ServiceOrderXST.vue
@@ -1,867 +0,0 @@ @@ -1,867 +0,0 @@
1 -<template>  
2 - <div class="myOrders">  
3 - <van-tabs v-model="active" :before-change="beforeTabChange">  
4 - <van-tab title="待付款">  
5 - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadpay()">  
6 - <div class="showBoxDPJ" v-for="(item,index) in paylist" :key="index">  
7 - <div class="topLine">  
8 - <div class="topLineL">订单编号:{{item.orderpaynum}}</div>  
9 - <div class="topLineR" style="color:#F64C37">待付款</div>  
10 - </div>  
11 - <div class="top" @click="toEdit(item)">  
12 - <div class="pic">  
13 - <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
14 - </div>  
15 - <div class="basefont">  
16 - <div class="titlefont">{{item.baseName}}</div>  
17 - <div class="tcfont">套餐名称:{{item.courseName}}</div>  
18 - <div class="tcfont">数量*{{item.orderCount}}</div>  
19 - </div>  
20 - <div class="priceRight">¥{{item.paymoney}}</div>  
21 - </div>  
22 - <div class="detailsBox">  
23 - <div class="detailsBoxOne">  
24 - <div>订单创建时间</div>  
25 - <div>{{item.intime.replace(/T/,' ')}}</div>  
26 - </div>  
27 - </div>  
28 - </div>  
29 - </van-list>  
30 - </van-tab>  
31 - <van-tab title="待使用">  
32 - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadmove()">  
33 - <div class="showBox" v-for="(item,index) in movelist" :key="index">  
34 - <div class="top" @click="toEdit(item)">  
35 - <div class="pic">  
36 - <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
37 - </div>  
38 - <div class="basefont">  
39 - <div class="titlefont">{{item.baseName}}</div>  
40 - <div class="tcfont">套餐名称:{{item.courseName}}</div>  
41 - <div class="tcfont">数量*{{item.orderCount}}</div>  
42 - </div>  
43 - <div class="priceRight">¥{{item.paymoney}}</div>  
44 - </div>  
45 - <div class="groupTime">  
46 - <van-icon name="clock-o" /><span class="grey"> 活动日期</span><span> {{item.startDate}} - {{ item.endDate}}</span>  
47 - </div>  
48 - <div class="btnBox">  
49 - <div class="wechat_code" @click="openGroupCodePopup(index)" style="margin-right:15px">  
50 - <img src="@/assets/home/wechat.png" alt="">  
51 - <span>加入拼团群</span>  
52 - </div>  
53 - <div>  
54 - <van-button type="warning" plain size="small" @click="showPintuanAbout = true" style="margin-right:15px">退款说明</van-button>  
55 - <!-- <van-button type="info" size="small" @click="makeCode(item.id)">核销码</van-button> -->  
56 - <van-button type="info" size="small" @click="toCode(item)">核销码</van-button>  
57 - </div>  
58 - </div>  
59 - <div class="detailsBox">  
60 - <div class="detailsBoxOne">  
61 - <div>订单创建时间</div>  
62 - <div>{{item.intime.replace(/T/,' ')}}</div>  
63 - </div>  
64 - <div class="detailsBoxOne">  
65 - <div>订单编号</div>  
66 - <div>{{item.orderpaynum}}</div>  
67 - </div>  
68 - </div>  
69 - </div>  
70 - </van-list>  
71 - </van-tab>  
72 - <van-tab title="待评价">  
73 - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadCareer()">  
74 - <div class="showBoxDPJ" v-for="(item,index) in datalist" :key="index">  
75 - <div class="topLine">  
76 - <div class="topLineL">订单编号:{{item.orderpaynum}}</div>  
77 - <div class="topLineR" @click="evaluate(item)">去评价 ></div>  
78 - </div>  
79 - <div class="top" @click="toEdit(item)">  
80 - <div class="pic">  
81 - <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
82 - </div>  
83 - <div class="basefont">  
84 - <div class="titlefont">{{item.baseName}}</div>  
85 - <div class="tcfont">套餐名称:{{item.courseName}}</div>  
86 - <div class="tcfont">数量*{{item.orderCount}}</div>  
87 - </div>  
88 - <div class="priceRight">¥{{item.paymoney}}</div>  
89 - </div>  
90 - <div class="detailsBox">  
91 - <div class="detailsBoxOne">  
92 - <div>订单创建时间</div>  
93 - <div>{{item.intime.replace(/T/,' ')}}</div>  
94 - </div>  
95 - </div>  
96 - </div>  
97 - </van-list>  
98 - </van-tab>  
99 - <van-tab title="已评价">  
100 - <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad()">  
101 - <div class="showBoxDPJ showBoxYPJ" v-for="(item,index) in list" :key="index">  
102 - <div class="top">  
103 - <div class="pic">  
104 - <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
105 - </div>  
106 - <div class="basefont">  
107 - <div class="titlefont">{{item.baseName}}</div>  
108 - <div class="tcfont">套餐名称:{{item.courseName}}</div>  
109 - <div class="tcfont">数量*{{item.orderCount}}</div>  
110 - </div>  
111 - <div class="priceRight">¥{{item.paymoney}}</div>  
112 - </div>  
113 - <div class="boxdf">  
114 - <div class="title">课程评分</div>  
115 - <div class="fr">  
116 - <van-rate v-model="item.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />  
117 - <span class="rate">{{item.courseScore}}.0</span>  
118 - </div>  
119 - </div>  
120 - <div class="boxdf">  
121 - <div class="title">基地评分</div>  
122 - <div class="fr">  
123 - <van-rate v-model="item.baseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />  
124 - <span class="rate">{{item.baseScore}}.0</span>  
125 - </div>  
126 - </div>  
127 - <p class="evaluation"><span>评价:</span>{{item.evaluation}}</p>  
128 - <div class="evaluation_img_box">  
129 - <img class="evaluation_img" v-for="(imgItem,index) in item.imageList" :key="index" :src="imgItem.imgUrl" alt="" @click="previewImg(imgItem.imgUrl)">  
130 - </div>  
131 - <!-- <p class="evaluation_time">评价于2020-12-21</p> -->  
132 - </div>  
133 - </van-list>  
134 - </van-tab>  
135 - </van-tabs>  
136 -  
137 - <!--二维码-->  
138 - <!-- <div class="qrcodeBox" @click.self="qrcodeShow = false" v-show="qrcodeShow">  
139 - <div id="qrcode"></div>  
140 - </div> -->  
141 -  
142 - <!--退款说明-->  
143 - <van-popup v-model="showPintuanAbout" round>  
144 - <div class="pintuan_about">  
145 - <img class="about_img" src="@/assets/service/tip.png" alt="">  
146 - <p class="about_title">退款说明</p>  
147 - <p class="about_content">1、凡拼团活动报名人数未达最低成团数,本团活动则不开营,系统将在72小时内,全额退还,且不产生违约风险赔偿。</p>  
148 - <p class="about_content">2、如果您因行程发生变动需要取消预订,建议您尽可能提前与平台商户取得联系,并按商品订购须知或该商户旅游合同条款进行退款。</p>  
149 - <p class="about_content" style="font-weight:bold">如若未声明与明确的,按《浙江省境内旅游合同》条款退款。</p>  
150 - <!-- <p class="about_content">(1)出发前7日至4日,支付旅游费用总额的10%。</p>  
151 - <p class="about_content">(2)出发前3日至1日,支付旅游费用总额的15%。</p>  
152 - <p class="about_content">(3)出发当日,支付旅游费用总额的20%。</p> -->  
153 - <p class="about_know" @click="showPintuanAbout=false">我知道了</p>  
154 - </div>  
155 - </van-popup>  
156 -  
157 - <van-popup v-model="showCode" round get-container="body">  
158 - <div class="codeCss">  
159 - <div class="showBox">  
160 - <div class="top">  
161 - <div class="pic">  
162 - <img :src="codeData.coverUrl ? codeData.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
163 - </div>  
164 - <div class="basefont">  
165 - <div class="titlefont">{{codeData.baseName}}</div>  
166 - <div class="tcfont">套餐名称:{{codeData.courseName}}</div>  
167 - <div class="tcfont">数量*{{codeData.orderCount}}</div>  
168 - </div>  
169 - <!-- <div class="priceRight">¥{{codeData.paymoney}}</div> -->  
170 - </div>  
171 - <div class="groupTime">  
172 - <van-icon name="clock-o" /><span class="grey"> 活动日期</span><span> {{codeData.startDate}} - {{ codeData.endDate}}</span>  
173 - </div>  
174 - <div class="qrcodeBox">  
175 - <div id="qrcode" ref="imageWrapper" v-if="!imgUrl"></div>  
176 - <div class="imgBox">  
177 - <img :src="imgUrl" v-if="imgUrl" style="width:100%;height:100%" />  
178 - </div>  
179 - </div>  
180 - <div class="numShow">  
181 - {{codeData.id}}  
182 - </div>  
183 - <div class="fontBottom">请向工作人员出示</div>  
184 - </div>  
185 - </div>  
186 - </van-popup>  
187 - <van-popup v-model="showPreview" round get-container="body">  
188 - <img class="preview_img" :src="previewUrl" alt="">  
189 - </van-popup>  
190 - <GroupCodePopup v-if="showGroupCode" :chatGroupUrl="chatGroupUrl" @closeGroupCode="showGroupCode=false"></GroupCodePopup>  
191 - </div>  
192 -</template>  
193 -  
194 -<script>  
195 -import GroupCodePopup from '@/component/GroupCodePopup'  
196 -import QRCode from 'qrcodejs2' // 引入qrcode  
197 -import html2canvas from "html2canvas"  
198 -// let Base64 = require('js-base64').Base64;  
199 -export default {  
200 - name: 'ServiceOrder',  
201 - data () {  
202 - return {  
203 - userInfo: '',  
204 - active: 1,  
205 - paylist: [], //待付款  
206 - movelist: [], //待核销  
207 - list: [], //所有  
208 - datalist: [], //未评价  
209 - loading: false,  
210 - finished: false,  
211 - pageCareerIndex: 0,  
212 - qrcodeShow: false,  
213 - showPintuanAbout: false,  
214 - showCode: false,  
215 - codeData: {},  
216 - imgUrl: '',  
217 - previewUrl: '',//图片预览  
218 - showPreview: false,  
219 - showGroupCode: false,//群码  
220 - chatGroupUrl: '',//群码图片  
221 - showChatGroupUrlTag: false  
222 - }  
223 - },  
224 - computed: {  
225 - nicknameUser () {  
226 - return sessionStorage.getItem('nicknameUser')  
227 - }  
228 - },  
229 - mounted () {  
230 - let userInfo = sessionStorage.getItem('userInfo');  
231 - if (userInfo) {  
232 - this.userInfo = JSON.parse(userInfo);  
233 - }  
234 - // 进入页面进到第几个tab  
235 - if (this.$route.query.active || this.$route.query.active == 0) {  
236 - this.active = this.$route.query.active  
237 - }  
238 - // 进入页面直接显示第一个订单的群码  
239 - if (this.$route.query.showChatGroupUrl == 1) {  
240 - this.showChatGroupUrlTag = true  
241 - }  
242 - },  
243 - methods: {  
244 - beforeTabChange (item) {  
245 - console.log(item)  
246 - this.paylist = [];  
247 - this.movelist = [];  
248 - this.list = [];  
249 - this.datalist = [];  
250 - if (item == 0) {  
251 - this.onLoadpay()  
252 - } else if (item == 1) {  
253 - // this.onLoadCareer()  
254 - this.onLoadmove()  
255 - } else if (item == 2) {  
256 - this.onLoadCareer()  
257 - } else {  
258 - this.onLoad()  
259 - }  
260 - return true;  
261 - },  
262 - //获取待支付  
263 - onLoadpay () {  
264 - this.mgop({  
265 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
266 - host: 'https://mapi.zjzwfw.gov.cn/',  
267 - dataType: 'JSON',  
268 - type: 'GET',  
269 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
270 - headers: {  
271 - // 'isTestUrl': '1'  
272 - },  
273 - data: {  
274 - "userId": sessionStorage.getItem('centerNo'),  
275 - "type": 1,  
276 - "page": 1,  
277 - "pageSize": 999  
278 - },  
279 - onSuccess: res => {  
280 - console.log('待支付:', res)  
281 - if (res.data.status == 1) {  
282 - this.paylist = res.data.data.list;  
283 - this.loading = false;  
284 - this.finished = true;  
285 - } else {  
286 - this.$toast.fail(res.data.message);  
287 - }  
288 - },  
289 - onFail: err => {  
290 - console.log('err', err)  
291 - }  
292 - });  
293 - },  
294 - //获取已支付  
295 - onLoadmove () {  
296 - this.mgop({  
297 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
298 - host: 'https://mapi.zjzwfw.gov.cn/',  
299 - dataType: 'JSON',  
300 - type: 'GET',  
301 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
302 - headers: {  
303 - // 'isTestUrl': '1'  
304 - },  
305 - data: {  
306 - "userId": sessionStorage.getItem('centerNo'),  
307 - "type": 2,  
308 - "page": 1,  
309 - "pageSize": 999  
310 - },  
311 - onSuccess: res => {  
312 - console.log('已支付:', res)  
313 - if (res.data.status == 1) {  
314 - this.movelist = res.data.data.list;  
315 - this.loading = false;  
316 - this.finished = true;  
317 - if (this.showChatGroupUrlTag) {  
318 - this.showChatGroupUrlTag = false;  
319 - this.openGroupCodePopup(0)  
320 - }  
321 - } else {  
322 - this.$toast.fail(res.data.message);  
323 - }  
324 - },  
325 - onFail: err => {  
326 - console.log('err', err)  
327 - }  
328 - });  
329 - },  
330 - //获取待评价  
331 - onLoadCareer () {  
332 - this.mgop({  
333 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
334 - host: 'https://mapi.zjzwfw.gov.cn/',  
335 - dataType: 'JSON',  
336 - type: 'GET',  
337 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
338 - headers: {  
339 - // 'isTestUrl': '1'  
340 - },  
341 - data: {  
342 - "userId": sessionStorage.getItem('centerNo'),  
343 - "type": 3,  
344 - "page": 1,  
345 - "pageSize": 999  
346 - },  
347 - onSuccess: res => {  
348 - console.log('待评价:', res)  
349 - if (res.data.status == 1) {  
350 - this.datalist = res.data.data.list;  
351 - this.loading = false;  
352 - this.finished = true;  
353 - if (this.showChatGroupUrlTag) {  
354 - this.showChatGroupUrlTag = false;  
355 - this.openGroupCodePopup(0)  
356 - }  
357 - } else {  
358 - this.$toast.fail(res.data.message);  
359 - }  
360 - },  
361 - onFail: err => {  
362 - console.log('err', err)  
363 - }  
364 - });  
365 - },  
366 - //获取已评价  
367 - onLoad () {  
368 - this.mgop({  
369 - api: 'mgop.sz.hswsy.GetOrderPayList', // 必须  
370 - host: 'https://mapi.zjzwfw.gov.cn/',  
371 - dataType: 'JSON',  
372 - type: 'GET',  
373 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
374 - headers: {  
375 - // 'isTestUrl': '1'  
376 - },  
377 - data: {  
378 - "userId": sessionStorage.getItem('centerNo'),  
379 - "type": 4,  
380 - "page": 1,  
381 - "pageSize": 999  
382 - },  
383 - onSuccess: res => {  
384 - console.log('已评价:', res)  
385 - if (res.data.status == 1) {  
386 - this.list = res.data.data.list;  
387 - this.loading = false;  
388 - this.finished = true;  
389 - if (this.showChatGroupUrlTag) {  
390 - this.showChatGroupUrlTag = false;  
391 - this.openGroupCodePopup(0)  
392 - }  
393 - } else {  
394 - this.$toast.fail(res.data.message);  
395 - }  
396 - },  
397 - onFail: err => {  
398 - console.log('err', err)  
399 - }  
400 - });  
401 - },  
402 - //生成核销码  
403 - makeCode (id) {  
404 - console.log(id.toString())  
405 - document.getElementById('qrcode').innerHTML = '';  
406 - this.qrcodeShow = true;  
407 -  
408 - let qrcode = new QRCode('qrcode', {  
409 - width: 200,  
410 - height: 200,  
411 - text: id.toString(), // 二维码地址  
412 - })  
413 - this.canvanqrCode()  
414 - },  
415 - //评价  
416 - evaluate (item) {  
417 - window.sessionStorage.setItem('courseInfo', JSON.stringify(item))  
418 - this.$router.push({ name: 'evaluateCourse' })  
419 - },  
420 - //核销码  
421 - toCode (item) {  
422 - this.codeData = {}  
423 - this.showCode = true  
424 - this.codeData = item  
425 - this.imgUrl = ''  
426 - setTimeout(() => {  
427 - this.makeCode(item.id)  
428 - }, 1000);  
429 - },  
430 - // 打开群码弹窗  
431 - openGroupCodePopup (index) {  
432 - this.chatGroupUrl = this.movelist[index]?.chatGroupUrl  
433 - this.showGroupCode = true;  
434 - },  
435 - //跳转  
436 - toEdit (item) {  
437 - this.$router.push({ path: 'abroad_detail', query: { courseId: item.courseId, publicName: sessionStorage.getItem('publicName') } })  
438 - },  
439 - //二维码转图片  
440 - canvanqrCode () {  
441 - html2canvas(this.$refs.imageWrapper, {  
442 - width: 200,  
443 - height: 200  
444 - }).then(canvas => {  
445 - let dataURL = canvas.toDataURL("image/png");  
446 - this.imgUrl = dataURL;  
447 - });  
448 - },  
449 - // 预览图片  
450 - previewImg (url) {  
451 - this.previewUrl = url;  
452 - this.showPreview = true  
453 - }  
454 - },  
455 - components: {  
456 - GroupCodePopup  
457 - }  
458 -}  
459 -</script>  
460 -  
461 -<style lang="scss" scoped>  
462 -.myOrders {  
463 - position: fixed;  
464 - top: 0;  
465 - left: 0;  
466 - right: 0;  
467 - bottom: 0;  
468 - overflow: auto;  
469 - background: #f6f7fa;  
470 -  
471 - // .qrcodeBox {  
472 - // position: fixed;  
473 - // top: 0;  
474 - // left: 0;  
475 - // bottom: 0;  
476 - // right: 0;  
477 - // background-color: rgba(0, 0, 0, 0.4);  
478 -  
479 - // #qrcode {  
480 - // position: absolute;  
481 - // top: 50%;  
482 - // left: 50%;  
483 - // transform: translate(-50%, -50%);  
484 - // padding: 20px;  
485 - // background: #fff;  
486 - // }  
487 - // }  
488 -  
489 - .list {  
490 - padding: 20px;  
491 - box-sizing: border-box;  
492 -  
493 - li:not(:last-child) {  
494 - border-bottom: 1px dashed #eee;  
495 - }  
496 -  
497 - li {  
498 - margin-bottom: 10px;  
499 - padding-bottom: 10px;  
500 -  
501 - .baseName {  
502 - padding-left: 50px;  
503 - font-size: 30px;  
504 - background: url("../../assets/service/hoom.png") no-repeat left top;  
505 - background-size: contain;  
506 - margin: 10px 0;  
507 - }  
508 - .career_type {  
509 - font-size: 30px;  
510 - margin: 0;  
511 - margin-top: 10px;  
512 - }  
513 - .career_create {  
514 - color: #ccc;  
515 - font-size: 30px;  
516 - margin: 0;  
517 - margin-top: 10px;  
518 - }  
519 - .course {  
520 - min-height: 60px;  
521 -  
522 - img {  
523 - object-fit: cover;  
524 - width: 200px;  
525 - float: left;  
526 - margin-right: 10px;  
527 - }  
528 -  
529 - .courseCont {  
530 - h5 {  
531 - word-break: break-all;  
532 - text-overflow: ellipsis;  
533 - display: -webkit-box;  
534 - -webkit-box-orient: vertical;  
535 - -webkit-line-clamp: 2;  
536 - overflow: hidden;  
537 - font-size: 30px;  
538 - margin: 0;  
539 - }  
540 -  
541 - p {  
542 - color: #ccc;  
543 - font-size: 30px;  
544 - margin: 0;  
545 - margin-top: 10px;  
546 - }  
547 - }  
548 - }  
549 -  
550 - .orderCont {  
551 - padding: 40px 0;  
552 - font-size: 28px;  
553 -  
554 - span {  
555 - color: red;  
556 - }  
557 -  
558 - .pj {  
559 - float: right;  
560 - }  
561 - }  
562 -  
563 - .codeBtn {  
564 - text-align: right;  
565 - margin-top: 15px;  
566 - }  
567 - }  
568 - }  
569 - //待审核  
570 - .showBox {  
571 - width: 702px;  
572 - background: #fff;  
573 - border-radius: 16px;  
574 - margin: 30px auto;  
575 - padding: 34px 24px;  
576 - box-sizing: border-box;  
577 -  
578 - .top {  
579 - display: flex;  
580 -  
581 - .pic {  
582 - width: 124px;  
583 - height: 124px;  
584 - flex-shrink: 0;  
585 - }  
586 - .basefont {  
587 - padding: 0 20px;  
588 - box-sizing: border-box;  
589 - .titlefont {  
590 - color: #333333;  
591 - font-size: 28px;  
592 - margin-bottom: 18px;  
593 - }  
594 - .tcfont {  
595 - color: #535353;  
596 - font-size: 24px;  
597 - }  
598 - }  
599 - .priceRight {  
600 - width: 110px;  
601 - font-size: 28px;  
602 - color: #f64c37;  
603 - line-height: 200px;  
604 - }  
605 - }  
606 - .groupTime {  
607 - font-size: 28px;  
608 - line-height: 60px;  
609 - height: 60px;  
610 - margin-bottom: 20px;  
611 - // background-color: #f5f6fa;  
612 - padding-left: 10px;  
613 - box-sizing: border-box;  
614 -  
615 - .grey {  
616 - color: #999999;  
617 - }  
618 - }  
619 - .btnBox {  
620 - display: flex;  
621 - justify-content: space-between;  
622 - align-items: center;  
623 - .wechat_code {  
624 - display: flex;  
625 - align-items: center;  
626 - height: 54px;  
627 - padding: 0 16px;  
628 - background: #00c800;  
629 - border-radius: 8px;  
630 - font-size: 28px;  
631 - color: #fff;  
632 - img {  
633 - width: 40px;  
634 - margin-right: 14px;  
635 - }  
636 - }  
637 - }  
638 - .detailsBox {  
639 - color: #999999;  
640 - font-size: 28px;  
641 - margin-top: 60px;  
642 -  
643 - .detailsBoxOne {  
644 - margin-top: 20px;  
645 - display: flex;  
646 - justify-content: space-between;  
647 - }  
648 - }  
649 - }  
650 - //待评价  
651 - .showBoxDPJ {  
652 - width: 702px;  
653 - // height: 330px;  
654 - margin: 30px auto;  
655 - padding: 34px 24px;  
656 - box-sizing: border-box;  
657 - background: #fff;  
658 - border-radius: 16px;  
659 - .topLine {  
660 - height: 60px;  
661 - display: flex;  
662 - justify-content: space-between;  
663 - .topLineL {  
664 - font-size: 23px;  
665 - color: #999999;  
666 - }  
667 - .topLineR {  
668 - font-size: 23px;  
669 - }  
670 - }  
671 - .top {  
672 - display: flex;  
673 -  
674 - .pic {  
675 - width: 124px;  
676 - height: 124px;  
677 - flex-shrink: 0;  
678 - }  
679 - .basefont {  
680 - padding: 0 20px;  
681 - box-sizing: border-box;  
682 - .titlefont {  
683 - margin-bottom: 18px;  
684 - color: #333333;  
685 - font-weight: bold;  
686 - font-size: 28px;  
687 - }  
688 - .tcfont {  
689 - color: #535353;  
690 - font-size: 24px;  
691 - }  
692 - }  
693 - .priceRight {  
694 - width: 110px;  
695 - font-size: 28px;  
696 - color: #f64c37;  
697 - line-height: 200px;  
698 - }  
699 - }  
700 - .detailsBox {  
701 - color: #999999;  
702 - font-size: 28px;  
703 -  
704 - .detailsBoxOne {  
705 - margin-top: 20px;  
706 - display: flex;  
707 - justify-content: space-between;  
708 - }  
709 - }  
710 - }  
711 - // 已评价  
712 - .showBoxYPJ {  
713 - .boxdf {  
714 - padding: 10px 0;  
715 - font-size: 5vw;  
716 - display: flex;  
717 - .title {  
718 - font-size: 28px;  
719 - margin-right: 10px;  
720 - }  
721 - .rate {  
722 - color: #ffcc00;  
723 - font-size: 30px;  
724 - margin-left: 10px;  
725 - }  
726 - }  
727 - .evaluation {  
728 - font-size: 30px;  
729 - span {  
730 - font-weight: bold;  
731 - }  
732 - }  
733 - .evaluation_img_box {  
734 - margin-top: 22px;  
735 - .evaluation_img {  
736 - width: 212px;  
737 - height: 212px;  
738 - margin-right: 9px;  
739 - margin-bottom: 9px;  
740 - &:nth-of-type(3n) {  
741 - margin-right: 0;  
742 - }  
743 - }  
744 - }  
745 - .evaluation_time {  
746 - margin-top: 18px;  
747 - text-align: right;  
748 - color: #999999;  
749 - font-size: 28px;  
750 - }  
751 - }  
752 -  
753 - .pintuan_about {  
754 - width: 592px;  
755 - box-sizing: border-box;  
756 - padding: 0 50px;  
757 - .about_img {  
758 - width: 112px;  
759 - margin: 0 auto;  
760 - margin-top: 30px;  
761 - display: block;  
762 - }  
763 - .about_title {  
764 - font-size: 34px;  
765 - font-weight: bold;  
766 - text-align: center;  
767 - }  
768 - .about_content {  
769 - font-size: 30px;  
770 - margin-top: 20px;  
771 - }  
772 - .about_know {  
773 - font-size: 32px;  
774 - text-align: center;  
775 - color: #3385ff;  
776 - margin-top: 60px;  
777 - margin-bottom: 44px;  
778 - }  
779 - }  
780 -}  
781 -.codeCss {  
782 - width: 700px;  
783 - height: 850px;  
784 - position: relative;  
785 -  
786 - .showBox {  
787 - width: 702px;  
788 - // height: 500px;  
789 - // background-color: aquamarine;  
790 - margin: 30px auto;  
791 - padding: 34px 24px;  
792 - box-sizing: border-box;  
793 -  
794 - .top {  
795 - display: flex;  
796 -  
797 - .pic {  
798 - width: 124px;  
799 - height: 124px;  
800 - flex-shrink: 0;  
801 - }  
802 - .basefont {  
803 - padding: 0 20px;  
804 - box-sizing: border-box;  
805 - .titlefont {  
806 - color: #333333;  
807 - font-size: 28px;  
808 - margin-bottom: 18px;  
809 - }  
810 - .tcfont {  
811 - color: #535353;  
812 - font-size: 24px;  
813 - }  
814 - }  
815 - .priceRight {  
816 - width: 110px;  
817 - font-size: 28px;  
818 - color: #f64c37;  
819 - line-height: 200px;  
820 - }  
821 - }  
822 - .groupTime {  
823 - font-size: 28px;  
824 - line-height: 60px;  
825 - height: 60px;  
826 - margin-bottom: 20px;  
827 - background-color: #f5f6fa;  
828 - padding-left: 10px;  
829 - box-sizing: border-box;  
830 -  
831 - .grey {  
832 - color: #999999;  
833 - }  
834 - }  
835 - .qrcodeBox {  
836 - width: 100%;  
837 - height: 430px;  
838 -  
839 - #qrcode {  
840 - transform: translate(25%, 10%);  
841 - // margin: auto;  
842 - }  
843 - .imgBox {  
844 - width: 370px;  
845 - height: 370px;  
846 - margin: 30px auto 0;  
847 - // transform: translate(25%, 10%);  
848 - }  
849 - }  
850 - .numShow {  
851 - width: 100%;  
852 - font-size: 28px;  
853 - text-align: center;  
854 - color: #999999;  
855 - }  
856 - .fontBottom {  
857 - width: 100%;  
858 - font-weight: bold;  
859 - font-size: 28px;  
860 - text-align: center;  
861 - }  
862 - }  
863 -}  
864 -.preview_img {  
865 - width: 100vw;  
866 -}  
867 -</style>  
src/views/PublicService/component/PrefectBox.vue
@@ -1,392 +0,0 @@ @@ -1,392 +0,0 @@
1 -<template>  
2 - <div>  
3 - <div id="prefect_box">  
4 - <img class="bg" src="@/assets/msg.png" alt="">  
5 - <div class="content">  
6 - <div class="name">学生信息:</div>  
7 - <div class="item">  
8 - <input type="text" placeholder="请输入学生姓名" v-model="studentName">  
9 - </div>  
10 - <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;">  
11 - <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p>  
12 - <img src="@/assets/more.png" alt="">  
13 - </div>  
14 - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;">  
15 - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p>  
16 - <img src="@/assets/more.png" alt="">  
17 - </div>  
18 - <div class="item" @click="showAreaSelect=true">  
19 - <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>  
20 - <img src="@/assets/more.png" alt="">  
21 - </div>  
22 - <!-- <div class="item">  
23 - <form action="/" style="width:100%;">  
24 - <van-search v-model="searchSchool" placeholder="请输入学校关键字" @search="handleSchool" />  
25 - </form>  
26 - </div> -->  
27 - <div class="item">  
28 - <input type="text" placeholder="请选择学校" readonly v-model="school">  
29 - <button type="info" class="btn" @click="chooseSchool">选择学校</button>  
30 - </div>  
31 -  
32 - <!-- <p class="school_select" v-if="school">已选择学校:{{school}}</p> -->  
33 - <button class="submit" @click="submit">完成</button>  
34 - </div>  
35 - </div>  
36 - <van-popup v-model="showUserTypeSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
37 - <van-picker title="当前阶段" show-toolbar :columns="userTypeArr" value-key="label" @cancel="showUserTypeSelect = false" @confirm="selectUserTypeOver" />  
38 - </van-popup>  
39 - <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
40 - <van-picker title="入学年份" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />  
41 - </van-popup>  
42 - <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
43 - <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />  
44 - </van-popup>  
45 - <van-popup v-model="showSchoolSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
46 - <van-picker title="学校" show-toolbar :columns="schoolList" :loading="schoolListLoading" @cancel="showSchoolSelect = false" @confirm="selectSchoolOver" />  
47 - </van-popup>  
48 -  
49 - <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true">  
50 - <div v-if="chooseSchoolisShow"><chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool></div>  
51 - </van-popup>  
52 - </div>  
53 -</template>  
54 -  
55 -<script>  
56 -import chooseSchool from './chooseSchool'  
57 -export default {  
58 - props: [  
59 - "phone",  
60 - "id",  
61 - "publicName"  
62 - ],  
63 - components: {chooseSchool},  
64 - data () {  
65 - return {  
66 - studentName: '',  
67 -  
68 - year: '',//入学年份  
69 - yearDisable: false,  
70 - showYearSelect: false,  
71 - yearArr: [],  
72 -  
73 - userType: '',  
74 - userTypeVal: '',//所处阶段1-小学 2-初中 3-高中  
75 - showUserTypeSelect: false,  
76 - userTypeArr: [{  
77 - label: '小学',  
78 - value: 1  
79 - }, {  
80 - label: '初中',  
81 - value: 2  
82 - }, {  
83 - label: '高中',  
84 - value: 3  
85 - }],  
86 -  
87 - area: '',  
88 - areaCode: '',  
89 - showAreaSelect: false,  
90 - areaList: [],  
91 -  
92 - searchSchool: '',  
93 - school: '',  
94 - schoolId: '',  
95 - showSchoolSelect: false,  
96 - schoolListLoading: false,  
97 - schoolList: [],  
98 -  
99 - appId: '',  
100 - chooseSchoolisShow: false  
101 - }  
102 - },  
103 -  
104 - mounted () {  
105 - if (this.publicName == 'SXYX') {  
106 - this.appId = 'wx1305e88d2bc74073'  
107 - } else if (this.publicName == 'XST') {  
108 - this.appId = 'wx1c630c8773c482f1'  
109 - }  
110 - let userInfo = sessionStorage.getItem('userInfo')  
111 - this.userInfo = userInfo ? JSON.parse(userInfo) : userInfo;  
112 - this.studentName = this.userInfo?.studentName;  
113 - this.initYearArr()  
114 - this.GetSysAreaList()  
115 - },  
116 - methods: {  
117 - // 初始化入学年份选项  
118 - initYearArr () {  
119 - // 页面创建时执行  
120 - let year = new Date().getFullYear(),  
121 - Month = new Date().getMonth() + 1,  
122 - yearArr = [];  
123 - if (Month > 8) {  
124 - // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份  
125 - year = year  
126 - }  
127 - for (let index = year; index > year - 6; index--) {  
128 - yearArr.push({ value: index, label: index })  
129 - }  
130 - this.yearArr = yearArr  
131 - },  
132 - selectYearOver (value) {  
133 - this.year = value.label;  
134 - this.showYearSelect = false;  
135 - },  
136 - handleYear () {  
137 - if (!this.yearDisable) {  
138 - this.showYearSelect = true;  
139 - }  
140 - },  
141 - selectUserTypeOver (value) {  
142 - this.userType = value.label;  
143 - this.userTypeVal = value.value;  
144 - this.showUserTypeSelect = false;  
145 - },  
146 - // 获取地区列表  
147 - GetSysAreaList () {  
148 - this.http.GetSysAreaList({  
149 - areaCode: 33  
150 - }).then((res) => {  
151 - if (res.success) {  
152 - let data = res.data;  
153 - let obj = {  
154 - province_list: {  
155 - 330000: '浙江省'  
156 - },  
157 - city_list: {},  
158 - county_list: {}  
159 - };  
160 - if (data) {  
161 - data.forEach((n, i) => {  
162 - obj.city_list[n.area_code + '00'] = n.area_name;  
163 - if (n.areaList.length > 0) {  
164 - n.areaList.forEach((k, j) => {  
165 - obj.county_list[k.area_code] = k.area_name;  
166 - })  
167 - }  
168 - });  
169 - this.areaList = obj;  
170 - }  
171 - } else {  
172 - this.$toast.fail(res.message)  
173 - }  
174 - })  
175 - },  
176 - selectAreaOver (value) {  
177 - let data = value;  
178 - var city = data[1].code;  
179 - city = city.substring(0, city.length - 2);  
180 - // console.log(city)  
181 - this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;  
182 - this.areaCode = [data[0].code, city, data[2].code];  
183 - this.quCode = data[2].code;  
184 - this.school = '',  
185 - this.schoolId = '',  
186 - this.showAreaSelect = false  
187 - },  
188 - // 点击选择学校  
189 - handleSchool () {  
190 - if (!this.searchSchool) {  
191 - this.$toast('请输入学校关键字');  
192 - return;  
193 - }  
194 - this.showSchoolSelect = true;  
195 - this.GetHighSchoolList();  
196 - },  
197 - // 通过地区获取学校  
198 - GetHighSchoolList () {  
199 - this.schoolListLoading = true;  
200 - this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/GetAllSchoolList?schoolName=${this.searchSchool}`).then((res) => {  
201 - if (res.data.data) {  
202 - let data = res.data.data;  
203 - let arr = [];  
204 - if (data) {  
205 - data.forEach((n, i) => {  
206 - let obj = {};  
207 - obj.text = n.schoolName;  
208 - obj.id = n.id;  
209 - arr.push(obj);  
210 - });  
211 - this.schoolList = arr;  
212 - this.schoolListLoading = false  
213 - }  
214 - } else {  
215 - this.schoolListLoading = false  
216 - this.$toast.fail(res.data.message)  
217 - }  
218 - })  
219 - },  
220 - selectSchoolOver (value) {  
221 - console.log(value)  
222 - this.school = value.text;  
223 - this.schoolId = value.id;  
224 - this.showSchoolSelect = false;  
225 - },  
226 -  
227 - submit () {  
228 - if (!this.studentName) {  
229 - this.$toast('请输入姓名');  
230 - }  
231 - else if (!this.userType) {  
232 - this.$toast('请选择阶段');  
233 - }  
234 - else if (!this.year) {  
235 - this.$toast('请选择入学年份');  
236 - }  
237 - else if (!this.area) {  
238 - this.$toast('请选择地区');  
239 - }  
240 - else if (!this.school) {  
241 - this.$toast('请选择学校');  
242 - } else {  
243 - let postData = {  
244 - id: this.id,  
245 - userName: this.studentName,  
246 - mobile: this.phone,  
247 - province: this.area.split(',')[0],//省份  
248 - city: this.area.split(',')[1],//城市  
249 - area: this.area.split(',')[2],//地区  
250 - schoolName: this.school,//学校名称  
251 - enrollYear: this.year,//入学年份  
252 - userType: this.userTypeVal,//1-小学 2-初中 3-高中  
253 - }  
254 - this.$toast.loading({  
255 - message: '加载中',  
256 - duration: 0,  
257 - forbidClick: true  
258 - })  
259 - this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/updateUserInfo`, postData).then((res) => {  
260 - this.$toast.clear()  
261 - if (res.data.code == 200) {  
262 - this.$toast.success(res.data?.message)  
263 - this.$emit('complete')  
264 - this.$emit('hidePrefectBox')  
265 - } else {  
266 - this.$toast.fail(res.message)  
267 - }  
268 - })  
269 - }  
270 - },  
271 - //选择学校  
272 - chooseSchool() {  
273 - // this.$router.push({name: 'chooseSchool'})  
274 - this.chooseSchoolisShow = true  
275 - },  
276 - schoolData(val) {  
277 - this.school = val.text;  
278 - this.schoolId = val.id;  
279 - }  
280 - }  
281 -}  
282 -</script>  
283 -<style lang="scss" scoped>  
284 -#prefect_box {  
285 - width: 638px;  
286 - height: 836px;  
287 - background: #ffffff;  
288 - border-radius: 24px;  
289 - position: relative;  
290 -  
291 - .bg {  
292 - width: 100%;  
293 - position: absolute;  
294 - top: 0;  
295 - left: 0;  
296 - }  
297 - .content {  
298 - width: 100%;  
299 - box-sizing: border-box;  
300 - padding: 0 40px;  
301 - position: absolute;  
302 - top: 236px;  
303 - left: 0;  
304 - .name {  
305 - width: 558px;  
306 - height: 50px;  
307 - font-size: 28px;  
308 - color: #000;  
309 - padding-left: 20px;  
310 - box-sizing: border-box;  
311 - }  
312 - .item {  
313 - width: 558px;  
314 - height: 72px;  
315 - border-radius: 36px;  
316 - background: #f7f7f7;  
317 - box-sizing: border-box;  
318 - font-size: 28px;  
319 - padding: 0 32px;  
320 - display: flex;  
321 - justify-content: space-between;  
322 - align-items: center;  
323 - margin-bottom: 28px;  
324 - p {  
325 - color: #333333;  
326 - &.nodata {  
327 - color: #999999;  
328 - }  
329 - }  
330 - img {  
331 - width: 40px;  
332 - }  
333 - input {  
334 - width: 100%;  
335 - background: transparent;  
336 - border: 0;  
337 - color: #333333;  
338 - padding: 0;  
339 - &::-webkit-input-placeholder {  
340 - color: #999999;  
341 - }  
342 - }  
343 - .btn {  
344 - width: 240px;  
345 - height: 55px;  
346 - float: right;  
347 - font-size: 28px;  
348 - background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%);  
349 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
350 - 0px 8px 12px 0px rgba(89, 199, 171, 0.5);  
351 - border-radius: 34px;  
352 - border: transparent;  
353 - color: #333333;  
354 - }  
355 - }  
356 - .school_select {  
357 - font-size: 28px;  
358 - padding: 0 32px;  
359 - margin-bottom: 28px;  
360 - }  
361 - .submit {  
362 - width: 294px;  
363 - height: 72px;  
364 - border: 0;  
365 - background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);  
366 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
367 - 0px 8px 12px 0px rgba(87, 137, 255, 0.5);  
368 - border-radius: 34px;  
369 - font-size: 34px;  
370 - color: #ffffff;  
371 - margin: 0 auto;  
372 - display: block;  
373 - }  
374 - }  
375 -}  
376 -::v-deep .van-search {  
377 - background: transparent;  
378 - padding: 0;  
379 - width: 100%;  
380 -}  
381 -::v-deep .van-search__content {  
382 - padding: 0;  
383 -}  
384 -.schoolBoxF {  
385 - width: 100vw;  
386 - height: 100vh;  
387 - position: absolute;  
388 - top: 0;  
389 - left: 0;  
390 - background-color: #fff;  
391 -}  
392 -</style>  
src/views/PublicService/component/chooseSchool.vue
@@ -1,112 +0,0 @@ @@ -1,112 +0,0 @@
1 -/*选择学校*/  
2 -<template>  
3 - <div id="schoolBox">  
4 - <div class="search">  
5 - <form action="/">  
6 - <van-search v-model="searchSchool" show-action placeholder="请输入搜索关键词" @input="onSearch" @cancel="onCancel" />  
7 - </form>  
8 - </div>  
9 - <div class="listCardBox">  
10 - <div v-for="(val,i) in schoolList" :key="i" class="listCard">  
11 - <div @click="schoolClick(val)">{{val.text}}</div>  
12 - </div>  
13 - </div>  
14 - </div>  
15 -</template>  
16 -  
17 -<script>  
18 -export default {  
19 - data () {  
20 - return {  
21 - searchSchool: '',  
22 - schoolList: []  
23 - }  
24 - },  
25 - methods: {  
26 - onSearch (val) {  
27 - console.log(val)  
28 - this.GetHighSchoolList()  
29 - },  
30 - onCancel () {  
31 - // this.$toast('取消');  
32 - this.searchSchool = ''  
33 - this.schoolList = []  
34 - this.$emit('input', false)  
35 - },  
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)  
67 - }  
68 - },  
69 - onFail: err => {  
70 - console.log('err', err)  
71 - }  
72 - });  
73 - },  
74 - //点击学校  
75 - schoolClick (val) {  
76 - console.log(val)  
77 - this.$emit('schoolData', val)  
78 - this.onCancel()  
79 - }  
80 - },  
81 - mounted () {  
82 - // this.GetHighSchoolList()  
83 - }  
84 -}  
85 -</script>  
86 -  
87 -<style lang="scss" scoped>  
88 -#schoolBox {  
89 - width: 100vw;  
90 - height: 100vh;  
91 - // top: 0;  
92 - // left: 0;  
93 - background-color: #fff;  
94 -  
95 - .search {  
96 - padding: 40px 30px;  
97 - box-sizing: border-box;  
98 - }  
99 - .listCardBox {  
100 - height: 1050px;  
101 - overflow: auto;  
102 -  
103 - .listCard {  
104 - width: 700px;  
105 - height: 70px;  
106 - color: black;  
107 - font-size: 29px;  
108 - margin-left: 30px;  
109 - }  
110 - }  
111 -}  
112 -</style>  
113 \ No newline at end of file 0 \ No newline at end of file
src/views/PublicService/evaluateBase.vue
@@ -1,297 +0,0 @@ @@ -1,297 +0,0 @@
1 -<template>  
2 - <div class="releaseEvaluate">  
3 - <div class="box top">  
4 - <div class="pic">  
5 - <img :src="baseInfo.baseUrl ? baseInfo.baseUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
6 - </div>  
7 - <div class="basefont">  
8 - <div class="titlefont">{{baseInfo.baseName}}</div>  
9 - <div class="tcfont">{{baseInfo.address}}</div>  
10 - <div class="tcfont">{{baseInfo.phone}}</div>  
11 - </div>  
12 - </div>  
13 - <div class="box">  
14 - <div class="boxdf">  
15 - <div class="title">基地评分</div>  
16 - <div class="fr">  
17 - <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />  
18 - <span class="rate">{{starsBaseNum}}.0</span>  
19 - </div>  
20 - </div>  
21 - <div class="cont">  
22 - <div class="item">  
23 - <van-field v-model="content" type="textarea" label="" placeholder="对基地的评价及建议" />  
24 - </div>  
25 - </div>  
26 - <div class="imgs">  
27 - <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">  
28 - <div class="selectImg">  
29 - <imgCut @callback="callback" :width="750" :height="750">  
30 - <van-icon name="cross" />  
31 - </imgCut>  
32 - </div>  
33 - <!-- <van-uploader v-model="fileList" multiple /> -->  
34 - </div>  
35 - </div>  
36 - <div class="btns" :class="content==''||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>  
37 - </div>  
38 -</template>  
39 -  
40 -<script>  
41 -import { imgCut } from 'vue-imgcut'  
42 -export default {  
43 - data () {  
44 - return {  
45 - baseId: '',  
46 - signId: '',  
47 - baseInfo: '',  
48 - starsBaseNum: 0,  
49 - userInfo: '',  
50 - studentInfo: '',  
51 - courseInfo: '',  
52 - content: '',  
53 - imgsrc: [],  
54 - fileList: [  
55 - { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },  
56 - // Uploader 根据文件后缀来判断是否为图片文件  
57 - // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明  
58 - { url: 'https://cloud-image', isImage: true },  
59 - ],  
60 - }  
61 - },  
62 - components: {  
63 - imgCut  
64 - },  
65 - mounted () {  
66 - var userInfo = window.sessionStorage.getItem('userInfo');  
67 - if (userInfo) {  
68 - this.userInfo = JSON.parse(userInfo);  
69 - }  
70 - let studentInfo = sessionStorage.getItem('StudentDetialInfo')  
71 - this.studentInfo = JSON.parse(studentInfo)  
72 - this.baseId = this.$route.query.baseId  
73 - this.signId = this.$route.query.signId  
74 - this.GetStudyBaseDetail()  
75 - },  
76 - methods: {  
77 - AddEvaluation () {  
78 - if (this.content == '') {  
79 - this.$toast('请输入评价内容')  
80 - return;  
81 - }  
82 - if (this.starsBaseNum == 0) {  
83 - this.$toast('请完成基地评分')  
84 - return;  
85 - }  
86 - this.$toast.loading({  
87 - message: '请求中...',  
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)  
117 - }  
118 - });  
119 - },  
120 - // 获取基地信息  
121 - GetStudyBaseDetail () {  
122 - this.$toast.loading({  
123 - message: '请求中...',  
124 - });  
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)  
151 - }  
152 - });  
153 - },  
154 - callback (img) {  
155 - this.imgsrc.push({  
156 - imgUrl: img  
157 - });  
158 - }  
159 - }  
160 -}  
161 -</script>  
162 -  
163 -<style lang="scss" scoped>  
164 -.releaseEvaluate {  
165 - padding: 20px;  
166 - box-sizing: border-box;  
167 - background: #f6f7fa;  
168 - box-sizing: border-box;  
169 - min-height: 100vh;  
170 - .box {  
171 - width: 702px;  
172 - background: #fff;  
173 - border-radius: 16px;  
174 - margin: 0 auto;  
175 - padding: 16px;  
176 - box-sizing: border-box;  
177 - margin-bottom: 16px;  
178 - }  
179 - .top {  
180 - display: flex;  
181 -  
182 - .pic {  
183 - width: 124px;  
184 - height: 124px;  
185 - flex-shrink: 0;  
186 - }  
187 - .basefont {  
188 - padding: 0 20px;  
189 - box-sizing: border-box;  
190 - .titlefont {  
191 - color: #333333;  
192 - font-size: 28px;  
193 - margin-bottom: 18px;  
194 - }  
195 - .tcfont {  
196 - color: #535353;  
197 - font-size: 24px;  
198 - }  
199 - }  
200 - .priceRight {  
201 - width: 110px;  
202 - font-size: 28px;  
203 - color: #f64c37;  
204 - line-height: 200px;  
205 - }  
206 - }  
207 - .btns {  
208 - width: 702px;  
209 - height: 92px;  
210 - line-height: 92px;  
211 - border-radius: 16px;  
212 - margin: 0 auto;  
213 - margin-top: 20px;  
214 - background: #4092ff;  
215 - color: #fff;  
216 - font-size: 30px;  
217 - text-align: center;  
218 - box-shadow: 0 0 30px #7ab1f8;  
219 - &.disabled {  
220 - opacity: 0.4;  
221 - }  
222 - }  
223 - .cont {  
224 - .van-cell {  
225 - background: #f5f6fa;  
226 - }  
227 - input {  
228 - border: none;  
229 - width: 100%;  
230 - height: 38px;  
231 - line-height: 38px;  
232 - font-size: 1.4rem;  
233 - }  
234 - p {  
235 - font-size: 1.2rem;  
236 - text-align: right;  
237 - color: #909090;  
238 - span {  
239 - color: #09ce6c;  
240 - }  
241 - }  
242 - }  
243 - .imgs {  
244 - background: #f5f6fa;  
245 - padding: 20px;  
246 - // img:first-child::after{  
247 - // content: '封面图片';  
248 - // position:absolute;  
249 - // bottom: 0;  
250 - // left: 0;  
251 - // right: 0;  
252 - // background-color: rgba(0,0,0,.5);  
253 - // color: white;  
254 - // font-size: 1.2rem;  
255 - // padding: 3px;  
256 - // z-index: 1000;  
257 - // }  
258 - img {  
259 - position: relative;  
260 - display: inline-block;  
261 - vertical-align: top;  
262 - width: 142px;  
263 - height: 142px;  
264 - border-radius: 5px;  
265 - margin-right: 10px;  
266 - margin-top: 10px;  
267 - }  
268 - .selectImg {  
269 - display: inline-block;  
270 - vertical-align: top;  
271 - width: 142px;  
272 - height: 142px;  
273 - text-align: center;  
274 - line-height: 50px;  
275 - border-radius: 5px;  
276 - border: 1px solid rgb(8, 23, 88);  
277 - font-size: 2rem;  
278 - color: #eee;  
279 - margin-top: 10px;  
280 - }  
281 - }  
282 - .boxdf {  
283 - padding: 10px 0;  
284 - font-size: 5vw;  
285 - display: flex;  
286 - .title {  
287 - font-size: 28px;  
288 - margin-right: 10px;  
289 - }  
290 - .rate {  
291 - color: #ffcc00;  
292 - font-size: 30px;  
293 - margin-left: 10px;  
294 - }  
295 - }  
296 -}  
297 -</style>  
src/views/PublicService/evaluateCourse.vue
@@ -1,274 +0,0 @@ @@ -1,274 +0,0 @@
1 -<template>  
2 - <div class="releaseEvaluate">  
3 - <div class="box top">  
4 - <div class="pic">  
5 - <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
6 - </div>  
7 - <div class="basefont">  
8 - <div class="titlefont">{{courseInfo.baseName}}</div>  
9 - <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>  
10 - <div class="tcfont">数量*{{courseInfo.orderCount}}</div>  
11 - </div>  
12 - </div>  
13 - <div class="box">  
14 - <div class="boxdf">  
15 - <div class="title">课程评分</div>  
16 - <div class="fr">  
17 - <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />  
18 - <span class="rate">{{starsCourseNum}}.0</span>  
19 - </div>  
20 - </div>  
21 - <div class="boxdf">  
22 - <div class="title">基地评分</div>  
23 - <div class="fr">  
24 - <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />  
25 - <span class="rate">{{starsBaseNum}}.0</span>  
26 - </div>  
27 - </div>  
28 - <div class="cont">  
29 - <div class="item">  
30 - <van-field v-model="content" type="textarea" label="" placeholder="关于活动、课程、研学的感想或评论" />  
31 - </div>  
32 - </div>  
33 - <div class="imgs">  
34 - <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">  
35 - <div class="selectImg">  
36 - <imgCut @callback="callback" :width="750" :height="750">  
37 - <van-icon name="cross" />  
38 - </imgCut>  
39 - </div>  
40 - <!-- <van-uploader v-model="fileList" multiple /> -->  
41 - </div>  
42 - </div>  
43 - <div class="btns" :class="content==''||starsCourseNum==0||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>  
44 - </div>  
45 -</template>  
46 -  
47 -<script>  
48 -import { imgCut } from 'vue-imgcut'  
49 -export default {  
50 - data () {  
51 - return {  
52 - starsBaseNum: 0,  
53 - starsCourseNum: 0,  
54 - userInfo: '',  
55 - courseInfo: '',  
56 - content: '',  
57 - imgsrc: [],  
58 - fileList: [  
59 - { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },  
60 - // Uploader 根据文件后缀来判断是否为图片文件  
61 - // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明  
62 - { url: 'https://cloud-image', isImage: true },  
63 - ],  
64 - }  
65 - },  
66 - components: {  
67 - imgCut  
68 - },  
69 - mounted () {  
70 - var userInfo = window.sessionStorage.getItem('userInfo');  
71 - if (userInfo) {  
72 - this.userInfo = JSON.parse(userInfo);  
73 - }  
74 - var courseInfo = window.sessionStorage.getItem('courseInfo');  
75 - if (courseInfo) {  
76 - this.courseInfo = JSON.parse(courseInfo);  
77 - }  
78 - },  
79 - methods: {  
80 - AddEvaluation () {  
81 - if (this.content == '') {  
82 - this.$toast('请输入评价内容')  
83 - return;  
84 - }  
85 - if (this.starsCourseNum == 0) {  
86 - this.$toast('请完成课程评分')  
87 - return;  
88 - }  
89 - if (this.starsBaseNum == 0) {  
90 - this.$toast('请完成基地评分')  
91 - return;  
92 - }  
93 - this.$toast.loading({  
94 - 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();  
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)  
128 - }  
129 - });  
130 - },  
131 - callback (img) {  
132 - this.imgsrc.push({  
133 - imgUrl: img  
134 - });  
135 - }  
136 - }  
137 -}  
138 -</script>  
139 -  
140 -<style lang="scss" scoped>  
141 -.releaseEvaluate {  
142 - padding: 20px;  
143 - box-sizing: border-box;  
144 - background: #f6f7fa;  
145 - box-sizing: border-box;  
146 - min-height: 100vh;  
147 - .box {  
148 - width: 702px;  
149 - background: #fff;  
150 - border-radius: 16px;  
151 - margin: 0 auto;  
152 - padding: 16px;  
153 - box-sizing: border-box;  
154 - margin-bottom: 16px;  
155 - }  
156 - .top {  
157 - display: flex;  
158 -  
159 - .pic {  
160 - width: 124px;  
161 - height: 124px;  
162 - flex-shrink: 0;  
163 - }  
164 - .basefont {  
165 - padding: 0 20px;  
166 - box-sizing: border-box;  
167 - .titlefont {  
168 - color: #333333;  
169 - font-size: 28px;  
170 - margin-bottom: 18px;  
171 - }  
172 - .tcfont {  
173 - color: #535353;  
174 - font-size: 24px;  
175 - }  
176 - }  
177 - .priceRight {  
178 - width: 110px;  
179 - font-size: 28px;  
180 - color: #f64c37;  
181 - line-height: 200px;  
182 - }  
183 - }  
184 - .btns {  
185 - width: 702px;  
186 - height: 92px;  
187 - line-height: 92px;  
188 - border-radius: 16px;  
189 - margin: 0 auto;  
190 - margin-top: 20px;  
191 - background: #4092ff;  
192 - color: #fff;  
193 - font-size: 30px;  
194 - text-align: center;  
195 - box-shadow: 0 0 30px #7ab1f8;  
196 - &.disabled {  
197 - opacity: 0.4;  
198 - }  
199 - }  
200 - .cont {  
201 - .van-cell {  
202 - background: #f5f6fa;  
203 - }  
204 - input {  
205 - border: none;  
206 - width: 100%;  
207 - height: 38px;  
208 - line-height: 38px;  
209 - font-size: 1.4rem;  
210 - }  
211 - p {  
212 - font-size: 1.2rem;  
213 - text-align: right;  
214 - color: #909090;  
215 - span {  
216 - color: #09ce6c;  
217 - }  
218 - }  
219 - }  
220 - .imgs {  
221 - background: #f5f6fa;  
222 - padding: 20px;  
223 - // img:first-child::after{  
224 - // content: '封面图片';  
225 - // position:absolute;  
226 - // bottom: 0;  
227 - // left: 0;  
228 - // right: 0;  
229 - // background-color: rgba(0,0,0,.5);  
230 - // color: white;  
231 - // font-size: 1.2rem;  
232 - // padding: 3px;  
233 - // z-index: 1000;  
234 - // }  
235 - img {  
236 - position: relative;  
237 - display: inline-block;  
238 - vertical-align: top;  
239 - width: 142px;  
240 - height: 142px;  
241 - border-radius: 5px;  
242 - margin-right: 10px;  
243 - margin-top: 10px;  
244 - }  
245 - .selectImg {  
246 - display: inline-block;  
247 - vertical-align: top;  
248 - width: 142px;  
249 - height: 142px;  
250 - text-align: center;  
251 - line-height: 50px;  
252 - border-radius: 5px;  
253 - border: 1px solid rgb(8, 23, 88);  
254 - font-size: 2rem;  
255 - color: #eee;  
256 - margin-top: 10px;  
257 - }  
258 - }  
259 - .boxdf {  
260 - padding: 10px 0;  
261 - font-size: 5vw;  
262 - display: flex;  
263 - .title {  
264 - font-size: 28px;  
265 - margin-right: 10px;  
266 - }  
267 - .rate {  
268 - color: #ffcc00;  
269 - font-size: 30px;  
270 - margin-left: 10px;  
271 - }  
272 - }  
273 -}  
274 -</style>  
src/views/PublicService/evaluateDetail.vue
@@ -1,303 +0,0 @@ @@ -1,303 +0,0 @@
1 -<template>  
2 - <div class="releaseEvaluate">  
3 - <div class="box top" v-if="baseId">  
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%">  
6 - </div>  
7 - <div class="basefont">  
8 - <div class="titlefont">{{baseInfo.baseName}}</div>  
9 - <div class="tcfont">{{baseInfo.address}}</div>  
10 - <div class="tcfont">{{baseInfo.phone}}</div>  
11 - </div>  
12 - </div>  
13 - <div class="box top" v-else>  
14 - <div class="pic">  
15 - <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
16 - </div>  
17 - <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>  
21 - </div>  
22 - </div>  
23 - <div class="box">  
24 - <div class="boxdf" v-if="!baseId">  
25 - <div class="title">课程评分</div>  
26 - <div class="fr">  
27 - <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>  
29 - </div>  
30 - </div>  
31 - <div class="boxdf">  
32 - <div class="title">基地评分</div>  
33 - <div class="fr">  
34 - <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>  
36 - </div>  
37 - </div>  
38 - <p class="evaluation"><span>评价:</span>{{evaluationData.evaluation}}</p>  
39 - <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)">  
41 - </div>  
42 - <p class="evaluation_time">评价于 {{evaluationData.intime}}</p>  
43 - </div>  
44 - </div>  
45 -</template>  
46 -  
47 -<script>  
48 -import { imgCut } from 'vue-imgcut'  
49 -export default {  
50 - data () {  
51 - return {  
52 - baseId: '',//有基地id时为基地评价  
53 - baseInfo: '',  
54 - evaluationId: '',  
55 - evaluationData: '',  
56 - starsBaseNum: 0,  
57 - starsCourseNum: 0,  
58 - userInfo: '',  
59 - courseInfo: '',  
60 - content: '',  
61 - imgsrc: [],  
62 - fileList: [  
63 - { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },  
64 - // Uploader 根据文件后缀来判断是否为图片文件  
65 - // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明  
66 - { url: 'https://cloud-image', isImage: true },  
67 - ],  
68 - }  
69 - },  
70 - components: {  
71 - imgCut  
72 - },  
73 - mounted () {  
74 - this.evaluationId = this.$route.query.evaluationId  
75 - let baseId = this.$route.query.baseId  
76 - // 当前为基地评价  
77 - if (baseId) {  
78 - this.baseId = baseId  
79 - this.GetStudyBaseDetail()  
80 - }  
81 - this.getEvaluationDetail()  
82 -  
83 - var courseInfo = window.sessionStorage.getItem('courseInfo');  
84 - if (courseInfo) {  
85 - this.courseInfo = JSON.parse(courseInfo);  
86 - }  
87 - },  
88 - methods: {  
89 - getEvaluationDetail () {  
90 - this.$toast.loading({  
91 - message: '加载中...',  
92 - duration: 0,  
93 - forbidClick: true  
94 - })  
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 - if (res.data.status == 1) {  
111 - let evaluationData = res.data.data  
112 - evaluationData.intime = this.Moment(new Date(evaluationData.intime)).format('YYYY-MM-DD')  
113 - this.evaluationData = evaluationData  
114 - } else {  
115 - this.$toast.fail(res.data.message)  
116 - }  
117 - },  
118 - onFail: err => {  
119 - console.log('err', err)  
120 - }  
121 - });  
122 - },  
123 - // 获取基地信息  
124 - GetStudyBaseDetail () {  
125 - this.$toast.loading({  
126 - 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 => {  
143 - 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)  
154 - }  
155 - });  
156 - },  
157 - }  
158 -}  
159 -</script>  
160 -  
161 -<style lang="scss" scoped>  
162 -.releaseEvaluate {  
163 - padding: 20px;  
164 - box-sizing: border-box;  
165 - background: #f6f7fa;  
166 - box-sizing: border-box;  
167 - min-height: 100vh;  
168 - .box {  
169 - width: 702px;  
170 - background: #fff;  
171 - border-radius: 16px;  
172 - margin: 0 auto;  
173 - padding: 16px;  
174 - box-sizing: border-box;  
175 - margin-bottom: 16px;  
176 - }  
177 - .top {  
178 - display: flex;  
179 -  
180 - .pic {  
181 - width: 124px;  
182 - height: 124px;  
183 - flex-shrink: 0;  
184 - }  
185 - .basefont {  
186 - padding: 0 20px;  
187 - box-sizing: border-box;  
188 - .titlefont {  
189 - color: #333333;  
190 - font-size: 28px;  
191 - margin-bottom: 18px;  
192 - }  
193 - .tcfont {  
194 - color: #535353;  
195 - font-size: 24px;  
196 - }  
197 - }  
198 - .priceRight {  
199 - width: 110px;  
200 - font-size: 28px;  
201 - color: #f64c37;  
202 - line-height: 200px;  
203 - }  
204 - }  
205 - .cont {  
206 - .van-cell {  
207 - background: #f5f6fa;  
208 - }  
209 - input {  
210 - border: none;  
211 - width: 100%;  
212 - height: 38px;  
213 - line-height: 38px;  
214 - font-size: 1.4rem;  
215 - }  
216 - p {  
217 - font-size: 1.2rem;  
218 - text-align: right;  
219 - color: #909090;  
220 - span {  
221 - color: #09ce6c;  
222 - }  
223 - }  
224 - }  
225 - .imgs {  
226 - background: #f5f6fa;  
227 - padding: 20px;  
228 - // img:first-child::after{  
229 - // content: '封面图片';  
230 - // position:absolute;  
231 - // bottom: 0;  
232 - // left: 0;  
233 - // right: 0;  
234 - // background-color: rgba(0,0,0,.5);  
235 - // color: white;  
236 - // font-size: 1.2rem;  
237 - // padding: 3px;  
238 - // z-index: 1000;  
239 - // }  
240 - img {  
241 - position: relative;  
242 - display: inline-block;  
243 - vertical-align: top;  
244 - width: 142px;  
245 - height: 142px;  
246 - border-radius: 5px;  
247 - margin-right: 10px;  
248 - margin-top: 10px;  
249 - }  
250 - .selectImg {  
251 - display: inline-block;  
252 - vertical-align: top;  
253 - width: 142px;  
254 - height: 142px;  
255 - text-align: center;  
256 - line-height: 50px;  
257 - border-radius: 5px;  
258 - border: 1px solid rgb(8, 23, 88);  
259 - font-size: 2rem;  
260 - color: #eee;  
261 - margin-top: 10px;  
262 - }  
263 - }  
264 - .boxdf {  
265 - padding: 10px 0;  
266 - font-size: 5vw;  
267 - display: flex;  
268 - .title {  
269 - font-size: 28px;  
270 - margin-right: 10px;  
271 - }  
272 - .rate {  
273 - color: #ffcc00;  
274 - font-size: 30px;  
275 - margin-left: 10px;  
276 - }  
277 - }  
278 - .evaluation {  
279 - font-size: 30px;  
280 - span {  
281 - font-weight: bold;  
282 - }  
283 - }  
284 - .evaluation_img_box {  
285 - margin-top: 22px;  
286 - .evaluation_img {  
287 - width: 212px;  
288 - height: 212px;  
289 - margin-right: 9px;  
290 - margin-bottom: 9px;  
291 - &:nth-of-type(3n) {  
292 - margin-right: 0;  
293 - }  
294 - }  
295 - }  
296 - .evaluation_time {  
297 - margin-top: 18px;  
298 - text-align: right;  
299 - color: #999999;  
300 - font-size: 28px;  
301 - }  
302 -}  
303 -</style>  
src/views/PublicService/evaluatePubilc.vue
@@ -1,274 +0,0 @@ @@ -1,274 +0,0 @@
1 -<template>  
2 - <div class="releaseEvaluate">  
3 - <div class="box top">  
4 - <div class="pic">  
5 - <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">  
6 - </div>  
7 - <div class="basefont">  
8 - <div class="titlefont">{{courseInfo.baseName}}</div>  
9 - <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>  
10 - <div class="tcfont">数量*{{courseInfo.orderCount}}</div>  
11 - </div>  
12 - </div>  
13 - <div class="box">  
14 - <div class="boxdf">  
15 - <div class="title">课程评分</div>  
16 - <div class="fr">  
17 - <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />  
18 - <span class="rate">{{starsCourseNum}}.0</span>  
19 - </div>  
20 - </div>  
21 - <div class="boxdf">  
22 - <div class="title">基地评分</div>  
23 - <div class="fr">  
24 - <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />  
25 - <span class="rate">{{starsBaseNum}}.0</span>  
26 - </div>  
27 - </div>  
28 - <div class="cont">  
29 - <div class="item">  
30 - <van-field v-model="content" type="textarea" label="" placeholder="关于活动、课程、研学的感想或评论" />  
31 - </div>  
32 - </div>  
33 - <div class="imgs">  
34 - <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">  
35 - <div class="selectImg">  
36 - <imgCut @callback="callback" :width="142" :height="142">  
37 - <van-icon name="cross" />  
38 - </imgCut>  
39 - </div>  
40 - <!-- <van-uploader v-model="fileList" multiple /> -->  
41 - </div>  
42 - </div>  
43 - <div class="btns" :class="content==''||starsCourseNum==0||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>  
44 - </div>  
45 -</template>  
46 -  
47 -<script>  
48 -import yxAxios from '@/https/yxAxios'  
49 -import { imgCut } from 'vue-imgcut'  
50 -export default {  
51 - data () {  
52 - return {  
53 - starsBaseNum: 0,  
54 - starsCourseNum: 0,  
55 - userInfo: '',  
56 - courseInfo: '',  
57 - content: '',  
58 - imgsrc: [],  
59 - fileList: [  
60 - { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },  
61 - // Uploader 根据文件后缀来判断是否为图片文件  
62 - // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明  
63 - { url: 'https://cloud-image', isImage: true },  
64 - ],  
65 - }  
66 - },  
67 - components: {  
68 - imgCut  
69 - },  
70 - created () {  
71 - var userInfo = window.sessionStorage.getItem('userInfo');  
72 - if (userInfo) {  
73 - this.userInfo = JSON.parse(userInfo);  
74 - }  
75 - var courseInfo = window.sessionStorage.getItem('courseInfo');  
76 - if (courseInfo) {  
77 - this.courseInfo = JSON.parse(courseInfo);  
78 - }  
79 - },  
80 - methods: {  
81 - AddEvaluation () {  
82 - if (this.content == '') {  
83 - this.$toast('请输入评价内容')  
84 - return;  
85 - }  
86 - if (this.starsCourseNum == 0) {  
87 - this.$toast('请完成课程评分')  
88 - return;  
89 - }  
90 - if (this.starsBaseNum == 0) {  
91 - this.$toast('请完成基地评分')  
92 - return;  
93 - }  
94 - this.$toast.loading({  
95 - message: '请求中...',  
96 - });  
97 - this.mgop({  
98 - api: 'mgop.sz.hswsy.AddEvaluation', // 必须  
99 - host: 'https://mapi.zjzwfw.gov.cn/',  
100 - dataType: 'JSON',  
101 - type: 'POST',  
102 - appKey: 'fuxgnukl+2001895516+edccpx', // 必须  
103 - headers: {  
104 - // 'isTestUrl': '1'  
105 - },  
106 - data: {  
107 - "baseId": this.courseInfo.baseId,  
108 - "title": this.courseInfo.courseName,  
109 - "evaluation": this.content,  
110 - "courseId": this.courseInfo.courseId,  
111 - "orderId": this.courseInfo.id,  
112 - "userId": this.userInfo.centerNo,  
113 - "imgList": this.imgsrc,  
114 - "courseScore": this.starsCourseNum,  
115 - "baseScore": this.starsBaseNum  
116 - },  
117 - onSuccess: res => {  
118 - this.$toast.clear();  
119 - if (res.data.status == 1) {  
120 - this.$toast.success('发布成功');  
121 - setTimeout(() => {  
122 - this.$router.push({ name: 'ServiceOrderXST' })  
123 - }, 1000)  
124 - }  
125 - },  
126 - onFail: err => {  
127 - console.log('err', err)  
128 - }  
129 - });  
130 - },  
131 - callback (img) {  
132 - this.imgsrc.push({  
133 - imgUrl: img  
134 - });  
135 - }  
136 - }  
137 -}  
138 -</script>  
139 -  
140 -<style lang="scss" scoped>  
141 -.releaseEvaluate {  
142 - padding: 20px;  
143 - box-sizing: border-box;  
144 - background: #f6f7fa;  
145 - box-sizing: border-box;  
146 - min-height: 100vh;  
147 - .box {  
148 - width: 702px;  
149 - background: #fff;  
150 - border-radius: 16px;  
151 - margin: 0 auto;  
152 - padding: 16px;  
153 - box-sizing: border-box;  
154 - margin-bottom: 16px;  
155 - }  
156 - .top {  
157 - display: flex;  
158 -  
159 - .pic {  
160 - width: 124px;  
161 - height: 124px;  
162 - flex-shrink: 0;  
163 - }  
164 - .basefont {  
165 - padding: 0 20px;  
166 - box-sizing: border-box;  
167 - .titlefont {  
168 - color: #333333;  
169 - font-size: 28px;  
170 - margin-bottom: 18px;  
171 - }  
172 - .tcfont {  
173 - color: #535353;  
174 - font-size: 24px;  
175 - }  
176 - }  
177 - .priceRight {  
178 - width: 110px;  
179 - font-size: 28px;  
180 - color: #f64c37;  
181 - line-height: 200px;  
182 - }  
183 - }  
184 - .btns {  
185 - width: 702px;  
186 - height: 92px;  
187 - line-height: 92px;  
188 - border-radius: 16px;  
189 - margin: 0 auto;  
190 - margin-top: 20px;  
191 - background: #4092ff;  
192 - color: #fff;  
193 - font-size: 30px;  
194 - text-align: center;  
195 - box-shadow: 0 0 30px #7ab1f8;  
196 - &.disabled {  
197 - opacity: 0.4;  
198 - }  
199 - }  
200 - .cont {  
201 - .van-cell {  
202 - background: #f5f6fa;  
203 - }  
204 - input {  
205 - border: none;  
206 - width: 100%;  
207 - height: 38px;  
208 - line-height: 38px;  
209 - font-size: 1.4rem;  
210 - }  
211 - p {  
212 - font-size: 1.2rem;  
213 - text-align: right;  
214 - color: #909090;  
215 - span {  
216 - color: #09ce6c;  
217 - }  
218 - }  
219 - }  
220 - .imgs {  
221 - background: #f5f6fa;  
222 - padding: 20px;  
223 - // img:first-child::after{  
224 - // content: '封面图片';  
225 - // position:absolute;  
226 - // bottom: 0;  
227 - // left: 0;  
228 - // right: 0;  
229 - // background-color: rgba(0,0,0,.5);  
230 - // color: white;  
231 - // font-size: 1.2rem;  
232 - // padding: 3px;  
233 - // z-index: 1000;  
234 - // }  
235 - img {  
236 - position: relative;  
237 - display: inline-block;  
238 - vertical-align: top;  
239 - width: 142px;  
240 - height: 142px;  
241 - border-radius: 5px;  
242 - margin-right: 10px;  
243 - margin-top: 10px;  
244 - }  
245 - .selectImg {  
246 - display: inline-block;  
247 - vertical-align: top;  
248 - width: 142px;  
249 - height: 142px;  
250 - text-align: center;  
251 - line-height: 50px;  
252 - border-radius: 5px;  
253 - border: 1px solid rgb(8, 23, 88);  
254 - font-size: 2rem;  
255 - color: #eee;  
256 - margin-top: 10px;  
257 - }  
258 - }  
259 - .boxdf {  
260 - padding: 10px 0;  
261 - font-size: 5vw;  
262 - display: flex;  
263 - .title {  
264 - font-size: 28px;  
265 - margin-right: 10px;  
266 - }  
267 - .rate {  
268 - color: #ffcc00;  
269 - font-size: 30px;  
270 - margin-left: 10px;  
271 - }  
272 - }  
273 -}  
274 -</style>  
src/views/PublicService/privateXST.vue
@@ -1,362 +0,0 @@ @@ -1,362 +0,0 @@
1 -<template>  
2 - <div>  
3 - <div id="prefect_box">  
4 - <img class="bg" src="@/assets/msg.png" alt="">  
5 - <div class="content">  
6 - <div class="item">  
7 - <input type="text" placeholder="请输入您的姓名" v-model="studentName">  
8 - </div>  
9 - <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;">  
10 - <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p>  
11 - <img src="@/assets/more.png" alt="">  
12 - </div>  
13 - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;">  
14 - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p>  
15 - <img src="@/assets/more.png" alt="">  
16 - </div>  
17 - <div class="item" @click="showAreaSelect=true">  
18 - <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p>  
19 - <img src="@/assets/more.png" alt="">  
20 - </div>  
21 - <div class="item">  
22 - <form action="/" style="width:100%;">  
23 - <van-search v-model="searchSchool" placeholder="请输入学校关键字" @search="handleSchool" />  
24 - </form>  
25 - </div>  
26 - <p class="school_select" v-if="school">已选择学校:{{school}}</p>  
27 - <button class="submit" @click="submit">完成</button>  
28 - </div>  
29 - </div>  
30 - <van-popup v-model="showUserTypeSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
31 - <van-picker title="当前阶段" show-toolbar :columns="userTypeArr" value-key="label" @cancel="showUserTypeSelect = false" @confirm="selectUserTypeOver" />  
32 - </van-popup>  
33 - <van-popup v-model="showYearSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
34 - <van-picker title="入学年份" show-toolbar :columns="yearArr" value-key="label" @cancel="showYearSelect = false" @confirm="selectYearOver" />  
35 - </van-popup>  
36 - <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
37 - <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" />  
38 - </van-popup>  
39 - <van-popup v-model="showSchoolSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true">  
40 - <van-picker title="学校" show-toolbar :columns="schoolList" :loading="schoolListLoading" @cancel="showSchoolSelect = false" @confirm="selectSchoolOver" />  
41 - </van-popup>  
42 - </div>  
43 -</template>  
44 -  
45 -<script>  
46 -export default {  
47 -// props: [  
48 -// "phone",  
49 -// "id",  
50 -// "publicName"  
51 -// ],  
52 - data () {  
53 - return {  
54 - studentName: '',  
55 -  
56 - year: '',//入学年份  
57 - yearDisable: false,  
58 - showYearSelect: false,  
59 - yearArr: [],  
60 -  
61 - userType: '',  
62 - userTypeVal: '',//所处阶段1-小学 2-初中 3-高中  
63 - showUserTypeSelect: false,  
64 - userTypeArr: [{  
65 - label: '小学',  
66 - value: 1  
67 - }, {  
68 - label: '初中',  
69 - value: 2  
70 - }, {  
71 - label: '高中',  
72 - value: 3  
73 - }],  
74 -  
75 - area: '',  
76 - areaCode: '',  
77 - showAreaSelect: false,  
78 - areaList: [],  
79 -  
80 - searchSchool: '',  
81 - school: '',  
82 - schoolId: '',  
83 - showSchoolSelect: false,  
84 - schoolListLoading: false,  
85 - schoolList: [],  
86 -  
87 - appId: '',  
88 - userInfo: {}  
89 - }  
90 - },  
91 -  
92 - mounted () {  
93 - let userInfo = sessionStorage.getItem('userInfo')  
94 - this.userInfo = userInfo ? JSON.parse(userInfo) : userInfo;  
95 - this.studentName = this.userInfo?.studentName;  
96 - if (sessionStorage.getItem('publicName') == 'SXYX') {  
97 - this.appId = 'wx1305e88d2bc74073'  
98 - } else if (sessionStorage.getItem('publicName')== 'XST') {  
99 - this.appId = 'wx1c630c8773c482f1'  
100 - }  
101 - this.initYearArr()  
102 - this.GetSysAreaList()  
103 - },  
104 - methods: {  
105 - // 初始化入学年份选项  
106 - initYearArr () {  
107 - // 页面创建时执行  
108 - let year = new Date().getFullYear(),  
109 - Month = new Date().getMonth() + 1,  
110 - yearArr = [];  
111 - if (Month > 8) {  
112 - // 如果月份大于8,那么当年的学年的高考年份要+1,如果月份小于7,那么当前的年份就是今年高考的年份  
113 - year = year  
114 - }  
115 - for (let index = year; index > year - 6; index--) {  
116 - yearArr.push({ value: index, label: index })  
117 - }  
118 - this.yearArr = yearArr  
119 - },  
120 - selectYearOver (value) {  
121 - this.year = value.label;  
122 - this.showYearSelect = false;  
123 - },  
124 - handleYear () {  
125 - if (!this.yearDisable) {  
126 - this.showYearSelect = true;  
127 - }  
128 - },  
129 - selectUserTypeOver (value) {  
130 - this.userType = value.label;  
131 - this.userTypeVal = value.value;  
132 - this.showUserTypeSelect = false;  
133 - },  
134 - // 获取地区列表  
135 - GetSysAreaList () {  
136 - this.http.GetSysAreaList({  
137 - areaCode: 33  
138 - }).then((res) => {  
139 - if (res.success) {  
140 - let data = res.data;  
141 - let obj = {  
142 - province_list: {  
143 - 330000: '浙江省'  
144 - },  
145 - city_list: {},  
146 - county_list: {}  
147 - };  
148 - if (data) {  
149 - data.forEach((n, i) => {  
150 - obj.city_list[n.area_code + '00'] = n.area_name;  
151 - if (n.areaList.length > 0) {  
152 - n.areaList.forEach((k, j) => {  
153 - obj.county_list[k.area_code] = k.area_name;  
154 - })  
155 - }  
156 - });  
157 - this.areaList = obj;  
158 - }  
159 - } else {  
160 - this.$toast.fail(res.message)  
161 - }  
162 - })  
163 - },  
164 - selectAreaOver (value) {  
165 - let data = value;  
166 - var city = data[1].code;  
167 - city = city.substring(0, city.length - 2);  
168 - // console.log(city)  
169 - this.area = data[0].name + ',' + data[1].name + ',' + data[2].name;  
170 - this.areaCode = [data[0].code, city, data[2].code];  
171 - this.quCode = data[2].code;  
172 - this.school = '',  
173 - this.schoolId = '',  
174 - this.showAreaSelect = false  
175 - },  
176 - // 点击选择学校  
177 - handleSchool () {  
178 - if (!this.searchSchool) {  
179 - this.$toast('请输入学校关键字');  
180 - return;  
181 - }  
182 - this.showSchoolSelect = true;  
183 - this.GetHighSchoolList();  
184 - },  
185 - // 通过地区获取学校  
186 - GetHighSchoolList () {  
187 - this.schoolListLoading = true;  
188 - this.yxAxios.get(`${this.yanxueUrl}/api/SchoolManage/GetAllSchoolList?schoolName=${this.searchSchool}`).then((res) => {  
189 - if (res.data.data) {  
190 - let data = res.data.data;  
191 - let arr = [];  
192 - if (data) {  
193 - data.forEach((n, i) => {  
194 - let obj = {};  
195 - obj.text = n.schoolName;  
196 - obj.id = n.id;  
197 - arr.push(obj);  
198 - });  
199 - this.schoolList = arr;  
200 - this.schoolListLoading = false  
201 - }  
202 - } else {  
203 - this.schoolListLoading = false  
204 - this.$toast.fail(res.data.message)  
205 - }  
206 - })  
207 - },  
208 - selectSchoolOver (value) {  
209 - console.log(value)  
210 - this.school = value.text;  
211 - this.schoolId = value.id;  
212 - this.showSchoolSelect = false;  
213 - },  
214 -  
215 - submit () {  
216 - if (!this.studentName) {  
217 - this.$toast('请输入姓名');  
218 - }  
219 - else if (!this.userType) {  
220 - this.$toast('请选择阶段');  
221 - }  
222 - else if (!this.year) {  
223 - this.$toast('请选择入学年份');  
224 - }  
225 - else if (!this.area) {  
226 - this.$toast('请选择地区');  
227 - }  
228 - else if (!this.school) {  
229 - this.$toast('请选择学校');  
230 - } else {  
231 - let postData = {  
232 - id: this.userInfo.id,  
233 - userName: this.studentName,  
234 - mobile: this.userInfo.phone,  
235 - province: this.area.split(',')[0],//省份  
236 - city: this.area.split(',')[1],//城市  
237 - area: this.area.split(',')[2],//地区  
238 - schoolName: this.school,//学校名称  
239 - enrollYear: this.year,//入学年份  
240 - userType: this.userTypeVal,//1-小学 2-初中 3-高中  
241 - }  
242 - this.$toast.loading({  
243 - message: '加载中',  
244 - duration: 0,  
245 - forbidClick: true  
246 - })  
247 - this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/updateUserInfo`, postData).then((res) => {  
248 - this.$toast.clear()  
249 - if (res.data.code == 200) {  
250 - this.$toast.success(res.data?.message)  
251 - this.$emit('complete')  
252 - this.$emit('hidePrefectBox')  
253 - } else {  
254 - this.$toast.fail(res.message)  
255 - }  
256 - this.getUserInfoff()  
257 - })  
258 - }  
259 - },  
260 -  
261 - // 获取用户信息  
262 - getUserInfoff () {  
263 - this.$toast.loading({  
264 - message: '加载中...',  
265 - duration: 0,  
266 - forbidClick: true  
267 - })  
268 - this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${this.appId}/getUserInfo?unionId=${sessionStorage.getItem('unionId')}`).then((res) => {  
269 - this.$toast.clear()  
270 - if (res.data.code == 200) {  
271 - sessionStorage.setItem('userInfo', JSON.stringify(res.data.data))  
272 - } else {  
273 - this.$toast.fail(res.data.message)  
274 - }  
275 - this.$router.push({ name: 'ServiceXST' })  
276 - })  
277 - },  
278 - }  
279 -}  
280 -</script>  
281 -<style lang="scss" scoped>  
282 -#prefect_box {  
283 - width: 638px;  
284 - height: 836px;  
285 - background: #ffffff;  
286 - border-radius: 24px;  
287 - position: relative;  
288 - margin:auto;  
289 - .bg {  
290 - width: 100%;  
291 - position: absolute;  
292 - top: 0;  
293 - left: 0;  
294 - }  
295 - .content {  
296 - width: 100%;  
297 - box-sizing: border-box;  
298 - padding: 0 40px;  
299 - position: absolute;  
300 - top: 236px;  
301 - left: 0;  
302 - .item {  
303 - width: 558px;  
304 - height: 72px;  
305 - border-radius: 36px;  
306 - background: #f7f7f7;  
307 - box-sizing: border-box;  
308 - font-size: 28px;  
309 - padding: 0 32px;  
310 - display: flex;  
311 - justify-content: space-between;  
312 - align-items: center;  
313 - margin-bottom: 28px;  
314 - p {  
315 - color: #333333;  
316 - &.nodata {  
317 - color: #999999;  
318 - }  
319 - }  
320 - img {  
321 - width: 40px;  
322 - }  
323 - input {  
324 - width: 100%;  
325 - background: transparent;  
326 - border: 0;  
327 - color: #333333;  
328 - padding: 0;  
329 - &::-webkit-input-placeholder {  
330 - color: #999999;  
331 - }  
332 - }  
333 - }  
334 - .school_select {  
335 - font-size: 28px;  
336 - padding: 0 32px;  
337 - margin-bottom: 28px;  
338 - }  
339 - .submit {  
340 - width: 294px;  
341 - height: 72px;  
342 - border: 0;  
343 - background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%);  
344 - box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5),  
345 - 0px 8px 12px 0px rgba(87, 137, 255, 0.5);  
346 - border-radius: 34px;  
347 - font-size: 34px;  
348 - color: #ffffff;  
349 - margin: 0 auto;  
350 - display: block;  
351 - }  
352 - }  
353 -}  
354 -::v-deep .van-search {  
355 - background: transparent;  
356 - padding: 0;  
357 - width: 100%;  
358 -}  
359 -::v-deep .van-search__content {  
360 - padding: 0;  
361 -}  
362 -</style>  
src/views/Service/CardBoxPublic.vue 0 → 100644
@@ -0,0 +1,164 @@ @@ -0,0 +1,164 @@
  1 +<template>
  2 + <div id="cardBox">
  3 + <div class="card_item" v-for="(item,index) in cardList" :key="index" @click="handleCard(index)">
  4 + <div class="left">
  5 + <div class="top">
  6 + <img v-if="item.img" :src="item.img" alt="">
  7 + <p class="title">仅该商品可用:<span>{{item.title}}</span></p>
  8 + </div>
  9 + <p class="end_time">有效期至:{{item.useEndTime}}</p>
  10 + </div>
  11 + <div class="right">
  12 + <p class="discount" :class="item.couponState==1?'':'disable'"><span>¥</span>{{item.couponPrice}}</p>
  13 + <p class="usenow" v-if="item.couponState==1">立即使用</p>
  14 + <p class="usenow disable" v-else>{{item.couponState==2?'已使用':'已过期'}}</p>
  15 + </div>
  16 + </div>
  17 + <van-empty v-if="cardList.length==0" description="暂无优惠券" />
  18 +
  19 + </div>
  20 +</template>
  21 +<script>
  22 +export default {
  23 + name: 'ServiceCardBoxPublic',
  24 + data () {
  25 + return {
  26 + cardList: [],
  27 + publicName: '',
  28 + unionId: ''
  29 + }
  30 + },
  31 + mounted () {
  32 + let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');
  33 + if (publicName) {
  34 + sessionStorage.setItem('publicName', publicName)
  35 + this.publicName = publicName
  36 + }
  37 + if (process.env.NODE_ENV === "production"&&this.common.isWeiXin()) {
  38 + let openId = sessionStorage.getItem('openId' + this.publicName);
  39 + if (!openId) {
  40 + sessionStorage.setItem('prePage', 'ServiceCardBoxPublic');
  41 + this.$router.push({ name: 'Authorize' + this.publicName })
  42 + return;
  43 + }
  44 + this.unionId = sessionStorage.getItem('unionId');
  45 + } else {
  46 + this.unionId = 'oJPmPuLaAx2x2DaRGfCFeYuLWzLU';
  47 + }
  48 +
  49 + this.$nextTick(() => {
  50 + this.getAllCard()
  51 + })
  52 + },
  53 + methods: {
  54 + // 获取所有优惠券
  55 + getAllCard () {
  56 + this.yxAxios.post(`${this.proxyUrl}/prod/api/coupon/list`, {
  57 + userId: this.unionId,
  58 + state: '',//状态 1-正常 2-已使用 3-已过期 不传为全部,
  59 + pageNum: '1',
  60 + pageSize: '999'
  61 + }).then((res) => {
  62 + if (res.data.rows) {
  63 + let cardList = res.data.rows
  64 + for (let i in cardList) {
  65 + cardList[i].useEndTime = this.Moment(cardList[i].useEndTime.replace(/\-/g, "/")).format("YYYY-MM-DD")
  66 + }
  67 + this.cardList = cardList
  68 + }
  69 + else {
  70 + this.$toast.fail(res.data.message);
  71 + }
  72 + })
  73 + },
  74 + handleCard (index) {
  75 + if (this.cardList[index].couponState == 1) {
  76 + this.$router.push({ name: 'ServiceAbroadDetail', query: { courseId: 499 } })
  77 + }
  78 + },
  79 + }
  80 +}
  81 +</script>
  82 +<style lang="scss" scoped>
  83 +#cardBox {
  84 + width: 100%;
  85 + min-height: 100%;
  86 + background: rgb(246, 246, 250);
  87 + overflow: hidden;
  88 + .card_item {
  89 + width: 726px;
  90 + height: 216px;
  91 + background: url("../../assets/service/card.png");
  92 + background-size: 100%;
  93 + margin: 0 auto;
  94 + margin-top: 20px;
  95 + position: relative;
  96 + p {
  97 + width: 100%;
  98 + margin: 0;
  99 + }
  100 + .left {
  101 + display: inline-block;
  102 + width: 68%;
  103 + height: 100%;
  104 + vertical-align: top;
  105 + box-sizing: border-box;
  106 + padding: 24px 40px;
  107 + padding-right: 0;
  108 + .top {
  109 + display: flex;
  110 + img {
  111 + width: 66px;
  112 + height: 66px;
  113 + background: #d8d8d8;
  114 + border-radius: 6px;
  115 + }
  116 + .title {
  117 + font-size: 24px;
  118 + font-weight: bold;
  119 + margin-left: 10px;
  120 + word-break: break-all;
  121 + span {
  122 + color: #7f5316;
  123 + }
  124 + }
  125 + }
  126 + }
  127 + .right {
  128 + width: 32%;
  129 + height: 100%;
  130 + display: inline-flex;
  131 + align-content: center;
  132 + flex-wrap: wrap;
  133 + position: relative;
  134 + }
  135 + .end_time {
  136 + font-size: 24px;
  137 + color: #999;
  138 + left: 40px;
  139 + position: absolute;
  140 + bottom: 30px;
  141 + }
  142 + .discount {
  143 + text-align: center;
  144 + font-size: 60px;
  145 + font-weight: bold;
  146 + span {
  147 + font-size: 24px;
  148 + }
  149 + &.disable {
  150 + color: #999;
  151 + }
  152 + }
  153 + .usenow {
  154 + font-size: 32px;
  155 + text-align: center;
  156 + font-weight: bold;
  157 + margin-top: 10px;
  158 + &.disable {
  159 + color: #999;
  160 + }
  161 + }
  162 + }
  163 +}
  164 +</style>
0 \ No newline at end of file 165 \ No newline at end of file
src/views/Service/CardBoxXST.vue 0 → 100644
@@ -0,0 +1,417 @@ @@ -0,0 +1,417 @@
  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 = sessionStorage.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 + sessionStorage.setItem('cardCousreCardId', item.id)
  257 + sessionStorage.setItem('cardCousreCardPrice', item.couponPrice)
  258 + sessionStorage.setItem('cardCousreCardTitle', item.title)
  259 + sessionStorage.setItem('cardCousreProId', item.proId)
  260 + sessionStorage.setItem('cardCousreProName', item.proName)
  261 + sessionStorage.setItem('cardCousrePics', item.pics)
  262 + sessionStorage.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 + sessionStorage.setItem('cardCousreCardId', item.id)
  277 + sessionStorage.setItem('cardCousreCardPrice', item.couponPrice)
  278 + sessionStorage.setItem('cardCousreCardTitle', item.title)
  279 + sessionStorage.setItem('cardCousreProId', item.proId)
  280 + sessionStorage.setItem('cardCousreProName', item.proName)
  281 + sessionStorage.setItem('cardCousrePics', item.pics)
  282 + sessionStorage.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>
0 \ No newline at end of file 418 \ No newline at end of file
src/views/Service/CardCourseList.vue 0 → 100644
@@ -0,0 +1,199 @@ @@ -0,0 +1,199 @@
  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 + publicName: '',
  25 + unionId: '',
  26 + cardTitle: '',
  27 + couponPrice: '',
  28 + cardId: '',
  29 + proId: '',
  30 + proName: '',
  31 + pics: '',
  32 + geted: false,
  33 + proList: []
  34 + }
  35 + },
  36 + mounted () {
  37 + let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');
  38 + if (publicName) {
  39 + sessionStorage.setItem('publicName', publicName)
  40 + this.publicName = publicName
  41 + }
  42 + this.cardTitle = sessionStorage.getItem('cardCousreCardTitle');
  43 + this.couponPrice = sessionStorage.getItem('cardCousreCardPrice');
  44 + this.cardId = sessionStorage.getItem('cardCousreCardId');
  45 + this.proId = sessionStorage.getItem('cardCousreProId');
  46 + this.proName = sessionStorage.getItem('cardCousreProName');
  47 + this.pics = sessionStorage.getItem('cardCousrePics');
  48 + this.geted = sessionStorage.getItem('cardCousreGeted') == 'true' ? true : false
  49 + if (process.env.NODE_ENV === "production") {
  50 + let openId = sessionStorage.getItem('openId' + this.publicName);
  51 + if (!openId) {
  52 + sessionStorage.setItem('prePage', 'CardBoxXST');
  53 + this.$router.push({ name: 'Authorize' + this.publicName })
  54 + return;
  55 + }
  56 + this.unionId = sessionStorage.getItem('unionId');
  57 + } else {
  58 + this.unionId = 'oJPmPuLaAx2x2DaRGfCFeYuLWzLU';
  59 + }
  60 + this.getCourseList()
  61 + },
  62 + methods: {
  63 + // 获取优惠券对应的商品列表
  64 + getCourseList () {
  65 + this.$toast.loading({
  66 + message: "加载中...",
  67 + duration: 0,
  68 + forbidClick: true,
  69 + });
  70 + this.yxAxios.post(`${this.yanxueUrl}/api/StudiesWap/CourseList/ByIdList`, this.proId.split(',')).then((res) => {
  71 + this.$toast.clear();
  72 + let proList = res.data.data;
  73 + for (let i in proList) {
  74 + proList[i].course_labels = proList[i].course_labels?.split(',');
  75 + proList[i].coverUrl = proList[i]?.coverList[0]?.cover_url
  76 + if (proList[i].startDate) {
  77 + proList[i].week = this.formatWeek(this.Moment(proList[i].startDate).format('d'));
  78 + proList[i].startDate = this.Moment(proList[i].startDate).format('YYYY.M.D');
  79 + proList[i].endDate = this.Moment(proList[i].endDate).format('YYYY.M.D');
  80 + }
  81 + }
  82 + console.log(proList)
  83 + this.proList = proList
  84 + })
  85 + },
  86 + formatWeek (week) {
  87 + return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';
  88 + },
  89 +
  90 + //领取优惠券
  91 + reCard () {
  92 + if (this.geted) return;
  93 + this.yxAxios.post(`${this.proxyUrl}/prod/api/coupon/get`, {
  94 + unionId: this.unionId,
  95 + "proId": this.proId,
  96 + "proName": this.proName,
  97 + "pic": this.pics,
  98 + couponId: this.cardId,
  99 + })
  100 + .then((res) => {
  101 + // console.log(res.data)
  102 + if (res.data.code == 200) {
  103 + sessionStorage.setItem('cardCousreGeted', true)
  104 + this.geted = true;
  105 + this.$toast('领取成功!')
  106 + } else {
  107 + this.$toast.fail(res.data.message);
  108 + }
  109 + })
  110 +
  111 + },
  112 + onConfirm (item) {
  113 + this.showPicker = false;
  114 + this.enterAboradDetail(item.proId)
  115 + },
  116 + },
  117 + components: {
  118 + ServiceListSecond
  119 + }
  120 +}
  121 +</script>
  122 +<style lang="scss" scoped>
  123 +#cardCourseList {
  124 + width: 100%;
  125 + min-height: 100vh;
  126 + background: #fff;
  127 + background-image: url("../../assets/service/bg.png");
  128 + background-size: 100%;
  129 + background-repeat: no-repeat;
  130 + // padding-top: 36px;
  131 + overflow: hidden;
  132 + .card_box {
  133 + width: 704px;
  134 + height: 150px;
  135 + margin: 0 auto;
  136 + position: relative;
  137 + margin-top: 36px;
  138 + img {
  139 + width: 100%;
  140 + }
  141 + .card_title {
  142 + font-size: 40px;
  143 + font-weight: bold;
  144 + color: #7f5316;
  145 + position: absolute;
  146 + top: 22px;
  147 + left: 40px;
  148 + }
  149 + .card_tip {
  150 + font-size: 24px;
  151 + color: #7f5316;
  152 + position: absolute;
  153 + top: 94px;
  154 + left: 40px;
  155 + }
  156 + .right {
  157 + height: 100%;
  158 + position: absolute;
  159 + top: 0;
  160 + right: 2px;
  161 + padding-top: 20px;
  162 + box-sizing: border-box;
  163 + }
  164 + .card_price {
  165 + width: 160px;
  166 + font-size: 60px;
  167 + font-weight: bold;
  168 + text-align: center;
  169 + color: #000;
  170 + span {
  171 + font-size: 28px;
  172 + }
  173 + }
  174 + .card_btn {
  175 + display: block;
  176 + margin: 0 auto;
  177 + margin-top: 10px;
  178 + width: 134px;
  179 + line-height: 40px;
  180 + color: #7f5316;
  181 + font-size: 26px;
  182 + text-align: center;
  183 + font-weight: bold;
  184 + background: #fff;
  185 + border-radius: 4px;
  186 + &.nobg {
  187 + background: transparent;
  188 + }
  189 + }
  190 + }
  191 + .line {
  192 + font-size: 32px;
  193 + color: #fff;
  194 + letter-spacing: 4px;
  195 + text-align: center;
  196 + margin-top: 18px;
  197 + }
  198 +}
  199 +</style>
0 \ No newline at end of file 200 \ No newline at end of file
src/views/Service/LoginPublic.vue 0 → 100644
@@ -0,0 +1,234 @@ @@ -0,0 +1,234 @@
  1 +<template>
  2 + <div id="login">
  3 + <img class="bg" src="@/assets/login_bg.png" alt="">
  4 + <div class="box">
  5 + <p class="login_title">绑定手机号</p>
  6 + <div class="item">
  7 + <p class="title">手机号</p>
  8 + <div class="flex">
  9 + <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号">
  10 + <span class="getcode" @click="getCode">{{codeText}}</span>
  11 + </div>
  12 + </div>
  13 + <div class="item">
  14 + <p class="title">验证码</p>
  15 + <input class="code" type="text" v-model="code" placeholder="请输入验证码">
  16 + </div>
  17 + <button class="submit" @click="submitOperator">立即绑定</button>
  18 + </div>
  19 + </div>
  20 +</template>
  21 +<script>
  22 +var codeInterval;
  23 +export default {
  24 + name: 'LoginPublic',
  25 + data () {
  26 + return {
  27 + code: '',
  28 + phone: '',
  29 +
  30 + codeText: '获取验证码',//获取验证码按钮文字
  31 + appId: '',
  32 + unionId: '',
  33 + openId: '',
  34 + prefectId: '',
  35 + publicName: '',//SXYX绍兴研学 XST学事通
  36 + }
  37 + },
  38 + mounted () {
  39 + let publicName = this.$route.query.publicName || sessionStorage.getItem('publicName');
  40 + if (publicName == 'SXYX') {
  41 + this.appId = 'wx1305e88d2bc74073'
  42 + } else if (publicName == 'XST') {
  43 + this.appId = 'wx1c630c8773c482f1'
  44 + } else if (publicName == 'KQ') {
  45 + this.appId = 'wx1305e88d2bc74073'
  46 + }
  47 + this.openId = sessionStorage.getItem('openId' + publicName);
  48 + this.unionId = sessionStorage.getItem('unionId');
  49 + if (process.env.NODE_ENV === "production"&&this.common.isWeiXin()) {
  50 + if (!this.openId) {
  51 + this.$router.push({ name: 'Authorize' + publicName })
  52 + }
  53 + }
  54 +
  55 + },
  56 + methods: {
  57 + getCode () {
  58 + if (this.codeText != '获取验证码') return;
  59 + if (!this.phone) {
  60 + this.$toast('请输入手机号')
  61 + return;
  62 + }
  63 + if (!this.checkPhone(this.phone)) {
  64 + this.$toast('请输入正确的手机号')
  65 + return;
  66 + }
  67 + this.$toast.loading({
  68 + message: '加载中',
  69 + duration: 0,
  70 + forbidClick: true
  71 + })
  72 + this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/getMsg?phone=${this.phone}`).then((res) => {
  73 + this.$toast.clear()
  74 + if (res.data.code == 200) {
  75 + let i = 60;
  76 + codeInterval = setInterval(() => {
  77 + if (i == 0) {
  78 + this.codeText = `获取验证码`;
  79 + clearInterval(codeInterval);
  80 + return;
  81 + }
  82 + this.codeText = `重试(${i})`;
  83 + i--
  84 + }, 1000)
  85 + } else {
  86 + this.$toast.fail(res.data.message)
  87 + }
  88 + })
  89 + },
  90 + submitOperator () {
  91 + if (!this.phone) {
  92 + this.$toast('请输入手机号')
  93 + return;
  94 + }
  95 + if (!this.checkPhone(this.phone)) {
  96 + this.$toast('请输入正确的手机号')
  97 + return;
  98 + }
  99 + if (!this.code) {
  100 + this.$toast('请输入验证码')
  101 + return;
  102 + }
  103 + this.$toast.loading({
  104 + message: '加载中',
  105 + duration: 0,
  106 + forbidClick: true
  107 + })
  108 + this.yxAxios.post(`${this.proxyUrl}/prod/api/wx/${this.appId}/checkPhoneAndCode`, {
  109 + phone: this.phone,
  110 + code: this.code,
  111 + unionId: this.unionId,
  112 + openId: this.openId
  113 + }).then((res) => {
  114 + this.$toast.clear()
  115 + if (res.data.code == 200) {
  116 + this.getUserInfo()
  117 + } else {
  118 + this.$toast.fail(res.data.message)
  119 + }
  120 + })
  121 + },
  122 + checkPhone (phone) {
  123 + if ((/^1[3456789]\d{9}$/.test(phone))) {
  124 + return true
  125 + } else {
  126 + return false
  127 + }
  128 + },
  129 + complete () {
  130 + this.getUserInfo()
  131 + },
  132 + // 获取用户信息
  133 + getUserInfo () {
  134 + this.$toast.loading({
  135 + message: '加载中...',
  136 + duration: 0,
  137 + forbidClick: true
  138 + })
  139 + this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${this.appId}/getUserInfo?unionId=${this.unionId}`).then((res) => {
  140 + this.$toast.clear()
  141 + if (res.data.code == 200) {
  142 + sessionStorage.setItem('userInfo', JSON.stringify(res.data.data))
  143 + let prePage = sessionStorage.getItem('prePage');
  144 + let prePageQuery = sessionStorage.getItem('prePageQuery');
  145 + if (prePage) {
  146 + this.$router.push({ name: prePage, query: JSON.parse(prePageQuery) })
  147 + }
  148 + } else {
  149 + this.$toast.fail(res.data.message)
  150 + }
  151 + })
  152 + },
  153 + },
  154 + destroyed () {
  155 + clearInterval(codeInterval);
  156 + }
  157 +}
  158 +</script>
  159 +<style lang="scss" scoped>
  160 +#login {
  161 + .bg {
  162 + width: 100%;
  163 + }
  164 + .login_title {
  165 + font-size: 36px;
  166 + font-weight: bold;
  167 + text-align: center;
  168 + color: #000;
  169 + padding-bottom: 40px;
  170 + }
  171 + .box {
  172 + width: 702px;
  173 + height: 540px;
  174 + background: linear-gradient(
  175 + 180deg,
  176 + rgba(251, 251, 251, 0.99) 0%,
  177 + #ffffff 100%
  178 + );
  179 + box-shadow: 0px 4px 12px 0px rgba(87, 214, 255, 0.2);
  180 + border-radius: 20px;
  181 + position: absolute;
  182 + top: 240px;
  183 + left: 24px;
  184 + box-sizing: border-box;
  185 + padding: 40px;
  186 + .item {
  187 + border-bottom: 1px solid #e2e2e2;
  188 + margin-bottom: 30px;
  189 + }
  190 + .title {
  191 + font-size: 34px;
  192 + font-weight: bold;
  193 + margin-bottom: 28px;
  194 + }
  195 + .flex {
  196 + display: flex;
  197 + align-items: center;
  198 + justify-content: space-between;
  199 + margin-bottom: 22px;
  200 + }
  201 + .code {
  202 + border: 0;
  203 + background: transparent;
  204 + font-size: 28px;
  205 + margin-bottom: 32px;
  206 + width: 100%;
  207 + }
  208 + .phone {
  209 + width: 50%;
  210 + margin: 0;
  211 + }
  212 + .getcode {
  213 + color: #5789ff;
  214 + font-size: 28px;
  215 + padding: 10px;
  216 + }
  217 + .submit {
  218 + width: 622px;
  219 + height: 88px;
  220 + background: linear-gradient(137deg, #83b2ff 0%, #3c80ef 100%);
  221 + box-shadow: 0px 4px 8px 0px rgba(87, 169, 255, 0.5);
  222 + border-radius: 44px;
  223 + border: 0;
  224 + font-size: 34px;
  225 + color: #ffffff;
  226 + margin: 0 auto;
  227 + display: block;
  228 + }
  229 + }
  230 +}
  231 +.prefect_pop {
  232 + background: transparent;
  233 +}
  234 +</style>
0 \ No newline at end of file 235 \ No newline at end of file
src/views/Service/SelectContact.vue
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 </div> 24 </div>
25 </template> 25 </template>
26 <script> 26 <script>
27 -import AddChildPopupGroup from '@/views/PublicHome/component/AddChildPopupGroup' 27 +import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup'
28 import { Dialog } from 'vant'; 28 import { Dialog } from 'vant';
29 export default { 29 export default {
30 data () { 30 data () {
src/views/Service/ServiceBaseKQ.vue 0 → 100644
@@ -0,0 +1,571 @@ @@ -0,0 +1,571 @@
  1 +<template>
  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 + <ServiceListFour :list="campList" :notab="false"></ServiceListFour>
  14 + </div>
  15 + </div>
  16 + <div v-show="tabName=='KQ'">
  17 + <div class="swipeDiv">
  18 + <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  19 + <van-swipe-item>
  20 + <img src="../../assets/keqiao/kq_main1.png" style="width:100%;height:100%" />
  21 + </van-swipe-item>
  22 + <van-swipe-item>
  23 + <img src="../../assets/keqiao/kq_main1.png" style="width:100%;height:100%" />
  24 + </van-swipe-item>
  25 + </van-swipe>
  26 + </div>
  27 + <div class="container" style="margin-bottom:10">
  28 + <!-- 顶部搜索、扫一扫、个人中心 -->
  29 + <van-sticky>
  30 + <div class="top_tool">
  31 + <van-search class="search" v-model="search" shape="round" background="transparent" placeholder="搜索活动、研学旅行、服务" @search="onSearch" />
  32 + </div>
  33 + <div class="redLink">轻纺城小学红色网上游主题教育馆</div>
  34 + </van-sticky>
  35 + <div class="tabsCard">
  36 + <van-tabs v-model="active" sticky offset-top="24vw" z-index='100' :ellipsis="false" :before-change="beforeChange">
  37 + <van-tab title="革命遗址">
  38 + <ServiceListThird :list="uniList" :notab="true"></ServiceListThird>
  39 + </van-tab>
  40 + <van-tab title="文化传承">
  41 + <ServiceListThird :list="weekList" :notab="true"></ServiceListThird>
  42 + </van-tab>
  43 + <van-tab title="红色军旅">
  44 + <ServiceListThird :list="cityList" :notab="true"></ServiceListThird>
  45 + </van-tab>
  46 + <van-tab title="乡村振新">
  47 + <ServiceListThird :list="selectList" :notab="true"></ServiceListThird>
  48 + </van-tab>
  49 + <van-tab title="大好河山">
  50 + <ServiceListThird :list="riverList" :notab="true"></ServiceListThird>
  51 + </van-tab>
  52 + </van-tabs>
  53 + </div>
  54 +
  55 + </div>
  56 + </div>
  57 +
  58 + <Tabbar4 :active="tabName"></Tabbar4>
  59 + <!-- <screen :reload="false"></screen> -->
  60 + </div>
  61 +</template>
  62 +
  63 +<script>
  64 +import Tabbar4 from '@/component/Tabbar4'
  65 +import ServiceList from '@/views/Service/component/ServiceList.vue'
  66 +import ServiceListSecond from '@/views/Service/component/ServiceListSecond.vue'
  67 +import ServiceListThird from '@/views/Service/component/ServiceListThird.vue'
  68 +import ServiceListFour from '@/views/Service/component/ServiceListFour.vue'
  69 +import Screen from '@/views/Service/component/Screen.vue'
  70 +export default {
  71 + props: [
  72 + 'centerNo'
  73 + ],
  74 + data () {
  75 + return {
  76 + search: '',
  77 + defaultHead: require('@/assets/head.png'),
  78 + top_tab_active: 0,
  79 + active: 1,
  80 + uniList: [],
  81 + weekList: [],
  82 + cityList: [],
  83 + selectList: [],
  84 + riverList: [],
  85 + tabName: 'KQ',
  86 + campList: [],
  87 + }
  88 + },
  89 + watch: {
  90 + $route: {
  91 + immediate: true,
  92 + handler () {
  93 + // 设置tabbar状态
  94 + this.tabName = this.$route.query.showTab || 'KQ'
  95 + document.title = this.$route.query.showTab == 'ZZY' ? '周周营' : '柯桥研学'
  96 + }
  97 + }
  98 + },
  99 + mounted () {
  100 + console.log('base mounted')
  101 + this.initService()
  102 +
  103 + },
  104 + activated () {
  105 + console.log('base activated')
  106 + this.initService()
  107 + },
  108 + methods: {
  109 + initService () {
  110 + this.getUniList()
  111 + this.getWeekList()
  112 + this.getCityList()
  113 + this.getSelectList()
  114 + this.getRiverList()
  115 + this.getCampList()
  116 + },
  117 +
  118 + // 革命遗址
  119 + getUniList () {
  120 + this.$toast.loading()
  121 + this.mgop({
  122 + api: 'mgop.sz.hswsy.qxyList', // 必须
  123 + host: 'https://mapi.zjzwfw.gov.cn/',
  124 + dataType: 'JSON',
  125 + type: 'POST',
  126 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  127 + headers: {
  128 + // 'isTestUrl': '1'
  129 + },
  130 + data: {
  131 + "area": "",
  132 + "province": "",
  133 + "city": "",
  134 + "searchType": "5",
  135 + "userId": this.centerNo,
  136 + "productTypeId": "BQ0001",
  137 + "businessTypeId": "BQ0001",
  138 + "channelCode": ""
  139 + },
  140 + onSuccess: data => {
  141 + console.log('data', data)
  142 + this.$toast.clear()
  143 + let uniList = data.data.data;
  144 + for (let i in uniList) {
  145 + uniList[i].course_labels = uniList[i].course_labels?.split(',');
  146 + if (uniList[i].startDate) {
  147 + uniList[i].week = this.formatWeek(this.Moment(uniList[i].startDate).format('d'));
  148 + uniList[i].startDate = this.Moment(uniList[i].startDate).format('YYYY.M.D');
  149 + uniList[i].endDate = this.Moment(uniList[i].endDate).format('YYYY.M.D');
  150 + }
  151 + }
  152 + this.uniList = uniList
  153 + },
  154 + onFail: err => {
  155 + console.log('err', err)
  156 + }
  157 + });
  158 + },
  159 + // 文化传承
  160 + getWeekList () {
  161 + this.mgop({
  162 + api: 'mgop.sz.hswsy.qxyList', // 必须
  163 + host: 'https://mapi.zjzwfw.gov.cn/',
  164 + dataType: 'JSON',
  165 + type: 'POST',
  166 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  167 + headers: {
  168 + // 'isTestUrl': '1'
  169 + },
  170 + data: {
  171 + "area": "",
  172 + "province": "",
  173 + "city": "",
  174 + "searchType": "5",
  175 + "userId": this.centerNo,
  176 + "productTypeId": "BQ0002",
  177 + "businessTypeId": "BQ0001",
  178 + "channelCode": ""
  179 + },
  180 + onSuccess: data => {
  181 + console.log('data', data)
  182 + let weekList = data.data.data;
  183 + for (let i in weekList) {
  184 + weekList[i].course_labels = weekList[i].course_labels?.split(',');
  185 + if (weekList[i].startDate) {
  186 + weekList[i].week = this.formatWeek(this.Moment(weekList[i].startDate).format('d'));
  187 + weekList[i].startDate = this.Moment(weekList[i].startDate).format('YYYY.M.D');
  188 + weekList[i].endDate = this.Moment(weekList[i].endDate).format('YYYY.M.D');
  189 + }
  190 + }
  191 + this.weekList = weekList
  192 + },
  193 + onFail: err => {
  194 + console.log('err', err)
  195 + }
  196 + });
  197 + },
  198 + // 红色军旅
  199 + getCityList () {
  200 + this.mgop({
  201 + api: 'mgop.sz.hswsy.qxyList', // 必须
  202 + host: 'https://mapi.zjzwfw.gov.cn/',
  203 + dataType: 'JSON',
  204 + type: 'POST',
  205 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  206 + headers: {
  207 + // 'isTestUrl': '1'
  208 + },
  209 + data: {
  210 + "area": "",
  211 + "province": "",
  212 + "city": "",
  213 + "searchType": "5",
  214 + "userId": this.centerNo,
  215 + "productTypeId": "BQ0003",
  216 + "businessTypeId": "BQ0001",
  217 + "channelCode": ""
  218 + },
  219 + onSuccess: data => {
  220 + console.log('data', data)
  221 + let cityList = data.data.data;
  222 + for (let i in cityList) {
  223 + cityList[i].course_labels = cityList[i].course_labels?.split(',');
  224 + if (cityList[i].startDate) {
  225 + cityList[i].week = this.formatWeek(this.Moment(cityList[i].startDate).format('d'));
  226 + cityList[i].startDate = this.Moment(cityList[i].startDate).format('YYYY.M.D');
  227 + cityList[i].endDate = this.Moment(cityList[i].endDate).format('YYYY.M.D');
  228 + }
  229 + }
  230 + this.cityList = cityList
  231 + },
  232 + onFail: err => {
  233 + console.log('err', err)
  234 + }
  235 + });
  236 + },
  237 + // 乡村振新
  238 + getSelectList () {
  239 + this.mgop({
  240 + api: 'mgop.sz.hswsy.qxyList', // 必须
  241 + host: 'https://mapi.zjzwfw.gov.cn/',
  242 + dataType: 'JSON',
  243 + type: 'POST',
  244 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  245 + headers: {
  246 + // 'isTestUrl': '1'
  247 + },
  248 + data: {
  249 + "area": "",
  250 + "province": "",
  251 + "city": "",
  252 + "searchType": "5",
  253 + "userId": this.centerNo,
  254 + "productTypeId": "BQ0004",
  255 + "businessTypeId": "BQ0001",
  256 + "channelCode": ""
  257 + },
  258 + onSuccess: data => {
  259 + console.log('data', data)
  260 + let selectList = data.data.data;
  261 + for (let i in selectList) {
  262 + selectList[i].course_labels = selectList[i].course_labels?.split(',');
  263 + if (selectList[i].startDate) {
  264 + selectList[i].week = this.formatWeek(this.Moment(selectList[i].startDate).format('d'));
  265 + selectList[i].startDate = this.Moment(selectList[i].startDate).format('YYYY.M.D');
  266 + selectList[i].endDate = this.Moment(selectList[i].endDate).format('YYYY.M.D');
  267 + }
  268 + }
  269 + this.selectList = selectList
  270 + },
  271 + onFail: err => {
  272 + console.log('err', err)
  273 + }
  274 + });
  275 + },
  276 + // 大好河山
  277 + getRiverList () {
  278 + this.mgop({
  279 + api: 'mgop.sz.hswsy.qxyList', // 必须
  280 + host: 'https://mapi.zjzwfw.gov.cn/',
  281 + dataType: 'JSON',
  282 + type: 'POST',
  283 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  284 + headers: {
  285 + // 'isTestUrl': '1'
  286 + },
  287 + data: {
  288 + "area": "",
  289 + "province": "",
  290 + "city": "",
  291 + "searchType": "5",
  292 + "userId": this.centerNo,
  293 + "productTypeId": "BQ0005",
  294 + "businessTypeId": "BQ0001",
  295 + "channelCode": ""
  296 + },
  297 + onSuccess: data => {
  298 + console.log('data', data)
  299 + let riverList = data.data.data;
  300 + for (let i in riverList) {
  301 + riverList[i].course_labels = riverList[i].course_labels?.split(',');
  302 + if (riverList[i].startDate) {
  303 + riverList[i].week = this.formatWeek(this.Moment(riverList[i].startDate).format('d'));
  304 + riverList[i].startDate = this.Moment(riverList[i].startDate).format('YYYY.M.D');
  305 + riverList[i].endDate = this.Moment(riverList[i].endDate).format('YYYY.M.D');
  306 + }
  307 + }
  308 + this.riverList = riverList
  309 + },
  310 + onFail: err => {
  311 + console.log('err', err)
  312 + }
  313 + });
  314 + },
  315 +
  316 + // 每周一营 6
  317 + getCampList () {
  318 + this.mgop({
  319 + api: 'mgop.sz.hswsy.qxyList', // 必须
  320 + host: 'https://mapi.zjzwfw.gov.cn/',
  321 + dataType: 'JSON',
  322 + type: 'POST',
  323 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  324 + headers: {
  325 + // 'isTestUrl': '1'
  326 + },
  327 + data: {
  328 + "area": "",
  329 + "province": "",
  330 + "city": "",
  331 + "searchType": "6",
  332 + "userId": this.centerNo,
  333 + "productTypeId": "ZZY001",
  334 + "businessTypeId": "JY0004",
  335 + "channelCode": "GZH002"
  336 + },
  337 + onSuccess: data => {
  338 + console.log('data', data)
  339 + let campList = data.data.data;
  340 + for (let i in campList) {
  341 + campList[i].course_labels = campList[i].course_labels?.split(',');
  342 + if (campList[i].startDate) {
  343 + campList[i].week = this.formatWeek(this.Moment(campList[i].startDate).format('d'));
  344 + campList[i].startDate = this.Moment(campList[i].startDate).format('YYYY.M.D');
  345 + campList[i].endDate = this.Moment(campList[i].endDate).format('YYYY.M.D');
  346 + }
  347 + }
  348 + this.campList = campList
  349 + },
  350 + onFail: err => {
  351 + console.log('err', err)
  352 + }
  353 + });
  354 + },
  355 + beforeChange (index) {
  356 + // if (index != 0 && index != 1 && index != 2) {
  357 + // this.$toast('暂未开放,敬请期待!')
  358 + // return false
  359 + // }
  360 + return true
  361 + },
  362 + onSearch () {
  363 + this.$toast('暂未开放,敬请期待!')
  364 + },
  365 + // 我的订单
  366 + handleMyOrder () {
  367 + this.$router.push({ name: 'ServiceOrderXST' })
  368 + },
  369 + // 我的优惠券
  370 + handleMyCard () {
  371 + this.$router.push({ name: 'ServiceCardBoxPublic' })
  372 + },
  373 + formatWeek (week) {
  374 + return week == 1 ? '周一' : week == 2 ? '周二' : week == 3 ? '周三' : week == 4 ? '周四' : week == 5 ? '周五' : week == 6 ? '周六' : week == 0 ? '周日' : '';
  375 + },
  376 + // 点击轮播
  377 + handleBanner () {
  378 + location.href = 'https://mp.weixin.qq.com/s/a4N3xr2nXZ-aG3OEakv-Dg'
  379 + },
  380 + },
  381 + components: {
  382 + Tabbar4,
  383 + ServiceList,
  384 + Screen,
  385 + ServiceListSecond,
  386 + ServiceListThird,
  387 + ServiceListFour
  388 + }
  389 +}
  390 +</script>
  391 +<style lang="scss" scoped>
  392 +#serviceKQ {
  393 + width: 100%;
  394 + height: 100%;
  395 + background: #f8f8f8;
  396 + overflow: hidden;
  397 + .swipeDiv {
  398 + // height: 400px;
  399 + height: 60vw;
  400 + width: 100%;
  401 + }
  402 + .container {
  403 + height: 100%;
  404 + position: absolute;
  405 + // top: 410px;
  406 + top: 60vw;
  407 + background: #f6f7fa;
  408 + background-image: url("../../assets/keqiao/kq_white.png");
  409 + // background-image: url("../../assets/service/bg.png");
  410 + background-size: 100%;
  411 + background-repeat: no-repeat;
  412 + // border-radius: 50px;
  413 + .redLink {
  414 + height: 10vw;
  415 + font-size: 4vw;
  416 + display: flex;
  417 + align-items: center;
  418 + justify-content: center;
  419 + color: #fff;
  420 + // background-color: aquamarine;
  421 + background-image: linear-gradient(
  422 + to right,
  423 + rgba(255, 0, 0, 0),
  424 + #ff696a,
  425 + rgba(255, 0, 0, 0)
  426 + );
  427 + background-color: #fff;
  428 + }
  429 + .tabsCard {
  430 + width: 100vw;
  431 + }
  432 + .top_tool {
  433 + display: flex;
  434 + align-items: center;
  435 + // justify-content: center;
  436 + justify-content: space-between;
  437 + padding: 20px 24px;
  438 + box-sizing: border-box;
  439 + height: 108px;
  440 + background-color: #fff;
  441 + .logo {
  442 + width: 82px;
  443 + }
  444 + .search {
  445 + padding: 0;
  446 + width: 100%;
  447 + // width: 400px;
  448 + }
  449 + .scan {
  450 + width: 44px;
  451 + }
  452 + .head {
  453 + width: 60px;
  454 + }
  455 + .top_tab {
  456 + width: 366px;
  457 + border-radius: 33px;
  458 + overflow: hidden;
  459 + span {
  460 + display: inline-block;
  461 + width: 50%;
  462 + line-height: 66px;
  463 + text-align: center;
  464 + font-size: 28px;
  465 + color: #f3f3f3;
  466 + background: rgba(255, 255, 255, 0.24);
  467 + &.active {
  468 + // color: #fff;
  469 + color: black;
  470 + background: rgba(255, 255, 255, 0.21);
  471 + }
  472 + }
  473 + }
  474 + }
  475 + .service_swipe {
  476 + img {
  477 + width: 100%;
  478 + }
  479 + }
  480 + .card_zzy {
  481 + display: block;
  482 + width: 704px;
  483 + margin: 0 auto;
  484 + margin-top: 20px;
  485 + }
  486 + .order_btn {
  487 + width: 160px;
  488 + position: fixed;
  489 + bottom: 200px;
  490 + right: 20px;
  491 + z-index: 99;
  492 + }
  493 + }
  494 +
  495 + ::v-deep .van-search__content {
  496 + background: rgba(255, 255, 255, 0.36);
  497 + .van-cell {
  498 + // color: #fff;
  499 + color: black;
  500 + }
  501 + .van-field__control {
  502 + // color: #fff;
  503 + color: black;
  504 + &::-webkit-input-placeholder {
  505 + // color: #fff;
  506 + color: #909399;
  507 + }
  508 + }
  509 + }
  510 + ::v-deep .van-tabs__wrap {
  511 + box-shadow: 0 10px 10px rgba(238, 238, 238, 0.295);
  512 + height: 88px;
  513 + }
  514 + ::v-deep .van-tabs__nav {
  515 + background: transparent;
  516 + }
  517 + ::v-deep .van-tab {
  518 + // color: #fff;
  519 + color: black;
  520 + font-size: 28px;
  521 + background-color: #fff;
  522 + }
  523 + ::v-deep .van-tab--active {
  524 + // color: #fff;
  525 + color: black;
  526 + font-size: 32px;
  527 + font-weight: bold;
  528 + }
  529 + ::v-deep .van-tabs__line {
  530 + width: 48px;
  531 + height: 6px;
  532 + // background: #ffffff;
  533 + background: black;
  534 + border-radius: 10px 10px 0px 0px;
  535 + }
  536 + .tab_img {
  537 + width: 146px;
  538 + transition: 0.3s linear;
  539 + }
  540 + .van-tab--active {
  541 + .tab_img {
  542 + transform: scale(1.2);
  543 + }
  544 + }
  545 + .fixed_btn {
  546 + position: fixed;
  547 + bottom: 20vw;
  548 + right: 0;
  549 + span {
  550 + display: block;
  551 + width: 200px;
  552 + text-align: center;
  553 + line-height: 60px;
  554 + font-size: 30px;
  555 + background: rgb(100, 200, 250);
  556 + border-top-left-radius: 30px;
  557 + border-bottom-left-radius: 30px;
  558 + margin-bottom: 30px;
  559 + }
  560 + }
  561 +}
  562 +.my-swipe .van-swipe-item {
  563 + color: #fff;
  564 + height: 60vw;
  565 + font-size: 20px;
  566 + // line-height: 400px;
  567 + // line-height: 60vw;
  568 + text-align: center;
  569 + background-color: #39a9ed;
  570 +}
  571 +</style>
src/views/Service/ServiceKQ.vue 0 → 100644
@@ -0,0 +1,81 @@ @@ -0,0 +1,81 @@
  1 +<template>
  2 + <service-basekq :centerNo="centerNo" v-if="centerNo"></service-basekq>
  3 +</template>
  4 +
  5 +<script>
  6 +import ServiceBasekq from './ServiceBaseKQ.vue'
  7 +export default {
  8 + name: 'ServiceKQ',
  9 + data () {
  10 + return {
  11 + centerNo: '',
  12 + }
  13 + },
  14 +
  15 + mounted () {
  16 + console.log('xst mounted')
  17 + this.checkAuth()
  18 +
  19 + },
  20 + activated () {
  21 + console.log('KQ activated')
  22 + this.checkAuth()
  23 + },
  24 + methods: {
  25 + checkAuth () {
  26 + let centerNo = this.common.getUrlParam('center_no') || sessionStorage.getItem('centerNo');
  27 + if (centerNo) {
  28 + this.centerNo = centerNo
  29 + sessionStorage.setItem('centerNo', centerNo);
  30 + this.getUserInfo()
  31 + } else {
  32 + const sUserAgent = window.navigator.userAgent.toLowerCase()
  33 + const dtdreamweb = sUserAgent.indexOf("dtdreamweb") > -1
  34 + const miniprogram = sUserAgent.indexOf("miniprogram") > -1 && sUserAgent.indexOf("alipay") > -1
  35 + if (dtdreamweb) {
  36 + alert('浙里办')
  37 + window.location.href = `https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy`;
  38 + }
  39 + // else if (miniprogram) {
  40 + // alert('支付宝')
  41 + // window.location.href = `https://puser.zjzwfw.gov.cn/sso/alipay.do?action=ssoLogin&servicecode=passp&goto=`;
  42 + // }
  43 + else {
  44 + console.log('非浙里办渠道访问,显示测试用户数据')
  45 + this.centerNo = '20210930160466993660'
  46 + sessionStorage.setItem('centerNo', '20210930160466993660');
  47 + this.getUserInfo()
  48 + }
  49 + }
  50 + },
  51 + // 获取用户信息
  52 + getUserInfo: function () {
  53 + this.mgop({
  54 + api: 'mgop.sz.hswsy.getPortalUserByNum', // 必须
  55 + host: 'https://mapi.zjzwfw.gov.cn/',
  56 + dataType: 'JSON',
  57 + type: 'GET',
  58 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  59 + headers: {
  60 + // 'isTestUrl': '1'
  61 + },
  62 + data: {
  63 + "userNum": this.centerNo
  64 + },
  65 + onSuccess: res => {
  66 + console.log('getUserInfo', res)
  67 + if (res.data.code == 200) {
  68 + sessionStorage.setItem('userInfo', JSON.stringify(res.data.data.userInfo))
  69 + }
  70 + },
  71 + onFail: err => {
  72 + console.log('err', err)
  73 + }
  74 + });
  75 + },
  76 + },
  77 + components: {
  78 + ServiceBasekq
  79 + }
  80 +}
  81 +</script>
src/views/Service/ServiceOrderXST.vue 0 → 100644
@@ -0,0 +1,867 @@ @@ -0,0 +1,867 @@
  1 +<template>
  2 + <div class="myOrders">
  3 + <van-tabs v-model="active" :before-change="beforeTabChange">
  4 + <van-tab title="待付款">
  5 + <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadpay()">
  6 + <div class="showBoxDPJ" v-for="(item,index) in paylist" :key="index">
  7 + <div class="topLine">
  8 + <div class="topLineL">订单编号:{{item.orderpaynum}}</div>
  9 + <div class="topLineR" style="color:#F64C37">待付款</div>
  10 + </div>
  11 + <div class="top" @click="toEdit(item)">
  12 + <div class="pic">
  13 + <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  14 + </div>
  15 + <div class="basefont">
  16 + <div class="titlefont">{{item.baseName}}</div>
  17 + <div class="tcfont">套餐名称:{{item.courseName}}</div>
  18 + <div class="tcfont">数量*{{item.orderCount}}</div>
  19 + </div>
  20 + <div class="priceRight">¥{{item.paymoney}}</div>
  21 + </div>
  22 + <div class="detailsBox">
  23 + <div class="detailsBoxOne">
  24 + <div>订单创建时间</div>
  25 + <div>{{item.intime.replace(/T/,' ')}}</div>
  26 + </div>
  27 + </div>
  28 + </div>
  29 + </van-list>
  30 + </van-tab>
  31 + <van-tab title="待使用">
  32 + <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadmove()">
  33 + <div class="showBox" v-for="(item,index) in movelist" :key="index">
  34 + <div class="top" @click="toEdit(item)">
  35 + <div class="pic">
  36 + <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  37 + </div>
  38 + <div class="basefont">
  39 + <div class="titlefont">{{item.baseName}}</div>
  40 + <div class="tcfont">套餐名称:{{item.courseName}}</div>
  41 + <div class="tcfont">数量*{{item.orderCount}}</div>
  42 + </div>
  43 + <div class="priceRight">¥{{item.paymoney}}</div>
  44 + </div>
  45 + <div class="groupTime">
  46 + <van-icon name="clock-o" /><span class="grey"> 活动日期</span><span> {{item.startDate}} - {{ item.endDate}}</span>
  47 + </div>
  48 + <div class="btnBox">
  49 + <div class="wechat_code" @click="openGroupCodePopup(index)" style="margin-right:15px">
  50 + <img src="@/assets/home/wechat.png" alt="">
  51 + <span>加入拼团群</span>
  52 + </div>
  53 + <div>
  54 + <van-button type="warning" plain size="small" @click="showPintuanAbout = true" style="margin-right:15px">退款说明</van-button>
  55 + <!-- <van-button type="info" size="small" @click="makeCode(item.id)">核销码</van-button> -->
  56 + <van-button type="info" size="small" @click="toCode(item)">核销码</van-button>
  57 + </div>
  58 + </div>
  59 + <div class="detailsBox">
  60 + <div class="detailsBoxOne">
  61 + <div>订单创建时间</div>
  62 + <div>{{item.intime.replace(/T/,' ')}}</div>
  63 + </div>
  64 + <div class="detailsBoxOne">
  65 + <div>订单编号</div>
  66 + <div>{{item.orderpaynum}}</div>
  67 + </div>
  68 + </div>
  69 + </div>
  70 + </van-list>
  71 + </van-tab>
  72 + <van-tab title="待评价">
  73 + <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoadCareer()">
  74 + <div class="showBoxDPJ" v-for="(item,index) in datalist" :key="index">
  75 + <div class="topLine">
  76 + <div class="topLineL">订单编号:{{item.orderpaynum}}</div>
  77 + <div class="topLineR" @click="evaluate(item)">去评价 ></div>
  78 + </div>
  79 + <div class="top" @click="toEdit(item)">
  80 + <div class="pic">
  81 + <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  82 + </div>
  83 + <div class="basefont">
  84 + <div class="titlefont">{{item.baseName}}</div>
  85 + <div class="tcfont">套餐名称:{{item.courseName}}</div>
  86 + <div class="tcfont">数量*{{item.orderCount}}</div>
  87 + </div>
  88 + <div class="priceRight">¥{{item.paymoney}}</div>
  89 + </div>
  90 + <div class="detailsBox">
  91 + <div class="detailsBoxOne">
  92 + <div>订单创建时间</div>
  93 + <div>{{item.intime.replace(/T/,' ')}}</div>
  94 + </div>
  95 + </div>
  96 + </div>
  97 + </van-list>
  98 + </van-tab>
  99 + <van-tab title="已评价">
  100 + <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad()">
  101 + <div class="showBoxDPJ showBoxYPJ" v-for="(item,index) in list" :key="index">
  102 + <div class="top">
  103 + <div class="pic">
  104 + <img :src="item.coverUrl ? item.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  105 + </div>
  106 + <div class="basefont">
  107 + <div class="titlefont">{{item.baseName}}</div>
  108 + <div class="tcfont">套餐名称:{{item.courseName}}</div>
  109 + <div class="tcfont">数量*{{item.orderCount}}</div>
  110 + </div>
  111 + <div class="priceRight">¥{{item.paymoney}}</div>
  112 + </div>
  113 + <div class="boxdf">
  114 + <div class="title">课程评分</div>
  115 + <div class="fr">
  116 + <van-rate v-model="item.courseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />
  117 + <span class="rate">{{item.courseScore}}.0</span>
  118 + </div>
  119 + </div>
  120 + <div class="boxdf">
  121 + <div class="title">基地评分</div>
  122 + <div class="fr">
  123 + <van-rate v-model="item.baseScore" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" readonly />
  124 + <span class="rate">{{item.baseScore}}.0</span>
  125 + </div>
  126 + </div>
  127 + <p class="evaluation"><span>评价:</span>{{item.evaluation}}</p>
  128 + <div class="evaluation_img_box">
  129 + <img class="evaluation_img" v-for="(imgItem,index) in item.imageList" :key="index" :src="imgItem.imgUrl" alt="" @click="previewImg(imgItem.imgUrl)">
  130 + </div>
  131 + <!-- <p class="evaluation_time">评价于2020-12-21</p> -->
  132 + </div>
  133 + </van-list>
  134 + </van-tab>
  135 + </van-tabs>
  136 +
  137 + <!--二维码-->
  138 + <!-- <div class="qrcodeBox" @click.self="qrcodeShow = false" v-show="qrcodeShow">
  139 + <div id="qrcode"></div>
  140 + </div> -->
  141 +
  142 + <!--退款说明-->
  143 + <van-popup v-model="showPintuanAbout" round>
  144 + <div class="pintuan_about">
  145 + <img class="about_img" src="@/assets/service/tip.png" alt="">
  146 + <p class="about_title">退款说明</p>
  147 + <p class="about_content">1、凡拼团活动报名人数未达最低成团数,本团活动则不开营,系统将在72小时内,全额退还,且不产生违约风险赔偿。</p>
  148 + <p class="about_content">2、如果您因行程发生变动需要取消预订,建议您尽可能提前与平台商户取得联系,并按商品订购须知或该商户旅游合同条款进行退款。</p>
  149 + <p class="about_content" style="font-weight:bold">如若未声明与明确的,按《浙江省境内旅游合同》条款退款。</p>
  150 + <!-- <p class="about_content">(1)出发前7日至4日,支付旅游费用总额的10%。</p>
  151 + <p class="about_content">(2)出发前3日至1日,支付旅游费用总额的15%。</p>
  152 + <p class="about_content">(3)出发当日,支付旅游费用总额的20%。</p> -->
  153 + <p class="about_know" @click="showPintuanAbout=false">我知道了</p>
  154 + </div>
  155 + </van-popup>
  156 +
  157 + <van-popup v-model="showCode" round get-container="body">
  158 + <div class="codeCss">
  159 + <div class="showBox">
  160 + <div class="top">
  161 + <div class="pic">
  162 + <img :src="codeData.coverUrl ? codeData.coverUrl : require('@/assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  163 + </div>
  164 + <div class="basefont">
  165 + <div class="titlefont">{{codeData.baseName}}</div>
  166 + <div class="tcfont">套餐名称:{{codeData.courseName}}</div>
  167 + <div class="tcfont">数量*{{codeData.orderCount}}</div>
  168 + </div>
  169 + <!-- <div class="priceRight">¥{{codeData.paymoney}}</div> -->
  170 + </div>
  171 + <div class="groupTime">
  172 + <van-icon name="clock-o" /><span class="grey"> 活动日期</span><span> {{codeData.startDate}} - {{ codeData.endDate}}</span>
  173 + </div>
  174 + <div class="qrcodeBox">
  175 + <div id="qrcode" ref="imageWrapper" v-if="!imgUrl"></div>
  176 + <div class="imgBox">
  177 + <img :src="imgUrl" v-if="imgUrl" style="width:100%;height:100%" />
  178 + </div>
  179 + </div>
  180 + <div class="numShow">
  181 + {{codeData.id}}
  182 + </div>
  183 + <div class="fontBottom">请向工作人员出示</div>
  184 + </div>
  185 + </div>
  186 + </van-popup>
  187 + <van-popup v-model="showPreview" round get-container="body">
  188 + <img class="preview_img" :src="previewUrl" alt="">
  189 + </van-popup>
  190 + <GroupCodePopup v-if="showGroupCode" :chatGroupUrl="chatGroupUrl" @closeGroupCode="showGroupCode=false"></GroupCodePopup>
  191 + </div>
  192 +</template>
  193 +
  194 +<script>
  195 +import GroupCodePopup from '@/component/GroupCodePopup'
  196 +import QRCode from 'qrcodejs2' // 引入qrcode
  197 +import html2canvas from "html2canvas"
  198 +// let Base64 = require('js-base64').Base64;
  199 +export default {
  200 + name: 'ServiceOrder',
  201 + data () {
  202 + return {
  203 + userInfo: '',
  204 + active: 1,
  205 + paylist: [], //待付款
  206 + movelist: [], //待核销
  207 + list: [], //所有
  208 + datalist: [], //未评价
  209 + loading: false,
  210 + finished: false,
  211 + pageCareerIndex: 0,
  212 + qrcodeShow: false,
  213 + showPintuanAbout: false,
  214 + showCode: false,
  215 + codeData: {},
  216 + imgUrl: '',
  217 + previewUrl: '',//图片预览
  218 + showPreview: false,
  219 + showGroupCode: false,//群码
  220 + chatGroupUrl: '',//群码图片
  221 + showChatGroupUrlTag: false
  222 + }
  223 + },
  224 + computed: {
  225 + nicknameUser () {
  226 + return sessionStorage.getItem('nicknameUser')
  227 + }
  228 + },
  229 + mounted () {
  230 + let userInfo = sessionStorage.getItem('userInfo');
  231 + if (userInfo) {
  232 + this.userInfo = JSON.parse(userInfo);
  233 + }
  234 + // 进入页面进到第几个tab
  235 + if (this.$route.query.active || this.$route.query.active == 0) {
  236 + this.active = this.$route.query.active
  237 + }
  238 + // 进入页面直接显示第一个订单的群码
  239 + if (this.$route.query.showChatGroupUrl == 1) {
  240 + this.showChatGroupUrlTag = true
  241 + }
  242 + },
  243 + methods: {
  244 + beforeTabChange (item) {
  245 + console.log(item)
  246 + this.paylist = [];
  247 + this.movelist = [];
  248 + this.list = [];
  249 + this.datalist = [];
  250 + if (item == 0) {
  251 + this.onLoadpay()
  252 + } else if (item == 1) {
  253 + // this.onLoadCareer()
  254 + this.onLoadmove()
  255 + } else if (item == 2) {
  256 + this.onLoadCareer()
  257 + } else {
  258 + this.onLoad()
  259 + }
  260 + return true;
  261 + },
  262 + //获取待支付
  263 + onLoadpay () {
  264 + this.mgop({
  265 + api: 'mgop.sz.hswsy.GetOrderPayList', // 必须
  266 + host: 'https://mapi.zjzwfw.gov.cn/',
  267 + dataType: 'JSON',
  268 + type: 'GET',
  269 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  270 + headers: {
  271 + // 'isTestUrl': '1'
  272 + },
  273 + data: {
  274 + "userId": sessionStorage.getItem('centerNo'),
  275 + "type": 1,
  276 + "page": 1,
  277 + "pageSize": 999
  278 + },
  279 + onSuccess: res => {
  280 + console.log('待支付:', res)
  281 + if (res.data.status == 1) {
  282 + this.paylist = res.data.data.list;
  283 + this.loading = false;
  284 + this.finished = true;
  285 + } else {
  286 + this.$toast.fail(res.data.message);
  287 + }
  288 + },
  289 + onFail: err => {
  290 + console.log('err', err)
  291 + }
  292 + });
  293 + },
  294 + //获取已支付
  295 + onLoadmove () {
  296 + this.mgop({
  297 + api: 'mgop.sz.hswsy.GetOrderPayList', // 必须
  298 + host: 'https://mapi.zjzwfw.gov.cn/',
  299 + dataType: 'JSON',
  300 + type: 'GET',
  301 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  302 + headers: {
  303 + // 'isTestUrl': '1'
  304 + },
  305 + data: {
  306 + "userId": sessionStorage.getItem('centerNo'),
  307 + "type": 2,
  308 + "page": 1,
  309 + "pageSize": 999
  310 + },
  311 + onSuccess: res => {
  312 + console.log('已支付:', res)
  313 + if (res.data.status == 1) {
  314 + this.movelist = res.data.data.list;
  315 + this.loading = false;
  316 + this.finished = true;
  317 + if (this.showChatGroupUrlTag) {
  318 + this.showChatGroupUrlTag = false;
  319 + this.openGroupCodePopup(0)
  320 + }
  321 + } else {
  322 + this.$toast.fail(res.data.message);
  323 + }
  324 + },
  325 + onFail: err => {
  326 + console.log('err', err)
  327 + }
  328 + });
  329 + },
  330 + //获取待评价
  331 + onLoadCareer () {
  332 + this.mgop({
  333 + api: 'mgop.sz.hswsy.GetOrderPayList', // 必须
  334 + host: 'https://mapi.zjzwfw.gov.cn/',
  335 + dataType: 'JSON',
  336 + type: 'GET',
  337 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  338 + headers: {
  339 + // 'isTestUrl': '1'
  340 + },
  341 + data: {
  342 + "userId": sessionStorage.getItem('centerNo'),
  343 + "type": 3,
  344 + "page": 1,
  345 + "pageSize": 999
  346 + },
  347 + onSuccess: res => {
  348 + console.log('待评价:', res)
  349 + if (res.data.status == 1) {
  350 + this.datalist = res.data.data.list;
  351 + this.loading = false;
  352 + this.finished = true;
  353 + if (this.showChatGroupUrlTag) {
  354 + this.showChatGroupUrlTag = false;
  355 + this.openGroupCodePopup(0)
  356 + }
  357 + } else {
  358 + this.$toast.fail(res.data.message);
  359 + }
  360 + },
  361 + onFail: err => {
  362 + console.log('err', err)
  363 + }
  364 + });
  365 + },
  366 + //获取已评价
  367 + onLoad () {
  368 + this.mgop({
  369 + api: 'mgop.sz.hswsy.GetOrderPayList', // 必须
  370 + host: 'https://mapi.zjzwfw.gov.cn/',
  371 + dataType: 'JSON',
  372 + type: 'GET',
  373 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  374 + headers: {
  375 + // 'isTestUrl': '1'
  376 + },
  377 + data: {
  378 + "userId": sessionStorage.getItem('centerNo'),
  379 + "type": 4,
  380 + "page": 1,
  381 + "pageSize": 999
  382 + },
  383 + onSuccess: res => {
  384 + console.log('已评价:', res)
  385 + if (res.data.status == 1) {
  386 + this.list = res.data.data.list;
  387 + this.loading = false;
  388 + this.finished = true;
  389 + if (this.showChatGroupUrlTag) {
  390 + this.showChatGroupUrlTag = false;
  391 + this.openGroupCodePopup(0)
  392 + }
  393 + } else {
  394 + this.$toast.fail(res.data.message);
  395 + }
  396 + },
  397 + onFail: err => {
  398 + console.log('err', err)
  399 + }
  400 + });
  401 + },
  402 + //生成核销码
  403 + makeCode (id) {
  404 + console.log(id.toString())
  405 + document.getElementById('qrcode').innerHTML = '';
  406 + this.qrcodeShow = true;
  407 +
  408 + let qrcode = new QRCode('qrcode', {
  409 + width: 200,
  410 + height: 200,
  411 + text: id.toString(), // 二维码地址
  412 + })
  413 + this.canvanqrCode()
  414 + },
  415 + //评价
  416 + evaluate (item) {
  417 + window.sessionStorage.setItem('courseInfo', JSON.stringify(item))
  418 + this.$router.push({ name: 'evaluateCourse' })
  419 + },
  420 + //核销码
  421 + toCode (item) {
  422 + this.codeData = {}
  423 + this.showCode = true
  424 + this.codeData = item
  425 + this.imgUrl = ''
  426 + setTimeout(() => {
  427 + this.makeCode(item.id)
  428 + }, 1000);
  429 + },
  430 + // 打开群码弹窗
  431 + openGroupCodePopup (index) {
  432 + this.chatGroupUrl = this.movelist[index]?.chatGroupUrl
  433 + this.showGroupCode = true;
  434 + },
  435 + //跳转
  436 + toEdit (item) {
  437 + this.$router.push({ path: 'abroad_detail', query: { courseId: item.courseId, publicName: sessionStorage.getItem('publicName') } })
  438 + },
  439 + //二维码转图片
  440 + canvanqrCode () {
  441 + html2canvas(this.$refs.imageWrapper, {
  442 + width: 200,
  443 + height: 200
  444 + }).then(canvas => {
  445 + let dataURL = canvas.toDataURL("image/png");
  446 + this.imgUrl = dataURL;
  447 + });
  448 + },
  449 + // 预览图片
  450 + previewImg (url) {
  451 + this.previewUrl = url;
  452 + this.showPreview = true
  453 + }
  454 + },
  455 + components: {
  456 + GroupCodePopup
  457 + }
  458 +}
  459 +</script>
  460 +
  461 +<style lang="scss" scoped>
  462 +.myOrders {
  463 + position: fixed;
  464 + top: 0;
  465 + left: 0;
  466 + right: 0;
  467 + bottom: 0;
  468 + overflow: auto;
  469 + background: #f6f7fa;
  470 +
  471 + // .qrcodeBox {
  472 + // position: fixed;
  473 + // top: 0;
  474 + // left: 0;
  475 + // bottom: 0;
  476 + // right: 0;
  477 + // background-color: rgba(0, 0, 0, 0.4);
  478 +
  479 + // #qrcode {
  480 + // position: absolute;
  481 + // top: 50%;
  482 + // left: 50%;
  483 + // transform: translate(-50%, -50%);
  484 + // padding: 20px;
  485 + // background: #fff;
  486 + // }
  487 + // }
  488 +
  489 + .list {
  490 + padding: 20px;
  491 + box-sizing: border-box;
  492 +
  493 + li:not(:last-child) {
  494 + border-bottom: 1px dashed #eee;
  495 + }
  496 +
  497 + li {
  498 + margin-bottom: 10px;
  499 + padding-bottom: 10px;
  500 +
  501 + .baseName {
  502 + padding-left: 50px;
  503 + font-size: 30px;
  504 + background: url("../../assets/service/hoom.png") no-repeat left top;
  505 + background-size: contain;
  506 + margin: 10px 0;
  507 + }
  508 + .career_type {
  509 + font-size: 30px;
  510 + margin: 0;
  511 + margin-top: 10px;
  512 + }
  513 + .career_create {
  514 + color: #ccc;
  515 + font-size: 30px;
  516 + margin: 0;
  517 + margin-top: 10px;
  518 + }
  519 + .course {
  520 + min-height: 60px;
  521 +
  522 + img {
  523 + object-fit: cover;
  524 + width: 200px;
  525 + float: left;
  526 + margin-right: 10px;
  527 + }
  528 +
  529 + .courseCont {
  530 + h5 {
  531 + word-break: break-all;
  532 + text-overflow: ellipsis;
  533 + display: -webkit-box;
  534 + -webkit-box-orient: vertical;
  535 + -webkit-line-clamp: 2;
  536 + overflow: hidden;
  537 + font-size: 30px;
  538 + margin: 0;
  539 + }
  540 +
  541 + p {
  542 + color: #ccc;
  543 + font-size: 30px;
  544 + margin: 0;
  545 + margin-top: 10px;
  546 + }
  547 + }
  548 + }
  549 +
  550 + .orderCont {
  551 + padding: 40px 0;
  552 + font-size: 28px;
  553 +
  554 + span {
  555 + color: red;
  556 + }
  557 +
  558 + .pj {
  559 + float: right;
  560 + }
  561 + }
  562 +
  563 + .codeBtn {
  564 + text-align: right;
  565 + margin-top: 15px;
  566 + }
  567 + }
  568 + }
  569 + //待审核
  570 + .showBox {
  571 + width: 702px;
  572 + background: #fff;
  573 + border-radius: 16px;
  574 + margin: 30px auto;
  575 + padding: 34px 24px;
  576 + box-sizing: border-box;
  577 +
  578 + .top {
  579 + display: flex;
  580 +
  581 + .pic {
  582 + width: 124px;
  583 + height: 124px;
  584 + flex-shrink: 0;
  585 + }
  586 + .basefont {
  587 + padding: 0 20px;
  588 + box-sizing: border-box;
  589 + .titlefont {
  590 + color: #333333;
  591 + font-size: 28px;
  592 + margin-bottom: 18px;
  593 + }
  594 + .tcfont {
  595 + color: #535353;
  596 + font-size: 24px;
  597 + }
  598 + }
  599 + .priceRight {
  600 + width: 110px;
  601 + font-size: 28px;
  602 + color: #f64c37;
  603 + line-height: 200px;
  604 + }
  605 + }
  606 + .groupTime {
  607 + font-size: 28px;
  608 + line-height: 60px;
  609 + height: 60px;
  610 + margin-bottom: 20px;
  611 + // background-color: #f5f6fa;
  612 + padding-left: 10px;
  613 + box-sizing: border-box;
  614 +
  615 + .grey {
  616 + color: #999999;
  617 + }
  618 + }
  619 + .btnBox {
  620 + display: flex;
  621 + justify-content: space-between;
  622 + align-items: center;
  623 + .wechat_code {
  624 + display: flex;
  625 + align-items: center;
  626 + height: 54px;
  627 + padding: 0 16px;
  628 + background: #00c800;
  629 + border-radius: 8px;
  630 + font-size: 28px;
  631 + color: #fff;
  632 + img {
  633 + width: 40px;
  634 + margin-right: 14px;
  635 + }
  636 + }
  637 + }
  638 + .detailsBox {
  639 + color: #999999;
  640 + font-size: 28px;
  641 + margin-top: 60px;
  642 +
  643 + .detailsBoxOne {
  644 + margin-top: 20px;
  645 + display: flex;
  646 + justify-content: space-between;
  647 + }
  648 + }
  649 + }
  650 + //待评价
  651 + .showBoxDPJ {
  652 + width: 702px;
  653 + // height: 330px;
  654 + margin: 30px auto;
  655 + padding: 34px 24px;
  656 + box-sizing: border-box;
  657 + background: #fff;
  658 + border-radius: 16px;
  659 + .topLine {
  660 + height: 60px;
  661 + display: flex;
  662 + justify-content: space-between;
  663 + .topLineL {
  664 + font-size: 23px;
  665 + color: #999999;
  666 + }
  667 + .topLineR {
  668 + font-size: 23px;
  669 + }
  670 + }
  671 + .top {
  672 + display: flex;
  673 +
  674 + .pic {
  675 + width: 124px;
  676 + height: 124px;
  677 + flex-shrink: 0;
  678 + }
  679 + .basefont {
  680 + padding: 0 20px;
  681 + box-sizing: border-box;
  682 + .titlefont {
  683 + margin-bottom: 18px;
  684 + color: #333333;
  685 + font-weight: bold;
  686 + font-size: 28px;
  687 + }
  688 + .tcfont {
  689 + color: #535353;
  690 + font-size: 24px;
  691 + }
  692 + }
  693 + .priceRight {
  694 + width: 110px;
  695 + font-size: 28px;
  696 + color: #f64c37;
  697 + line-height: 200px;
  698 + }
  699 + }
  700 + .detailsBox {
  701 + color: #999999;
  702 + font-size: 28px;
  703 +
  704 + .detailsBoxOne {
  705 + margin-top: 20px;
  706 + display: flex;
  707 + justify-content: space-between;
  708 + }
  709 + }
  710 + }
  711 + // 已评价
  712 + .showBoxYPJ {
  713 + .boxdf {
  714 + padding: 10px 0;
  715 + font-size: 5vw;
  716 + display: flex;
  717 + .title {
  718 + font-size: 28px;
  719 + margin-right: 10px;
  720 + }
  721 + .rate {
  722 + color: #ffcc00;
  723 + font-size: 30px;
  724 + margin-left: 10px;
  725 + }
  726 + }
  727 + .evaluation {
  728 + font-size: 30px;
  729 + span {
  730 + font-weight: bold;
  731 + }
  732 + }
  733 + .evaluation_img_box {
  734 + margin-top: 22px;
  735 + .evaluation_img {
  736 + width: 212px;
  737 + height: 212px;
  738 + margin-right: 9px;
  739 + margin-bottom: 9px;
  740 + &:nth-of-type(3n) {
  741 + margin-right: 0;
  742 + }
  743 + }
  744 + }
  745 + .evaluation_time {
  746 + margin-top: 18px;
  747 + text-align: right;
  748 + color: #999999;
  749 + font-size: 28px;
  750 + }
  751 + }
  752 +
  753 + .pintuan_about {
  754 + width: 592px;
  755 + box-sizing: border-box;
  756 + padding: 0 50px;
  757 + .about_img {
  758 + width: 112px;
  759 + margin: 0 auto;
  760 + margin-top: 30px;
  761 + display: block;
  762 + }
  763 + .about_title {
  764 + font-size: 34px;
  765 + font-weight: bold;
  766 + text-align: center;
  767 + }
  768 + .about_content {
  769 + font-size: 30px;
  770 + margin-top: 20px;
  771 + }
  772 + .about_know {
  773 + font-size: 32px;
  774 + text-align: center;
  775 + color: #3385ff;
  776 + margin-top: 60px;
  777 + margin-bottom: 44px;
  778 + }
  779 + }
  780 +}
  781 +.codeCss {
  782 + width: 700px;
  783 + height: 850px;
  784 + position: relative;
  785 +
  786 + .showBox {
  787 + width: 702px;
  788 + // height: 500px;
  789 + // background-color: aquamarine;
  790 + margin: 30px auto;
  791 + padding: 34px 24px;
  792 + box-sizing: border-box;
  793 +
  794 + .top {
  795 + display: flex;
  796 +
  797 + .pic {
  798 + width: 124px;
  799 + height: 124px;
  800 + flex-shrink: 0;
  801 + }
  802 + .basefont {
  803 + padding: 0 20px;
  804 + box-sizing: border-box;
  805 + .titlefont {
  806 + color: #333333;
  807 + font-size: 28px;
  808 + margin-bottom: 18px;
  809 + }
  810 + .tcfont {
  811 + color: #535353;
  812 + font-size: 24px;
  813 + }
  814 + }
  815 + .priceRight {
  816 + width: 110px;
  817 + font-size: 28px;
  818 + color: #f64c37;
  819 + line-height: 200px;
  820 + }
  821 + }
  822 + .groupTime {
  823 + font-size: 28px;
  824 + line-height: 60px;
  825 + height: 60px;
  826 + margin-bottom: 20px;
  827 + background-color: #f5f6fa;
  828 + padding-left: 10px;
  829 + box-sizing: border-box;
  830 +
  831 + .grey {
  832 + color: #999999;
  833 + }
  834 + }
  835 + .qrcodeBox {
  836 + width: 100%;
  837 + height: 430px;
  838 +
  839 + #qrcode {
  840 + transform: translate(25%, 10%);
  841 + // margin: auto;
  842 + }
  843 + .imgBox {
  844 + width: 370px;
  845 + height: 370px;
  846 + margin: 30px auto 0;
  847 + // transform: translate(25%, 10%);
  848 + }
  849 + }
  850 + .numShow {
  851 + width: 100%;
  852 + font-size: 28px;
  853 + text-align: center;
  854 + color: #999999;
  855 + }
  856 + .fontBottom {
  857 + width: 100%;
  858 + font-weight: bold;
  859 + font-size: 28px;
  860 + text-align: center;
  861 + }
  862 + }
  863 +}
  864 +.preview_img {
  865 + width: 100vw;
  866 +}
  867 +</style>
src/views/Service/component/chooseSchool.vue 0 → 100644
@@ -0,0 +1,112 @@ @@ -0,0 +1,112 @@
  1 +/*选择学校*/
  2 +<template>
  3 + <div id="schoolBox">
  4 + <div class="search">
  5 + <form action="/">
  6 + <van-search v-model="searchSchool" show-action placeholder="请输入搜索关键词" @input="onSearch" @cancel="onCancel" />
  7 + </form>
  8 + </div>
  9 + <div class="listCardBox">
  10 + <div v-for="(val,i) in schoolList" :key="i" class="listCard">
  11 + <div @click="schoolClick(val)">{{val.text}}</div>
  12 + </div>
  13 + </div>
  14 + </div>
  15 +</template>
  16 +
  17 +<script>
  18 +export default {
  19 + data () {
  20 + return {
  21 + searchSchool: '',
  22 + schoolList: []
  23 + }
  24 + },
  25 + methods: {
  26 + onSearch (val) {
  27 + console.log(val)
  28 + this.GetHighSchoolList()
  29 + },
  30 + onCancel () {
  31 + // this.$toast('取消');
  32 + this.searchSchool = ''
  33 + this.schoolList = []
  34 + this.$emit('input', false)
  35 + },
  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)
  67 + }
  68 + },
  69 + onFail: err => {
  70 + console.log('err', err)
  71 + }
  72 + });
  73 + },
  74 + //点击学校
  75 + schoolClick (val) {
  76 + console.log(val)
  77 + this.$emit('schoolData', val)
  78 + this.onCancel()
  79 + }
  80 + },
  81 + mounted () {
  82 + // this.GetHighSchoolList()
  83 + }
  84 +}
  85 +</script>
  86 +
  87 +<style lang="scss" scoped>
  88 +#schoolBox {
  89 + width: 100vw;
  90 + height: 100vh;
  91 + // top: 0;
  92 + // left: 0;
  93 + background-color: #fff;
  94 +
  95 + .search {
  96 + padding: 40px 30px;
  97 + box-sizing: border-box;
  98 + }
  99 + .listCardBox {
  100 + height: 1050px;
  101 + overflow: auto;
  102 +
  103 + .listCard {
  104 + width: 700px;
  105 + height: 70px;
  106 + color: black;
  107 + font-size: 29px;
  108 + margin-left: 30px;
  109 + }
  110 + }
  111 +}
  112 +</style>
0 \ No newline at end of file 113 \ No newline at end of file
src/views/Service/evaluateBase.vue 0 → 100644
@@ -0,0 +1,297 @@ @@ -0,0 +1,297 @@
  1 +<template>
  2 + <div class="releaseEvaluate">
  3 + <div class="box top">
  4 + <div class="pic">
  5 + <img :src="baseInfo.baseUrl ? baseInfo.baseUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  6 + </div>
  7 + <div class="basefont">
  8 + <div class="titlefont">{{baseInfo.baseName}}</div>
  9 + <div class="tcfont">{{baseInfo.address}}</div>
  10 + <div class="tcfont">{{baseInfo.phone}}</div>
  11 + </div>
  12 + </div>
  13 + <div class="box">
  14 + <div class="boxdf">
  15 + <div class="title">基地评分</div>
  16 + <div class="fr">
  17 + <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
  18 + <span class="rate">{{starsBaseNum}}.0</span>
  19 + </div>
  20 + </div>
  21 + <div class="cont">
  22 + <div class="item">
  23 + <van-field v-model="content" type="textarea" label="" placeholder="对基地的评价及建议" />
  24 + </div>
  25 + </div>
  26 + <div class="imgs">
  27 + <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">
  28 + <div class="selectImg">
  29 + <imgCut @callback="callback" :width="750" :height="750">
  30 + <van-icon name="cross" />
  31 + </imgCut>
  32 + </div>
  33 + <!-- <van-uploader v-model="fileList" multiple /> -->
  34 + </div>
  35 + </div>
  36 + <div class="btns" :class="content==''||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>
  37 + </div>
  38 +</template>
  39 +
  40 +<script>
  41 +import { imgCut } from 'vue-imgcut'
  42 +export default {
  43 + data () {
  44 + return {
  45 + baseId: '',
  46 + signId: '',
  47 + baseInfo: '',
  48 + starsBaseNum: 0,
  49 + userInfo: '',
  50 + studentInfo: '',
  51 + courseInfo: '',
  52 + content: '',
  53 + imgsrc: [],
  54 + fileList: [
  55 + { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
  56 + // Uploader 根据文件后缀来判断是否为图片文件
  57 + // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
  58 + { url: 'https://cloud-image', isImage: true },
  59 + ],
  60 + }
  61 + },
  62 + components: {
  63 + imgCut
  64 + },
  65 + mounted () {
  66 + var userInfo = window.sessionStorage.getItem('userInfo');
  67 + if (userInfo) {
  68 + this.userInfo = JSON.parse(userInfo);
  69 + }
  70 + let studentInfo = sessionStorage.getItem('StudentDetialInfo')
  71 + this.studentInfo = JSON.parse(studentInfo)
  72 + this.baseId = this.$route.query.baseId
  73 + this.signId = this.$route.query.signId
  74 + this.GetStudyBaseDetail()
  75 + },
  76 + methods: {
  77 + AddEvaluation () {
  78 + if (this.content == '') {
  79 + this.$toast('请输入评价内容')
  80 + return;
  81 + }
  82 + if (this.starsBaseNum == 0) {
  83 + this.$toast('请完成基地评分')
  84 + return;
  85 + }
  86 + this.$toast.loading({
  87 + message: '请求中...',
  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)
  117 + }
  118 + });
  119 + },
  120 + // 获取基地信息
  121 + GetStudyBaseDetail () {
  122 + this.$toast.loading({
  123 + message: '请求中...',
  124 + });
  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)
  151 + }
  152 + });
  153 + },
  154 + callback (img) {
  155 + this.imgsrc.push({
  156 + imgUrl: img
  157 + });
  158 + }
  159 + }
  160 +}
  161 +</script>
  162 +
  163 +<style lang="scss" scoped>
  164 +.releaseEvaluate {
  165 + padding: 20px;
  166 + box-sizing: border-box;
  167 + background: #f6f7fa;
  168 + box-sizing: border-box;
  169 + min-height: 100vh;
  170 + .box {
  171 + width: 702px;
  172 + background: #fff;
  173 + border-radius: 16px;
  174 + margin: 0 auto;
  175 + padding: 16px;
  176 + box-sizing: border-box;
  177 + margin-bottom: 16px;
  178 + }
  179 + .top {
  180 + display: flex;
  181 +
  182 + .pic {
  183 + width: 124px;
  184 + height: 124px;
  185 + flex-shrink: 0;
  186 + }
  187 + .basefont {
  188 + padding: 0 20px;
  189 + box-sizing: border-box;
  190 + .titlefont {
  191 + color: #333333;
  192 + font-size: 28px;
  193 + margin-bottom: 18px;
  194 + }
  195 + .tcfont {
  196 + color: #535353;
  197 + font-size: 24px;
  198 + }
  199 + }
  200 + .priceRight {
  201 + width: 110px;
  202 + font-size: 28px;
  203 + color: #f64c37;
  204 + line-height: 200px;
  205 + }
  206 + }
  207 + .btns {
  208 + width: 702px;
  209 + height: 92px;
  210 + line-height: 92px;
  211 + border-radius: 16px;
  212 + margin: 0 auto;
  213 + margin-top: 20px;
  214 + background: #4092ff;
  215 + color: #fff;
  216 + font-size: 30px;
  217 + text-align: center;
  218 + box-shadow: 0 0 30px #7ab1f8;
  219 + &.disabled {
  220 + opacity: 0.4;
  221 + }
  222 + }
  223 + .cont {
  224 + .van-cell {
  225 + background: #f5f6fa;
  226 + }
  227 + input {
  228 + border: none;
  229 + width: 100%;
  230 + height: 38px;
  231 + line-height: 38px;
  232 + font-size: 1.4rem;
  233 + }
  234 + p {
  235 + font-size: 1.2rem;
  236 + text-align: right;
  237 + color: #909090;
  238 + span {
  239 + color: #09ce6c;
  240 + }
  241 + }
  242 + }
  243 + .imgs {
  244 + background: #f5f6fa;
  245 + padding: 20px;
  246 + // img:first-child::after{
  247 + // content: '封面图片';
  248 + // position:absolute;
  249 + // bottom: 0;
  250 + // left: 0;
  251 + // right: 0;
  252 + // background-color: rgba(0,0,0,.5);
  253 + // color: white;
  254 + // font-size: 1.2rem;
  255 + // padding: 3px;
  256 + // z-index: 1000;
  257 + // }
  258 + img {
  259 + position: relative;
  260 + display: inline-block;
  261 + vertical-align: top;
  262 + width: 142px;
  263 + height: 142px;
  264 + border-radius: 5px;
  265 + margin-right: 10px;
  266 + margin-top: 10px;
  267 + }
  268 + .selectImg {
  269 + display: inline-block;
  270 + vertical-align: top;
  271 + width: 142px;
  272 + height: 142px;
  273 + text-align: center;
  274 + line-height: 50px;
  275 + border-radius: 5px;
  276 + border: 1px solid rgb(8, 23, 88);
  277 + font-size: 2rem;
  278 + color: #eee;
  279 + margin-top: 10px;
  280 + }
  281 + }
  282 + .boxdf {
  283 + padding: 10px 0;
  284 + font-size: 5vw;
  285 + display: flex;
  286 + .title {
  287 + font-size: 28px;
  288 + margin-right: 10px;
  289 + }
  290 + .rate {
  291 + color: #ffcc00;
  292 + font-size: 30px;
  293 + margin-left: 10px;
  294 + }
  295 + }
  296 +}
  297 +</style>
src/views/Service/evaluateCourse.vue 0 → 100644
@@ -0,0 +1,274 @@ @@ -0,0 +1,274 @@
  1 +<template>
  2 + <div class="releaseEvaluate">
  3 + <div class="box top">
  4 + <div class="pic">
  5 + <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  6 + </div>
  7 + <div class="basefont">
  8 + <div class="titlefont">{{courseInfo.baseName}}</div>
  9 + <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>
  10 + <div class="tcfont">数量*{{courseInfo.orderCount}}</div>
  11 + </div>
  12 + </div>
  13 + <div class="box">
  14 + <div class="boxdf">
  15 + <div class="title">课程评分</div>
  16 + <div class="fr">
  17 + <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
  18 + <span class="rate">{{starsCourseNum}}.0</span>
  19 + </div>
  20 + </div>
  21 + <div class="boxdf">
  22 + <div class="title">基地评分</div>
  23 + <div class="fr">
  24 + <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
  25 + <span class="rate">{{starsBaseNum}}.0</span>
  26 + </div>
  27 + </div>
  28 + <div class="cont">
  29 + <div class="item">
  30 + <van-field v-model="content" type="textarea" label="" placeholder="关于活动、课程、研学的感想或评论" />
  31 + </div>
  32 + </div>
  33 + <div class="imgs">
  34 + <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">
  35 + <div class="selectImg">
  36 + <imgCut @callback="callback" :width="750" :height="750">
  37 + <van-icon name="cross" />
  38 + </imgCut>
  39 + </div>
  40 + <!-- <van-uploader v-model="fileList" multiple /> -->
  41 + </div>
  42 + </div>
  43 + <div class="btns" :class="content==''||starsCourseNum==0||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>
  44 + </div>
  45 +</template>
  46 +
  47 +<script>
  48 +import { imgCut } from 'vue-imgcut'
  49 +export default {
  50 + data () {
  51 + return {
  52 + starsBaseNum: 0,
  53 + starsCourseNum: 0,
  54 + userInfo: '',
  55 + courseInfo: '',
  56 + content: '',
  57 + imgsrc: [],
  58 + fileList: [
  59 + { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
  60 + // Uploader 根据文件后缀来判断是否为图片文件
  61 + // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
  62 + { url: 'https://cloud-image', isImage: true },
  63 + ],
  64 + }
  65 + },
  66 + components: {
  67 + imgCut
  68 + },
  69 + mounted () {
  70 + var userInfo = window.sessionStorage.getItem('userInfo');
  71 + if (userInfo) {
  72 + this.userInfo = JSON.parse(userInfo);
  73 + }
  74 + var courseInfo = window.sessionStorage.getItem('courseInfo');
  75 + if (courseInfo) {
  76 + this.courseInfo = JSON.parse(courseInfo);
  77 + }
  78 + },
  79 + methods: {
  80 + AddEvaluation () {
  81 + if (this.content == '') {
  82 + this.$toast('请输入评价内容')
  83 + return;
  84 + }
  85 + if (this.starsCourseNum == 0) {
  86 + this.$toast('请完成课程评分')
  87 + return;
  88 + }
  89 + if (this.starsBaseNum == 0) {
  90 + this.$toast('请完成基地评分')
  91 + return;
  92 + }
  93 + this.$toast.loading({
  94 + 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();
  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)
  128 + }
  129 + });
  130 + },
  131 + callback (img) {
  132 + this.imgsrc.push({
  133 + imgUrl: img
  134 + });
  135 + }
  136 + }
  137 +}
  138 +</script>
  139 +
  140 +<style lang="scss" scoped>
  141 +.releaseEvaluate {
  142 + padding: 20px;
  143 + box-sizing: border-box;
  144 + background: #f6f7fa;
  145 + box-sizing: border-box;
  146 + min-height: 100vh;
  147 + .box {
  148 + width: 702px;
  149 + background: #fff;
  150 + border-radius: 16px;
  151 + margin: 0 auto;
  152 + padding: 16px;
  153 + box-sizing: border-box;
  154 + margin-bottom: 16px;
  155 + }
  156 + .top {
  157 + display: flex;
  158 +
  159 + .pic {
  160 + width: 124px;
  161 + height: 124px;
  162 + flex-shrink: 0;
  163 + }
  164 + .basefont {
  165 + padding: 0 20px;
  166 + box-sizing: border-box;
  167 + .titlefont {
  168 + color: #333333;
  169 + font-size: 28px;
  170 + margin-bottom: 18px;
  171 + }
  172 + .tcfont {
  173 + color: #535353;
  174 + font-size: 24px;
  175 + }
  176 + }
  177 + .priceRight {
  178 + width: 110px;
  179 + font-size: 28px;
  180 + color: #f64c37;
  181 + line-height: 200px;
  182 + }
  183 + }
  184 + .btns {
  185 + width: 702px;
  186 + height: 92px;
  187 + line-height: 92px;
  188 + border-radius: 16px;
  189 + margin: 0 auto;
  190 + margin-top: 20px;
  191 + background: #4092ff;
  192 + color: #fff;
  193 + font-size: 30px;
  194 + text-align: center;
  195 + box-shadow: 0 0 30px #7ab1f8;
  196 + &.disabled {
  197 + opacity: 0.4;
  198 + }
  199 + }
  200 + .cont {
  201 + .van-cell {
  202 + background: #f5f6fa;
  203 + }
  204 + input {
  205 + border: none;
  206 + width: 100%;
  207 + height: 38px;
  208 + line-height: 38px;
  209 + font-size: 1.4rem;
  210 + }
  211 + p {
  212 + font-size: 1.2rem;
  213 + text-align: right;
  214 + color: #909090;
  215 + span {
  216 + color: #09ce6c;
  217 + }
  218 + }
  219 + }
  220 + .imgs {
  221 + background: #f5f6fa;
  222 + padding: 20px;
  223 + // img:first-child::after{
  224 + // content: '封面图片';
  225 + // position:absolute;
  226 + // bottom: 0;
  227 + // left: 0;
  228 + // right: 0;
  229 + // background-color: rgba(0,0,0,.5);
  230 + // color: white;
  231 + // font-size: 1.2rem;
  232 + // padding: 3px;
  233 + // z-index: 1000;
  234 + // }
  235 + img {
  236 + position: relative;
  237 + display: inline-block;
  238 + vertical-align: top;
  239 + width: 142px;
  240 + height: 142px;
  241 + border-radius: 5px;
  242 + margin-right: 10px;
  243 + margin-top: 10px;
  244 + }
  245 + .selectImg {
  246 + display: inline-block;
  247 + vertical-align: top;
  248 + width: 142px;
  249 + height: 142px;
  250 + text-align: center;
  251 + line-height: 50px;
  252 + border-radius: 5px;
  253 + border: 1px solid rgb(8, 23, 88);
  254 + font-size: 2rem;
  255 + color: #eee;
  256 + margin-top: 10px;
  257 + }
  258 + }
  259 + .boxdf {
  260 + padding: 10px 0;
  261 + font-size: 5vw;
  262 + display: flex;
  263 + .title {
  264 + font-size: 28px;
  265 + margin-right: 10px;
  266 + }
  267 + .rate {
  268 + color: #ffcc00;
  269 + font-size: 30px;
  270 + margin-left: 10px;
  271 + }
  272 + }
  273 +}
  274 +</style>
src/views/Service/evaluateDetail.vue 0 → 100644
@@ -0,0 +1,303 @@ @@ -0,0 +1,303 @@
  1 +<template>
  2 + <div class="releaseEvaluate">
  3 + <div class="box top" v-if="baseId">
  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%">
  6 + </div>
  7 + <div class="basefont">
  8 + <div class="titlefont">{{baseInfo.baseName}}</div>
  9 + <div class="tcfont">{{baseInfo.address}}</div>
  10 + <div class="tcfont">{{baseInfo.phone}}</div>
  11 + </div>
  12 + </div>
  13 + <div class="box top" v-else>
  14 + <div class="pic">
  15 + <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  16 + </div>
  17 + <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>
  21 + </div>
  22 + </div>
  23 + <div class="box">
  24 + <div class="boxdf" v-if="!baseId">
  25 + <div class="title">课程评分</div>
  26 + <div class="fr">
  27 + <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>
  29 + </div>
  30 + </div>
  31 + <div class="boxdf">
  32 + <div class="title">基地评分</div>
  33 + <div class="fr">
  34 + <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>
  36 + </div>
  37 + </div>
  38 + <p class="evaluation"><span>评价:</span>{{evaluationData.evaluation}}</p>
  39 + <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)">
  41 + </div>
  42 + <p class="evaluation_time">评价于 {{evaluationData.intime}}</p>
  43 + </div>
  44 + </div>
  45 +</template>
  46 +
  47 +<script>
  48 +import { imgCut } from 'vue-imgcut'
  49 +export default {
  50 + data () {
  51 + return {
  52 + baseId: '',//有基地id时为基地评价
  53 + baseInfo: '',
  54 + evaluationId: '',
  55 + evaluationData: '',
  56 + starsBaseNum: 0,
  57 + starsCourseNum: 0,
  58 + userInfo: '',
  59 + courseInfo: '',
  60 + content: '',
  61 + imgsrc: [],
  62 + fileList: [
  63 + { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
  64 + // Uploader 根据文件后缀来判断是否为图片文件
  65 + // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
  66 + { url: 'https://cloud-image', isImage: true },
  67 + ],
  68 + }
  69 + },
  70 + components: {
  71 + imgCut
  72 + },
  73 + mounted () {
  74 + this.evaluationId = this.$route.query.evaluationId
  75 + let baseId = this.$route.query.baseId
  76 + // 当前为基地评价
  77 + if (baseId) {
  78 + this.baseId = baseId
  79 + this.GetStudyBaseDetail()
  80 + }
  81 + this.getEvaluationDetail()
  82 +
  83 + var courseInfo = window.sessionStorage.getItem('courseInfo');
  84 + if (courseInfo) {
  85 + this.courseInfo = JSON.parse(courseInfo);
  86 + }
  87 + },
  88 + methods: {
  89 + getEvaluationDetail () {
  90 + this.$toast.loading({
  91 + message: '加载中...',
  92 + duration: 0,
  93 + forbidClick: true
  94 + })
  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 + if (res.data.status == 1) {
  111 + let evaluationData = res.data.data
  112 + evaluationData.intime = this.Moment(new Date(evaluationData.intime)).format('YYYY-MM-DD')
  113 + this.evaluationData = evaluationData
  114 + } else {
  115 + this.$toast.fail(res.data.message)
  116 + }
  117 + },
  118 + onFail: err => {
  119 + console.log('err', err)
  120 + }
  121 + });
  122 + },
  123 + // 获取基地信息
  124 + GetStudyBaseDetail () {
  125 + this.$toast.loading({
  126 + 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 => {
  143 + 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)
  154 + }
  155 + });
  156 + },
  157 + }
  158 +}
  159 +</script>
  160 +
  161 +<style lang="scss" scoped>
  162 +.releaseEvaluate {
  163 + padding: 20px;
  164 + box-sizing: border-box;
  165 + background: #f6f7fa;
  166 + box-sizing: border-box;
  167 + min-height: 100vh;
  168 + .box {
  169 + width: 702px;
  170 + background: #fff;
  171 + border-radius: 16px;
  172 + margin: 0 auto;
  173 + padding: 16px;
  174 + box-sizing: border-box;
  175 + margin-bottom: 16px;
  176 + }
  177 + .top {
  178 + display: flex;
  179 +
  180 + .pic {
  181 + width: 124px;
  182 + height: 124px;
  183 + flex-shrink: 0;
  184 + }
  185 + .basefont {
  186 + padding: 0 20px;
  187 + box-sizing: border-box;
  188 + .titlefont {
  189 + color: #333333;
  190 + font-size: 28px;
  191 + margin-bottom: 18px;
  192 + }
  193 + .tcfont {
  194 + color: #535353;
  195 + font-size: 24px;
  196 + }
  197 + }
  198 + .priceRight {
  199 + width: 110px;
  200 + font-size: 28px;
  201 + color: #f64c37;
  202 + line-height: 200px;
  203 + }
  204 + }
  205 + .cont {
  206 + .van-cell {
  207 + background: #f5f6fa;
  208 + }
  209 + input {
  210 + border: none;
  211 + width: 100%;
  212 + height: 38px;
  213 + line-height: 38px;
  214 + font-size: 1.4rem;
  215 + }
  216 + p {
  217 + font-size: 1.2rem;
  218 + text-align: right;
  219 + color: #909090;
  220 + span {
  221 + color: #09ce6c;
  222 + }
  223 + }
  224 + }
  225 + .imgs {
  226 + background: #f5f6fa;
  227 + padding: 20px;
  228 + // img:first-child::after{
  229 + // content: '封面图片';
  230 + // position:absolute;
  231 + // bottom: 0;
  232 + // left: 0;
  233 + // right: 0;
  234 + // background-color: rgba(0,0,0,.5);
  235 + // color: white;
  236 + // font-size: 1.2rem;
  237 + // padding: 3px;
  238 + // z-index: 1000;
  239 + // }
  240 + img {
  241 + position: relative;
  242 + display: inline-block;
  243 + vertical-align: top;
  244 + width: 142px;
  245 + height: 142px;
  246 + border-radius: 5px;
  247 + margin-right: 10px;
  248 + margin-top: 10px;
  249 + }
  250 + .selectImg {
  251 + display: inline-block;
  252 + vertical-align: top;
  253 + width: 142px;
  254 + height: 142px;
  255 + text-align: center;
  256 + line-height: 50px;
  257 + border-radius: 5px;
  258 + border: 1px solid rgb(8, 23, 88);
  259 + font-size: 2rem;
  260 + color: #eee;
  261 + margin-top: 10px;
  262 + }
  263 + }
  264 + .boxdf {
  265 + padding: 10px 0;
  266 + font-size: 5vw;
  267 + display: flex;
  268 + .title {
  269 + font-size: 28px;
  270 + margin-right: 10px;
  271 + }
  272 + .rate {
  273 + color: #ffcc00;
  274 + font-size: 30px;
  275 + margin-left: 10px;
  276 + }
  277 + }
  278 + .evaluation {
  279 + font-size: 30px;
  280 + span {
  281 + font-weight: bold;
  282 + }
  283 + }
  284 + .evaluation_img_box {
  285 + margin-top: 22px;
  286 + .evaluation_img {
  287 + width: 212px;
  288 + height: 212px;
  289 + margin-right: 9px;
  290 + margin-bottom: 9px;
  291 + &:nth-of-type(3n) {
  292 + margin-right: 0;
  293 + }
  294 + }
  295 + }
  296 + .evaluation_time {
  297 + margin-top: 18px;
  298 + text-align: right;
  299 + color: #999999;
  300 + font-size: 28px;
  301 + }
  302 +}
  303 +</style>
src/views/Service/evaluatePubilc.vue 0 → 100644
@@ -0,0 +1,274 @@ @@ -0,0 +1,274 @@
  1 +<template>
  2 + <div class="releaseEvaluate">
  3 + <div class="box top">
  4 + <div class="pic">
  5 + <img :src="courseInfo.coverUrl ? courseInfo.coverUrl : require('../../assets/service/defCoure.jpg')" alt="" style="width:100%;height:100%">
  6 + </div>
  7 + <div class="basefont">
  8 + <div class="titlefont">{{courseInfo.baseName}}</div>
  9 + <div class="tcfont">套餐名称:{{courseInfo.courseName}}</div>
  10 + <div class="tcfont">数量*{{courseInfo.orderCount}}</div>
  11 + </div>
  12 + </div>
  13 + <div class="box">
  14 + <div class="boxdf">
  15 + <div class="title">课程评分</div>
  16 + <div class="fr">
  17 + <van-rate v-model="starsCourseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
  18 + <span class="rate">{{starsCourseNum}}.0</span>
  19 + </div>
  20 + </div>
  21 + <div class="boxdf">
  22 + <div class="title">基地评分</div>
  23 + <div class="fr">
  24 + <van-rate v-model="starsBaseNum" void-icon="star" void-color="#eee" color="#FFCC00" :size="16" />
  25 + <span class="rate">{{starsBaseNum}}.0</span>
  26 + </div>
  27 + </div>
  28 + <div class="cont">
  29 + <div class="item">
  30 + <van-field v-model="content" type="textarea" label="" placeholder="关于活动、课程、研学的感想或评论" />
  31 + </div>
  32 + </div>
  33 + <div class="imgs">
  34 + <img :src="n.imgUrl" alt="" v-for="(n,i) in imgsrc" :key="i">
  35 + <div class="selectImg">
  36 + <imgCut @callback="callback" :width="142" :height="142">
  37 + <van-icon name="cross" />
  38 + </imgCut>
  39 + </div>
  40 + <!-- <van-uploader v-model="fileList" multiple /> -->
  41 + </div>
  42 + </div>
  43 + <div class="btns" :class="content==''||starsCourseNum==0||starsBaseNum==0?'disabled':''" @click="AddEvaluation ">发布</div>
  44 + </div>
  45 +</template>
  46 +
  47 +<script>
  48 +import yxAxios from '@/https/yxAxios'
  49 +import { imgCut } from 'vue-imgcut'
  50 +export default {
  51 + data () {
  52 + return {
  53 + starsBaseNum: 0,
  54 + starsCourseNum: 0,
  55 + userInfo: '',
  56 + courseInfo: '',
  57 + content: '',
  58 + imgsrc: [],
  59 + fileList: [
  60 + { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
  61 + // Uploader 根据文件后缀来判断是否为图片文件
  62 + // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
  63 + { url: 'https://cloud-image', isImage: true },
  64 + ],
  65 + }
  66 + },
  67 + components: {
  68 + imgCut
  69 + },
  70 + created () {
  71 + var userInfo = window.sessionStorage.getItem('userInfo');
  72 + if (userInfo) {
  73 + this.userInfo = JSON.parse(userInfo);
  74 + }
  75 + var courseInfo = window.sessionStorage.getItem('courseInfo');
  76 + if (courseInfo) {
  77 + this.courseInfo = JSON.parse(courseInfo);
  78 + }
  79 + },
  80 + methods: {
  81 + AddEvaluation () {
  82 + if (this.content == '') {
  83 + this.$toast('请输入评价内容')
  84 + return;
  85 + }
  86 + if (this.starsCourseNum == 0) {
  87 + this.$toast('请完成课程评分')
  88 + return;
  89 + }
  90 + if (this.starsBaseNum == 0) {
  91 + this.$toast('请完成基地评分')
  92 + return;
  93 + }
  94 + this.$toast.loading({
  95 + message: '请求中...',
  96 + });
  97 + this.mgop({
  98 + api: 'mgop.sz.hswsy.AddEvaluation', // 必须
  99 + host: 'https://mapi.zjzwfw.gov.cn/',
  100 + dataType: 'JSON',
  101 + type: 'POST',
  102 + appKey: 'fuxgnukl+2001895516+edccpx', // 必须
  103 + headers: {
  104 + // 'isTestUrl': '1'
  105 + },
  106 + data: {
  107 + "baseId": this.courseInfo.baseId,
  108 + "title": this.courseInfo.courseName,
  109 + "evaluation": this.content,
  110 + "courseId": this.courseInfo.courseId,
  111 + "orderId": this.courseInfo.id,
  112 + "userId": this.userInfo.centerNo,
  113 + "imgList": this.imgsrc,
  114 + "courseScore": this.starsCourseNum,
  115 + "baseScore": this.starsBaseNum
  116 + },
  117 + onSuccess: res => {
  118 + this.$toast.clear();
  119 + if (res.data.status == 1) {
  120 + this.$toast.success('发布成功');
  121 + setTimeout(() => {
  122 + this.$router.push({ name: 'ServiceOrderXST' })
  123 + }, 1000)
  124 + }
  125 + },
  126 + onFail: err => {
  127 + console.log('err', err)
  128 + }
  129 + });
  130 + },
  131 + callback (img) {
  132 + this.imgsrc.push({
  133 + imgUrl: img
  134 + });
  135 + }
  136 + }
  137 +}
  138 +</script>
  139 +
  140 +<style lang="scss" scoped>
  141 +.releaseEvaluate {
  142 + padding: 20px;
  143 + box-sizing: border-box;
  144 + background: #f6f7fa;
  145 + box-sizing: border-box;
  146 + min-height: 100vh;
  147 + .box {
  148 + width: 702px;
  149 + background: #fff;
  150 + border-radius: 16px;
  151 + margin: 0 auto;
  152 + padding: 16px;
  153 + box-sizing: border-box;
  154 + margin-bottom: 16px;
  155 + }
  156 + .top {
  157 + display: flex;
  158 +
  159 + .pic {
  160 + width: 124px;
  161 + height: 124px;
  162 + flex-shrink: 0;
  163 + }
  164 + .basefont {
  165 + padding: 0 20px;
  166 + box-sizing: border-box;
  167 + .titlefont {
  168 + color: #333333;
  169 + font-size: 28px;
  170 + margin-bottom: 18px;
  171 + }
  172 + .tcfont {
  173 + color: #535353;
  174 + font-size: 24px;
  175 + }
  176 + }
  177 + .priceRight {
  178 + width: 110px;
  179 + font-size: 28px;
  180 + color: #f64c37;
  181 + line-height: 200px;
  182 + }
  183 + }
  184 + .btns {
  185 + width: 702px;
  186 + height: 92px;
  187 + line-height: 92px;
  188 + border-radius: 16px;
  189 + margin: 0 auto;
  190 + margin-top: 20px;
  191 + background: #4092ff;
  192 + color: #fff;
  193 + font-size: 30px;
  194 + text-align: center;
  195 + box-shadow: 0 0 30px #7ab1f8;
  196 + &.disabled {
  197 + opacity: 0.4;
  198 + }
  199 + }
  200 + .cont {
  201 + .van-cell {
  202 + background: #f5f6fa;
  203 + }
  204 + input {
  205 + border: none;
  206 + width: 100%;
  207 + height: 38px;
  208 + line-height: 38px;
  209 + font-size: 1.4rem;
  210 + }
  211 + p {
  212 + font-size: 1.2rem;
  213 + text-align: right;
  214 + color: #909090;
  215 + span {
  216 + color: #09ce6c;
  217 + }
  218 + }
  219 + }
  220 + .imgs {
  221 + background: #f5f6fa;
  222 + padding: 20px;
  223 + // img:first-child::after{
  224 + // content: '封面图片';
  225 + // position:absolute;
  226 + // bottom: 0;
  227 + // left: 0;
  228 + // right: 0;
  229 + // background-color: rgba(0,0,0,.5);
  230 + // color: white;
  231 + // font-size: 1.2rem;
  232 + // padding: 3px;
  233 + // z-index: 1000;
  234 + // }
  235 + img {
  236 + position: relative;
  237 + display: inline-block;
  238 + vertical-align: top;
  239 + width: 142px;
  240 + height: 142px;
  241 + border-radius: 5px;
  242 + margin-right: 10px;
  243 + margin-top: 10px;
  244 + }
  245 + .selectImg {
  246 + display: inline-block;
  247 + vertical-align: top;
  248 + width: 142px;
  249 + height: 142px;
  250 + text-align: center;
  251 + line-height: 50px;
  252 + border-radius: 5px;
  253 + border: 1px solid rgb(8, 23, 88);
  254 + font-size: 2rem;
  255 + color: #eee;
  256 + margin-top: 10px;
  257 + }
  258 + }
  259 + .boxdf {
  260 + padding: 10px 0;
  261 + font-size: 5vw;
  262 + display: flex;
  263 + .title {
  264 + font-size: 28px;
  265 + margin-right: 10px;
  266 + }
  267 + .rate {
  268 + color: #ffcc00;
  269 + font-size: 30px;
  270 + margin-left: 10px;
  271 + }
  272 + }
  273 +}
  274 +</style>