Commit 8764ffd1 by 张立顺

请求方式修改

1 parent 1a1b14cc
...@@ -11,7 +11,8 @@ export function shopSettingList(data) { ...@@ -11,7 +11,8 @@ export function shopSettingList(data) {
// 店铺设置保存 // 店铺设置保存
export function shopSetting(data) { export function shopSetting(data) {
data.method = `${path}serviceMerchant.shopSetting` data.method = `${path}serviceMerchant.shopSetting`
return request(data) // return request(data)
return request(data, RequestMethods.POST)
} }
// 获取店铺设置 // 获取店铺设置
......
...@@ -134,6 +134,9 @@ export default { ...@@ -134,6 +134,9 @@ export default {
*/ */
opend2db({ state, dispatch }) { opend2db({ state, dispatch }) {
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
try {
// debugger
console.log(state, dispatch)
// 设置数据 // 设置数据
dispatch( dispatch(
"d2admin/db/set", "d2admin/db/set",
...@@ -147,6 +150,10 @@ export default { ...@@ -147,6 +150,10 @@ export default {
root: true root: true
} }
) )
} catch (error) {
console.log(error, "opend2db")
}
// end // end
resolve() resolve()
}) })
...@@ -280,6 +287,7 @@ export default { ...@@ -280,6 +287,7 @@ export default {
state.opened.splice(index, 1) state.opened.splice(index, 1)
} }
// 持久化 // 持久化
await dispatch("opend2db") await dispatch("opend2db")
// 最后需要判断是否需要跳到首页 // 最后需要判断是否需要跳到首页
if (isCurrent) { if (isCurrent) {
......
...@@ -374,7 +374,7 @@ export default { ...@@ -374,7 +374,7 @@ export default {
} }
}) })
console.log(_params) console.log(_params)
shopSetting(_params).then(res => { shopSetting({ dataString: JSON.stringify(_params) }).then(res => {
this.notice.okTips() this.notice.okTips()
this.handleCancel() this.handleCancel()
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!