Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
1fbd67ab
Commit
1fbd67ab
authored
Aug 15, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库/箱码
parent
21fc7d2c
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
467 additions
and
81 deletions
+467
-81
.env.js
.env.js
+1
-1
order.js
src/common/api/order.js
+5
-1
XhScan.vue
src/components/createCom/XhScan.vue
+65
-56
pages.json
src/pages.json
+39
-21
mine.vue
src/pages/index/mine.vue
+7
-0
about.vue
src/pages/mine/about/about.vue
+85
-0
privacy-agreement.vue
src/pages/mine/about/privacy-agreement/privacy-agreement.vue
+89
-0
user-agreement.vue
src/pages/mine/about/user-agreement/user-agreement.vue
+156
-0
receiveQrCode.vue
...mine/warehouse/components/receiveDetail/receiveQrCode.vue
+20
-2
No files found.
.env.js
View file @
1fbd67ab
;(
function
()
{
let
NODE_ENV
=
'prod'
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
let
VERSION_NUMBER
=
'v1.5.
6
'
//版本号
let
VERSION_NUMBER
=
'v1.5.
7
'
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/common/api/order.js
View file @
1fbd67ab
...
...
@@ -220,6 +220,9 @@ let orderApiFun = function(vm){
let
getWorkerData
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
`/getWorkerData`
,
params
)
let
getOrderTime
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
`/getOrderTime/
${
params
.
id
}
`
,
params
)
// 完工-安装信息-充电桩信息-验证箱体二维码
let
parsingScanCode
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/parts/'
+
vm
.
vuex_token
+
`/take/stock/parsing/code`
,
params
)
const
orderApi
=
{
listByRecommendOrder
,
listOrderCount
,
...
...
@@ -279,7 +282,8 @@ let orderApiFun = function(vm){
workerDealWithError
,
association
,
getWorkerData
,
getOrderTime
getOrderTime
,
parsingScanCode
}
return
orderApi
}
...
...
src/components/createCom/XhScan.vue
View file @
1fbd67ab
...
...
@@ -3,25 +3,17 @@
<view
class=
""
>
<view
class=
"u-flex"
@
click=
"scanCode"
>
<view
class=
"txt u-flex-1"
>
<text
v-if=
"item.fieldsTitle===
'充电桩箱体二维码'"
>
扫描二维码
</text>
<text
v-if=
"item.fieldsTitle ===
'充电桩箱体二维码'"
>
扫描二维码
</text>
<text
v-else
>
扫描二维码(仅挚达充电桩可扫描)
</text>
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<view
class=
"u-flex"
>
<u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
:disabled=
"disabled"
/>
</view>
<view
class=
"u-flex"
><u-input
class=
"u-flex-1 input-item"
v-model=
"dataValue"
@
input=
"valueChange"
type=
"text"
:disabled=
"disabled"
/></view>
</view>
</
template
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
;
export
default
{
name
:
'XhScan'
,
components
:
{},
...
...
@@ -29,30 +21,47 @@ export default {
props
:
{},
filters
:
{},
data
()
{
return
{}
return
{};
},
computed
:
{},
watch
:
{},
mounted
()
{},
methods
:
{
scanCode
(
type
)
{
if
(
this
.
disabled
)
return
const
self
=
this
if
(
this
.
disabled
)
return
;
const
self
=
this
;
uni
.
scanCode
({
success
:
function
(
res
)
{
let
result
=
res
.
result
success
:
res
=>
{
let
result
=
res
.
result
.
substring
(
0
,
200
);
if
(
self
.
item
.
fieldsTitle
===
'充电桩箱体二维码'
)
{
self
.
dataValue
=
result
;
self
.
parsingCode
(
result
);
}
else
{
if
(
result
.
substring
(
0
,
4
)
===
'http'
)
{
let
arr
=
result
.
split
(
'/#/'
)
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
)
result
=
arr
[
1
]
let
arr
=
result
.
split
(
'/#/'
);
if
(
arr
.
length
<
2
)
arr
=
result
.
split
(
'?'
);
result
=
arr
[
1
];
}
self
.
dataValue
=
result
self
.
valueChange
(
result
)
},
})
},
self
.
dataValue
=
result
;
self
.
valueChange
(
result
);
}
}
});
},
}
async
parsingCode
(
code
)
{
try
{
let
res
=
await
this
.
$u
.
api
.
parsingScanCode
({
code
});
this
.
valueChange
(
res
.
data
);
}
catch
(
e
)
{
//TODO handle the exception
uni
.
showToast
({
icon
:
'none'
,
title
:
'二维码验证失败'
});
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.required
{
...
...
src/pages.json
View file @
1fbd67ab
...
...
@@ -409,25 +409,43 @@
}
}
,{
"path"
:
"warehouse/receiveDetail"
,
"style"
:
{
,
{
"path"
:
"warehouse/receiveDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"收货"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"warehouse/inventoryDetail"
,
"style"
:
{
},
{
"path"
:
"warehouse/inventoryDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"盘点"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"about/about"
,
"style"
:
{
"navigationBarTitleText"
:
"关于"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"about/user-agreement/user-agreement"
,
"style"
:
{
"navigationBarTitleText"
:
"用户协议"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"about/privacy-agreement/privacy-agreement"
,
"style"
:
{
"navigationBarTitleText"
:
"隐私协议"
,
"enablePullDownRefresh"
:
false
}
}
]
},
...
...
src/pages/index/mine.vue
View file @
1fbd67ab
...
...
@@ -137,6 +137,13 @@ export default {
value
:
''
,
icon
:
'liulanjilu.png'
,
imageStyle
:
'width:34rpx;height:32rpx'
},
{
pathName
:
'about/about'
,
title
:
'关于'
,
value
:
''
,
icon
:
'wodeziliao.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
}
],
[
...
...
src/pages/mine/about/about.vue
0 → 100644
View file @
1fbd67ab
<
template
>
<!-- 设置 -->
<view
class=
"setting-view"
>
<!--
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"设置"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
-->
<view
class=
"list-view"
>
<u-cell-group
:border=
"false"
>
<view
v-for=
"(item, index) in items"
:key=
"index"
>
<u-cell-item
value=
""
:border-bottom=
"false"
@
click=
"handleClick(item.pathName)"
>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
</u-cell-item>
</view>
</u-cell-group>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
};
},
computed
:
{
items
()
{
return
[
{
pathName
:
'about/user-agreement/user-agreement'
,
title
:
'用户协议'
,
},
{
pathName
:
'about/privacy-agreement/privacy-agreement'
,
title
:
'隐私协议'
,
},
]
}
},
onLoad
()
{
getApp
().
trackPage
(
'关于'
)
},
methods
:
{
handleClick
(
path
)
{
if
(
this
.
vuex_token
)
{
this
.
$u
.
route
({
url
:
'pages/mine/'
+
path
})
}
else
{
this
.
$u
.
route
({
url
:
"pages/login/index"
})
}
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.setting-view
{
padding-bottom
:
44px
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#F4F5F7
;
.list-view
{
height
:
100%
;
margin-top
:
30rpx
;
.item-title
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
32rpx
;
}
.item-value
{
font-size
:
26rpx
;
color
:
#999999
;
}
.line-view
{
height
:
2rpx
;
background-color
:
#F4F5F7
;
margin
:
30rpx
;
}
}
}
</
style
>
src/pages/mine/about/privacy-agreement/privacy-agreement.vue
0 → 100644
View file @
1fbd67ab
This diff is collapsed.
Click to expand it.
src/pages/mine/about/user-agreement/user-agreement.vue
0 → 100644
View file @
1fbd67ab
This diff is collapsed.
Click to expand it.
src/pages/mine/warehouse/components/receiveDetail/receiveQrCode.vue
View file @
1fbd67ab
...
...
@@ -80,12 +80,30 @@ export default {
console
.
log
(
'类型:'
+
scanType
);
console
.
log
(
'内容:'
+
result
);
if
(
scanType
===
'QR_CODE'
)
{
this
.
dataValue
=
result
.
substring
(
0
,
200
);
this
.
$emit
(
"onScanCodeChange"
,
this
.
dataValue
)
let
dataValue
=
result
.
substring
(
0
,
200
);
this
.
parsingCode
(
dataValue
)
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"二维码错误"
})
}
}
});
},
async
parsingCode
(
code
){
try
{
let
res
=
await
this
.
$u
.
api
.
parsingScanCode
({
code
})
this
.
dataValue
=
res
.
data
this
.
$emit
(
"onScanCodeChange"
,
this
.
dataValue
)
}
catch
(
e
){
//TODO handle the exception
uni
.
showToast
({
icon
:
"none"
,
title
:
"二维码验证失败"
})
}
},
valueChange
(
e
)
{
this
.
$emit
(
"onScanCodeChange"
,
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