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
51d90485
Commit
51d90485
authored
Mar 21, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
82d47d8c
ab50e845
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
46 additions
and
0 deletions
+46
-0
shareMethod.ts
src/common/shareMethod.ts
+14
-0
shareImg.png
src/images/icon/shareImg.png
+0
-0
Announcement.tsx
src/pages/Announcement/Announcement.tsx
+3
-0
BarCode.tsx
src/pages/BarCode/BarCode.tsx
+2
-0
Content.tsx
src/pages/Content/Content.tsx
+2
-0
Feedback.tsx
src/pages/Feedback/Feedback.tsx
+2
-0
Home.tsx
src/pages/Home/Home.tsx
+3
-0
Login.tsx
src/pages/Login/Login.tsx
+2
-0
OrderDetail.tsx
src/pages/Order/OrderDetail/OrderDetail.tsx
+2
-0
OrderList.tsx
src/pages/Order/OrderList/OrderList.tsx
+2
-0
OrderPay.tsx
src/pages/Order/OrderPay/OrderPay.tsx
+2
-0
Register.tsx
src/pages/Register/Register.tsx
+2
-0
ResetPwd.tsx
src/pages/ResetPwd/ResetPwd.tsx
+2
-0
SelectCampus.tsx
src/pages/SelectCampus/SelectCampus.tsx
+2
-0
UserSetting.tsx
src/pages/UserSetting/UserSetting.tsx
+2
-0
WebPage.tsx
src/pages/WebPage/WebPage.tsx
+2
-0
index.tsx
src/pages/index/index.tsx
+2
-0
No files found.
src/common/shareMethod.ts
0 → 100644
View file @
51d90485
type
ShareEntity
=
{
title
:
string
;
path
:
string
;
imageUrl
:
string
;
};
import
shareImg
from
'../images/icon/shareImg.png'
;
export
const
shareHandle
=
():
ShareEntity
=>
{
return
{
title
:
'多彩生活服务'
,
path
:
'/pages/index/index'
,
imageUrl
:
shareImg
,
};
};
src/images/icon/shareImg.png
0 → 100644
View file @
51d90485
74.3 KB
src/pages/Announcement/Announcement.tsx
View file @
51d90485
...
...
@@ -8,6 +8,7 @@ import { connect } from '@tarojs/redux';
import
'./Announcement.scss'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
userinfo
:
Customer
;
...
...
@@ -38,6 +39,8 @@ class Announcement extends Component {
linkUrl
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
const
{
userinfo
}
=
this
.
props
;
const
{
sectionId
}
=
this
.
$router
.
params
;
...
...
src/pages/BarCode/BarCode.tsx
View file @
51d90485
...
...
@@ -21,6 +21,7 @@ import {
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
refreshCodeBar
}
from
'../../api/customer'
;
import
Order
from
'@/types/Order/Order'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
userinfo
:
Customer
;
...
...
@@ -123,6 +124,7 @@ class BarCode extends Component {
},
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
const
{
userinfo
}
=
this
.
props
;
...
...
src/pages/Content/Content.tsx
View file @
51d90485
...
...
@@ -3,6 +3,7 @@ import { ComponentClass } from 'react';
import
{
WebView
}
from
'@tarojs/components'
;
import
{
connect
}
from
'@tarojs/redux'
;
import
{
ANN_LINK_URL
}
from
'../../constants'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageOwnProps
=
{
token
:
string
;
...
...
@@ -27,6 +28,7 @@ class Content extends Component {
};
this
.
getLinkUrl
();
}
onShareAppMessage
=
shareHandle
;
getLinkUrl
()
{
const
{
token
}
=
this
.
props
;
...
...
src/pages/Feedback/Feedback.tsx
View file @
51d90485
...
...
@@ -5,6 +5,7 @@ import { fetchFeedback } from '../../api/customer';
import
{
connect
}
from
'@tarojs/redux'
;
import
'./Feedback.scss'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageProps
=
{
areaId
:
number
;
...
...
@@ -38,6 +39,7 @@ class Feedback extends Component<PageProps, PageState> {
feedbackContent
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
feedbackHandle
()
{
Taro
.
showLoading
();
...
...
src/pages/Home/Home.tsx
View file @
51d90485
...
...
@@ -25,6 +25,7 @@ import { fetchBeanCount } from '../../api/bean';
import
{
fetchAnn
,
SectionItem
}
from
'../../api/announcement'
;
import
{
appLogout
}
from
'../../api/customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
userinfo
:
Customer
;
...
...
@@ -77,6 +78,8 @@ class Home extends Component {
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
this
.
getInitData
();
}
...
...
src/pages/Login/Login.tsx
View file @
51d90485
...
...
@@ -7,6 +7,7 @@ import { appLogin } from '../../api/customer';
import
{
connect
}
from
'@tarojs/redux'
;
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
NotRegisterCode
}
from
'../../constants/index'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageDispatchProps
=
{
userinfo
:
UserState
;
...
...
@@ -45,6 +46,7 @@ class Login extends Component {
pwd
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
validataLoginData
():
boolean
{
const
{
account
,
pwd
}
=
this
.
state
;
...
...
src/pages/Order/OrderDetail/OrderDetail.tsx
View file @
51d90485
...
...
@@ -8,6 +8,7 @@ import OrderInfo from '../components/OrderInfo/OrderInfo';
import
'./OrderDetail.scss'
;
import
{
fetchOrderDetailAndPay
}
from
'../../../api/order'
;
import
{
PayType
,
getPayType
}
from
'../../../utils/payType'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
pageProps
=
{};
type
PageState
=
{
...
...
@@ -80,6 +81,7 @@ class OrderDetail extends Component {
updateDate
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
console
.
log
(
'preload: '
,
this
.
$router
.
preload
);
...
...
src/pages/Order/OrderList/OrderList.tsx
View file @
51d90485
...
...
@@ -17,6 +17,7 @@ import { StoreState } from './store';
import
{
fetchAllOrder
,
fetchPayOrder
}
from
'../../../api/order'
;
import
Order
,
{
AllOrderItem
}
from
'../../../types/Order/Order'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
orderList
:
StoreState
;
...
...
@@ -69,6 +70,7 @@ class OrderList extends Component {
needRefresh
:
false
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
this
.
getPayOrderHandle
();
...
...
src/pages/Order/OrderPay/OrderPay.tsx
View file @
51d90485
...
...
@@ -15,6 +15,7 @@ import { connect } from '@tarojs/redux';
import
OrderPayway
from
'../components/OrderPayway/OrderPayway'
;
import
Order
from
'@/types/Order/Order'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
userinfo
:
Customer
;
...
...
@@ -82,6 +83,7 @@ class OrderPay extends Component {
},
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
const
data
=
this
.
$router
.
preload
;
...
...
src/pages/Register/Register.tsx
View file @
51d90485
...
...
@@ -20,6 +20,7 @@ import { wxUserRegister } from '../../api/customer';
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
ANN_LINK_URL
}
from
'@/constants'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
userinfo
:
Customer
;
...
...
@@ -78,6 +79,7 @@ class Register extends Component {
showCheckPwd
:
false
,
};
}
onShareAppMessage
=
shareHandle
;
setSex
(
value
:
string
)
{
this
.
setState
({
...
...
src/pages/ResetPwd/ResetPwd.tsx
View file @
51d90485
...
...
@@ -9,6 +9,7 @@ import ToastBox from '../../components/ToastBox/ToastBox';
import
'./ResetPwd.scss'
;
import
{
changePwdByCellphone
}
from
'../../api/customer'
;
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageOwnProps
=
{};
type
PageState
=
{
...
...
@@ -40,6 +41,7 @@ class ResetPwd extends Component {
showCheckPwd
:
false
,
};
}
onShareAppMessage
=
shareHandle
;
setPwdValue
(
key
:
string
,
value
:
string
)
{
let
val
=
replaceIllegalPwd
(
value
);
...
...
src/pages/SelectCampus/SelectCampus.tsx
View file @
51d90485
...
...
@@ -9,6 +9,7 @@ import { fetchAllArea, Area } from '../../api/area';
import
{
UserState
,
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
'./SelectCampus.scss'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
AreaList
=
Array
<
{
firstPin
:
string
;
...
...
@@ -65,6 +66,7 @@ class SelectCampus extends Component {
timer
:
undefined
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
this
.
getList
();
...
...
src/pages/UserSetting/UserSetting.tsx
View file @
51d90485
...
...
@@ -14,6 +14,7 @@ import { connect } from '@tarojs/redux';
import
{
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
{
perfectionUserInfo
}
from
'../../api/customer'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
UpdateParams
=
{
customerId
:
number
;
...
...
@@ -80,6 +81,7 @@ class UserSetting extends Component {
studentNo
:
studentNo
?
studentNo
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
validateSaveForm
():
boolean
{
const
{
customerName
}
=
this
.
state
;
...
...
src/pages/WebPage/WebPage.tsx
View file @
51d90485
import
{
Component
}
from
'@tarojs/taro'
;
import
{
ComponentClass
}
from
'react'
;
import
{
WebView
}
from
'@tarojs/components'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageState
=
{
linkUrl
:
string
;
...
...
@@ -17,6 +18,7 @@ class WebPage extends Component {
linkUrl
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
console
.
log
(
this
.
$router
.
params
);
...
...
src/pages/index/index.tsx
View file @
51d90485
...
...
@@ -7,6 +7,7 @@ import { connect } from '@tarojs/redux';
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
appLogin
}
from
'../../api/customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageDispatchProps
=
{
updateUserInfo
:
(
e
:
UserState
|
{
token
:
string
})
=>
void
;
...
...
@@ -42,6 +43,7 @@ class Index extends Component {
errorText
:
''
,
};
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
Taro
.
showLoading
();
...
...
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