Commit bbb9c8cd1353b2f3f582ae321704c8024f9fe892

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

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

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