dev
This commit is contained in:
parent
20c1ce7a42
commit
abc37a23b7
|
@ -223,32 +223,31 @@
|
|||
|
||||
import useUserStore from "@/store/user";
|
||||
const userStore = useUserStore();
|
||||
const STORE_INFO = reactive({})
|
||||
|
||||
const STORE_INFO = ref({
|
||||
name: '',
|
||||
id: 5,
|
||||
detailed_address: '',
|
||||
image: ''
|
||||
});
|
||||
|
||||
const test = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pageQuota/quotation/index'
|
||||
})
|
||||
const getStoreInfo = () => {
|
||||
if (uni.getStorageSync('STORE_INFO')) {
|
||||
let data = JSON.parse(uni.getStorageSync('STORE_INFO'))
|
||||
for (let key in data) {
|
||||
STORE_INFO[key] = data[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
getStoreInfo()
|
||||
|
||||
// 分享给好友
|
||||
onShareAppMessage(() => {
|
||||
let shareStr = '?id=' + STORE_INFO.value.id;
|
||||
|
||||
let shareStr = '?id=' + STORE_INFO.id;
|
||||
if (userStore.userInfo.user_ship == 1) {
|
||||
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
|
||||
.real_name || userStore.userInfo.nickname)
|
||||
}
|
||||
|
||||
let shareInfo = {
|
||||
title: STORE_INFO.value.name,
|
||||
title: STORE_INFO.store_name,
|
||||
path: '/pages/index/index' + shareStr,
|
||||
imageUrl: STORE_INFO.value.image,
|
||||
imageUrl: STORE_INFO.image || '',
|
||||
success() {
|
||||
uni.$u.toast('分享成功');
|
||||
},
|
||||
|
@ -550,6 +549,7 @@
|
|||
left: 0
|
||||
});
|
||||
|
||||
|
||||
// 分享信息
|
||||
const shareInfo = ref({
|
||||
uid: '',
|
||||
|
@ -573,7 +573,6 @@
|
|||
shareInfo.value.uid = opt.spread_uid;
|
||||
shareInfo.value.real_name = opt.real_name;
|
||||
shareInfo.value.store_id = opt.id;
|
||||
console.log(shareInfo.value);
|
||||
uni.setStorageSync('SHARE_INFO', shareInfo.value);
|
||||
} else {
|
||||
// 分享信息
|
||||
|
|
|
@ -177,8 +177,8 @@
|
|||
const logout = () => {
|
||||
userStore.setToken('');
|
||||
userStore.setUserInfo({});
|
||||
uni.removeStorageSync('SHARE_INFO');
|
||||
uni.setStorageSync("STORE_INFO", '')
|
||||
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue