From 0c981a57ba092f9397ff20968834e296eeab0968 Mon Sep 17 00:00:00 2001
From: wangdong <1551135706@qq.com>
Date: Wed, 20 Mar 2024 22:35:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=92=8C=E7=BA=BF=E4=B8=8B?=
=?UTF-8?q?=E6=B4=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/user.js | 2 +-
components/Course/offlineStyleCourse.vue | 13 +-
libs/permission.js | 272 +++++++++++++++++++++++
libs/qqmap-wx-jssdk.min.js | 2 +
manifest.json | 3 +-
pages.json | 1 +
pages/activity/activity_list.vue | 24 +-
pages/activity/event.vue | 2 +-
pages/activity/index.vue | 48 +++-
pages/course/special_cate.vue | 53 ++++-
pages/forgotPwd/index.vue | 9 +-
pages/index/getLocation.js | 171 ++++++++++++++
pages/index/index.vue | 61 +++--
pages/index/position.vue | 8 +-
pages/index/search.vue | 9 +-
pages/learning/index.vue | 44 +++-
pages/my/noticeList.vue | 1 +
pages/special/order_store_list.vue | 3 +-
pages/store/goodsCate.vue | 32 ++-
pages/topic/problem_detail.vue | 1 +
store/index.js | 2 +-
store/modules/app.js | 10 +-
store/types/muations-types.js | 3 +-
23 files changed, 709 insertions(+), 65 deletions(-)
create mode 100644 libs/permission.js
create mode 100644 libs/qqmap-wx-jssdk.min.js
create mode 100644 pages/index/getLocation.js
diff --git a/api/user.js b/api/user.js
index b96397c..fe95985 100644
--- a/api/user.js
+++ b/api/user.js
@@ -41,7 +41,7 @@ export function getAuthCode(phone) {
}
export function registerAccount(data) {
- return http.post('/login/register', data);
+ return http.get('/login/register', data);
}
export function changePwd(data) {
diff --git a/components/Course/offlineStyleCourse.vue b/components/Course/offlineStyleCourse.vue
index 6c50f13..6455fc7 100644
--- a/components/Course/offlineStyleCourse.vue
+++ b/components/Course/offlineStyleCourse.vue
@@ -24,6 +24,7 @@
+
+
+
\ No newline at end of file
diff --git a/pages/learning/index.vue b/pages/learning/index.vue
index 91a11b0..669815b 100644
--- a/pages/learning/index.vue
+++ b/pages/learning/index.vue
@@ -13,7 +13,7 @@
我的考试:
{{ myExam.examName }}
-
+
开考时间:
{{ myExam.examTime}}
@@ -98,6 +98,13 @@
+
+
+ 课程
+ 更多 >
+
+
+
@@ -105,7 +112,7 @@
diff --git a/pages/my/noticeList.vue b/pages/my/noticeList.vue
index 88001e1..b80ff1a 100644
--- a/pages/my/noticeList.vue
+++ b/pages/my/noticeList.vue
@@ -38,6 +38,7 @@
onShow() {
this.page = 1;
this.finished = false;
+ this.noticeList = [];
this.getNoticeList();
},
onReachBottom() {
diff --git a/pages/special/order_store_list.vue b/pages/special/order_store_list.vue
index 7df545a..6054fee 100644
--- a/pages/special/order_store_list.vue
+++ b/pages/special/order_store_list.vue
@@ -37,7 +37,7 @@
-
+
@@ -495,6 +495,7 @@
width: 156rpx;
height: 184rpx;
margin-right: 52rpx;
+ border-radius: 0;
}
.text {
.name {
diff --git a/pages/store/goodsCate.vue b/pages/store/goodsCate.vue
index c6a0406..3e9d3c9 100644
--- a/pages/store/goodsCate.vue
+++ b/pages/store/goodsCate.vue
@@ -33,10 +33,16 @@
return {
goodsCateList: [],
bigCate: '',
+ type: '',
};
},
- onLoad() {
- this.getGoodsCateList();
+ onLoad(options) {
+ this.type = options.type;
+ if (this.type === 'store') {
+ this.getGoodsCateList();
+ } else {
+
+ }
},
methods: {
// 获取分类
@@ -56,9 +62,25 @@
} catch (err) { }
},
toList(con) {
- uni.navigateTo({
- url: `/pages/store/goodsList?categoryId=${con.id}`
- });
+ switch (this.type){
+ case 'store':
+ uni.navigateTo({
+ url: `/pages/store/goodsList?categoryId=${con.id}`
+ });
+ break;
+ case 'special':
+ // uni.navigateTo({
+ // url: `/pages/store/goodsList?categoryId=${con.id}`
+ // });
+ break;
+ case 'learning':
+ // uni.navigateTo({
+ // url: `/pages/store/goodsList?categoryId=${con.id}`
+ // });
+ break;
+ default:
+ break;
+ }
},
},
};
diff --git a/pages/topic/problem_detail.vue b/pages/topic/problem_detail.vue
index cde9172..56d8e5d 100644
--- a/pages/topic/problem_detail.vue
+++ b/pages/topic/problem_detail.vue
@@ -330,6 +330,7 @@ export default {
break;
}
});
+ console.log(questions);
this.questions = questions;
} catch (err) {
uni.hideLoading();
diff --git a/store/index.js b/store/index.js
index da04cc7..c005b2c 100644
--- a/store/index.js
+++ b/store/index.js
@@ -15,6 +15,6 @@ export default new Vuex.Store({
userInfo: state => state.app.userInfo,
rootFontSize: state => state.app.rootFontSize,
token: state => state.app.token,
-
+ position: state => state.app.position,
}
})
\ No newline at end of file
diff --git a/store/modules/app.js b/store/modules/app.js
index cec9dd2..4f12d47 100644
--- a/store/modules/app.js
+++ b/store/modules/app.js
@@ -1,4 +1,4 @@
-import { SET_LOGIN, SET_LOGOUT, SET_ROOT_FONT, UPDATE_USER_INFO } from "@/store/types/muations-types";
+import { SET_LOGIN, SET_LOGOUT, SET_ROOT_FONT, UPDATE_USER_INFO, SET_POSITION } from "@/store/types/muations-types";
import { VALID_LOGIN_STATUS } from "@/store/types/action-types";
import { validLoginStatus } from "@/api/user";
import utils from "@/utils/utils";
@@ -38,7 +38,8 @@ export default {
isLogin: !!getToken(),
token: getToken(),
userInfo: getBaseUserInfo(),
- rootFontSize: "50px"
+ rootFontSize: "50px",
+ position: '',
}
},
mutations: {
@@ -72,7 +73,10 @@ export default {
isInit && uni.onWindowResize(() => {
setRemUnit();
});
- }
+ },
+ [SET_POSITION](state, res) {
+ state.position = res;
+ },
},
actions: {
async [VALID_LOGIN_STATUS]({ commit }) {
diff --git a/store/types/muations-types.js b/store/types/muations-types.js
index 61719f1..0cb6aac 100644
--- a/store/types/muations-types.js
+++ b/store/types/muations-types.js
@@ -1,4 +1,5 @@
export const SET_LOGIN = "SET_LOGIN";
export const SET_LOGOUT = "SET_LOGOUT";
export const SET_ROOT_FONT = "SET_ROOT_FONT";
-export const UPDATE_USER_INFO = "UPDATE_USER_INFO";
\ No newline at end of file
+export const UPDATE_USER_INFO = "UPDATE_USER_INFO";
+export const SET_POSITION = "SET_POSITION";
\ No newline at end of file