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
77119105
Commit
77119105
authored
Jul 26, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
17b6fc90
Pipeline
#2936
canceled with stages
Changes
17
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1146 additions
and
22 deletions
+1146
-22
subscribe.js
api/mine/subscribe.js
+9
-0
billing-daily.vue
components/billing-daily/billing-daily.vue
+9
-2
index.vue
components/camp-tabs/index.vue
+404
-0
pages.json
pages.json
+9
-0
cart-popup.vue
pages/bill/quoted-price/price/components/cart-popup.vue
+1
-1
plan-step.vue
pages/index/schedule/components/plan-step.vue
+2
-0
plan-view.vue
pages/index/schedule/components/plan-view.vue
+11
-5
quick-login.vue
pages/login/quick-login/quick-login.vue
+3
-0
payments-setting.vue
pages/mine/payments-setting/payments-setting.vue
+13
-4
subscribe-card.vue
pages/mine/subscribe/components/subscribe-card.vue
+107
-0
subscribe-item.vue
pages/mine/subscribe/components/subscribe-item.vue
+149
-0
subscribe-message.vue
pages/mine/subscribe/components/subscribe-message.vue
+109
-0
subscribe.vue
pages/mine/subscribe/subscribe.vue
+212
-0
schedule-detail.vue
pages/schedule/schedule-detail/schedule-detail.vue
+2
-2
config.js
utils/config.js
+3
-1
index.js
utils/options/mine/index.js
+14
-7
subscribeMixin.js
utils/subscribeMixin.js
+89
-0
No files found.
api/mine/subscribe.js
0 → 100644
View file @
77119105
import
request
from
"@/utils/request.js"
export
function
getList
(
data
)
{
return
request
({
url
:
`/rest/subscribe/temple`
,
method
:
'GET'
,
data
,
noLoading
:
true
})
}
components/billing-daily/billing-daily.vue
View file @
77119105
<
template
>
<u-popup
v-model=
"show"
border-radius=
"24"
:custom-style=
"
{ 'background-color': '#F6F7FA' }"
safe-area-inset-bottom mode="bottom">
<u-popup
v-model=
"show"
border-radius=
"24"
safe-area-inset-bottom
mode=
"bottom"
>
<view
class=
"content"
>
<view
class=
"billing"
>
<view
class=
"billing-head"
>
...
...
@@ -122,12 +122,16 @@ export default {
prop
:
'classificationId'
,
message
:
'请选择类型'
}
]
],
notification
:
'update-payments-setting'
};
},
mounted
()
{
this
.
init
();
},
onUnload
()
{
uni
.
$off
(
this
.
notification
);
},
methods
:
{
init
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
...
...
@@ -310,6 +314,9 @@ export default {
uni
.
navigateTo
({
url
:
'/pages/mine/payments-setting/payments-setting'
});
uni
.
$on
(
this
.
notification
,
res
=>
{
this
.
getBillTypeOptions
();
});
}
else
{
this
.
form
.
classificationId
=
item
.
id
;
}
...
...
components/camp-tabs/index.vue
0 → 100644
View file @
77119105
This diff is collapsed.
Click to expand it.
pages.json
View file @
77119105
...
...
@@ -226,6 +226,15 @@
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"subscribe/subscribe"
,
"style"
:
{
"navigationBarTitleText"
:
"用户订阅"
,
"enablePullDownRefresh"
:
false
}
}
]
},
...
...
pages/bill/quoted-price/price/components/cart-popup.vue
View file @
77119105
<
template
>
<u-popup
v-model=
"show"
border-radius=
"24"
:custom-style=
"
{ 'background-color': '#F6F7FA' }"
mode="bottom">
<u-popup
v-model=
"show"
border-radius=
"24"
mode=
"bottom"
>
<view
class=
"content"
>
<view
class=
"charge footer"
>
<view
class=
"charge-title"
>
收费列表
</view>
...
...
pages/index/schedule/components/plan-step.vue
View file @
77119105
...
...
@@ -105,6 +105,8 @@ export default {
}
.status
{
width
:
100upx
;
height
:
40rpx
;
line-height
:
40rpx
;
text-align
:
right
;
margin-left
:
38upx
;
color
:
$default-color
;
...
...
pages/index/schedule/components/plan-view.vue
View file @
77119105
...
...
@@ -16,11 +16,13 @@ import AbButton from '@/components/common/ab-button.vue';
import
EmptyPage
from
'@/components/common/empty-page.vue'
;
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'
;
export
default
{
name
:
'plan-view'
,
mixins
:
[
subscribeMixin
],
components
:
{
AbButton
,
PlanStep
,
...
...
@@ -74,14 +76,18 @@ export default {
url
:
'pages/schedule/create-schedule/create-schedule'
});
},
handleRemind
(
item
)
{
// 拉起订阅
async
handleRemind
(
item
)
{
if
(
item
.
status
!==
'1'
)
{
return
false
;
}
uni
.
showToast
({
icon
:
'none'
,
title
:
'提醒'
});
try
{
await
this
.
getSubscribeMessage
(
this
.
scene
.
trip
);
// 拉起订阅
this
.
showToast
(
'订阅成功'
);
}
catch
(
e
){
//TODO handle the exception
}
},
handleClick
(
item
)
{
uni
.
navigateTo
({
...
...
pages/login/quick-login/quick-login.vue
View file @
77119105
...
...
@@ -424,6 +424,9 @@ export default {
}
.login-index
.main
.m-top
{
margin-top
:
30rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.login-index
.main
.m-top
.t-logo
{
margin-bottom
:
15rpx
;
...
...
pages/mine/payments-setting/payments-setting.vue
View file @
77119105
...
...
@@ -57,7 +57,8 @@ export default {
},
listHeight
:
0
,
showTip
:
false
,
imageTop
:
0
imageTop
:
0
,
notification
:
'update-payments-setting'
};
},
computed
:
{
...
...
@@ -82,7 +83,15 @@ export default {
onReady
()
{
// this.showTipView();
},
onUnload
()
{
uni
.
$off
(
this
.
notification
);
},
methods
:
{
updateEmit
(){
uni
.
$emit
(
this
.
notification
,
{
content
:
""
});
},
closeDrap
()
{
this
.
$refs
[
'drap-view'
].
closeAll
();
},
...
...
@@ -163,6 +172,7 @@ export default {
}
let
res
=
await
sortList
(
params
);
await
this
.
getList
();
await
this
.
updateEmit
()
}
catch
(
e
)
{
this
.
getList
();
//TODO handle the exception
...
...
@@ -175,6 +185,7 @@ export default {
}
let
res
=
await
deleteById
(
params
)
await
this
.
getList
();
await
this
.
updateEmit
()
}
catch
(
e
)
{
this
.
getList
();
//TODO handle the exception
...
...
@@ -197,14 +208,12 @@ export default {
}
let
res
=
await
update
(
params
)
await
this
.
getList
();
await
this
.
updateEmit
()
}
catch
(
e
)
{
this
.
getList
();
//TODO handle the exception
}
},
naviTo
()
{
this
.
$u
.
route
(
'pages/camp/layout'
);
}
}
};
</
script
>
...
...
pages/mine/subscribe/components/subscribe-card.vue
0 → 100644
View file @
77119105
<
template
>
<view
class=
"subscribe-card"
>
<view
class=
"subscribe-card-head"
:class=
"
{ 'head-border': headBorder }">
<view
class=
"subscribe-card-head-label ellipsis"
>
<view
class=
"subscribe-card-head-label-icon"
v-if=
"leftIcon"
><image
:src=
"leftIcon"
mode=
""
></image></view>
<view
class=
"subscribe-card-head-label-text ellipsis"
>
{{
title
}}
</view>
</view>
<view
class=
"subscribe-card-head-right"
hover-class=
"u-hover-class"
@
click=
"handleClick"
v-if=
"rightButton"
>
{{
rightButtonText
}}
</view>
</view>
<view
class=
"subscribe-card-content"
><slot></slot></view>
</view>
</
template
>
<
script
>
export
default
{
name
:
'subscribe-card'
,
props
:
{
title
:
{
type
:
String
|
null
,
default
:
'标题'
},
rightButtonText
:
{
type
:
String
|
null
,
default
:
'全部+1'
},
rightButton
:
{
type
:
Boolean
,
default
:
true
},
headBorder
:
{
type
:
Boolean
,
default
:
true
},
leftIcon
:
{
type
:
String
|
null
,
default
:
null
}
},
data
()
{
return
{};
},
methods
:
{
handleClick
()
{
this
.
$emit
(
'handleClickRight'
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
image
{
width
:
100%
;
height
:
100%
;
}
.subscribe-card
{
width
:
100%
;
background
:
#ffffff
;
border-radius
:
8rpx
;
padding
:
0
24rpx
;
overflow
:
hidden
;
margin-bottom
:
24rpx
;
.ellipsis
{
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
word-break
:
break-all
;
}
&
-head
{
display
:
flex
;
width
:
100%
;
height
:
96rpx
;
justify-content
:
space-between
;
align-items
:
center
;
&
-label
{
width
:
70%
;
font-size
:
32rpx
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
&
-icon
{
width
:
28rpx
;
height
:
32rpx
;
margin-right
:
12rpx
;
}
&
-text
{
flex
:
1
;
}
}
&
-right
{
background
:
#28C445
;
border-radius
:
8rpx
;
font-size
:
24rpx
;
color
:
#FFFFFF
;
width
:
120rpx
;
height
:
48rpx
;
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.head-border
{
border-bottom
:
2rpx
solid
#f6f7fa
;
}
}
</
style
>
pages/mine/subscribe/components/subscribe-item.vue
0 → 100644
View file @
77119105
<
template
>
<view
class=
"subscribe-item"
>
<view
class=
"subscribe-item-left"
:class=
"
{ 'has-time-button': timeButton }">
<view
class=
"subscribe-item-left-label ellipsis"
>
<text>
{{
detail
.
name
}}
</text>
<text
class=
"subscribe-item-left-label-num"
:class=
"
{ 'red-num': countColor }">
<text>
{{
detail
.
number
}}
</text>
<text>
次
</text>
</text>
</view>
<view
class=
"subscribe-item-left-desc ellipsis"
v-if=
"detail.desc"
>
{{
detail
.
desc
}}
</view>
</view>
<view
class=
"subscribe-item-right"
>
<view
class=
"subscribe-item-right-button"
hover-class=
"u-hover-class"
:class=
"
{ 'subscribe-item-right-button-active': timeButton }" v-if="timeButton" @click="timeSetting">
{{
timeButtonText
}}
</view>
<view
class=
"subscribe-item-right-button"
hover-class=
"u-hover-class"
@
click=
"handleClick"
>
{{
rightButtonText
}}
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
'subscribe-item'
,
props
:
{
detail
:
{
type
:
Object
,
default
:
()
=>
{}
},
rightButtonText
:
{
type
:
String
|
null
,
default
:
'订阅+1'
},
rightButton
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{};
},
computed
:
{
countColor
()
{
return
this
.
detail
.
number
<=
1
?
true
:
false
;
},
timeButton
()
{
let
{
type
}
=
this
.
detail
;
if
(
type
)
{
return
type
.
code
===
'TIMING'
?
true
:
false
;
}
return
false
;
},
timeButtonText
()
{
return
this
.
detail
.
config
&&
this
.
detail
.
config
.
day
&&
this
.
detail
.
config
.
day
.
length
?
'已设置'
:
'设置时间'
;
}
},
methods
:
{
handleClick
()
{
this
.
$emit
(
'handleClickRight'
,
this
.
detail
);
},
timeSetting
()
{
if
(
!
this
.
detail
.
id
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'订阅id不能为空'
});
return
false
;
}
this
.
$u
.
route
({
url
:
'pages/message/subscribe/subscription-setting/subscription-setting'
,
params
:
{
detail
:
JSON
.
stringify
(
this
.
detail
)
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.subscribe-item
{
width
:
100%
;
height
:
156rpx
;
padding
:
24rpx
0
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
color
:
#333333
;
.ellipsis
{
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
word-break
:
break-all
;
}
&
-left
{
width
:
70%
;
font-size
:
28rpx
;
&
-label
{
font-weight
:
bold
;
&
-num
{
font-size
:
24rpx
;
line-height
:
24rpx
;
font-weight
:
500
;
color
:
#3878ff
;
margin-left
:
16rpx
;
}
.red-num
{
color
:
#fc524d
;
}
}
&
-desc
{
margin-top
:
24rpx
;
font-size
:
26rpx
;
color
:
#8d8d8d
;
}
}
.has-time-button
{
width
:
60%
;
}
&
-right
{
display
:
flex
;
align-items
:
center
;
&
-button
{
width
:
120rpx
;
height
:
48rpx
;
box-sizing
:
border-box
;
// padding: 12rpx 14rpx;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
// text-align: center;
background
:
#28C445
;
border-radius
:
8rpx
;
font-size
:
24rpx
;
// line-height: 48rpx;
color
:
#FFFFFF
;
margin-right
:
24rpx
;
&
:last-child
{
margin-right
:
0
;
}
}
&
-button-active
{
background
:
#ffffff
;
border
:
2rpx
solid
#28C445
;
color
:
#28C445
;
}
}
}
</
style
>
pages/mine/subscribe/components/subscribe-message.vue
0 → 100644
View file @
77119105
<
template
>
<view
class=
"subscribe-message"
>
<view
class=
"subscribe-message-content"
>
<view
class=
"subscribe-message-content-item"
v-for=
"item in messageList"
:key=
"item"
>
{{
item
}}
</view>
</view>
<view
class=
"official-account"
>
<view
class=
"official-account-component"
v-if=
"show"
><official-account
style=
""
></official-account></view>
<view
class=
"official-account-view"
@
click=
"toUrl"
>
<view
class=
"official-account-view-label ellipsis"
>
{{
title
}}
</view>
<view
class=
"official-account-view-right"
>
{{
rightButtonText
}}
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
'subscribe-message'
,
props
:
{
isSubscribe
:
{
type
:
Boolean
|
null
,
default
:
false
},
show
:
{
type
:
Boolean
,
default
:
false
},
},
computed
:
{
rightButtonText
()
{
return
this
.
isSubscribe
?
'已关注'
:
'点击关注'
;
}
},
data
()
{
return
{
messageList
:
[
'1. 根据微信小程序官方规定,推送消息需用户主动授权'
,
'2. 成功授权一次,累加一次推送机会'
,
'3. 成功推送一次,消耗一次推送机会'
,
'所以大家根据需要进行授权添加推送次数。'
],
title
:
'消息不错过,请关注微信公众号 “咖营”'
};
},
methods
:{
toUrl
(){
if
(
this
.
show
){
return
false
}
this
.
$u
.
route
({
url
:
"pages/message/official-account-page/official-account-page"
})
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.subscribe-message
{
&
-content
{
margin
:
20rpx
0
;
&
-item
{
line-height
:
48rpx
;
font-size
:
26rpx
;
}
}
.official-account
{
width
:
100%
;
height
:
112rpx
;
position
:
relative
;
overflow
:
hidden
;
&
-component
{
position
:
absolute
;
z-index
:
10
;
top
:
-20px
;
left
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0
;
}
&
-view
{
// background-color: #ffffff;
position
:
absolute
;
z-index
:
1
;
top
:
0
;
left
:
0
;
display
:
flex
;
width
:
100%
;
height
:
100%
;
justify-content
:
space-between
;
align-items
:
center
;
border-top
:
2rpx
solid
#f6f7fa
;
&
-label
{
width
:
80%
;
font-size
:
28rpx
;
}
&
-right
{
padding
:
12rpx
14rpx
;
color
:
#3878ff
;
border
:
2rpx
solid
#3878ff
;
border-radius
:
8rpx
;
font-size
:
24rpx
;
line-height
:
24rpx
;
}
}
}
}
</
style
>
pages/mine/subscribe/subscribe.vue
0 → 100644
View file @
77119105
<
template
>
<view
class=
"subscribe footer"
>
<!--
<NavbarNormal
:background=
"
{ background: '#f6f7fa' }" title="用户订阅" titleColor="#191C27" title-bold :border-bottom="false">
</NavbarNormal>
-->
<!--
<CampTabs
height=
"70"
activeColor=
"#333333"
inactive-color=
"#999999"
bar-height=
"10"
bar-width=
"22"
bar-image=
"tishiguangbiao@3x.png"
:list=
"listGroup"
:current=
"current"
@
change=
"change"
font-size=
"32"
bold
bg-color=
"transparent"
></CampTabs>
-->
<view
class=
"subscribe-content"
>
<subscribe-card
title=
"常用订阅,建议增加订阅次数"
:leftIcon=
"commonLeftIcon"
rightButtonText=
"全部+1"
rightButton
@
handleClickRight=
"clickCommon"
>
<subscribe-item
v-for=
"(item, index) in subscribeCommon"
:key=
"item.id"
:detail=
"item"
rightButtonText=
"推送+1"
rightButton
@
handleClickRight=
"clickSubscribe"
></subscribe-item>
</subscribe-card>
</view>
</view>
</
template
>
<
script
>
// import CampTabs from '@/components/camp-tabs';
import
SubscribeCard
from
'./components/subscribe-card.vue'
;
import
SubscribeItem
from
'./components/subscribe-item.vue'
;
import
SubscribeMessage
from
'./components/subscribe-message.vue'
;
import
{
mineBaseUrl
}
from
'@/utils/config.js'
;
// import { getColdScene } from '@/utils/common.js';
import
{
getList
}
from
'@/api/mine/subscribe.js'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
components
:
{
// CampTabs,
SubscribeCard
,
SubscribeItem
,
SubscribeMessage
},
data
()
{
return
{
// coldSceneList,
current
:
0
,
listGroup
:
[{
name
:
'用户订阅'
,
type
:
'USER'
},
{
name
:
'营主订阅'
,
type
:
'OWNER'
}],
swiperHeight
:
300
,
// 常用订阅
subscribeCommon
:
[],
// 低频订阅
subscribeOther
:
[],
// 营主订阅
subscribeCampOwner
:
[],
isSubscribe
:
false
,
// 是否关注了公众号
commonLeftIcon
:
mineBaseUrl
+
'dingyue2@3x.png'
,
showOfficialAccount
:
false
};
},
computed
:
{
...
mapGetters
([
'loginChannel'
])
},
onLoad
()
{
// this.checkScene()
},
onShow
()
{
// 查询是否关注了公众号
// this.queryOfficialAccount();
// 查询订阅列表
this
.
getSubscribeList
();
// 子页面保存,传递参数
// uni.$on('onSubscriptionSetting', data => {
// console.log('监听到事件来自 updateData ,携带参数为:', data);
// });
},
methods
:
{
// 查询是否关注了公众号
async
queryOfficialAccount
()
{
// let res=await this.$u.api.
// this.isSubscribe = !this.isSubscribe;
},
// 判断场景值是否能显示公众号
checkScene
()
{
let
scene
=
getColdScene
();
let
index
=
this
.
coldSceneList
.
findIndex
(
e
=>
e
===
scene
);
console
.
log
(
index
);
this
.
showOfficialAccount
=
index
===
-
1
?
false
:
true
;
},
// 查询订阅列表
async
getSubscribeList
()
{
try
{
let
params
=
{
channel
:
this
.
loginChannel
,
scene
:
''
};
let
{
data
}
=
await
getList
(
params
);
this
.
subscribeCommon
=
data
;
}
catch
(
e
)
{
this
.
showToast
(
'获取订阅模板失败'
);
//TODO handle the exception
}
},
change
(
index
)
{
this
.
current
=
index
;
this
.
getSubscribeList
();
},
// 点击单个订阅
clickSubscribe
(
item
)
{
if
(
!
item
.
outTempleId
)
{
uni
.
showToast
({
title
:
'消息模板id不能为空'
});
return
false
;
}
this
.
requestSubscribeMessage
([
item
]);
},
// 点击全部订阅
clickCommon
()
{
this
.
subscribeAll
(
this
.
subscribeCommon
);
},
clickOther
()
{
this
.
subscribeAll
(
this
.
subscribeOther
);
},
clickCampOwner
()
{
this
.
subscribeAll
(
this
.
subscribeCampOwner
);
},
subscribeAll
(
list
)
{
if
(
!
list
||
list
.
length
<=
0
)
{
return
false
;
}
let
tmplIds
=
[...
list
];
tmplIds
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
);
tmplIds
=
tmplIds
.
slice
(
0
,
3
);
this
.
requestSubscribeMessage
(
tmplIds
);
},
requestSubscribeMessage
(
tempList
=
[])
{
let
tmplIds
=
tempList
.
map
(
item
=>
item
.
outTempleId
);
uni
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
success
:
res
=>
{
console
.
log
(
res
);
this
.
saveSubscribeCount
(
tempList
,
res
);
},
fail
(
err
)
{
console
.
log
(
err
);
uni
.
showToast
({
icon
:
'none'
,
title
:
'订阅失败'
});
}
});
},
saveSubscribeCount
(
tmplIds
,
res
)
{
let
countList
=
[];
let
rejectList
=
[];
if
(
tmplIds
&&
res
&&
tmplIds
.
length
)
{
tmplIds
.
forEach
(
item
=>
{
if
(
res
[
item
.
outTempleId
]
&&
res
[
item
.
outTempleId
]
===
'accept'
)
{
countList
.
push
(
item
);
}
else
{
rejectList
.
push
(
item
);
}
});
}
console
.
log
(
`发起
${
tmplIds
.
length
}
项订阅 , 用户同意订阅
${
countList
.
length
}
项 , 拒绝
${
rejectList
.
length
}
项`
);
if
(
countList
.
length
)
{
this
.
addCount
(
countList
);
}
},
async
addCount
(
tempList
)
{
let
params
=
tempList
.
map
(
item
=>
item
.
id
);
let
res
=
await
this
.
$u
.
api
.
addSubscribeCountByMessageModules
(
this
.
camp_id
,
params
);
if
(
res
)
{
this
.
getSubscribeList
();
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.subscribe
{
background
:
#f6f7fa
;
height
:
100vh
;
padding
:
0
24rpx
;
display
:
flex
;
flex-direction
:
column
;
&
-content
{
flex
:
1
;
width
:
100%
;
padding
:
24rpx
0
;
overflow
:
hidden
;
.scorll-view
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
}
}
.footer
{
padding-bottom
:
constant
(
safe-area-inset-bottom
);
/*
兼容
iOS
<
11
.
2
*/
padding-bottom
:
env
(
safe-area-inset-bottom
);
/* 兼容 iOS >= 11.2 */
}
</
style
>
pages/schedule/schedule-detail/schedule-detail.vue
View file @
77119105
...
...
@@ -23,9 +23,9 @@
<text>
{{
detail
.
type
.
desc
}}
</text>
</text>
<text
v-else-if=
"item.value === 'remindMinute'"
>
<text>
{{
myFilter
(
detail
[
item
.
value
]
+
''
,
scheduleSettingOptions
)
}}
</text>
<text>
{{
detail
[
item
.
value
]?
myFilter
(
detail
[
item
.
value
]
+
''
,
scheduleSettingOptions
):
''
}}
</text>
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
}}
</text>
<text
v-else
>
{{
detail
[
item
.
value
]
||
''
}}
</text>
</view>
</view>
</view>
...
...
utils/config.js
View file @
77119105
...
...
@@ -27,7 +27,9 @@ export const whiteList = ['/pages/index/index', '/pages/index/schedule/schedule'
];
// 路由白名单
export
const
responseWhiteList
=
[
'/rest/bookRecord/export'
,
'/rest/exchangeCode/check'
,
'/rest/exchangeCode/exchange'
];
// 请求URL白名单,此名单内的请求不作状态码判断,在resolve中直接返回
export
const
sceneOptions
=
{
trip
:
"TRIP"
,
}
export
const
loginInfo
=
{
"account"
:
""
,
"authType"
:
""
,
...
...
utils/options/mine/index.js
View file @
77119105
const
baseUrl
=
process
.
uniEnv
.
qn_base_url
+
'mine/'
const
baseUrl
=
process
.
uniEnv
.
qn_base_url
+
'mine/'
// 常用功能
export
const
usedOptions
=
[{
id
:
1
,
title
:
'店铺设置'
,
icon
:
baseUrl
+
'/dianpushezhi@3x.png'
,
icon
:
baseUrl
+
'/dianpushezhi@3x.png'
,
path
:
"/pages/mine/shop-setting/shop-setting"
},
{
id
:
2
,
title
:
'收支设置'
,
icon
:
baseUrl
+
'/shouzhishezhi@3x.png'
,
icon
:
baseUrl
+
'/shouzhishezhi@3x.png'
,
path
:
"/pages/mine/payments-setting/payments-setting"
},
{
id
:
3
,
title
:
'兑换会员'
,
icon
:
baseUrl
+
'/duihuanhuiyuan@3x.png'
,
icon
:
baseUrl
+
'/duihuanhuiyuan@3x.png'
,
path
:
"/pages/mine/cd-key/cd-key"
},
{
id
:
4
,
title
:
'联系客服'
,
icon
:
baseUrl
+
'/lianxikefu1@3x.png'
,
icon
:
baseUrl
+
'/lianxikefu1@3x.png'
,
path
:
"/pages/mine/service/service"
},
]
export
const
packageOptions
=
[{
export
const
packageOptions
=
[
// {
// id: 0,
// title: '用户订阅',
// icon: 'file-text',
// path: "/pages/mine/subscribe/subscribe"
// },
{
id
:
1
,
title
:
'用户服务&隐私协议'
,
icon
:
'file-text'
,
...
...
@@ -64,4 +71,4 @@ export const shopSettingOptions = [{
value
:
'phone'
,
path
:
"/pages/mine/shop-setting/shop-phone/shop-phone"
}
]
\ No newline at end of file
]
utils/subscribeMixin.js
0 → 100644
View file @
77119105
/** 自定义组件 共同逻辑 */
import
{
sceneOptions
,}
from
"@/utils/config.js"
import
{
getList
}
from
"@/api/mine/subscribe.js"
import
{
mapGetters
}
from
'vuex'
;
export
default
{
data
()
{
return
{
scene
:
sceneOptions
,
}
},
computed
:
{
...
mapGetters
([
'loginChannel'
])
},
methods
:
{
onCallback
(
callback
)
{
if
(
callback
&&
callback
instanceof
Function
)
{
callback
()
}
},
/**
* scene : 场景值
*/
getSubscribeMessage
(
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
){
//TODO handle the exception
reject
(
e
)
}
})
},
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
);
},
fail
:
err
=>
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'订阅失败'
});
console
.
log
(
err
)
reject
(
err
)
}
});
},
saveSubscribeCount
(
tempList
,
res
,
callback
)
{
let
countList
=
[];
let
rejectList
=
[];
if
(
tempList
&&
res
&&
tempList
.
length
)
{
tempList
.
forEach
(
item
=>
{
if
(
res
[
item
.
outTempleId
]
&&
res
[
item
.
outTempleId
]
===
'accept'
)
{
countList
.
push
(
item
);
}
else
{
rejectList
.
push
(
item
);
}
});
}
console
.
log
(
`发起
${
tempList
.
length
}
项订阅 , 用户同意订阅
${
countList
.
length
}
项 , 拒绝
${
rejectList
.
length
}
项`
);
// if (countList.length) {
// this.addCount(countList,callback);
// } else {
// this.onCallback(callback)
// }
resolve
(
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
){
//TODO handle the exception
this
.
onCallback
(
callback
)
}
}
}
}
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