Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant-assemble
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bdac99ba
authored
Jun 02, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
20c77e95
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
124 additions
and
107 deletions
api/usersApi/UsersApi.js
login/lib/index.js
packagesList/packageDiscovery/components/proDetail/proDetail.wxml
packagesList/packageDiscovery/pages/productDetail/productDetail.js
packagesList/packageDiscovery/pages/videoDetail/videoDetail.js
pages/tab/discovery/discovery.js
pages/tab/output/output.js
project.private.config.json
utils/request/request.js
api/usersApi/UsersApi.js
View file @
bdac99b
...
@@ -23,7 +23,6 @@ class UsersApi {
...
@@ -23,7 +23,6 @@ class UsersApi {
true
true
)
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
return
Promise
.
reject
()
return
Promise
.
reject
()
}
}
}
}
...
...
login/lib/index.js
View file @
bdac99b
...
@@ -73,7 +73,6 @@ const loginSuccess = () => {
...
@@ -73,7 +73,6 @@ const loginSuccess = () => {
targetPath
targetPath
}
}
}
=
wx
.
$router
.
getPageInstance
()
}
=
wx
.
$router
.
getPageInstance
()
console
.
log
(
targetPath
)
if
(
targetPath
)
{
if
(
targetPath
)
{
const
{
const
{
url
,
url
,
...
...
packagesList/packageDiscovery/components/proDetail/proDetail.wxml
View file @
bdac99b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<view class="num" wx:if="{{proDetail.mediaType != '1'}}">{{proDetail.view}}</view>
<view class="num" wx:if="{{proDetail.mediaType != '1'}}">{{proDetail.view}}</view>
</view>
</view>
</view>
</view>
<view class="tab-wrap calc-wrap">
<view class="tab-wrap calc-wrap"
wx:if="{{proetail.detailList}}"
>
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tabs sticky bind:click="onClickTab" active="{{tabAct}}">
<van-tab wx:for="{{proDetail.detailList}}" title="{{item.name}}" wx:key="idnex" />
<van-tab wx:for="{{proDetail.detailList}}" title="{{item.name}}" wx:key="idnex" />
<!-- <van-tab title="合作案例" />
<!-- <van-tab title="合作案例" />
...
...
packagesList/packageDiscovery/pages/productDetail/productDetail.js
View file @
bdac99b
...
@@ -104,7 +104,6 @@ Page({
...
@@ -104,7 +104,6 @@ Page({
// this.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
// this.shareQuery = `sceneCode=${sceneObj.sceneCode}&productCode=${proInfo?.productCode}&isShare=${true}&productDesc=${proInfo?.productName}&category=${proInfo?.category}&actNum=${actNum}&activeNavIdx=${activeNavIdx}&sharephone=${sharephone}`
this
.
shareQuery
=
`id=
${
id
}
&sceneCode=
${
sceneCode
}
&productCode=
${
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
sharephone
}
`
this
.
shareQuery
=
`id=
${
id
}
&sceneCode=
${
sceneCode
}
&productCode=
${
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
sharephone
}
`
console.log(this.shareQuery, 'onload----')
this.shareAppMessage = {
this.shareAppMessage = {
title:this.shareTitle,
title:this.shareTitle,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
...
@@ -160,7 +159,6 @@ Page({
...
@@ -160,7 +159,6 @@ Page({
// this.shareQuery = `
sceneCode
=
$
{
sceneObj
?.
sceneCode
}
&
productCode
=
$
{
proInfo
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
proInfo
?.
productName
}
&
category
=
$
{
proInfo
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
sharephone
=
$
{
phone
}
`
// this.shareQuery = `
sceneCode
=
$
{
sceneObj
?.
sceneCode
}
&
productCode
=
$
{
proInfo
?.
productCode
}
&
isShare
=
$
{
true
}
&
productDesc
=
$
{
proInfo
?.
productName
}
&
category
=
$
{
proInfo
?.
category
}
&
actNum
=
$
{
actNum
}
&
activeNavIdx
=
$
{
activeNavIdx
}
&
sharephone
=
$
{
phone
}
`
this.shareQuery = `
id
=
$
{
id
}
&
sceneCode
=
$
{
sceneCode
}
&
productCode
=
$
{
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
phone
}
`
this.shareQuery = `
id
=
$
{
id
}
&
sceneCode
=
$
{
sceneCode
}
&
productCode
=
$
{
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
phone
}
`
console.log(this.shareQuery, 'onrouter----')
this.shareAppMessage = {
this.shareAppMessage = {
title:this.shareTitle,
title:this.shareTitle,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
...
@@ -173,7 +171,6 @@ Page({
...
@@ -173,7 +171,6 @@ Page({
return new Promise((resolve) => {
return new Promise((resolve) => {
let _data;
let _data;
BusassistantApi.getDiscoverDetail({id}).then((res) => {
BusassistantApi.getDiscoverDetail({id}).then((res) => {
console.log(res);
_data = res.data;
_data = res.data;
resolve(_data);
resolve(_data);
});
});
...
...
packagesList/packageDiscovery/pages/videoDetail/videoDetail.js
View file @
bdac99b
...
@@ -97,7 +97,6 @@ Page({
...
@@ -97,7 +97,6 @@ Page({
},
},
//接受跳转的路由参数(小程序页面跳转)
//接受跳转的路由参数(小程序页面跳转)
async
onRoute
(
options
)
{
async
onRoute
(
options
)
{
console
.
log
(
options
);
if
(
!
options
||
utils
.
isEmptyObj
(
options
)
||
options
.
isShare
)
return
if
(
!
options
||
utils
.
isEmptyObj
(
options
)
||
options
.
isShare
)
return
// let { scenIndex, videoList, index, leftMenuIndex = 0 } = options
// let { scenIndex, videoList, index, leftMenuIndex = 0 } = options
// options.videoIndex = index
// options.videoIndex = index
...
@@ -134,7 +133,6 @@ Page({
...
@@ -134,7 +133,6 @@ Page({
BusassistantApi
.
getDetailWithLike
({
BusassistantApi
.
getDetailWithLike
({
id
id
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
console
.
log
(
res
);
_data
=
res
.
data
;
_data
=
res
.
data
;
resolve
(
_data
);
resolve
(
_data
);
});
});
...
...
pages/tab/discovery/discovery.js
View file @
bdac99b
...
@@ -3,14 +3,20 @@ const navStyle = "background-color: transparent;";
...
@@ -3,14 +3,20 @@ const navStyle = "background-color: transparent;";
// import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
// import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
// import {scenceList} from "./constant/data"
// import {scenceList} from "./constant/data"
import
ActivityApi
from
"~/api/activityApi/index"
;
import
ActivityApi
from
"~/api/activityApi/index"
;
import
{
getActivityRecord
}
from
'~/api/viewprod'
import
{
import
{
IMG_VERSION
}
from
"~/utils/constantData"
;
getActivityRecord
import
{
imgUrlMixin
}
from
"~/mixins/index"
;
}
from
'~/api/viewprod'
import
{
IMG_VERSION
}
from
"~/utils/constantData"
;
import
{
imgUrlMixin
}
from
"~/mixins/index"
;
const
IMG_URL
=
wx
.
$imgUrl
;
const
IMG_URL
=
wx
.
$imgUrl
;
let
leftMenuIndex
=
0
let
leftMenuIndex
=
0
Component
({
Component
({
properties
:{
properties
:
{
myTabIdx
:
Number
myTabIdx
:
Number
},
},
behaviors
:
[
imgUrlMixin
],
behaviors
:
[
imgUrlMixin
],
data
:
{
data
:
{
...
@@ -35,123 +41,131 @@ Component({
...
@@ -35,123 +41,131 @@ Component({
methods
:
{
methods
:
{
// 产品点击事件
// 产品点击事件
proClick
(
e
)
{
proClick
(
e
)
{
console
.
log
(
e
.
detail
)
//登录的用户手机号
//登录的用户手机号
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
);
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
);
const
{
info
,
sceneCode
}
=
e
.
detail
const
{
info
,
sceneCode
}
=
e
.
detail
let
obj
=
{
let
obj
=
{
phone
:
userInfo
.
phone
,
phone
:
userInfo
.
phone
,
id
:
info
.
id
,
id
:
info
.
id
,
sceneCode
sceneCode
}
}
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/productDetail/productDetail'
,
obj
)
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/productDetail/productDetail'
,
obj
)
},
},
sysMenuClick
(
e
)
{
sysMenuClick
(
e
)
{
console
.
log
(
e
);
const
{
const
{
id
}
=
e
.
detail
;
id
leftMenuIndex
=
id
;
}
=
e
.
detail
;
leftMenuIndex
=
id
;
},
},
// 视频点击事件
// 视频点击事件
videoClick
(
e
)
{
videoClick
(
e
)
{
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
)
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
)
const
{
info
,
sceneCode
}
=
e
.
detail
const
{
info
,
sceneCode
}
=
e
.
detail
const
obj
=
{
const
obj
=
{
phone
:
userInfo
.
phone
,
phone
:
userInfo
.
phone
,
id
:
info
.
id
,
id
:
info
.
id
,
}
}
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/videoDetail/videoDetail'
,
obj
)
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/videoDetail/videoDetail'
,
obj
)
},
},
leftClick
(
e
)
{
leftClick
(
e
)
{
console
.
log
(
e
.
detail
,
999
)
const
{
console
.
log
(
this
.
data
.
resScenceList
)
sceneid
const
{
sceneid
}
=
e
.
detail
}
=
e
.
detail
const
idx
=
this
.
data
.
resScenceList
?.
findIndex
(
item
=>
item
.
sceneid
==
sceneid
)
||
0
const
idx
=
this
.
data
.
resScenceList
?.
findIndex
(
item
=>
item
.
sceneid
==
sceneid
)
||
0
this
.
setData
({
this
.
setData
({
curTabId
:
sceneid
,
curTabId
:
sceneid
,
curTabIdx
:
idx
curTabIdx
:
idx
})
})
},
},
senceClick
(
e
)
{
senceClick
(
e
)
{
// const { scenIndex } = e.detail
// const { scenIndex } = e.detail
// wx.$router.go('/packageStoreAssistant/packageDiscovery/pages/scenarioDetail/scenarioDetail', {
// wx.$router.go('/packageStoreAssistant/packageDiscovery/pages/scenarioDetail/scenarioDetail', {
// actNum: scenIndex
// actNum: scenIndex
// })
// })
// 如果没有sceneCode,或者没有配置banner跳转 isBannerLink 2-没有配置 1-有配置
// 如果没有sceneCode,或者没有配置banner跳转 isBannerLink 2-没有配置 1-有配置
if
(
!
e
.
detail
.
sceneCode
||
e
.
detail
.
isBannerLink
!=
1
)
return
if
(
!
e
.
detail
.
sceneCode
||
e
.
detail
.
isBannerLink
!=
1
)
return
const
{
hasPhoneNumber
}
=
this
.
data
const
{
// 获取场景
hasPhoneNumber
let
systemItem
=
this
.
data
.
systemData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
}
=
this
.
data
let
productItem
=
this
.
data
.
productData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
// 获取场景
const
id
=
systemItem
?.
productList
[
0
].
id
||
productItem
?.
productList
[
0
].
id
let
systemItem
=
this
.
data
.
systemData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
if
(
!
id
)
return
let
productItem
=
this
.
data
.
productData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
console
.
log
(
123456
)
const
id
=
systemItem
?.
productList
[
0
].
id
||
productItem
?.
productList
[
0
].
id
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
id
,
sceneCode
:
e
.
detail
.
sceneCode
})
if
(
!
id
)
return
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/productDetail/productDetail'
,
{
hasPhoneNumber
,
id
,
sceneCode
:
e
.
detail
.
sceneCode
})
},
},
activityClick
(
e
)
{
activityClick
(
e
)
{
const
id
=
e
.
detail
const
id
=
e
.
detail
wx
.
$router
.
go
(
wx
.
$router
.
go
(
"/packagesList/packageDiscovery/pages/activityDetail/activityDetail"
,
"/packagesList/packageDiscovery/pages/activityDetail/activityDetail"
,
{
{
id
}
id
);
}
},
);
},
// 获取全部活动列表
// 获取全部活动列表
getActivityRecord
()
{
getActivityRecord
()
{
getActivityRecord
({}).
then
(({
data
,
code
,
message
})
=>
{
getActivityRecord
({}).
then
(({
if
(
code
==
-
1
)
{
data
,
wx
.
showToast
({
code
,
title
:
message
,
message
icon
:
'none'
,
})
=>
{
duration
:
2000
if
(
code
==
-
1
)
{
})
wx
.
showToast
({
}
title
:
message
,
this
.
setData
({
icon
:
'none'
,
activityList
:
data
duration
:
2000
})
})
}
this
.
setData
({
activityList
:
data
})
})
})
},
},
changeMyTab
(
e
)
{
changeMyTab
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
this
.
setData
({
myTabIdx
:
id
myTabIdx
:
id
});
});
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
const
app
=
getApp
()
// this.setData({
app
.
getBaseData
().
then
(
res
=>
{
// tabIndex: option?.tabIndex || 0
const
productData
=
res
[
0
].
list
// })
const
systemData
=
res
[
1
].
list
this
.
getSceneData
(
productData
)
this
.
setData
({
[
`navList[0]`
]:
res
[
0
].
name
,
[
`navList[1]`
]:
res
[
1
].
name
,
systemData
})
})
// this.setData({
// tabIndex: option?.tabIndex || 0
// })
this
.
getActivityRecord
()
this
.
getActivityRecord
()
},
},
emitUserInfo
(
options
){
emitUserInfo
(
options
)
{
console
.
log
(
options
)
},
},
getSceneData
(
list
)
{
getSceneData
(
list
)
{
console
.
log
(
list
,
'list'
)
const
{
const
{
merchantId
}
=
wx
.
$storage
.
get
(
"userInfo"
);
merchantId
}
=
wx
.
$storage
.
get
(
"userInfo"
);
wx
.
showLoading
({
wx
.
showLoading
({
title
:
"加载中..."
,
title
:
"加载中..."
,
});
});
ActivityApi
.
getOpenSceneList
({
ActivityApi
.
getOpenSceneList
({
merchantId
,
merchantId
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
wx
.
hideLoading
();
wx
.
hideLoading
();
let
productData
=
[]
let
productData
=
[]
if
(
res
.
code
==
21
)
{
if
(
res
.
code
==
21
)
{
wx
.
$router
.
reLaunch
(
'/packageStoreAssistant/packageAuth/pages/authentication/login/login'
)
wx
.
$router
.
reLaunch
(
'/packageStoreAssistant/packageAuth/pages/authentication/login/login'
)
return
;
return
;
}
}
...
@@ -181,22 +195,18 @@ Component({
...
@@ -181,22 +195,18 @@ Component({
// ]
// ]
// }
// }
let
openList
=
[]
let
openList
=
[]
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
status
==
1
)
{
if
(
item
.
status
==
1
)
{
openList
.
push
(
item
.
sceneCode
)
openList
.
push
(
item
.
sceneCode
)
}
}
})
})
console
.
log
(
openList
,
'openList'
)
productData
=
list
.
filter
(
item
=>
openList
.
includes
(
item
.
sceneCode
))
productData
=
list
.
filter
(
item
=>
openList
.
includes
(
item
.
sceneCode
))
console
.
log
(
productData
)
}
}
this
.
setData
({
this
.
setData
({
showPage
:
true
,
showPage
:
true
,
productData
,
productData
,
curTabId
:
productData
?.[
this
.
data
.
curTabIdx
]?.
sceneid
||
0
curTabId
:
productData
?.[
this
.
data
.
curTabIdx
]?.
sceneid
||
0
},()
=>
{
},
()
=>
{});
console
.
log
(
productData
,
'productData111'
)
});
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
setData
({
this
.
setData
({
...
@@ -205,7 +215,9 @@ Component({
...
@@ -205,7 +215,9 @@ Component({
});
});
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
height
}
=
e
.
detail
;
let
{
height
}
=
e
.
detail
;
this
.
setData
({
this
.
setData
({
headerHeight
:
height
,
headerHeight
:
height
,
});
});
...
@@ -216,7 +228,9 @@ Component({
...
@@ -216,7 +228,9 @@ Component({
// this.setData({
// this.setData({
// navStyle: scrollTop == 0 ? navStyle : `background-color:${color};`
// navStyle: scrollTop == 0 ? navStyle : `background-color:${color};`
// })
// })
wx
.
$eventbus
.
emit
(
"evt_page_scroll"
,
{
scrollTop
});
wx
.
$eventbus
.
emit
(
"evt_page_scroll"
,
{
scrollTop
});
},
},
changeSwiper
(
e
)
{
changeSwiper
(
e
)
{
...
@@ -228,11 +242,11 @@ Component({
...
@@ -228,11 +242,11 @@ Component({
// 跳转咨询页面
// 跳转咨询页面
goConsult
()
{
goConsult
()
{
wx
.
openCustomerServiceChat
({
wx
.
openCustomerServiceChat
({
extInfo
:
{
url
:
"https://work.weixin.qq.com/kfid/kfcf7b721472201345e"
},
extInfo
:
{
corpId
:
"ww047bdc0f1e76cc13"
,
url
:
"https://work.weixin.qq.com/kfid/kfcf7b721472201345e"
complete
:
(
r
)
=>
{
console
.
log
(
r
);
},
},
corpId
:
"ww047bdc0f1e76cc13"
,
complete
:
(
r
)
=>
{},
});
});
},
},
...
@@ -254,4 +268,20 @@ Component({
...
@@ -254,4 +268,20 @@ Component({
isFullSucreen
:
wx
.
$api
.
isFullSucreen
(),
isFullSucreen
:
wx
.
$api
.
isFullSucreen
(),
});
});
},
},
});
pageLifetimes
:
{
show
()
{
const
app
=
getApp
()
app
.
getBaseData
().
then
(
res
=>
{
const
productData
=
res
[
0
].
list
const
systemData
=
res
[
1
].
list
this
.
getSceneData
(
productData
)
this
.
setData
({
[
'navList[0]'
]:
res
[
0
].
name
,
[
'navList[1]'
]:
res
[
1
].
name
,
systemData
})
})
}
}
});
\ No newline at end of file
\ No newline at end of file
pages/tab/output/output.js
View file @
bdac99b
...
@@ -75,7 +75,6 @@ Page({
...
@@ -75,7 +75,6 @@ Page({
// 重新刷新
// 重新刷新
// let { detail } = e || null
// let { detail } = e || null
// console.log(detail)
// console.log(detail)
console
.
log
(
e
)
if
(
e
)
{
if
(
e
)
{
this
.
setUserInfo
()
this
.
setUserInfo
()
let
clientModule
=
this
.
selectComponent
(
'#client'
)
let
clientModule
=
this
.
selectComponent
(
'#client'
)
...
@@ -85,7 +84,7 @@ Page({
...
@@ -85,7 +84,7 @@ Page({
// merchantModule.init && merchantModule.init()
// merchantModule.init && merchantModule.init()
}
}
let
{
isSuper
,
userInfo
}
=
this
.
data
let
{
isSuper
,
userInfo
}
=
this
.
data
console
.
log
(
isSuper
)
// 判断是超管才需要切换账号
// 判断是超管才需要切换账号
if
(
isSuper
)
{
if
(
isSuper
)
{
USERAPI
.
adminSelectLogin
()
USERAPI
.
adminSelectLogin
()
...
@@ -101,7 +100,6 @@ Page({
...
@@ -101,7 +100,6 @@ Page({
item
.
act
=
true
item
.
act
=
true
}
}
})
})
console
.
log
(
subIndex
)
this
.
setData
({
this
.
setData
({
merchantRange
,
merchantRange
,
subIndex
subIndex
...
@@ -110,7 +108,6 @@ Page({
...
@@ -110,7 +108,6 @@ Page({
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
})
}
else
{
}
else
{
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
console
.
log
(
'merchantRange'
,
merchantRange
)
this
.
setData
({
this
.
setData
({
merchantRange
,
merchantRange
,
subIndex
:
0
subIndex
:
0
...
...
project.private.config.json
View file @
bdac99b
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
}
}
},
},
"setting"
:
{
"setting"
:
{
"urlCheck"
:
fals
e
"urlCheck"
:
tru
e
},
},
"projectname"
:
"store-assistant-assemble"
"projectname"
:
"store-assistant-assemble"
}
}
\ No newline at end of file
\ No newline at end of file
utils/request/request.js
View file @
bdac99b
...
@@ -23,12 +23,10 @@ class Request {
...
@@ -23,12 +23,10 @@ class Request {
let
projectName
=
params
.
apiProjectName
||
this
.
getRopProject
(
params
.
method
)
let
projectName
=
params
.
apiProjectName
||
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
let
path
=
pathEnum
[
projectName
]
let
path
=
pathEnum
[
projectName
]
console
.
log
(
path
,
11
)
if
(
!
path
)
{
if
(
!
path
)
{
path
=
requestPath
==
'dj'
?
`/rop-dj-
${
projectName
}
/`
:
`/rop-scrm-
${
projectName
}
/`
path
=
requestPath
==
'dj'
?
`/rop-dj-
${
projectName
}
/`
:
`/rop-scrm-
${
projectName
}
/`
}
}
params
=
this
.
getData
(
params
,
requestPath
)
params
=
this
.
getData
(
params
,
requestPath
)
console
.
log
(
domain
,
requestPath
,
9
)
wx
.
request
({
wx
.
request
({
url
:
`
${
domain
[
requestPath
]}${
path
}
router?method=
${
params
.
method
}
`
,
url
:
`
${
domain
[
requestPath
]}${
path
}
router?method=
${
params
.
method
}
`
,
data
:
params
,
data
:
params
,
...
@@ -63,7 +61,6 @@ class Request {
...
@@ -63,7 +61,6 @@ class Request {
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
resolve
(
data
.
data
)
resolve
(
data
.
data
)
}
else
{
}
else
{
// console.trace(data)
wx
.
showToast
({
wx
.
showToast
({
title
:
message
||
'网络请求失败'
,
title
:
message
||
'网络请求失败'
,
icon
:
'none'
icon
:
'none'
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment