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 {
true
)
}
catch
(
error
)
{
console
.
log
(
error
)
return
Promise
.
reject
()
}
}
...
...
login/lib/index.js
View file @
bdac99b
...
...
@@ -73,7 +73,6 @@ const loginSuccess = () => {
targetPath
}
}
=
wx
.
$router
.
getPageInstance
()
console
.
log
(
targetPath
)
if
(
targetPath
)
{
const
{
url
,
...
...
packagesList/packageDiscovery/components/proDetail/proDetail.wxml
View file @
bdac99b
...
...
@@ -15,7 +15,7 @@
<view class="num" wx:if="{{proDetail.mediaType != '1'}}">{{proDetail.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-tab wx:for="{{proDetail.detailList}}" title="{{item.name}}" wx:key="idnex" />
<!-- <van-tab title="合作案例" />
...
...
packagesList/packageDiscovery/pages/productDetail/productDetail.js
View file @
bdac99b
...
...
@@ -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
=
`id=
${
id
}
&sceneCode=
${
sceneCode
}
&productCode=
${
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
sharephone
}
`
console.log(this.shareQuery, 'onload----')
this.shareAppMessage = {
title:this.shareTitle,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
...
...
@@ -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 = `
id
=
$
{
id
}
&
sceneCode
=
$
{
sceneCode
}
&
productCode
=
$
{
proData
?.
productCode
}
&
isShare
=
$
{
true
}
&
sharephone
=
$
{
phone
}
`
console.log(this.shareQuery, 'onrouter----')
this.shareAppMessage = {
title:this.shareTitle,
path: `
/
$
{
this
.
route
}?
$
{
this
.
shareQuery
}
`,
...
...
@@ -173,7 +171,6 @@ Page({
return new Promise((resolve) => {
let _data;
BusassistantApi.getDiscoverDetail({id}).then((res) => {
console.log(res);
_data = res.data;
resolve(_data);
});
...
...
packagesList/packageDiscovery/pages/videoDetail/videoDetail.js
View file @
bdac99b
...
...
@@ -97,7 +97,6 @@ Page({
},
//接受跳转的路由参数(小程序页面跳转)
async
onRoute
(
options
)
{
console
.
log
(
options
);
if
(
!
options
||
utils
.
isEmptyObj
(
options
)
||
options
.
isShare
)
return
// let { scenIndex, videoList, index, leftMenuIndex = 0 } = options
// options.videoIndex = index
...
...
@@ -134,7 +133,6 @@ Page({
BusassistantApi
.
getDetailWithLike
({
id
}).
then
((
res
)
=>
{
console
.
log
(
res
);
_data
=
res
.
data
;
resolve
(
_data
);
});
...
...
pages/tab/discovery/discovery.js
View file @
bdac99b
...
...
@@ -3,14 +3,20 @@ const navStyle = "background-color: transparent;";
// import { subscriptionBannerUrl, subscriptionSystemData } from './constant/systemData'
// import {scenceList} from "./constant/data"
import
ActivityApi
from
"~/api/activityApi/index"
;
import
{
getActivityRecord
}
from
'~/api/viewprod'
import
{
IMG_VERSION
}
from
"~/utils/constantData"
;
import
{
imgUrlMixin
}
from
"~/mixins/index"
;
import
{
getActivityRecord
}
from
'~/api/viewprod'
import
{
IMG_VERSION
}
from
"~/utils/constantData"
;
import
{
imgUrlMixin
}
from
"~/mixins/index"
;
const
IMG_URL
=
wx
.
$imgUrl
;
let
leftMenuIndex
=
0
Component
({
properties
:{
myTabIdx
:
Number
properties
:
{
myTabIdx
:
Number
},
behaviors
:
[
imgUrlMixin
],
data
:
{
...
...
@@ -35,123 +41,131 @@ Component({
methods
:
{
// 产品点击事件
proClick
(
e
)
{
console
.
log
(
e
.
detail
)
//登录的用户手机号
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
);
const
{
info
,
sceneCode
}
=
e
.
detail
const
{
info
,
sceneCode
}
=
e
.
detail
let
obj
=
{
phone
:
userInfo
.
phone
,
id
:
info
.
id
,
id
:
info
.
id
,
sceneCode
}
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/productDetail/productDetail'
,
obj
)
},
sysMenuClick
(
e
)
{
console
.
log
(
e
);
const
{
id
}
=
e
.
detail
;
leftMenuIndex
=
id
;
const
{
id
}
=
e
.
detail
;
leftMenuIndex
=
id
;
},
// 视频点击事件
videoClick
(
e
)
{
let
userInfo
=
wx
.
$storage
.
get
(
"userInfo"
)
const
{
info
,
sceneCode
}
=
e
.
detail
const
{
info
,
sceneCode
}
=
e
.
detail
const
obj
=
{
phone
:
userInfo
.
phone
,
id
:
info
.
id
,
id
:
info
.
id
,
}
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/videoDetail/videoDetail'
,
obj
)
},
leftClick
(
e
)
{
console
.
log
(
e
.
detail
,
999
)
console
.
log
(
this
.
data
.
resScenceList
)
const
{
sceneid
}
=
e
.
detail
const
idx
=
this
.
data
.
resScenceList
?.
findIndex
(
item
=>
item
.
sceneid
==
sceneid
)
||
0
this
.
setData
({
curTabId
:
sceneid
,
curTabIdx
:
idx
})
const
{
sceneid
}
=
e
.
detail
const
idx
=
this
.
data
.
resScenceList
?.
findIndex
(
item
=>
item
.
sceneid
==
sceneid
)
||
0
this
.
setData
({
curTabId
:
sceneid
,
curTabIdx
:
idx
})
},
senceClick
(
e
)
{
// const { scenIndex } = e.detail
// wx.$router.go('/packageStoreAssistant/packageDiscovery/pages/scenarioDetail/scenarioDetail', {
// actNum: scenIndex
// })
// 如果没有sceneCode,或者没有配置banner跳转 isBannerLink 2-没有配置 1-有配置
if
(
!
e
.
detail
.
sceneCode
||
e
.
detail
.
isBannerLink
!=
1
)
return
const
{
hasPhoneNumber
}
=
this
.
data
// 获取场景
let
systemItem
=
this
.
data
.
systemData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
let
productItem
=
this
.
data
.
productData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
const
id
=
systemItem
?.
productList
[
0
].
id
||
productItem
?.
productList
[
0
].
id
if
(
!
id
)
return
console
.
log
(
123456
)
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/scenarioDetail/scenarioDetail'
,
{
hasPhoneNumber
,
id
,
sceneCode
:
e
.
detail
.
sceneCode
})
// const { scenIndex } = e.detail
// wx.$router.go('/packageStoreAssistant/packageDiscovery/pages/scenarioDetail/scenarioDetail', {
// actNum: scenIndex
// })
// 如果没有sceneCode,或者没有配置banner跳转 isBannerLink 2-没有配置 1-有配置
if
(
!
e
.
detail
.
sceneCode
||
e
.
detail
.
isBannerLink
!=
1
)
return
const
{
hasPhoneNumber
}
=
this
.
data
// 获取场景
let
systemItem
=
this
.
data
.
systemData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
let
productItem
=
this
.
data
.
productData
.
find
(
item
=>
item
.
sceneCode
==
e
.
detail
.
sceneCode
)
const
id
=
systemItem
?.
productList
[
0
].
id
||
productItem
?.
productList
[
0
].
id
if
(
!
id
)
return
wx
.
$router
.
go
(
'/packagesList/packageDiscovery/pages/productDetail/productDetail'
,
{
hasPhoneNumber
,
id
,
sceneCode
:
e
.
detail
.
sceneCode
})
},
activityClick
(
e
)
{
const
id
=
e
.
detail
wx
.
$router
.
go
(
"/packagesList/packageDiscovery/pages/activityDetail/activityDetail"
,
{
id
}
);
},
wx
.
$router
.
go
(
"/packagesList/packageDiscovery/pages/activityDetail/activityDetail"
,
{
id
}
);
},
// 获取全部活动列表
// 获取全部活动列表
getActivityRecord
()
{
getActivityRecord
({}).
then
(({
data
,
code
,
message
})
=>
{
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
,
icon
:
'none'
,
duration
:
2000
})
}
this
.
setData
({
activityList
:
data
})
getActivityRecord
({}).
then
(({
data
,
code
,
message
})
=>
{
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
,
icon
:
'none'
,
duration
:
2000
})
}
this
.
setData
({
activityList
:
data
})
})
},
changeMyTab
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
myTabIdx
:
id
});
},
onLoad
(
option
)
{
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
})
})
// this.setData({
// tabIndex: option?.tabIndex || 0
// })
// this.setData({
// tabIndex: option?.tabIndex || 0
// })
this
.
getActivityRecord
()
},
emitUserInfo
(
options
){
console
.
log
(
options
)
emitUserInfo
(
options
)
{
},
getSceneData
(
list
)
{
console
.
log
(
list
,
'list'
)
const
{
merchantId
}
=
wx
.
$storage
.
get
(
"userInfo"
);
const
{
merchantId
}
=
wx
.
$storage
.
get
(
"userInfo"
);
wx
.
showLoading
({
title
:
"加载中..."
,
});
ActivityApi
.
getOpenSceneList
({
merchantId
,
})
merchantId
,
})
.
then
((
res
)
=>
{
wx
.
hideLoading
();
let
productData
=
[]
if
(
res
.
code
==
21
)
{
if
(
res
.
code
==
21
)
{
wx
.
$router
.
reLaunch
(
'/packageStoreAssistant/packageAuth/pages/authentication/login/login'
)
return
;
}
...
...
@@ -181,22 +195,18 @@ Component({
// ]
// }
let
openList
=
[]
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
status
==
1
)
{
openList
.
push
(
item
.
sceneCode
)
}
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
status
==
1
)
{
openList
.
push
(
item
.
sceneCode
)
}
})
console
.
log
(
openList
,
'openList'
)
productData
=
list
.
filter
(
item
=>
openList
.
includes
(
item
.
sceneCode
))
console
.
log
(
productData
)
productData
=
list
.
filter
(
item
=>
openList
.
includes
(
item
.
sceneCode
))
}
this
.
setData
({
showPage
:
true
,
productData
,
curTabId
:
productData
?.[
this
.
data
.
curTabIdx
]?.
sceneid
||
0
},()
=>
{
console
.
log
(
productData
,
'productData111'
)
});
},
()
=>
{});
})
.
catch
((
err
)
=>
{
this
.
setData
({
...
...
@@ -205,7 +215,9 @@ Component({
});
},
navbarReady
(
e
)
{
let
{
height
}
=
e
.
detail
;
let
{
height
}
=
e
.
detail
;
this
.
setData
({
headerHeight
:
height
,
});
...
...
@@ -216,7 +228,9 @@ Component({
// this.setData({
// navStyle: scrollTop == 0 ? navStyle : `background-color:${color};`
// })
wx
.
$eventbus
.
emit
(
"evt_page_scroll"
,
{
scrollTop
});
wx
.
$eventbus
.
emit
(
"evt_page_scroll"
,
{
scrollTop
});
},
changeSwiper
(
e
)
{
...
...
@@ -228,11 +242,11 @@ Component({
// 跳转咨询页面
goConsult
()
{
wx
.
openCustomerServiceChat
({
extInfo
:
{
url
:
"https://work.weixin.qq.com/kfid/kfcf7b721472201345e"
},
corpId
:
"ww047bdc0f1e76cc13"
,
complete
:
(
r
)
=>
{
console
.
log
(
r
);
extInfo
:
{
url
:
"https://work.weixin.qq.com/kfid/kfcf7b721472201345e"
},
corpId
:
"ww047bdc0f1e76cc13"
,
complete
:
(
r
)
=>
{},
});
},
...
...
@@ -254,4 +268,20 @@ Component({
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
pages/tab/output/output.js
View file @
bdac99b
...
...
@@ -75,7 +75,6 @@ Page({
// 重新刷新
// let { detail } = e || null
// console.log(detail)
console
.
log
(
e
)
if
(
e
)
{
this
.
setUserInfo
()
let
clientModule
=
this
.
selectComponent
(
'#client'
)
...
...
@@ -85,7 +84,7 @@ Page({
// merchantModule.init && merchantModule.init()
}
let
{
isSuper
,
userInfo
}
=
this
.
data
console
.
log
(
isSuper
)
// 判断是超管才需要切换账号
if
(
isSuper
)
{
USERAPI
.
adminSelectLogin
()
...
...
@@ -101,7 +100,6 @@ Page({
item
.
act
=
true
}
})
console
.
log
(
subIndex
)
this
.
setData
({
merchantRange
,
subIndex
...
...
@@ -110,7 +108,6 @@ Page({
.
catch
(
err
=>
{
})
}
else
{
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
console
.
log
(
'merchantRange'
,
merchantRange
)
this
.
setData
({
merchantRange
,
subIndex
:
0
...
...
project.private.config.json
View file @
bdac99b
...
...
@@ -120,7 +120,7 @@
}
},
"setting"
:
{
"urlCheck"
:
fals
e
"urlCheck"
:
tru
e
},
"projectname"
:
"store-assistant-assemble"
}
\ No newline at end of file
utils/request/request.js
View file @
bdac99b
...
...
@@ -23,12 +23,10 @@ class Request {
let
projectName
=
params
.
apiProjectName
||
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
let
path
=
pathEnum
[
projectName
]
console
.
log
(
path
,
11
)
if
(
!
path
)
{
path
=
requestPath
==
'dj'
?
`/rop-dj-
${
projectName
}
/`
:
`/rop-scrm-
${
projectName
}
/`
}
params
=
this
.
getData
(
params
,
requestPath
)
console
.
log
(
domain
,
requestPath
,
9
)
wx
.
request
({
url
:
`
${
domain
[
requestPath
]}${
path
}
router?method=
${
params
.
method
}
`
,
data
:
params
,
...
...
@@ -63,7 +61,6 @@ class Request {
if
(
code
==
'0'
)
{
resolve
(
data
.
data
)
}
else
{
// console.trace(data)
wx
.
showToast
({
title
:
message
||
'网络请求失败'
,
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