Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
5e8370c8
Commit
5e8370c8
authored
Mar 31, 2021
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-photo-v2' of
https://git.banshouhui.com/heyinchen/take_order
into dev-photo-v2
parents
5da8f3bf
de223b82
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
40 deletions
+19
-40
wxlogin.vue
take-order/pages/login/wxlogin.vue
+5
-9
take.vue
take-order/pages/photo/take.vue
+14
-26
login.js
take-order/utils/login.js
+0
-5
No files found.
take-order/pages/login/wxlogin.vue
View file @
5e8370c8
...
...
@@ -105,18 +105,10 @@ export default {
if
(
res
&&
util
.
getToken
())
{
that
.
goBackPage
()
}
else
{
uni
.
showToast
({
title
:
'授权失败,请重新授权'
,
icon
:
'none'
});
this
.
setLoginStatus
()
}
}).
catch
(
res
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
});
this
.
setLoginStatus
()
})
},
...
...
@@ -141,9 +133,13 @@ export default {
return
login
.
signup
(
params
);
}).
then
(
res
=>
{
uni
.
hideLoading
()
if
(
util
.
getToken
())
{
if
(
res
&&
util
.
getToken
())
{
that
.
goBackPage
()
}
else
{
uni
.
showToast
({
title
:
'授权失败,请重新授权'
,
icon
:
'none'
});
this
.
setLoginStatus
(
false
)
}
}).
catch
(
res
=>
{
...
...
take-order/pages/photo/take.vue
View file @
5e8370c8
...
...
@@ -28,7 +28,7 @@
</cover-view>
<canvas
canvas-id=
"canvas"
id=
"photoCanvas"
class=
"canvas"
:style=
"
{'width':750 + 'rpx','height': cameraHeight + 'rpx'}">
</canvas>
<view
v-
if
=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<view
v-
show
=
"standardShow"
class=
"page-mask"
:z-index=
"10000"
>
<photo-standard
:currentItem=
"currentItem"
/>
<view
class=
"btn-close"
@
click=
"closeShadow"
>
<image
class=
"icon icon-close"
mode=
"aspectFit"
src=
"/static/photo/icon-close.png"
>
...
...
@@ -79,7 +79,7 @@
camera
:
false
,
// 相机授权
location
:
false
,
// 位置授权
},
navHeight
:
0
,
navHeight
:
13
0
,
cameraWidth
:
750
,
cameraHeight
:
1000
,
// (4 / 3 * 750) 图片比例4:3
ratio
:
0
,
...
...
@@ -106,7 +106,6 @@
return
''
}
txt
=
waterSetting
.
lower_right
&&
waterSetting
.
lower_right
.
title_text
||
''
console
.
log
(
txt
,
'title_text'
,
'waterSetting'
,
waterSetting
)
return
txt
},
settingTxtArr
(){
...
...
@@ -133,18 +132,11 @@
}
}
})
console
.
log
(
settingTxtArr
,
'settingTxtArr'
)
return
settingTxtArr
}
},
watch
:
{
'authSetting.camera'
(
val
)
{
if
(
val
)
{
// this.cameraChange = true
}
},
},
watch
:
{},
onShow
()
{
this
.
initData
()
// this.standardShow = true
...
...
@@ -173,7 +165,6 @@
},
goPage
(
url
)
{
url
=
url
||
'/pages/photo/index'
;
console
.
log
(
url
,
'url'
)
uni
.
navigateTo
({
url
:
url
})
...
...
@@ -200,12 +191,12 @@
break
;
}
console
.
log
(
type
,
'type'
,
val
,
'val'
)
this
.
cameraInfo
[
type
]
=
val
},
initData
()
{
const
globalData
=
getApp
().
globalData
this
.
navHeight
=
globalData
.
navHeight
// this.navHeight = parseInt(globalData.navHeight)
console
.
log
(
globalData
.
navHeight
,
'globalData.navHeight'
)
this
.
ratio
=
globalData
.
screenHeight
/
globalData
.
rpxScreenHeight
this
.
waterSetting
=
globalData
.
photo
.
waterSetting
if
(
this
.
shadowInitShow
){
...
...
@@ -224,7 +215,7 @@
waterInfo
.
address
=
i
},
fail
:
function
(
err
)
{
console
.
log
(
err
,
'err'
)
//
console.log(err, 'err')
}
};
if
(
waterInfo
.
latitude
&&
waterInfo
.
longitude
)
{
...
...
@@ -239,7 +230,7 @@
const
{
errMsg
}
=
e
.
detail
console
.
log
(
e
.
detail
,
'e.detail'
)
//
console.log(e.detail, 'e.detail')
if
(
errMsg
!==
'insertCamera:fail auth deny'
)
{
return
}
...
...
@@ -254,7 +245,7 @@
success
:
function
(
res
)
{
waterInfo
.
longitude
=
parseFloat
(
res
.
longitude
).
toFixed
(
4
)
waterInfo
.
latitude
=
parseFloat
(
res
.
latitude
).
toFixed
(
3
)
console
.
log
(
waterInfo
.
longitude
,
'that.longitude'
,
waterInfo
.
latitude
,
'that.latitude'
)
//
console.log(waterInfo.longitude, 'that.longitude', waterInfo.latitude, 'that.latitude')
that
.
baiduLocation
()
},
fail
(
err
)
{
...
...
@@ -264,7 +255,7 @@
});
},
showSettingModal
(
type
)
{
console
.
log
(
type
,
'showModal-type'
)
//
console.log(type, 'showModal-type')
type
=
type
||
'camera'
const
self
=
this
let
authSetting
=
{
...
...
@@ -300,7 +291,6 @@
this
.
cameraChange
=
false
wx
.
openSetting
({
success
(
res
)
{
console
.
log
(
res
,
'res-setting'
)
const
authSetting
=
res
.
authSetting
self
.
cameraChange
=
true
if
(
authSetting
[
'scope.userLocation'
])
{
...
...
@@ -308,7 +298,6 @@
self
.
authSetting
.
location
=
true
self
.
getLocation
()
}
console
.
log
(
self
.
cameraChange
,
'this.cameraChange'
)
if
(
res
.
authSetting
[
'scope.camera'
])
{
self
.
authSetting
.
camera
=
true
}
...
...
@@ -368,8 +357,8 @@
//加入 水印文字
for
(
let
i
=
settingTxtArr
.
length
-
1
;
i
>=
0
;
i
--
)
{
txtHeight
=
18
canvas
.
setFontSize
(
1
4
)
txtHeight
=
20
canvas
.
setFontSize
(
1
6
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
// if(txt.length>14){
...
...
@@ -392,9 +381,9 @@
canvas
.
setFillStyle
(
'#f2f2f2'
)
// canvas.setTextAlign('center')
if
(
title
.
length
>
14
){
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
+
20
);
}
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
);
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
+
10
);
}
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
//加入 水印图片
...
...
@@ -456,8 +445,7 @@
let
hour
=
(
d
.
getHours
()
<
10
)
?
(
"0"
+
d
.
getHours
())
:
d
.
getHours
();
let
min
=
(
d
.
getMinutes
()
<
10
)
?
(
"0"
+
d
.
getMinutes
())
:
d
.
getMinutes
();
let
sec
=
(
d
.
getSeconds
()
<
10
)
?
(
"0"
+
d
.
getSeconds
())
:
d
.
getSeconds
();
let
now
=
year
+
"年"
+
month
+
"月"
+
date
+
"日 "
+
hour
+
":"
+
min
+
":"
+
sec
+
"(星期"
+
days
[
day
]
+
")"
;
let
now
=
year
+
"年"
+
month
+
"月"
+
date
+
"日 "
+
hour
+
":"
+
min
+
":"
+
sec
;
return
now
},
...
...
take-order/utils/login.js
View file @
5e8370c8
...
...
@@ -35,11 +35,6 @@ function authorization(data) {
app
.
setUserData
(
res
.
data
)
resolve
(
res
);
}
else
{
uni
.
showModal
({
title
:
'用户登录失败'
,
content
:
res
.
message
,
showCancel
:
false
});
reject
(
res
);
}
}
else
{
...
...
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