diff --git a/pages/index/Details.vue b/pages/index/Details.vue
index 3156e88..306faaf 100644
--- a/pages/index/Details.vue
+++ b/pages/index/Details.vue
@@ -75,7 +75,7 @@
-
+
@@ -168,7 +168,11 @@
titleslist: [],
swiperListData: [],
urlpdf: '',
- jlId: null
+ jlId: null,
+ queryParams: {
+ pageNum: 1,
+ pageSize: 100,
+ },
}
},
onLoad: function(option) {
@@ -251,9 +255,9 @@
async gettype(id) {
console.log(id);
let res = await request({
- url: '/drivingSchool/system/driveSchoolCourse/list?name=' + id + '&deptId=' + this.newId
+ url: '/drivingSchool/system/driveSchoolCourse/list?name=' + id + '&deptId=' + this.newId,
})
- this.rightInfoList = res
+ this.rightInfoList = res.data.records
},
goDetails(id) {
uni.navigateTo({
@@ -283,10 +287,10 @@
url: '/drivingSchool/system/phone/getPhone?deptId=' + this.newId,
method: 'get',
})
- if (ress.code == 200) {
+ if (ress.code == 0) {
this.Phone = ress.data.phone
}
- if (res.code == 200) {
+ if (res.code == 0) {
this.urlpdf = this.baseUrl + res.data.fileAddress
}
@@ -347,7 +351,7 @@
let res = await request({
url: `/drivingSchool/system/schoolInfo/list?id=` + this.newId,
})
- this.jxInfoData = res.rows[0],
+ this.jxInfoData = res.data.records[0],
console.log("驾校信息", this.jxInfoData)
// this.getRightInfoList(this.jxInfoData.deptId)
this.getJlInfoList(this.jxInfoData.deptId)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2ec4d91..33f57ed 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -76,24 +76,16 @@
-
-
-
-
-
-
-
-
优质驾校
-
+
@@ -167,7 +159,11 @@
kcListInfo: [],
preferentialCurrentIndex: 0,
searchSchool: null,
- Onedata: null
+ Onedata: null,
+ queryParams: {
+ pageNum: 1,
+ pageSize: 100,
+ },
}
},
@@ -218,45 +214,62 @@
url: "/pages/index/schoolFeedback"
})
},
+ /**
+ * 获取
+ */
async getOne() {
let res = await request({
url: "/drivingSchool/system/driveSchoolCourse/getOne",
method: 'get',
})
- console.log(res);
this.Onedata = res.data
},
-
+ /**
+ * 搜索
+ */
async findKcListInfo() {
let res = await request({
url: "/drivingSchool/system/driveSchoolCourse/list",
method: 'get',
+ params: this.queryParams
})
- this.kcListInfo = res.rows
+ this.kcListInfo = res.data.records
},
+ /**
+ * 驾校讯息
+ */
async getJxglInfoData() {
let res = await request({
url: "/drivingSchool/system/schoolInfo/list",
method: 'get',
+ params: this.queryParams
})
- this.jxglInfoData = res
+ this.jxglInfoData = res.data
console.log("驾校信息", this.jxglInfoData)
},
-
+ /**
+ * 轮播图
+ */
async getSwiperInfoData() {
let res = await request({
- url: '/drivingSchool/system/swiper/list?deptId=100',
+ url: '/drivingSchool/system/swiper/list',
method: 'get',
+ params: this.queryParams
})
this.swiperListData = res.data
+ console.log(this.swiperListData)
},
+ /**
+ * 实时讯息
+ */
async getTextList() {
let res = await request({
url: '/drivingSchool/text/list',
- method: 'get'
+ method: 'get',
+ params: this.queryParams
})
- this.textList = res.rows
+ this.textList = res.data.records
},
goBmPage() {
uni.navigateTo({
diff --git a/pages/index/schoolList.vue b/pages/index/schoolList.vue
index 49426dd..b50fe9c 100644
--- a/pages/index/schoolList.vue
+++ b/pages/index/schoolList.vue
@@ -54,7 +54,11 @@
show: false,
status: 'loading',
baseUrl: this.$baseUrl,
- schoolList: []
+ schoolList: [],
+ queryParams: {
+ pageNum: 1,
+ pageSize: 100,
+ },
}
},
onShow() {
@@ -97,9 +101,10 @@
async findSelfSchoolList() {
let res = await request({
url: `/drivingSchool/system/schoolInfo/list`,
- method: `get`
+ method: `get`,
+ params: this.queryParams
})
- this.schoolList = res.rows,
+ this.schoolList = res.data.records,
console.log("列表数据为 =============>>>", this.schoolList)
},
goScheduleTraining(id) {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index c1b0ce4..620a8be 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -190,8 +190,8 @@
// if (this.loginStatus) {
// clearInterval(this.loginStatus)
// }
- uni.setStorageSync('App-Token', rex.data.token);
- debugger
+ setToken(rex.data.data.token)
+ //uni.setStorageSync('App-Token', );
if (this.returnUrl) {
uni.navigateBack()
} else {
@@ -239,11 +239,9 @@
}).then((res) => {
let userJson = {}
- userJson.userId = res.user.userId
- console.log('身份信息', res, res.role.length);
- uni.setStorageSync('role', res.role)
- uni.setStorageSync('userinfo', res.user)
-
+ userJson.userId = res.data.user.id
+ uni.setStorageSync('role', res.data.role)
+ uni.setStorageSync('userinfo', res.data.user)
uni.reLaunch({
url: '/pages/index/index'
})