You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
725 B
JavaScript
31 lines
725 B
JavaScript
import {defineStore} from 'pinia'
|
|
import {ref}from 'vue'
|
|
import {getBy,getBalanceInfo} from '../../api/api.js'
|
|
export const carryOut = defineStore('carryOut',()=>{
|
|
const bys = ref([])
|
|
const balancesa = ref([])
|
|
//获取洗车时可购买的套餐信息
|
|
const getBys =(data)=>{
|
|
console.log(data);
|
|
getBy(data).then((res)=>{
|
|
bys.value = res.data
|
|
// console.log(res.data);
|
|
console.log(bys.value);
|
|
})
|
|
}
|
|
const getBalanceInfoUser = (data) =>{
|
|
getBalanceInfo({phoneNumber:uni.getStorageSync('phoneNumber'),networkId:data}).then((res)=>{
|
|
balancesa.value = res.data
|
|
console.log(balancesa.value);
|
|
})
|
|
|
|
}
|
|
|
|
|
|
return{
|
|
bys,
|
|
getBys,
|
|
getBalanceInfoUser,
|
|
balancesa
|
|
}
|
|
}) |