diff --git a/components/part.vue b/components/part.vue
index 7863243..c4e2dd5 100644
--- a/components/part.vue
+++ b/components/part.vue
@@ -6,7 +6,7 @@
{{part_content}}
+ >
删除
diff --git a/components/student_write.vue b/components/student_write.vue
index 845b6fa..bc0c67a 100644
--- a/components/student_write.vue
+++ b/components/student_write.vue
@@ -11,13 +11,13 @@
学习笔记
删除
-
+
-
- 添加笔记
+
+ 添加笔记
@@ -28,21 +28,84 @@
return {
useInput: "",
block_none: true,
- write_none: false
+ write_none: false,
+ imagepath: [
+ ["/static/experience_2.png", "orange"],
+ ["/static/experience_1.png", "red"]
+ ],
+ postif: true
}
},
methods: {
insertShow() {
this.write_none = true;
+ this.postif = !this.postif
+
+ if (this.postif) {
+ uni.showModal({
+ content: '是否保存',
+ success: res => {
+ if (res.confirm) {
+ console.log(this.useInput)
+ }
+ }
+ });
+ }
},
if_none() {
- this.write_none = false;
- this.useInput = ""
+ uni.showModal({
+ content: '是否删除',
+ success: res => {
+ if (res.confirm) {
+ this.write_none = false;
+ this.useInput = ""
+ } else if (res.cancel) {
+ this.write_none = true;
+ }
+ }
+ })
},
- async request() {
- const text = await fetch("http://124.93.196.45:10091/Neusoft/times-model/appNotice/app-o/loopMap",)
+ async requests(updown, path) {
+ let response
+ if (updown == "up") {
+ response = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ "password": "0CYdq6Hn",
+ "username": "6dOMIgIU"
+ })
+ })
+ } else if (updown == "down") {
+ response = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`, {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ "Authorization": (await this.requests("up", "/app/login")).token
+ },
+ })
+
+ }
+ const data = await response.json()
+ console.log(data)
+ return data
}
- }
+ },
+ async onLoad(){
+ await this.requests("down","")
+ },
+ computed: {
+ path() {
+ if (this.write_none) {
+ return this.imagepath[0]
+ } else {
+ return this.imagepath[1]
+ }
+ }
+ },
+
}
@@ -111,7 +174,7 @@
}
.page_div>view:last-child image {
- width: 3vw;
- height: 3vh
+ width: 4vw;
+ height: 2vh
}
-
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 788bb32..6e69d00 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -7,14 +7,9 @@