Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
c13b30ff
Commit
c13b30ff
authored
Jun 09, 2023
by
小耗子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册
parent
ba8cd802
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
442 additions
and
70 deletions
+442
-70
pages.json
pages.json
+19
-11
pages/h5/bindPh.vue
pages/h5/bindPh.vue
+25
-20
pages/index/defalutScreen.vue
pages/index/defalutScreen.vue
+23
-14
pages/user/enterprise.vue
pages/user/enterprise.vue
+13
-10
pages/user/register/giftPwdReg.vue
pages/user/register/giftPwdReg.vue
+116
-3
pages/user/register/index.vue
pages/user/register/index.vue
+5
-2
pages/user/register/phCodeEmpnoReg.vue
pages/user/register/phCodeEmpnoReg.vue
+105
-3
pages/user/register/pwdCodeNameEmpnoReg.vue
pages/user/register/pwdCodeNameEmpnoReg.vue
+103
-3
shopro/store/modules/user.js
shopro/store/modules/user.js
+26
-4
static/style/common.scss
static/style/common.scss
+7
-0
No files found.
pages.json
View file @
c13b30ff
...
@@ -5,7 +5,16 @@
...
@@ -5,7 +5,16 @@
},
},
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/user/register/index"
,
"name"
:
"register"
,
"style"
:
{
"navigationBarTitleText"
:
"注册"
,
"enablePullDownRefresh"
:
false
}
},{
"path"
:
"pages/index/defalutScreen"
,
"path"
:
"pages/index/defalutScreen"
,
"name"
:
"defalutScreen"
,
"style"
:
"style"
:
{
{
"navigationBarTitleText"
:
"首页"
,
"navigationBarTitleText"
:
"首页"
,
...
@@ -105,15 +114,7 @@
...
@@ -105,15 +114,7 @@
"navigationBarTitleText"
:
"选择企业"
,
"navigationBarTitleText"
:
"选择企业"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},{
}
"path"
:
"pages/user/register/index"
,
"name"
:
"register"
,
"style"
:
{
"navigationBarTitleText"
:
"注册"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"subPackages"
:[],
"subPackages"
:[],
"tabBar"
:
{
"tabBar"
:
{
...
@@ -150,9 +151,16 @@
...
@@ -150,9 +151,16 @@
"condition"
:
{
//模式配置,仅开发期间生效
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
"list"
:
[
//
{
//
"name"
:
"defalutScreen"
,
//模式名称
//
"path"
:
"pages/index/defalutScreen"
,
//启动页面,必选
//
"query"
:
"companyId=999999998"
//
}
{
{
"name"
:
"enterprise"
,
//模式名称
"name"
:
"register"
,
//模式名称
"path"
:
"/pages/user/enterprise"
//启动页面,必选
"path"
:
"pages/user/register/index"
,
//启动页面,必选
"query"
:
"reqisterPageType=3"
}
}
]
]
},
},
...
...
pages/h5/bindPh.vue
View file @
c13b30ff
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
mapGetters
mapGetters
}
from
'
vuex
'
}
from
'
vuex
'
import
http
from
'
@/shopro/request/index
'
;
import
http
from
'
@/shopro/request/index
'
;
import
qs
from
'
qs
'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -26,7 +25,7 @@
...
@@ -26,7 +25,7 @@
}
}
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
getPhoneNumber
'
]),
...
mapActions
([
'
getPhoneNumber
'
,
'
editPhone
'
]),
agreement
(
flag
){
agreement
(
flag
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/public/
${
flag
}
`
,
url
:
`/pages/public/
${
flag
}
`
,
...
@@ -51,24 +50,30 @@
...
@@ -51,24 +50,30 @@
// 获取手机号
// 获取手机号
async
getInfoPhoneNumber
(
e
)
{
async
getInfoPhoneNumber
(
e
)
{
let
ph
=
await
this
.
getPhoneNumber
(
e
);
let
ph
=
await
this
.
getPhoneNumber
(
e
);
http
(
'
user.editPhone
'
,
qs
.
stringify
({
"
mobile
"
:
ph
})).
then
(
res
=>
{
let
res
=
await
this
.
editPhone
(
ph
);
if
(
res
.
code
==
0
)
{
if
(
res
)
{
//跳转
uni
.
showToast
({
uni
.
navigateTo
({
title
:
'
绑定成功
'
,
url
:
`/pages/h5/index?appointPage=
${
this
.
appointPage
}
`
duration
:
2000
,
})
icon
:
'
none
'
}
});
// http('user.editPhone', qs.stringify({"mobile":ph})).then(res => {
uni
.
navigateTo
({
// if(res.code == 0) {
url
:
`/pages/h5/index?appointPage=
${
this
.
appointPage
}
`
// uni.showToast({
})
// title: '绑定成功',
}
else
{
// duration: 2000,
uni
.
showToast
({
// icon:'none'
title
:
res
.
msg
,
// });
duration
:
2000
,
// uni.navigateTo({
icon
:
'
none
'
// url: `/pages/h5/index?appointPage=${this.appointPage}`
});
// })
}
// }else{
})
// uni.showToast({
// title: res.msg,
// duration: 2000,
// icon:'none'
// });
// }
// })
}
}
},
},
...
...
pages/index/defalutScreen.vue
View file @
c13b30ff
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
return
{
return
{
unregistered
:
false
,
unregistered
:
false
,
checkSessionStatus
:
false
,
checkSessionStatus
:
false
,
loading
:
true
loading
:
true
,
companyId
:
""
}
}
},
},
computed
:
{
computed
:
{
...
@@ -49,25 +49,27 @@
...
@@ -49,25 +49,27 @@
this
.
getInfoPhoneNumber
()
this
.
getInfoPhoneNumber
()
}
}
},
},
// 自动注册
async
autoRegister
(
companyId
){
let
register
=
await
this
.
registerInfoFn
(
companyId
);
if
(
register
)
{
//注册成功
this
.
unregistered
=
true
;
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
}
},
// 获取手机号
// 获取手机号
async
getInfoPhoneNumber
(
e
)
{
async
getInfoPhoneNumber
(
e
)
{
let
list
=
await
this
.
enterprise
()
let
list
=
await
this
.
enterprise
()
console
.
log
(
list
)
if
(
list
.
length
==
1
)
{
if
(
list
.
length
==
1
)
{
let
register
=
await
this
.
registerInfoFn
(
list
[
0
].
companyId
);
this
.
autoRegister
(
list
[
0
].
companyId
)
if
(
register
)
{
//注册成功
this
.
unregistered
=
true
;
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
}
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/user/enterprise
'
,
url
:
'
/pages/user/enterprise
'
})
})
}
}
},
},
async
auth
()
{
async
auth
()
{
let
auth
=
await
this
.
authCheck
();
let
auth
=
await
this
.
authCheck
();
console
.
log
(
"
调用authcheck的值
"
+
auth
)
console
.
log
(
"
调用authcheck的值
"
+
auth
)
...
@@ -105,7 +107,7 @@
...
@@ -105,7 +107,7 @@
success
:
function
(
info
)
{
//调用code
success
:
function
(
info
)
{
//调用code
console
.
log
(
"
code000000000000000000000000==========
"
,
info
.
code
)
console
.
log
(
"
code000000000000000000000000==========
"
,
info
.
code
)
that
.
$store
.
commit
(
'
wxCode
'
,
info
.
code
);
//按钮切换全选。
that
.
$store
.
commit
(
'
wxCode
'
,
info
.
code
);
//按钮切换全选。
let
userInfo
=
that
.
getUserInfo
(
info
.
code
);
let
userInfo
=
that
.
getUserInfo
(
info
.
code
,
this
.
companyId
);
userInfo
.
then
(
res
=>
{
userInfo
.
then
(
res
=>
{
that
.
authCheck
().
then
(
checkCode
=>
{
that
.
authCheck
().
then
(
checkCode
=>
{
that
.
loading
=
false
;
that
.
loading
=
false
;
...
@@ -166,6 +168,13 @@
...
@@ -166,6 +168,13 @@
return
{
return
{
path
:
'
pages/index/defalutScreen
'
path
:
'
pages/index/defalutScreen
'
}
}
},
onLoad
(
options
){
if
(
this
.
$Route
.
query
.
companyId
){
this
.
companyId
=
this
.
$Route
.
query
.
companyId
}
else
{
this
.
companyId
=
""
}
}
}
}
}
...
...
pages/user/enterprise.vue
View file @
c13b30ff
...
@@ -59,18 +59,19 @@
...
@@ -59,18 +59,19 @@
},
},
methods
:
{
methods
:
{
...
mapActions
([
'
enterprise
'
,
'
registerInfoFn
'
]),
...
mapActions
([
'
enterprise
'
,
'
registerInfoFn
'
]),
/**
// 选择企业
* 选择企业
*/
async
selectEnterprise
(
item
){
async
selectEnterprise
(
item
){
if
(
item
.
loginType
&&
item
.
mallType
==
0
){
// 0-页面有 手机号+验证码 phCodeReg
// 0-页面有 手机号+验证码 phCode
Reg
// 1-页面有 手机号+验证码+工号 phCodeEmpno
Reg
// 1-页面有 手机号+验证码+工号 phCodeEmpno
Reg
// 3-页面有 礼品卡+密码 giftPwd
Reg
// 3-页面有 礼品卡+密码 giftPwd
Reg
// 4-页面有 手机号验证码+姓名+工号 pwdCodeNameEmpno
Reg
// 4-页面有 手机号验证码+姓名+工号 pwdCodeNameEmpnoReg
if
(
item
.
loginType
&&
item
.
mallType
==
0
){
//需要注册页 && 封闭式
this
.
$Router
.
push
({
path
:
'
/pages/user/register/index
'
,
query
:{
"
reqisterPageType
"
:
item
.
reqisterPageType
}})
this
.
$Router
.
push
({
path
:
'
/pages/user/register/index
'
,
query
:{
"
reqisterPageType
"
:
item
.
reqisterPageType
}})
}
else
{
//不需要注册
}
else
if
(
item
.
loginType
&&
item
.
mallType
==
1
){
let
register
=
await
this
.
reg
isterInfoFn
(
item
.
companyId
);
this
.
$Router
.
push
({
path
:
'
/pages/user/register/index
'
,
query
:{
"
reqisterPageType
"
:
item
.
reqisterPageType
}})
}
else
{
//开放式的代码
let
register
=
await
this
.
registerInfoFn
(
item
.
companyId
)
if
(
register
)
{
//注册成功
if
(
register
)
{
//注册成功
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
url
:
'
/pages/h5/index
'
,
...
@@ -106,6 +107,7 @@
...
@@ -106,6 +107,7 @@
margin-top
:
10rpx
;
margin-top
:
10rpx
;
.enterprise_icon
{
.enterprise_icon
{
width
:
24rpx
;
width
:
24rpx
;
height
:
24rpx
;
margin-right
:
10rpx
;
margin-right
:
10rpx
;
}
}
.tips
{
.tips
{
...
@@ -120,6 +122,7 @@
...
@@ -120,6 +122,7 @@
width
:
50rpx
;
width
:
50rpx
;
.next_icon2
{
.next_icon2
{
width
:
48rpx
;
width
:
48rpx
;
height
:
48rpx
;
}
}
}
}
}
}
...
...
pages/user/register/giftPwdReg.vue
View file @
c13b30ff
<
template
>
<
template
>
<view>
<view
class=
"addressCreate-wrap"
>
礼品卡绑定
<view
class=
"address_info w-bg-color p-l-32 p-r-32 p-t-32 "
>
<u-form
labelPosition=
"left"
:model=
"form"
ref=
"form1"
>
<u-form-item
labelWidth=
"80"
label=
"手机号"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
<view
slot=
"right"
>
<u-button
size=
"mini"
type=
"success"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getInfoPhoneNumber"
>
微信一键授权
</u-button>
</view>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"卡号"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.name"
border=
"none"
placeholder=
"请填写收货人姓名"
></u--input>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"密码"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
</u-form-item>
</u-form>
<u-button
type=
"success"
@
click=
"submit"
>
提交
</u-button>
</view>
</view>
</view>
</
template
>
</
template
>
\ No newline at end of file
<
script
>
// import shPickaddress from '@/components/sh-pickAddress/pickAddress.vue';
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
import
http
from
'
@/shopro/request/index
'
;
export
default
{
components
:
{
// shPickaddress
},
data
()
{
return
{
showSex
:
false
,
params
:
{
name
:
''
,
tel
:
''
,
region
:
''
,
detailRegion
:
''
},
// rules: {
// 'userInfo.name': {
// type: 'string',
// required: true,
// message: '请填写姓名',
// trigger: ['blur', 'change']
// },
// 'userInfo.sex': {
// type: 'string',
// max: 1,
// required: true,
// message: '请选择男或女',
// trigger: ['blur', 'change']
// },
// },
radio
:
''
,
switchVal
:
false
,
filterPopup
:
false
,
//选择地址列表
switchBar
:
true
,
//默认地址开关
}
},
methods
:
{
...
mapActions
([
'
getPhoneNumber
'
,
'
editPhone
'
]),
async
getInfoPhoneNumber
(
e
)
{
let
ph
=
await
this
.
getPhoneNumber
(
e
);
let
res
=
await
this
.
editPhone
(
ph
);
console
.
log
(
res
)
console
.
log
(
ph
)
if
(
res
)
{
//跳转
}
}
},
onLoad
()
{
// 判定是否有手机号
// 无手机号:显示手机号授权,点击注册,提示请先授权
// 有手机号:不显示手机号授权,直接注册
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background
:
#f2f2f2
;
}
.addressCreate-wrap
{
.address_info
{
margin
:
0
auto
;
height
:
370rpx
;
border-radius
:
0
0
26rpx
26rpx
;
}
.default_address
{
height
:
160rpx
;
border-radius
:
26rpx
;
.tipText
{
color
:
#666
;
}
}
.save-btn
{
.btn-h
{
height
:
65rpx
;
}
}
}
::v-deep
.u-form-item__body__left__content__label
,
::v-deep
.uni-input-placeholder
{
font-size
:
14
PX
;
}
</
style
>
pages/user/register/index.vue
View file @
c13b30ff
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
components
:
{
components
:
{
giftPwdReg
,
giftPwdReg
,
phCodeEmpnoReg
,
phCodeEmpnoReg
,
pwdCodeNameEmpnoReg
pwdCodeNameEmpnoReg
},
},
// props:{
// props:{
// reqisterPageType:{
// reqisterPageType:{
...
@@ -27,11 +27,14 @@
...
@@ -27,11 +27,14 @@
// },
// },
data
()
{
data
()
{
return
{
return
{
reqisterPageType
:
this
.
$Route
.
query
.
reqisterPageType
reqisterPageType
:
""
}
}
},
},
methods
:
{
methods
:
{
},
onLoad
(
opt
){
this
.
reqisterPageType
=
this
.
$Route
.
query
.
reqisterPageType
}
}
}
}
</
script
>
</
script
>
...
...
pages/user/register/phCodeEmpnoReg.vue
View file @
c13b30ff
<
template
>
<
template
>
<view>
<view
class=
"addressCreate-wrap"
>
手机号,验证码,工号注册
<view
class=
"address_info w-bg-color p-l-32 p-r-32 p-t-32 "
>
<u-form
labelPosition=
"left"
:model=
"form"
ref=
"form1"
>
<u-form-item
labelWidth=
"80"
label=
"手机号"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
<view
slot=
"right"
>
<u-button
size=
"mini"
type=
"success"
@
click=
"submit"
>
微信一键授权
</u-button>
</view>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"工号/卡号"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.name"
border=
"none"
placeholder=
"请填写收货人姓名"
></u--input>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"姓名"
prop=
"userInfo.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
</u-form-item>
</u-form>
<u-button
type=
"success"
@
click=
"submit"
>
提交
</u-button>
</view>
</view>
</view>
</
template
>
</
template
>
\ No newline at end of file
<
script
>
// import shPickaddress from '@/components/sh-pickAddress/pickAddress.vue';
export
default
{
components
:
{
// shPickaddress
},
data
()
{
return
{
showSex
:
false
,
form
:
{
userInfo
:
{
name
:
''
,
tel
:
''
,
region
:
''
,
detailRegion
:
''
},
},
// rules: {
// 'userInfo.name': {
// type: 'string',
// required: true,
// message: '请填写姓名',
// trigger: ['blur', 'change']
// },
// 'userInfo.sex': {
// type: 'string',
// max: 1,
// required: true,
// message: '请选择男或女',
// trigger: ['blur', 'change']
// },
// },
radio
:
''
,
switchVal
:
false
,
filterPopup
:
false
,
//选择地址列表
switchBar
:
true
,
//默认地址开关
}
},
methods
:
{
selAddress
()
{
this
.
filterPopup
=
true
},
// 选择性别
// sexSelect(e) {
// this.model1.userInfo.sex = e.name
// this.$refs.form1.validateField('userInfo.sex')
// },
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background
:
#f2f2f2
;
}
.addressCreate-wrap
{
.address_info
{
margin
:
0
auto
;
height
:
370rpx
;
border-radius
:
0
0
26rpx
26rpx
;
}
.default_address
{
height
:
160rpx
;
border-radius
:
26rpx
;
.tipText
{
color
:
#666
;
}
}
.save-btn
{
.btn-h
{
height
:
65rpx
;
}
}
}
::v-deep
.u-form-item__body__left__content__label
,
::v-deep
.uni-input-placeholder
{
font-size
:
14
PX
;
}
</
style
>
pages/user/register/pwdCodeNameEmpnoReg.vue
View file @
c13b30ff
<
template
>
<
template
>
<view>
<view
class=
"addressCreate-wrap"
>
手机号,验证码,姓名,工号注册
<view
class=
"address_info w-bg-color p-l-32 p-r-32 p-t-32 "
>
<u-form
labelPosition=
"left"
:model=
"form"
ref=
"form1"
>
<u-form-item
labelWidth=
"80"
label=
"手机号"
prop=
"params.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
<view
slot=
"right"
>
<u-button
size=
"mini"
type=
"success"
@
click=
"submit"
>
微信一键授权
</u-button>
</view>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"工号/卡号"
prop=
"params.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.name"
border=
"none"
placeholder=
"请填写收货人姓名"
></u--input>
</u-form-item>
<u-form-item
labelWidth=
"80"
label=
"姓名"
prop=
"params.name"
borderBottom
ref=
"item1"
>
<u--input
v-model=
"params.tel"
border=
"none"
placeholder=
"请填写收货人手机号"
></u--input>
</u-form-item>
</u-form>
<u-button
type=
"success"
@
click=
"submit"
>
提交
</u-button>
</view>
</view>
</view>
</
template
>
</
template
>
\ No newline at end of file
<
script
>
// import shPickaddress from '@/components/sh-pickAddress/pickAddress.vue';
export
default
{
components
:
{
// shPickaddress
},
data
()
{
return
{
showSex
:
false
,
params
:
{
name
:
''
,
tel
:
''
,
region
:
''
,
detailRegion
:
''
},
// rules: {
// 'params.name': {
// type: 'string',
// required: true,
// message: '请填写姓名',
// trigger: ['blur', 'change']
// },
// 'params.sex': {
// type: 'string',
// max: 1,
// required: true,
// message: '请选择男或女',
// trigger: ['blur', 'change']
// },
// },
radio
:
''
,
switchVal
:
false
,
filterPopup
:
false
,
//选择地址列表
switchBar
:
true
,
//默认地址开关
}
},
methods
:
{
selAddress
()
{
this
.
filterPopup
=
true
},
// 选择性别
// sexSelect(e) {
// this.model1.params.sex = e.name
// this.$refs.form1.validateField('params.sex')
// },
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
background
:
#f2f2f2
;
}
.addressCreate-wrap
{
.address_info
{
margin
:
0
auto
;
height
:
370rpx
;
border-radius
:
0
0
26rpx
26rpx
;
}
.default_address
{
height
:
160rpx
;
border-radius
:
26rpx
;
.tipText
{
color
:
#666
;
}
}
.save-btn
{
.btn-h
{
height
:
65rpx
;
}
}
}
::v-deep
.u-form-item__body__left__content__label
,
::v-deep
.uni-input-placeholder
{
font-size
:
14
PX
;
}
</
style
>
shopro/store/modules/user.js
View file @
c13b30ff
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
MALL_ID
,
MALL_ID
,
COMPANY_ID
COMPANY_ID
}
from
"
@/env
"
;
}
from
"
@/env
"
;
import
qs
from
'
qs
'
;
const
state
=
{
const
state
=
{
mallId
:
MALL_ID
,
mallId
:
MALL_ID
,
sessionkey
:
uni
.
getStorageSync
(
"
sessionkey
"
)
||
""
,
sessionkey
:
uni
.
getStorageSync
(
"
sessionkey
"
)
||
""
,
...
@@ -42,7 +42,7 @@ const actions = {
...
@@ -42,7 +42,7 @@ const actions = {
dispatch
,
dispatch
,
commit
,
commit
,
state
state
},
code
)
{
},
code
,
companyId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
setStorageSync
(
"
mallId
"
,
state
.
mallId
);
uni
.
setStorageSync
(
"
mallId
"
,
state
.
mallId
);
...
@@ -50,10 +50,12 @@ const actions = {
...
@@ -50,10 +50,12 @@ const actions = {
// let code = state.wxCode;
// let code = state.wxCode;
http
(
'
user.getHomePage
'
,
{
http
(
'
user.getHomePage
'
,
{
code
:
code
,
code
:
code
,
mallId
:
state
.
mallId
mallId
:
state
.
mallId
,
companyId
:
companyId
?
companyId
:
""
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
let
{
sessionKey
}
=
res
.
data
;
let
{
sessionKey
}
=
res
.
data
;
console
.
log
(
res
.
data
)
uni
.
setStorageSync
(
"
sessionKey
"
,
sessionKey
)
uni
.
setStorageSync
(
"
sessionKey
"
,
sessionKey
)
commit
(
'
userInfo
'
,
res
.
data
);
commit
(
'
userInfo
'
,
res
.
data
);
let
token
=
encodeURI
(
JSON
.
stringify
(
res
.
data
))
let
token
=
encodeURI
(
JSON
.
stringify
(
res
.
data
))
...
@@ -144,6 +146,27 @@ const actions = {
...
@@ -144,6 +146,27 @@ const actions = {
}
}
})
})
},
},
editPhone
({
commit
},
ph
){
return
new
Promise
((
resolve
,
reject
)
=>
{
http
(
'
user.editPhone
'
,
qs
.
stringify
({
"
mobile
"
:
ph
})).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
title
:
'
绑定成功
'
,
duration
:
2000
,
icon
:
'
none
'
});
resolve
(
1
)
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
duration
:
2000
,
icon
:
'
none
'
});
reject
(
0
);
}
})
})
},
// 注册用户
// 注册用户
registerInfoFn
({
commit
,
state
},
companyId
){
registerInfoFn
({
commit
,
state
},
companyId
){
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -231,7 +254,6 @@ const actions = {
...
@@ -231,7 +254,6 @@ const actions = {
})
})
})
})
}
}
}
}
const
mutations
=
{
const
mutations
=
{
...
...
static/style/common.scss
View file @
c13b30ff
...
@@ -137,3 +137,10 @@ $bg-color:#f0f0f0;//背景底色
...
@@ -137,3 +137,10 @@ $bg-color:#f0f0f0;//背景底色
flex
:
1
;
flex
:
1
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
// form表单样式
.u-form-item
{
padding-left
:
32rpx
;
padding-right
:
32rpx
;
background
:
#e4e7ed
;
margin-bottom
:
20rpx
;
}
\ No newline at end of file
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