20240517
This commit is contained in:
@@ -4,7 +4,7 @@ import $http from '@/config/requestConfig'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
... mapMutations(["setUserInfo"]) ,
|
||||
...mapMutations(["setUserInfo"]),
|
||||
showToast(title, icon) {
|
||||
return uni.showToast({
|
||||
title: title,
|
||||
@@ -51,6 +51,35 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//用户协议
|
||||
async getAgreement(id) {
|
||||
console.log('id at line 56:', id)
|
||||
var data = {
|
||||
id: id
|
||||
}
|
||||
var result = {
|
||||
title:'',
|
||||
content:''
|
||||
}
|
||||
await $http
|
||||
.request({
|
||||
url: "sys/agreement/getAgreement",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: data,
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then((res) => {
|
||||
console.log('res at line 111:', res)
|
||||
if (res.code == 0) {
|
||||
result = res.agreement
|
||||
}
|
||||
|
||||
})
|
||||
return result
|
||||
},
|
||||
async getCheckCourseStatus(data) {
|
||||
var result
|
||||
await $http
|
||||
@@ -83,16 +112,16 @@ export default {
|
||||
content: "确定要退出当前账户吗?",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
setUserInfo({ token: null });
|
||||
uni.reLaunch({
|
||||
url: "/pages/user/login/login",
|
||||
});
|
||||
setUserInfo({ token: null });
|
||||
uni.reLaunch({
|
||||
url: "/pages/user/login/login",
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
// 取消操作
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
// this.signShow = false;
|
||||
// this.setUserInfo({ token: null });
|
||||
|
||||
@@ -77,7 +77,7 @@ page {
|
||||
}
|
||||
*/
|
||||
.uni-panel-h-on {
|
||||
background-color: #f0f0f0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.uni-panel-text {
|
||||
@@ -109,7 +109,7 @@ page {
|
||||
align-items: center;
|
||||
background-color: #FFFFFF;
|
||||
border-top-style: solid;
|
||||
border-top-color: #f0f0f0;
|
||||
border-top-color: #f5f5f5;
|
||||
border-top-width: 1px;
|
||||
padding: 12px;
|
||||
/* #ifdef H5 */
|
||||
|
||||
Reference in New Issue
Block a user