{
try {
const response = await fetch(`${$store.state.apiBaseUrl}/earn`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Accept': 'application/json'
},
body: JSON.stringify({ type: type })
});
const currentPoints = parseInt('1');
$store.state.earnedPoints+=currentPoints;
} catch (e) {
console.error('earn rule api error ---->', e);
}
}
callApi()
"
:style="{
backgroundColor: $store.state.generalStyles?.button?.backgroundColor,
color: $store.state.generalStyles?.button?.textColor,
fontFamily: 'DynamicFont',
fontSize: `${$store.state.generalStyles?.button?.size}px`,
borderRadius: $store.state.generalStyles?.button?.radius?.isMultiple ? `${$store.state.generalStyles?.button?.radius?.tl}px ${$store.state.generalStyles?.button?.radius?.tr}px ${$store.state.generalStyles?.button?.radius?.br}px ${$store.state.generalStyles?.button?.radius?.bl}px` : `${$store.state.generalStyles?.button?.radius?.radius}px`
}"
role="button"
class="line-px-3 line-flex line-items-center line-justify-center line-h-[44px] line-p-[13px] line-font-medium line-cursor-pointer line-gap-2">
Place order
{
try {
const response = await fetch(`${$store.state.apiBaseUrl}/earn`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Accept': 'application/json'
},
body: JSON.stringify({ type: type })
});
const currentPoints = parseInt('1');
$store.state.earnedPoints+=currentPoints;
} catch (e) {
console.error('earn rule api error ---->', e);
}
}
callApi()
"
:style="{
backgroundColor: $store.state.generalStyles?.button?.backgroundColor,
color: $store.state.generalStyles?.button?.textColor,
fontFamily: 'DynamicFont',
fontSize: `${$store.state.generalStyles?.button?.size}px`,
borderRadius: $store.state.generalStyles?.button?.radius?.isMultiple ? `${$store.state.generalStyles?.button?.radius?.tl}px ${$store.state.generalStyles?.button?.radius?.tr}px ${$store.state.generalStyles?.button?.radius?.br}px ${$store.state.generalStyles?.button?.radius?.bl}px` : `${$store.state.generalStyles?.button?.radius?.radius}px`
}"
role="button"
class="line-px-3 line-flex line-items-center line-justify-center line-h-[44px] line-p-[13px] line-font-medium line-cursor-pointer line-gap-2">
Sign up