Commit 68ee2b6ebb3be8cabe4f57d24186ad8228f33903

Authored by 夏洋涛
1 parent 1723ce0b
Exists in master

feat:浙学码对接完成

Showing 1 changed file with 5 additions and 11 deletions   Show diff stats
src/views/Home/ZXCode.vue
... ... @@ -37,7 +37,7 @@ export default {
37 37 } else {
38 38 StudentDetialInfo = JSON.parse(StudentDetialInfo)
39 39 this.StudentDetialInfo = StudentDetialInfo
40   - let appId = ''
  40 + let appId = '133199'
41 41 if (StudentDetialInfo.cubeUserId) {
42 42 this.iframeUrl = `https://zcode-images.zjedu.com:9060/QRCode/index.html?appId=${appId}&areaCode=330600&simple=true&cubeUserId=${StudentDetialInfo.cubeUserId}`
43 43 } else {
... ... @@ -47,16 +47,10 @@ export default {
47 47 },
48 48 // 绑定浙学码
49 49 bindLearnCode(cubeUserId) {
50   - this.yxAxios
51   - .get(`${this.proxyUrl}/user/info/bindLearnCode?travelerId=${this.StudentDetialInfo.id}&cubeUserld=${cubeUserId}`)
52   - .then((res) => {
53   - let data = res.data
54   - if (data.code == 1) {
55   - // this.datalist = data.data.list
56   - } else {
57   - this.$toast.fail(data.message)
58   - }
59   - })
  50 + let StudentDetialInfo = localStorage.getItem('StudentDetialInfo')
  51 + StudentDetialInfo = JSON.parse(StudentDetialInfo)
  52 + if (StudentDetialInfo.cubeUserId) return
  53 + this.yxAxios.get(`${this.proxyUrl}/user/info/bindLearnCode?travelerId=${this.StudentDetialInfo.id}&cubeUserId=${cubeUserId}`)
60 54 },
61 55 },
62 56 }
... ...