Commit c3e8b019 by cpa

商家端

parent 7732827b
......@@ -149,7 +149,6 @@
<script>
import {getGoodsDetails, getGoodsInfo,shipsImmediatelyApi,cancelOrderSubApi} from '@/api/mall/merchantMallgoods'
import {ZmMixin} from '@/mixins/ZmMixin.js'
import {mock} from "@/views/businessGoods/goodsEdit/mock_data";
export default {
mixins: [ZmMixin],
data() {
......@@ -221,7 +220,6 @@
}
},
methods: {
//回填数据
refill(data) {
let skus = data.skus
......
......@@ -2,7 +2,7 @@ import request from '@/router/axios'
export function getClassifyDropDown() {
return request({
url: 'admin/merchantMallGoods/merchantDropDownBox',
url: '/admin/merchantMallGoods/merchantDropDownBox',
method: 'get'
})
}
......@@ -41,27 +41,6 @@ export function getGoodsDetails(query) {
}
// addOrEditGoods(this.form)
// .then((res)=>{
// this.$message.success('添加成功')
// this.$emit('success')
// }).catch(e => {
// this.$message.success('添加失败')
// });
// }).catch(() => {
// this.tableLoading = false
// })
// export function addOrEditGoods(data) {
// return request({
// url: '/admin/merchantMallGoods/addOrEditGoods',
// method: 'post',
// params: data
//
// })
// }
/*** 自定义添加 ***/
export function getMerchantByAccount(parameter) {
return request({
......
......@@ -380,31 +380,18 @@
this.clearData()
}
this.loading = true
getClassifyDropDown()
.then(r => {
this.classOptions = this.zmRes(r)
if(DBG) {
this.refill(mock)
} else {
if(id != undefined) {
return getGoodsDetails({id: id})
}
}
return Promise.resolve()
})
.then(r => {
this.loading = false
if(r) {
let z = this.zmRes(r)
if(z) {
this.refill(z)
}
}
})
.catch(e => {
this.loading = false
console.log(e)
let userInfo= JSON.parse(sessionStorage.getItem("linshenxs-userInfo"))
let account=userInfo.content.username
this.$axios.get("/admin/merchantMallGoods/merchantDropDownBox",{
params:{merchantId:userInfo.content.username},
}).then(response => {
console.log(JSON.stringify(response) )
return response.data
}, error => {
console.log('错误', error.message)
})
},
//清除数据
clearData() {
......
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