Commit a7ad00be by cpa

修改商家端订单查询异常

parent a2c1a242
...@@ -33,7 +33,7 @@ export function getGoodsDetails(query) { ...@@ -33,7 +33,7 @@ export function getGoodsDetails(query) {
export function addOrEditGoods(data) { export function addOrEditGoods(data) {
return request({ return request({
url: '/admin/mallGoodsSpec/addOrEditGoods', url: '/admin/merchantMallGoods/addOrEditGoods',
method: 'post', method: 'post',
data data
}) })
......
...@@ -192,6 +192,8 @@ ...@@ -192,6 +192,8 @@
<script> <script>
import {getMerchantByAccount} from "@/api/mall/merchantMallgoods";
let DBG = true let DBG = true
import { import {
ZmMixin ZmMixin
...@@ -206,6 +208,7 @@ ...@@ -206,6 +208,7 @@
getGoodsDetails, getGoodsDetails,
addOrEditGoods addOrEditGoods
} from './goods_api.js' } from './goods_api.js'
import {fetchList} from "@/api/mall/merchantMallorder";
export default { export default {
mixins: [ZmMixin], mixins: [ZmMixin],
components: { components: {
...@@ -681,30 +684,25 @@ ...@@ -681,30 +684,25 @@
doSubmit: function () { doSubmit: function () {
let id = this.id let id = this.id
if(JSON.stringify(id)==='{}'||id===undefined){ if(JSON.stringify(id)==='{}'||id===undefined){
// 根据当前登陆用户id 获取商家id // 1.获取当前登陆用户ID
let userId = JSON.parse(sessionStorage.getItem("linshenxs-userInfo")).content.userId let userInfo= JSON.parse(sessionStorage.getItem("linshenxs-userInfo"))
this.$axios.get("/admin/merchantMallGoods/getMerchantByUserId",{ let account=userInfo.content.username
params:{id:userId}, getMerchantByAccount(
}).then(response => { {account: account}
).then(response => {
this.form.merchantId=response.data.data.id this.form.merchantId=response.data.data.id
const {data: res} = this.$http.post( addOrEditGoods(this.form).then(data => {
"/general/mallGoods/addOrEditGoods",
this.form).then(r => {
this.loading = false
this.$emit('success')
this.$message.success('添加成功') this.$message.success('添加成功')
// this.$router.go(-1) done()
}).catch(e => { }).catch(() => {
this.loading = false });
}) }).catch(() => {
}, error => { this.tableLoading = false
console.log('错误', error.message)
}) })
}else{ }else{
addOrEditGoods(this.form).then(data => { addOrEditGoods(this.form).then(data => {
this.$message.success('修改成功') this.$message.success('修改成功')
done() done()
// this.$router.go(-1)
}).catch(() => { }).catch(() => {
}); });
} }
......
...@@ -283,21 +283,6 @@ ...@@ -283,21 +283,6 @@
}).catch(() => { }).catch(() => {
this.tableLoading = false this.tableLoading = false
}) })
//
// this.tableLoading = true
// if(page.currentPage=1){
// page.currentPage=0
// }
// fetchList(Object.assign({
// current: page.currentPage,
// size: page.pageSize
// }, params, this.searchForm )).then(response => {
// this.tableData = response.data.data.records
// this.page.total = response.data.data.total
// this.tableLoading = false
// }).catch(() => {
// this.tableLoading=false
// })
}, },
// 删除 // 删除
handleDel: function (row, index) { handleDel: function (row, index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment