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
bf0c39da
Commit
bf0c39da
authored
Jan 15, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
091c9fa1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
455 additions
and
674 deletions
+455
-674
index.vue
components/auth/index.vue
+31
-108
index.vue
pages/coupon/index/index.vue
+354
-365
index.vue
pages/index/index.vue
+6
-3
bind_Customer.vue
pages/jiuzhai/bind_Customer.vue
+5
-5
user-center.vue
pages/user-center/user-center.vue
+59
-193
No files found.
components/auth/index.vue
View file @
bf0c39da
...
...
@@ -34,40 +34,18 @@
showLogin
:
true
,
canIUseGetUserProfile
:
false
,
msg
:
{},
isOpenAuth
:
0
,
//是否开启强制授权
};
},
created
()
{
// this.pageinfo = uni.getStorageSync("basedata") ?
// uni.getStorageSync("basedata").auth_page : {};
// if (wx.getUserProfile) {
// this.canIUseGetUserProfile = true;
// }
// // #ifdef MP-ALIPAY
// this.canIUseGetUserProfile = true;
// // #endif
// let x = this.pageinfo.hotspot;
// let y = this.pageinfo.hotspot_cancel;
// this.sureStyle = `height:${x.height}rpx;width:${x.width}rpx;left:${x.left}rpx;top:${x.top}rpx;`;
// this.cancelStyle = `height:${y.height}rpx;width:${y.width}rpx;left:${y.left}rpx;top:${y.top}rpx;`;
let
mallConfig
=
uni
.
getStorageSync
(
"basedata"
);
if
(
mallConfig
&&
mallConfig
.
mall
&&
mallConfig
.
mall
.
setting
&&
mallConfig
.
mall
.
setting
.
is_show_auth
)
{
this
.
isOpenAuth
=
mallConfig
.
mall
.
setting
.
is_show_auth
;
}
this
.
getUserInfo
()
},
methods
:
{
getoldUser
()
{
//旧的 兼容电脑端
//4.27注释掉 给予新的提示不能在电脑端登录
// var that = this;
// uni.login({
// provider: 'weixin',
// success: function (loginRes) {
// // 获取用户信息
// uni.getUserInfo({
// provider: 'weixin',
// success: function (infoRes) {
// that.getUserInfo(infoRes)
// }
// });
// }
// });
uni
.
showToast
({
title
:
"电脑端暂时不能获取用户信息,请转到手机端使用!"
,
icon
:
"none"
,
...
...
@@ -114,47 +92,13 @@
that
.
getCode
(
obj
);
},
fail
()
{
that
.
showDialog
=
false
that
.
showDialog
=
false
uni
.
showToast
({
title
:
'微信登录失败'
title
:
'微信登录失败'
})
}
})
// uni.getProvider({
// service: "oauth",
// success: function(res) {
// if (~res.provider.indexOf("weixin")) {
// uni.login({
// provider: "weixin",
// success: (res) => {
// //这里请求接口
// let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
// code: res.code,
// };
// that.getCode(obj);
// },
// fail: () => {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none",
// });
// },
// });
// } else {
// uni.showToast({
// title: "请先安装微信或升级版本",
// icon: "none",
// });
// }
// },
// });
},
close
()
{
this
.
showDialog
=
false
;
...
...
@@ -164,7 +108,7 @@
getCode
(
obj
)
{
var
that
=
this
;
uni
.
showLoading
({
title
:
"登录中"
,
title
:
"登录中
.
"
,
});
//这里请求接口
var
OpenId
=
""
;
...
...
@@ -210,7 +154,6 @@
CounponPassword
:
CounponPassword
,
KeyWord
:
KeyWord
,
}
console
.
log
(
"loginMsg"
,
loginMsg
);
that
.
request2
({
url
:
"/api/AppletLogin/Login"
,
data
:
loginMsg
,
...
...
@@ -240,14 +183,16 @@
that
.
msg
.
Id
=
uid
;
//HK 2023-10-31 新增
let
b2bLoginParam
=
{
OpenId
:
loginMsg
.
OpenId
OpenId
:
res
.
data
.
OpenId
}
let
b2bResult
=
{
accountId
:
0
,
customerId
:
0
,
customerInfoChildrenId
:
0
,
realNameAuthentication
:
0
,
account
:
""
,
name
:
mallUserName
,
customerName
:
""
,
photo
:
""
,
secretKey
:
""
,
token
:
""
,
...
...
@@ -261,47 +206,25 @@
customerType
:
1
,
//直客,2-同行
directCustomerId
:
0
,
//直客Id
}
//erp判断是否是同行
that
.
apipost
(
"b2b_post_Login"
,
b2bLoginParam
,
(
erpRes
)
=>
{
if
(
erpRes
.
resultCode
==
1
)
{
var
tempdata
=
erpRes
.
data
;
b2bResult
.
accountId
=
tempdata
.
accountId
;
b2bResult
.
customerId
=
tempdata
.
customerId
;
b2bResult
.
realNameAuthentication
=
tempdata
.
realNameAuthentication
;
b2bResult
.
account
=
tempdata
.
account
;
b2bResult
.
name
=
tempdata
.
name
;
b2bResult
.
photo
=
tempdata
.
photo
;
b2bResult
.
secretKey
=
tempdata
.
secretKey
;
b2bResult
.
token
=
tempdata
.
token
;
b2bResult
.
groupId
=
tempdata
.
groupId
;
b2bResult
.
isMember
=
tempdata
.
isMember
;
b2bResult
.
createBy
=
tempdata
.
createBy
;
b2bResult
.
EmLoginMobile
=
tempdata
.
EmLoginMobile
;
b2bResult
.
contactNumber
=
tempdata
.
contactNumber
;
b2bResult
.
salesBaseInfo
=
tempdata
.
salesBaseInfo
;
b2bResult
.
count
=
tempdata
.
count
;
b2bResult
.
customerType
=
2
;
}
uni
.
setStorageSync
(
'b2b_user'
,
b2bResult
)
},
(
failed
)
=>
{
that
.
apipost
(
"LvXiaoYouLogin_post"
,
b2bLoginParam
,
b2cRes
=>
{
var
b2cData
=
b2cRes
.
data
;
if
(
b2cRes
.
resultCode
==
1
)
{
b2bResult
.
directCustomerId
=
b2cData
.
directCustomerId
;
b2bResult
.
name
=
b2cData
.
name
;
b2bResult
.
customerType
=
1
;
b2bResult
.
token
=
b2cData
.
token
;
b2bResult
.
photo
=
b2cData
.
photo
;
b2bResult
.
contactNumber
=
b2cData
.
moblie
;
that
.
apipost
(
"LvXiaoYou_post_GetLvXiaoYouCustomerLogin"
,
b2bLoginParam
,
b2bRes
=>
{
var
b2bData
=
b2bRes
.
data
;
if
(
b2bRes
.
resultCode
==
1
)
{
b2bResult
.
accountId
=
b2bData
.
accountId
;
b2bResult
.
customerId
=
b2bData
.
customerId
;
b2bResult
.
customerInfoChildrenId
=
b2bData
.
customerInfoChildrenId
;
b2bResult
.
name
=
b2bData
.
name
;
b2bResult
.
customerName
=
b2bData
.
customerName
;
uni
.
setStorageSync
(
'b2b_user'
,
b2bResult
)
}
},
(
error2
)
=>
{
});
},
(
error
)
=>
{
console
.
log
(
"error"
,
error
);
if
(
that
.
isOpenAuth
==
1
)
{
//未绑定的用户强制跳转到登录页面
uni
.
redirectTo
(
{
url
:
'/pages/jiuzhai/bind_Customer'
})
}
});
}
}
);
},
...
...
@@ -361,7 +284,7 @@
getCodeAli
(
obj
)
{
var
that
=
this
;
uni
.
showLoading
({
title
:
"登录中"
,
title
:
"登录中
..
"
,
});
//这里请求接口
that
.
request2
({
...
...
pages/coupon/index/index.vue
View file @
bf0c39da
This diff is collapsed.
Click to expand it.
pages/index/index.vue
View file @
bf0c39da
...
...
@@ -105,7 +105,9 @@
<view
class=
"triangle-up"
:style=
"{ top: pagePaddingBottom }"
></view>
</view>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<
template
v-show=
"setting&&setting.is_show_auth==1"
>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</
template
>
<!-- <official-account></official-account> -->
<orderPopup
v-if=
"showorder"
:orderPopupdata=
"orderPopupdata"
@
gosalesvolume=
"gosalesvolume"
@
closeBtn=
"closeBtn_order"
></orderPopup>
</view>
...
...
@@ -428,10 +430,11 @@
add_top_app_show
:
1
,
});
}
this
.
setting
=
set
;
this
.
add_show
=
uni
.
getStorageSync
(
"add_top_app"
)
?
uni
.
getStorageSync
(
"add_top_app"
).
add_top_app_show
:
1
;
this
.
setting
=
set
;
this
.
isShowBack
();
let
now
=
new
Date
();
...
...
pages/jiuzhai/bind_Customer.vue
View file @
bf0c39da
...
...
@@ -6,17 +6,17 @@
<view
class=
"logo-text"
>
旅小友
</view>
</view>
<view
class=
"login-form"
>
<view
class=
"login-title"
>
绑定同行
</view>
<view
class=
"login-title"
>
同行登录
</view>
<view
class=
"login-item"
>
<input
type=
"text"
v-model=
"msg.account"
placeholder=
"请输入
你
的同业账号"
:class=
"
{'focus':currentFocus=='account'}" @blur="changeCurrentFocus('')"
<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('')"
<input
type=
"password"
v-model=
"msg.password"
placeholder=
"请输入
您
的登录密码"
:class=
"
{'focus':currentFocus=='pwd'}" @blur="changeCurrentFocus('')"
@focus="changeCurrentFocus('pwd')">
</view>
<view
class=
"login-item"
>
<view
@
click=
"loginByAccount"
class=
"login-btn"
:class=
"
{'disable':msg.account==''||msg.password==''}">
绑定
</view>
<view
@
click=
"loginByAccount"
class=
"login-btn"
:class=
"
{'disable':msg.account==''||msg.password==''}">
登录
</view>
</view>
</view>
...
...
@@ -69,7 +69,7 @@
param
.
account
=
''
param
.
password
=
''
}
this
.
apipost
(
"b2b_post_LvXiaoYouBindCustomer"
,
param
,
(
res
)
=>
{
this
.
apipost
(
"b2b_post_LvXiaoYouBindCustomer
Info
"
,
param
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
//移除缓存=>跳转到首页重新登录
uni
.
removeStorageSync
(
'b2b_user'
)
...
...
pages/user-center/user-center.vue
View file @
bf0c39da
This diff is collapsed.
Click to expand it.
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