From 0acbf8ba7a6214c85154319acf220d9464af2779 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期日, 04 八月 2024 16:13:43 +0800
Subject: [PATCH] update 商品详情分享的id
---
store/index.js | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/store/index.js b/store/index.js
index 69d8cd8..a12972b 100644
--- a/store/index.js
+++ b/store/index.js
@@ -392,6 +392,31 @@
storage.setItem('token', resp.data.access_token)
commit("updateLogin", true)
await dispatch('getCurrentInfo')
+ //todo 登录后可能需要进行绑定
+ try {
+ var sharePartnerUserId = storage.getItem('cache_sharePartnerUserId')
+ if (sharePartnerUserId) {
+ //试图绑定
+ storage.removeItem('cache_sharePartnerUserId')
+ if (state.currentInfo.customerDTO && !state.currentInfo.customerDTO.partnerId) {
+ message.showLoading()
+ const bindres = await http.request('post', '/api/customer/bind/partner', {
+ data: {
+ partnerUserId: sharePartnerUserId
+ }
+ })
+ message.hideLoading()
+ if (bindres.code == 0) {
+ message.showToast(`绑定合伙人成功`)
+ await dispatch('getCurrentInfo')
+ }
+ }
+
+ }
+ } catch (e) {
+ console.error('login ', e)
+ }
+
uni.reLaunch({
url: '/pages/home/home'
})
--
Gitblit v1.9.3