diff --git a/src/api/server/index.js b/src/api/server/index.js
index 745bed7..ddf2a09 100644
--- a/src/api/server/index.js
+++ b/src/api/server/index.js
@@ -18,6 +18,7 @@ const api = {
dispatchOrders: '/server/dispatchOrders',
OrderStatus: '/server/OrderStatus',
OrderDeatil: '/server/orderDetail',
+ delOrder: '/server/delOrder',
listByIds: '/server/listByIds',
}
/**
@@ -203,3 +204,14 @@ export function orderStatusList(data) {
data,
})
}
+/**
+ * 删除
+ * @param {*} data
+ */
+export function delOrder(data) {
+ return axios({
+ url: api.delOrder,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/server/recovery.js b/src/api/server/recovery.js
index 00f77f0..9114743 100644
--- a/src/api/server/recovery.js
+++ b/src/api/server/recovery.js
@@ -16,6 +16,7 @@ const api = {
cancelOrder: '/recovery/cancelOrder',
orderStatus: '/recovery/orderStatus',
orderDetail: '/recovery/orderDetail',
+ orderDel: '/recovery/orderDel',
completeOrder: '/recovery/completeOrder',
}
/**
@@ -181,3 +182,14 @@ export function completeOrder(data) {
data,
})
}
+/**
+ * 订单删除
+ * @param {*} data
+ */
+export function orderDel(data) {
+ return axios({
+ url: api.orderDel,
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/components/SelectGoods/SelectGoods.vue b/src/components/SelectGoods/SelectGoods.vue
index 1cfff62..3422f27 100644
--- a/src/components/SelectGoods/SelectGoods.vue
+++ b/src/components/SelectGoods/SelectGoods.vue
@@ -1,6 +1,31 @@
登录微信小程序平台,开发 - 开发管理 - 开发设置,记录AppID (小程序ID)
登录小程序平台,开发 - 开发管理 - 开发设置 - 服务器域名,修改{{ item.protocol }}协议业务域名
@@ -68,24 +119,24 @@ import * as Api from '@/api/client/wxapp/setting' const domainList = [ { name: 'request', - protocol: 'https' + protocol: 'https', }, { name: 'socket', - protocol: 'wss' + protocol: 'wss', }, { name: 'uploadFile', - protocol: 'https' + protocol: 'https', }, { name: 'downloadFile', - protocol: 'https' + protocol: 'https', }, ] export default { - data () { + data() { return { // 标签布局属性 labelCol: { span: 4 }, @@ -106,46 +157,60 @@ export default { } }, // 初始化数据 - created () { + created() { // 获取当前详情记录 this.getDetail() }, methods: { - // 获取当前详情记录 - getDetail () { + getDetail() { this.isLoading = true Api.detail(this.key) - .then(result => { + .then((result) => { // 当前记录 this.record = result.data.detail this.domain = result.data.domain // 设置默认值 this.setFieldsValue() }) - .finally(() => this.isLoading = false) + .finally(() => (this.isLoading = false)) }, // 设置默认值 - setFieldsValue () { + setFieldsValue() { const { record, $nextTick, form } = this - !isEmpty(form.getFieldsValue()) && $nextTick(() => { - form.setFieldsValue(pick(record, ['enabled', 'app_id', 'app_secret'])) - }) + !isEmpty(form.getFieldsValue()) && + $nextTick(() => { + form.setFieldsValue( + pick(record, [ + 'enabled', + 'app_id', + 'app_secret', + 'same_city', + 'new_first_gift', + 'big_brand', + 'new_product', + 'ranking_list', + 'service', + ]) + ) + }) }, // 复制链接地址 - handleCopyLink (url) { - this.$copyText(url).then(res => { + handleCopyLink(url) { + this.$copyText(url).then((res) => { this.$message.success('复制成功', 0.8) }) }, // 确认按钮 - handleSubmit (e) { + handleSubmit(e) { e.preventDefault() // 表单验证 - const { form: { validateFields } } = this + const { + form: { validateFields }, + } = this validateFields((errors, values) => { // 提交到后端api !errors && this.onFormSubmit(values) @@ -153,14 +218,13 @@ export default { }, // 提交到后端api - onFormSubmit (values) { + onFormSubmit(values) { this.isLoading = true Api.update(this.key, { form: values }) - .then(result => this.$message.success(result.message, 1.5)) - .finally(() => this.isLoading = false) - } - - } + .then((result) => this.$message.success(result.message, 1.5)) + .finally(() => (this.isLoading = false)) + }, + }, }