6 Commits 1e43a5e0c4 ... 0bb1c40d69

Autor SHA1 Nachricht Datum
  listKer 0bb1c40d69 feat: 新增亦可直接付款 vor 2 Jahren
  黎海 05f66ffcd3 feat: 修复 门店检测的问题 vor 2 Jahren
  黎海 52beddc976 feat: 上线 vor 2 Jahren
  黎海 fc537ba559 feat: 试测 vor 2 Jahren
  黎海 f5b8596482 Merge branch 'hlg/20220512' of http://code.qutaovip.com/lihai/pad_spa into lihai vor 2 Jahren
  黎海 6cf267ecf6 feat: 。。 vor 2 Jahren

+ 115 - 29
package-lock.json

@@ -13,6 +13,7 @@
13 13
         "element-ui": "^2.8.2",
14 14
         "js-cookie": "^3.0.1",
15 15
         "qrcodejs2": "0.0.2",
16
+        "vant": "^2.12.47",
16 17
         "vue": "^2.6.6",
17 18
         "vue-infinite-scroll": "^2.0.2",
18 19
         "vue-router": "^3.0.1",
@@ -957,7 +958,6 @@
957 958
       "version": "7.4.4",
958 959
       "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.4.4.tgz",
959 960
       "integrity": "sha1-3C40mC6yNoA6onoH/qaFevG5Fx0=",
960
-      "dev": true,
961 961
       "dependencies": {
962 962
         "regenerator-runtime": "^0.13.2"
963 963
       }
@@ -1974,6 +1974,15 @@
1974 1974
         "node": ">= 6"
1975 1975
       }
1976 1976
     },
1977
+    "node_modules/@popperjs/core": {
1978
+      "version": "2.11.5",
1979
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
1980
+      "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==",
1981
+      "funding": {
1982
+        "type": "opencollective",
1983
+        "url": "https://opencollective.com/popperjs"
1984
+      }
1985
+    },
1977 1986
     "node_modules/@soda/friendly-errors-webpack-plugin": {
1978 1987
       "version": "1.8.1",
1979 1988
       "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz",
@@ -2195,6 +2204,19 @@
2195 2204
       "integrity": "sha1-mqMMBNshKpoGSdaub9UKzMQHSKE=",
2196 2205
       "dev": true
2197 2206
     },
2207
+    "node_modules/@vant/icons": {
2208
+      "version": "1.8.0",
2209
+      "resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
2210
+      "integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
2211
+    },
2212
+    "node_modules/@vant/popperjs": {
2213
+      "version": "1.1.0",
2214
+      "resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
2215
+      "integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
2216
+      "dependencies": {
2217
+        "@popperjs/core": "^2.9.2"
2218
+      }
2219
+    },
2198 2220
     "node_modules/@vue/babel-helper-vue-jsx-merge-props": {
2199 2221
       "version": "1.0.0-beta.3",
2200 2222
       "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0-beta.3.tgz",
@@ -8748,7 +8770,7 @@
8748 8770
     },
8749 8771
     "node_modules/fsevents/node_modules/code-point-at": {
8750 8772
       "version": "1.1.0",
8751
-      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
8773
+      "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
8752 8774
       "dev": true,
8753 8775
       "inBundle": true,
8754 8776
       "optional": true,
@@ -8758,21 +8780,21 @@
8758 8780
     },
8759 8781
     "node_modules/fsevents/node_modules/concat-map": {
8760 8782
       "version": "0.0.1",
8761
-      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
8783
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
8762 8784
       "dev": true,
8763 8785
       "inBundle": true,
8764 8786
       "optional": true
8765 8787
     },
8766 8788
     "node_modules/fsevents/node_modules/console-control-strings": {
8767 8789
       "version": "1.1.0",
8768
-      "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
8790
+      "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
8769 8791
       "dev": true,
8770 8792
       "inBundle": true,
8771 8793
       "optional": true
8772 8794
     },
8773 8795
     "node_modules/fsevents/node_modules/core-util-is": {
8774 8796
       "version": "1.0.2",
8775
-      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
8797
+      "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
8776 8798
       "dev": true,
8777 8799
       "inBundle": true,
8778 8800
       "optional": true
@@ -8800,14 +8822,14 @@
8800 8822
     },
8801 8823
     "node_modules/fsevents/node_modules/delegates": {
8802 8824
       "version": "1.0.0",
8803
-      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
8825
+      "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
8804 8826
       "dev": true,
8805 8827
       "inBundle": true,
8806 8828
       "optional": true
8807 8829
     },
8808 8830
     "node_modules/fsevents/node_modules/detect-libc": {
8809 8831
       "version": "1.0.3",
8810
-      "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
8832
+      "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
8811 8833
       "dev": true,
8812 8834
       "inBundle": true,
8813 8835
       "optional": true,
@@ -8830,14 +8852,14 @@
8830 8852
     },
8831 8853
     "node_modules/fsevents/node_modules/fs.realpath": {
8832 8854
       "version": "1.0.0",
8833
-      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
8855
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
8834 8856
       "dev": true,
8835 8857
       "inBundle": true,
8836 8858
       "optional": true
8837 8859
     },
8838 8860
     "node_modules/fsevents/node_modules/gauge": {
8839 8861
       "version": "2.7.4",
8840
-      "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
8862
+      "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==",
8841 8863
       "dev": true,
8842 8864
       "inBundle": true,
8843 8865
       "optional": true,
@@ -8872,7 +8894,7 @@
8872 8894
     },
8873 8895
     "node_modules/fsevents/node_modules/has-unicode": {
8874 8896
       "version": "2.0.1",
8875
-      "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
8897
+      "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
8876 8898
       "dev": true,
8877 8899
       "inBundle": true,
8878 8900
       "optional": true
@@ -8902,7 +8924,7 @@
8902 8924
     },
8903 8925
     "node_modules/fsevents/node_modules/inflight": {
8904 8926
       "version": "1.0.6",
8905
-      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
8927
+      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
8906 8928
       "dev": true,
8907 8929
       "inBundle": true,
8908 8930
       "optional": true,
@@ -8913,7 +8935,7 @@
8913 8935
     },
8914 8936
     "node_modules/fsevents/node_modules/inherits": {
8915 8937
       "version": "2.0.3",
8916
-      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
8938
+      "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
8917 8939
       "dev": true,
8918 8940
       "inBundle": true,
8919 8941
       "optional": true
@@ -8931,7 +8953,7 @@
8931 8953
     },
8932 8954
     "node_modules/fsevents/node_modules/is-fullwidth-code-point": {
8933 8955
       "version": "1.0.0",
8934
-      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
8956
+      "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==",
8935 8957
       "dev": true,
8936 8958
       "inBundle": true,
8937 8959
       "optional": true,
@@ -8944,7 +8966,7 @@
8944 8966
     },
8945 8967
     "node_modules/fsevents/node_modules/isarray": {
8946 8968
       "version": "1.0.0",
8947
-      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
8969
+      "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
8948 8970
       "dev": true,
8949 8971
       "inBundle": true,
8950 8972
       "optional": true
@@ -8964,7 +8986,7 @@
8964 8986
     },
8965 8987
     "node_modules/fsevents/node_modules/minimist": {
8966 8988
       "version": "0.0.8",
8967
-      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
8989
+      "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==",
8968 8990
       "dev": true,
8969 8991
       "inBundle": true,
8970 8992
       "optional": true
@@ -8992,7 +9014,7 @@
8992 9014
     },
8993 9015
     "node_modules/fsevents/node_modules/mkdirp": {
8994 9016
       "version": "0.5.1",
8995
-      "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
9017
+      "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==",
8996 9018
       "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
8997 9019
       "dev": true,
8998 9020
       "inBundle": true,
@@ -9054,7 +9076,7 @@
9054 9076
     },
9055 9077
     "node_modules/fsevents/node_modules/nopt": {
9056 9078
       "version": "4.0.1",
9057
-      "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
9079
+      "integrity": "sha512-+5XZFpQZEY0cg5JaxLwGxDlKNKYxuXwGt8/Oi3UXm5/4ymrJve9d2CURituxv3rSrVCGZj4m1U1JlHTdcKt2Ng==",
9058 9080
       "dev": true,
9059 9081
       "inBundle": true,
9060 9082
       "optional": true,
@@ -9099,7 +9121,7 @@
9099 9121
     },
9100 9122
     "node_modules/fsevents/node_modules/number-is-nan": {
9101 9123
       "version": "1.0.1",
9102
-      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
9124
+      "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==",
9103 9125
       "dev": true,
9104 9126
       "inBundle": true,
9105 9127
       "optional": true,
@@ -9109,7 +9131,7 @@
9109 9131
     },
9110 9132
     "node_modules/fsevents/node_modules/object-assign": {
9111 9133
       "version": "4.1.1",
9112
-      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
9134
+      "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
9113 9135
       "dev": true,
9114 9136
       "inBundle": true,
9115 9137
       "optional": true,
@@ -9119,7 +9141,7 @@
9119 9141
     },
9120 9142
     "node_modules/fsevents/node_modules/once": {
9121 9143
       "version": "1.4.0",
9122
-      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
9144
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
9123 9145
       "dev": true,
9124 9146
       "inBundle": true,
9125 9147
       "optional": true,
@@ -9129,7 +9151,7 @@
9129 9151
     },
9130 9152
     "node_modules/fsevents/node_modules/os-homedir": {
9131 9153
       "version": "1.0.2",
9132
-      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
9154
+      "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==",
9133 9155
       "dev": true,
9134 9156
       "inBundle": true,
9135 9157
       "optional": true,
@@ -9139,7 +9161,7 @@
9139 9161
     },
9140 9162
     "node_modules/fsevents/node_modules/os-tmpdir": {
9141 9163
       "version": "1.0.2",
9142
-      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
9164
+      "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
9143 9165
       "dev": true,
9144 9166
       "inBundle": true,
9145 9167
       "optional": true,
@@ -9160,7 +9182,7 @@
9160 9182
     },
9161 9183
     "node_modules/fsevents/node_modules/path-is-absolute": {
9162 9184
       "version": "1.0.1",
9163
-      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
9185
+      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
9164 9186
       "dev": true,
9165 9187
       "inBundle": true,
9166 9188
       "optional": true,
@@ -9193,7 +9215,7 @@
9193 9215
     },
9194 9216
     "node_modules/fsevents/node_modules/rc/node_modules/minimist": {
9195 9217
       "version": "1.2.0",
9196
-      "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
9218
+      "integrity": "sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==",
9197 9219
       "dev": true,
9198 9220
       "inBundle": true,
9199 9221
       "optional": true
@@ -16445,8 +16467,7 @@
16445 16467
     "node_modules/regenerator-runtime": {
16446 16468
       "version": "0.13.2",
16447 16469
       "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.2.tgz",
16448
-      "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc=",
16449
-      "dev": true
16470
+      "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc="
16450 16471
     },
16451 16472
     "node_modules/regenerator-transform": {
16452 16473
       "version": "0.13.4",
@@ -19236,6 +19257,26 @@
19236 19257
         "spdx-expression-parse": "^3.0.0"
19237 19258
       }
19238 19259
     },
19260
+    "node_modules/vant": {
19261
+      "version": "2.12.47",
19262
+      "resolved": "https://registry.npmjs.org/vant/-/vant-2.12.47.tgz",
19263
+      "integrity": "sha512-D9QgxirzWuSJbLqU+TGgXRZ88OTmGDEtwxDrBr2JuLCZyijrYzc5KIrErd4c1MJoZsmYupqydyLqotoBkbQDjQ==",
19264
+      "dependencies": {
19265
+        "@babel/runtime": "7.x",
19266
+        "@vant/icons": "^1.7.1",
19267
+        "@vant/popperjs": "^1.1.0",
19268
+        "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
19269
+        "vue-lazyload": "1.2.3"
19270
+      },
19271
+      "peerDependencies": {
19272
+        "vue": ">= 2.6.0"
19273
+      }
19274
+    },
19275
+    "node_modules/vant/node_modules/@vue/babel-helper-vue-jsx-merge-props": {
19276
+      "version": "1.2.1",
19277
+      "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
19278
+      "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
19279
+    },
19239 19280
     "node_modules/vary": {
19240 19281
       "version": "1.1.2",
19241 19282
       "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz",
@@ -19348,6 +19389,11 @@
19348 19389
         "vue-template-compiler": "^2.x"
19349 19390
       }
19350 19391
     },
19392
+    "node_modules/vue-lazyload": {
19393
+      "version": "1.2.3",
19394
+      "resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
19395
+      "integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
19396
+    },
19351 19397
     "node_modules/vue-loader": {
19352 19398
       "version": "15.7.0",
19353 19399
       "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.7.0.tgz",
@@ -21891,7 +21937,6 @@
21891 21937
       "version": "7.4.4",
21892 21938
       "resolved": "https://registry.npm.taobao.org/@babel/runtime/download/@babel/runtime-7.4.4.tgz",
21893 21939
       "integrity": "sha1-3C40mC6yNoA6onoH/qaFevG5Fx0=",
21894
-      "dev": true,
21895 21940
       "requires": {
21896 21941
         "regenerator-runtime": "^0.13.2"
21897 21942
       }
@@ -22673,6 +22718,11 @@
22673 22718
       "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=",
22674 22719
       "dev": true
22675 22720
     },
22721
+    "@popperjs/core": {
22722
+      "version": "2.11.5",
22723
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
22724
+      "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
22725
+    },
22676 22726
     "@soda/friendly-errors-webpack-plugin": {
22677 22727
       "version": "1.8.1",
22678 22728
       "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz",
@@ -22860,6 +22910,19 @@
22860 22910
       "integrity": "sha1-mqMMBNshKpoGSdaub9UKzMQHSKE=",
22861 22911
       "dev": true
22862 22912
     },
22913
+    "@vant/icons": {
22914
+      "version": "1.8.0",
22915
+      "resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
22916
+      "integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
22917
+    },
22918
+    "@vant/popperjs": {
22919
+      "version": "1.1.0",
22920
+      "resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.1.0.tgz",
22921
+      "integrity": "sha512-8MD1gz146awV/uPxYjz4pet22f7a9YVKqk7T+gFkWFwT9mEcrIUEg/xPrdOnWKLP9puXyYtm7oVfSDSefZ/p/w==",
22922
+      "requires": {
22923
+        "@popperjs/core": "^2.9.2"
22924
+      }
22925
+    },
22863 22926
     "@vue/babel-helper-vue-jsx-merge-props": {
22864 22927
       "version": "1.0.0-beta.3",
22865 22928
       "resolved": "https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.0.0-beta.3.tgz",
@@ -34654,8 +34717,7 @@
34654 34717
     "regenerator-runtime": {
34655 34718
       "version": "0.13.2",
34656 34719
       "resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.2.tgz",
34657
-      "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc=",
34658
-      "dev": true
34720
+      "integrity": "sha1-MuWcmm+5saSv8JtJMMotRHc0NEc="
34659 34721
     },
34660 34722
     "regenerator-transform": {
34661 34723
       "version": "0.13.4",
@@ -36970,6 +37032,25 @@
36970 37032
         "spdx-expression-parse": "^3.0.0"
36971 37033
       }
36972 37034
     },
37035
+    "vant": {
37036
+      "version": "2.12.47",
37037
+      "resolved": "https://registry.npmjs.org/vant/-/vant-2.12.47.tgz",
37038
+      "integrity": "sha512-D9QgxirzWuSJbLqU+TGgXRZ88OTmGDEtwxDrBr2JuLCZyijrYzc5KIrErd4c1MJoZsmYupqydyLqotoBkbQDjQ==",
37039
+      "requires": {
37040
+        "@babel/runtime": "7.x",
37041
+        "@vant/icons": "^1.7.1",
37042
+        "@vant/popperjs": "^1.1.0",
37043
+        "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
37044
+        "vue-lazyload": "1.2.3"
37045
+      },
37046
+      "dependencies": {
37047
+        "@vue/babel-helper-vue-jsx-merge-props": {
37048
+          "version": "1.2.1",
37049
+          "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
37050
+          "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
37051
+        }
37052
+      }
37053
+    },
36973 37054
     "vary": {
36974 37055
       "version": "1.1.2",
36975 37056
       "resolved": "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz",
@@ -37064,6 +37145,11 @@
37064 37145
         "vue-template-es2015-compiler": "^1.6.0"
37065 37146
       }
37066 37147
     },
37148
+    "vue-lazyload": {
37149
+      "version": "1.2.3",
37150
+      "resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
37151
+      "integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
37152
+    },
37067 37153
     "vue-loader": {
37068 37154
       "version": "15.7.0",
37069 37155
       "resolved": "https://registry.npm.taobao.org/vue-loader/download/vue-loader-15.7.0.tgz",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
16 16
     "element-ui": "^2.8.2",
17 17
     "js-cookie": "^3.0.1",
18 18
     "qrcodejs2": "0.0.2",
19
+    "vant": "^2.12.47",
19 20
     "vue": "^2.6.6",
20 21
     "vue-infinite-scroll": "^2.0.2",
21 22
     "vue-router": "^3.0.1",

+ 1 - 0
public/index.html

@@ -16,5 +16,6 @@
16 16
   <script src="https://ydcommon.51yund.com/vue/axios.min.js"></script>
17 17
   <!-- built files will be auto injected -->
18 18
 </body>
19
+<!-- <script type="text/javascript" src="https://ydcommon.51yund.com/test_web_hd/vendor/vconsole.min.js"></script> -->
19 20
 
20 21
 </html>

+ 0 - 4
src/common/http.js

@@ -23,7 +23,6 @@ axios.defaults.timeout = 10000;
23 23
 
24 24
 // post请求头
25 25
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
26
-console.log(store.state.comVal.token, 'this.$store.state.comVal.token111', localStorage.getItem('token'));
27 26
 axios.defaults.headers.post['token'] = localStorage.getItem('token') || store.state.comVal.token;
28 27
 axios.defaults.headers.get['token'] = localStorage.getItem('token') || store.state.comVal.token;
29 28
 
@@ -120,7 +119,6 @@ function get (url, params) {
120 119
             type: 'error'
121 120
           });
122 121
         }
123
-        console.log(res.data);
124 122
         resolve(res.data);
125 123
       })
126 124
       .catch(err => {
@@ -141,7 +139,6 @@ function post (url, params) {
141 139
   return new Promise((resolve, reject) => {
142 140
     axios.post(reqUrl, QS.stringify(params))
143 141
       .then(res => {
144
-        console.log(res, 'resres');
145 142
         if (res.data.code != 200 && localStorage.getItem('token')) {
146 143
           Message({
147 144
             message: res.data.msg,
@@ -151,7 +148,6 @@ function post (url, params) {
151 148
         resolve(res.data);
152 149
       })
153 150
       .catch(err => {
154
-        console.log(err, 'errerrerr');
155 151
         reject(err.data)
156 152
       })
157 153
   });

+ 1 - 2
src/common/utils.js

@@ -5,6 +5,7 @@ const utils = {
5 5
   },
6 6
   test: function () { },
7 7
   isBack: false,
8
+  //标准时间格式化
8 9
   formatTime: function (date, fmt) {
9 10
     var date = new Date(date);
10 11
     if (/(y+)/.test(fmt)) {
@@ -25,8 +26,6 @@ const utils = {
25 26
     }
26 27
     return fmt;
27 28
   },
28
-
29
-
30 29
 }
31 30
 
32 31
 export default () => {

+ 12 - 7
src/components/common/layout/layout.vue

@@ -6,14 +6,17 @@
6 6
                  @changeIsBack="changeIsBack"></left-menu>
7 7
     </div>
8 8
     <div class="content">
9
-      <header :style="menuIndex==0?'justify-content: space-between;':''">
9
+      <header>
10
+
10 11
         <div class="back-icon"
11 12
              v-if="isback"
12 13
              @click="goBack"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/back.png"
13 14
                alt=""></div>
14
-        <div class="left"
15
-             v-if="menuIndex==0">
16
-          <div class="address">{{userInfo.store_name}}</div>
15
+        <div>
16
+          <div class="left"
17
+               v-if="menuIndex==0">
18
+            <div class="address">{{userInfo.store_name}}</div>
19
+          </div>
17 20
         </div>
18 21
         <div class="right">
19 22
           <div class="news"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/news.png"></div>
@@ -73,7 +76,7 @@ export default {
73 76
     },
74 77
     loginOut () {
75 78
       localStorage.removeItem('token');
76
-      location.reload();
79
+      this.$router.replace('/login')
77 80
     },
78 81
     changeMenu (index) {
79 82
       this.menuIndex = index
@@ -138,6 +141,7 @@ export default {
138 141
   overflow: hidden;
139 142
 
140 143
   header {
144
+    width: 100%;
141 145
     line-height: 50px;
142 146
     font-size: 16px;
143 147
     color: #409eff;
@@ -146,8 +150,7 @@ export default {
146 150
     height: 60px;
147 151
     display: flex;
148 152
     align-items: center;
149
-    justify-content: right;
150
-
153
+    justify-content: space-between;
151 154
     position: relative;
152 155
     .back-icon {
153 156
       position: absolute;
@@ -184,11 +187,13 @@ export default {
184 187
         border-radius: 50%;
185 188
         img {
186 189
           width: 100%;
190
+          border-radius: 50%;
187 191
           display: block;
188 192
         }
189 193
       }
190 194
       .el-dropdown-link {
191 195
         img {
196
+          margin-left: 20px;
192 197
           width: 28px;
193 198
           height: 28px;
194 199
           display: block;

+ 14 - 12
src/components/common/layout/leftMenu.vue

@@ -49,12 +49,14 @@ export default {
49 49
           unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhome.png',
50 50
           icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/home.png'
51 51
 
52
-        }, {
53
-          name: "测肤记录",
54
-          path: "/testSkin",
55
-          unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
56
-          icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
57
-        }, {
52
+        },
53
+        // {
54
+        //   name: "测肤记录",
55
+        //   path: "/testSkin",
56
+        //   unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png',
57
+        //   icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png',
58
+        // },
59
+        {
58 60
           name: "发券中心",
59 61
           path: "/coupon",
60 62
           unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png',
@@ -75,7 +77,7 @@ export default {
75 77
         //   path: "/storeDetection",
76 78
         //   icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/testing.png',
77 79
         //   unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/untesting.png'
78
-        // }, 
80
+        // },   
79 81
         {
80 82
           name: "客户管理",
81 83
           path: "/customerMan",
@@ -88,8 +90,9 @@ export default {
88 90
   },
89 91
   watch: {
90 92
     $route (to, from) {
91
-      let patname = `/${window.location.hash.split('/')[1]}`
92
-      console.log(patname, 'patname', to);
93
+      let patname = `/${to.path.split('/')[1]}`
94
+      console.log(window.location, 'window.location.pathname', to);
95
+
93 96
       this.$emit('changeIsBack', to.meta.isback)
94 97
       this.menu.forEach((item, index) => {
95 98
         if (patname == item.path) {
@@ -100,8 +103,8 @@ export default {
100 103
     }
101 104
   },
102 105
   mounted () {
103
-    let patname = `/${window.location.pathname.split('/')[1]}`
104
-    console.log(patname, 'patname');
106
+    let patname = `/${window.location.hash.substr(1).split('/')[1]}`
107
+    console.log(window.location, 'window.location.pathname', patname);
105 108
     this.menu.forEach((item, index) => {
106 109
       if (patname == item.path) {
107 110
         this.nowIndex = index
@@ -143,7 +146,6 @@ export default {
143 146
 
144 147
 .el-menu-item {
145 148
   margin-left: 8px;
146
-  padding: 0;
147 149
   padding-left: 9px !important;
148 150
   height: auto;
149 151
   line-height: initial;

+ 29 - 29
src/components/modules/helloWorld.vue

@@ -1,40 +1,40 @@
1 1
 <template>
2
-    <div class="hello">
3
-        <h1>{{ msg }},样式由less书写</h1>
4
-        <input type="text" class="common">
5
-        <button @click="test()">点击</button>
6
-    </div>
2
+  <div class="hello">
3
+    <h1>{{ msg }},样式由less书写</h1>
4
+    <input type="text"
5
+           class="common">
6
+    <button @click="test()">点击</button>
7
+  </div>
7 8
 </template>
8 9
 
9 10
 <script>
10 11
 export default {
11
-    name: 'HelloWorld',
12
-    props: {
13
-        msg: String
14
-    },
15
-    data() {
16
-        return {
17
-            
18
-        }
19
-    },
20
-    mounted: function () {
21
-    },
22
-    created: function () {
23
-    },
24
-    methods: {
25
-        test(){
26
-            console.log("点击了")
27
-        }
12
+  name: 'HelloWorld',
13
+  props: {
14
+    msg: String
15
+  },
16
+  data () {
17
+    return {
18
+
19
+    }
20
+  },
21
+  mounted: function () {
22
+  },
23
+  created: function () {
24
+  },
25
+  methods: {
26
+    test () {
28 27
     }
28
+  }
29 29
 }
30 30
 </script>
31 31
 
32 32
 <style lang='less' scoped>
33
-    @import url(../../style/root.less);
34
-    h1 {
35
-        .hei(60px);
36
-        &:hover {
37
-            color: #696;
38
-        }
39
-    }
33
+@import url(../../style/root.less);
34
+h1 {
35
+  .hei(60px);
36
+  &:hover {
37
+    color: #696;
38
+  }
39
+}
40 40
 </style>

Datei-Diff unterdrückt, da er zu groß ist
+ 1644 - 0
src/pages/confirmOrder/addOrder/index.vue


+ 492 - 220
src/pages/confirmOrder/details/index.vue

@@ -84,7 +84,8 @@
84 84
       <div class="project">
85 85
         <div class="project-title">
86 86
           <div>共<span>{{order_data.project_list?order_data.project_list.length:0}}个</span>项目</div>
87
-          <div class="add-project"
87
+          <div v-if="order_data.type!='one'"
88
+               class="add-project"
88 89
                @click="addProject">添加</div>
89 90
         </div>
90 91
         <div class="project-list">
@@ -95,12 +96,12 @@
95 96
             <div class="project-content">
96 97
               <div class="title-price">
97 98
                 <div class="project-tit">{{item.name | ellipsis(14)}}</div>
98
-                <div class="project-price"><span class="min-size">¥</span>{{item.price}}</div>
99
+                <div class="project-price"><span class="min-size">¥</span>{{Number(item.price).toFixed(2)}}</div>
99 100
               </div>
100 101
               <div class="project-tips">{{item.product_names}}</div>
101 102
               <div class="project-zoom">
102 103
                 <div> <span v-if="item.device_name">{{item.device_name}}({{item.room}}){{item.use_time}}分钟</span></div>
103
-                <div><img @click="eidt(item)"
104
+                <div v-if="order_data.type!='one'"><img @click="eidt(item)"
104 105
                        src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/eidt.png">
105 106
                   <img v-if="order_data.project_list.length>1"
106 107
                        @click="deleteProject(item)"
@@ -132,7 +133,6 @@
132 133
             <div class="on-icon">></div>
133 134
           </div>
134 135
 
135
-
136 136
           <!-- <div v-if="order_data.coupon_list&&order_data.coupon_list.length>0">
137 137
             <div class="coupon-ps"
138 138
                  v-for="item,index in order_data.coupon_list"
@@ -143,25 +143,34 @@
143 143
           </div> -->
144 144
 
145 145
           <div v-if="1==1">
146
+            <div>
147
+              <div class="coupon-ps"
148
+                   v-for="item,index in isSelectCoup"
149
+                   :key="index">
150
+                <div>{{item.coupon_name}}</div>
151
+                <div class="cou-price"
152
+                     v-if="item.type==4?true:false">抵扣{{item.projectName}}</div>
153
+                <div class="cou-price"
154
+                     v-if="item.type==3?true:false">抵扣全部项目(除升级包)</div>
155
+                <div class="cou-price"
156
+                     v-if="item.type==2?true:false">¥{{item.price}}</div>
157
+                <div class="cou-price"
158
+                     v-if="item.type==1?true:false">¥{{item.price}}</div>
159
+                <!-- <div class="cou-price">-¥{{price}}</div> -->
160
+              </div>
161
+            </div>
146 162
             <div class="coupon-ps"
147
-                 v-for="item,index in isSelectCoup"
148
-                 :key="index">
149
-              <div>{{item.coupon_name}}</div>
150
-      <div class="cou-price" v-if="item.type==4?true:false">抵扣{{item.projectName}}</div>
151
-      <div class="cou-price" v-if="item.type==3?true:false">抵扣全部项目(除升级包)</div>
152
-      <div class="cou-price" v-if="item.type==2?true:false">¥{{item.price}}</div>
153
-      <div class="cou-price" v-if="item.type==1?true:false">¥{{item.price}}</div>
154
-                    <!-- <div class="cou-price">-¥{{price}}</div> -->
163
+                 v-if="discount!=0">
164
+              <div></div>
165
+              <div v-if="discount!=20"
166
+                   class="cou-price"> {{discount==100?'仪器免费体验':'新人5折优惠'}}</div>
167
+              <div class="cou-price"
168
+                   v-else-if=" isSelectCoup.length&&(order_data.project_list.length - isSelectCoup.length)>=3">{{'任意三个项目8折'}}</div>
155 169
             </div>
156 170
           </div>
157
-
158
-
159
-
160
-
161
-
162 171
         </div>
163 172
         <div class="over-price">
164
-          合计: <span class="price-num"><span class="min-size">¥</span>{{showMoney}}<span class="min-size"></span></span>
173
+          合计: <span class="price-num"><span class="min-size">¥</span>{{isSelectCoup.length>0?showMoney:discountPrice}}<span class="min-size"></span></span>
165 174
         </div>
166 175
       </div>
167 176
       <div class="payment"
@@ -178,7 +187,7 @@
178 187
           <li class="coupon-info"
179 188
               v-for="item,index in couponList"
180 189
               :key="index">
181
-  <!-- 1: '抵扣券',
190
+            <!-- 1: '抵扣券',
182 191
       2: '满减券',
183 192
       3: '全额减免券',
184 193
       4: '项目卡券' -->
@@ -332,11 +341,65 @@
332 341
         </div>
333 342
       </div>
334 343
     </mine-pupop>
344
+    <!-- 支付 -->
345
+    <mine-pupop :show="choicePayType">
346
+      <div class="pay-block">
347
+        <div class="delete-pupop"
348
+             @click="choicePayType=false"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
349
+               alt=""></div>
350
+        <div class="pay-title">选择支付方式</div>
351
+        <div class="pay-price">¥<span>{{isSelectCoup.length>0?showMoney:discountPrice}}</span></div>
352
+        <div class="pay-list">
353
+          <div class="pay-info"
354
+               v-for="item,index in payList"
355
+               @click="changeType(index)"
356
+               :style="item.isSelect?'border: 1px solid #FA7D22;':'border: 1px solid #D0D0D0;'"
357
+               :key="index">
358
+            <div class="pay-left">
359
+              <img :src="item.payImg"
360
+                   alt="">
361
+              <span>{{item.title}}</span>
362
+            </div>
363
+            <div class="pay-right">
364
+              <img :src="item.isSelect?select:unSelect"
365
+                   alt="">
366
+            </div>
367
+          </div>
368
+        </div>
369
+        <div class="pay-button"
370
+             @click="pay">确认</div>
371
+      </div>
372
+    </mine-pupop>
373
+    <!-- 支付状态 -->
374
+    <mine-pupop :show="PayStatus">
375
+      <div class="pay-block">
376
+        <div class="delete-pupop"
377
+             @click="changePayStatus"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/delete.png"
378
+               alt=""></div>
379
+        <div v-if="isPayCode">
380
+          <div class="pay-title">请扫码支付</div>
381
+          <div class="pay-price">¥<span>{{isSelectCoup.length>0?showMoney:discountPrice}}</span></div>
382
+          <div class="banner">
383
+            <div id="qrCode"
384
+                 class="qrCode"
385
+                 ref="qrCodeDiv"></div>
386
+          </div>
387
+        </div>
388
+        <div v-else>
389
+          <div class="pay-title">支付成功</div>
390
+          <div class="pay-suc"><img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/paySuc.png"
391
+                 alt=""></div>
392
+          <div class="pay-button"
393
+               @click="toHome">返回首页</div>
394
+        </div>
395
+      </div>
396
+    </mine-pupop>
335 397
   </div>
336 398
 </template>
337 399
 
338 400
 <script>
339 401
 import minePupop from '../../../components/minePupop/index.vue'
402
+import QRCode from 'qrcodejs2'
340 403
 import api from '../../../server/home'
341 404
 
342 405
 export default {
@@ -367,21 +430,6 @@ export default {
367 430
       },
368 431
       //皮肤状态列表
369 432
       poreList: [
370
-        {
371
-          medium: 133,
372
-          small: 344,
373
-          mini: 242
374
-        },
375
-        {
376
-          medium: 133,
377
-          small: 344,
378
-          mini: 242
379
-        },
380
-        {
381
-          medium: 133,
382
-          small: 344,
383
-          mini: 242
384
-        }
385 433
       ],
386 434
       //优惠券列表
387 435
       couponList: [],
@@ -389,6 +437,27 @@ export default {
389 437
       selectCouponList: [],
390 438
       //已选择优惠券的id(同一个id只能选择一张优惠券)
391 439
       selectCouponListId: [],
440
+      //支付方式
441
+      payList: [
442
+        {
443
+          title: '储值支付',
444
+          pay_way: 'amount',
445
+          payImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/savingsPay.png',
446
+          isSelect: true
447
+        },
448
+        {
449
+          pay_way: 'weixin',
450
+          title: '微信支付',
451
+          payImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/weiXinPay.png',
452
+          isSelect: false
453
+        },
454
+        {
455
+          pay_way: 'alipay',
456
+          title: '支付宝支付',
457
+          payImg: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/zhifubaoPay.png',
458
+          isSelect: false
459
+        },
460
+      ],
392 461
       timesInfo: '',
393 462
       reservationPrice: 0,//预约费用
394 463
       projectInfo: '',
@@ -402,22 +471,25 @@ export default {
402 471
       isProject: false,//是否展示选择项目弹窗
403 472
       isTs: false,//是否展示选择时间弹窗
404 473
       isPore: false,//皮肤状态弹窗
474
+      choicePayType: false,//支付弹窗
475
+      PayStatus: false,//支付状态弹窗
476
+      isPayCode: true,//是否展示支付二维码
405 477
       id: 0,//订单id
478
+      lastProjectPrice: '',//项目已选择的升级包
406 479
       isChange: false,//项目是否有改变
407 480
       isEditProject: false,//是否编辑项目
481
+      payStatusInterval: null,//轮循拉支付状态
408 482
       page: 1,
409 483
       limit: 200,
410
-
411
-
412
-
413
-
414
-    needSelect: false,
415
-    coupSelectType: '',
416
-    productDiscount: '',
417
-    isSelectCoup: [], // 选择的优惠券
418
-    // 下面是支付的数据
419
-    showMoney: 0, // 价值总额
420
-    // showRuleText: 10086,
484
+      needSelect: false,
485
+      coupSelectType: '',
486
+      productDiscount: '',
487
+      isSelectCoup: [], // 选择的优惠券
488
+      // 下面是支付的数据
489
+      showMoney: 0, // 价值总额
490
+      discountPrice: 0,//活动后金额
491
+      discount: 0,//折扣类型
492
+      // showRuleText: 10086,
421 493
 
422 494
     };
423 495
   },
@@ -427,6 +499,9 @@ export default {
427 499
   watch: {},
428 500
 
429 501
   methods: {
502
+    toHome () {
503
+      this.$router.replace('/home')
504
+    },
430 505
     getOrderInfo () {
431 506
       api.getOrderInfo({ id: this.id }).then(res => {
432 507
         this.userInfo = res.data.user
@@ -434,8 +509,21 @@ export default {
434 509
         this.remarks = res.data.remark
435 510
         this.programmeList = res.data.scheme_list
436 511
         this.order_data = res.data.order_data
437
-        this.showMoney=res.data.order_data.price
512
+        this.showMoney = res.data.order_data.price
438 513
         this.poreList = res.data.detail_list
514
+        this.order_data['discountPrice'] = 0
515
+        //折扣类型,0.无折扣,20.任意三个项目8折,50.新人五折活动,100.仪器免费使用权益
516
+        this.order_data.project_list.forEach(item => {
517
+          if (this.discount == 20) {
518
+            this.order_data.discountPrice += Number(item.price) * 0.8
519
+          } else if (this.discount == 50) {
520
+            this.order_data.discountPrice += Number(item.price) * 0.5
521
+          } else if (this.discount == 0) {
522
+            this.order_data.discountPrice = this.showMoney
523
+          }
524
+        })
525
+        console.log(Number(this.order_data.discountPrice).toFixed(2), 'this.order_data.discountPrice.toFixed(2)');
526
+        this.discountPrice = Number(this.order_data.discountPrice).toFixed(2)
439 527
         this.calculationPrice()
440 528
       })
441 529
     },
@@ -445,13 +533,19 @@ export default {
445 533
       })
446 534
     },
447 535
     getProducts (e) {
448
-      this.productsInfo = ''
536
+      // this.productsInfo = ''
449 537
       api.getProducts({ id: e }).then(res => {
450 538
         this.productsList = res.data.list
539
+        this.productsList.forEach(item => {
540
+          if (this.productsInfo == item.id) {
541
+            this.lastProjectPrice = Number(item.price)
542
+          }
543
+        })
451 544
       })
452 545
     },
453 546
     eidt (item) {
454 547
       this.projectInfo = item.id
548
+      this.productsInfo = item.product_ids == '' ? '' : Number(item.product_ids)
455 549
       this.getProducts(item.id)
456 550
       this.isEditProject = true
457 551
       this.isProject = true
@@ -469,6 +563,7 @@ export default {
469 563
     },
470 564
     addProject () {
471 565
       this.projectInfo = ''
566
+      this.productsInfo = ''
472 567
       this.isEditProject = false
473 568
       this.isProject = true
474 569
     },
@@ -477,16 +572,18 @@ export default {
477 572
       // 编辑
478 573
       if (this.isEditProject) {
479 574
         if (this.productsInfo != '') {
575
+
480 576
           this.order_data.project_list.forEach(e => {
481 577
             if (this.projectInfo == e.id) {
482 578
               this.productsList.forEach(item => {
483
-                if (e.product_ids != '') {
484
-                  e.price = Number(e.price) - Number(item.price)
485
-                }
486 579
                 e.product_ids = this.productsInfo
487 580
                 if (item.id == e.product_ids) {
581
+                  if (e.product_ids != '') {
582
+                    e.price = Number(e.price) - Number(this.lastProjectPrice)
583
+                  }
488 584
                   this.isChange = true
489 585
                   e.product_names = item.name
586
+                  console.log(Number(e.price), Number(item.price), 'Number(e.price) + Number(item.price)');
490 587
                   e.price = Number(e.price) + Number(item.price)
491 588
                   this.isProject = false
492 589
                   this.isEditProject = false
@@ -524,7 +621,6 @@ export default {
524 621
             }
525 622
           })
526 623
         }
527
-        console.log(nowProjectInfo, 'nowProjectInfo', productsInfo);
528 624
         projectInfo['name'] = nowProjectInfo.name
529 625
         projectInfo['id'] = nowProjectInfo.id
530 626
         projectInfo['cover_url'] = nowProjectInfo.cover_url
@@ -554,20 +650,18 @@ export default {
554 650
       let tsTableList = []
555 651
       for (let i = 0; i < 7; i++) {
556 652
         //显示周一
557
-        let ShowTime = nowTime + (i + 1) * oneDayTime;
653
+        let ShowTime = nowTime + (i) * oneDayTime;
558 654
         //初始化日期时间
559 655
         let myDate = new Date(ShowTime);
560 656
         let year = myDate.getFullYear();
561 657
         let month = myDate.getMonth() + 1;
562 658
         let date = myDate.getDate();
563
-        console.log(year + "-" + month + "-" + date)
564 659
         let str = "周" + "日一二三四五六".charAt(myDate.getDay());
565 660
         let tsTableInfo = {}
566 661
         tsTableInfo['text'] = i == 0 ? '今天' : i == 1 ? '明天' : str
567 662
         tsTableInfo['ts'] = month + "-" + date
568 663
         tsTableInfo['order_day'] = year + "-" + month + "-" + date
569 664
         tsTableList.push(tsTableInfo)
570
-        console.log(str)
571 665
       }
572 666
       this.tsTableList = tsTableList
573 667
     },
@@ -580,14 +674,15 @@ export default {
580 674
         this.tsTableIndex = 0
581 675
         this.isTs = true
582 676
       } else {
583
-        debugger
677
+        this.choicePayType = true
584 678
       }
585 679
     },
586 680
     //确定时间选择
587 681
     comfigTs () {
588 682
       if (this.timeIndexText.length == 0) return
589
-      let order_data = [], order_data_info = {}
683
+      let order_data = []
590 684
       this.order_data.project_list.forEach(item => {
685
+        let order_data_info = {}
591 686
         order_data_info['id'] = item.id
592 687
         if (item.product_ids != "") {
593 688
           order_data_info['product_id'] = item.product_ids
@@ -614,12 +709,12 @@ export default {
614 709
         this.reservationPrice += Number(res.price)
615 710
       })
616 711
     },
712
+
617 713
     //获取订单优惠券
618 714
     onCoupon () {
619
-
620
-      if(this.couponList.length>0){
621
-         this.isCoupun = true
622
-         return
715
+      if (this.couponList.length > 0) {
716
+        this.isCoupun = true
717
+        return
623 718
       }
624 719
 
625 720
       let params = {
@@ -637,10 +732,82 @@ export default {
637 732
           this.onCoupon()
638 733
         }
639 734
       })
640
-      console.log(this.couponList)
641 735
       this.isCoupun = true
642 736
     },
737
+    //选择支付方式
738
+    changeType (i) {
739
+      this.payList.forEach((res, index) => {
740
+        if (index == i) {
741
+          res.isSelect = true
742
+        } else {
743
+          res.isSelect = false
744
+        }
745
+      })
746
+    },
747
+    pay () {
748
+      let that = this
749
+      let payWayList = this.payList.filter(res => {
750
+        return res.isSelect == true
751
+      })
752
+      // 卡券,项目券数据包, id:订单项目ID, coupon_id:优惠券ID, 如:[{ "id": 1220, coupon_id: 199 }]isSelectCoup
753
+      let params = {
754
+        id: this.id,
755
+        pay_way: payWayList[0].pay_way,
756
+        discount: this.discount
757
+      }
643 758
 
759
+      let coupon_data = []
760
+      if (this.isSelectCoup.length > 0) {
761
+        this.isSelectCoup.forEach(item => {
762
+          if (item.type != 4) {
763
+            params['coupon_id'] = item.id
764
+          } else {
765
+            let couponInfo = {}
766
+            couponInfo['id'] = item.projectids
767
+            couponInfo['coupon_id'] = item.id
768
+          }
769
+        })
770
+      }
771
+      params['coupon_data'] = coupon_data.length > 0 ? JSON.stringify(coupon_data) : null
772
+      api.orderPay(params).then(res => {
773
+        if (res.code == 200) {
774
+          this.choicePayType = false
775
+          this.PayStatus = true
776
+          if (res.data.pay_status == 1) {
777
+            this.isPayCode = false
778
+          } else {
779
+            this.$nextTick(() => {
780
+              new QRCode(that.$refs.qrCodeDiv, {
781
+                text: res.data.qr_code_string,
782
+                width: 140,
783
+                height: 140,
784
+                colorDark: "#333333", //二维码颜色
785
+                colorLight: "#ffffff", //二维码背景色
786
+                correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
787
+              })
788
+            })
789
+            this.payStatusInterval = setInterval(e => {
790
+              this.payStatus()
791
+            }, 1000)
792
+          }
793
+        }
794
+
795
+      })
796
+    },
797
+    changePayStatus () {
798
+      this.PayStatus = false
799
+      if (this.payStatusInterval) { //如果定时器在运行则关闭
800
+        clearInterval(this.payStatusInterval)
801
+      }
802
+    },
803
+    payStatus () {
804
+      api.payStatus({ id: this.id, }).then(res => {
805
+        if (res.data.pay_status == 1) {
806
+          clearInterval(this.payStatusInterval)
807
+          this.isPayCode = false
808
+        }
809
+      })
810
+    },
644 811
 
645 812
     //数组包含关系
646 813
     includes (arr1, arr2) {
@@ -658,191 +825,179 @@ export default {
658 825
     // },
659 826
 
660 827
 
661
-// 不可以用的不显示,如果同时有项目劵、抵扣劵、满减劵,只能用一种类型,其他劵不显示
662
-// 1、针对单个项目,项目劵可以多选
663
-// 2、抵扣劵、满减劵针对的是整个订单,当用户已使用了单个项目劵时,抵扣劵、满减劵就不能使用
664
-// 3、优惠劵可以给多个项目抵扣,
665
-// 4、默认抵扣金额最高的
666
-// 5、优惠劵排序,到期时间倒叙
667
-
828
+    // 不可以用的不显示,如果同时有项目劵、抵扣劵、满减劵,只能用一种类型,其他劵不显示
829
+    // 1、针对单个项目,项目劵可以多选
830
+    // 2、抵扣劵、满减劵针对的是整个订单,当用户已使用了单个项目劵时,抵扣劵、满减劵就不能使用
831
+    // 3、优惠劵可以给多个项目抵扣,
832
+    // 4、默认抵扣金额最高的
833
+    // 5、优惠劵排序,到期时间倒叙
668 834
 
669
-/**
670
-   * 点击使用按钮、勾选按钮
671
-   */
672
-  selectPupop: function (item, index) {
673 835
 
836
+    /**
837
+       * 点击使用按钮、勾选按钮
838
+       */
839
+    selectPupop: function (item, index) {
674 840
 
675
-    let CouPonIndex = this.couponList
841
+      let CouPonIndex = this.couponList
842
+      let selectIndex = index
843
+      let curreValue = !CouPonIndex[selectIndex].isSelect
844
+      let project_list = this.order_data.project_list //这里是项目列表
676 845
 
677
-    let selectIndex = index
678
-    let curreValue = !CouPonIndex[selectIndex].isSelect
679
-    let project_list = this.order_data.project_list //这里是项目列表
680
-
681
-    // 判断是否是不相同的项目券
682
-    if (this.couponList[selectIndex].type != 4) {
683
-      for (let i = 0; i < CouPonIndex.length; i++) {
684
-        CouPonIndex[i].isSelect = false
685
-      }
686
-      for (let i = 0; i < project_list.length; i++) {
687
-        project_list[i].cardId = ''
688
-      }
846
+      // 判断是否是不相同的项目券
847
+      if (this.couponList[selectIndex].type != 4) {
848
+        for (let i = 0; i < CouPonIndex.length; i++) {
849
+          CouPonIndex[i].isSelect = false
850
+        }
851
+        for (let i = 0; i < project_list.length; i++) {
852
+          project_list[i].cardId = ''
853
+        }
689 854
 
690
-    } else if (this.coupSelectType != 4) {
691
-      for (let i = 0; i < CouPonIndex.length; i++) {
692
-        CouPonIndex[i].isSelect = false
693
-      }
694
-      for (let i = 0; i < project_list.length; i++) {
695
-        project_list[i].cardId = ''
696
-      }
697
-    } else {
698
-      let numberSelect = 0
699
-      for (let i = 0; i < CouPonIndex.length; i++) {
700
-        if (CouPonIndex[i].isSelect) {
701
-          numberSelect = numberSelect + 1
855
+      } else if (this.coupSelectType != 4) {
856
+        for (let i = 0; i < CouPonIndex.length; i++) {
857
+          CouPonIndex[i].isSelect = false
858
+        }
859
+        for (let i = 0; i < project_list.length; i++) {
860
+          project_list[i].cardId = ''
861
+        }
862
+      } else {
863
+        let numberSelect = 0
864
+        for (let i = 0; i < CouPonIndex.length; i++) {
865
+          if (CouPonIndex[i].isSelect) {
866
+            numberSelect = numberSelect + 1
867
+          }
868
+        }
869
+        if (numberSelect == this.order_data.project_list.length && curreValue) {
870
+          this.$message.error('最多选择' + this.order_data.project_list.length + '项目券!');
871
+          return
702 872
         }
703 873
       }
704
-      console.log('numberSelect')
705
-      console.log(numberSelect)
706
-      if (numberSelect == this.order_data.project_list.length && curreValue) {
707
-            this.$message.error('最多选择' + this.order_data.project_list.length + '项目券!');
708
-        return
709
-      }
710
-    }
711
-    // 判断是否是取消选择项目券
712
-    CouPonIndex[selectIndex].isSelect = curreValue
713
-    if (!curreValue) {
714
-      for (let j = 0; j < project_list.length; j++) {
715
-        if (project_list[j].cardId && project_list[j].cardId == this.couponList[selectIndex].id) { // 如果是取消选择,那么也要取消绑定项目的id
716
-          project_list[j].cardId = ''
874
+      // 判断是否是取消选择项目券
875
+      CouPonIndex[selectIndex].isSelect = curreValue
876
+      if (!curreValue) {
877
+        for (let j = 0; j < project_list.length; j++) {
878
+          if (project_list[j].cardId && project_list[j].cardId == this.couponList[selectIndex].id) { // 如果是取消选择,那么也要取消绑定项目的id
879
+            project_list[j].cardId = ''
880
+          }
717 881
         }
882
+        CouPonIndex[selectIndex].projectids = ''
718 883
       }
719
-      CouPonIndex[selectIndex].projectids = ''
720
-    }
721
-    let orderDetails1 = this.order_data
722
-    orderDetails1.project_list = project_list
723
-
724
-
725
-      this.order_data=orderDetails1
726
-      this.couponList=CouPonIndex
727
-      this.coupSelectType=this.couponList[selectIndex].type
884
+      let orderDetails1 = this.order_data
885
+      orderDetails1.project_list = project_list
728 886
 
729
-    console.log(this.order_data)
730
-    console.log(this.couponList)
731 887
 
732
-    this.selectCoup()
888
+      this.order_data = orderDetails1
889
+      this.couponList = CouPonIndex
890
+      this.coupSelectType = this.couponList[selectIndex].type
891
+      this.selectCoup()
733 892
 
734
-  },
893
+    },
735 894
 
736
-// 选择项目进行绑定
737
-  selectCoup() {
738
-    let that = this
739
-    let isSelectCoups = []
740
-    for (let i = 0; i < this.couponList.length; i++) {
741
-      if (this.couponList[i].isSelect) {
742
-        let selectCoup = that.couponList[i]
743
-        isSelectCoups.push(selectCoup)
895
+    // 选择项目进行绑定
896
+    selectCoup () {
897
+      let that = this
898
+      let isSelectCoups = []
899
+      for (let i = 0; i < this.couponList.length; i++) {
900
+        if (this.couponList[i].isSelect) {
901
+          let selectCoup = that.couponList[i]
902
+          isSelectCoups.push(selectCoup)
903
+        }
744 904
       }
745
-    }
746
-      this.isSelectCoup=isSelectCoups
747
-    console.log(this.isSelectCoup)
905
+      this.isSelectCoup = isSelectCoups
748 906
 
749
-    // 抵扣顺序按照项目金额计算
750
-    that.theMoneyBest()
751
-  },
907
+      // 抵扣顺序按照项目金额计算
908
+      that.theMoneyBest()
909
+    },
752 910
 
753
-  // 抵扣顺序按照项目金额计算
754
-  // 卡券,项目券数据包,id:订单项目ID,coupon_id:优惠券ID,如:[{"id":1220,coupon_id:199}]  
755
-  theMoneyBest() {
756
-    let that = this
757
-    let project_list = this.order_data.project_list //这里是项目列表
758
-    let isSelectCoup = this.isSelectCoup //这里选择了的卡券列表
759
-    let selectProjectList = [] // 适合的卡券列表
760
-    // let CouPonIndex = this.CouPonIndex // 卡券选择的Id
761
-    let productDiscount = this.couponList // 卡券列表
762
-    console.log(productDiscount)
763
-    // debugger
764
-    if (isSelectCoup[0].type == 4) {
765
-      for (let i = 0; i < isSelectCoup.length; i++) { // 首先遍历卡券
766
-        if (!isSelectCoup[i].projectids) { // 如果卡券没绑定项目
767
-          console.log('没绑定过!')
911
+    // 抵扣顺序按照项目金额计算
912
+    // 卡券,项目券数据包,id:订单项目ID,coupon_id:优惠券ID,如:[{"id":1220,coupon_id:199}]  
913
+    theMoneyBest () {
914
+      let that = this
915
+      let project_list = this.order_data.project_list //这里是项目列表
916
+      let isSelectCoup = this.isSelectCoup //这里选择了的卡券列表
917
+      let selectProjectList = [] // 适合的卡券列表
918
+      // let CouPonIndex = this.CouPonIndex // 卡券选择的Id\
919
+      let productDiscount = this.couponList // 卡券列表
920
+      console.log(this.couponList, 'this.couponList');
921
+      (productDiscount)
922
+      if (isSelectCoup.length > 0 && isSelectCoup[0].type && isSelectCoup[0].type == 4) {
923
+        for (let i = 0; i < isSelectCoup.length; i++) { // 首先遍历卡券
924
+          if (!isSelectCoup[i].projectids) { // 如果卡券没绑定项目
768 925
 
769
-          let selectIndexMoney = 0 // 初始值
770
-          let selectIndex = 111 // 初始金额
771
-          for (let j = 0; j < project_list.length; j++) { // 遍历项目
772
-            if (isSelectCoup[i].project_ids.indexOf(project_list[j].id) != -1 && !project_list[j].cardId) { // 如果卡券能够使用这个项目并且这个项目没有被绑定过
773
-              console.log('project_list[j].price')
774
-              console.log(project_list[j].price)
775
-              console.log(selectIndexMoney)
776
-              console.log(project_list[j].price > selectIndexMoney)
777
-              if (project_list[j].price * 1 > selectIndexMoney * 1) {
778
-                selectIndex = j
779
-                selectIndexMoney = project_list[j].price
780
-                console.log('--' + selectIndexMoney)
926
+            let selectIndexMoney = 0 // 初始值
927
+            let selectIndex = 111 // 初始金额
928
+            for (let j = 0; j < project_list.length; j++) { // 遍历项目
929
+              if (isSelectCoup[i].project_ids.indexOf(project_list[j].id) != -1 && !project_list[j].cardId) { // 如果卡券能够使用这个项目并且这个项目没有被绑定过
930
+                if (project_list[j].price * 1 > selectIndexMoney * 1) {
931
+                  selectIndex = j
932
+                  selectIndexMoney = project_list[j].price
933
+                }
934
+                // selectProjectList.push(project_list[i])
781 935
               }
782
-              // selectProjectList.push(project_list[i])
783 936
             }
784
-          }
785
-          if (selectIndex != 111) {
786
-            console.log('走了这里走了这里')
787
-            isSelectCoup[i].projectids = project_list[selectIndex].id
788
-            isSelectCoup[i].projectName = project_list[selectIndex].name
789
-            project_list[selectIndex].cardId = isSelectCoup[i].id
790
-          } else {
791
-            for (let k = 0; k < productDiscount.length; k++) {
792
-              if (productDiscount[k].id == isSelectCoup[i].id) {
793
-                // isSelectCoup.
794
-                productDiscount[k].isSelect = false
795
-                // isSelectCoup.splice(isSelectCoup.length-1,1);
796
-                this.$message.error('没有适合的项目!');
937
+            if (selectIndex != 111) {
938
+              isSelectCoup[i].projectids = project_list[selectIndex].id
939
+              isSelectCoup[i].projectName = project_list[selectIndex].name
940
+              project_list[selectIndex].cardId = isSelectCoup[i].id
941
+            } else {
942
+              for (let k = 0; k < productDiscount.length; k++) {
943
+                if (productDiscount[k].id == isSelectCoup[i].id) {
944
+                  // isSelectCoup.
945
+                  productDiscount[k].isSelect = false
946
+                  // isSelectCoup.splice(isSelectCoup.length-1,1);
947
+                  this.$message.error('没有适合的项目!');
948
+                }
797 949
               }
798 950
             }
799
-          }
800 951
 
952
+          }
801 953
         }
954
+        let orderDetails1 = this.order_data
955
+        orderDetails1.project_list = project_list
956
+        this.couponList = productDiscount
957
+        this.isSelectCoup = isSelectCoup
958
+        this.order_data = orderDetails1
802 959
       }
803
-      let orderDetails1 = this.order_data
804
-      orderDetails1.project_list = project_list
805
-        this.couponList= productDiscount
806
-        this.isSelectCoup= isSelectCoup
807
-        this.order_data= orderDetails1
808
-    }
809 960
 
810
-    this.calculateMoney() //计算总额
811
-  },
812
-
813
-  // 计算总额
814
-  calculateMoney() {
815
-    let that = this
816
-    let money = this.order_data.price
817
-    let isSelectCoup = this.isSelectCoup
818
-    let project_list = this.order_data.project_list //这里是项目列表
961
+      this.calculateMoney() //计算总额
962
+    },
819 963
 
820
-    if (isSelectCoup.length == 0) {
821
-        this.showMoney=money.toFixed(2)
822
-      return
823
-    }
964
+    // 计算总额
965
+    calculateMoney () {
966
+      let that = this
967
+      let money = Number(this.order_data.price)
968
+      let isSelectCoup = this.isSelectCoup
969
+      let project_list = this.order_data.project_list //这里是项目列表
824 970
 
825
-    // 如果是项目
826
-    if (isSelectCoup[0].type == 4) {
827
-      for (let i = 0; i < project_list.length; i++) {
828
-        if (project_list[i].cardId) {
829
-          money = money - project_list[i].price
830
-        }
831
-      }
832
-        this.showMoney=money.toFixed(2)
833
-    } else if (isSelectCoup[0].type == 3) {
834
-      for (let i = 0; i < project_list.length; i++) {
835
-        money = money - project_list[i].price
971
+      if (isSelectCoup.length == 0) {
972
+        this.showMoney = money.toFixed(2)
973
+        return
836 974
       }
837 975
 
838
-    } else {
839
-      money = money - isSelectCoup[0].price
840
-    }
841
-
842
-        this.showMoney=money.toFixed(2)
976
+      // 如果是项目
977
+      if (isSelectCoup[0].type == 4) {
978
+        for (let i = 0; i < project_list.length; i++) {
979
+          if (project_list[i].cardId) {
980
+            money = money - Number(project_list[i].price)
981
+          }
982
+        }
983
+        this.showMoney = money.toFixed(2)
984
+        if (this.order_data.project_list.length - this.isSelectCoup.length >= 3) {
985
+          console.log(money, 'money');
986
+          money = (money * 0.8).toFixed(2)
987
+          console.log(money, 'money');
843 988
 
989
+        }
990
+      } else if (isSelectCoup[0].type == 3) {
991
+        for (let i = 0; i < project_list.length; i++) {
992
+          money = money - Number(project_list[i].price)
993
+        }
844 994
 
845
-  },
995
+      } else {
996
+        money = money - Number(isSelectCoup[0].price)
997
+      }
998
+      console.log(this.showMoney, 'showMoney', money);
999
+      this.showMoney = money
1000
+    },
846 1001
 
847 1002
 
848 1003
     changeActive (e) {
@@ -878,10 +1033,13 @@ export default {
878 1033
         this.$set(this.programmeList[index], 'onSelect', true)
879 1034
       }
880 1035
     },
881
-    onSubmit () {
882
-
883
-    },
884
-    submitFrequency () { },
1036
+    //获取订单折扣类型
1037
+    getOrderDiscount () {
1038
+      api.getOrderDiscount({ id: this.id }).then(res => {
1039
+        this.discount = res.data.discount
1040
+        this.getOrderInfo()
1041
+      })
1042
+    }
885 1043
   },
886 1044
 
887 1045
   created () {
@@ -889,13 +1047,20 @@ export default {
889 1047
     if (id) {
890 1048
       this.id = id
891 1049
     }
892
-    this.getOrderInfo()
1050
+
893 1051
     this.getProjectList()
1052
+    this.getOrderDiscount()
1053
+
894 1054
   },
895 1055
 
896 1056
   mounted () {
897 1057
 
898 1058
   },
1059
+  destroyed () {
1060
+    if (this.payStatusInterval) { //如果定时器在运行则关闭
1061
+      clearInterval(this.payStatusInterval)
1062
+    }
1063
+  }
899 1064
 }
900 1065
 
901 1066
 </script>
@@ -1663,5 +1828,112 @@ export default {
1663 1828
       }
1664 1829
     }
1665 1830
   }
1831
+  .pay-block {
1832
+    width: 540px;
1833
+    height: 400px;
1834
+    background: #ffffff;
1835
+    border-radius: 8px;
1836
+    position: relative;
1837
+    padding: 42px;
1838
+    .delete-pupop {
1839
+      width: 32px;
1840
+      position: absolute;
1841
+      right: 5px;
1842
+      top: 5px;
1843
+      img {
1844
+        width: 100%;
1845
+      }
1846
+    }
1847
+    .pay-title {
1848
+      font-size: 14px;
1849
+      font-family: PingFangSC-Medium, PingFang SC;
1850
+      font-weight: 500;
1851
+      color: #333333;
1852
+      line-height: 20px;
1853
+      text-align: center;
1854
+    }
1855
+    .pay-suc {
1856
+      margin-top: 40px;
1857
+      margin-bottom: 80px;
1858
+      text-align: center;
1859
+      img {
1860
+        width: 140px;
1861
+      }
1862
+    }
1863
+    .pay-price {
1864
+      margin-top: 10px;
1865
+      font-size: 14px;
1866
+      font-family: OPPOSans-B, OPPOSans;
1867
+      font-weight: normal;
1868
+      color: #fa4622;
1869
+      text-align: center;
1870
+      line-height: 31px;
1871
+      span {
1872
+        font-size: 20px;
1873
+      }
1874
+    }
1875
+    .banner {
1876
+      margin-top: 24px;
1877
+      .qrCode {
1878
+        text-align: center;
1879
+      }
1880
+    }
1881
+    .pay-list {
1882
+      width: 338px;
1883
+      margin-top: 8px;
1884
+      position: relative;
1885
+      left: 50%;
1886
+      transform: translateX(-50%);
1887
+      .pay-info {
1888
+        margin-top: 16px;
1889
+        display: flex;
1890
+        justify-content: space-between;
1891
+        align-items: center;
1892
+
1893
+        height: 44px;
1894
+        border-radius: 35px;
1895
+        border: 1px solid #d0d0d0;
1896
+
1897
+        padding: 0 20px;
1898
+        .pay-left {
1899
+          margin-left: 8px;
1900
+          font-size: 16px;
1901
+          font-family: PingFangSC-Regular, PingFang SC;
1902
+          font-weight: 400;
1903
+          color: #333333;
1904
+          line-height: 22px;
1905
+          display: flex;
1906
+          align-items: center;
1907
+          img {
1908
+            width: 24px;
1909
+          }
1910
+          span {
1911
+            margin-left: 20px;
1912
+          }
1913
+        }
1914
+        .pay-right {
1915
+          img {
1916
+            width: 24px;
1917
+          }
1918
+        }
1919
+      }
1920
+    }
1921
+    .pay-button {
1922
+      margin-top: 28px;
1923
+      width: 176px;
1924
+      height: 28px;
1925
+      background: #fa7d22;
1926
+      border-radius: 14px;
1927
+      font-size: 14px;
1928
+      font-family: PingFangSC-Medium, PingFang SC;
1929
+      font-weight: 500;
1930
+      color: #ffffff;
1931
+      line-height: 28px;
1932
+      text-align: center;
1933
+      position: relative;
1934
+      left: 50%;
1935
+      transform: translateX(-50%);
1936
+    }
1937
+  }
1666 1938
 }
1667 1939
 </style>

+ 47 - 39
src/pages/confirmOrder/index.vue

@@ -1,92 +1,100 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="qr-code">
4
-      <div id="qrCode"
5
-           ref="qrCodeDiv"></div>
4
+      <div id="qrCode" ref="qrCodeDiv"></div>
6 5
     </div>
7 6
   </div>
8 7
 </template>
9 8
 
10 9
 <script>
11
-import QRCode from 'qrcodejs2'
12
-import api from '../../server/home'
10
+import QRCode from "qrcodejs2";
11
+import api from "../../server/home";
13 12
 export default {
14 13
   components: {},
15
-  data () {
14
+  data() {
16 15
     return {
17
-      qrcode_string: '',
18
-      ticket: '',
16
+      qrcode_string: "",
17
+      ticket: "",
19 18
       checkCodeInterval: null,
20
-      checkCodeTimeout: null,
19
+      checkCodeTimeout: null
21 20
     };
22 21
   },
23 22
   computed: {},
24 23
   watch: {},
25 24
 
26 25
   methods: {
27
-    getAuthCode () {
26
+    getAuthCode() {
28 27
       api.getAuthCode().then(res => {
29
-        this.qrcode_string = res.data.qrcode_string
30
-        this.ticket = res.data.ticket
28
+        this.qrcode_string = res.data.qrcode_string;
29
+        this.ticket = res.data.ticket;
31 30
         this.$nextTick(() => {
32 31
           this.bindQRCode();
33
-          // this.checkCode()
34
-        })
35
-      })
32
+          this.checkCode();
33
+        });
34
+      });
36 35
     },
37
-    checkCode () {
36
+    checkCode() {
38 37
       this.checkCodeInterval = setInterval(e => {
39 38
         api.checkCode({ ticket: this.ticket }).then(res => {
40 39
           if (res.data.status == 1) {
41
-            clearInterval(this.checkCodeInterval)
40
+            clearInterval(this.checkCodeInterval);
41
+            this.getOrderByCode();
42 42
           }
43
-        })
44
-      }, 1000)
43
+        });
44
+      }, 1000);
45 45
       //十分钟强制清除,防止页面崩溃
46 46
       this.checkCodeTimeout = setTimeout(() => {
47
-        clearTimeout(this.checkCodeTimeout)
48
-      }, 600000)
47
+        clearTimeout(this.checkCodeTimeout);
48
+      }, 360000);
49 49
     },
50
-    getOrderByCode () {
50
+    getOrderByCode() {
51 51
       api.getOrderByCode({ ticket: this.ticket }).then(res => {
52 52
         if (res.code == 200) {
53
+          // 无订单入口
54
+          if (res.data.order_id == 0) {
55
+            this.$router.push({
56
+              path: "/confirmOrder/addOrder",
57
+              query: {   //user_id
58
+                data: JSON.stringify(res.data),
59
+                // user_id:res.data.user.user_id
60
+              }
61
+            });
62
+          return
63
+          }
64
+
53 65
           this.$router.push({
54
-            path: '/confirmOrder/details',
66
+            path: "/confirmOrder/details",
55 67
             query: {
56
-              id: res.order_id
68
+              id: res.data.order_id
57 69
             }
58
-          })
70
+          });
59 71
         }
60
-      })
72
+      });
61 73
     },
62
-    bindQRCode () {
74
+    bindQRCode() {
63 75
       new QRCode(this.$refs.qrCodeDiv, {
64 76
         text: this.qrcode_string,
65 77
         width: 200,
66 78
         height: 200,
67 79
         colorDark: "#333333", //二维码颜色
68 80
         colorLight: "#ffffff", //二维码背景色
69
-        correctLevel: QRCode.CorrectLevel.L//容错率,L/M/H
70
-      })
81
+        correctLevel: QRCode.CorrectLevel.L //容错率,L/M/H
82
+      });
71 83
     }
72 84
   },
73 85
 
74
-  created () {
75
-    this.getAuthCode()
76
-
86
+  created() {
87
+    this.getAuthCode();
77 88
   },
78 89
 
79
-  mounted () {
80
-
81
-  },
82
-  destroyed () {
90
+  mounted() {},
91
+  destroyed() {
83 92
     if (this.checkCodeInterval) {
84
-      clearInterval(this.checkCodeInterval)
85
-      clearTimeout(this.checkCodeTimeout)
93
+      clearInterval(this.checkCodeInterval);
94
+      clearTimeout(this.checkCodeTimeout);
86 95
     }
87 96
   }
88
-}
89
-
97
+};
90 98
 </script>
91 99
 
92 100
 <style lang='less' scoped>

+ 9 - 8
src/pages/coupon/index.vue

@@ -34,7 +34,7 @@
34 34
       <el-table ref="multipleTable"
35 35
                 :data="tableData"
36 36
                 tooltip-effect="dark"
37
-                height="354"
37
+                height="500"
38 38
                 style="width: 100%;border-radius: 8px;"
39 39
                 @selection-change="handleSelectionChange">
40 40
         <el-table-column type="selection"
@@ -98,11 +98,9 @@ export default {
98 98
     },
99 99
     handleSelectionChange (val) {
100 100
       this.multipleSelection = val;
101
-      console.log(this.multipleSelection);
102 101
     },
103 102
     // 发送优惠券
104 103
     sendCoupon () {
105
-      console.log(this.coupon);
106 104
       let selectIds = "";
107 105
       for (let i = 0; i < this.multipleSelection.length; i++) {
108 106
         selectIds = selectIds + "," + this.multipleSelection[i].id;
@@ -112,12 +110,18 @@ export default {
112 110
         user_ids: selectIds.substring(1, selectIds.length),
113 111
         num: this.couponNum
114 112
       };
115
-      api.sendCoupon(params).then(res => { });
113
+      api.sendCoupon(params).then(res => {
114
+        if (res.code == 200) {
115
+          this.$message({
116
+            message: '发送成功',
117
+            type: 'success'
118
+          });
119
+        }
120
+      });
116 121
     },
117 122
 
118 123
     // 获取订单列表
119 124
     getUserList () {
120
-      console.log("xxxxxxx");
121 125
       let params = {
122 126
         page: this.currentPage1,
123 127
         limit: this.limit,
@@ -133,7 +137,6 @@ export default {
133 137
 
134 138
     // 获取优惠券列表
135 139
     getCouponInfo () {
136
-      console.log("xxxxxxx");
137 140
       let params = {
138 141
         page: this.currentPage1,
139 142
         limit: 100
@@ -148,11 +151,9 @@ export default {
148 151
     handleCurrentChange (e) {
149 152
       this.currentPage1 = e;
150 153
       this.getUserList();
151
-      console.log(e, "eeeeee");
152 154
     },
153 155
 
154 156
     handleSizeChange (val) {
155
-      console.log(`每页 ${val} 条`);
156 157
     }
157 158
   },
158 159
 

+ 38 - 32
src/pages/customerMan/details/index.vue

@@ -3,7 +3,8 @@
3 3
     <div class="left">
4 4
       <div class="user-info">
5 5
         <div class="user-img">
6
-          <img :src="userInfo.avatar_url" alt />
6
+          <img :src="userInfo.avatar_url"
7
+               alt />
7 8
         </div>
8 9
         <div class="user-span">
9 10
           <div class="name">
@@ -82,7 +83,9 @@
82 83
           <div class="lable">
83 84
             <div class="lable-title">面诊标签</div>
84 85
             <div class="lable-list">
85
-              <div v-for="(item,index) in lableList" :key="index" class="lable-info">{{item.text}}</div>
86
+              <div v-for="(item,index) in lableList"
87
+                   :key="index"
88
+                   class="lable-info">{{item.text}}</div>
86 89
             </div>
87 90
           </div>
88 91
           <div class="ps">
@@ -91,18 +94,22 @@
91 94
           </div>
92 95
         </div>
93 96
         <div class="right-top-list">
94
-          <div class="dataList" @click="toOrder(1)">
95
-            <img :src="userInfo.image" />
97
+          <div class="dataList"
98
+               @click="toOrder(1)">
99
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/project_icon.png" />
96 100
             <p>项目订单</p>
97 101
             <span>{{order_total.project}}</span>
98 102
           </div>
99
-          <div class="dataList" style="margin:18px 0px" @click="toOrder(2)">
100
-            <img :src="userInfo.image" />
101
-            <p>卡券订单</p>
103
+          <div class="dataList"
104
+               style="margin:18px 0px"
105
+               @click="toOrder(2)">
106
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/coupon_icon.png" />
107
+            <p>优惠券</p>
102 108
             <span>{{order_total.coupon}}</span>
103 109
           </div>
104
-          <div class="dataList" @click="toOrder(3)">
105
-            <img :src="userInfo.image" />
110
+          <div class="dataList"
111
+               @click="toOrder(3)">
112
+            <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/coupon/order_total_icon.png" />
106 113
             <p>商品订单</p>
107 114
             <span>{{order_total.goods}}</span>
108 115
           </div>
@@ -114,18 +121,14 @@
114 121
             <div class="tab-title">执行方案</div>
115 122
           </div>
116 123
           <div class="programme-list">
117
-            <div
118
-              :class="['programme-info',item.onSelect?'programme-active':'']"
119
-              v-for="(item,index) in programmeList"
120
-              :key="index"
121
-              @click="onOperation(index)"
122
-            >
124
+            <div :class="['programme-info',item.onSelect?'programme-active':'']"
125
+                 v-for="(item,index) in programmeList"
126
+                 :key="index"
127
+                 @click="onOperation(index)">
123 128
               <div class="programme-left">
124 129
                 <div class="programme-img">
125
-                  <img
126
-                    src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
127
-                    alt
128
-                  />
130
+                  <img src="https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png"
131
+                       alt />
129 132
                 </div>
130 133
                 <div class="programme-tips">
131 134
                   <div class="tips-title">{{'【清洁补水】华熙智慧…'|ellipsis(9)}}</div>
@@ -146,7 +149,8 @@
146 149
                   <span>28天</span>
147 150
                 </div>
148 151
               </div>
149
-              <div class="operation" v-if="item.onSelect">
152
+              <div class="operation"
153
+                   v-if="item.onSelect">
150 154
                 <div class="edit">编辑</div>
151 155
                 <div class="delete">删除</div>
152 156
               </div>
@@ -162,7 +166,7 @@
162 166
 import api from "../../../server/home";
163 167
 
164 168
 export default {
165
-  data() {
169
+  data () {
166 170
     return {
167 171
       userInfo: {
168 172
         image:
@@ -195,20 +199,19 @@ export default {
195 199
   watch: {},
196 200
 
197 201
   methods: {
198
-    getPadUserInfo() {
202
+    getPadUserInfo () {
199 203
       api.getPadUserInfo({ id: this.id }).then(res => {
200 204
         this.userInfo = res.data.user;
201 205
         this.remarks = res.data.remark;
202 206
         this.lableList = res.data.tags;
203 207
         this.order_total = res.data.order_total;
204 208
         this.programmeList = res.data.scheme_list;
205
-
206 209
         // this.programmeList = res.data.order_data.project_list;
207 210
         // this.coupon_list = res.data.order_data.coupon_list;
208 211
       });
209 212
     },
210 213
 
211
-    onOperation(index) {
214
+    onOperation (index) {
212 215
       if (this.programmeList[index].onSelect) {
213 216
         this.$set(
214 217
           this.programmeList[index],
@@ -219,27 +222,30 @@ export default {
219 222
         this.$set(this.programmeList[index], "onSelect", true);
220 223
       }
221 224
     },
222
-    toOrder(index) {
223
-      if (index === 1) {
225
+    toOrder (index) {
226
+      let activeName = 'first'
227
+      if (index == 3) {
228
+        activeName = 'third'
229
+      } else if (index == 2) {
230
+        activeName = 'second'
231
+      }
224 232
       this.$router.push({
225 233
         path: "/customerMan/projectOrder",
226 234
         query: {
227
-          id: this.id
235
+          id: this.id,
236
+          activeName: activeName
228 237
         }
229 238
       });
230
-      }
231 239
     },
232
-    onSubmit() {},
233
-    submitFrequency() {}
234 240
   },
235 241
 
236
-  created() {
242
+  created () {
237 243
     let id = this.$route.query.id;
238 244
     this.id = id;
239 245
     this.getPadUserInfo();
240 246
   },
241 247
 
242
-  mounted() {}
248
+  mounted () { }
243 249
 };
244 250
 </script>
245 251
 

+ 1 - 4
src/pages/customerMan/index.vue

@@ -16,7 +16,7 @@
16 16
       <el-table ref="multipleTable"
17 17
                 :data="tableData"
18 18
                 tooltip-effect="dark"
19
-                height="354"
19
+                height="500"
20 20
                 style="width: 100%;border-radius: 8px;"
21 21
                 @row-click="handleSelectionChange">
22 22
         <el-table-column label="头像"
@@ -85,7 +85,6 @@ export default {
85 85
 
86 86
     // 获取订单列表
87 87
     getUserList () {
88
-      console.log("xxxxxxx");
89 88
       let params = {
90 89
         page: this.currentPage1,
91 90
         limit: this.limit,
@@ -102,11 +101,9 @@ export default {
102 101
     handleCurrentChange (e) {
103 102
       this.currentPage1 = e;
104 103
       this.getUserList();
105
-      console.log(e, "eeeeee");
106 104
     },
107 105
 
108 106
     handleSizeChange (val) {
109
-      console.log(`每页 ${val} 条`);
110 107
     },
111 108
     handleSelectionChange (row, column, event) {
112 109
       this.$router.push({

+ 160 - 96
src/pages/customerMan/myOrder/index.vue

@@ -1,141 +1,169 @@
1 1
 <template>
2 2
   <div class="order">
3 3
     <div class="warp">
4
-      <el-tabs type="border-card">
5
-        <el-tab-pane label="项目订单">
4
+      <el-tabs type="border-card"
5
+               @tab-click="changeTab"
6
+               v-model="activeName">
7
+        <el-tab-pane label="项目订单"
8
+                     name="first">
6 9
           <div class="user-list">
7
-            <el-table
8
-              ref="multipleTable"
9
-              :data="projectData"
10
-              tooltip-effect="dark"
11
-              height="354"
12
-              style="width: 100%;border-radius: 8px;"
13
-              @row-click="handleSelectionChange"
14
-            >
15
-              <el-table-column prop="goods" label="项目名称" width="200">
10
+            <el-table ref="multipleTable"
11
+                      :data="projectData"
12
+                      tooltip-effect="dark"
13
+                      height="354"
14
+                      style="width: 100%;border-radius: 8px;"
15
+                      @row-click="handleSelectionChange">
16
+              <el-table-column prop="goods"
17
+                               label="项目名称"
18
+                               width="200">
16 19
                 <template slot-scope="scope">
17
-                  <div v-for="(val,index) in scope.row.goods" :key="index">
20
+                  <div v-for="(val,index) in scope.row.goods"
21
+                       :key="index">
18 22
                     <div>{{val.name}}</div>
19 23
                   </div>
20 24
                 </template>
21 25
               </el-table-column>
22
-              <el-table-column prop="goods" label="数量" show-overflow-tooltip>
26
+              <el-table-column prop="goods"
27
+                               label="数量"
28
+                               show-overflow-tooltip>
23 29
                 <template slot-scope="scope">
24 30
                   <div>{{scope.row.goods.length}}</div>
25 31
                 </template>
26 32
               </el-table-column>
27
-              <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
28
-              <el-table-column prop="order_time" label="预约时间" width="180" show-overflow-tooltip></el-table-column>
29
-              <el-table-column prop="store_name" label="预约店铺" show-overflow-tooltip></el-table-column>
30
-              <el-table-column prop="status" label="状态" show-overflow-tooltip>
33
+              <el-table-column prop="price"
34
+                               label="总价格"
35
+                               show-overflow-tooltip></el-table-column>
36
+              <el-table-column prop="order_time"
37
+                               label="预约时间"
38
+                               width="180"
39
+                               show-overflow-tooltip></el-table-column>
40
+              <el-table-column prop="store_name"
41
+                               label="预约店铺"
42
+                               show-overflow-tooltip></el-table-column>
43
+              <el-table-column prop="status"
44
+                               label="状态"
45
+                               show-overflow-tooltip>
31 46
                 <template slot-scope="scope">
32
-                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
47
+                  <div :class="'color'+scope.row.status">{{scope.row.status!=5?statusStr[scope.row.status]:statusStr[statusStr.length-1]}}</div>
33 48
                 </template>
34 49
               </el-table-column>
35 50
             </el-table>
36 51
 
37 52
             <div class="pagin">
38
-              <el-pagination
39
-                background
40
-                layout="prev, pager, next"
41
-                @size-change="handleSizeChange"
42
-                @current-change="handleCurrentChange"
43
-                :current-page.sync="currentPage1"
44
-                :total="1000"
45
-              ></el-pagination>
53
+              <el-pagination background
54
+                             layout="prev, pager, next"
55
+                             @current-change="handleCurrentChange"
56
+                             :current-page.sync="currentPage1"
57
+                             :total="total"></el-pagination>
46 58
             </div>
47 59
           </div>
48 60
         </el-tab-pane>
49
-        <el-tab-pane label="卡卷订单">
61
+        <el-tab-pane label="卡卷订单"
62
+                     name="second">
50 63
           <div class="user-list">
51
-            <el-table
52
-              ref="multipleTable"
53
-              :data="couponData"
54
-              tooltip-effect="dark"
55
-              height="354"
56
-              style="width: 100%;border-radius: 8px;"
57
-              @row-click="handleSelectionChange"
58
-            >
64
+            <el-table ref="multipleTable"
65
+                      :data="couponData"
66
+                      tooltip-effect="dark"
67
+                      height="354"
68
+                      style="width: 100%;border-radius: 8px;">
59 69
 
60
-<!-- create_time: "2022-03-10 10:39:19"
70
+              <!-- create_time: "2022-03-10 10:39:19"
61 71
 ex_time: "2022.03.17 23:59"
62 72
 id: 2517
63 73
 name: "新人体验券"
64 74
 status: 2
65 75
 type: "全额券" -->
66 76
 
67
-              <el-table-column prop="name" label="卡卷名称" width="200"></el-table-column>
68
-              <el-table-column prop="type" label="卡卷类型" show-overflow-tooltip></el-table-column>
69
-              <el-table-column prop="price" label="总价格" show-overflow-tooltip></el-table-column>
70
-              <el-table-column prop="create_time" label="到期时间" width="180" show-overflow-tooltip></el-table-column>
71
-              <el-table-column prop="create_time" label="创建时间" width="180" show-overflow-tooltip></el-table-column>
72
-              <el-table-column prop="status" label="状态" show-overflow-tooltip>
77
+              <el-table-column prop="name"
78
+                               label="卡卷名称"
79
+                               width="200"></el-table-column>
80
+              <el-table-column prop="type"
81
+                               label="卡卷类型"
82
+                               show-overflow-tooltip></el-table-column>
83
+              <el-table-column prop="price"
84
+                               label="总价格"
85
+                               show-overflow-tooltip></el-table-column>
86
+              <el-table-column prop="create_time"
87
+                               label="到期时间"
88
+                               width="180"
89
+                               show-overflow-tooltip></el-table-column>
90
+              <el-table-column prop="create_time"
91
+                               label="创建时间"
92
+                               width="180"
93
+                               show-overflow-tooltip></el-table-column>
94
+              <el-table-column prop="status"
95
+                               label="状态"
96
+                               show-overflow-tooltip>
73 97
                 <template slot-scope="scope">
74
-                  <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
98
+                  <div :class="'color'+scope.row.status">{{couponStatus[scope.row.status]}}</div>
75 99
                 </template>
76 100
               </el-table-column>
77 101
             </el-table>
78 102
 
79 103
             <div class="pagin">
80
-              <el-pagination
81
-                background
82
-                layout="prev, pager, next"
83
-                @size-change="handleSizeChange"
84
-                @current-change="handleCurrentChange"
85
-                :current-page.sync="currentPage1"
86
-                :total="1000"
87
-              ></el-pagination>
104
+              <el-pagination background
105
+                             layout="prev, pager, next"
106
+                             @current-change="handleCurrentChange"
107
+                             :current-page.sync="currentPage1"
108
+                             :total="total"></el-pagination>
88 109
             </div>
89 110
           </div>
90 111
         </el-tab-pane>
91 112
 
92
-        <el-tab-pane label="商品订单">
113
+        <el-tab-pane label="商品订单"
114
+                     name="third">
93 115
           <div class="user-list">
94
-            <el-table
95
-              ref="multipleTable"
96
-              :data="goodData"
97
-              tooltip-effect="dark"
98
-              height="354"
99
-              style="width: 100%;border-radius: 8px;"
100
-              @row-click="handleSelectionChange"
101
-            >
116
+            <el-table ref="multipleTable"
117
+                      :data="goodData"
118
+                      tooltip-effect="dark"
119
+                      height="354"
120
+                      style="width: 100%;border-radius: 8px;">
102 121
 
103
-<!-- create_time: "2022-03-19 22:53:40"
122
+              <!-- create_time: "2022-03-19 22:53:40"
104 123
 goods: [{order_id: 47, name: "润百颜玻尿酸屏障调理面膜", num: 1}]
105 124
 id: 47
106 125
 price: "0.01"
107 126
 status: 5 -->
108 127
 
109
-              <el-table-column prop="goods" label="商品名称" width="200">
128
+              <el-table-column prop="goods"
129
+                               label="商品名称"
130
+                               width="200">
110 131
                 <template slot-scope="scope">
111
-                  <div v-for="(val,index) in scope.row.goods" :key="index">
132
+                  <div v-for="(val,index) in scope.row.goods"
133
+                       :key="index">
112 134
                     <div>{{val.name}}</div>
113 135
                   </div>
114 136
                 </template>
115 137
               </el-table-column>
116
-              <el-table-column prop="goods" label="数量" show-overflow-tooltip>
138
+              <el-table-column prop="goods"
139
+                               label="数量"
140
+                               show-overflow-tooltip>
117 141
                 <template slot-scope="scope">
118 142
                   <div>{{scope.row.goods.length}}</div>
119 143
                 </template>
120 144
               </el-table-column>
121
-              <el-table-column prop="price" label="实付款" show-overflow-tooltip></el-table-column>
122
-              <el-table-column prop="create_time" label="下单时间" width="180" show-overflow-tooltip></el-table-column>
123
-              <el-table-column prop="status" label="状态" show-overflow-tooltip>
145
+              <el-table-column prop="price"
146
+                               label="实付款"
147
+                               show-overflow-tooltip></el-table-column>
148
+              <el-table-column prop="create_time"
149
+                               label="下单时间"
150
+                               width="180"
151
+                               show-overflow-tooltip></el-table-column>
152
+              <el-table-column prop="status"
153
+                               label="状态"
154
+                               show-overflow-tooltip>
124 155
                 <template slot-scope="scope">
125
-                  <div :class="'classShow'+scope.$index">{{statusStr[scope.row.status]}}</div>
156
+                  <div :class="'classShow'+scope.$index">{{scope.row.status==1||scope.row.status==2?goodStatus[scope.row.status]:goodStatus[goodStatus.length-1]}}</div>
126 157
                 </template>
127 158
               </el-table-column>
128 159
             </el-table>
129 160
 
130 161
             <div class="pagin">
131
-              <el-pagination
132
-                background
133
-                layout="prev, pager, next"
134
-                @size-change="handleSizeChange"
135
-                @current-change="handleCurrentChange"
136
-                :current-page.sync="currentPage1"
137
-                :total="1000"
138
-              ></el-pagination>
162
+              <el-pagination background
163
+                             layout="prev, pager, next"
164
+                             @current-change="handleCurrentChange"
165
+                             :current-page.sync="currentPage1"
166
+                             :total="total"></el-pagination>
139 167
             </div>
140 168
           </div>
141 169
         </el-tab-pane>
@@ -148,7 +176,7 @@ status: 5 -->
148 176
 import api from "../../../server/home";
149 177
 
150 178
 export default {
151
-  data() {
179
+  data () {
152 180
     return {
153 181
       couponList: [
154 182
         {
@@ -185,19 +213,29 @@ export default {
185 213
         }
186 214
       ],
187 215
       statusStr: [
188
-        "已预约",
189 216
         "未支付",
190
-        "已支付",
191 217
         "待使用",
192 218
         "正在使用",
193 219
         "已结算",
194 220
         "已取消"
195 221
       ],
222
+      couponStatus: [
223
+        '待使用',
224
+        '已使用',
225
+        '已过期'
226
+      ],
227
+      goodStatus: [
228
+        '未支付',
229
+        '已支付',
230
+        '已取货'
231
+      ],
232
+      activeName: 'first',
196 233
       currentPage1: 1,
197 234
       couponData: [],
198 235
       goodData: [],
199 236
       projectData: [],
200
-      total: ""
237
+      total: 100,
238
+      limit: 10
201 239
     };
202 240
   },
203 241
   computed: {},
@@ -205,7 +243,7 @@ export default {
205 243
 
206 244
   methods: {
207 245
     // 获取优惠券订单
208
-    getUserCoupon() {
246
+    getUserCoupon () {
209 247
       let params = {
210 248
         page: this.currentPage1,
211 249
         limit: this.limit,
@@ -218,7 +256,7 @@ export default {
218 256
     },
219 257
 
220 258
     // 获取商品订单
221
-    getUserGoods() {
259
+    getUserGoods () {
222 260
       let params = {
223 261
         page: this.currentPage1,
224 262
         limit: this.limit,
@@ -231,7 +269,7 @@ export default {
231 269
     },
232 270
 
233 271
     // 获取获取项目订单
234
-    getUserProject() {
272
+    getUserProject () {
235 273
       let params = {
236 274
         page: this.currentPage1,
237 275
         limit: this.limit,
@@ -242,27 +280,53 @@ export default {
242 280
         this.total = res.data.total;
243 281
       });
244 282
     },
245
-
246
-    handleSizeChange(val) {
247
-      console.log(`每页 ${val} 条`);
283
+    handleCurrentChange (val) {
284
+      this.currentPage1 = val
285
+      if (this.activeName == 'first') {
286
+        this.getUserProject();
287
+      } else if (this.activeName == 'second') {
288
+        this.getUserCoupon();
289
+      } else if (this.activeName == 'third') {
290
+        this.getUserGoods();
291
+      }
248 292
     },
249
-    handleCurrentChange(val) {
250
-      console.log(`当前页: ${val}`);
293
+    handleSelectionChange (row, column, event) {
294
+      this.$router.push({
295
+        path: "/historicalOrder/details",
296
+        query: {
297
+          id: row.id
298
+        }
299
+      });
251 300
     },
252
-    handleSelectionChange(row, column, event) {},
253
-    onSubmit() {},
254
-    submitFrequency() {}
301
+    onSubmit () { },
302
+    submitFrequency () { },
303
+    changeTab (e) {
304
+      this.currentPage1 = 1
305
+      if (e.index == 0) {
306
+        this.getUserProject();
307
+      } else if (e.index == 1) {
308
+        this.getUserCoupon();
309
+      } else if (e.index == 2) {
310
+        this.getUserGoods();
311
+      }
312
+    }
255 313
   },
256 314
 
257
-  created() {
315
+  created () {
258 316
     let id = this.$route.query.id;
317
+    let activeName = this.$route.query.activeName
318
+    this.activeName = activeName
259 319
     this.id = id;
260
-    this.getUserCoupon();
261
-    this.getUserGoods();
262
-    this.getUserProject();
320
+    if (this.activeName == 'first') {
321
+      this.getUserProject();
322
+    } else if (this.activeName == 'second') {
323
+      this.getUserCoupon();
324
+    } else if (this.activeName == 'third') {
325
+      this.getUserGoods();
326
+    }
263 327
   },
264 328
 
265
-  mounted() {}
329
+  mounted () { }
266 330
 };
267 331
 </script>
268 332
 

+ 66 - 64
src/pages/historicalOrder/index.vue

@@ -1,63 +1,78 @@
1 1
 <template>
2 2
   <div class="mine">
3 3
     <div class="condition">
4
-      <el-date-picker
5
-        v-model="dates"
6
-        type="daterange"
7
-        range-separator="->"
8
-        start-placeholder="开始日期"
9
-        end-placeholder="结束日期"
10
-      ></el-date-picker>
4
+      <el-date-picker v-model="dates"
5
+                      type="daterange"
6
+                      range-separator="->"
7
+                      start-placeholder="开始日期"
8
+                      end-placeholder="结束日期"></el-date-picker>
11 9
 
12
-      <el-input placeholder="请输入项目" class="search" v-model="product">
13
-        <i slot="prefix" class="el-input__icon el-icon-search"></i>
10
+      <el-input placeholder="请输入项目"
11
+                class="search"
12
+                v-model="product">
13
+        <i slot="prefix"
14
+           class="el-input__icon el-icon-search"></i>
14 15
       </el-input>
15 16
 
16
-      <el-input placeholder="请输入优惠券" class="search" v-model="coupon">
17
-        <i slot="prefix" class="el-input__icon el-icon-search"></i>
17
+      <el-input placeholder="请输入优惠券"
18
+                class="search"
19
+                v-model="coupon">
20
+        <i slot="prefix"
21
+           class="el-input__icon el-icon-search"></i>
18 22
       </el-input>
19 23
 
20
-      <el-input placeholder="请输入内容" class="search" v-model="searchText">
21
-        <i slot="prefix" class="el-input__icon el-icon-search"></i>
24
+      <el-input placeholder="请输入内容"
25
+                class="search"
26
+                v-model="searchText">
27
+        <i slot="prefix"
28
+           class="el-input__icon el-icon-search"></i>
22 29
       </el-input>
23
-      <el-button type="primary" class="searchButton" @click="getOrderList()">搜索</el-button>
30
+      <el-button type="primary"
31
+                 class="searchButton"
32
+                 @click="getOrderList()">搜索</el-button>
24 33
     </div>
25 34
 
26 35
     <div class="user-list">
27
-      <el-table
28
-        ref="multipleTable"
29
-        :data="tableData"
30
-        tooltip-effect="dark"
31
-        height="354"
32
-        style="width: 100%;border-radius: 8px;"
33
-        @row-click="handleSelectionChange"
34
-      >
35
-        <el-table-column label="头像" width="120">
36
+      <el-table ref="multipleTable"
37
+                :data="tableData"
38
+                tooltip-effect="dark"
39
+                height="500"
40
+                style="width: 100%;border-radius: 8px;"
41
+                @row-click="handleSelectionChange">
42
+        <el-table-column label="头像"
43
+                         width="120">
36 44
           <template slot-scope="scope">
37 45
             <div class="head-img">
38
-              <img :src="scope.row.avatar_url" alt />
46
+              <img :src="scope.row.avatar_url"
47
+                   alt />
39 48
             </div>
40 49
           </template>
41 50
         </el-table-column>
42
-        <el-table-column prop="nickname" label="昵称" width="120"></el-table-column>
43
-        <el-table-column prop="mobile" label="联系电话" show-overflow-tooltip></el-table-column>
44
-        <el-table-column prop="order_time" label="预约时间" show-overflow-tooltip></el-table-column>
45
-        <el-table-column prop="date" label="状态" show-overflow-tooltip>
51
+        <el-table-column prop="nickname"
52
+                         label="昵称"
53
+                         width="120"></el-table-column>
54
+        <el-table-column prop="mobile"
55
+                         label="联系电话"
56
+                         show-overflow-tooltip></el-table-column>
57
+        <el-table-column prop="order_time"
58
+                         label="预约时间"
59
+                         show-overflow-tooltip></el-table-column>
60
+        <el-table-column prop="date"
61
+                         label="状态"
62
+                         show-overflow-tooltip>
46 63
           <template slot-scope="scope">
47
-            <div :class="'color'+scope.row.status">{{statusStr[scope.row.status]}}</div>
64
+            <div :style="scope.row.status==0?'color: #FC3019':scope.row.status==5?'color: #A999EA':'color: #61D09D;'">{{ scope.row.status==0?'未支付':scope.row.status==5?'已取消':'待使用' }}</div>
48 65
           </template>
49 66
         </el-table-column>
50 67
       </el-table>
51 68
 
52 69
       <div class="pagin">
53
-        <el-pagination
54
-          background
55
-          layout="prev, pager, next"
56
-          @size-change="handleSizeChange"
57
-          @current-change="handleCurrentChange"
58
-          :current-page.sync="currentPage1"
59
-          :total="total"
60
-        ></el-pagination>
70
+        <el-pagination background
71
+                       layout="prev, pager, next"
72
+                       @size-change="handleSizeChange"
73
+                       @current-change="handleCurrentChange"
74
+                       :current-page.sync="currentPage1"
75
+                       :total="total"></el-pagination>
61 76
       </div>
62 77
     </div>
63 78
   </div>
@@ -68,24 +83,15 @@ import api from "../../server/home";
68 83
 
69 84
 export default {
70 85
   components: {},
71
-  data() {
86
+  data () {
72 87
     return {
73 88
       searchText: "",
74 89
       dates: "",
75 90
       coupon: "",
76 91
       limit: 10,
77 92
       total: 0,
78
-      product:"",
79
-      coupon:"",
80
-      statusStr: [
81
-        "已预约",
82
-        "未支付",
83
-        "已支付",
84
-        "待使用",
85
-        "正在使用",
86
-        "已结算",
87
-        "已取消"
88
-      ],
93
+      product: "",
94
+      coupon: "",
89 95
       couponList: [
90 96
         {
91 97
           value: "选项1",
@@ -123,21 +129,19 @@ export default {
123 129
 
124 130
   methods: {
125 131
     // 获取订单列表
126
-    getOrderList() {
127
-      console.log("xxxxxxx");
132
+    getOrderList () {
128 133
       let start_date = "",
129 134
         end_date = "";
130 135
       if (this.dates && this.dates.length > 0) {
131 136
         start_date = utils.formatTime(this.dates[0], "yyyy-MM-dd");
132 137
         end_date = utils.formatTime(this.dates[1], "yyyy-MM-dd");
133 138
       }
134
-      console.log(start_date, end_date, "end_date");
135 139
       let params = {
136 140
         page: this.currentPage1,
137 141
         limit: this.limit,
138 142
         keywords: this.searchText,
139
-        project_name:this.product,
140
-        coupon_name:this.coupon,
143
+        project_name: this.product,
144
+        coupon_name: this.coupon,
141 145
         start_date: start_date,
142 146
         end_date: end_date
143 147
       };
@@ -148,17 +152,15 @@ export default {
148 152
         }
149 153
       });
150 154
     },
151
-    
152
-    handleCurrentChange(e) {
155
+
156
+    handleCurrentChange (e) {
153 157
       this.currentPage1 = e;
154 158
       this.getOrderList();
155
-      console.log(e, "eeeeee");
156 159
     },
157 160
 
158
-    handleSizeChange(val) {
159
-      console.log(`每页 ${val} 条`);
161
+    handleSizeChange (val) {
160 162
     },
161
-    handleSelectionChange(row, column, event) {
163
+    handleSelectionChange (row, column, event) {
162 164
       this.$router.push({
163 165
         path: "/historicalOrder/details",
164 166
         query: {
@@ -168,11 +170,11 @@ export default {
168 170
     }
169 171
   },
170 172
 
171
-  created() {
173
+  created () {
172 174
     this.getOrderList();
173 175
   },
174 176
 
175
-  mounted() {}
177
+  mounted () { }
176 178
 };
177 179
 </script>
178 180
 
@@ -242,7 +244,7 @@ export default {
242 244
     color: #00eeee;
243 245
   }
244 246
   .color3 {
245
-    color: #61D09D;
247
+    color: #61d09d;
246 248
   }
247 249
   .color4 {
248 250
     color: #3115cc;
@@ -251,7 +253,7 @@ export default {
251 253
     color: #fc3019;
252 254
   }
253 255
   .color6 {
254
-    color: #A999EA;
256
+    color: #a999ea;
255 257
   }
256 258
 }
257 259
 </style>

+ 86 - 49
src/pages/home/index.vue

@@ -3,6 +3,7 @@
3 3
     <div class="tab">
4 4
       <div class="make-order"
5 5
            v-for="item,index in tabList"
6
+           @click="changeTable(item.type)"
6 7
            :key="index">
7 8
         <div class="make-icon">
8 9
           <img :src="item.image">
@@ -15,44 +16,52 @@
15 16
     </div>
16 17
     <div class="order-list">
17 18
       <div class="title">预约订单列表</div>
18
-      <div v-if="orderList.length>0"
19
-           class="list-info">
20
-        <div class="user-info"
21
-             v-for="(item,index) in orderList"
22
-             :key="index"
23
-             @click="toOrderDetails(item)"
24
-             :style="index==orderList.length-1?'border-bottom:0px':''">
25
-          <div class="head-img">
26
-            <div class="new">新</div><img :src="item.avatar_url"
27
-                 alt="">
28
-          </div>
29
-          <div class="user-information">
30
-            <div class="name">客户昵称:<span>{{ item.nickname }}</span></div>
31
-            <div class="name">预约项目时间:<span>{{ item.order_time }}</span></div>
32
-            <div class="name">预约项目数量:<span>{{ item.project_num }}</span></div>
33
-          </div>
34
-          <ul class="product-list">
35
-            <li class="product-image"
36
-                v-for="value,i in item.project_list"
37
-                :key="i"><img :src="value.cover_url"
38
-                   alt=""></li>
39
-          </ul>
40
-          <div class="status"
41
-               :style="item.status==0?'color: #FC3019':item.status==5?'color: #A999EA':'color: #61D09D;'">
42
-            {{ item.status==0?'未支付':item.status==5?'已取消':'待使用' }}
19
+      <div class="list-info">
20
+        <van-list v-model="loading"
21
+                  :finished="finished"
22
+                  finished-text="没有更多了"
23
+                  @load=" getToday ">
24
+
25
+          <div class="user-info"
26
+               v-for="(item,index) in orderList"
27
+               :key="index"
28
+               @click="toOrderDetails(item)"
29
+               :style="index==orderList.length-1?'border-bottom:0px':''">
30
+            <div class="head-img">
31
+              <div class="new"
32
+                   v-if="item.is_new==1">新</div><img :src="item.avatar_url"
33
+                   alt="">
34
+            </div>
35
+            <div class="user-information">
36
+              <div class="name">客户昵称:<span>{{ item.nickname }}</span></div>
37
+              <div class="name">预约项目时间:<span>{{ item.order_time }}</span></div>
38
+              <div class="name">预约项目数量:<span>{{ item.project_num }}</span></div>
39
+            </div>
40
+            <ul class="product-list">
41
+              <li class="product-image"
42
+                  v-for="value,i in item.project_list"
43
+                  :key="i"><img :src="value.cover_url"
44
+                     alt=""></li>
45
+            </ul>
46
+            <div class="status"
47
+                 :style="item.status==0?'color: #FC3019':item.status==5?'color: #A999EA':'color: #61D09D;'">
48
+              {{ item.status==0?'未支付':item.status==5?'已取消':'待使用' }}
49
+            </div>
43 50
           </div>
44
-        </div>
51
+        </van-list>
45 52
       </div>
46
-      <div v-else
53
+      <!-- <div v-else
47 54
            class="empty">
48 55
         暂无数据
49
-      </div>
56
+      </div> -->
50 57
     </div>
51 58
   </div>
52 59
 </template>
53 60
 
54 61
 <script>
55 62
 import api from '@/server/home'
63
+import vanList from 'vant/lib/list';
64
+import 'vant/lib/list/style';
56 65
 
57 66
 export default {
58 67
   name: 'home',
@@ -62,31 +71,39 @@ export default {
62 71
         {
63 72
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/make.png',
64 73
           num: 0,
65
-          name: '预约订单'
74
+          name: '预约订单',
75
+          type: 0,
66 76
         },
67 77
         {
68 78
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/unpaid.png',
69 79
           num: 0,
70
-          name: '未支付订单'
80
+          name: '未支付订单',
81
+          type: 2,
71 82
         },
72 83
         {
73 84
           image: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/home/cancelOrder.png',
74 85
           num: 0,
75
-          name: '取消订单'
86
+          name: '取消订单',
87
+          type: 3
76 88
         },
77 89
       ],
78 90
       orderList: [
79 91
       ],
92
+      loading: false,
93
+      finished: false,
94
+      page: 1,
95
+      limit: 10,
96
+      type: 0
80 97
 
81 98
     }
82 99
   },
100
+  components: { vanList },
83 101
   mounted: function () {
84 102
 
85 103
   },
86 104
   created: function () {
87 105
     this.getTotal()
88
-    this.getToday()
89
-    console.log(this.$store.state.comVal.token, 'this.$store.state.comVal.token');
106
+    // this.getToday()
90 107
   },
91 108
   methods: {
92 109
     getTotal () {
@@ -96,26 +113,46 @@ export default {
96 113
           this.tabList[1].num = res.data.wait_pay_num
97 114
           this.tabList[2].num = res.data.cancel_num
98 115
         }
99
-        console.log(res, 'res====');
100 116
       })
101 117
     },
118
+    changeTable (type) {
119
+      this.type = type
120
+      this.orderList = []
121
+      this.loading = false
122
+      this.finished = false
123
+      this.page = 1
124
+    },
102 125
     getToday () {
103
-      api.getToday().then(res => {
104
-        if (res.code = 200) {
105
-          this.orderList = res.data.list
106
-        }
107
-        console.log(res, 'res');
108
-      })
126
+      setTimeout(() => {
127
+        api.getToday({ page: this.page, limit: this.limit, type: this.type }).then(res => {
128
+          if (res.code = 200) {
129
+            this.orderList = [...this.orderList, ...res.data.list]
130
+            this.page++
131
+            this.loading = false;
132
+            if (this.orderList.length >= res.data.total) {
133
+              this.finished = true;
134
+            }
135
+          }
136
+        })
137
+      }, 1000);
138
+
109 139
     },
110 140
     toOrderDetails (e) {
111
-      console.log(e);
112
-      if (e.status != 0) return
113
-      this.$router.push({
114
-        path: '/confirmOrder/details',
115
-        query: {
116
-          id: e.id
117
-        }
118
-      })
141
+      if (e.status == 0) {
142
+        this.$router.push({
143
+          path: '/confirmOrder/details',
144
+          query: {
145
+            id: e.id
146
+          }
147
+        })
148
+      } else {
149
+        this.$router.push({
150
+          path: "/historicalOrder/details",
151
+          query: {
152
+            id: e.id
153
+          }
154
+        });
155
+      }
119 156
     },
120 157
     initData () {
121 158
 
@@ -193,7 +230,7 @@ export default {
193 230
     }
194 231
 
195 232
     .list-info {
196
-      height: 300px;
233
+      height: 450px;
197 234
       overflow: auto;
198 235
 
199 236
       .user-info {

+ 2 - 1
src/pages/login/login.vue

@@ -53,11 +53,12 @@ export default {
53 53
       api.getToken(params).then(res => {
54 54
         if (res.code == 200) {
55 55
           this.$store.state.comVal.token = res.data.token
56
-          console.log(this.$store.state.comVal.token, 'this.$store.');
57 56
           localStorage.setItem("token", res.data.token)
58 57
           this.$router.push({
59 58
             path: '/home'
60 59
           })
60
+        } else {
61
+          this.$message.error('账号或密码错误,请核对后输入');
61 62
         }
62 63
       })
63 64
     }

+ 0 - 2
src/pages/testSkin/index.vue

@@ -76,7 +76,6 @@ export default {
76 76
         start_date = utils.formatTime(this.dates[0], 'yyyy-MM-dd')
77 77
         end_date = utils.formatTime(this.dates[1], 'yyyy-MM-dd')
78 78
       }
79
-      console.log(start_date, end_date, 'end_date');
80 79
       let params = {
81 80
         page: this.currentPage1,
82 81
         limit: this.limit,
@@ -102,7 +101,6 @@ export default {
102 101
     handleCurrentChange (e) {
103 102
       this.currentPage1 = e
104 103
       this.getSkinList
105
-      console.log(e, 'eeeeee');
106 104
     }
107 105
   },
108 106
 

+ 44 - 9
src/router/map/home.js

@@ -11,6 +11,7 @@ import HistoricalOrder from '@/pages/historicalOrder/index'
11 11
 import HistoricalOrderDetails from '@/pages/historicalOrder/details'
12 12
 import ConfirmOrder from '@/pages/confirmOrder/index'
13 13
 import ConfirmOrderDetails from '@/pages/confirmOrder/details'
14
+import ConfirmOrderAddOrder from '@/pages/confirmOrder/addOrder'
14 15
 import StoreDetection from '@/pages/storeDetection/index'
15 16
 import Coupon from '@/pages/coupon/index'
16 17
 import projectOrder from '@/pages/customerMan/myOrder'
@@ -19,9 +20,14 @@ export default {
19 20
   path: '/layout',
20 21
   name: '首页',
21 22
   component: layout,
22
-  children: [
23
-    { path: '/home', component: Home },
24
-    { path: '/testSkin', component: TestSkin },
23
+  children: [{
24
+      path: '/home',
25
+      component: Home
26
+    },
27
+    {
28
+      path: '/testSkin',
29
+      component: TestSkin
30
+    },
25 31
     {
26 32
       path: '/testSkin/details',
27 33
       meta: {
@@ -29,7 +35,10 @@ export default {
29 35
       },
30 36
       component: TestSkinDetails
31 37
     },
32
-    { path: '/customerMan', component: CustomerMan },
38
+    {
39
+      path: '/customerMan',
40
+      component: CustomerMan
41
+    },
33 42
     {
34 43
       path: '/customerMan/details',
35 44
       meta: {
@@ -37,8 +46,17 @@ export default {
37 46
       },
38 47
       component: CustomerManDetails
39 48
     },
40
-    { path: '/customerMan/projectOrder', component: projectOrder },
41
-    { path: '/historicalOrder', component: HistoricalOrder },
49
+    {
50
+      path: '/customerMan/projectOrder',
51
+      meta: {
52
+        isback: true,
53
+      },
54
+      component: projectOrder
55
+    },
56
+    {
57
+      path: '/historicalOrder',
58
+      component: HistoricalOrder
59
+    },
42 60
     {
43 61
       path: '/historicalOrder/details',
44 62
       meta: {
@@ -46,7 +64,10 @@ export default {
46 64
       },
47 65
       component: HistoricalOrderDetails
48 66
     },
49
-    { path: '/confirmOrder', component: ConfirmOrder },
67
+    {
68
+      path: '/confirmOrder',
69
+      component: ConfirmOrder
70
+    },
50 71
     {
51 72
       path: '/confirmOrder/details',
52 73
       meta: {
@@ -54,8 +75,22 @@ export default {
54 75
       },
55 76
       component: ConfirmOrderDetails
56 77
     },
57
-    { path: '/storeDetection', component: StoreDetection },
58
-    { path: '/coupon', component: Coupon },
78
+    {
79
+      path: '/confirmOrder/addOrder',
80
+      meta: {
81
+        isback: true,
82
+      },
83
+      component: ConfirmOrderAddOrder
84
+    },
85
+
86
+    {
87
+      path: '/storeDetection',
88
+      component: StoreDetection
89
+    },
90
+    {
91
+      path: '/coupon',
92
+      component: Coupon
93
+    },
59 94
 
60 95
   ]
61 96
 }

+ 15 - 1
src/server/home.js

@@ -60,6 +60,15 @@ export default class Home {
60 60
   static getOrderByCode (parms) {
61 61
     return $http.get(url.getOrderByCode, parms);
62 62
   }
63
+  static orderPay (parms) {
64
+    return $http.post(url.orderPay, parms);
65
+  }
66
+  static payStatus (parms) {
67
+    return $http.get(url.payStatus, parms);
68
+  }
69
+  static getOrderDiscount (parms) {
70
+    return $http.get(url.getOrderDiscount, parms);
71
+  }
63 72
 
64 73
   // 获取历史订单
65 74
   static getOrderList (parms) {
@@ -95,7 +104,7 @@ export default class Home {
95 104
   static getPadUserInfo (parms) {
96 105
     return $http.get(url.getPadUserInfo, parms);
97 106
   }
98
-  
107
+
99 108
   // 获取优惠券订单
100 109
   static getUserCoupon (parms) {
101 110
     return $http.get(url.getUserCoupon, parms);
@@ -111,6 +120,11 @@ export default class Home {
111 120
     return $http.get(url.getUserProject, parms);
112 121
   }
113 122
 
123
+  // 新增项目订单
124
+  static padOrderAdd (parms) {
125
+    return $http.post(url.padOrderAdd, parms);
126
+  }
127
+
114 128
 }
115 129
 
116 130
 

+ 8 - 0
src/server/urls.js

@@ -33,6 +33,12 @@ export default {
33 33
   checkCode: '/v2/pad/order/check_code',
34 34
   //通过授权码获取未支付订单
35 35
   getOrderByCode: '/v2/pad/order/get_order_by_code',
36
+  //支付
37
+  orderPay: '/v2/pad/order/pay',
38
+  //支付状态
39
+  payStatus: '/v2/pad/order/pay_status',
40
+  //活动折扣
41
+  getOrderDiscount: '/v2/pad/order/discount',
36 42
 
37 43
   /**
38 44
    *  by ListKer
@@ -68,5 +74,7 @@ export default {
68 74
   // 获取优惠券订单
69 75
   getUserCoupon: '/v2/pad/user/coupon',
70 76
 
77
+  // 获取优惠券订单
78
+  padOrderAdd: '/v2/pad/order/add',
71 79
 
72 80
 }