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
ab50e845
Commit
ab50e845
authored
Mar 21, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加分享方式
parent
258c8a14
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 @
ab50e845
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 @
ab50e845
74.3 KB
src/pages/Announcement/Announcement.tsx
View file @
ab50e845
...
@@ -8,6 +8,7 @@ import { connect } from '@tarojs/redux';
...
@@ -8,6 +8,7 @@ import { connect } from '@tarojs/redux';
import
'./Announcement.scss'
;
import
'./Announcement.scss'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -38,6 +39,8 @@ class Announcement extends Component {
...
@@ -38,6 +39,8 @@ class Announcement extends Component {
linkUrl
:
''
,
linkUrl
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
const
{
userinfo
}
=
this
.
props
;
const
{
userinfo
}
=
this
.
props
;
const
{
sectionId
}
=
this
.
$router
.
params
;
const
{
sectionId
}
=
this
.
$router
.
params
;
...
...
src/pages/BarCode/BarCode.tsx
View file @
ab50e845
...
@@ -21,6 +21,7 @@ import {
...
@@ -21,6 +21,7 @@ import {
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
refreshCodeBar
}
from
'../../api/customer'
;
import
{
refreshCodeBar
}
from
'../../api/customer'
;
import
Order
from
'@/types/Order/Order'
;
import
Order
from
'@/types/Order/Order'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -123,6 +124,7 @@ class BarCode extends Component {
...
@@ -123,6 +124,7 @@ class BarCode extends Component {
},
},
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
const
{
userinfo
}
=
this
.
props
;
const
{
userinfo
}
=
this
.
props
;
...
...
src/pages/Content/Content.tsx
View file @
ab50e845
...
@@ -3,6 +3,7 @@ import { ComponentClass } from 'react';
...
@@ -3,6 +3,7 @@ import { ComponentClass } from 'react';
import
{
WebView
}
from
'@tarojs/components'
;
import
{
WebView
}
from
'@tarojs/components'
;
import
{
connect
}
from
'@tarojs/redux'
;
import
{
connect
}
from
'@tarojs/redux'
;
import
{
ANN_LINK_URL
}
from
'../../constants'
;
import
{
ANN_LINK_URL
}
from
'../../constants'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageOwnProps
=
{
type
PageOwnProps
=
{
token
:
string
;
token
:
string
;
...
@@ -27,6 +28,7 @@ class Content extends Component {
...
@@ -27,6 +28,7 @@ class Content extends Component {
};
};
this
.
getLinkUrl
();
this
.
getLinkUrl
();
}
}
onShareAppMessage
=
shareHandle
;
getLinkUrl
()
{
getLinkUrl
()
{
const
{
token
}
=
this
.
props
;
const
{
token
}
=
this
.
props
;
...
...
src/pages/Feedback/Feedback.tsx
View file @
ab50e845
...
@@ -5,6 +5,7 @@ import { fetchFeedback } from '../../api/customer';
...
@@ -5,6 +5,7 @@ import { fetchFeedback } from '../../api/customer';
import
{
connect
}
from
'@tarojs/redux'
;
import
{
connect
}
from
'@tarojs/redux'
;
import
'./Feedback.scss'
;
import
'./Feedback.scss'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageProps
=
{
type
PageProps
=
{
areaId
:
number
;
areaId
:
number
;
...
@@ -38,6 +39,7 @@ class Feedback extends Component<PageProps, PageState> {
...
@@ -38,6 +39,7 @@ class Feedback extends Component<PageProps, PageState> {
feedbackContent
:
''
,
feedbackContent
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
feedbackHandle
()
{
feedbackHandle
()
{
Taro
.
showLoading
();
Taro
.
showLoading
();
...
...
src/pages/Home/Home.tsx
View file @
ab50e845
...
@@ -25,6 +25,7 @@ import { fetchBeanCount } from '../../api/bean';
...
@@ -25,6 +25,7 @@ import { fetchBeanCount } from '../../api/bean';
import
{
fetchAnn
,
SectionItem
}
from
'../../api/announcement'
;
import
{
fetchAnn
,
SectionItem
}
from
'../../api/announcement'
;
import
{
appLogout
}
from
'../../api/customer'
;
import
{
appLogout
}
from
'../../api/customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -77,6 +78,8 @@ class Home extends Component {
...
@@ -77,6 +78,8 @@ class Home extends Component {
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
this
.
getInitData
();
this
.
getInitData
();
}
}
...
...
src/pages/Login/Login.tsx
View file @
ab50e845
...
@@ -7,6 +7,7 @@ import { appLogin } from '../../api/customer';
...
@@ -7,6 +7,7 @@ import { appLogin } from '../../api/customer';
import
{
connect
}
from
'@tarojs/redux'
;
import
{
connect
}
from
'@tarojs/redux'
;
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
NotRegisterCode
}
from
'../../constants/index'
;
import
{
NotRegisterCode
}
from
'../../constants/index'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageDispatchProps
=
{
type
PageDispatchProps
=
{
userinfo
:
UserState
;
userinfo
:
UserState
;
...
@@ -45,6 +46,7 @@ class Login extends Component {
...
@@ -45,6 +46,7 @@ class Login extends Component {
pwd
:
''
,
pwd
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
validataLoginData
():
boolean
{
validataLoginData
():
boolean
{
const
{
account
,
pwd
}
=
this
.
state
;
const
{
account
,
pwd
}
=
this
.
state
;
...
...
src/pages/Order/OrderDetail/OrderDetail.tsx
View file @
ab50e845
...
@@ -8,6 +8,7 @@ import OrderInfo from '../components/OrderInfo/OrderInfo';
...
@@ -8,6 +8,7 @@ import OrderInfo from '../components/OrderInfo/OrderInfo';
import
'./OrderDetail.scss'
;
import
'./OrderDetail.scss'
;
import
{
fetchOrderDetailAndPay
}
from
'../../../api/order'
;
import
{
fetchOrderDetailAndPay
}
from
'../../../api/order'
;
import
{
PayType
,
getPayType
}
from
'../../../utils/payType'
;
import
{
PayType
,
getPayType
}
from
'../../../utils/payType'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
pageProps
=
{};
type
pageProps
=
{};
type
PageState
=
{
type
PageState
=
{
...
@@ -80,6 +81,7 @@ class OrderDetail extends Component {
...
@@ -80,6 +81,7 @@ class OrderDetail extends Component {
updateDate
:
''
,
updateDate
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
console
.
log
(
'preload: '
,
this
.
$router
.
preload
);
console
.
log
(
'preload: '
,
this
.
$router
.
preload
);
...
...
src/pages/Order/OrderList/OrderList.tsx
View file @
ab50e845
...
@@ -17,6 +17,7 @@ import { StoreState } from './store';
...
@@ -17,6 +17,7 @@ import { StoreState } from './store';
import
{
fetchAllOrder
,
fetchPayOrder
}
from
'../../../api/order'
;
import
{
fetchAllOrder
,
fetchPayOrder
}
from
'../../../api/order'
;
import
Order
,
{
AllOrderItem
}
from
'../../../types/Order/Order'
;
import
Order
,
{
AllOrderItem
}
from
'../../../types/Order/Order'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
orderList
:
StoreState
;
orderList
:
StoreState
;
...
@@ -69,6 +70,7 @@ class OrderList extends Component {
...
@@ -69,6 +70,7 @@ class OrderList extends Component {
needRefresh
:
false
,
needRefresh
:
false
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
this
.
getPayOrderHandle
();
this
.
getPayOrderHandle
();
...
...
src/pages/Order/OrderPay/OrderPay.tsx
View file @
ab50e845
...
@@ -15,6 +15,7 @@ import { connect } from '@tarojs/redux';
...
@@ -15,6 +15,7 @@ import { connect } from '@tarojs/redux';
import
OrderPayway
from
'../components/OrderPayway/OrderPayway'
;
import
OrderPayway
from
'../components/OrderPayway/OrderPayway'
;
import
Order
from
'@/types/Order/Order'
;
import
Order
from
'@/types/Order/Order'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -82,6 +83,7 @@ class OrderPay extends Component {
...
@@ -82,6 +83,7 @@ class OrderPay extends Component {
},
},
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
const
data
=
this
.
$router
.
preload
;
const
data
=
this
.
$router
.
preload
;
...
...
src/pages/Register/Register.tsx
View file @
ab50e845
...
@@ -20,6 +20,7 @@ import { wxUserRegister } from '../../api/customer';
...
@@ -20,6 +20,7 @@ import { wxUserRegister } from '../../api/customer';
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
Customer
}
from
'@/types/Customer/Customer'
;
import
{
ANN_LINK_URL
}
from
'@/constants'
;
import
{
ANN_LINK_URL
}
from
'@/constants'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -78,6 +79,7 @@ class Register extends Component {
...
@@ -78,6 +79,7 @@ class Register extends Component {
showCheckPwd
:
false
,
showCheckPwd
:
false
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
setSex
(
value
:
string
)
{
setSex
(
value
:
string
)
{
this
.
setState
({
this
.
setState
({
...
...
src/pages/ResetPwd/ResetPwd.tsx
View file @
ab50e845
...
@@ -9,6 +9,7 @@ import ToastBox from '../../components/ToastBox/ToastBox';
...
@@ -9,6 +9,7 @@ import ToastBox from '../../components/ToastBox/ToastBox';
import
'./ResetPwd.scss'
;
import
'./ResetPwd.scss'
;
import
{
changePwdByCellphone
}
from
'../../api/customer'
;
import
{
changePwdByCellphone
}
from
'../../api/customer'
;
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
replaceIllegalPwd
}
from
'../../utils/pwd'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageOwnProps
=
{};
type
PageOwnProps
=
{};
type
PageState
=
{
type
PageState
=
{
...
@@ -40,6 +41,7 @@ class ResetPwd extends Component {
...
@@ -40,6 +41,7 @@ class ResetPwd extends Component {
showCheckPwd
:
false
,
showCheckPwd
:
false
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
setPwdValue
(
key
:
string
,
value
:
string
)
{
setPwdValue
(
key
:
string
,
value
:
string
)
{
let
val
=
replaceIllegalPwd
(
value
);
let
val
=
replaceIllegalPwd
(
value
);
...
...
src/pages/SelectCampus/SelectCampus.tsx
View file @
ab50e845
...
@@ -9,6 +9,7 @@ import { fetchAllArea, Area } from '../../api/area';
...
@@ -9,6 +9,7 @@ import { fetchAllArea, Area } from '../../api/area';
import
{
UserState
,
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
{
UserState
,
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
'./SelectCampus.scss'
;
import
'./SelectCampus.scss'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
AreaList
=
Array
<
{
type
AreaList
=
Array
<
{
firstPin
:
string
;
firstPin
:
string
;
...
@@ -65,6 +66,7 @@ class SelectCampus extends Component {
...
@@ -65,6 +66,7 @@ class SelectCampus extends Component {
timer
:
undefined
,
timer
:
undefined
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
this
.
getList
();
this
.
getList
();
...
...
src/pages/UserSetting/UserSetting.tsx
View file @
ab50e845
...
@@ -14,6 +14,7 @@ import { connect } from '@tarojs/redux';
...
@@ -14,6 +14,7 @@ import { connect } from '@tarojs/redux';
import
{
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
{
updateUserInfo
}
from
'../../store/rootReducers/userinfo'
;
import
{
perfectionUserInfo
}
from
'../../api/customer'
;
import
{
perfectionUserInfo
}
from
'../../api/customer'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
UpdateParams
=
{
type
UpdateParams
=
{
customerId
:
number
;
customerId
:
number
;
...
@@ -80,6 +81,7 @@ class UserSetting extends Component {
...
@@ -80,6 +81,7 @@ class UserSetting extends Component {
studentNo
:
studentNo
?
studentNo
:
''
,
studentNo
:
studentNo
?
studentNo
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
validateSaveForm
():
boolean
{
validateSaveForm
():
boolean
{
const
{
customerName
}
=
this
.
state
;
const
{
customerName
}
=
this
.
state
;
...
...
src/pages/WebPage/WebPage.tsx
View file @
ab50e845
import
{
Component
}
from
'@tarojs/taro'
;
import
{
Component
}
from
'@tarojs/taro'
;
import
{
ComponentClass
}
from
'react'
;
import
{
ComponentClass
}
from
'react'
;
import
{
WebView
}
from
'@tarojs/components'
;
import
{
WebView
}
from
'@tarojs/components'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageState
=
{
type
PageState
=
{
linkUrl
:
string
;
linkUrl
:
string
;
...
@@ -17,6 +18,7 @@ class WebPage extends Component {
...
@@ -17,6 +18,7 @@ class WebPage extends Component {
linkUrl
:
''
,
linkUrl
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
console
.
log
(
this
.
$router
.
params
);
console
.
log
(
this
.
$router
.
params
);
...
...
src/pages/index/index.tsx
View file @
ab50e845
...
@@ -7,6 +7,7 @@ import { connect } from '@tarojs/redux';
...
@@ -7,6 +7,7 @@ import { connect } from '@tarojs/redux';
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
updateUserInfo
,
UserState
}
from
'../../store/rootReducers/userinfo'
;
import
{
appLogin
}
from
'../../api/customer'
;
import
{
appLogin
}
from
'../../api/customer'
;
import
{
shareHandle
}
from
'@/common/shareMethod'
;
type
PageDispatchProps
=
{
type
PageDispatchProps
=
{
updateUserInfo
:
(
e
:
UserState
|
{
token
:
string
})
=>
void
;
updateUserInfo
:
(
e
:
UserState
|
{
token
:
string
})
=>
void
;
...
@@ -42,6 +43,7 @@ class Index extends Component {
...
@@ -42,6 +43,7 @@ class Index extends Component {
errorText
:
''
,
errorText
:
''
,
};
};
}
}
onShareAppMessage
=
shareHandle
;
componentWillMount
()
{
componentWillMount
()
{
Taro
.
showLoading
();
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