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
f175a236
Commit
f175a236
authored
Jan 19, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
2cce1bb2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
42 deletions
+114
-42
index.vue
components/auth/index.vue
+6
-4
index.vue
pages/index/index.vue
+19
-3
jz_Line.vue
pages/jiuzhai/jz_Line.vue
+41
-5
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+21
-1
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+10
-11
user-center.vue
pages/user-center/user-center.vue
+12
-13
api.js
plugin/api.js
+5
-5
No files found.
components/auth/index.vue
View file @
f175a236
...
...
@@ -222,14 +222,16 @@
b2bResult
.
groupId
=
b2bData
.
groupId
;
b2bResult
.
contactNumber
=
b2bData
.
contactNumber
;
uni
.
setStorageSync
(
'b2b_user'
,
b2bResult
)
}
},
(
error2
)
=>
{
if
(
that
.
isOpenAuth
==
1
)
{
//未绑定的用户强制跳转到登录页面
that
.
$emit
(
"changeuserinfo"
);
}
else
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/bind_Customer'
})
}
},
(
error2
)
=>
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/bind_Customer'
})
});
}
}
...
...
pages/index/index.vue
View file @
f175a236
...
...
@@ -195,6 +195,7 @@
configId
:
0
,
//线路带过来字段
cityId
:
0
,
//线路带来字段
videoId
:
0
,
//视频字段
b2bUser
:
{},
//同行信息
};
},
components
:
{
...
...
@@ -415,22 +416,34 @@
if
(
options
&&
options
.
cityId
)
{
this
.
cityId
=
options
.
cityId
;
}
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
this
.
setting
=
set
;
that
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
that
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
console
.
log
(
"onLoad_setting"
,
this
.
setting
);
console
.
log
(
"onLoad_b2bUser"
,
this
.
b2bUser
);
if
(
!
that
.
u
)
{
that
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
that
.
showAuth
=
true
;
}
else
if
(
!
that
.
b2bUser
&&
this
.
setting
&&
this
.
setting
.
is_show_auth
&&
this
.
setting
.
is_show_auth
==
1
)
{
that
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
that
.
showAuth
=
true
;
}
else
{
that
.
sharejump
();
//4-9新加
}
// #endif
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
this
.
setting
=
set
;
if
(
!
uni
.
getStorageSync
(
"add_top_app"
))
{
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
1
,
...
...
@@ -1016,6 +1029,9 @@
uni
.
setStorageSync
(
"navs"
,
res
.
data
.
navbar
.
navs
);
}
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
if
(
res
.
data
&&
res
.
data
.
mall
&&
res
.
data
.
mall
.
setting
)
{
this
.
setting
=
res
.
data
.
mall
.
setting
;
}
if
(
Object
.
keys
(
this
.
$refs
).
length
>
0
&&
this
.
$refs
.
study
)
{
//判断
...
...
pages/jiuzhai/jz_Line.vue
View file @
f175a236
...
...
@@ -457,6 +457,7 @@
</view>
</
template
>
</view>
<auth
v-if=
"showAuth&&is_show_auth==1"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<u-picker
mode=
"time"
v-model=
"isShowDate"
@
confirm=
'getStratDate'
:params=
"params"
></u-picker>
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"90%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
...
...
@@ -467,9 +468,11 @@
</template>
<
script
>
import
canlendar
from
"./components/time/index.vue"
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
components
:
{
canlendar
canlendar
,
auth
},
data
()
{
return
{
...
...
@@ -574,7 +577,11 @@
"天数日期"
,
"出发城市"
],
CityId
:
0
CityId
:
0
,
showAuth
:
false
,
is_show_auth
:
0
,
//是否显示授权弹窗
b2bUser
:
{},
//同行信息
mallUserInfo
:
{},
};
},
created
()
{
...
...
@@ -583,7 +590,7 @@
})
},
onLoad
(
option
)
{
console
.
log
(
"option"
,
option
);
console
.
log
(
"option"
,
option
);
if
(
option
&&
option
.
LineTeamIds
)
{
let
NewArr
=
[];
NewArr
=
option
.
LineTeamIds
.
split
(
","
);
...
...
@@ -601,9 +608,38 @@
if
(
option
&&
option
.
teamType
&&
option
.
teamType
==
"1"
)
{
this
.
msg
.
teamType
=
option
.
teamType
;
}
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
1
)
{
this
.
is_show_auth
=
1
;
}
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
mallUserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
mallUserInfo
)
{
this
.
mallUserInfo
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
this
.
getLineQuery
();
},
methods
:
{
reloadUserinfo
()
{
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
mallUserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
allTeamsChangeHandler
(
e
)
{
this
.
allTeams
=
e
.
detail
.
value
.
length
>
0
if
(
this
.
allTeams
&&
this
.
msg
.
team
.
length
>
0
)
{
...
...
@@ -720,7 +756,7 @@
this
.
optionsTitle
[
1
]
=
'线路玩法'
this
.
currentLineId
=
null
this
.
msg
.
lineId
=
0
;
this
.
msg
.
PlaceIds
=
""
;
this
.
msg
.
PlaceIds
=
""
;
this
.
allTeams
=
false
this
.
$forceUpdate
()
this
.
$refs
.
uDropdown
.
close
();
...
...
@@ -754,7 +790,7 @@
this
.
research
();
},
setTeams
(
teamId
)
{
this
.
msg
.
PlaceIds
=
""
;
this
.
msg
.
PlaceIds
=
""
;
let
id
=
teamId
let
temp
=
this
.
msg
.
team
.
indexOf
(
id
)
if
(
temp
==
-
1
)
{
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
f175a236
...
...
@@ -1012,6 +1012,7 @@
isDownloading
:
false
,
startCities
:
[],
is_show_auth
:
0
,
//是否配置启用授权(1-开启)
b2bUser
:
{
}
,
//同行信息
}
;
}
,
created
()
{
}
,
...
...
@@ -1049,6 +1050,7 @@
}
this
.
getDetails
();
this
.
U
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
...
...
@@ -1062,6 +1064,12 @@
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
let
that
=
this
;
uni
.
getSystemInfo
({
...
...
@@ -1141,6 +1149,7 @@
}
)
}
,
reloadUserinfo() {
this.b2bUser = uni.getStorageSync("b2b_user");
this.u = uni.getStorageSync("mall_UserInfo");
}
,
//关闭登录窗口
...
...
@@ -1446,6 +1455,7 @@
//立即预定
goReserce() {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
...
...
@@ -1455,6 +1465,16 @@
this.is_show_auth = 1;
return;
}
this.b2bUser = uni.getStorageSync("b2b_user");
if (!this.b2bUser) {
this.u = {
nickName: "未登录",
avatarUrl: "",
}
;
this.showAuth = true;
this.is_show_auth = 1;
return;
}
let myObj = {
}
;
myObj.startCityName = this.dataList.startCityName;
myObj.startDate = this.currentPrice.startDate;
...
...
@@ -1469,7 +1489,7 @@
myObj.b2BMemberPrice = this.currentPrice.b2BMemberPrice;
myObj.tcid = this.currentPrice.tcid;
myObj.teamType = this.currentPrice.teamType;
myObj.lineteamId
=
this.dataList.lineteamId;
myObj.lineteamId
=
this.dataList.lineteamId;
let imgCover = JSON.parse(this.dataList.imgCover);
if (imgCover.length > 0) {
myObj.CoverImg = imgCover[0].Url;
...
...
pages/jiuzhai/jz_MyOrder.vue
View file @
f175a236
...
...
@@ -208,15 +208,6 @@
};
},
created
()
{
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
);
if
(
!
this
.
b2b_user_info
||
!
this
.
b2b_user_info
.
token
)
{
this
.
showAuth
=
true
;
}
else
{
this
.
getOrderInfo
();
}
// #ifdef MP-ALIPAY
this
.
showBar
=
false
;
// #endif
...
...
@@ -236,11 +227,17 @@
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
);
if
(
!
this
.
b2b_user_info
)
{
this
.
showAuth
=
true
;
}
else
{
this
.
getOrderInfo
();
}
},
methods
:
{
//获取订单状态名称
getOrderStateName
(
item
)
{
console
.
log
(
"item"
,
item
);
var
str
=
"待付款"
;
if
(
item
.
orderState
==
1
)
{
str
=
"已付款"
...
...
@@ -257,7 +254,9 @@
reloadUserinfo
()
{
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
);
this
.
getOrderInfo
();
if
(
this
.
b2b_user_info
)
{
this
.
getOrderInfo
();
}
},
goOrderDetail
(
item
)
{
uni
.
navigateTo
({
...
...
pages/user-center/user-center.vue
View file @
f175a236
...
...
@@ -79,10 +79,10 @@
<text>
{{ meueData.user_center.foot_bar[1].name }}
</text>
</view>
<!--优惠劵-->
<view
class=
"top_b_item"
v-if=
" meueData.user_center && meueData.user_center.is_account_status == 1"
@
click=
"goUrl(couponsObj.link_url)"
>
<
!-- <
view class="top_b_item" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)">
<text style="font-size: 21px">{{ user_info.coupon ? user_info.coupon : 0 }}</text>
<text>{{ couponsObj.name }}</text>
</view>
</view>
-->
</view>
<view
class=
"Receiptbalance"
v-if=
" meueData.user_center && meueData.user_center.is_account_status == 1"
>
...
...
@@ -212,7 +212,7 @@
</view>
</view>
</
template
>
<
!-- <view class="login-btn" style="margin:30px 0" @click='signOutHandler'>退出登录</view> --
>
<
view
class=
"login-btn"
style=
"margin:30px 0"
@
click=
'signOutHandler'
>
退出登录
</view
>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<tabbars></tabbars>
...
...
@@ -271,7 +271,6 @@
appId
:
"2021002181604459"
})),
userId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
,
};
},
components
:
{
...
...
@@ -298,18 +297,20 @@
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
;
this
.
u
=
wx
.
getStorageSync
(
"basedata"
).
user_info
;
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
)
this
.
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
nav
=
uni
.
getSystemInfoSync
().
statusBarHeight
+
"px"
;
this
.
headStyle
.
background
=
`linear-gradient(to right, '#e6b865',80%, '#ebb45e')`
;
this
.
headStyle
.
paddingTop
=
this
.
nav
;
if
(
!
this
.
mall_UserInfo
)
{
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2b_user_info
)
{
//&& this.setting && this.setting.is_show_auth == 1
this
.
showAuth
=
true
;
}
},
mounted
()
{
...
...
@@ -343,10 +344,7 @@
// #endif
},
onShow
()
{
this
.
userinfo
(
2
);
if
(
this
.
mall_UserInfo
)
{
}
this
.
userCenterinfo
(
2
);
let
basedata
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
)
:
""
;
...
...
@@ -355,6 +353,7 @@
0
;
},
methods
:
{
//退出登录
signOutHandler
()
{
uni
.
removeStorageSync
(
'b2b_user'
)
uni
.
removeStorageSync
(
'mall_UserInfo'
)
...
...
@@ -458,7 +457,7 @@
return
flag
;
},
//获取菜单配置
userinfo
(
type
=
1
)
{
user
Center
info
(
type
=
1
)
{
uni
.
showNavigationBarLoading
();
this
.
request2
({
url
:
"/api/Mall/GetUserCenter"
,
...
...
@@ -560,11 +559,11 @@
}
},
reloadUserinfo
()
{
this
.
userinfo
();
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
);
this
.
userCenterinfo
();
this
.
u
=
this
.
user_info
;
this
.
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
:
{};
this
.
b2b_user_info
=
uni
.
getStorageSync
(
'b2b_user'
);
this
.
getUserPoint
();
},
login
(
name
)
{
...
...
plugin/api.js
View file @
f175a236
...
...
@@ -23,7 +23,7 @@ export default {
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.5.46:
5003
"
// Vue.prototype.host2 = "http://192.168.5.46:
8300
"
// Vue.prototype.host3 = "http://192.168.5.46"
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
...
...
@@ -120,12 +120,12 @@ export default {
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
uni
.
removeStorageSync
(
'b2b_user'
)
uni
.
removeStorageSync
(
'mall_UserInfo'
)
// uni.redirectTo({
// url: '/pages/jiuzhai/login'
// })
uni
.
redirectTo
({
url
:
'/pages/
index/index
'
url
:
'/pages/
jiuzhai/bind_Customer
'
})
// uni.redirectTo({
// url: '/pages/index/index'
// })
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
!
failed
)
{
if
(
res
.
data
.
message
!=
''
)
{
...
...
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