新增营销系统、分销系统、会员功能、门店、提现功能
This commit is contained in:
55
components/canvasShow/basics/group/mixin.js
Normal file
55
components/canvasShow/basics/group/mixin.js
Normal file
@ -0,0 +1,55 @@
|
||||
import api from '../../config/api'
|
||||
import {
|
||||
funMixin
|
||||
} from '../../config/mixin'
|
||||
import {
|
||||
ref,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
|
||||
export default function (componentContent, typeId, shopId) {
|
||||
const {
|
||||
sendReq,
|
||||
beforeGetData,
|
||||
afterGetData,
|
||||
jumpProductDetail,
|
||||
jumpGroupWorks
|
||||
} = funMixin()
|
||||
const productList = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
getData()
|
||||
})
|
||||
|
||||
function getData () {
|
||||
if (componentContent.value.id) {
|
||||
beforeGetData()
|
||||
const params = {
|
||||
method: 'POST',
|
||||
url: api.getActivityProduct,
|
||||
data: {
|
||||
isPage: 2,
|
||||
type: 1
|
||||
}
|
||||
}
|
||||
sendReq(
|
||||
params,
|
||||
(res) => {
|
||||
afterGetData()
|
||||
productList.value = res.data.list
|
||||
},
|
||||
() => {
|
||||
afterGetData()
|
||||
}
|
||||
)
|
||||
} else {
|
||||
productList.value = []
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
productList,
|
||||
jumpProductDetail,
|
||||
jumpGroupWorks
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user