新增营销系统、分销系统、会员功能、门店、提现功能

This commit is contained in:
Shaw
2024-02-08 21:01:37 +08:00
parent 68b3f2dcc3
commit 17c043348a
1398 changed files with 81279 additions and 56269 deletions

View File

@ -0,0 +1,54 @@
import api from '../../config/api'
import {
funMixin
} from '../../config/mixin'
const { sendReq} = funMixin()
import {
ref,
onMounted,
} from 'vue';
export default function (componentContent, shopId) {
const {
jumpProductDetail,
jumpCombination
} = funMixin()
const productData = ref({
composeProducts: [],
rules: [{
price: null,
number: null,
}],
})
onMounted(() => {
getData(true)
})
function getData() {
if(componentContent.value.priceId){
const params = {
method: 'GET',
url: `${api.getPrices}?shopId=${shopId.value}&ids=${componentContent.value.priceId}&page=1&pageSize=10`,
}
sendReq(params, (res) => {
if( res.data.length > 0){
productData.value = res.data[0]
}
})
} else {
productData.value = {
composeProducts: [],
rules: []
}
}
}
return {
getData,
productData,
jumpProductDetail,
jumpCombination
}
}