Kaynağa Gözat

测试修改

zzf 2 yıl önce
ebeveyn
işleme
429509db2e

+ 305 - 63
package-lock.json

@@ -10,14 +10,15 @@
       "dependencies": {
         "amfe-flexible": "^2.2.1",
         "autoprefixer": "^10.4.14",
-        "axios": "^1.4.0",
+        "axios": "^0.24.0",
         "consola": "^3.2.3",
         "dsbridge": "^3.1.4",
         "eruda": "^3.0.1",
         "path": "^0.12.7",
         "postcss-pxtorem": "^6.0.0",
         "sass": "^1.64.0",
-        "vant": "^4.6.2",
+        "unplugin-vue-components": "^0.25.1",
+        "vant": "^3.6.12",
         "vite-plugin-style-import": "^2.0.0",
         "vue": "^3.3.4",
         "vue-router": "^4.2.4",
@@ -28,6 +29,11 @@
         "vite": "^4.4.5"
       }
     },
+    "node_modules/@antfu/utils": {
+      "version": "0.7.5",
+      "resolved": "https://registry.npmmirror.com/@antfu/utils/-/utils-0.7.5.tgz",
+      "integrity": "sha512-dlR6LdS+0SzOAPx/TPRhnoi7hE251OVeT2Snw0RguNbBSbjUHdWr0l3vcUUDg26rEysT89kCbtw1lVorBXLLCg=="
+    },
     "node_modules/@babel/parser": {
       "version": "7.22.7",
       "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.22.7.tgz",
@@ -374,6 +380,38 @@
       "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
       "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
     },
+    "node_modules/@nodelib/fs.scandir": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+      "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+      "dependencies": {
+        "@nodelib/fs.stat": "2.0.5",
+        "run-parallel": "^1.1.9"
+      },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/@nodelib/fs.stat": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+      "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/@nodelib/fs.walk": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+      "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+      "dependencies": {
+        "@nodelib/fs.scandir": "2.1.5",
+        "fastq": "^1.6.0"
+      },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
     "node_modules/@rollup/pluginutils": {
       "version": "4.2.1",
       "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
@@ -386,6 +424,16 @@
         "node": ">= 8.0.0"
       }
     },
+    "node_modules/@types/estree": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz",
+      "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA=="
+    },
+    "node_modules/@vant/icons": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz",
+      "integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
+    },
     "node_modules/@vant/popperjs": {
       "version": "1.3.0",
       "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz",
@@ -519,6 +567,17 @@
       "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
       "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
     },
+    "node_modules/acorn": {
+      "version": "8.10.0",
+      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz",
+      "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+      "bin": {
+        "acorn": "bin/acorn"
+      },
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
     "node_modules/amfe-flexible": {
       "version": "2.2.1",
       "resolved": "https://registry.npmmirror.com/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
@@ -536,11 +595,6 @@
         "node": ">= 8"
       }
     },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
-    },
     "node_modules/autoprefixer": {
       "version": "10.4.14",
       "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.14.tgz",
@@ -564,15 +618,18 @@
       }
     },
     "node_modules/axios": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmmirror.com/axios/-/axios-1.4.0.tgz",
-      "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
+      "version": "0.24.0",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-0.24.0.tgz",
+      "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
       "dependencies": {
-        "follow-redirects": "^1.15.0",
-        "form-data": "^4.0.0",
-        "proxy-from-env": "^1.1.0"
+        "follow-redirects": "^1.14.4"
       }
     },
+    "node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+    },
     "node_modules/binary-extensions": {
       "version": "2.2.0",
       "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
@@ -581,6 +638,14 @@
         "node": ">=8"
       }
     },
+    "node_modules/brace-expansion": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
+      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
     "node_modules/braces": {
       "version": "3.0.2",
       "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz",
@@ -672,17 +737,6 @@
         "fsevents": "~2.3.2"
       }
     },
-    "node_modules/combined-stream": {
-      "version": "1.0.8",
-      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
-      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "dependencies": {
-        "delayed-stream": "~1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/consola": {
       "version": "3.2.3",
       "resolved": "https://registry.npmmirror.com/consola/-/consola-3.2.3.tgz",
@@ -711,12 +765,20 @@
       "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz",
       "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
     },
-    "node_modules/delayed-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+    "node_modules/debug": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
+      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+      "dependencies": {
+        "ms": "2.1.2"
+      },
       "engines": {
-        "node": ">=0.4.0"
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
       }
     },
     "node_modules/dot-case": {
@@ -797,6 +859,29 @@
       "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
       "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
     },
+    "node_modules/fast-glob": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.0.tgz",
+      "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==",
+      "dependencies": {
+        "@nodelib/fs.stat": "^2.0.2",
+        "@nodelib/fs.walk": "^1.2.3",
+        "glob-parent": "^5.1.2",
+        "merge2": "^1.3.0",
+        "micromatch": "^4.0.4"
+      },
+      "engines": {
+        "node": ">=8.6.0"
+      }
+    },
+    "node_modules/fastq": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.15.0.tgz",
+      "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+      "dependencies": {
+        "reusify": "^1.0.4"
+      }
+    },
     "node_modules/fill-range": {
       "version": "7.0.1",
       "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
@@ -821,19 +906,6 @@
         }
       }
     },
-    "node_modules/form-data": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
-      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
-      "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.8",
-        "mime-types": "^2.1.12"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
     "node_modules/fraction.js": {
       "version": "4.2.0",
       "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.2.0.tgz",
@@ -868,6 +940,11 @@
         "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
       }
     },
+    "node_modules/function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+    },
     "node_modules/glob-parent": {
       "version": "5.1.2",
       "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -884,6 +961,17 @@
       "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
       "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
     },
+    "node_modules/has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dependencies": {
+        "function-bind": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4.0"
+      }
+    },
     "node_modules/header-case": {
       "version": "2.0.4",
       "resolved": "https://registry.npmmirror.com/header-case/-/header-case-2.0.4.tgz",
@@ -914,6 +1002,14 @@
         "node": ">=8"
       }
     },
+    "node_modules/is-core-module": {
+      "version": "2.12.1",
+      "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.12.1.tgz",
+      "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
+      "dependencies": {
+        "has": "^1.0.3"
+      }
+    },
     "node_modules/is-extglob": {
       "version": "2.1.1",
       "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
@@ -952,6 +1048,14 @@
         "graceful-fs": "^4.1.6"
       }
     },
+    "node_modules/local-pkg": {
+      "version": "0.4.3",
+      "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.3.tgz",
+      "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==",
+      "engines": {
+        "node": ">=14"
+      }
+    },
     "node_modules/lower-case": {
       "version": "2.0.2",
       "resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz",
@@ -971,25 +1075,42 @@
         "node": ">=12"
       }
     },
-    "node_modules/mime-db": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+    "node_modules/merge2": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
+      "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
       "engines": {
-        "node": ">= 0.6"
+        "node": ">= 8"
       }
     },
-    "node_modules/mime-types": {
-      "version": "2.1.35",
-      "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
-      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+    "node_modules/micromatch": {
+      "version": "4.0.5",
+      "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz",
+      "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
       "dependencies": {
-        "mime-db": "1.52.0"
+        "braces": "^3.0.2",
+        "picomatch": "^2.3.1"
       },
       "engines": {
-        "node": ">= 0.6"
+        "node": ">=8.6"
       }
     },
+    "node_modules/minimatch": {
+      "version": "9.0.3",
+      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.3.tgz",
+      "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      }
+    },
+    "node_modules/ms": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
+      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+    },
     "node_modules/nanoid": {
       "version": "3.3.6",
       "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
@@ -1067,6 +1188,11 @@
         "tslib": "^2.0.3"
       }
     },
+    "node_modules/path-parse": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
+    },
     "node_modules/pathe": {
       "version": "0.2.0",
       "resolved": "https://registry.npmmirror.com/pathe/-/pathe-0.2.0.tgz",
@@ -1119,10 +1245,10 @@
         "node": ">= 0.6.0"
       }
     },
-    "node_modules/proxy-from-env": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
-      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+    "node_modules/queue-microtask": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
+      "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
     },
     "node_modules/readdirp": {
       "version": "3.6.0",
@@ -1135,6 +1261,28 @@
         "node": ">=8.10.0"
       }
     },
+    "node_modules/resolve": {
+      "version": "1.22.2",
+      "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.2.tgz",
+      "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
+      "dependencies": {
+        "is-core-module": "^2.11.0",
+        "path-parse": "^1.0.7",
+        "supports-preserve-symlinks-flag": "^1.0.0"
+      },
+      "bin": {
+        "resolve": "bin/resolve"
+      }
+    },
+    "node_modules/reusify": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz",
+      "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+      "engines": {
+        "iojs": ">=1.0.0",
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/rollup": {
       "version": "3.26.3",
       "resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.26.3.tgz",
@@ -1150,6 +1298,14 @@
         "fsevents": "~2.3.2"
       }
     },
+    "node_modules/run-parallel": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",
+      "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+      "dependencies": {
+        "queue-microtask": "^1.2.2"
+      }
+    },
     "node_modules/sass": {
       "version": "1.64.0",
       "resolved": "https://registry.npmmirror.com/sass/-/sass-1.64.0.tgz",
@@ -1199,6 +1355,14 @@
       "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
       "deprecated": "Please use @jridgewell/sourcemap-codec instead"
     },
+    "node_modules/supports-preserve-symlinks-flag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
     "node_modules/to-regex-range": {
       "version": "5.0.1",
       "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -1223,6 +1387,71 @@
         "node": ">= 10.0.0"
       }
     },
+    "node_modules/unplugin": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-1.4.0.tgz",
+      "integrity": "sha512-5x4eIEL6WgbzqGtF9UV8VEC/ehKptPXDS6L2b0mv4FRMkJxRtjaJfOWDd6a8+kYbqsjklix7yWP0N3SUepjXcg==",
+      "dependencies": {
+        "acorn": "^8.9.0",
+        "chokidar": "^3.5.3",
+        "webpack-sources": "^3.2.3",
+        "webpack-virtual-modules": "^0.5.0"
+      }
+    },
+    "node_modules/unplugin-vue-components": {
+      "version": "0.25.1",
+      "resolved": "https://registry.npmmirror.com/unplugin-vue-components/-/unplugin-vue-components-0.25.1.tgz",
+      "integrity": "sha512-kzS2ZHVMaGU2XEO2keYQcMjNZkanDSGDdY96uQT9EPe+wqSZwwgbFfKVJ5ti0+8rGAcKHColwKUvctBhq2LJ3A==",
+      "dependencies": {
+        "@antfu/utils": "^0.7.4",
+        "@rollup/pluginutils": "^5.0.2",
+        "chokidar": "^3.5.3",
+        "debug": "^4.3.4",
+        "fast-glob": "^3.2.12",
+        "local-pkg": "^0.4.3",
+        "magic-string": "^0.30.0",
+        "minimatch": "^9.0.1",
+        "resolve": "^1.22.2",
+        "unplugin": "^1.3.1"
+      },
+      "engines": {
+        "node": ">=14"
+      },
+      "peerDependencies": {
+        "@babel/parser": "^7.15.8",
+        "@nuxt/kit": "^3.2.2",
+        "vue": "2 || 3"
+      },
+      "peerDependenciesMeta": {
+        "@babel/parser": {
+          "optional": true
+        },
+        "@nuxt/kit": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/unplugin-vue-components/node_modules/@rollup/pluginutils": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
+      "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",
+      "dependencies": {
+        "@types/estree": "^1.0.0",
+        "estree-walker": "^2.0.2",
+        "picomatch": "^2.3.1"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      },
+      "peerDependencies": {
+        "rollup": "^1.20.0||^2.0.0||^3.0.0"
+      },
+      "peerDependenciesMeta": {
+        "rollup": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/update-browserslist-db": {
       "version": "1.0.11",
       "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz",
@@ -1263,13 +1492,13 @@
       }
     },
     "node_modules/vant": {
-      "version": "4.6.2",
-      "resolved": "https://registry.npmmirror.com/vant/-/vant-4.6.2.tgz",
-      "integrity": "sha512-6EHCCAGM5a9VVzpBg/wZNPDFmJ8T1a4k29DPNcEMW3X670awW3rnD7+/x3dw+bE17JhhSg49V/+fQwBP2iQkAg==",
+      "version": "3.6.12",
+      "resolved": "https://registry.npmmirror.com/vant/-/vant-3.6.12.tgz",
+      "integrity": "sha512-fLzwhpV0ZPQqxrTx6RU8mJVUqP7DSkpdXNeByKubp+O9vKYGcWRX9wFdEwApyy7qLZLLu+rU1Jw52d6lktPL4w==",
       "dependencies": {
-        "@vant/popperjs": "^1.3.0",
-        "@vant/use": "^1.5.1",
-        "@vue/shared": "^3.0.0"
+        "@vant/icons": "^1.8.0",
+        "@vant/popperjs": "^1.2.1",
+        "@vant/use": "^1.4.2"
       },
       "peerDependencies": {
         "vue": "^3.0.0"
@@ -1378,6 +1607,19 @@
       "version": "2.0.7",
       "resolved": "https://registry.npmmirror.com/vue-wechat-title/-/vue-wechat-title-2.0.7.tgz",
       "integrity": "sha512-qNkb56AWFHjOoGfW4lkstS4GC2W4YqVJYfnIUM73b/CBpMSOvcWSqtmb8ANa9owTKJr2dmBRmQV5K5YwrzbC5A=="
+    },
+    "node_modules/webpack-sources": {
+      "version": "3.2.3",
+      "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
+      "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+      "engines": {
+        "node": ">=10.13.0"
+      }
+    },
+    "node_modules/webpack-virtual-modules": {
+      "version": "0.5.0",
+      "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz",
+      "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw=="
     }
   }
 }

+ 3 - 2
package.json

@@ -11,14 +11,15 @@
   "dependencies": {
     "amfe-flexible": "^2.2.1",
     "autoprefixer": "^10.4.14",
-    "axios": "^1.4.0",
+    "axios": "^0.24.0",
     "consola": "^3.2.3",
     "dsbridge": "^3.1.4",
     "eruda": "^3.0.1",
     "path": "^0.12.7",
     "postcss-pxtorem": "^6.0.0",
     "sass": "^1.64.0",
-    "vant": "^4.6.2",
+    "unplugin-vue-components": "^0.25.1",
+    "vant": "^3.6.12",
     "vite-plugin-style-import": "^2.0.0",
     "vue": "^3.3.4",
     "vue-router": "^4.2.4",

+ 9 - 1
src/App.vue

@@ -6,7 +6,15 @@ import { RouterView } from 'vue-router';
 </script>
 
 <template>
-  <RouterView  v-wechat-title="$route.meta.title"   ></RouterView>
+
+<!-- <KeepAlive :include="['Home']">
+  <RouterView  v-wechat-title="$route.meta.title" ></RouterView>
+</KeepAlive> -->
+<router-view v-slot="{ Component }">
+  <keep-alive>
+    <component :is="Component" />
+  </keep-alive>
+</router-view>
 </template>
 
 <style lang="scss" >

+ 40 - 0
src/api/common.js

@@ -0,0 +1,40 @@
+import axiosInstance from "@/util/request";
+// 经纬度签到
+function postpunchin(data) {
+  /*  https://alipearlapp.snjon.com/questionnaire/clockin/getLalg */
+    let url = 'https://alipearlapp.snjon.com/questionnaire/clockin/addClock';
+    return axiosInstance.post(url,data);
+}
+//  表单提交
+function postForm(data){
+    let url ='https://alipearlapp.snjon.com/questionnaire/clockin/submit';
+    return axiosInstance.post(url,data)
+}
+// 获取店铺经纬度
+function getLocation(data) {
+    let url = 'https://alipearlapp.snjon.com/questionnaire/clockin/getLalg';
+    return axiosInstance.post(url,data);
+}
+// 获取中奖纪录
+function getRaffleList(data) {
+    let url = '/api/raffle/getRaffleList';
+    return axiosInstance.post(url,data);
+}
+// 获取是否签到与提交表单
+function getClockIn(data) {
+    let url = 'https://alipearlapp.snjon.com/questionnaire/clockin/getClock';
+    return axiosInstance.post(url,data);
+}
+
+function getPointsAndCount(data) {
+    let url = '/api/raffle/getPoints';
+    return axiosInstance.post(url,data);
+}
+export {
+    postpunchin,
+    getLocation,
+    getRaffleList,
+    getClockIn,
+    postForm,
+    getPointsAndCount,
+};

+ 2 - 0
src/main.js

@@ -2,6 +2,7 @@ import * as Vue from 'vue'
 import 'amfe-flexible'
 import VueWechatTitle from 'vue-wechat-title';
 import {router} from './router/router';
+import 'vant/lib/index.css';
 
 import App from './App.vue'
 import bridge from 'dsbridge';
@@ -9,6 +10,7 @@ import bridge from 'dsbridge';
 const app = Vue.createApp(App);
 
 var userToken = bridge.call('gettoken');
+// userToken =' "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsYXQiOjE2OTA0NDMxNDksIm5iZiI6MTY5MDQ0MzE0OSwiZXhwIjoxNjkwODc1MTQ5LCJ1aWQiOiIxNjEzMjciLCJ3ZWJzaXRlIjoiYWxpcGVhcmxoYWlyIn0.t8oTRvi3t1fadgwCK-C-Dao2FJ66znjPASivwpWCr0w';
 console.log('入口文件获取userToken ----- ', userToken);
 // app.provide('userToken', userToken);
 if(userToken) {

+ 3 - 1
src/router/routes.js

@@ -3,6 +3,7 @@ import * as VueRouter  from 'vue-router';
 // 也可以从其他文件导入
 import Home from '@/view/Home/Home.vue';
 import Test from '@/view/Test/Test.vue';
+import { KeepAlive } from 'vue';
 // const Home = { template: '<div>Home</div>' }
 // const About = { template: '<div>About</div>' }
 
@@ -15,7 +16,8 @@ const routes = [
         path: '/', 
         component: Home,
         meta: {
-            title: 'Punch In '
+            title: 'Punch In ',
+            KeepAlive:true
         }
     },
     { 

+ 33 - 0
src/util/computerMark.js

@@ -0,0 +1,33 @@
+function degreesToRadians(degrees) {
+    return degrees * (Math.PI / 180);
+  }
+  
+  function calculateDistance(lat1, lon1, lat2, lon2) {
+    const earthRadiusKm = 6371;
+  
+    const dLat = degreesToRadians((lat2*1) - (lat1*1));
+    const dLon = degreesToRadians((lon2*1) - (lon1*1));
+  
+    const a =
+      Math.sin(dLat / 2) * Math.sin(dLat / 2) +
+      Math.cos(degreesToRadians(lat1)) *
+        Math.cos(degreesToRadians(lat2)) *
+        Math.sin(dLon / 2) *
+        Math.sin(dLon / 2);
+  
+    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
+  
+    const distance = earthRadiusKm * c;
+    return distance;
+  }
+
+  function trim(str) {
+      var reg = /[\t\r\f\n\s]*/g;
+      if (typeof str === 'string') {
+          var trimStr = str.replace(reg,'');
+          return trimStr
+      }
+    
+  }
+
+  export  {calculateDistance,trim };

+ 115 - 0
src/util/request.js

@@ -0,0 +1,115 @@
+import * as axios from 'axios';
+import { Toast } from 'vant';
+const axiosInstance = axios.create({
+    baseURL: '',// 'https://westkissapp.snjon.com/app-api',//'/app-api',//
+    timeout: 1000000,
+    headers: {
+        // 'Content-Type': 'application/json; charset=utf-8'
+        "Content-Type": "application/x-www-form-urlencoded"
+    }
+});
+const env = process.env.NODE_ENV;
+// console.log('process.env.NODE_ENV  --- qqwe',process.env.NODE_ENV );
+/**
+ * 响应的数据结构
+{
+  // `data` 由服务器提供的响应
+  data: {},
+
+  // `status` 来自服务器响应的 HTTP 状态码
+  status: 200,
+
+  // `statusText` 来自服务器响应的 HTTP 状态信息
+  statusText: 'OK',
+
+  // `headers` 服务器响应的头
+  headers: {},
+
+  // `config` 是为请求提供的配置信息
+  config: {}
+}
+ */
+
+// 添加请求拦截器
+axiosInstance.interceptors.request.use(function (config) {
+    if(config.url !== '/api/raffle/raffle') {
+        Toast.loading({
+            message: 'Loading...',
+            forbidClick: true,
+        });
+    }
+    
+    if(env === 'production') {
+        // let apiTypeReg = /(\/app\-api\/)|(\/api\/)/ig;
+        // let urlMap = {
+        //     '/api/':'https://actapi.snjon.com',  
+        //     // 'https://actapi.longyihair.com',
+        //     '/app-api/': 'https://alipearlapp.snjon.com'//,
+        //     // 'https://ios.alipearlhair.com',   //正式站
+        //     // '/api/': 'https://actapi.snjon.com',
+        // };
+        // let urlType = config.url.match(apiTypeReg)[0];
+        // if(urlType) {
+        //     config.url = urlMap[urlType] + config.url;
+        // }
+    }
+    
+    if(config.method === 'post') {
+        
+        if(config.data && config.url.indexOf('/index/uploader') < 0) {
+            let requestData = config.data;
+            config.data = formdataPostParam(requestData);
+        }
+    } 
+    // 添加token
+    var userToken = window.sessionStorage.getItem('usertoken');
+    // var userCookie = window.sessionStorage.getItem('userCookie');
+    if(userToken) {
+        config.headers['token'] = userToken;
+    }
+    // if(userCookie) {
+    //     config.headers['Cookie'] = userCookie;
+    // }
+    // console.log('request config --- ',config);
+    return config;
+}, function (error) {
+    Toast.clear();
+    // 对请求错误做些什么
+    return Promise.reject(error);
+});
+
+// 添加响应拦截器
+axiosInstance.interceptors.response.use(function (response) {
+    console.log('response == ',response);
+    Toast.clear();
+    if(response.status === 200) {
+        if(response.data.code === 200 || response.data.code === 1) {
+            return response.data;
+        } else {
+            if(response.config.url.indexOf('shareAdd') < 0) { 
+                Toast({
+                    message: response.data.msg,
+                    // position: 'top',
+                });
+            }
+            return Promise.reject(response.data);
+        }
+    }
+    return Promise.reject(response.data);
+}, function (error) {
+    Toast.clear();
+    // console.log(error,'kkkkkkkkkk');
+    // 对响应错误做点什么
+    return Promise.reject(error);
+});
+
+// 序列化post请求数据
+function formdataPostParam(data) {
+    let res = '';
+    for(let key in data) {
+        res = res ? res + '&' + encodeURIComponent(key) + '=' + encodeURIComponent(data[key]) : encodeURIComponent(key) + '=' + encodeURIComponent(data[key]);
+    }
+    // console.log('request-data: ',res);
+    return res;
+}
+export default axiosInstance;

+ 426 - 2
src/view/Home/Home.vue

@@ -1,11 +1,435 @@
 <script setup>
+import {Field, CellGroup,Popup,Dialog,Toast} from 'vant';
+import {ref,reactive,onMounted} from 'vue'
+import {calculateDistance,trim} from '../../util/computerMark';
+import { onActivated } from 'vue';
+import bridge from 'dsbridge';
+import * as axios from 'axios';
+import eruda from "eruda";
+import {getLocation,getClockIn,postpunchin,postForm,getPointsAndCount} from '../../api/common.js'
+var markImg = ref('https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923303.png'); 
+var inputImg =ref( 'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923306.png');
+var selectImg =ref('https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png');
+var selectImg2 =ref('https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png');
 
+// 目标target
+const targetLocation = ref({})
+// 遮罩是否显示
+const popupShow =ref(false);
+const popupSecShow =ref(false);
+const popupErrorShow =ref(true);
+const popupSecShowContent =ref(true);
+// 是否签到
+const is_punch =ref("");
+//是否提交过表单
+const is_form = ref('')
+// const popupNoMark =ref(false);
+// const popup
+// 输入框的值
+const inputValue =ref('');
+const inputError =ref(false);
+// 下拉框
+const selectValue =ref('');
+const selectflag =ref(false);
+//下拉框2
+const selectsecValue =ref('');
+const selectsecflag =ref(false);
+const showselect =reactive(["Social Media",
+                    "Alipearl Offline Store",
+                    "Alipearl Online Store",
+                    "From friends",]);
+const showsecselect =reactive(["None","Ashley J","Catherine","Fanny","Joy","Krystal","Madi P","Margeau P","Ning","Shameeka","Stephanie","Tanya","Terry"]);
+onActivated(function() {
+    // console.log('路由缓存页面激活');
+    setTitle('ALIPEARL NYC TOUR');
+    if(!judgeLogin()) {
 
+        return;
+    }
+    init(); 
+}); 
+
+// eruda.init(); 
+ function markIn(data){
+    if(!judgeLogin()) {
+        return;
+    };
+    if(is_punch.value == '1'){
+        return;
+    }
+  
+
+    //  获取定位
+bridge.call('getLocation',{},(res)=>{
+    // console.log('getlocationaaaaaaaaaaaaa',res);
+    if(res){
+    // console.log('ooooooooooooooooooooo');
+    console.log('用户当前经纬度------',res);
+    // console.log('去除字符串空格',trim(getlocation));
+    res= JSON.parse(trim(res));
+    let nowLon = res.lon;
+    let newLat = res.lat;
+    // console.log('nowLon',nowLon);
+    // console.log('newLat',newLat);  
+    const oneDistance = calculateDistance(newLat, nowLon, targetLocation.value.lat1,targetLocation.value.lon1);
+    const SecDistance = calculateDistance(newLat, nowLon, targetLocation.value.lat2,targetLocation.value.lon2);
+    if( targetLocation.value.lat3){
+       
+    var triDistance = calculateDistance(newLat, nowLon, targetLocation.value.lat3,targetLocation.value.lon3);
+    console.log('b',triDistance);
+    };
+    if(oneDistance <= 0.2  ){
+        // console.log('c');
+        // if(data=='popup'){
+        //     axios.all([postForm({ input_value:inputValue.value, 	//具体的表单信息
+        // select_value:selectValue.value,
+        // select_secvalue:selectsecValue.value}),postpunchin({location:targetLocation.value.location})]).then(axios.spread(function (res1, res2) {
+        //     is_form.value='1';
+        //     is_punch.value='1';
+        //     popupShow.value =false;
+        //     popupSecShow.value= true;
+        //     popupSecShowContent.value=false;
+        // }))
+        //  return;
+        // }
+        postpunchin({location:targetLocation.value.location}).then((res)=>{
+            is_punch.value ='1';
+            Toast('SUCCEED');
+        })
+        return ;
+    } 
+    if(SecDistance <= 0.2){
+    // console.log('d');
+    //     if(data=='popup'){
+    //    axios.all([getLocation({ input_value:inputValue.value, 	//具体的表单信息
+    //     select_value:selectValue.value,
+    //     select_secvalue:selectsecValue.value}),postpunchin({location:targetLocation.value.location2})]).then(axios.spread(function (res1, res2) {
+    //         is_form.value='1';
+    //         is_punch.value='1';
+    //         popupShow.value =false;
+    //         popupSecShow.value= true;
+    //         popupSecShowContent.value=false;
+    //     }))
+    //    return;
+    // }
+    postpunchin({location:targetLocation.value.location2}).then((res)=>{
+            is_punch.value ='1';
+            Toast('SUCCEED');
+        })
+        return;
+    } 
+    if (triDistance && triDistance <= 0.2 ){
+        // console.log('e');
+        console.log('用户当前经纬度距离目标经纬度的距离为:',triDistance);
+        postpunchin({location:targetLocation.value.location3}).then((res)=>{
+            is_punch.value ='1';
+            Toast('SUCCEED');
+        })
+        return;
+    }
+        popupSecShow.value =false;
+        popupErrorShow.value = false;
+        popupShow.value= true;
+    
+        
+    
+    // console.log("Distance:", oneDistance, "km");
+    // console.log("SecDistance:", SecDistance, "km");
+    }else {
+    console.log('getlocation',getlocation,'为空');
+    }
+});
+
+
+}
+
+function setTitle(title) {
+    return bridge.call('provide_title',title);
+}                  
+function selectOnblur(){
+    if(is_form.value == '1'){
+        return;
+    }
+    selectflag.value = !selectflag.value;
+    selectImg.value = selectflag.value ?'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923309.png':'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png';
+  
+}
+// input 失焦触发事件 
+function inputOnblur(){
+    if(inputValue.value && inputValue.value.includes("https") ){
+        inputError.value = false;
+        inputImg.value = 'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923307.png';
+    }else{
+        inputError.value = true ;
+        inputImg.value = 'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923306.png';
+    }
+}
+
+// 下拉框2 点击事件
+function selectsecOnblur(){
+    if(is_form.value == '1'){
+        return;
+    }
+    selectsecflag.value = !selectsecflag.value;
+    selectImg2.value = selectsecflag.value ?'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923309.png':'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png';
+}
+function selectOneVlue(item){
+    selectValue.value = item;
+    selectImg.value ='https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png';
+    selectflag.value = false;
+}
+// 下拉框2 选中内容事件
+function selectSecVlue(item){
+    selectsecValue.value = item;
+    selectImg2.value ='https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923310.png';
+    selectsecflag.value = false;
+}
+
+// 遮罩显示or隐藏
+function downPopup(){
+    popupShow.value =false;
+}
+function downSecPopup(){
+    popupSecShow.value =false;
+}
+
+// 提交按钮
+function submit(){
+    if(!judgeLogin()) {
+        return;
+    };
+    if(is_form.value == '1' && is_punch.value == '1' ){
+        return;
+    }
+    if(selectValue.value =="" || inputValue.value =="" || selectsecValue.value=="" || inputError.value ){
+        popupErrorShow.value=true;
+        popupShow.value =true;
+        return;    
+    }else if(is_punch.value == '0'){
+        popupSecShowContent.value=true;
+        popupSecShow.value =true;
+        return;    
+    }
+    postForm({
+        input_value:inputValue.value, 	//具体的表单信息
+        select_value:selectValue.value,
+        select_secvalue:selectsecValue.value
+    }).then((res)=>{
+        if(res.msg == 'success'){
+        is_form.value='1';
+        popupShow.value =false;
+        popupSecShow.value= true;
+        popupSecShowContent.value=false;
+        }
+    })
+}
+// 初始化获取接口 
+function init() {
+  
+    axios.all([getLocation({}),getClockIn({})]).then(axios.spread(function (pointsRes, res2) {
+           console.log('res1',pointsRes.data); // 获取商店经纬度
+           console.log('res2',res2.data); // 是否填表单与签到
+        //    pointsRes.data = {
+        //     location:'location1',
+        //     lat1:40.7463600563136,
+        //     lon1:-73.9906066509524,
+        //     location2:'location1',
+        //     lat2:40.64901572756083,
+        //     lon2:-73.95819522348523
+        //    };
+
+           targetLocation.value = pointsRes.data;
+        //    res2.data={
+        //     is_punch:'0',
+        //     is_form:'1',
+        //     input_value:'hello',
+        //     select_value:'aaaaa',
+        //     select_secvalue:'ccccc'
+        //    }
+           selectValue.value = res2.data.select_value;
+           inputValue.value =res2.data.input_value;
+           selectsecValue.value =res2.data.select_secvalue;
+           is_punch.value =res2.data.is_punch;
+           is_form.value =res2.data.is_form;
+           // 页面初始化 判断是否填写过表单
+            if(inputValue.value){
+                inputImg.value = 'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923307.png';
+                }else{
+                 inputImg.value = 'https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923306.png';
+            }
+        }));
+}
+
+function expiredTokenHandler(err) {
+    if(err.code === -1) {
+        Dialog.confirm({
+            title: 'Notice',
+            message: 'Expired Token. Please sign in again.',
+            confirmButtonText: 'TO SIGN IN',
+            cancelButtonText: 'CANCEL'
+        })
+        .then(() => {
+            // on confirm
+            bridge.call('present_LoginC',(ret) => {
+                window.sessionStorage.setItem('usertoken', ret);
+                init();
+            });
+        })
+        .catch(() => {
+            // on cancel
+            console.log('CANCEL');
+        });
+    }
+}
+// 是否登录
+function judgeLogin() {
+    var userToken = window.sessionStorage.getItem('usertoken');
+    if(!userToken) {
+        Dialog.confirm({
+            title: 'Notice',
+            message: 'If you want to take part in the activity, you must sign in.',
+            confirmButtonText: 'TO SIGN IN',
+            cancelButtonText: 'CANCEL'
+        })
+        .then(() => {
+            // on confirm
+            bridge.call('present_LoginC',(ret) => {
+                window.sessionStorage.setItem('usertoken', ret);
+                init();
+            });
+        })
+        .catch(() => {
+            // on cancel
+            console.log('CANCEL');
+        });
+    }
+    return !!userToken;
+}
+function cheshi(){
+    if(is_form.value == '1'){
+        return true;
+    }
+    return false;
+}
+function mapLocation(data){
+    if(data == '0'){
+        bridge.call('getNavigation',{
+            lon: targetLocation.value.lon1, // ,
+            lat: targetLocation.value.lat1, //,
+            name: targetLocation.value.location,//,
+        })
+    }else if (data == '1'){
+        bridge.call('getNavigation',{
+            lon: targetLocation.value.lon2,// ,
+            lat: targetLocation.value.lat12,//,
+            name: targetLocation.value.location2// ,
+        })
+    }
+}
+function toCoupons(){
+    bridge.call('goto_pushCouponsVC',{});
+}
 </script>
 
 <template>
-<h1> home页面</h1>
-
+    <div class="punchin-page" >
+        <div class="punchin-body" >
+            <div class="punchin-body-top" >
+                <img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923300.png" alt="">
+                <!-- <img class="punchin-body-location" src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923308.png" alt=""> -->
+                <div class="punchin-body-top-location" >
+                      <div class="location-top"  >
+                        <div @click="mapLocation('0')"><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923303.png" alt=""> 819 6th Avenue New York, 10001 </div>
+                        <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923305.png" alt=""> 646-682-9997 </div>
+                      </div>
+                      <div class="location-bottom" >
+                        <div @click="mapLocation('1')"><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923303.png" alt="">  933 Flatbush Avenue Brooklyn, NY 11226</div>
+                        <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923305.png" alt=""> 347-365-6311 </div>
+                      </div>  
+                </div>
+            </div>
+           
+            <div class="punchin-body-content" >
+                <div class="content-punchin" @click="markIn()" >
+                    Mark  <img :src="`https://cdn.alipearlhair.com/media/wysiwyg/zpage/168992330${is_punch == '1' ?  '4' : '3' }.png` " alt="">
+                  
+                </div>
+                <p class="punchin-body-content-p"  >CONTENT</p>
+                <cell-group inset>
+                    <field v-model="inputValue"  label=""  @blur="inputOnblur()" :right-icon="inputImg" placeholder="* Paste your Content link here" :readonly="cheshi()" />
+                </cell-group>
+                <div class="selectOne input-error" v-show="inputError" > 
+                    <p>*INVALID! PLS MAKE SURE YOUR LINK IS CORRECT!</p>
+                    </div>
+                <p>HOW DO YOU KNOW THIS EVENT?</p>
+                <cell-group inset>
+                    <field v-model="selectValue"  label=""  @click="selectOnblur()" :readonly="true"  :right-icon="selectImg" placeholder="* FILL IN THE CONTENT" />
+                </cell-group>
+                <div class="selectOne" v-show="selectflag" >
+                    <p v-for="(item,index) in showselect " @click="selectOneVlue(item)"  >{{ item }}</p>
+                    <!-- <p>Alipearl Offline Store</p>
+                    <p>Alipearl Online Store</p>
+                    <p>From friends</p> -->
+                </div>
+                <p>SALES’NAME</p>
+                <cell-group inset>
+                    <field v-model="selectsecValue"  label=""  @click="selectsecOnblur()" :readonly="true"  :right-icon="selectImg2" placeholder="* FILL IN THE CONTENT" />
+                </cell-group>
+                <div class="selectOne" v-show="selectsecflag" >
+                    <p v-for="(item,index) in showsecselect " @click="selectSecVlue(item)"  >{{ item }}</p>
+                    <!-- <p>Alipearl Offline Store</p>
+                    <p>Alipearl Online Store</p>
+                    <p>From friends</p> -->
+                </div>
+                <button @click="submit()" :class="(is_form =='1' && is_punch=='1')? 'sub-success':''  " >{{ (is_form =='1' && is_punch=='1') ?'COMPLETE':'SUBMIT' }} </button>
+            </div>
+            <!-- <div class="punchin-body-bottom" >
+                <img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923301.png" alt="">
+                <p>WHAT WILL YOU GET?</p>
+                <div class="punchin-body-bottom-box" >
+                    <div>100 POINTS <br>
+                        MARK THE <br>
+                        PLACE
+                    </div>
+                    <div>15% OFF <br>
+                        FILL CONTENT <br>
+                        ABOVE
+                    </div>
+                </div>
+            </div> -->
+            <img class="bottom-img" src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923311.png" alt="">
+        </div>
+    </div>
+    <Popup v-model:show="popupShow">
+        <div class="errorPopup" >
+            <div  >
+                <img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923312.png" @click="downPopup()" alt="">
+                <p v-if="popupErrorShow" >Can't submit now! <br>Pls finish filling all <br> contents~</p>
+                <p v-else> You're not in the <br> vicinity of the store! </p>
+            </div>
+        </div>
+    </Popup>
+    <Popup v-model:show="popupSecShow">
+        <div class="popupsecshow" >
+            <div class="popupsecshow-img" >
+                <img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923312.png" @click="downSecPopup()" alt="">
+            </div>
+            <div v-if="popupSecShowContent" class="popupsecshow-content">
+                    <p>You haven't mark the place yet.</p>
+                    <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923303.png" alt=""> 819 6th Avenue New York, 10001 </div>
+                    <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923305.png" alt=""> 646-682-9997 </div>
+                    <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923303.png" alt=""> 933 Flatbush Avenue Brooklyn, NY 11226 </div>
+                    <div><img src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923305.png" alt=""> 347-365-6311 </div>
+                    <div class="content-punchin markbutton" @click="markIn('popup')" >
+                    Mark  <img :src="`https://cdn.alipearlhair.com/media/wysiwyg/zpage/168992330${is_punch == '1' ?  '4' : '3' }.png` " alt="">
+                </div>
+            </div>
+            <div v-else class="popupsecshow-content">
+                <img class="popupsecshow-content-img" src="https://cdn.alipearlhair.com/media/wysiwyg/zpage/1689923313.png" alt="">
+                <button @click="toCoupons()" >CHECK NOW</button>
+            </div>
+        </div>
+    </Popup>
 </template>
 
 <style scoped lang="css" >

+ 262 - 3
src/view/Home/home.css

@@ -1,4 +1,263 @@
-h1{
-    height: 2rem;
-    color: pink ;
+.punchin-page{
+    box-sizing: border-box;
+    width: 100%;
+}
+.punchin-body-top img{
+    width: 100%;
+    height: 4rem;
+    display: block;
+}
+.punchin-body-top .punchin-body-location{
+    height: 2.08rem;
+}
+.punchin-body-top-location{
+    display: flex;
+    flex-direction: column;
+    justify-content: space-evenly;
+    align-items: center;
+    font-size: 0.32rem;
+    font-family: Rokkitt-Regular, Rokkitt;
+    font-weight: 400;
+    background-color: #FFF5F0;
+    height: 2.08rem;
+}
+.punchin-body-top-location img{
+    width: 0.64rem;
+    height: 0.64rem;
+}
+.location-top, .location-bottom{
+    width: 100%;
+    box-sizing: border-box;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding-left:0.4rem ;
+    line-height: 0.64rem;
+}
+.location-top{
+    padding-right:0.48rem ;
+}
+.location-top div {
+    height: 0.64rem;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.location-bottom{
+    padding-right: 0.5333rem;
+}
+.location-bottom div{
+    height: 0.64rem;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.punchin-body-content{
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0.8rem .5333rem;
+}
+.content-punchin{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background-color: #FFECE2;
+    font-size: .4267rem;
+    font-family: Rokkitt-Bold, Rokkitt;
+    font-weight: bold;
+    height: 1.0667rem;
+}
+.content-punchin img{
+    width: 0.64rem;
+    height: 0.64rem;
+}
+.punchin-body-content p{
+    text-align: center;
+    font-size: .4267rem;
+    font-family: Rokkitt-Bold, Rokkitt;
+    font-weight: bold;
+    margin: 0.8rem  0;
+}
+.punchin-body-content .punchin-body-content-p{
+    margin-bottom: 0.5333rem;
+}
+.van-cell{
+    border-bottom: 1px solid #000;
+    background-color: #F8F8F8;
+} 
+.van-cell-group--inset{
+    margin: 0;
+}
+.selectOne{
+    background-color: #F8F8F8;
+    box-sizing: border-box;
+    padding: 0.5333rem 0.4rem ; 
+}
+.selectOne p{
+    font-size: 0.3733rem;
+    font-family: Rokkitt-Regular, Rokkitt;
+    font-weight: 400;
+    margin: 0.5333rem 0;
+    text-align: start;
+}
+.punchin-body-content .input-error{
+    background-color: #fff;
+    color: #FF5900;
+    padding-bottom: 0;
+}
+.punchin-body-content .input-error p{
+    font-size: 0.32rem;
+}
+.selectOne p:first-child{
+    margin-top: 0;
+}
+.selectOne p:last-child{
+    margin:0 ;
+}
+.punchin-body-content button{
+    height: 1.2rem;
+    background-color: #000;
+    color: #fff;
+    width: 100%;
+    margin-top: 0.8rem;
+    font-size: 0.48rem;
+    font-family: Rokkitt-Medium, Rokkitt;
+    font-weight: 500;
+}
+.punchin-body-content .sub-success{
+    background-color: #30BF39;
+}
+.punchin-body-bottom{
+    padding: 0.5333rem;
+    background-color: #fff;
+    opacity: 0.8;
+    height: 6.16rem;
+    box-sizing: border-box;
+    /* display: flex;
+    flex-direction: column;
+    justify-content: space-evenly;
+    align-items: center; */
+}
+.punchin-body-bottom img{
+    width:0.6933rem ;
+    height: 1.2267rem;
+    display: block;
+    margin: 0 auto;
+}
+.punchin-body-bottom p{
+    font-size: .4267rem;
+    font-family: Rokkitt-Bold, Rokkitt;
+    font-weight: bold;
+    text-align: center;
+    margin: 0.5333rem 0;
+}
+.punchin-body-bottom-box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    font-size: 0.48rem;
+    font-family: Rokkitt-Bold, Rokkitt;
+    font-weight: bold;
+    color: #FF5900;
+}
+.punchin-body-bottom-box div{
+    background-color: #FFD1B9;
+    width: 4.23rem;
+    height: 2.32rem;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    text-align: center;
+}
+.bottom-img{
+    display: block;
+    width: 100%;
+    height: 30.6933rem;
+}
+.errorPopup{
+    background-color: #FFD1B9;
+    width: 4.8rem;
+    height: 4.8rem;
+    padding: 0.8rem 0.5333rem 0;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;
+    font-size: 0.4267rem;
+    font-family: Rokkitt-Regular, Rokkitt;
+    font-weight: 400;
+    text-align: center;
+}
+.errorPopup img{
+    width: 0.64rem ;
+    height: 0.64rem;
+    margin-bottom: 0.5867rem;
+}
+.popupsecshow{
+    width: 9.2rem;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;  
+}
+.popupsecshow-img{
+    height: 1.6rem;
+    width: 100%;
+    background-color: #FFF5F0;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.popupsecshow-img img{
+    width: 0.64rem ;
+    height: 0.64rem;
+    display: block;
+}
+.popupsecshow-content{
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;
+    padding: 0.8rem 0.533rem ;
+}
+.popupsecshow-content p{
+    font-size: 0.5333rem;
+    font-family: Rokkitt-SemiBold, Rokkitt;
+    font-weight: 600;
+    margin-bottom: 0.2667rem;
+}
+.popupsecshow-content div img{
+    width: 0.64rem ;
+    height: 0.64rem;
+}
+.popupsecshow-content div{
+    margin: 0.2667rem;
+    display: flex;
+    align-items: center;
+    width: 100%;
+    padding-left: 0.72rem;
+    font-size: 0.32rem;
+    font-family: Rokkitt-Regular, Rokkitt;
+    font-weight: 400;
+    line-height: 0.64rem;
+}
+.popupsecshow-content .markbutton{
+    width: 100%;
+    box-sizing: border-box;
+    margin-top: 0.2667rem;
+    padding-left: 0;
+}
+.popupsecshow-content-img{
+    width: 7.2533rem;
+    height:2.6667rem ;
+    display: block;
+    margin: auto;
+}
+.popupsecshow-content button{
+    width: 100%;
+    height: 0.9333rem;
+    margin-top: 0.8rem;
+    background-color: #000;
+    color: #fff;
 }

+ 1 - 1
src/view/Test/Test.vue

@@ -10,7 +10,7 @@ const rotating = ref(true);
 </script>
 
 <template>
- 
+ <router-link to="/">Go to Home</router-link>
 <div class="lucky-wheel-root-inner rotating">
     dfgdfgf
 </div>

+ 14 - 28
vite.config.js

@@ -2,6 +2,12 @@ import { resolve } from 'path';
 import { defineConfig } from 'vite';
 import vue from '@vitejs/plugin-vue';
 // import styleImport, { VantResolve } from 'vite-plugin-style-import';
+import Components from 'unplugin-vue-components/vite';
+import {
+  AntDesignVueResolver,
+  ElementPlusResolver,
+  VantResolver,
+} from 'unplugin-vue-components/resolvers'
 function pathResolve(dir) {
   return resolve(__dirname, dir);
 }
@@ -22,33 +28,13 @@ export default defineConfig({
     },
     plugins: [
       vue(),
-      // styleImport({
-      //   // vant
-      //   libs: [
-      //     {
-      //       libraryName: 'vant',
-      //       esModule: true,
-      //       // https://github.com/anncwb/vite-plugin-style-import/issues/52
-      //       resolveStyle: (name) => `../es/${name}/style/index`,
-      //       // resolveStyle: (name) => `../node_modules/vant/es/${name}/style/index`, // 如果报找不到vant可以改用上面的路径
-      //     },
-      //   ],
-      //   // nutui
-
-
-      //   // libs: [
-      //   //   {
-      //   //     libraryName: '@nutui/nutui',
-      //   //     libraryNameChangeCase: 'pascalCase',
-      //   //     resolveStyle: (name) => {
-      //   //       return `@nutui/nutui/dist/packages/${name}/index.scss`
-      //   //     }
-      //   //   }
-      //   // ]
-
-
-        
-      // }),
+      Components({
+        resolvers: [
+          AntDesignVueResolver(),
+          ElementPlusResolver(),
+          VantResolver(),
+        ],
+      }),
     ],
     css: {
       preprocessorOptions: {
@@ -65,7 +51,7 @@ export default defineConfig({
         //   '/api': 'http://www.myblog.com/api',
           // 选项写法
           '/app-api': {
-            target: 'htttps:alipearlapp.snjon.com',
+            target: 'https:alipearlapp.snjon.com',
             // "https://ios.alipearlhair.com",//正式站    'http://www.myblog.com',
             changeOrigin: true, // 设置成false报错
             // rewrite: (path) => {