Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tools
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
tools
Commits
995a2ea7
Commit
995a2ea7
authored
Jan 28, 2023
by
庄欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
cec18779
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
250 additions
and
206 deletions
+250
-206
mp-fastquote/js/main.js
+0
-19
mp-remark-v4/css/main.css
+24
-0
mp-remark-v4/images/loading.gif
+0
-0
mp-remark-v4/images/loading.png
+0
-0
mp-remark-v4/js/index.js
+57
-50
mp-remark-v4/js/service.js
+94
-68
mp-remark-v4/js/util.js
+34
-33
mp-remark-v4/manifest.json
+1
-1
mp-remark-v4/ui.html
+40
-35
No files found.
mp-fastquote/js/main.js
View file @
995a2ea7
...
@@ -170,25 +170,6 @@ window.onload = function () {
...
@@ -170,25 +170,6 @@ window.onload = function () {
});
});
}
}
function
loading
()
{
var
mask
=
document
.
createElement
(
"div"
);
mask
.
id
=
"____mask___"
;
mask
.
style
.
zIndex
=
9999
;
mask
.
style
.
width
=
"100%"
;
mask
.
style
.
height
=
"100%"
;
mask
.
style
.
position
=
"fixed"
;
mask
.
style
.
left
=
0
;
mask
.
style
.
top
=
0
;
mask
.
style
.
backgroundColor
=
"#000000"
;
mask
.
style
.
opacity
=
"80%"
;
body
.
appendChild
(
mask
);
}
function
removeLoading
()
{
var
mask
=
document
.
getElementById
(
"____mask___"
);
mask
.
remove
();
}
function
assertStatus
()
{
function
assertStatus
()
{
var
statusDom
=
document
.
getElementById
(
"status"
);
var
statusDom
=
document
.
getElementById
(
"status"
);
...
...
mp-remark-v4/css/main.css
View file @
995a2ea7
...
@@ -407,4 +407,27 @@
...
@@ -407,4 +407,27 @@
.hidden
{
.hidden
{
display
:
none
!important
;
display
:
none
!important
;
}
#___container
.mask
.danger
{
font-size
:
24px
;
}
#___container
.toast
{
position
:
absolute
;
left
:
0
;
margin
:
0
auto
;
color
:
white
;
top
:
48%
;
width
:
100%
;
}
#___container
.toast-body
{
padding
:
10px
10px
10px
10px
;
border-radius
:
5px
;
width
:
fit-content
;
margin
:
0
auto
;
background-color
:
black
;
}
}
\ No newline at end of file
mp-remark-v4/images/loading.gif
0 → 100644
View file @
995a2ea7
130 KB
mp-remark-v4/images/loading.png
deleted
100644 → 0
View file @
cec18779
7.93 KB
mp-remark-v4/js/index.js
View file @
995a2ea7
...
@@ -18,61 +18,65 @@ const TYPE_READING = 2;
...
@@ -18,61 +18,65 @@ const TYPE_READING = 2;
const
TYPE_USER
=
3
;
const
TYPE_USER
=
3
;
let
ACCESS_TOKEN
=
""
;
let
ACCESS_TOKEN
=
""
;
var
body
=
document
.
getElementById
(
"__nuxt"
);
chrome
.
runtime
.
sendMessage
({},
function
(
response
)
{
chrome
.
runtime
.
sendMessage
({},
function
(
response
)
{
ACCESS_TOKEN
=
response
.
access_token
;
ACCESS_TOKEN
=
response
.
access_token
;
init
();
});
});
var
body
=
document
.
getElementById
(
"__nuxt"
);
function
init
()
{
fetch
(
UI
).
then
(
function
(
res
)
{
return
res
.
text
();
}).
then
(
html
=>
{
let
container
=
document
.
createElement
(
"div"
);
container
.
id
=
"container"
;
container
.
innerHTML
=
html
;
extendDom
.
appendChild
(
container
)
body
.
appendChild
(
extendDom
);
$
(
".closeBtn2"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/close2.png"
));
$
(
"#loadingImageSrc"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/loading.gif"
));
$
(
".close"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/close.png"
));
$
(
".nicknameIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/nickname.png"
));
$
(
".userIdIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/user_id.png"
));
$
(
".phoneIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/phone.png"
));
$
(
".qqIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/qq.png"
));
$
(
".wxIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/weixin.png"
));
$
(
".emailIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/email.png"
));
fetch
(
UI
).
then
(
function
(
res
)
{
}).
then
(()
=>
{
return
res
.
text
();
$
(
"textarea.pushContent[name=pushContentAuth]"
).
text
(
Manager
.
authContent
);
}).
then
(
html
=>
{
$
(
"textarea.pushContent[name=pushContentPic]"
).
text
(
Manager
.
picContent
);
let
container
=
document
.
createElement
(
"div"
);
$
(
"textarea.pushContent[name=pushContentN]"
).
text
(
Manager
.
pushContentN
);
container
.
id
=
"container"
;
$
(
"textarea.pushSmsContent"
).
text
(
Manager
.
smsContent
);
container
.
innerHTML
=
html
;
$
(
"textarea.pushContent[name=pushContentAuth]"
).
bind
(
"input propertychange"
,
function
()
{
extendDom
.
appendChild
(
container
)
Manager
.
authContent
=
this
.
value
;
body
.
appendChild
(
extendDom
);
});
$
(
".closeBtn2"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/close2.png"
));
$
(
"textarea.pushContent[name=pushContentPic]"
).
bind
(
"input propertychange"
,
function
()
{
$
(
".loadingImg"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/loading.png"
));
Manager
.
picContent
=
this
.
value
;
$
(
".close"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/close.png"
));
});
$
(
".nicknameIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/nickname.png"
));
$
(
"textarea.pushContent[name=pushContentN]"
).
bind
(
"input propertychange"
,
function
()
{
$
(
".userIdIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/user_id.png"
));
Manager
.
pushContentN
=
this
.
value
;
$
(
".phoneIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/phone.png"
));
});
$
(
".qqIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/qq.png"
));
$
(
"textarea.pushContent[name=pushContentAuth]"
).
bind
(
"input propertychange"
,
function
()
{
$
(
".wxIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/weixin.png"
));
Manager
.
authContent
=
this
.
value
;
$
(
".emailIcon"
).
attr
(
"src"
,
chrome
.
runtime
.
getURL
(
"images/email.png"
));
});
}).
then
(()
=>
{
$
(
"textarea.userRemark"
).
bind
(
"input propertychange"
,
function
()
{
$
(
"textarea.pushContent[name=pushContentAuth]"
).
text
(
Manager
.
authContent
);
Manager
.
userRemark
=
this
.
value
;
$
(
"textarea.pushContent[name=pushContentPic]"
).
text
(
Manager
.
picContent
);
});
$
(
"textarea.pushContent[name=pushContentN]"
).
text
(
Manager
.
pushContentN
);
$
(
"textarea.userYyRemark"
).
bind
(
"input propertychange"
,
function
()
{
$
(
"textarea.pushSmsContent"
).
text
(
Manager
.
smsContent
);
Manager
.
userYyRemark
=
this
.
value
;
$
(
"textarea.pushContent[name=pushContentAuth]"
).
bind
(
"input propertychange"
,
function
()
{
});
Manager
.
authContent
=
this
.
value
;
$
(
"textarea.remark"
).
bind
(
"input propertychange"
,
function
()
{
});
Manager
.
remark
=
this
.
value
;
$
(
"textarea.pushContent[name=pushContentPic]"
).
bind
(
"input propertychange"
,
function
()
{
});
Manager
.
picContent
=
this
.
value
;
$
(
"textarea.yyRemark"
).
bind
(
"input propertychange"
,
function
()
{
});
Manager
.
yyRemark
=
this
.
value
;
$
(
"textarea.pushContent[name=pushContentN]"
).
bind
(
"input propertychange"
,
function
()
{
});
Manager
.
pushContentN
=
this
.
value
;
onload
();
});
openUi
();
$
(
"textarea.pushContent[name=pushContentAuth]"
).
bind
(
"input propertychange"
,
function
()
{
Manager
.
authContent
=
this
.
value
;
});
$
(
"textarea.userRemark"
).
bind
(
"input propertychange"
,
function
()
{
Manager
.
userRemark
=
this
.
value
;
});
});
$
(
"textarea.userYyRemark"
).
bind
(
"input propertychange"
,
function
()
{
}
Manager
.
userYyRemark
=
this
.
value
;
});
$
(
"textarea.remark"
).
bind
(
"input propertychange"
,
function
()
{
Manager
.
remark
=
this
.
value
;
});
$
(
"textarea.yyRemark"
).
bind
(
"input propertychange"
,
function
()
{
Manager
.
yyRemark
=
this
.
value
;
});
onload
();
openUi
();
});
function
onload
()
{
function
onload
()
{
$
(
".showUi"
).
on
(
"click"
,
function
()
{
$
(
".showUi"
).
on
(
"click"
,
function
()
{
...
@@ -85,6 +89,9 @@ function onload() {
...
@@ -85,6 +89,9 @@ function onload() {
$
(
".submitUserRemark"
).
click
(
function
()
{
$
(
".submitUserRemark"
).
click
(
function
()
{
submitUserRemark
();
submitUserRemark
();
})
})
$
(
".submitRemark"
).
click
(
function
()
{
submitRemark
();
})
$
(
".openMessageBox"
).
click
(
function
()
{
$
(
".openMessageBox"
).
click
(
function
()
{
openMessageBox
();
openMessageBox
();
})
})
...
...
mp-remark-v4/js/service.js
View file @
995a2ea7
...
@@ -43,16 +43,20 @@ function submitRemark() { //作品备注
...
@@ -43,16 +43,20 @@ function submitRemark() { //作品备注
"token"
:
Manager
.
token
,
"token"
:
Manager
.
token
,
"permission"
:
Manager
.
permission
.
toString
()
"permission"
:
Manager
.
permission
.
toString
()
}
}
if
(
data
[
'object_id'
]
===
null
)
{
showToast
(
"操作失败,没有有效的id"
);
return
;
}
sendData
(
API
.
setRemark
,
data
,
res
=>
{
sendData
(
API
.
setRemark
,
data
,
res
=>
{
if
(
res
.
code
===
"100001"
)
{
if
(
res
.
code
===
"100001"
)
{
Manager
.
remark
=
res
.
data
.
remark
;
Manager
.
remark
=
res
.
data
.
remark
;
Manager
.
permission
=
res
.
data
.
permission
.
toString
();
Manager
.
permission
=
res
.
data
.
permission
.
toString
();
Manager
.
token
=
res
.
data
.
lock_token
;
Manager
.
token
=
res
.
data
.
lock_token
;
Manager
.
yyRemark
=
res
.
data
.
operate_remark
;
Manager
.
yyRemark
=
res
.
data
.
operate_remark
;
Manager
.
showToast
(
"操作成功"
);
showToast
(
"操作成功"
);
}
else
{
}
else
{
if
(
res
.
code
.
toString
()
===
"100002"
)
{
if
(
res
.
code
.
toString
()
===
"100002"
)
{
Manager
.
err
=
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
;
freeze
(
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
)
;
}
else
{
}
else
{
showToast
(
res
.
message
);
showToast
(
res
.
message
);
}
}
...
@@ -69,6 +73,10 @@ function submitUserRemark() { //用户备注
...
@@ -69,6 +73,10 @@ function submitUserRemark() { //用户备注
"token"
:
Manager
.
userToken
,
"token"
:
Manager
.
userToken
,
"permission"
:
Manager
.
userPermission
.
toString
()
"permission"
:
Manager
.
userPermission
.
toString
()
}
}
if
(
data
[
'object_id'
]
===
null
)
{
showToast
(
"操作失败,没有有效的id"
);
return
;
}
sendData
(
API
.
setRemark
,
data
,
res
=>
{
sendData
(
API
.
setRemark
,
data
,
res
=>
{
if
(
res
.
code
===
"100001"
)
{
if
(
res
.
code
===
"100001"
)
{
Manager
.
userRemark
=
res
.
data
.
remark
;
Manager
.
userRemark
=
res
.
data
.
remark
;
...
@@ -76,10 +84,10 @@ function submitUserRemark() { //用户备注
...
@@ -76,10 +84,10 @@ function submitUserRemark() { //用户备注
Manager
.
userToken
=
res
.
data
.
lock_token
;
Manager
.
userToken
=
res
.
data
.
lock_token
;
Manager
.
userYyRemark
=
res
.
data
.
operate_remark
;
Manager
.
userYyRemark
=
res
.
data
.
operate_remark
;
showUserInfo
(
Manager
.
user
);
showUserInfo
(
Manager
.
user
);
Manager
.
showToast
(
"操作成功"
);
showToast
(
"操作成功"
);
}
else
{
}
else
{
if
(
res
.
code
.
toString
()
===
"100002"
)
{
if
(
res
.
code
.
toString
()
===
"100002"
)
{
Manager
.
err
=
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
;
freeze
(
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
)
;
}
else
{
}
else
{
showToast
(
res
.
message
);
showToast
(
res
.
message
);
}
}
...
@@ -125,32 +133,41 @@ function getReadingIdByBase64(url) {
...
@@ -125,32 +133,41 @@ function getReadingIdByBase64(url) {
}
}
function
getUserIdFromAvatar
(
avatar
)
{
function
getUserIdFromAvatar
(
avatar
)
{
var
reg
=
/
\/\d{1,}\/
/g
;
var
uid
=
""
;
var
idStrings
=
avatar
.
match
(
reg
);
var
medaInfo
=
$
(
"meta[name=sn]"
);
if
(
idStrings
!==
undefined
&&
idStrings
!==
null
&&
idStrings
!==
""
)
{
if
(
medaInfo
.
length
>
0
)
{
userId
=
idStrings
[
0
].
replace
(
/
\/
/g
,
""
);
uid
=
medaInfo
.
attr
(
"content"
);
Manager
.
userId
=
userId
;
}
else
{
}
else
{
var
url
=
window
.
location
.
href
;
var
reg
=
/
\/\d{1,}\/
/g
;
var
ms
=
url
.
match
(
/u_
[\S\s]
*
[\/
{0}
]?
/g
)[
0
];
var
idStrings
=
avatar
.
match
(
reg
);
if
(
ms
.
length
>
0
)
{
if
(
idStrings
!==
undefined
&&
idStrings
!==
null
&&
idStrings
!==
""
)
{
var
uid
=
""
;
uid
=
idStrings
[
0
].
replace
(
/
\/
/g
,
""
);
if
(
ms
.
indexOf
(
"
\
/"
)
!==
-
1
)
{
uid
=
ms
.
split
(
"
\
/"
);
}
else
{
uid
=
ms
;
}
getData
(
host
+
"/user/sn-to-id"
,
{
sn
:
uid
},
function
(
r
)
{
Manager
.
userId
=
r
.
data
;
})
}
else
{
}
else
{
showToast
(
"很遗憾,未能获取当前用户信息!"
);
var
url
=
window
.
location
.
href
;
return
false
;
var
ms
=
url
.
match
(
/u_
[\S\s]
*
[\/
{0}
]?
/g
)[
0
];
if
(
ms
.
length
>
0
)
{
if
(
ms
.
indexOf
(
"
\
/"
)
!==
-
1
)
{
uid
=
ms
.
split
(
"
\
/"
);
}
else
{
uid
=
ms
;
}
}
}
}
}
}
show
();
if
(
uid
!==
undefined
&&
isNaN
(
uid
)
&&
uid
!==
""
)
{
getData
(
host
+
"/user/sn-to-id"
,
{
sn
:
uid
},
function
(
r
)
{
Manager
.
userId
=
r
.
data
;
if
(
isNaN
(
Manager
.
userId
)
||
Manager
.
userId
<=
0
)
{
showToast
(
"暂时不能获取用户信息"
);
}
show
();
})
}
else
{
Manager
.
userId
=
uid
;
show
();
}
}
}
function
getAuth
()
{
function
getAuth
()
{
...
@@ -199,58 +216,49 @@ function openUi() {
...
@@ -199,58 +216,49 @@ function openUi() {
let
canOpen
=
assertIn
();
let
canOpen
=
assertIn
();
Manager
.
canOpen
=
canOpen
;
Manager
.
canOpen
=
canOpen
;
if
(
canOpen
)
{
if
(
canOpen
)
{
if
(
Manager
.
type
!==
null
&&
Manager
.
type
!==
undefined
)
{
//获取基本信息并显示在编辑框
getData
(
API
.
getUserInfo
,
{
uid
:
Manager
.
userId
},
data
=>
{
let
res
=
data
.
data
;
Manager
.
user
.
id
=
res
.
id
;
Manager
.
user
.
qq
=
res
.
qq
;
Manager
.
user
.
wx
=
res
.
wx
;
Manager
.
user
.
mobile
=
res
.
mobile
;
Manager
.
user
.
email
=
res
.
email
;
Manager
.
user
.
nickname
=
res
.
nickname
;
showUserInfo
(
Manager
.
user
);
});
getData
(
API
.
getRemark
,
{
object_id
:
Manager
.
userId
,
type
:
TYPE_USER
},
res
=>
{
if
(
res
.
code
.
toString
()
===
"100001"
)
{
Manager
.
userRemark
=
res
.
data
.
remark
;
Manager
.
userYyRemark
=
res
.
data
.
operate_remark
;
Manager
.
userPermission
=
res
.
data
.
permission
;
Manager
.
userToken
=
res
.
data
.
lock_token
Manager
.
authType
=
"now"
;
show
();
}
})
if
(
Manager
.
isWorks
)
{
getData
(
API
.
getRemark
,
{
getData
(
API
.
getRemark
,
{
object_id
:
Manager
.
objectId
,
object_id
:
Manager
.
objectId
,
type
:
Manager
.
type
type
:
Manager
.
type
},
res
=>
{
},
res
=>
{
if
(
res
.
code
.
toString
()
===
"100001"
)
{
if
(
res
.
code
.
toString
()
===
"100001"
)
{
if
(
!
res
.
data
instanceof
Array
)
{
Manager
.
remark
=
res
.
data
.
remark
;
Manager
.
remark
=
res
.
data
.
remark
;
Manager
.
permission
=
res
.
data
.
permission
;
Manager
.
permission
=
res
.
data
.
permission
;
Manager
.
token
=
res
.
data
.
lock_token
;
Manager
.
token
=
res
.
data
.
lock_token
;
Manager
.
yyRemark
=
res
.
data
.
operate_remark
;
Manager
.
yyRemark
=
res
.
data
.
operate_remark
;
}
}
}
});
});
}
//获取基本信息并显示在编辑框
if
(
Manager
.
isUserInfo
)
{
getData
(
API
.
getUserInfo
,
{
uid
:
Manager
.
userId
},
data
=>
{
let
res
=
data
.
data
;
Manager
.
user
.
id
=
res
.
id
;
Manager
.
user
.
qq
=
res
.
qq
;
Manager
.
user
.
wx
=
res
.
wx
;
Manager
.
user
.
mobile
=
res
.
mobile
;
Manager
.
user
.
email
=
res
.
email
;
Manager
.
user
.
nickname
=
res
.
nickname
;
showUserInfo
(
Manager
.
user
);
});
getData
(
API
.
getRemark
,
{
object_id
:
Manager
.
userId
,
type
:
TYPE_USER
},
res
=>
{
if
(
res
.
code
.
toString
()
===
"100001"
)
{
if
(
!
res
.
data
instanceof
Array
)
{
Manager
.
userRemark
=
res
.
data
.
remark
;
Manager
.
userYyRemark
=
res
.
data
.
operate_remark
;
Manager
.
userPermission
=
res
.
data
.
permission
;
Manager
.
userToken
=
res
.
data
.
lock_token
}
Manager
.
authType
=
"now"
;
show
();
}
})
}
if
(
Manager
.
isWorks
)
{
getData
(
API
.
getIsYoumi
,
{
getData
(
API
.
getIsYoumi
,
{
object_id
:
Manager
.
objectId
,
object_id
:
Manager
.
objectId
,
type
:
Manager
.
type
type
:
Manager
.
type
},
data
=>
{
},
data
=>
{
if
(
data
.
data
.
result
==
1
)
{
if
(
data
.
data
.
result
.
toString
()
===
"1"
)
{
Manager
.
isYoumi
=
1
;
Manager
.
isYoumi
=
1
;
Manager
.
youmiCreateTime
=
data
.
data
.
create_time
;
Manager
.
youmiCreateTime
=
data
.
data
.
create_time
;
Manager
.
dateyoumiCreateTime
=
Date
.
parse
(
data
.
data
.
create_time
);
Manager
.
dateyoumiCreateTime
=
Date
.
parse
(
data
.
data
.
create_time
);
...
@@ -264,6 +272,17 @@ function openUi() {
...
@@ -264,6 +272,17 @@ function openUi() {
});
});
}
}
if
(
Manager
.
isReading
)
{
if
(
Manager
.
isReading
)
{
getData
(
API
.
getRemark
,
{
object_id
:
Manager
.
objectId
,
type
:
Manager
.
type
},
res
=>
{
if
(
res
.
code
.
toString
()
===
"100001"
)
{
Manager
.
remark
=
res
.
data
.
remark
;
Manager
.
permission
=
res
.
data
.
permission
;
Manager
.
token
=
res
.
data
.
lock_token
;
Manager
.
yyRemark
=
res
.
data
.
operate_remark
;
}
});
getData
(
API
.
getIsYoumi
,
{
getData
(
API
.
getIsYoumi
,
{
object_id
:
Manager
.
objectId
,
object_id
:
Manager
.
objectId
,
type
:
Manager
.
type
type
:
Manager
.
type
...
@@ -447,6 +466,14 @@ function showUserInfo(user) {
...
@@ -447,6 +466,14 @@ function showUserInfo(user) {
function
show
()
{
function
show
()
{
$
(
".objectId"
).
text
(
Manager
.
objectId
);
$
(
".objectId"
).
text
(
Manager
.
objectId
);
if
(
Manager
.
isWorks
)
{
$
(
"div.readingInfoBox"
).
addClass
(
"hidden"
);
$
(
"div.worksInfoBox"
).
removeClass
(
"hidden"
);
}
if
(
Manager
.
isReading
)
{
$
(
"div.worksInfoBox"
).
addClass
(
"hidden"
);
$
(
"div.readingInfoBox"
).
removeClass
(
"hidden"
);
}
if
(
!
Manager
.
sendPush
)
{
if
(
!
Manager
.
sendPush
)
{
$
(
".NotSendPushStatus"
).
removeClass
(
"hidden"
);
$
(
".NotSendPushStatus"
).
removeClass
(
"hidden"
);
$
(
".SendPushStatus"
).
addClass
(
"hidden"
);
$
(
".SendPushStatus"
).
addClass
(
"hidden"
);
...
@@ -526,6 +553,5 @@ function show() {
...
@@ -526,6 +553,5 @@ function show() {
$
(
"textarea.remark"
).
text
(
Manager
.
remark
);
$
(
"textarea.remark"
).
text
(
Manager
.
remark
);
$
(
"textarea.yyRemark"
).
text
(
Manager
.
yyRemark
);
$
(
"textarea.yyRemark"
).
text
(
Manager
.
yyRemark
);
$
(
"textarea.userRemark"
).
text
(
Manager
.
userRemark
);
$
(
"textarea.userRemark"
).
text
(
Manager
.
userRemark
);
console
.
log
(
Manager
);
}
}
mp-remark-v4/js/util.js
View file @
995a2ea7
function
showToast
(
msg
)
{
function
showToast
(
msg
)
{
let
$this
=
this
;
var
dom
=
$
(
"#toast"
);
$this
.
err
=
msg
;
dom
.
removeClass
(
"hidden"
);
if
(
msg
===
"操作成功"
)
{
dom
.
find
(
".toast-body"
).
html
(
msg
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$this
.
err
=
""
;
dom
.
addClass
(
"hidden"
);
},
800
);
dom
.
find
(
".toast-body"
).
text
(
""
);
}
else
{
},
5000
);
setTimeout
(
function
()
{
}
$this
.
err
=
""
;
},
1500
);
}
function
freeze
(
msg
)
{
unfreeze
();
$
(
"#msgBox"
).
removeClass
(
"hidden"
);
$
(
"#msgBox"
).
find
(
".danger"
).
text
(
msg
);
}
function
unfreeze
()
{
$
(
"#msgBox"
).
addClass
(
"hidden"
);
$
(
"#msgBox"
).
find
(
".danger"
).
text
(
""
);
}
}
function
base64Decode
(
data
)
{
function
base64Decode
(
data
)
{
...
@@ -23,8 +31,7 @@ function base64Decode(data) {
...
@@ -23,8 +31,7 @@ function base64Decode(data) {
}
}
function
sendData
(
api
,
data
,
callback
)
{
function
sendData
(
api
,
data
,
callback
)
{
let
$this
=
app
;
loading
();
$this
.
loading
=
true
;
var
header
=
{
var
header
=
{
method
:
"POST"
,
method
:
"POST"
,
headers
:
{
headers
:
{
...
@@ -36,11 +43,14 @@ function sendData(api, data, callback) {
...
@@ -36,11 +43,14 @@ function sendData(api, data, callback) {
body
:
JSON
.
stringify
(
data
)
body
:
JSON
.
stringify
(
data
)
};
};
fetch
(
api
,
header
).
then
(
res
=>
{
fetch
(
api
,
header
).
then
(
res
=>
{
$this
.
loading
=
false
;
removeLoading
()
;
return
res
.
json
()
return
res
.
json
()
}).
then
(
final
=>
{
}).
then
(
final
=>
{
return
callback
(
final
);
return
callback
(
final
);
})
}).
catch
(
e
=>
{
removeLoading
();
freeze
(
e
.
toString
());
});
}
}
function
getData
(
api
,
data
,
callback
)
{
function
getData
(
api
,
data
,
callback
)
{
...
@@ -58,7 +68,7 @@ function getData(api, data, callback) {
...
@@ -58,7 +68,7 @@ function getData(api, data, callback) {
return
res
.
json
()
return
res
.
json
()
}).
then
(
final
=>
{
}).
then
(
final
=>
{
if
(
final
.
code
.
toString
()
===
"100002"
)
{
if
(
final
.
code
.
toString
()
===
"100002"
)
{
showToast
(
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
);
freeze
(
"请先登录,若登录账号没有操作权限,请向公司管理员申请"
);
}
}
return
callback
(
final
);
return
callback
(
final
);
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
...
@@ -67,21 +77,13 @@ function getData(api, data, callback) {
...
@@ -67,21 +77,13 @@ function getData(api, data, callback) {
});
});
}
}
function
showLoading
()
{
var
mask
=
document
.
createElement
(
"div"
);
mask
.
id
=
"____mask___"
;
mask
.
style
.
zIndex
=
9999
;
mask
.
style
.
width
=
"100%"
;
mask
.
style
.
height
=
"100%"
;
mask
.
style
.
position
=
"fixed"
;
mask
.
style
.
left
=
0
;
mask
.
style
.
top
=
0
;
mask
.
style
.
backgroundColor
=
"#000000"
;
mask
.
style
.
opacity
=
"80%"
;
body
.
appendChild
(
mask
);
}
function
removeLoading
()
{
function
loading
()
{
document
.
getElementById
(
"____mask___"
);
$
(
"#msgBox"
).
removeClass
(
"hidden"
);
$
(
"#msgBox"
).
find
(
".loading"
).
removeClass
(
"hidden"
);
}
}
function
removeLoading
()
{
\ No newline at end of file
$
(
"#msgBox"
).
addClass
(
"hidden"
);
$
(
"#msgBox"
).
find
(
".loading"
).
addClass
(
"hidden"
);
}
mp-remark-v4/manifest.json
View file @
995a2ea7
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
"ui.html"
,
"ui.html"
,
"images/icon.png"
,
"images/icon.png"
,
"images/close.png"
,
"images/close.png"
,
"images/loading.
png
"
,
"images/loading.
gif
"
,
"images/close2.png"
,
"images/close2.png"
,
"images/nickname.png"
,
"images/nickname.png"
,
"images/phone.png"
,
"images/phone.png"
,
...
...
mp-remark-v4/ui.html
View file @
995a2ea7
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
</div>
</div>
<div
class=
"allcen "
<div
class=
"allcen "
style=
"width: 262px;position: absolute;bottom: 24px;left: 0;right: 0;margin: 0 auto;"
>
style=
"width: 262px;position: absolute;bottom: 24px;left: 0;right: 0;margin: 0 auto;"
>
<div
onclick=
"submitRemark()"
class=
"col-fff wei-500 allcen
"
<div
class=
"col-fff wei-500 allcen submitRemark
"
style=
"font-size: 16px;background: linear-gradient(34deg, #76B3FF, #0C7BB3);padding: 8px 16px;border-radius: 6px;box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.1);min-width: 144px;cursor: pointer;"
>
style=
"font-size: 16px;background: linear-gradient(34deg, #76B3FF, #0C7BB3);padding: 8px 16px;border-radius: 6px;box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.1);min-width: 144px;cursor: pointer;"
>
提交作品设置
提交作品设置
</div>
</div>
...
@@ -236,42 +236,46 @@
...
@@ -236,42 +236,46 @@
</div>
</div>
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
文章id:
<span
class=
"objectId"
></span></div>
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
文章id:
<span
class=
"objectId"
></span></div>
</div>
</div>
<div
class=
"allcen"
style=
"width: 100%;margin-top: 4px;min-height: 48px;"
>
<div
v-if=
"isYoumi == 1"
class=
"wei-600 col-fff"
style=
"font-size: 14px;"
>
<div
class=
"allcen wei-600 isYoumi hidden"
(此文章已参加有米计划
<br
/>
参与时间:{{youmiCreateTime}})
</div>
style=
"width: 100%;margin-top: 4px;font-size: 14px;"
>
<div
v-if=
"isYoumi == 0"
class=
"wei-600 col-fff"
style=
"font-size: 14px;"
>
(此文章未参加有米计划)
</div>
参与有米时间:
<div
class=
"youmiTime"
style=
"margin-left: 6px;"
>
</div>
</div>
</div>
<div
class=
"flex-c "
style=
"border-radius: 4px;width: max-content;margin-top: 55px;"
>
<div
class=
"flex-c "
style=
"border-radius: 4px;width: max-content;margin-top: 55px;"
>
<div
class=
""
style=
"height: 16px;width: 3px;background-color: #fff;border-radius: 4px;"
>
<div
class=
""
style=
"height: 16px;width: 3px;background-color: #fff;border-radius: 4px;"
>
</div>
</div>
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
该文章是否可被有米计划使用
</div>
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
该文章是否可被有米计划使用
</div>
</div>
</div>
<div
class=
"flex-c jube"
style=
"margin-top: 6px;width: 217px;"
>
<div
class=
"flex-c jube"
style=
"margin-top: 6px;width: 217px;"
>
<div
class=
"flex-c jube col-fff"
style=
"margin-top: 6px;width: 233px;"
>
<div
class=
"flex-c"
style=
"cursor: pointer;"
v-on:click=
"permission=-1"
>
<div
class=
"flex-c setPermission"
data-permission=
"-1"
style=
"cursor: pointer;"
>
<div
class=
""
:class=
"permission==-1?'userPermission_on':'userPermission_off'"
<div
class=
"permission permission-2"
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
</div>
</div>
<div
class=
"wei-600"
style=
"margin-left: 6px;font-size: 14px;"
>
<div
class=
"wei-600 "
style=
"margin-left: 6px;font-size: 14px;"
>
未设置
未设置
</div>
</div>
</div>
<div
class=
"flex-c"
style=
"cursor: pointer;"
v-on:click=
"permission=0"
>
<div
class=
""
:class=
"permission==0?'userPermission_on':'userPermission_off'"
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
</div>
<div
class=
"wei-600"
style=
"margin-left: 6px;font-size: 14px;"
>
不可用
</div>
</div>
</div>
<div
class=
"flex-c"
style=
"cursor: pointer;"
v-on:click=
"permission=1"
>
<div
class=
"flex-c setPermission"
data-permission=
"0"
style=
"cursor: pointer;"
>
<div
class=
""
:class=
"permission==1?'userPermission_on':'userPermission_off'"
<div
class=
"permission permission-0"
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
</div>
<div
class=
"wei-600"
style=
"margin-left: 6px;font-size: 14px;"
>
不可用
</div>
</div>
</div>
<div
class=
"wei-600"
style=
"margin-left: 6px;font-size: 14px;"
>
<div
class=
"flex-c setPermission"
data-permission=
"1"
style=
"cursor: pointer;"
>
可
用
<div
class=
"permission permission-1"
style=
"height: 14px;width: 14px;border-radius: 20px;"
>
</div>
<div
class=
"wei-600"
style=
"margin-left: 6px;font-size: 14px;"
>
可
用
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -281,12 +285,12 @@
...
@@ -281,12 +285,12 @@
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
备注该文章:
</div>
<div
class=
"wei-600 col-fff"
style=
"font-size: 16px;margin-left: 6px;"
>
备注该文章:
</div>
</div>
</div>
<div
class=
""
>
<div
class=
""
>
<textarea
style=
"width: 217px;"
class=
"
"
placeholder=
"备注内容"
v-model=
"remark"
rows=
"5"
<textarea
style=
"width: 217px;"
class=
"
remark"
placeholder=
"备注内容"
rows=
"5"
cols=
"50"
></textarea>
cols=
"50"
></textarea>
</div>
</div>
<div
class=
"allcen "
<div
class=
"allcen "
style=
"width: 217px;position: absolute;bottom: 24px;left: 0;right: 0;margin: 0 auto;"
>
style=
"width: 217px;position: absolute;bottom: 24px;left: 0;right: 0;margin: 0 auto;"
>
<div
onclick=
"submitRemark()"
class=
"col-fff wei-500 allcen
"
<div
class=
"col-fff wei-500 allcen submitRemark
"
style=
"font-size: 16px;background: linear-gradient(34deg, #76B3FF, #0C7BB3);padding: 8px 16px;border-radius: 6px;box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.1);min-width: 144px;cursor: pointer;"
>
style=
"font-size: 16px;background: linear-gradient(34deg, #76B3FF, #0C7BB3);padding: 8px 16px;border-radius: 6px;box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.1);min-width: 144px;cursor: pointer;"
>
提交文章设置
提交文章设置
</div>
</div>
...
@@ -346,14 +350,15 @@
...
@@ -346,14 +350,15 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
""
>
<div
class=
"
mask hidden"
id=
"msgBox
"
>
<div
class=
"
mask loading hidden
"
>
<div
class=
"
loading hidden"
style=
"text-align:center;
"
>
<img
class=
"xuanzhuan"
:src=
"loadingimg
"
style=
"width:10%;"
>
<img
id=
"loadingImageSrc
"
style=
"width:10%;"
>
</div>
</div>
<div
class=
"danger"
v-if=
"err != ''"
></div>
<div
class=
"danger"
></div>
<div
class=
"info"
v-if=
"info.length > 0"
v-for=
"m,index in info"
></div>
<div
class=
"info"
></div>
<!------------------- 作品开始 -------->
</div>
<!------------------- 消息推送 ---------------->
<div
class=
"toast hidden"
id=
"toast"
>
<div
class=
"toast-body"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
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