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
d0654a24
Commit
d0654a24
authored
Oct 30, 2021
by
DESKTOP-RL2O6OD\没有姓名的打工人
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:安全溯源bug
Signed-off-by:
DESKTOP-RL2O6OD\没有姓名的打工人
<
1601745371@qq.com
>
parent
2c92d046
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
102 deletions
+0
-102
lib/eventBus/index.js
lib/eventBus/index.js
+0
-42
lib/service/index.js
lib/service/index.js
+0
-57
pages/order/order-detail.vue
pages/order/order-detail.vue
+0
-3
No files found.
lib/eventBus/index.js
deleted
100644 → 0
View file @
2c92d046
/**
* @desc 事件通讯
*/
class
EventBus
{
constructor
(
arg
)
{
this
.
events
=
{}
}
/**
* @desc 事件监听
*/
$on
(
key
,
fn
)
{
if
(
!
this
.
events
[
key
])
{
this
.
events
[
key
]
=
[]
}
this
.
events
.
push
(
fn
)
}
/**
* @desc 事件派发
*/
$emit
()
{
const
key
=
Array
.
prototype
.
splice
.
call
(
arguments
)
const
curE
=
this
.
events
[
key
]
curE
.
apply
(
this
,
arguments
)
}
/**
* @desc 取消事件监听
*/
$off
(
key
)
{
const
events
=
this
.
events
for
(
let
i
=
0
,
j
=
events
.
length
;
i
++
)
{
if
(
events
[
key
])
{
// 移除事件的监听
this
.
events
.
splice
(
i
,
1
)
}
}
}
}
export
default
EventBus
\ No newline at end of file
lib/service/index.js
View file @
d0654a24
...
...
@@ -109,15 +109,6 @@ export function request (options) {
uni
.
showLoading
({
title
:
'
加载中...
'
,
mask
:
true
})
}
return
new
Promise
((
resolve
,
reject
)
=>
{
// const isOverdue = store.state.user.isOverdue
// if(isOverdue) {
// reject({
// status: false,
// data: null,
// msg: '服务已过期'
// })
// return
// }
const
token
=
store
.
state
.
user
.
token
||
''
const
appid
=
store
.
state
.
user
.
appid
||
''
uni
.
request
({
...
...
@@ -147,60 +138,12 @@ export function request (options) {
})
}
// 请求
// export function testrequest (options) {
// const valite_err = validateOps(options)
// if(valite_err) return Toast({title: valite_err})
// options.method = options.method ? options.method.toUpperCase() : "GET" // 默认get
// options.url = `${options.url}`
// if(options.needMask) {
// uni.showLoading({title: '加载中...', mask: true})
// }
// return new Promise((resolve, reject) => {
// const token = store.state.user.token || ''
// const appid = store.state.user.appid || ''
// uni.request({
// ...options,
// header: {
// 'content-type': 'application/x-www-form-urlencoded',
// 'token': token,
// 'appid': appid
// },
// success: res => {
// successRes(res, options, resolve, reject)
// },
// fail: err => {
// Toast({title: '网络开小差了,请检查网络!'})
// options.errCb && typeof options.errCb === 'function' && options.errCb();
// reject({
// status: false,
// code: 400,
// data: err
// })
// },
// complete: () => {
// options.completeCb && typeof options.completeCb === 'function' && options.completeCb();
// options.needMask && uni.hideLoading()
// }
// })
// })
// }
// 上传文件
export
function
upload
(
options
)
{
const
valite_err
=
validateOps
(
options
)
if
(
valite_err
)
return
Toast
({
title
:
valite_err
})
uni
.
showLoading
({
title
:
'
上传中...
'
,
mask
:
true
})
return
new
Promise
((
resolve
,
reject
)
=>
{
// const isOverdue = store.state.user.isOverdue
// if(isOverdue) {
// reject({
// status: false,
// data: null,
// msg: '服务已过期'
// })
// return
// }
const
token
=
store
.
state
.
user
.
token
||
''
const
appid
=
store
.
state
.
user
.
appid
||
''
uni
.
uploadFile
({
...
...
pages/order/order-detail.vue
View file @
d0654a24
...
...
@@ -249,9 +249,6 @@ export default {
data
.
order
.
countdownT
=
0
// item.last_payTime = ''
}
data
.
goods
.
map
(
i
=>
{
console
.
log
(
typeof
i
.
batch_id
,
i
.
batch_id
,
~~
i
.
batch_id
,
!~~
i
.
batch_id
)
})
this
.
order_detail
=
{
goods
:
data
.
goods
,
order
:
data
.
order
||
{},
...
...
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