Explorar el Código

chore: 依赖及配置调整

zhangyuhan hace 1 año
padre
commit
44c800361f
Se han modificado 6 ficheros con 54 adiciones y 23 borrados
  1. 11 1
      config/index.js
  2. 6 4
      package.json
  3. 2 0
      src/app.config.js
  4. 7 0
      src/app.js
  5. 0 1
      src/components/login/useLogin.vue
  6. 28 17
      yarn.lock

+ 11 - 1
config/index.js

@@ -29,7 +29,9 @@ export default defineConfig(async (merge, { command, mode }) => {
           pxtransformBlackList: [/demo-/, /van-/]
         }
       ],
-      "@tarojs/plugin-http"
+      ["@tarojs/plugin-http", {
+        enableCookie: true
+      }]
     ],
     sass: {
       data: `@import "@/assets/style/_variables.scss";`
@@ -50,6 +52,14 @@ export default defineConfig(async (merge, { command, mode }) => {
           from: "src/components/vant-weapp/button",
           to: "dist/components/vant-weapp/button",
         },
+        {
+          from: "src/components/vant-weapp/radio",
+          to: "dist/components/vant-weapp/radio",
+        },
+        {
+          from: "src/components/vant-weapp/radio-group",
+          to: "dist/components/vant-weapp/radio-group",
+        },
         {
           from: "src/components/vant-weapp/info",
           to: "dist/components/vant-weapp/info",

+ 6 - 4
package.json

@@ -12,7 +12,8 @@
   "scripts": {
     "build:weapp": "taro build --type weapp",
     "build:h5": "taro build --type h5",
-    "dev:weapp": "NODE_ENV=production npm run build:weapp -- --watch",
+    "dev:pord-weapp": "NODE_ENV=production npm run build:weapp -- --watch",
+    "dev:weapp": "npm run build:weapp -- --watch",
     "dev:h5": "npm run build:h5 -- --watch"
   },
   "browserslist": [
@@ -36,9 +37,10 @@
     "axios": "^1.7.2",
     "lodash": "^4.17.21",
     "vant": "2.13.2",
-    "vue": "2.6.14",
-    "vue-template-compiler": "2.6.14",
-    "vuex": "^3.0.0"
+    "vue": "2.7.16",
+    "vue-template-compiler": "2.7.16",
+    "vuex": "^3.0.0",
+    "dayjs": "1.11.11"
   },
   "devDependencies": {
     "@babel/core": "^7.8.0",

+ 2 - 0
src/app.config.js

@@ -11,6 +11,8 @@ export default defineAppConfig({
     // 订单功能
     "pages/order/create/index",
     "pages/order/pay/index",
+    // 省份选择
+    "pages/select-area/index",
     // 其他测试页面
     "pages/extra/index"
   ],

+ 7 - 0
src/app.js

@@ -2,11 +2,18 @@
 import Vue from 'vue'
 import store from './store/index'
 import './app.scss'
+import Taro from "@tarojs/taro";
 
 const App = {
   store,
+  mounted() {
+    document.cookie = 'SESSIONID=2ad91f8fe86d66cd7737f8a83f783c0c9298112c;'
+    Taro.cloud.init();
+  },
   onShow (options) {
     console.log('App onShow.')
+    this.$store.commit('env/doGetEnv')
+    this.$store.dispatch('user/doInit')
   },
   render(h) {
     // this.$slots.default 是将要会渲染的页面

+ 0 - 1
src/components/login/useLogin.vue

@@ -47,7 +47,6 @@ export default {
           duration: 2000
         })
       }
-
     }
   }
 }

+ 28 - 17
yarn.lock

@@ -261,7 +261,7 @@
     js-tokens "^4.0.0"
     picocolors "^1.0.0"
 
-"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.7", "@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.24.4", "@babel/parser@^7.24.6":
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.7", "@babel/parser@^7.20.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.5", "@babel/parser@^7.24.4", "@babel/parser@^7.24.6":
   version "7.24.6"
   resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328"
   integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==
@@ -2752,6 +2752,17 @@
     "@vue/compiler-core" "3.4.27"
     "@vue/shared" "3.4.27"
 
+"@vue/compiler-sfc@2.7.16":
+  version "2.7.16"
+  resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz#ff81711a0fac9c68683d8bb00b63f857de77dc83"
+  integrity sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==
+  dependencies:
+    "@babel/parser" "^7.23.5"
+    postcss "^8.4.14"
+    source-map "^0.6.1"
+  optionalDependencies:
+    prettier "^1.18.2 || ^2.0.0"
+
 "@vue/compiler-sfc@^3.3.4":
   version "3.4.27"
   resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.27.tgz#399cac1b75c6737bf5440dc9cf3c385bb2959701"
@@ -4386,7 +4397,7 @@ cssstyle@^3.0.0:
   dependencies:
     rrweb-cssom "^0.6.0"
 
-csstype@^3.1.1:
+csstype@^3.1.0, csstype@^3.1.1:
   version "3.1.3"
   resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
   integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
@@ -4412,6 +4423,11 @@ data-urls@^4.0.0:
     whatwg-mimetype "^3.0.0"
     whatwg-url "^12.0.0"
 
+dayjs@1.11.11:
+  version "1.11.11"
+  resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz#dfe0e9d54c5f8b68ccf8ca5f72ac603e7e5ed59e"
+  integrity sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==
+
 de-indent@^1.0.2:
   version "1.0.2"
   resolved "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
@@ -6105,7 +6121,7 @@ hasown@^2.0.0:
   dependencies:
     function-bind "^1.1.2"
 
-he@^1.1.0, he@^1.2.0:
+he@^1.2.0:
   version "1.2.0"
   resolved "https://registry.npmmirror.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
   integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
@@ -8711,7 +8727,7 @@ postcss@^7.0.14, postcss@^7.0.23, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0
     picocolors "^0.2.1"
     source-map "^0.6.1"
 
-postcss@^8.2.14, postcss@^8.3.5, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.33, postcss@^8.4.38:
+postcss@^8.2.14, postcss@^8.3.5, postcss@^8.4.14, postcss@^8.4.18, postcss@^8.4.19, postcss@^8.4.33, postcss@^8.4.38:
   version "8.4.38"
   resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
   integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
@@ -10611,15 +10627,7 @@ vue-style-loader@^4.1.0:
     hash-sum "^1.0.2"
     loader-utils "^1.0.2"
 
-vue-template-compiler@2.6.14:
-  version "2.6.14"
-  resolved "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz#a2f0e7d985670d42c9c9ee0d044fed7690f4f763"
-  integrity sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==
-  dependencies:
-    de-indent "^1.0.2"
-    he "^1.1.0"
-
-vue-template-compiler@^2.x:
+vue-template-compiler@2.7.16, vue-template-compiler@^2.x:
   version "2.7.16"
   resolved "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b"
   integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==
@@ -10632,10 +10640,13 @@ vue-template-es2015-compiler@^1.9.0:
   resolved "https://registry.npmmirror.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
   integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
 
-vue@2.6.14:
-  version "2.6.14"
-  resolved "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
-  integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
+vue@2.7.16:
+  version "2.7.16"
+  resolved "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz#98c60de9def99c0e3da8dae59b304ead43b967c9"
+  integrity sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==
+  dependencies:
+    "@vue/compiler-sfc" "2.7.16"
+    csstype "^3.1.0"
 
 vuex@^3.0.0:
   version "3.6.2"