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
d5594dd5
Commit
d5594dd5
authored
Jun 06, 2023
by
小耗子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改企业
parent
e5901262
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
40 deletions
+74
-40
env.js
env.js
+1
-1
manifest.json
manifest.json
+1
-1
pages.json
pages.json
+9
-8
pages/index/defalutScreen.vue
pages/index/defalutScreen.vue
+28
-16
shopro/store/modules/user.js
shopro/store/modules/user.js
+35
-14
No files found.
env.js
View file @
d5594dd5
...
...
@@ -10,6 +10,6 @@ export const IMG_URL = 'http://file.shopro.top' //全局网络图片地址变量
export
const
MAP_KEY
=
'
426ebc3f1bbaced***89ee6061a98
'
;
//高德地图开发者Web服务key,逆坐标解析
export
const
HAS_LIVE
=
false
//后台是否开通直播权限,根据情况在manifest.json中,开启注释相应组件的引入,pages.json中打开直播
// http://172.18.1.66:9001/api/a1/mall/homePage/mp?code={前端传入的code}
export
const
MALL_ID
=
"
1
01277511100685
"
;
export
const
MALL_ID
=
"
1
79480211100680
"
;
export
const
COMPANY_ID
=
"
2023053102
"
;
\ No newline at end of file
manifest.json
View file @
d5594dd5
...
...
@@ -54,7 +54,7 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx
bcd69823dff3146
e"
,
"appid"
:
"wx
ebbbc2cc63e9d74
e"
,
"setting"
:
{
"urlCheck"
:
true
,
"minified"
:
false
,
...
...
pages.json
View file @
d5594dd5
...
...
@@ -5,14 +5,6 @@
},
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/user/enterprise"
,
"name"
:
"enterprise"
,
"style"
:
{
"navigationBarTitleText"
:
"选择企业"
,
"enablePullDownRefresh"
:
false
}
},{
"path"
:
"pages/index/defalutScreen"
,
"style"
:
{
...
...
@@ -104,6 +96,15 @@
"navigationBarTitleText"
:
"京东比价"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/user/enterprise"
,
"name"
:
"enterprise"
,
"style"
:
{
"navigationBarTitleText"
:
"选择企业"
,
"enablePullDownRefresh"
:
false
}
}
],
...
...
pages/index/defalutScreen.vue
View file @
d5594dd5
...
...
@@ -10,7 +10,8 @@
<view
class=
"screen-container"
>
<image
class=
"bg"
src=
"../../static/img/screen/screen-bg.png"
mode=
"scaleToFill"
/>
<button
:disabled=
"loading"
@
click=
"enter"
class=
"btn"
>
<!-- :disabled="loading" -->
<button
@
click=
"enter"
class=
"btn"
>
马上进入
</button>
</view>
...
...
@@ -37,26 +38,37 @@
...
mapGetters
([
'
userInfo
'
,
'
todayNum
'
])
},
methods
:
{
...
mapActions
([
'
getPhoneNumber
'
,
'
registerInfoFn
'
,
'
authCheck
'
,
'
getUserInfo
'
]),
...
mapActions
([
'
getPhoneNumber
'
,
'
registerInfoFn
'
,
'
authCheck
'
,
'
getUserInfo
'
,
'
enterprise
'
]),
// 马上进入
enter
()
{
if
(
this
.
unregistered
&&
!
this
.
loading
)
{
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
}
else
{
this
.
getInfoPhoneNumber
()
}},
// if (this.unregistered && !this.loading) {
// uni.navigateTo({
// url: '/pages/h5/index',
// })
// }else{
console
.
log
(
"
x2
"
)
this
.
getInfoPhoneNumber
(
e
)
// }
},
// 获取手机号
async
getInfoPhoneNumber
(
e
)
{
// let number = await this.getPhoneNumber(e);
let
register
=
await
this
.
registerInfoFn
();
if
(
register
)
{
//注册成功
this
.
unregistered
=
true
;
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
console
.
log
(
e
)
let
number
=
await
this
.
getPhoneNumber
(
e
);
let
list
=
await
this
.
enterprise
()
console
.
log
(
list
)
if
(
list
.
length
==
1
)
{
let
register
=
await
this
.
registerInfoFn
(
list
[
0
].
companyId
);
}
else
{
}
// let number = await this.getPhoneNumber(e);
// let register = await this.registerInfoFn();
// if (register) { //注册成功
// this.unregistered = true;
// uni.navigateTo({
// url: '/pages/h5/index',
// })
// }
},
async
auth
()
{
let
auth
=
await
this
.
authCheck
();
...
...
shopro/store/modules/user.js
View file @
d5594dd5
...
...
@@ -18,7 +18,8 @@ const state = {
},
wxCode
:
''
,
todayNum
:
0
,
sessionStatus
:
false
sessionStatus
:
false
,
enterpriseList
:[]
//企业列表
}
const
getters
=
{
...
...
@@ -27,7 +28,9 @@ const getters = {
todayNum
:
state
=>
state
.
todayNum
,
wxCode
:
state
=>
state
.
wxCode
,
sessionStatus
:
state
=>
state
.
sessionStatus
,
mallId
:
state
=>
state
.
mallId
mallId
:
state
=>
state
.
mallId
,
enterpriseList
:
state
=>
state
.
enterpriseList
,
}
const
actions
=
{
...
...
@@ -142,7 +145,7 @@ const actions = {
})
},
// 注册用户
registerInfoFn
({
commit
,
state
},
e
){
registerInfoFn
({
commit
,
state
},
companyId
){
return
new
Promise
((
resolve
,
reject
)
=>
{
// if(!state.registerInfo.mobile){
// uni.showToast({
...
...
@@ -151,18 +154,36 @@ const actions = {
// icon:'none'
// });
// }
http
(
'
user.register
'
,
state
.
registerInfo
).
then
(
res
=>
{
if
(
res
.
code
==
0
||
res
.
code
==
3761
)
{
resolve
(
1
);
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
duration
:
2000
,
icon
:
'
none
'
});
reject
(
res
.
data
);
state
.
registerInfo
.
companyId
=
companyId
conosole
.
log
(
state
.
registerInfo
)
// http('user.register', state.registerInfo).then(res => {
// if (res.code==0||res.code==3761) {
// resolve(1);
// } else{
// uni.showToast({
// title: res.msg,
// duration: 2000,
// icon:'none'
// });
// reject(res.data);
// }
// })
})
},
// 获取企业
enterprise
({
commit
,
state
},
e
){
return
new
Promise
((
resolve
,
reject
)
=>
{
let
that
=
this
;
http
(
'
user.companysList
'
).
then
(
res
=>
{
if
(
!
res
.
code
)
{
this
.
enterpriseList
=
res
.
data
;
resolve
(
this
.
enterpriseList
);
}
else
{
resolve
([]);
this
.
enterpriseList
=
[]
uni
.
showToast
(
res
.
msg
);
}
})
})
;
})
},
// 查询步数
...
...
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