完成分享
This commit is contained in:
+4
-4
@@ -8,6 +8,8 @@ import { GetShortCodeApi } from "@/api/share"
|
||||
export default () => {
|
||||
const {setUserInfo, setAdminUserInfo, setSortCode, userInfo} = useUserInfo()
|
||||
|
||||
console.log('userInfo:::', userInfo)
|
||||
|
||||
//登录请求 (调用这个就不能再useHttp中使用,当前这个hook, 否则会死循环内存溢出)
|
||||
// const {fetchData} = LoginApi()
|
||||
|
||||
@@ -109,16 +111,14 @@ export default () => {
|
||||
})
|
||||
}
|
||||
|
||||
//获取分享转码
|
||||
//获取分享码(右上角分享码)
|
||||
const {SharePage} = SHARE_SCENE
|
||||
const {fetchData: fetchDataShortCode} = GetShortCodeApi()
|
||||
const getShortCode = async (user_id) => {
|
||||
const {data: resPage} = await fetchDataShortCode({"share_user_id": user_id, type:SharePage.value})
|
||||
setSortCode({shareShortDetail: '', shareShortPage: resPage.md5_key})
|
||||
setSortCode({...userInfo.sort_code, shareShortPage: {title: '陆盈电子商城', code: resPage.md5_key, img:''}})
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
return {
|
||||
checkLogin,
|
||||
wxLogin,
|
||||
|
||||
Reference in New Issue
Block a user