Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
05f128ba
Commit
05f128ba
authored
Jul 28, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
73835638
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
585 additions
and
83 deletions
+585
-83
subscribe.js
api/mine/subscribe.js
+9
-0
index.js
api/schedule/index.js
+9
-1
billing-daily.vue
components/billing-daily/billing-daily.vue
+8
-0
pages.json
pages.json
+9
-0
bill-detail.vue
pages/bill/bill-detail/bill-detail.vue
+20
-2
debit-detail.vue
pages/bill/debit-note/components/debit-detail.vue
+8
-1
debit-note.vue
pages/bill/debit-note/debit-note.vue
+1
-14
plan-view.vue
pages/index/schedule/components/plan-view.vue
+22
-2
agreement.vue
pages/login/agreement/agreement.vue
+2
-3
update-log-item.vue
pages/mine/update-log/components/update-log-item.vue
+1
-1
update-log.vue
pages/mine/update-log/update-log.vue
+12
-7
user-setting.vue
pages/mine/user-setting/user-setting.vue
+358
-0
schedule-detail.vue
pages/schedule/schedule-detail/schedule-detail.vue
+7
-3
getters.js
store/getters.js
+1
-0
index.js
store/index.js
+2
-0
bill.js
store/modules/bill.js
+31
-0
lunc-calendar.vue
.../lunc-calendar/components/lunc-calendar/lunc-calendar.vue
+16
-2
common.js
utils/common.js
+9
-1
quoted-price.js
utils/options/bill/quoted-price.js
+15
-15
subscribeMixin.js
utils/subscribeMixin.js
+45
-31
No files found.
api/mine/subscribe.js
View file @
05f128ba
...
...
@@ -7,3 +7,12 @@ export function getList(data) {
noLoading
:
true
})
}
export
function
addSubscribeCount
(
data
)
{
return
request
({
url
:
`/rest/trip/subscribe`
,
method
:
'PUT'
,
data
,
noLoading
:
true
})
}
api/schedule/index.js
View file @
05f128ba
...
...
@@ -34,10 +34,18 @@ export function add(data) {
})
}
export
function
deleteById
s
(
data
)
{
export
function
deleteById
(
data
)
{
return
request
({
url
:
`/rest/trip/delete`
,
method
:
'POST'
,
data
})
}
export
function
saveTripSubscribe
(
data
)
{
return
request
({
url
:
`/rest/trip/subscribe`
,
method
:
'POST'
,
data
})
}
\ No newline at end of file
components/billing-daily/billing-daily.vue
View file @
05f128ba
...
...
@@ -62,6 +62,7 @@ import upload from '@/utils/upload';
import
{
getBillTypes
,
add
}
from
'@/api/bill/daily.js'
;
import
{
get
}
from
'@/api/bill/index.js'
;
import
{
getQiNiuToken
}
from
'@/api/upload/index.js'
;
import
{
mapGetters
}
from
"vuex"
export
default
{
name
:
'billing-daily'
,
components
:
{
...
...
@@ -127,6 +128,9 @@ export default {
notification
:
'update-payments-setting'
};
},
computed
:{
...
mapGetters
([
'billType'
]),
},
mounted
()
{
this
.
init
();
},
...
...
@@ -136,6 +140,7 @@ export default {
methods
:
{
init
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
form
.
type
=
this
.
billType
if
(
checkToken
()){
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
...
...
@@ -204,6 +209,7 @@ export default {
longitude
:
''
};
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
form
.
type
=
this
.
billType
if
(
this
.
billingCategoryList
.
length
){
this
.
form
.
classificationId
=
this
.
billingCategoryList
[
0
]
&&
this
.
billingCategoryList
[
0
][
0
].
id
||
''
;
}
...
...
@@ -263,11 +269,13 @@ export default {
try
{
await
add
(
this
.
form
);
this
.
showToast
(
title
+
'成功'
,
true
);
this
.
$store
.
dispatch
(
'Save_bill_type'
,
this
.
form
.
type
)
setTimeout
(()
=>
{
this
.
show
=
false
;
this
.
$emit
(
'afterSave'
);
},
1500
);
}
catch
(
error
)
{
console
.
log
(
error
)
let
{
msg
}
=
error
if
(
msg
){
this
.
showToast
(
msg
);
...
...
pages.json
View file @
05f128ba
...
...
@@ -236,6 +236,15 @@
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"user-setting/user-setting"
,
"style"
:
{
"navigationBarTitleText"
:
"个人设置"
,
"enablePullDownRefresh"
:
false
}
}
]
},
...
...
pages/bill/bill-detail/bill-detail.vue
View file @
05f128ba
...
...
@@ -20,8 +20,8 @@
<view
class=
"item"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"item-value"
>
<text
class=
"item-value-repair"
v-if=
"item.value === 'remark' && detail.repairId"
>
点击查看维修账单
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
<text
class=
"item-value-repair"
v-if=
"item.value === 'remark' && detail.repairId"
@
click=
"toRepair"
>
点击查看维修账单
</text>
<text
v-else
-if=
"item.value === 'happenTime'"
>
{{
resetHappenTime
(
detail
[
item
.
value
])
||
''
}}
</text>
</view>
</view>
<view
class=
"card-bdoy-images"
v-if=
"detail.attach"
>
...
...
@@ -130,10 +130,18 @@ export default {
},
toEdit
()
{
if
(
this
.
detail
.
repairId
)
{
uni
.
navigateTo
({
url
:
`/pages/maintain-bill/create?billId=
${
this
.
detail
.
repairId
}
`
});
}
else
{
this
.
$refs
[
'billing-daily'
].
open
(
this
.
detail
.
id
);
}
},
toRepair
(){
uni
.
navigateTo
({
url
:
`/pages/maintain-bill/detail?billId=
${
this
.
detail
.
repairId
}
`
});
},
async
handleConfirm
()
{
try
{
let
params
=
{
...
...
@@ -177,6 +185,16 @@ export default {
}
}
});
},
resetHappenTime
(
time
){
if
(
!
time
){
return
''
}
if
(
this
.
detail
.
repairId
){
return
time
}
else
{
return
this
.
parseTime
(
time
,
'{y}-{m}-{d}'
)
}
}
}
};
...
...
pages/bill/debit-note/components/debit-detail.vue
View file @
05f128ba
<
template
>
<view
class=
"debit-detail"
>
<view
class=
"debit-detail"
@
click=
"toBill"
>
<view
class=
"content"
>
<view
class=
"content-item"
>
<text
class=
"content-item-label"
>
客户名称:
</text>
...
...
@@ -45,6 +45,13 @@ export default {
},
data
()
{
return
{};
},
methods
:{
toBill
(){
this
.
$route
.
push
({
path
:
"/pages/maintain-bill/index"
})
}
}
};
</
script
>
...
...
pages/bill/debit-note/debit-note.vue
View file @
05f128ba
...
...
@@ -71,20 +71,7 @@ export default {
keyword
:
''
},
list
:
[
[
{
name
:
'王先生'
,
phone
:
'13598489568'
,
status
:
'1'
,
money
:
'1000.00'
},
{
name
:
'王先生'
,
phone
:
'13598489568'
,
status
:
'0'
,
money
:
'1000.00'
}
],
[],
[],
[]
],
...
...
pages/index/schedule/components/plan-view.vue
View file @
05f128ba
...
...
@@ -18,7 +18,11 @@ import NoData from '@/components/no-data';
import
PlanStep
from
'./plan-step.vue'
;
import
subscribeMixin
from
'@/utils/subscribeMixin'
;
import
{
getTime
}
from
'@/utils/common.js'
;
import
{
getList
}
from
'@/api/schedule/index.js'
;
import
{
getList
,
saveTripSubscribe
}
from
'@/api/schedule/index.js'
;
import
{
getChannel
}
from
"@/utils/common.js"
export
default
{
name
:
'plan-view'
,
...
...
@@ -84,12 +88,28 @@ export default {
}
try
{
await
this
.
getSubscribeMessage
(
this
.
scene
.
trip
);
// 拉起订阅
this
.
s
howToast
(
'订阅成功'
);
this
.
s
aveSubscribe
(
item
)
}
catch
(
e
){
//TODO handle the exception
console
.
log
(
e
)
}
},
// 提交行程订阅给服务器
async
saveSubscribe
(
item
)
{
try
{
let
params
=
{
id
:
item
.
id
,
loginChannel
:
getChannel
().
loginChannel
,
authType
:
getChannel
().
authType
}
let
res
=
await
saveTripSubscribe
(
params
);
this
.
showToast
(
'订阅成功'
);
}
catch
(
e
)
{
//TODO handle the exception
console
.
log
(
e
)
}
},
handleClick
(
item
)
{
uni
.
navigateTo
({
url
:
`/pages/schedule/schedule-detail/schedule-detail?id=
${
item
.
id
}
`
...
...
pages/login/agreement/agreement.vue
View file @
05f128ba
...
...
@@ -8,9 +8,8 @@ export default {
return
{
content
:
''
,
webUrl
:
""
,
protocol
:
"http://www.weixiuhui.cn/protocol.html"
,
//用户协议
policy
:
"http://www.weixiuhui.cn/policy.html"
,
//隐私政策
protocol
:
"https://api-book.kaying.cc/protocol.html"
,
//用户协议
policy
:
"https://api-book.kaying.cc/policy.html"
,
//隐私政策
};
},
onLoad
(
options
)
{
...
...
pages/mine/update-log/components/update-log-item.vue
View file @
05f128ba
...
...
@@ -2,7 +2,7 @@
<view
class=
"update-log-item"
:class=
"
{active:checked}">
<view
class=
"head"
>
<view
class=
"head-title"
>
{{
detail
.
title
}}
</view>
<view
class=
"head-time"
>
{{
detail
.
create
d
Time
}}
</view>
<view
class=
"head-time"
>
{{
detail
.
createTime
}}
</view>
</view>
<view
class=
"content"
>
{{
detail
.
content
}}
</view>
</view>
...
...
pages/mine/update-log/update-log.vue
View file @
05f128ba
...
...
@@ -38,7 +38,7 @@ export default {
},
data
()
{
return
{
records
:
[],
list
:
[],
loaded
:
false
,
current
:
0
,
size
:
10
,
...
...
@@ -51,7 +51,7 @@ export default {
},
computed
:
{
noData
()
{
return
(
this
.
records
||
[]).
length
==
0
&&
this
.
loaded
;
return
(
this
.
list
||
[]).
length
==
0
&&
this
.
loaded
;
}
},
mounted
()
{
...
...
@@ -66,7 +66,7 @@ export default {
},
async
getList
()
{
if
(
this
.
current
==
0
)
{
this
.
records
=
[];
this
.
list
=
[];
this
.
loaded
=
false
;
}
try
{
...
...
@@ -77,9 +77,9 @@ export default {
let
res
=
await
getList
(
params
);
let
{
records
,
total
}
=
res
.
data
;
if
(
records
)
{
this
.
records
.
push
(...
records
);
this
.
list
.
push
(...
records
);
// 更新底部加载状态
this
.
loadStatus
=
total
>
this
.
records
.
length
?
'loadmore'
:
'nomore'
;
this
.
loadStatus
=
total
>
this
.
list
.
length
?
'loadmore'
:
'nomore'
;
}
this
.
$nextTick
(()
=>
{
if
(
this
.
freshing
)
{
...
...
@@ -89,9 +89,14 @@ export default {
});
}
catch
(
e
)
{
//TODO handle the exception
this
.
loadStatus
=
'loadmore'
console
.
log
(
'error'
,
e
);
this
.
triggered
=
false
;
this
.
freshing
=
false
;
this
.
$nextTick
(()
=>
{
if
(
this
.
freshing
)
{
this
.
triggered
=
false
;
this
.
freshing
=
false
;
}
});
}
this
.
loaded
=
true
;
},
...
...
pages/mine/user-setting/user-setting.vue
0 → 100644
View file @
05f128ba
<
template
>
<view
class=
"manage-view"
>
<NavbarNormal
:background=
"
{ background: '#F6F7FA' }" title="营地管理" titleColor="#191C27" :border-bottom="false" title-bold>
</NavbarNormal>
<view
class=
"u-m-t-20"
>
<u-cell-group>
<u-cell-item
title=
"营地头像"
@
click=
"handleClickLogoImage"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-avatar
slot=
"right-icon"
class=
"avatar-iamge"
:src=
"info.logoUrl ? info.logoUrl : logoImage"
size=
"120"
></u-avatar>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
title=
"营地名称"
:value=
"info.campName"
@
click=
"handleClickChangeName"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
title=
"封面图片"
@
click=
"handleClickCoverImage"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-image
slot=
"right-icon"
width=
"160"
height=
"120"
mode=
"aspectFill"
:src=
"info.coverUrl ? info.coverUrl : backgroundImage"
:border-radius=
"8"
></u-image>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
title=
"营地介绍"
@
click=
"handleClickChangeDesc()"
:title-style=
"titleStyle"
:arrow=
"false"
>
<view
class=
"desc-box"
>
<text
class=
"desc-style"
>
{{
info
.
description
}}
</text>
</view>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
</u-cell-group>
</view>
<view
class=
"u-m-t-20"
>
<u-cell-group>
<u-cell-item
@
click=
"$u.throttle(handleClickGroup, 500)"
title=
"分组管理"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
@
click=
"$u.throttle(handleClickAdmin, 500)"
title=
"管理员设置"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
title=
"成员列表公开"
:title-style=
"titleStyle"
hover-class=
"none"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-switch
slot=
"right-icon"
v-model=
"info.memberOpen"
active-color=
"#FFDE00"
inactive-color=
"#8D8D8D"
:loading=
"switchLoading"
@
change=
"handleChangeMemberOpen"
></u-switch>
</u-cell-item>
</u-cell-group>
</view>
<view
class=
"u-m-t-20"
>
<u-cell-group>
<u-cell-item
title=
"加入设置"
@
click=
"handleClickChangeJoin"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
<u-cell-item
title=
"禁言/黑名单"
@
click=
"handleClickBrig"
:title-style=
"titleStyle"
:value-style=
"valueStyle"
:arrow=
"false"
>
<u-icon
slot=
"right-icon"
color=
"#D8D8D8"
size=
"24"
name=
"play-right-fill"
></u-icon>
</u-cell-item>
</u-cell-group>
</view>
<view
class=
"bottom-view u-m-t-20"
v-if=
"isCampOwner"
><view
class=
"dissolve"
@
click=
"handleClickNew"
>
解散营地
</view></view>
<PopImage
:visible
.
sync=
"showLogoImage"
:buttonText=
"buttonText"
:image=
"info.logoUrl"
@
click=
"handleClickChangeImage"
/>
<PopImage
:visible
.
sync=
"showCoverImage"
:buttonText=
"buttonText"
:image=
"info.coverUrl ? info.coverUrl : backgroundImage"
@
click=
"handleClickChangeImage"
/>
<PopInput
title=
"解散营地"
type=
"text"
sureText=
"确定"
:content=
"contentText"
:visible
.
sync=
"showConfirm"
@
click=
"handleConfirm"
/>
</view>
</
template
>
<
script
>
import
PopImage
from
'@/components/pop-image'
;
import
PopInput
from
'@/components/pop-input-view'
;
import
upload
from
'@/utils/upload'
;
import
NavbarNormal
from
'@/components/navbar-normal'
;
export
default
{
components
:
{
PopImage
,
NavbarNormal
,
PopInput
},
data
()
{
return
{
info
:
{},
// 营地信息
showLogoImage
:
false
,
showCoverImage
:
false
,
showConfirm
:
false
,
currentOperate
:
'logo'
,
qiniuToken
:
''
,
needRefresh
:
true
,
role
:
''
,
switchLoading
:
false
,
contentText
:
'解散营地后无法恢复,确认解散?'
};
},
computed
:
{
buttonText
()
{
return
this
.
currentOperate
==
'cover'
?
'更换背景'
:
'更换营地头像'
;
},
baseUrl
()
{
return
process
.
uniEnv
.
qn_base_url
;
},
logoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'morenyingditouxiang-k@3x.png'
;
},
backgroundImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'morenyingditupian@3x.png'
;
},
assetUrl
()
{
return
process
.
uniEnv
.
qn_asset_url
;
},
chatImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'pinglun@3x.png'
;
},
titleStyle
()
{
return
{
fontSize
:
'28rpx'
,
color
:
'#8D8D8D'
};
},
valueStyle
()
{
return
{
fontSize
:
'28rpx'
,
color
:
'#333'
,
marginRight
:
'16rpx'
};
},
descStyle
()
{
return
{};
},
isCampOwner
()
{
return
this
.
role
==
'CAMPOWNER'
||
this
.
info
.
campOwnerId
==
this
.
user_info
.
id
;
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
role
)
{
this
.
role
=
options
.
role
;
}
// 测试数据
// this.role == 'CAMPOWNER'
this
.
getQiniuToken
();
uni
.
hideShareMenu
();
},
onShow
()
{
if
(
this
.
needRefresh
)
{
this
.
getCampInfo
();
}
this
.
needRefresh
=
true
;
},
methods
:
{
handleClickChangeJoin
()
{
this
.
$u
.
route
({
url
:
'/pages/camp/editJoin'
,
params
:
{
value
:
this
.
info
.
joinCondition
&&
this
.
info
.
joinCondition
.
code
}
});
},
handleClickAdmin
()
{
this
.
$u
.
route
({
url
:
'/pages/command/admins'
});
},
handleClickBrig
()
{
this
.
$u
.
route
({
url
:
'/pages/command/brig'
});
},
handleClickChangeName
()
{
this
.
$u
.
route
({
url
:
'/pages/camp/input'
,
params
:
{
type
:
'camp'
,
value
:
encodeURIComponent
(
this
.
info
.
campName
)
}
});
uni
.
$once
(
'input-sure-camp'
,
res
=>
{
this
.
info
.
campName
=
res
.
content
;
this
.
updateCamp
({
campName
:
res
.
content
,
id
:
this
.
camp_id
});
});
},
handleClickChangeDesc
()
{
this
.
needRefresh
=
false
;
this
.
$u
.
route
({
url
:
'/pages/camp/input'
,
params
:
{
type
:
'camp-introduce'
,
value
:
encodeURIComponent
(
this
.
info
.
description
)
}
});
uni
.
$once
(
'input-sure-camp-introduce'
,
res
=>
{
this
.
info
.
description
=
res
.
content
;
this
.
updateCamp
({
description
:
res
.
content
,
id
:
this
.
camp_id
});
});
},
getQiniuToken
()
{
this
.
$u
.
api
.
getQiNiuToken
().
then
(
res
=>
{
this
.
qiniuToken
=
res
;
});
},
handleClickLogoImage
()
{
this
.
currentOperate
=
'logo'
;
this
.
showLogoImage
=
true
;
},
handleClickCoverImage
()
{
this
.
currentOperate
=
'cover'
;
this
.
showCoverImage
=
true
;
},
getCampInfo
()
{
this
.
$u
.
api
.
getCampInfo
({
campId
:
this
.
camp_id
})
.
then
(
res
=>
{
this
.
info
=
res
||
{};
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
toUrl
(
url
)
{
this
.
$u
.
route
(
url
);
},
handleChangeMemberOpen
(
val
)
{
this
.
switchLoading
=
true
;
this
.
updateCamp
({
memberOpen
:
this
.
info
.
memberOpen
,
id
:
this
.
camp_id
});
},
// updateCamp(param) {
// this.$u.api
// .updateCamp(param)
// .then((res) => {
// console.log('menu:', res)
// })
// .catch((err) => {
// console.log(err)
// })
// },
handleClickChangeImage
()
{
// 上传图片
upload
.
getPhoto
(
this
.
qiniuToken
).
then
(
res
=>
{
console
.
log
(
'upload success'
,
res
);
let
param
=
{
id
:
this
.
camp_id
};
switch
(
this
.
currentOperate
)
{
case
'cover'
:
this
.
info
.
coverUrl
=
this
.
assetUrl
+
res
.
key
;
param
.
coverUrl
=
this
.
info
.
coverUrl
;
break
;
case
'logo'
:
this
.
info
.
logoUrl
=
this
.
assetUrl
+
res
.
key
;
param
.
logoUrl
=
this
.
info
.
logoUrl
;
break
;
}
this
.
updateCamp
(
param
);
});
},
handleClickGroup
()
{
this
.
$u
.
route
({
url
:
'/pages/command/groups'
});
},
updateCamp
(
param
)
{
this
.
$u
.
api
.
updateCamp
(
param
)
.
then
(
res
=>
{
this
.
switchLoading
=
false
;
console
.
log
(
'menu:'
,
res
);
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
},
handleClickNew
()
{
this
.
showConfirm
=
true
;
},
async
handleConfirm
()
{
uni
.
showLoading
({
mask
:
true
});
try
{
let
res
=
await
this
.
$u
.
api
.
dissolutionCampByCampModules
(
this
.
camp_id
);
if
(
res
)
{
this
.
showConfirm
=
false
;
uni
.
showToast
({
icon
:
'success'
,
mask
:
true
,
duration
:
1500
,
title
:
'解散成功'
});
this
.
$u
.
vuex
(
'camp_id'
,
''
)
setTimeout
(()
=>
{
this
.
$u
.
route
({
type
:
'switchTab'
,
url
:
'pages/index/index'
});
},
1500
);
}
}
catch
(
e
)
{
//TODO handle the exception
}
}
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.manage-view
{
background-color
:
#f6f7fa
;
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
font-size
:
26rpx
;
overflow
:
auto
;
.desc-box
{
width
:
100%
;
display
:
flex
;
justify-content
:
flex-end
;
text-align
:
left
;
}
.desc-style
{
margin-left
:
32rpx
;
overflow
:
hidden
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-
webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
fontsize
:
28rpx
;
color
:
#333
;
margin-right
:
16rpx
;
}
.avatar-iamge
{
margin-right
:
16rpx
;
background-color
:
#f6f7fa
;
border-radius
:
50%
;
}
.bottom-view
{
text-align
:
center
;
background
:
#fff
;
padding
:
48rpx
0
;
.dissolve
{
font-size
:
28rpx
;
font-weight
:
bold
;
color
:
#fc524d
;
}
}
}
</
style
>
pages/schedule/schedule-detail/schedule-detail.vue
View file @
05f128ba
...
...
@@ -59,6 +59,7 @@ export default {
return
{
scheduleSettingOptions
,
myFilter
,
showConfirm
:
false
,
id
:
''
,
detail
:
{
name
:
''
,
...
...
@@ -120,19 +121,22 @@ export default {
this
.
showConfirm
=
true
;
},
async
handleConfirm
()
{
if
(
!
this
.
form
.
id
)
{
if
(
!
this
.
detail
.
id
)
{
this
.
showToast
(
'行程不存在'
);
return
false
;
}
try
{
await
deleteById
({
id
:
this
.
form
.
id
id
:
this
.
detail
.
id
});
this
.
showToast
(
'删除成功'
,
true
);
setTimeout
(()
=>
{
this
.
navigateTo
();
uni
.
navigateBack
({
delta
:
1
})
},
1500
);
}
catch
(
e
)
{
console
.
log
(
e
)
//TODO handle the exception
}
}
...
...
store/getters.js
View file @
05f128ba
...
...
@@ -8,5 +8,6 @@ const getters = {
autoLogin
:
state
=>
state
.
login
.
autoLogin
,
quotedPriceTooltip
:
state
=>
state
.
common
.
quotedPriceTooltip
,
cdKeySetting
:
state
=>
state
.
common
.
cdKeySetting
,
billType
:
state
=>
state
.
bill
.
billType
,
}
export
default
getters
store/index.js
View file @
05f128ba
...
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
Vuex
from
'vuex'
import
login
from
'./modules/login'
import
common
from
'./modules/common'
import
bill
from
'./modules/bill'
import
getters
from
'./getters'
...
...
@@ -11,6 +12,7 @@ const store = new Vuex.Store({
modules
:
{
login
,
common
,
bill
},
getters
})
...
...
store/modules/bill.js
0 → 100644
View file @
05f128ba
import
{
setBillType
,
getBillType
,
}
from
"@/utils/common.js"
const
state
=
{
billType
:
getBillType
()
||
'INCOME'
,
}
const
mutations
=
{
SAVE_BILL_TYPE
:
(
state
,
data
)
=>
{
state
.
billType
=
data
setBillType
(
data
)
},
}
const
actions
=
{
Save_bill_type
:({
state
,
commit
},
data
)
=>
{
commit
(
"SAVE_BILL_TYPE"
,
data
)
},
}
export
default
{
state
,
mutations
,
actions
}
uni_modules/lunc-calendar/components/lunc-calendar/lunc-calendar.vue
View file @
05f128ba
...
...
@@ -152,22 +152,36 @@ export default {
this
.
selectDate
=
JSON
.
parse
(
JSON
.
stringify
(
dates
));
},
initSign
()
{
this
.
allDataArr
.
map
(
item
=>
{
item
.
map
(
el
=>
{
// this.allDataArr.map(item2 => {
// item2.map(el => {
// let { sYear, sMonth, day } = el;
// this.$set(el, 'daySign', null);
// this.$set(el, 'pastTime',false);
// });
// });
this
.
allDataArr
.
map
(
item2
=>
{
item2
.
map
(
el
=>
{
let
{
sYear
,
sMonth
,
day
}
=
el
;
this
.
$set
(
el
,
'daySign'
,
null
);
this
.
$set
(
el
,
'pastTime'
,
false
);
this
.
signList
.
map
(
item
=>
{
let
sY
=
new
Date
(
item
.
date
).
getFullYear
();
let
sM
=
new
Date
(
item
.
date
).
getMonth
()
+
1
;
let
sD
=
new
Date
(
item
.
date
).
getDate
();
if
(
sY
==
sYear
&&
sM
==
sMonth
&&
sD
==
day
)
{
console
.
log
(
item
)
this
.
$set
(
el
,
'daySign'
,
item
);
let
today
=
getTime
(
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
));
let
target
=
getTime
(
item
.
date
);
this
.
$set
(
el
,
'pastTime'
,
target
<
today
?
true
:
false
);
}
});
});
});
console
.
log
(
this
.
allDataArr
)
},
chooseMonth
(
e
)
{
let
{
value
}
=
e
.
detail
;
...
...
utils/common.js
View file @
05f128ba
...
...
@@ -82,6 +82,13 @@ export function getAutoLogin() {
return
uni
.
getStorageSync
(
"AUTOLOGIN"
)
||
false
}
export
function
setBillType
(
data
)
{
uni
.
setStorageSync
(
"BILLTYPE"
,
data
);
}
export
function
getBillType
()
{
return
uni
.
getStorageSync
(
"BILLTYPE"
)
||
''
}
export
function
checkLoginAndVip
(
callback
){
if
(
checkToken
()){
...
...
@@ -403,8 +410,9 @@ export const getTime = function(time) {
if
(
isiOS
)
{
if
(
typeof
(
time
)
===
"string"
)
{
t
=
new
Date
(
time
.
replace
(
/-/g
,
'/'
)).
getTime
();
}
else
{
t
=
myDate
.
getTime
();
}
t
=
myDate
.
getTime
();
}
else
{
t
=
myDate
.
getTime
();
}
...
...
utils/options/bill/quoted-price.js
View file @
05f128ba
...
...
@@ -34,20 +34,20 @@ export const serviceTypeOptions = [{
icon
:
"baojiabaoyang@3x.png"
},
{
value
:
"MJ"
,
label
:
"美家服务"
,
icon
:
"baojiameijia@3x.png"
},
{
value
:
"CL"
,
label
:
"上门测量"
,
icon
:
"baojiaceliang@3x.png"
},
//
{
//
value: "MJ",
//
label: "美家服务",
//
icon:"baojiameijia@3x.png"
//
},
//
{
//
value: "CL",
//
label: "上门测量",
//
icon:"baojiaceliang@3x.png"
//
},
{
value
:
"HS"
,
label
:
"旧机回收"
,
icon
:
"baojiahuishou@3x.png"
},
//
{
//
value: "HS",
//
label: "旧机回收",
//
icon:"baojiahuishou@3x.png"
//
},
]
\ No newline at end of file
utils/subscribeMixin.js
View file @
05f128ba
/** 自定义组件 共同逻辑 */
import
{
sceneOptions
,}
from
"@/utils/config.js"
import
{
getList
}
from
"@/api/mine/subscribe.js"
import
{
mapGetters
}
from
'vuex'
;
import
{
sceneOptions
,
}
from
"@/utils/config.js"
import
{
getList
,
addSubscribeCount
}
from
"@/api/mine/subscribe.js"
import
{
mapGetters
}
from
'vuex'
;
export
default
{
data
()
{
return
{
scene
:
sceneOptions
,
scene
:
sceneOptions
,
}
},
computed
:
{
...
...
@@ -21,32 +29,34 @@ export default {
* scene : 场景值
*/
getSubscribeMessage
(
scene
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
params
=
{
channel
:
this
.
loginChannel
,
scene
:
scene
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
params
=
{
channel
:
this
.
loginChannel
,
scene
:
scene
}
try
{
let
{
data
}
=
await
getList
(
params
);
this
.
requestSubscribeMessage
(
data
,
resolve
,
reject
)
}
catch
(
e
){
try
{
let
{
data
}
=
await
getList
(
params
);
this
.
requestSubscribeMessage
(
data
,
resolve
,
reject
)
}
catch
(
e
)
{
//TODO handle the exception
reject
(
e
)
}
})
},
requestSubscribeMessage
(
tempList
,
resolve
,
reject
)
{
requestSubscribeMessage
(
tempList
,
resolve
,
reject
)
{
let
tmplIds
=
tempList
.
map
(
item
=>
item
.
outTempleId
);
uni
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
success
:
res
=>
{
console
.
log
(
res
);
this
.
saveSubscribeCount
(
tempList
,
res
,
resolve
);
this
.
saveSubscribeCount
(
tempList
,
res
,
resolve
,
reject
);
},
fail
:
err
=>
{
fail
:
err
=>
{
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'订阅失败'
});
console
.
log
(
err
)
...
...
@@ -54,7 +64,7 @@ export default {
}
});
},
saveSubscribeCount
(
tempList
,
res
,
callback
)
{
saveSubscribeCount
(
tempList
,
res
,
resolve
,
reject
)
{
let
countList
=
[];
let
rejectList
=
[];
if
(
tempList
&&
res
&&
tempList
.
length
)
{
...
...
@@ -67,21 +77,25 @@ export default {
});
}
console
.
log
(
`发起
${
tempList
.
length
}
项订阅 , 用户同意订阅
${
countList
.
length
}
项 , 拒绝
${
rejectList
.
length
}
项`
);
//
if (countList.length) {
// this.addCount(countList,callback
);
// } else {
// this.onCallback(callback)
// }
resolve
(
res
)
if
(
countList
.
length
)
{
// this.addCount(countList, resolve, reject
);
resolve
(
tempList
)
}
else
{
reject
(
res
)
}
},
async
addCount
(
tempList
,
callback
){
try
{
let
params
=
tempList
.
map
(
item
=>
item
.
id
);
let
res
=
await
addSubscribeCount
(
this
.
camp_id
,
params
);
this
.
onCallback
(
callback
)
}
catch
(
e
){
async
addCount
(
tempList
,
resolve
,
reject
)
{
try
{
let
params
=
{
templeId
:
tempList
.
map
(
item
=>
item
.
id
),
loginChannel
:
getChannel
().
loginChannel
,
authType
:
getChannel
().
authType
}
let
res
=
await
addSubscribeCount
(
params
);
resolve
(
res
)
}
catch
(
e
)
{
//TODO handle the exception
this
.
onCallback
(
callback
)
reject
(
e
)
}
}
}
...
...
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