-
- {{--
--}}
- {{--
--}}
+
-
插件名称
-
插件名称,插件名称,插件名称,插件名称,插件名称,
+
@{{ shipping.name }}
+
@@ -177,8 +173,8 @@
form: {
shipping_address_id: @json($current['shipping_address_id']),
payment_address_id: @json($current['payment_address_id']),
- payment_method: @json($current['payment_method']),
- shipping_method: @json($current['shipping_method']),
+ payment_method_code: @json($current['payment_method_code']),
+ shipping_method_code: @json($current['shipping_method_code']),
},
source: {
@@ -241,22 +237,18 @@
}
const type = this.dialogAddress.form.id ? 'put' : 'post';
+ const url = `/admin/customers/{{ $customer_id }}/addresses${type == 'put' ? '/' + this.dialogAddress.form.id : ''}`;
- $.ajax({
- url: `/admin/customers/{{ $customer_id }}/addresses${type == 'put' ? '/' + this.dialogAddress.form.id : ''}`,
- data: self.dialogAddress.form,
- type: type,
- success: function(res) {
- if (type == 'post') {
- self.source.addresses.push(res.data)
- } else {
- self.source.addresses[self.dialogAddress.index] = res.data
- }
- self.$message.success(res.message);
- self.$refs[form].resetFields();
- self.dialogAddress.show = false
- self.dialogAddress.index = null;
+ $http[type](url, this.dialogAddress.form).then((res) => {
+ if (type == 'post') {
+ this.source.addresses.push(res.data)
+ } else {
+ this.source.addresses[this.dialogAddress.index] = res.data
}
+ this.$message.success(res.message);
+ this.$refs[form].resetFields();
+ this.dialogAddress.show = false
+ this.dialogAddress.index = null;
})
});
},
@@ -279,8 +271,19 @@
})
},
+ updateCheckout(id, key) {
+ this.form[key] = id
+
+ $http.put('/checkout', this.form).then((res) => {
+ // console.log(res)
+ this.form = res.data.current
+ })
+ },
+
checkedBtnCheckoutConfirm() {
- console.log(1)
+ $http.post('/checkout', this.form).then((res) => {
+ // console.log(res)
+ })
}
}
})