Commit 813a6ef6 authored by 王炽's avatar 王炽

66666

parent f143e96b
......@@ -16,10 +16,10 @@ const {
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall";
const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
// let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const request = (options = {}) => {
// 在这里可以对请求头进行一些设置
......
......@@ -37,7 +37,7 @@
<!-- 底部按钮 -->
<view
class="bottom-button"
v-if="!(status1 === 4000 && !props.isshowLock)"
v-if="(!hasBaby && islogin) ? true : !(status1 === 4000 && !props.isshowLock)"
:style="{
background: `url(${$baseUrl}integral/1021/shengriliBtnBg${props.index}.png) no-repeat center/contain`
}"
......@@ -50,7 +50,7 @@
<image
class="bottom-button"
v-if="status1 === 4000 && !props.isshowLock"
v-if="(!hasBaby && islogin) ? false : status1 === 4000 && !props.isshowLock"
:src="`${$baseUrl}integral/1021/daikaiqiDisBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade_daikaiqi"
......@@ -63,6 +63,8 @@ import { defineProps, defineEmits, onMounted, ref } from 'vue'
import { showLoading, hideLoading } from '../../utils'
import { fetchBirthdayGiftJSON } from '../../api/integral'
import { useUserStore } from "../../stores/user";
const isShowShengjiBtn = () => {
let show = false;
if(props.isshowLock){
......@@ -100,6 +102,9 @@ const props = defineProps({
const emit = defineEmits(['points-click', 'coupon-click', 'upgrade'])
const getBtnName = () => {
if(!hasBaby.value){
return '去添加';
}
const btnName = '';
switch(status1.value){
case 4000:
......@@ -170,15 +175,34 @@ const getColor = () => {
}
const status1 = ref(0);
const hasBaby = ref(false);
const islogin = ref(true);
onMounted(async () => {
showLoading();
const data = await fetchBirthdayGiftJSON();
if(data.success){
status1.value = data.data.status;
// status1.value = 3000;
}
console.log('data', data);
hideLoading();
const userStore = useUserStore();
const memberInfo = userStore.memberInfo;
if(memberInfo.memberId == "not_login"){
islogin.value = false;
}else{
islogin.value = true
}
if(userStore.babyInfo?.allBabyBaseInfo && userStore.babyInfo?.allBabyBaseInfo.length > 0){
hasBaby.value = true;
}else{
hasBaby.value = false;
return;
}
showLoading();
const data = await fetchBirthdayGiftJSON();
if(data.success){
status1.value = data.data.status;
// status1.value = 3000;
}
console.log('data', data);
hideLoading();
})
......
This diff is collapsed.
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