From 0dbc55ce51f1bf1f46ffac66c1bf9514ed6da812 Mon Sep 17 00:00:00 2001 From: Sliverber <2622874537@qq.com> Date: Tue, 16 Jan 2024 14:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.interceptor.js | 2 +- pages/Mystudent/all_arrange.vue | 6 +- pages/Mystudent/arrange_work.vue | 3 + pages/index/index.vue | 73 +++++++++++++------ .../teacher_teachers/teacher_addOperation.vue | 30 +++++--- .../teacher_teachers/teacher_writeadd.vue | 9 ++- 6 files changed, 83 insertions(+), 40 deletions(-) diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 76cdba2..1e9834f 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -42,7 +42,7 @@ const install = (Vue, vm) => { // 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值 // const token = uni.getStorageSync('token'); - const token = " Bearer 4f18711e2c1341b296090ee715d3f4fa" + const token = " Bearer 830608e02a9e4209bffbde69b66f1315" // console.log("我是token", token) config.header.Authorization = token; diff --git a/pages/Mystudent/all_arrange.vue b/pages/Mystudent/all_arrange.vue index 8e536ee..c08a9ed 100644 --- a/pages/Mystudent/all_arrange.vue +++ b/pages/Mystudent/all_arrange.vue @@ -11,7 +11,7 @@ - + @@ -149,7 +149,7 @@ // console.log(option); // this.classid = option.classId // this.classid=15 - this.getworklist() + // this.getworklist() }, onShow() { this.getworklist() diff --git a/pages/Mystudent/arrange_work.vue b/pages/Mystudent/arrange_work.vue index 5c53857..2a8aadb 100644 --- a/pages/Mystudent/arrange_work.vue +++ b/pages/Mystudent/arrange_work.vue @@ -151,6 +151,9 @@ // this.classid=15 this.getworklist() }, + onShow() { + this.getworklist() + }, methods: { addwork(){ diff --git a/pages/index/index.vue b/pages/index/index.vue index 153e17c..4b09089 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -129,6 +129,7 @@ }, methods: { getPhoneNumber(e) { + let that = this console.log("eeeeeeee", e) wx.login({ success(res) { @@ -136,18 +137,28 @@ console.log('登录!', res) //发起网络请求 - wx.request({ - url: 'https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login', - header: { - "Tenant-Id": 1 - }, - method: "POST", - data: { - loginCode: res.code, - phoneCode: e.detail.code, - encryptedData: e.detail.encryptedData, - iv: e.detail.iv - } + // wx.request({ + // url: 'https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login', + // header: { + // "Tenant-Id": 1 + // }, + // method: "POST", + // data: { + // loginCode: res.code, + // phoneCode: e.detail.code, + // encryptedData: e.detail.encryptedData, + // iv: e.detail.iv + // } + // }) + let data ={ + loginCode: res.code, + phoneCode: e.detail.code, + encryptedData: e.detail.encryptedData, + iv: e.detail.iv + } + that.$u.post('https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login',data).then(res => { + uni.setStorageSync('token','Bearer '+ res.data.accessToken); + }) } else { @@ -160,6 +171,7 @@ }) }, getUserInfo(e) { + let that = this wx.login({ success(res) { if (res.code) { @@ -168,20 +180,33 @@ wx.getUserInfo({ success(rrr) { console.log("xxxxx", rrr) - - //发起网络请求 - wx.request({ - url: 'https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login', - header: { - "Tenant-Id": 1 - }, - method: "POST", - data: { - loginCode: res.code, - encryptedData: rrr.encryptedData, - iv: rrr.iv + let data ={ + loginCode: res.code, + encryptedData: rrr.encryptedData, + iv: rrr.iv + } + that.$u.post('https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login',data).then(res => { + if (res.code == 200) { + + uni.setStorageSync('token','Bearer '+ res.data.accessToken); + } else { + } + }) + //发起网络请求 + // wx.request({ + // url: 'https://api.admin-v2.langsi.online/admin-api/system/auth/mini-login', + // header: { + // "Tenant-Id": 1 + // }, + // method: "POST", + // data: { + // loginCode: res.code, + // encryptedData: rrr.encryptedData, + // iv: rrr.iv + // } + // }) } }) diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue index d6ab060..43c919c 100644 --- a/pages_teacher/teacher_teachers/teacher_addOperation.vue +++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue @@ -98,8 +98,17 @@ + + + + 暂未安排哦! + + + - + {{item.papername}} @@ -127,7 +136,7 @@ - + {{item.papername}} @@ -155,7 +164,7 @@ - + {{item.examName}} @@ -184,12 +193,12 @@ - + + style="background-color: #fff; padding: 32rpx 40rpx;border-radius: 20rpx 20rpx 20rpx 20rpx;" > - +