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
56046388
Commit
56046388
authored
Sep 21, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换登录
parent
4be9a6a8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
296 additions
and
19 deletions
+296
-19
index.vue
components/auth/index.vue
+4
-1
pages.json
pages.json
+8
-1
index.vue
pages/index/index.vue
+1
-1
jz_Line.vue
pages/jiuzhai/jz_Line.vue
+5
-0
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+7
-2
login.vue
pages/jiuzhai/login.vue
+230
-0
user-center.vue
pages/user-center/user-center.vue
+6
-1
api.js
plugin/api.js
+35
-13
No files found.
components/auth/index.vue
View file @
56046388
<
template
>
<div
class=
"auth-page"
>
<div
class=
"auth-page"
v-if=
"false"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
...
...
@@ -64,6 +64,9 @@ export default {
};
},
created
()
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/login'
})
this
.
pageinfo
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
auth_page
:
{};
...
...
pages.json
View file @
56046388
...
...
@@ -567,7 +567,14 @@
"path"
:
"jz_ActiveInfo"
//活动详情
},{
"path"
:
"jz_ActivePaySuccess"
//活动下单成功
}]
},{
"path"
:
"login"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
]
},
//韩国馆项目
...
...
pages/index/index.vue
View file @
56046388
...
...
@@ -555,7 +555,7 @@ export default {
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
that
.
showAuth
=
true
;
//
that.showAuth = true;
}
else
{
that
.
sharejump
();
//4-9新加
}
...
...
pages/jiuzhai/jz_Line.vue
View file @
56046388
...
...
@@ -764,7 +764,9 @@
}
if
(
this
.
allTeams
&&
this
.
msg
.
team
.
length
>
0
){
this
.
allTeams
=
false
this
.
msg
.
lineId
=
0
}
this
.
$forceUpdate
();
},
changeOrderBy
(
index
)
{
...
...
@@ -815,6 +817,9 @@
this
.
dataList
=
[];
this
.
msg
.
pageIndex
=
1
;
}
if
(
this
.
msg
.
lineId
!=
0
&&
this
.
msg
.
team
.
length
>
0
){
this
.
msg
.
lineId
=
0
}
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
56046388
...
...
@@ -464,7 +464,7 @@
"
></span>
</span>
<view
class=
"jz_TripMain"
>
<view
class=
"jz_TripMain"
style=
"margin:0 -22px;"
>
<image
v-for=
"x in dataList.feature.tripImageList"
:src=
"x"
...
...
@@ -743,6 +743,10 @@
<
/template
>
<
/view
>
<
/view
>
<
/view
>
<
view
style
=
"padding-bottom: 22px;background-color: #FFF;"
v
-
if
=
"dataList.feature.detailsImageList && d.length>3"
>
<
image
:
src
=
"x"
mode
=
"widthFix"
style
=
"width: 100%;height: auto;margin-bottom: 10px;"
v
-
for
=
"x in dataList.feature.detailsImageList"
><
/image
>
<
/view
>
<
view
class
=
"jz_TripDays"
...
...
@@ -1107,7 +1111,7 @@
<
view
style
=
"color: #ff3166; font-weight: bold"
>
<
text
style
=
"font-size: 22rpx"
>
¥
<
/text
>
<!--
原
b2b
-->
<
text
style
=
"font-size: 40rpx"
>
{{
<
text
style
=
"font-size: 40rpx
;font-family: nav-font;
"
>
{{
$utils
.
getretailer
()
==
true
?
currentPrice
.
b2CPrice
:
currentPrice
.
b2CPrice
...
...
@@ -1383,6 +1387,7 @@ export default {
}
)
}
,
goback
()
{
console
.
log
(
'back click'
)
uni
.
navigateBack
({
delta
:
1
,
}
);
...
...
pages/jiuzhai/login.vue
0 → 100644
View file @
56046388
<
template
>
<view
class=
"login-page"
>
<view
class=
"logo-head"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695262844000_280.png"
mode=
"widthFix"
></image>
<view
class=
"logo-text"
>
旅小友
</view>
</view>
<view
class=
"login-form"
>
<view
class=
"login-title"
>
登录
</view>
<view
class=
"login-item"
>
<input
type=
"text"
v-model=
"msg.account"
placeholder=
"请输入你的同业账号"
:class=
"
{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')" @focus="changeCurrentFocus('account')">
</view>
<view
class=
"login-item"
>
<input
type=
"password"
v-model=
"msg.password"
placeholder=
"请输入你的登录密码"
:class=
"
{'focus':currentFocus=='pwd'}" @blur="changeCurrentFocus('')" @focus="changeCurrentFocus('pwd')">
</view>
<view
class=
"login-item"
>
<view
@
click=
"loginERPHandler"
class=
"login-btn"
:class=
"
{'disable':msg.account==''||msg.password==''}">立即登录
</view>
</view>
<u-divider
contentPosition=
"center"
:margin-top=
"60"
:margin-bottom=
"60"
>
其他登录方式
</u-divider>
<view
style=
"text-align: center;"
>
<button
class=
"wechat-login"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695266425000_759.png"
mode=
"widthFix"
></image>
</button>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msg
:{
account
:
''
,
password
:
''
,
platform
:
3
,
OpenId
:
''
},
currentFocus
:
''
}
},
mounted
()
{
this
.
getUserProfileHandler
()
},
methods
:
{
changeCurrentFocus
(
val
){
this
.
currentFocus
=
val
},
loginERPHandler
(){
if
(
this
.
msg
.
account
!=
''
&&
this
.
msg
.
password
!=
''
){
uni
.
showLoading
({
title
:
'登录中...'
})
this
.
apipost
(
"b2b_post_Login"
,
this
.
msg
,(
res
)
=>
{
//console.log(res)
if
(
res
.
resultCode
==
1
)
{
uni
.
setStorageSync
(
'b2b_user'
,
res
.
data
)
this
.
getLogin
()
}
},(
error
)
=>
{
uni
.
hideLoading
()
})
}
},
getUserProfileHandler
(){
wx
.
login
({
success
:
(
res
)
=>
{
this
.
getCode
(
res
)
},
fail
()
{}
})
},
getCode
(
obj
)
{
var
that
=
this
;
that
.
request2
(
{
url
:
"/api/mall/GetWeChatOpenId"
,
data
:
{
Code
:
obj
.
code
,
},
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
){
//this.getLogin(res.data)
this
.
msg
.
OpenId
=
res
.
data
}
}
);
},
getLogin
()
{
var
that
=
this
;
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
let
Up
=
uni
.
getStorageSync
(
"Up"
)
?
uni
.
getStorageSync
(
"Up"
).
Up
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
""
;
that
.
request2
(
{
url
:
"/api/AppletLogin/Login"
,
data
:
{
Source
:
1
,
OpenId
:
this
.
msg
.
OpenId
,
Name
:
'微信用户'
,
Photo
:
'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132'
,
Gender
:
1
,
Moblie
:
""
,
SuperiorId
:
pid
,
SmallShopId
:
SmallShopId
,
UserPageType
:
Up
,
CounponPassword
:
CounponPassword
,
KeyWord
:
KeyWord
,
},
},
(
res
)
=>
{
uni
.
hideLoading
()
if
(
res
.
resultCode
==
1
)
{
uni
.
setStorageSync
(
"mall_UserInfo"
,
res
.
data
);
uni
.
removeStorageSync
(
"pid"
);
uni
.
removeStorageSync
(
"SmallShopId"
);
uni
.
removeStorageSync
(
"Up"
);
uni
.
removeStorageSync
(
"CounponPassword"
);
uni
.
removeStorageSync
(
"KeyWord"
);
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
}
},
(
err
)
=>
{
uni
.
hideLoading
()});
},
}
}
</
script
>
<
style
>
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
@font-face
{
font-family
:
"logo-font"
;
src
:
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/nFCWoGSkRkLY.woff2")
format
(
"woff2"
),
url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/3uO28oanLQDx.woff")
format
(
"woff"
);
font-display
:
swap
;
}
.login-page
{
padding
:
20px
;
}
.login-page
.logo-head
{
margin-top
:
20px
;
display
:
flex
;
align-items
:
center
;
}
.login-page
.logo-head
image
{
width
:
50px
;
height
:
50px
;
margin-right
:
10px
;
}
.login-page
.logo-head
.logo-text
{
font-size
:
32px
;
font-family
:
logo-font
;
font-weight
:
700
;
}
.login-page
.login-form
{
margin-top
:
50px
;
padding
:
20px
;
}
.login-page
.login-form
.login-title
{
font-size
:
20px
;
font-weight
:
700
;
font-family
:
logo-font
;
margin-bottom
:
30px
;
}
.login-page
.login-form
.login-item
{
margin-top
:
30px
;
}
.login-page
.login-form
.login-item
input
{
background-color
:
rgba
(
0
,
0
,
0
,
.05
);
padding
:
0
12px
;
height
:
46px
;
line-height
:
46px
;
border-radius
:
8px
;
color
:
#1d1d1d
;
font-family
:
nav-font
;
}
.login-page
.login-form
.login-item
input
.focus
{
background
:
#1d1d1d
;
color
:
#FFF
;
}
.login-page
.login-form
.login-btn
{
height
:
80
rpx
;
background-color
:
#111111
;
text-align
:
center
;
line-height
:
80
rpx
;
color
:
#fff
;
/* font-weight: 600; */
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
font-family
:
logo-font
;
font-size
:
16px
;
}
.login-page
.login-form
.login-btn.disable
{
/* background-color: #ecf1f4;
color: #111; */
opacity
:
0.5
;
}
.login-page
.login-form
.wechat-login
{
background-color
:
none
;
height
:
40px
;
width
:
40px
;
/* border-radius: 40px; */
overflow
:
hidden
;
/* box-shadow: 0px 0px 20px 0px rgba(76,87,125,0.2)!important; */
padding
:
0
;
}
.login-page
.login-form
.wechat-login
image
{
width
:
38px
;
height
:
38px
;
margin
:
1px
;
}
.login-page
.login-form
.wechat-login
::after
{
border
:
none
!important
;
height
:
auto
!important
;
}
</
style
>
pages/user-center/user-center.vue
View file @
56046388
...
...
@@ -7,6 +7,7 @@
>
<view
class=
"userStyle"
style=
"min-height:100vh"
v-if=
"meueData.user_center && meueData.user_center.is_ppenmiai == 0"
:class=
"
{ dark: isCompany }"
>
<!-- 修改 -->
...
...
@@ -83,10 +84,11 @@
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
font-family:'microsoft yahei ui light'
"
@
click=
"login(user_info)"
>
{{
user_info
.
nickname
?
user_info
.
nick
name
:
"立即登录"
b2b_user_info
?
b2b_user_info
.
name
:
"立即登录"
}}
</Text
>
<!-- 判断是甲鹤小程序 -->
...
...
@@ -614,6 +616,7 @@ export default {
cstyle
:
{},
meueData
:
{},
//菜单
user_info
:
{},
//个人信息
b2b_user_info
:{},
headStyle
:
{},
bottommargin
:
0
,
listbottom
:
0
,
...
...
@@ -667,6 +670,7 @@ export default {
this
.
isAttestationEdu
=
basedata
.
user_info
.
isAttestationEdu
?
basedata
.
user_info
.
isAttestationEdu
:
0
;
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
)
},
onLoad
()
{
this
.
navHeight
=
this
.
$navHeight
-
2
;
...
...
@@ -976,6 +980,7 @@ export default {
align-items
:
center
;
background
:
#f3f4f6
;
height
:
100%
;
min-height
:
100vh
;
}
.userStyle
.imgbg
{
...
...
plugin/api.js
View file @
56046388
export
default
{
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
...
...
@@ -180,22 +181,43 @@ export default {
if
(
msg
==
null
||
msg
==
""
)
{
msg
=
{}
}
var
timestamp
=
(
new
Date
()).
valueOf
();
var
token
=
""
;
var
key
=
""
;
var
MallBaseId
=
1
;
//小程序ID
var
TenantId
=
1
;
//商户Id
let
b2bUser
=
uni
.
getStorageSync
(
'b2b_user'
)
let
token
=
''
let
key
=
""
let
groupId
=
''
let
timestamp
=
(
new
Date
()).
valueOf
();
if
(
b2bUser
&&
b2bUser
.
token
)
{
token
=
b2bUser
.
token
key
=
b2bUser
.
secretKey
}
if
(
b2bUser
)
{
groupId
=
b2bUser
.
groupId
}
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
//var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}×tamp=${timestamp}&token=${token}&key=${key}`);
// var token = "";
// var key = "";
// var MallBaseId = 1; //小程序ID
// var TenantId = 1; //商户Id
// var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}×tamp=${timestamp}&token=${token}&key=${key}`);
var
postData
=
{
msg
:
msg
,
timestamp
:
timestamp
,
token
:
token
,
sign
:
''
,
languageId
:
0
,
cmd
:
cmd
,
MallBaseId
:
MallBaseId
,
TenantId
:
TenantId
,
// msg: msg,
// timestamp: timestamp,
// token: token,
// sign: '',
// languageId: 0,
// cmd: cmd,
// MallBaseId: MallBaseId,
// TenantId: TenantId,
"groupId"
:
groupId
,
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
''
,
"locale"
:
'zh_CN'
,
"currencyCode"
:
'CNY'
,
version
:
'MiniProgram'
}
return
postData
...
...
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