修改隐藏分享功能
This commit is contained in:
@@ -0,0 +1 @@
|
||||
VITE_API_BASE_URL=http://agent.admin.haodian.cn
|
||||
+8
-1
@@ -27,6 +27,7 @@ import { ref } from 'vue'
|
||||
import SideMenu from '@/components/SideMenu.vue' // 导入SideMenu组件
|
||||
import { onMounted } from 'vue'
|
||||
import api from '@/utils/api'
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
|
||||
// 声明组件名称(可选,用于devtools)
|
||||
defineOptions({ name: 'My' })
|
||||
@@ -54,7 +55,13 @@ async function getUserInfo() {
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
getUserInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
import api from '@/utils/api'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import PageInitLoading from '@/components/PageInitLoading.vue'
|
||||
@@ -154,6 +155,12 @@ const getMySubidy = async () => {
|
||||
|
||||
// 在组件挂载时调用
|
||||
onMounted( async () => {
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
await getMySubidy()
|
||||
});
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { showConfirmDialog, showToast } from 'vant';
|
||||
@@ -126,7 +127,7 @@ import { areaList } from '@vant/area-data';
|
||||
import BrandList from '../components/BrandList.vue' // 导入BrandList组件
|
||||
import PopContent from '@/components/PopContent.vue' // 导入PopContent组件
|
||||
import api from '../utils/api.js' // 导入API
|
||||
import WechatUtils, { WechatImage } from '../utils/wechat.js' // 导入微信工具
|
||||
// import WechatUtils, { WechatImage } from '../utils/wechat.js' // 导入微信工具
|
||||
import { getBasicConfig } from '@/utils/basicSetting'
|
||||
|
||||
|
||||
@@ -184,6 +185,12 @@ onMounted( async() => {
|
||||
// showToast('缺少补贴ID参数');
|
||||
// console.warn('补贴ID未找到,请检查路由参数');
|
||||
// }
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
await getGuideInfo();
|
||||
if(subsidyId.value){ //编辑
|
||||
await getSubsidyInfo(subsidyId.value);
|
||||
|
||||
@@ -99,6 +99,7 @@ import {useRoute, useRouter} from 'vue-router';
|
||||
import {showConfirmDialog, showDialog, showToast} from 'vant';
|
||||
import api from '../utils/api.js' // 导入API
|
||||
import SideMenu from '@/components/SideMenu.vue' // 导入SideMenu组件
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
|
||||
|
||||
const route = useRoute();
|
||||
@@ -130,6 +131,12 @@ const countdown = ref(60);
|
||||
|
||||
// 组件挂载ef(时检查补贴ID
|
||||
onMounted(async () => {
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
const carInfo = await getCardInfo();
|
||||
console.info('银行卡信息', carInfo);
|
||||
Object.assign(form, carInfo);
|
||||
|
||||
@@ -82,6 +82,7 @@ import PopContent from '../components/PopContent.vue'
|
||||
import PopStores from '@/components/PopStores.vue'
|
||||
import PageInitLoading from '@/components/PageInitLoading.vue'
|
||||
import SideMenu from '@/components/SideMenu.vue' // 导入SideMenu组件
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
|
||||
import api from '@/utils/api'
|
||||
import { ref, onMounted } from 'vue'
|
||||
@@ -106,6 +107,12 @@ const is_show = ref(0)
|
||||
const is_first_load = ref(true)
|
||||
|
||||
onMounted(async () => {
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
await getMyCoupon()
|
||||
});
|
||||
const onLoad = async () => {
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import WechatUtils,{ WechatShare } from '@/utils/wechat'
|
||||
import api from '@/utils/api'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import PageInitLoading from '@/components/PageInitLoading.vue'
|
||||
@@ -83,6 +84,12 @@ const is_show = ref(0)
|
||||
const is_first_load = ref(true)
|
||||
|
||||
onMounted(async () => {
|
||||
let appid = localStorage.getItem('app_id')
|
||||
if(appid) {
|
||||
await WechatUtils.init(appid);
|
||||
// 隐藏分享
|
||||
await WechatShare.hideAllNonBaseMenuItem();
|
||||
}
|
||||
await getMyOrder()
|
||||
});
|
||||
const onLoad = async() => {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// API 基础配置
|
||||
export default {
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL || 'https://hcb.liche.cn', // 接口基地址,优先使用环境变量
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL, // 接口基地址,优先使用环境变量
|
||||
timeout: 10000, // 请求超时时间(毫秒)
|
||||
commonHeaders: { // 公共请求头
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user