Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
ea4878b3
Commit
ea4878b3
authored
Dec 08, 2021
by
June_Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:已知bug
parent
09ecf4df
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
20 deletions
+57
-20
apis/news.js
apis/news.js
+10
-0
components/goods-popup/index.vue
components/goods-popup/index.vue
+2
-2
components/inputNumber/index.vue
components/inputNumber/index.vue
+1
-1
config/index.js
config/index.js
+1
-1
manifest.json
manifest.json
+1
-1
pages/mine/index.vue
pages/mine/index.vue
+22
-4
subPages/news/detail.vue
subPages/news/detail.vue
+12
-0
subPages/news/index.vue
subPages/news/index.vue
+8
-11
No files found.
apis/news.js
View file @
ea4878b3
...
...
@@ -56,3 +56,13 @@ export function newsDel(id) {
needMask
:
true
})
}
/**
* 获取未读消息数量
*/
export
function
unReadCounts
()
{
return
request
({
url
:
'
zsxcx/getInformationNoCountZS.htm
'
,
method
:
'
post
'
})
}
components/goods-popup/index.vue
View file @
ea4878b3
...
...
@@ -235,8 +235,8 @@ export default {
try
{
const
skuData
=
this
.
skuData
console
.
log
(
skuData
)
if
(
skuData
.
length
===
0
)
return
if
(
this
.
totalCounts
===
0
)
return
this
.
$toast
({
title
:
'
请选择购买数量
'
})
if
(
!
skuData
.
length
)
return
if
(
!
this
.
totalCounts
)
return
this
.
$toast
({
title
:
'
请选择购买数量
'
})
if
(
!
this
.
judgePay
(
skuData
))
return
this
.
$toast
({
title
:
'
购买数量不能少于起购数量
'
})
const
sku_ids
=
[]
const
cart_numbers
=
[]
...
...
components/inputNumber/index.vue
View file @
ea4878b3
...
...
@@ -56,7 +56,7 @@ export default {
const
max
=
this
.
max
const
min
=
this
.
min
const
newVal_number
=
~~
newVal
if
(
max
&&
newVal_number
>
=
max
)
return
if
(
max
&&
newVal_number
>
max
)
return
if
(
newVal_number
<
min
)
return
this
.
$emit
(
'
change
'
,
{
params
:
this
.
params
,
...
...
config/index.js
View file @
ea4878b3
const
env
=
{
release
:
'
https://www.gelifood.com
'
,
// 正式版
trial
:
'
https://www.gelifood.com
'
,
// 体验版
develop
:
'
https://
d
.gelifood.com
'
// 开发版
develop
:
'
https://
www
.gelifood.com
'
// 开发版
}
// 不考虑其他端小程序直接这样配置
...
...
manifest.json
View file @
ea4878b3
...
...
@@ -54,7 +54,7 @@
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
true
,
"postcss"
:
fals
e
,
"postcss"
:
tru
e
,
"minified"
:
true
},
"usingComponents"
:
true
,
...
...
pages/mine/index.vue
View file @
ea4878b3
...
...
@@ -83,13 +83,16 @@
<!-- 功能与服务 -->
<view
class=
"server-wrap"
>
<view
class=
"title font-28 font-bold pt-3"
>
功能与服务
</view>
<
!--
<
view
<view
class=
"server-item font-28 flex j-between a-center py-3"
@
click=
"nav('news')"
>
<text>
消息中心
</text>
<icon
class=
"right_arrow"
/>
</view>
-->
<view
class=
"flex j-end a-center"
>
<text
class=
"mr-1 primaryColor"
v-show=
"unReadNewsNum"
>
{{
unReadNewsNum
}}
</text>
<icon
class=
"right_arrow"
/>
</view>
</view>
<view
class=
"server-item font-28 flex j-between a-center py-3"
@
click=
"phoneCall"
...
...
@@ -123,6 +126,7 @@ import { baseUrl } from '@/config/index.js'
import
{
makePhoneCall
}
from
'
@/utils/common.js
'
import
{
orderNum
}
from
'
@/apis/order.js
'
import
{
uncommentNum
}
from
'
@/apis/comment.js
'
import
{
unReadCounts
}
from
'
@/apis/news.js
'
export
default
{
data
()
{
return
{
...
...
@@ -132,7 +136,8 @@ export default {
wait_receive
:
0
,
wait_send
:
0
},
commentCounts
:
0
commentCounts
:
0
,
unReadNewsNum
:
0
}
},
...
...
@@ -170,6 +175,7 @@ export default {
this
.
setUserInfo
()
this
.
getOrderNum
()
this
.
getCommentNum
()
this
.
getUnReadNewsNum
()
}
else
{
this
.
orderNum
=
{
wait_pay
:
0
,
...
...
@@ -249,6 +255,18 @@ export default {
console
.
log
(
e
)
//TODO handle the exception
}
},
// 获取未读消息数量
async
getUnReadNewsNum
()
{
try
{
const
{
status
,
data
}
=
await
unReadCounts
()
if
(
status
)
{
this
.
unReadNewsNum
=
data
}
}
catch
(
e
){
console
.
log
(
e
)
}
}
}
}
...
...
subPages/news/detail.vue
View file @
ea4878b3
...
...
@@ -68,6 +68,7 @@ export default {
async
getDetail
()
{
const
{
status
,
data
}
=
await
newsDetail
(
this
.
id
)
if
(
status
)
{
!
data
.
abstract
&&
data
.
text
&&
(
data
.
abstract
=
this
.
dealText
(
data
.
text
));
this
.
detail
=
data
newsStatus
(
data
.
id
)
}
...
...
@@ -77,6 +78,13 @@ export default {
preview
(
src
,
e
)
{
// do something
},
dealText
(
text
)
{
if
(
!
text
)
return
''
const
reg
=
/<
[^
<>
]
+>/g
;
text
=
text
.
replace
(
reg
,
''
).
replace
(
/ /ig
,
''
);
return
text
;
}
}
}
</
script
>
...
...
@@ -89,5 +97,9 @@ export default {
.cover
{
background-color
:
$mainBg
;
}
.article-introduct
{
width
:
100%
;
@include
text-ellipsis
(
2
);
}
}
</
style
>
subPages/news/index.vue
View file @
ea4878b3
<
template
>
<view
class=
"news-wrapper w-100
pt-2
isIphoneX"
>
<view
class=
"news-wrapper w-100 isIphoneX"
>
<template
v-if=
"list.length === 0"
>
<empty-view
text=
"暂无消息"
/>
</
template
>
...
...
@@ -15,6 +15,7 @@
v-for=
"news in list"
:key=
"news.id"
@
longpress=
"pressItem(news.id)"
@
click=
"handleDetail(news.text_id)"
>
<view
class=
"w-100 flex j-between a-center shop-info_wrap"
>
<view
class=
"shop-info_inner flex a-center flex-1"
>
...
...
@@ -40,10 +41,7 @@
<view
class=
"font-24 descColor"
>
{{
news
.
read_status
===
'
0
'
?
'
未读
'
:
'
已读
'
}}
</view>
</view>
<view
class=
"desc font-24 descColor mb-2"
>
{{
news
.
abstract
}}
</view>
<view
class=
"w-100 btn"
@
click.stop=
"handleDetail(news.text_id)"
>
查看详情
</view>
<view
class=
"w-100 btn"
>
查看详情
</view>
</view>
</pull-list>
</
template
>
...
...
@@ -81,12 +79,11 @@ export default {
// 长按id
pressItem
(
id
)
{
console
.
log
(
id
)
uni
.
showActionSheet
({
itemList
:
[
'
删除
'
]
,
uni
.
showModal
({
content
:
'
您确定要删除吗?
'
,
confirmColor
:
'
#FF661A
'
,
success
:
res
=>
{
const
{
tapIndex
}
=
res
if
(
tapIndex
===
0
)
{
if
(
res
.
confirm
)
{
newsDel
(
id
)
.
then
(({
status
,
msg
})
=>
{
if
(
status
)
{
...
...
@@ -129,7 +126,7 @@ export default {
overflow
:
hidden
;
.list-item
{
width
:
690rpx
;
margin
:
0
auto
;
margin
:
30rpx
auto
;
border-radius
:
8rpx
;
background-color
:
#fff
;
.shop-info_wrap
{
...
...
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