Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-school-app
Commits
3aca39eb
Commit
3aca39eb
authored
Jun 10, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
合并地址冲突
parents
69a7f778
5f7b0ed3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
14 deletions
+32
-14
package.json
package.json
+7
-7
customer.ts
src/api/customer.ts
+4
-3
index.ts
src/api/index.ts
+2
-0
Vcode.tsx
src/components/Vcode/Vcode.tsx
+5
-4
index.js
src/constants/index.js
+2
-0
BarCode.scss
src/pages/BarCode/BarCode.scss
+4
-0
BarCode.tsx
src/pages/BarCode/BarCode.tsx
+8
-0
No files found.
package.json
View file @
3aca39eb
...
...
@@ -4,13 +4,13 @@
"private"
:
true
,
"description"
:
""
,
"scripts"
:
{
"build:weapp"
:
"
cross-env NODE_ENV=product npx @tarojs/cli
build --type weapp"
,
"build:swan"
:
"
npx @tarojs/cli
build --type swan"
,
"build:alipay"
:
"
npx @tarojs/cli
build --type alipay"
,
"build:tt"
:
"
npx @tarojs/cli
build --type tt"
,
"build:h5"
:
"
npx @tarojs/cli
build --type h5"
,
"build:rn"
:
"
npx @tarojs/cli
build --type rn"
,
"dev:weapp"
:
"np
x @tarojs/cli build --type
weapp -- --watch"
,
"build:weapp"
:
"
taro
build --type weapp"
,
"build:swan"
:
"
taro
build --type swan"
,
"build:alipay"
:
"
taro
build --type alipay"
,
"build:tt"
:
"
taro
build --type tt"
,
"build:h5"
:
"
taro
build --type h5"
,
"build:rn"
:
"
taro
build --type rn"
,
"dev:weapp"
:
"np
m run build:
weapp -- --watch"
,
"dev:swan"
:
"npm run build:swan -- --watch"
,
"dev:alipay"
:
"npm run build:alipay -- --watch"
,
"dev:tt"
:
"npm run build:tt -- --watch"
,
...
...
src/api/customer.ts
View file @
3aca39eb
import
{
customerFetch
,
ResponseDataEntity
}
from
'.'
;
import
{
customerFetch
,
ResponseDataEntity
,
oldBaseFetch
}
from
'.'
;
export
class
LoginParams
{
/** 登陆标识 */
...
...
@@ -48,8 +48,9 @@ type RegisiterPramas = {
// type RegisiterReponseData = {};
export
const
wxUserRegister
=
(
entity
:
RegisiterPramas
)
=>
customerFetch
({
url
:
'/dcxy/wechat/applet/register/'
,
oldBaseFetch
({
// url: '/dcxy/wechat/applet/register/',
url
:
'/dcxy/api/customer/wxmini/register'
,
method
:
'POST'
,
data
:
entity
,
});
...
...
src/api/index.ts
View file @
3aca39eb
...
...
@@ -6,6 +6,7 @@ import {
SCHOOL_MAIN_URL
,
LogoutCode
,
SuccessCode
,
OLD_BASE_SERVER_URL
,
}
from
'../constants/index'
;
export
type
ResponseDataEntity
<
T
>
=
{
...
...
@@ -54,6 +55,7 @@ const createFetch = (basePath: string) => {
};
export
const
baseFetch
=
createFetch
(
BASE_SERVER_URL
);
export
const
oldBaseFetch
=
createFetch
(
OLD_BASE_SERVER_URL
);
export
const
customerFetch
=
createFetch
(
CUSTOMER_SERVER_URL
);
export
const
schoolMainFetch
=
createFetch
(
SCHOOL_MAIN_URL
);
...
...
src/components/Vcode/Vcode.tsx
View file @
3aca39eb
...
...
@@ -5,6 +5,7 @@ import { getVcode, getImageVcode } from '../../api/vcode';
import
Modal
from
'../Modal/Modal'
;
import
'./Vcode.scss'
;
import
{
ResponseDataEntity
}
from
'src/api'
;
import
{
ResendTime
}
from
'@/constants'
;
type
PageOwnProps
=
{
positionNum
:
string
;
...
...
@@ -35,7 +36,7 @@ class Vcode extends Component {
this
.
state
=
{
defaultText
:
props
.
text
?
props
.
text
:
'获取验证码'
,
counting
:
false
,
count
:
10
,
count
:
ResendTime
,
timer
:
null
,
showImgBox
:
false
,
vcode
:
null
,
...
...
@@ -61,13 +62,13 @@ class Vcode extends Component {
this
.
setState
({
vcode
:
data
,
});
this
.
render
Img
(
data
);
this
.
draw
Img
(
data
);
})
.
catch
(
console
.
error
);
this
.
setState
({
showImgBox
:
true
,
});
// this.
render
Img(1234);
// this.
draw
Img(1234);
}
else
{
Taro
.
showToast
({
title
:
'输入正确的手机号'
,
...
...
@@ -86,7 +87,7 @@ class Vcode extends Component {
});
}
render
Img
(
vcode
:
number
)
{
draw
Img
(
vcode
:
number
)
{
const
ctx
=
Taro
.
createCanvasContext
(
'Vcode'
,
this
.
$scope
);
ctx
.
setFillStyle
(
'#6180f4'
);
ctx
.
fillRect
(
0
,
0
,
73
,
38
);
...
...
src/constants/index.js
View file @
3aca39eb
...
...
@@ -2,8 +2,10 @@ export const APP_ID = 'wxf5912b79bba23663';
export
const
SuccessCode
=
1000
;
export
const
LogoutCode
=
-
2
;
export
const
NotRegisterCode
=
1005
;
export
const
ResendTime
=
10
;
export
const
BASE_SERVER_URL
=
'https://ex-test-dcxy-base-app.168cad.top'
;
export
const
OLD_BASE_SERVER_URL
=
'https://in-test-selfbase.168cad.top'
;
export
const
CUSTOMER_SERVER_URL
=
'https://ex-test-dcxy-customer-app.168cad.top'
;
export
const
SCHOOL_MAIN_URL
=
...
...
src/pages/BarCode/BarCode.scss
View file @
3aca39eb
...
...
@@ -73,4 +73,8 @@ page {
transform
:
rotate
(
180deg
);
}
}
.warnning
{
margin
:
80px
20px
0
;
color
:
#f10000
;
}
}
src/pages/BarCode/BarCode.tsx
View file @
3aca39eb
...
...
@@ -200,9 +200,13 @@ class BarCode extends Component {
}
drawBarCode
()
{
const
{
userinfo
}
=
this
.
props
;
if
(
userinfo
.
idBar
&&
userinfo
.
idBar
.
length
>
2
)
{
let
idBar
=
userinfo
.
idBar
.
substring
(
0
,
userinfo
.
idBar
.
length
-
2
)
+
'04'
;
wxbarcode
.
barcode
(
'BarCode'
,
idBar
,
646
,
188
);
wxbarcode
.
barcode
(
'BarCodeBig'
,
idBar
,
700
,
364
);
}
else
{
this
.
refreshCodeBar
();
}
}
toggleBigBarCode
()
{
...
...
@@ -277,6 +281,10 @@ class BarCode extends Component {
/>
</
View
>
</
View
>
<
View
className=
'warnning'
>
如扫描条码终端无响应,请刷新条码后重试!
</
View
>
</
View
>
);
}
...
...
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