Commit bbb9c8cd1353b2f3f582ae321704c8024f9fe892

Authored by 夏洋涛
1 parent 68ee2b6e
Exists in master

feat:浙学码未认证用户提示

src/views/Home/ZXCode.vue
1 // 浙学码页面 1 // 浙学码页面
2 <template> 2 <template>
3 <div class="zx_code"> 3 <div class="zx_code">
  4 + <p class="title">浙 学 码</p>
4 <iframe class="zx_iframe" v-if="iframeUrl" :src="iframeUrl" frameborder="0"></iframe> 5 <iframe class="zx_iframe" v-if="iframeUrl" :src="iframeUrl" frameborder="0"></iframe>
5 </div> 6 </div>
6 </template> 7 </template>
@@ -60,10 +61,15 @@ export default { @@ -60,10 +61,15 @@ export default {
60 width: 100%; 61 width: 100%;
61 height: 100%; 62 height: 100%;
62 box-sizing: border-box; 63 box-sizing: border-box;
63 - padding: 100px 50px; 64 + padding: 70px 50px;
64 } 65 }
65 .zx_iframe { 66 .zx_iframe {
66 width: 100%; 67 width: 100%;
67 height: 100%; 68 height: 100%;
68 } 69 }
  70 +.title{
  71 + font-size: 40px;
  72 + text-align: center;
  73 + margin-bottom: 50px;
  74 +}
69 </style> 75 </style>
src/views/Home/component/HomeChildList.vue
1 <template> 1 <template>
2 <div class="home_child_list home_child_list_yx"> 2 <div class="home_child_list home_child_list_yx">
3 - <div class="stu_info" v-for="(item,index) in childList" :key="index" @click="handleStudentDetail(index)"> 3 + <div class="stu_info" v-for="(item, index) in childList" :key="index" @click="handleStudentDetail(index)">
4 <div class="title"> 4 <div class="title">
5 <p>学生信息</p> 5 <p>学生信息</p>
6 - <button v-if="item.whiteFlag!=1||item.isBing!=1" @click.stop="Certification(index)">激活认证</button> 6 + <button v-if="item.whiteFlag != 1 || item.isBing != 1" @click.stop="Certification(index)">激活认证</button>
7 </div> 7 </div>
8 - <img v-if="item.whiteFlag==1&&item.isBing==1" class="img_auth" src="@/assets/home/auth.png" alt="">  
9 - <img class="code" :class="item.whiteFlag==1&&item.isBing==1?'code_auth':''" @click.stop="handleCode(index)" src="@/assets/code.png" alt=""> 8 + <img v-if="item.whiteFlag == 1 && item.isBing == 1" class="img_auth" src="@/assets/home/auth.png" alt="" />
  9 + <img
  10 + class="code"
  11 + :class="item.whiteFlag == 1 && item.isBing == 1 ? 'code_auth' : ''"
  12 + @click.stop="handleCode(index)"
  13 + src="@/assets/code.png"
  14 + alt=""
  15 + />
10 <div class="item"> 16 <div class="item">
11 - <van-icon name="manager" /><span>{{item.travelerName}}</span> 17 + <van-icon name="manager" /><span>{{ item.travelerName }}</span>
12 </div> 18 </div>
13 <div class="item"> 19 <div class="item">
14 - <van-icon name="medal" /><span>{{item.enrollYear}}</span> 20 + <van-icon name="medal" /><span>{{ item.enrollYear }}</span>
15 </div> 21 </div>
16 <div class="item"> 22 <div class="item">
17 - <van-icon name="wap-home" /><span>{{item.schoolName}}</span> 23 + <van-icon name="wap-home" /><span>{{ item.schoolName }}</span>
18 </div> 24 </div>
19 </div> 25 </div>
20 <div class="add_btn" @click="addStudent"> 26 <div class="add_btn" @click="addStudent">
21 <van-icon name="add" /> 27 <van-icon name="add" />
22 添加学生信息 28 添加学生信息
23 </div> 29 </div>
24 - <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> 30 + <van-popup style="background: transparent" get-container="body" v-model="showAddChildPopupGroup">
25 <AddChildPopupGroup @complete="complete" :step="step" :travelerNum="travelerNum"></AddChildPopupGroup> 31 <AddChildPopupGroup @complete="complete" :step="step" :travelerNum="travelerNum"></AddChildPopupGroup>
26 </van-popup> 32 </van-popup>
27 </div> 33 </div>
@@ -33,47 +39,51 @@ export default { @@ -33,47 +39,51 @@ export default {
33 props: { 39 props: {
34 parent: { 40 parent: {
35 type: String, 41 type: String,
36 - default: ''  
37 - } 42 + default: '',
  43 + },
38 }, 44 },
39 - data () { 45 + data() {
40 return { 46 return {
41 - showAddChildPopupGroup: false,//新增孩子弹出框  
42 - childList: [],//孩子列表 47 + showAddChildPopupGroup: false, //新增孩子弹出框
  48 + childList: [], //孩子列表
43 step: 1, 49 step: 1,
44 - travelerNum: '' 50 + travelerNum: '',
45 } 51 }
46 }, 52 },
47 - mounted () { 53 + mounted() {
48 this.getChildList() 54 this.getChildList()
49 }, 55 },
50 methods: { 56 methods: {
51 // 激活认证 57 // 激活认证
52 - Certification (index) { 58 + Certification(index) {
53 this.step = 2 59 this.step = 2
54 this.travelerNum = this.childList[index].travelerNum 60 this.travelerNum = this.childList[index].travelerNum
55 this.showAddChildPopupGroup = true 61 this.showAddChildPopupGroup = true
56 }, 62 },
57 // 点击浙学码 63 // 点击浙学码
58 - handleCode (index) {  
59 - 64 + handleCode(index) {
  65 + if (this.childList[index].whiteFlag != 1 || this.childList[index].isBing != 1) {
  66 + this.$toast('请先激活认证')
  67 + return
  68 + }
  69 +
60 localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index])) 70 localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index]))
61 - 71 +
62 this.$router.push({ name: 'ZXCode' }) 72 this.$router.push({ name: 'ZXCode' })
63 }, 73 },
64 // 进入学生详情页 74 // 进入学生详情页
65 - handleStudentDetail (index) { 75 + handleStudentDetail(index) {
66 localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index])) 76 localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index]))
67 this.$router.push({ name: 'GrowUpRecord' }) 77 this.$router.push({ name: 'GrowUpRecord' })
68 }, 78 },
69 // 获取孩子列表 79 // 获取孩子列表
70 - getChildList () { 80 + getChildList() {
71 this.$toast.loading({ 81 this.$toast.loading({
72 message: '加载中...', 82 message: '加载中...',
73 duration: 0, 83 duration: 0,
74 - forbidClick: true 84 + forbidClick: true,
75 }) 85 })
76 - let userInfo = localStorage.getItem('userInfo'); 86 + let userInfo = localStorage.getItem('userInfo')
77 userInfo = JSON.parse(userInfo) 87 userInfo = JSON.parse(userInfo)
78 this.yxAxios.get(`${this.baseUrl}/prod/user/info/getPortalUserByNum?userNum=${userInfo?.centerNo}`).then((res) => { 88 this.yxAxios.get(`${this.baseUrl}/prod/user/info/getPortalUserByNum?userNum=${userInfo?.centerNo}`).then((res) => {
79 this.$toast.clear() 89 this.$toast.clear()
@@ -94,20 +104,18 @@ export default { @@ -94,20 +104,18 @@ export default {
94 } 104 }
95 }) 105 })
96 }, 106 },
97 - addStudent () { 107 + addStudent() {
98 this.step = 1 108 this.step = 1
99 this.showAddChildPopupGroup = true 109 this.showAddChildPopupGroup = true
100 }, 110 },
101 - complete () {  
102 - this.showAddChildPopupGroup = false; 111 + complete() {
  112 + this.showAddChildPopupGroup = false
103 this.getChildList() 113 this.getChildList()
104 }, 114 },
105 -  
106 }, 115 },
107 components: { 116 components: {
108 - AddChildPopupGroup  
109 - }  
110 - 117 + AddChildPopupGroup,
  118 + },
111 } 119 }
112 </script> 120 </script>
113 <style lang="scss"> 121 <style lang="scss">
@@ -161,13 +169,13 @@ p { @@ -161,13 +169,13 @@ p {
161 right: 0; 169 right: 0;
162 width: 196px; 170 width: 196px;
163 } 171 }
164 - .code{ 172 + .code {
165 position: absolute; 173 position: absolute;
166 bottom: 50px; 174 bottom: 50px;
167 right: 45px; 175 right: 45px;
168 width: 72px; 176 width: 72px;
169 } 177 }
170 - .code_auth{ 178 + .code_auth {
171 right: 240px; 179 right: 240px;
172 } 180 }
173 .item { 181 .item {
@@ -222,11 +230,7 @@ p { @@ -222,11 +230,7 @@ p {
222 box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11); 230 box-shadow: 0px 4px 8px 0px rgba(254, 151, 117, 0.11);
223 } 231 }
224 &:nth-of-type(2n-1) { 232 &:nth-of-type(2n-1) {
225 - background: linear-gradient(  
226 - 41deg,  
227 - rgb(56, 223, 162) 0%,  
228 - rgb(132, 236, 205) 100%  
229 - ); 233 + background: linear-gradient(41deg, rgb(56, 223, 162) 0%, rgb(132, 236, 205) 100%);
230 box-shadow: 0px 4px 8px 0px rgba(37, 255, 128, 0.34); 234 box-shadow: 0px 4px 8px 0px rgba(37, 255, 128, 0.34);
231 } 235 }
232 } 236 }
@@ -235,4 +239,4 @@ p { @@ -235,4 +239,4 @@ p {
235 color: rgb(56, 223, 162); 239 color: rgb(56, 223, 162);
236 } 240 }
237 } 241 }
238 -</style>  
239 \ No newline at end of file 242 \ No newline at end of file
  243 +</style>