|
@@ -151,9 +151,9 @@
|
|
|
import orderMap from "./orderComponents/orderAMap.vue";
|
|
|
import addressManagement from "./addressManagement.vue";
|
|
|
import { getProductList } from "../api/shop.js";
|
|
|
+import { getConfig } from "../api/setting.js";
|
|
|
import { sendValuation, saveOrder, getAddressList } from "../api/order.js";
|
|
|
import sendOrderPopup from "../components/orderComponents/sendOrderPopup.vue";
|
|
|
-import { send } from "process";
|
|
|
export default {
|
|
|
name: "manualCreate",
|
|
|
data() {
|
|
@@ -320,9 +320,9 @@ export default {
|
|
|
});
|
|
|
console.log("sendAddress1", sendAddress);
|
|
|
Object.keys(this.form.sendAddress).map((v) => {
|
|
|
- this.form.sendAddress[v] = sendAddress ? sendAddress[v] : '';
|
|
|
+ this.form.sendAddress[v] = sendAddress ? sendAddress[v] : "";
|
|
|
});
|
|
|
- this.name = sendAddress ? sendAddress.name : '';
|
|
|
+ this.name = sendAddress ? sendAddress.name : "";
|
|
|
}
|
|
|
if (this.addressType === 2) {
|
|
|
this.addressList = res.data.personal;
|
|
@@ -488,7 +488,32 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
this.form.saveFlag = 1;
|
|
|
- this.saveOrder();
|
|
|
+ getConfig().then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ let amount = res.data.amount;
|
|
|
+ if (amount < 100) {
|
|
|
+ this.$confirm("您的账户余额小于100元,请及时充值!", "提示", {
|
|
|
+ confirmButtonText: "去充值",
|
|
|
+ cancelButtonText: "知道了!",
|
|
|
+ center: true,
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/shopInfo/shopAccount",
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.saveOrder();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
this.form.takeTime = this.$tool.getFormatDate(new Date());
|
|
|
this.sendValuation();
|