Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengke
jz_Travel
Commits
27c06926
Commit
27c06926
authored
Mar 04, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增对用户分享的支持
parent
443e3190
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
11 deletions
+89
-11
App.vue
App.vue
+65
-3
index.vue
components/auth/index.vue
+3
-2
index.vue
pages/index/index.vue
+2
-2
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+2
-2
user-bind-erp.vue
pages/user-center/user-bind-erp.vue
+1
-0
uiconfig.js
plugin/uiconfig.js
+3
-1
utils.js
plugin/utils.js
+13
-1
No files found.
App.vue
View file @
27c06926
<
script
>
import
{
setAttatchParameter
}
from
'./plugin/utils.js'
export
default
{
data
()
{
return
{
...
...
@@ -7,18 +8,79 @@ export default {
};
},
onLaunch
:
function
()
{
//console.log('App Launch')
console
.
log
(
'App Launch'
)
this
.
$utils
.
setAttatchParameter
()
this
.
init
();
this
.
formatPlat
();
},
onShow
:
function
()
{
//console.log('App Show')
onLoad
(
option
)
{
// console.log('App OnLoad',option)
// // #ifdef MP-DI
// this.checkBindParentHandle(option.query)
// // #endif
},
onShow
:
function
(
option
)
{
console
.
log
(
'App Show'
,
option
)
this
.
$utils
.
VersionUpdate
()
// #ifdef MP-DI
this
.
checkBindParentHandle
(
option
.
query
)
// #endif
},
onHide
:
function
()
{
//console.log('App Hide')
},
methods
:
{
checkBindParentHandle
(
query
){
if
(
query
&&
query
.
direct_user_id
){
if
(
uni
.
getStorageSync
(
'mall_UserInfo'
)){
const
{
OpenId
,
Unoinid
,
Name
}
=
uni
.
getStorageSync
(
'mall_UserInfo'
)
if
(
OpenId
&&
Unoinid
)
{
const
pid
=
parseInt
(
query
.
direct_user_id
)
if
(
!
isNaN
(
pid
))
this
.
directUserLoginHandle
(
OpenId
,
Unoinid
,
pid
,
Name
)
return
}
}
uni
.
setStorageSync
(
'direct_user_id'
,
query
.
direct_user_id
)
}
},
directUserLoginHandle
(
OpenId
,
Unoinid
,
Pid
,
MallName
){
const
parameters
=
{
OpenId
,
Unoinid
,
Pid
}
this
.
apipost
(
"HePingGuoLvLogin_post"
,
parameters
,
r
=>
{
const
u
=
r
.
data
const
user
=
{
accountId
:
u
.
directCustomerId
,
customerId
:
u
.
directCustomerId
,
customerInfoChildrenId
:
u
.
directCustomerId
,
realNameAuthentication
:
0
,
account
:
""
,
name
:
u
.
name
,
customerName
:
MallName
,
photo
:
u
.
photo
,
secretKey
:
""
,
token
:
u
.
token
,
groupId
:
0
,
isMember
:
0
,
createBy
:
u
.
pid
,
EmLoginMobile
:
u
.
moblie
,
contactNumber
:
u
.
moblie
,
salesBaseInfo
:
u
.
salesBaseInfo
,
pid
:
u
.
pid
,
erpBaseInfo
:
u
.
erpBaseInfo
,
count
:
0
,
customerType
:
1
,
//直客,2-同行
directCustomerId
:
u
.
directCustomerId
//直客Id
}
uni
.
setStorageSync
(
'b2b_user'
,
user
)
this
.
user
=
user
uni
.
setStorageSync
(
"lastLogin"
,
new
Date
().
getTime
())
this
.
$utils
.
setAttatchParameter
()
})
},
init
()
{
if
(
uni
.
getStorageSync
(
"basedata"
))
{
this
.
basedata
=
uni
.
getStorageSync
(
"basedata"
);
...
...
components/auth/index.vue
View file @
27c06926
...
...
@@ -233,8 +233,8 @@
createBy
:
u
.
pid
,
EmLoginMobile
:
u
.
moblie
,
contactNumber
:
u
.
moblie
,
salesBaseInfo
:
u
.
salesBaseInfo
,
pid
:
u
.
pid
,
salesBaseInfo
:
u
.
erpBaseInfo
?
u
.
erpBaseInfo
:
u
.
salesBaseInfo
,
pid
:
u
.
erpBaseInfo
?
u
.
erpBaseInfo
.
employeeId
:
u
.
pid
,
erpBaseInfo
:
u
.
erpBaseInfo
,
count
:
0
,
customerType
:
1
,
//直客,2-同行
...
...
@@ -243,6 +243,7 @@
uni
.
setStorageSync
(
'b2b_user'
,
user
)
this
.
$emit
(
"changeuserinfo"
);
uni
.
setStorageSync
(
"lastLogin"
,
new
Date
().
getTime
())
this
.
$utils
.
setAttatchParameter
()
},
e
=>
{
uni
.
showToast
({
title
:
'用户登录失败'
,
...
...
pages/index/index.vue
View file @
27c06926
...
...
@@ -190,7 +190,7 @@
return
{
title
:
title
,
query
:
"user_id="
+
uid
,
query
:
"user_id="
+
uid
+
this
.
$uiConfig
.
DIRECT_PARAMETER
,
imageUrl
:
""
,
};
},
...
...
@@ -204,7 +204,7 @@
return
{
title
:
title
,
path
:
"/pages/index/index?user_id="
+
uid
,
path
:
"/pages/index/index?user_id="
+
uid
+
this
.
$uiConfig
.
DIRECT_PARAMETER
,
imageUrl
:
""
,
};
},
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
27c06926
...
...
@@ -2109,7 +2109,7 @@
"&configId=" +
this.delMsg.configId +
"&cityId=" +
this.delMsg.cityId,
this.delMsg.cityId
+this.$uiConfig.DIRECT_PARAMETER
,
imageUrl: imageUrl,
}
;
}
,
...
...
@@ -2140,7 +2140,7 @@
"&configId=" +
this.delMsg.configId +
"&cityId=" +
this.delMsg.cityId,
this.delMsg.cityId
+this.$uiConfig.DIRECT_PARAMETER
,
imageUrl: "",
// imageUrl:
// this.dataList.tempImgCover && this.dataList.tempImgCover.length > 0
...
...
pages/user-center/user-bind-erp.vue
View file @
27c06926
...
...
@@ -114,6 +114,7 @@
uni
.
setStorageSync
(
'b2b_user'
,
user
)
this
.
user
=
user
uni
.
setStorageSync
(
"lastLogin"
,
new
Date
().
getTime
())
this
.
$utils
.
setAttatchParameter
()
uni
.
hideLoading
()
})
},
...
...
plugin/uiconfig.js
View file @
27c06926
...
...
@@ -6,11 +6,13 @@ let topstyle = {
textColor
:
"#000"
}
let
is_bang
=
false
let
DIRECT_PARAMETER
=
'&direct_user_id=0'
export
default
{
mainColor
,
secondary
,
pricecolor
,
topstyle
,
is_bang
is_bang
,
DIRECT_PARAMETER
}
\ No newline at end of file
plugin/utils.js
View file @
27c06926
...
...
@@ -94,7 +94,6 @@ function SubscribeMsgAli(cb) {
//定义更新方法
function
VersionUpdate
()
{
// 判断应用的 getUpdateManager 是否在当前版本可用
console
.
log
(
'canIUse'
,
uni
.
canIUse
(
'getUpdateManager'
))
if
(
uni
.
canIUse
(
'getUpdateManager'
))
{
const
updateManager
=
uni
.
getUpdateManager
()
// 向小程序后台请求完新版本信息
...
...
@@ -171,6 +170,18 @@ function formatDates(date, fmt) {
function
padLeftZero
(
str
)
{
return
(
'00'
+
str
).
substr
(
str
.
length
);
}
function
setAttatchParameter
(){
this
.
$uiConfig
.
DIRECT_PARAMETER
=
''
if
(
uni
.
getStorageSync
(
'b2b_user'
)){
const
{
salesBaseInfo
,
erpBaseInfo
}
=
uni
.
getStorageSync
(
'b2b_user'
)
if
(
erpBaseInfo
&&
erpBaseInfo
.
employeeId
){
this
.
$uiConfig
.
DIRECT_PARAMETER
=
'&direct_user_id='
+
erpBaseInfo
.
employeeId
}
else
if
(
salesBaseInfo
&&
salesBaseInfo
.
employeeId
){
this
.
$uiConfig
.
DIRECT_PARAMETER
=
'&direct_user_id='
+
salesBaseInfo
.
employeeId
}
}
}
function
changeMoneyToChinese
(
Num
)
{
// 数字转中文大写
if
(
!
Num
)
{
return
'零'
...
...
@@ -353,4 +364,5 @@ export default {
VersionUpdate
,
formatDates
,
changeMoneyToChinese
,
setAttatchParameter
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment