Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
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
高淑倩
7-Eleven
Commits
a942a3da
Commit
a942a3da
authored
Dec 03, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购优化
parent
4f37527b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
2560 additions
and
232 deletions
+2560
-232
app.js
src/app.js
+3
-3
app.json
src/app.json
+6
-3
contactUsModal.js
src/component/contactUsModal/contactUsModal.js
+28
-0
contactUsModal.json
src/component/contactUsModal/contactUsModal.json
+5
-0
contactUsModal.wxml
src/component/contactUsModal/contactUsModal.wxml
+13
-0
contactUsModal.wxss
src/component/contactUsModal/contactUsModal.wxss
+69
-0
index.js
src/config/index.js
+1
-1
userCenter.js
src/pages/userCenter/userCenter.js
+20
-1
userCenter.json
src/pages/userCenter/userCenter.json
+1
-0
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+3
-0
project.config.json
src/project.config.json
+28
-7
tabBar.js
src/shoppingGuid/component/tabBar/tabBar.js
+16
-10
tabBar.wxml
src/shoppingGuid/component/tabBar/tabBar.wxml
+19
-0
tabBar.wxss
src/shoppingGuid/component/tabBar/tabBar.wxss
+33
-2
achievement.json
src/shoppingGuid/page/pages/achievement/achievement.json
+1
-1
achievement.wxml
src/shoppingGuid/page/pages/achievement/achievement.wxml
+1
-1
college.js
src/shoppingGuid/page/pages/college/college.js
+291
-0
college.json
src/shoppingGuid/page/pages/college/college.json
+8
-0
college.wxml
src/shoppingGuid/page/pages/college/college.wxml
+65
-0
college.wxss
src/shoppingGuid/page/pages/college/college.wxss
+390
-0
couponQrcode.wxss
src/shoppingGuid/page/pages/couponQrcode/couponQrcode.wxss
+0
-0
home.js
src/shoppingGuid/page/pages/home/home.js
+102
-12
home.wxml
src/shoppingGuid/page/pages/home/home.wxml
+152
-49
home.wxss
src/shoppingGuid/page/pages/home/home.wxss
+0
-0
kpi.json
src/shoppingGuid/page/pages/kpi/kpi.json
+1
-1
kpi.wxss
src/shoppingGuid/page/pages/kpi/kpi.wxss
+14
-11
moreCoupons.js
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.js
+257
-0
moreCoupons.json
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.json
+6
-0
moreCoupons.wxml
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.wxml
+57
-0
moreCoupons.wxss
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.wxss
+290
-0
moreProducts.js
src/shoppingGuid/page/pages/moreProducts/moreProducts.js
+221
-0
moreProducts.json
src/shoppingGuid/page/pages/moreProducts/moreProducts.json
+6
-0
moreProducts.wxml
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxml
+61
-0
moreProducts.wxss
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxss
+251
-0
myMemberList.js
src/shoppingGuid/page/pages/myMemberList/myMemberList.js
+4
-6
myMemberList.wxss
src/shoppingGuid/page/pages/myMemberList/myMemberList.wxss
+1
-3
selectUsers.json
src/shoppingGuid/page/pages/selectUsers/selectUsers.json
+2
-1
selectUsers.wxss
src/shoppingGuid/page/pages/selectUsers/selectUsers.wxss
+11
-7
welfare.json
src/shoppingGuid/page/pages/welfare/welfare.json
+1
-1
welfare.wxml
src/shoppingGuid/page/pages/welfare/welfare.wxml
+118
-108
welfare.wxss
src/shoppingGuid/page/pages/welfare/welfare.wxss
+0
-0
Http.js
src/utils/Http.js
+4
-4
No files found.
src/app.js
View file @
a942a3da
...
...
@@ -118,7 +118,7 @@ App({
systemInfo
:
wx
.
getSystemInfoSync
(),
ctx
:
envInfo
.
ctx
,
openCard
:
false
,
appId
:
'wx
ac09792264c49b5c
'
,
appId
:
'wx
c3b64b09b1d3dfc2
'
,
userNo
:
null
,
storeId
:
''
,
storeName
:
''
,
...
...
@@ -131,8 +131,8 @@ App({
cityJson
:
cityJson
,
// brandId: 2711,
// brandId: 2005,
//
brandId: 1001,
brandId
:
1002
,
brandId
:
1001
,
//
brandId: 1002,
// brandId: 3001,
// brandId: 3002,
}
...
...
src/app.json
View file @
a942a3da
...
...
@@ -36,8 +36,8 @@
"pages/shopping/home/home"
,
"pages/shopping/kpi/kpi"
,
"pages/shopping/welfare/welfare"
,
"pages/shopping/performance/performance"
"pages/shopping/performance/performance"
,
"component/contactUsModal/contactUsModal"
],
"subPackages"
:
[
{
...
...
@@ -72,6 +72,7 @@
"pages/home/home"
,
"pages/kpi/kpi"
,
"pages/achievement/achievement"
,
"pages/college/college"
,
"pages/welfare/welfare"
,
"pages/saleTaskInfo/saleTaskInfo"
,
"pages/enlistInfo/enlistInfo"
,
...
...
@@ -83,7 +84,9 @@
"pages/couponQrcode/couponQrcode"
,
"pages/welcomGuider/welcomGuider"
,
"pages/taskNotice/taskNotice"
,
"pages/myMemberList/myMemberList"
"pages/myMemberList/myMemberList"
,
"pages/moreCoupons/moreCoupons"
,
"pages/moreProducts/moreProducts"
]
}
],
...
...
src/component/contactUsModal/contactUsModal.js
0 → 100644
View file @
a942a3da
// component/contactUsModal/contactUsModal.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
contactShow
:
Boolean
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
//关闭
onTapClose
(){
this
.
setData
({
contactShow
:
false
});
}
}
})
src/component/contactUsModal/contactUsModal.json
0 → 100644
View file @
a942a3da
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/component/contactUsModal/contactUsModal.wxml
0 → 100644
View file @
a942a3da
<!--component/contactUsModal/contactUsModal.wxml-->
<view class='contact-us-modal' wx:if='{{contactShow}}'>
<view class='top-back'>
<label>退出小程序</label>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_back_wx.png' mode='aspectFit'></image>
</view>
<view style='margin-bottom:15rpx;'>在<label style='color:#FA6400;'>服务通知</label>中添加企业微信工作人员</view>
<view class='contact'>咨询更多服务哦!</view>
<view class='gif'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon_qiwei_guide.gif' mode='aspectFit'></image>
</view>
<view class='ikonw' bindtap='onTapClose'>知道了</view>
</view>
src/component/contactUsModal/contactUsModal.wxss
0 → 100644
View file @
a942a3da
/* component/contactUsModal/contactUsModal.wxss */
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.contact-us-modal{
position: fixed;
background-color: rgba(0, 0, 0, 0.65);
left: 0;
top: 0;
width: 100vw;
height: 100vh;
z-index: 9999;
display: flex;
flex-direction: column;
color: #ffffff;
padding: 40rpx;
align-items: center;
justify-content: center;
font-size: 24rpx;
}
.contact-us-modal .top-back{
flex: 0;
min-height: 80rpx;
max-height: 80rpx;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.contact-us-modal .top-back image{
height: 50rpx;
width: 180rpx;
}
.contact-us-modal .gif{
flex: 1;
width: 65vw;
}
.contact-us-modal .gif image{
width: 100%;
height: 100%;
}
.contact-us-modal .contact{
color:#FFF55B;
font-weight:bold;
font-size:28rpx;
margin-bottom: 30rpx;
}
.contact-us-modal .ikonw{
flex: 0;
min-height: 80rpx;
max-height: 80rpx;
width: 260rpx;
border: solid 1px #ffffff;
border-radius: 40rpx;
margin-top: 40rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
src/config/index.js
View file @
a942a3da
...
...
@@ -5,7 +5,7 @@
// 组件plus 中数据请求 token 修改
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
test
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
PROJECT_ENV
=
'
dev
'
// 生产 prod, 开发 dev, 测试 test, 预生产 pre
const
needMock
=
''
//
// appid_dev_wx wxc3b64b09b1d3dfc2
...
...
src/pages/userCenter/userCenter.js
View file @
a942a3da
...
...
@@ -37,6 +37,7 @@ wxService.page({
isQiye
:
false
,
x
:
0
,
y
:
0
,
contactUsModal
:
false
},
/**
* 生命周期函数--监听页面加载
...
...
@@ -84,7 +85,25 @@ wxService.page({
console
.
log
(
'联系我插件信息startmessage----'
,
e
)
},
completemessage
(
e
){
console
.
log
(
'联系我插件信息completemessage----'
,
e
)
let
ret
=
e
.
detail
;
console
.
log
(
'联系我插件信息completemessage----'
,
ret
)
if
(
ret
.
errcode
==
-
3002
||
ret
.
errcode
==
-
3004
||
ret
.
errcode
==
-
3005
)
{
wx
.
showToast
({
title
:
'联系失败,请联系管理员'
,
icon
:
'none'
});
}
else
if
(
ret
.
errcode
==
-
3008
){
wx
.
showToast
({
title
:
'暂无客服人员'
,
icon
:
'none'
});
}
else
{
this
.
setData
({
contactUsModal
:
true
,
});
}
},
// 获取邀请奖励图片
getShareImg
()
{
...
...
src/pages/userCenter/userCenter.json
View file @
a942a3da
...
...
@@ -3,6 +3,7 @@
"usingComponents"
:
{
"image-swiper"
:
"/component/imageSwiper/imageSwiper"
,
"person-center"
:
"/component/personCenter/personCenter"
,
"contact-us-modal"
:
"/component/contactUsModal/contactUsModal"
,
"pic-nav"
:
"/component/picNav/picNav"
,
"bottom"
:
"/component/bottom/bottom"
,
"tab-sort"
:
"/component/tabSort/tabSort"
,
...
...
src/pages/userCenter/userCenter.wxml
View file @
a942a3da
...
...
@@ -59,3 +59,5 @@
bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' />
</view>
<!-- 联系我点击成功之后的回调 -->
<contact-us-modal contactShow="{{contactUsModal}}"/>
\ No newline at end of file
src/project.config.json
View file @
a942a3da
...
...
@@ -13,7 +13,7 @@
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.8.2"
,
"appid"
:
"wx
ac09792264c49b5c
"
,
"appid"
:
"wx
c3b64b09b1d3dfc2
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
64
,
"current"
:
46
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -349,10 +349,11 @@
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"
KPI
"
,
"id"
:
46
,
"name"
:
"
招募(任务中心)
"
,
"pathName"
:
"shoppingGuid/page/pages/kpi/kpi"
,
"query"
:
""
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
...
...
@@ -361,8 +362,8 @@
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"
福利
"
,
"id"
:
48
,
"name"
:
"
营销
"
,
"pathName"
:
"shoppingGuid/page/pages/welfare/welfare"
,
"query"
:
""
,
"scene"
:
null
...
...
@@ -468,6 +469,26 @@
"name"
:
"填写兑换地址"
,
"pathName"
:
"subPackage/page/pages/exchangeAddress/exchangeAddress"
,
"query"
:
"type=1"
},
{
"id"
:
-1
,
"name"
:
"导购学院"
,
"pathName"
:
"shoppingGuid/page/pages/college/college"
,
"query"
:
""
},
{
"id"
:
-1
,
"name"
:
"更多优惠券"
,
"pathName"
:
"shoppingGuid/page/pages/moreCoupons/moreCoupons"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"更多商品"
,
"pathName"
:
"shoppingGuid/page/pages/moreProducts/moreProducts"
,
"query"
:
""
,
"scene"
:
null
}
]
}
...
...
src/shoppingGuid/component/tabBar/tabBar.js
View file @
a942a3da
...
...
@@ -34,27 +34,33 @@ Component({
data
:
{
tabBar
:
[
{
activeUrl
:
'
/assets/imgs/shoppingGuide/home_active
.png'
,
pageUrl
:
'/shoppingGuid/page/pages/
home/hom
e'
,
defaultUrl
:
'
/assets/imgs/shoppingGuide/home_default
.png'
,
isActive
:
tru
e
activeUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_01_a
.png'
,
pageUrl
:
'/shoppingGuid/page/pages/
college/colleg
e'
,
defaultUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_01_d
.png'
,
isActive
:
fals
e
},
{
activeUrl
:
'
/assets/imgs/shoppingGuide/kpi_active
.png'
,
activeUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_a
.png'
,
pageUrl
:
'/shoppingGuid/page/pages/kpi/kpi'
,
defaultUrl
:
'
/assets/imgs/shoppingGuide/kpi_default
.png'
,
defaultUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_02_d
.png'
,
isActive
:
false
},
{
activeUrl
:
'/assets/imgs/shoppingGuide/welfare_active.png'
,
activeUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_03_a.png'
,
pageUrl
:
'/shoppingGuid/page/pages/home/home'
,
defaultUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_03_d.png'
,
isActive
:
true
},
{
activeUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_04_a.png'
,
pageUrl
:
'/shoppingGuid/page/pages/welfare/welfare'
,
defaultUrl
:
'
/assets/imgs/shoppingGuide/welfare_default
.png'
,
defaultUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_04_d
.png'
,
isActive
:
false
},
{
activeUrl
:
'
/assets/imgs/shoppingGuide/achievement_active
.png'
,
activeUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_05_a
.png'
,
pageUrl
:
'/shoppingGuid/page/pages/achievement/achievement'
,
defaultUrl
:
'
/assets/imgs/shoppingGuide/achievement_default
.png'
,
defaultUrl
:
'
https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/tab_bar_05_d
.png'
,
isActive
:
false
},
]
...
...
src/shoppingGuid/component/tabBar/tabBar.wxml
View file @
a942a3da
...
...
@@ -2,6 +2,20 @@
<!-- <cover-view class='bottom-container'>
</cover-view> -->
<!-- <view class='bottom-tab-bar'>
<view class='tab-bar-item'
bindtap='onTapToPage'
wx:key="tabkey"
wx:for="{{tabBar}}"
wx:for-index="idx"
data-index="{{idx}}"
data-item="{{item}}"
wx:for-item="item">
<image src='{{item.isActive ? item.activeUrl : item.defaultUrl}}' mode='widthFix'></image>
</view>
</view> -->
<!-- 新的tab bar -->
<view class='bottom-tab-bar'>
<view class='tab-bar-item'
bindtap='onTapToPage'
...
...
@@ -11,6 +25,10 @@
data-index="{{idx}}"
data-item="{{item}}"
wx:for-item="item">
<view class='out' wx:if="{{idx == 2}}">
<image src='{{item.isActive ? item.activeUrl : item.defaultUrl}}' mode='widthFix'></image>
</view>
<view class='hover' wx:if="{{idx == 2}}"></view>
<image wx:if="{{idx != 2}}" src='{{item.isActive ? item.activeUrl : item.defaultUrl}}' mode='widthFix'></image>
</view>
</view>
\ No newline at end of file
src/shoppingGuid/component/tabBar/tabBar.wxss
View file @
a942a3da
/* subPackage/component/tabBar/tabBar.wxss */
page{
background: rgba(0, 0, 0, 0.04);
}
.bottom-tab-bar{
position: fixed;
bottom: 0;
...
...
@@ -13,14 +16,41 @@
.bottom-tab-bar .tab-bar-item{
flex: 0;
min-width: 2
5
%;
max-width: 2
5
%;
min-width: 2
0
%;
max-width: 2
0
%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.bottom-tab-bar .tab-bar-item image{
width: 100rpx;
}
.out{
position: absolute;
top: -30rpx;
background: #ffffff;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
padding: 10rpx;
border-top: solid 1px #ddd;
}
.out image{
width: 100rpx;
z-index: 2;
position: absolute;
}
.hover{
position: absolute;
top: 0;
background: #ffffff;
width: 100%;
height: 100%;
padding: 10rpx;
}
\ No newline at end of file
src/shoppingGuid/page/pages/achievement/achievement.json
View file @
a942a3da
{
"navigationBarTitleText"
:
"
业绩
"
,
"navigationBarTitleText"
:
"
我的
"
,
"usingComponents"
:
{
"tab-bar"
:
"../../../component/tabBar/tabBar"
}
...
...
src/shoppingGuid/page/pages/achievement/achievement.wxml
View file @
a942a3da
...
...
@@ -87,4 +87,4 @@
</view>
<!-- tabbar -->
<tab-bar index="{{
3
}}"></tab-bar>
<tab-bar index="{{
4
}}"></tab-bar>
src/shoppingGuid/page/pages/college/college.js
0 → 100644
View file @
a942a3da
// shoppingGuid/page/pages/welfare/welfare.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
var
app
=
getApp
()
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
navBar
:
[
{
name
:
'活动助手'
,
type
:
1
,
isActive
:
true
},
{
name
:
'品牌营销'
,
type
:
2
,
isActive
:
false
},
{
name
:
'产品素材'
,
type
:
3
,
isActive
:
false
},
],
current
:
1
,
guidCollege
:
{
pageSize
:
10
,
pageNum
:
1
,
totalPage
:
0
,
list
:
[],
currentPage
:
1
,
noData
:
false
,
},
//品牌营销
brandPromotions
:
{
pageSize
:
10
,
pageNum
:
1
,
totalPage
:
0
,
list
:
[],
currentPage
:
1
,
noData
:
false
,
},
brandPromotionsNoData
:
false
,
//产品素材
productFiles
:
{
pageSize
:
10
,
pageNum
:
1
,
totalPage
:
0
,
list
:
[],
currentPage
:
1
,
noData
:
false
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
//首次进来先加载导购学院的列表
this
.
getGuidCollegeList
();
wx
.
hideShareMenu
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
//点击事件
//分类点击
onTopBarTap
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
,
item
=
e
.
currentTarget
.
dataset
.
item
;
this
.
data
.
navBar
.
forEach
(
nav
=>
{
nav
.
isActive
=
false
;
});
this
.
data
.
navBar
[
index
].
isActive
=
true
;
this
.
data
.
current
=
this
.
data
.
navBar
[
index
].
type
;
// tab 切换时 如果发现对应的列表没有加载过,则去加载
if
(
this
.
data
.
current
==
1
)
{
if
(
this
.
data
.
guidCollege
.
list
.
length
==
0
)
{
this
.
getGuidCollegeList
();
}
}
else
if
(
this
.
data
.
current
==
2
)
{
if
(
this
.
data
.
brandPromotions
.
list
.
length
==
0
){
this
.
getBrandPromotionList
();
}
}
else
if
(
this
.
data
.
current
==
3
)
{
if
(
this
.
data
.
productFiles
.
list
.
length
==
0
){
this
.
getProductFiles
();
}
}
this
.
setData
({
navBar
:
this
.
data
.
navBar
,
current
:
this
.
data
.
current
});
},
//跳转导购学院详情
onTapToGuidCollegeInfo
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
id
=
item
.
id
;
wx
.
navigateTo
({
url
:
'/shoppingGuid/page/pages/guidCollegeInfo/guidCollegeInfo?id='
+
id
,
});
},
//去商城
onTapToMall
()
{
wx
.
redirectTo
({
url
:
'/pages/userCenter/userCenter'
,
})
},
//获取导购学院列表
getGuidCollegeList
(
refresh
)
{
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
let
pageSize
=
this
.
data
.
guidCollege
.
pageSize
,
pageNum
=
this
.
data
.
guidCollege
.
pageNum
;
wxService
.
post
(
`/merchant/guideCollege/getPageInfoListC?pageSize=
${
pageSize
}
&pageNum=
${
pageNum
}
`
,
{
title
:
''
,
type
:
1
}).
then
(
res
=>
{
if
(
res
)
{
wx
.
hideLoading
();
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
this
.
data
.
guidCollege
.
list
=
this
.
data
.
guidCollege
.
list
.
concat
(
data
.
content
);
this
.
data
.
guidCollege
.
totalPage
=
data
.
totalPages
;
if
(
this
.
data
.
guidCollege
.
list
.
length
==
0
)
{
this
.
data
.
guidCollege
.
noData
=
true
;
}
this
.
setData
({
guidCollege
:
this
.
data
.
guidCollege
});
if
(
refresh
){
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
stopPullDownRefresh
();
}
}
}
})
},
//获取品牌营销列表
getBrandPromotionList
(
refresh
){
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
let
pageSize
=
this
.
data
.
brandPromotions
.
pageSize
,
pageNum
=
this
.
data
.
brandPromotions
.
pageNum
;
wxService
.
post
(
`/merchant/guideCollege/getPageInfoListC?pageSize=
${
pageSize
}
&pageNum=
${
pageNum
}
`
,
{
title
:
''
,
type
:
2
}).
then
(
res
=>
{
if
(
res
)
{
wx
.
hideLoading
();
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
this
.
data
.
brandPromotions
.
list
=
this
.
data
.
brandPromotions
.
list
.
concat
(
data
.
content
);
this
.
data
.
brandPromotions
.
totalPage
=
data
.
totalPages
;
if
(
this
.
data
.
brandPromotions
.
list
.
length
==
0
)
{
this
.
data
.
brandPromotions
.
noData
=
true
;
}
this
.
setData
({
brandPromotions
:
this
.
data
.
brandPromotions
});
if
(
refresh
)
{
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
stopPullDownRefresh
();
}
}
}
});
},
//获取产品素材列表
getProductFiles
(
refresh
){
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
let
pageSize
=
this
.
data
.
productFiles
.
pageSize
,
pageNum
=
this
.
data
.
productFiles
.
pageNum
;
wxService
.
post
(
`/merchant/guideCollege/getPageInfoListC?pageSize=
${
pageSize
}
&pageNum=
${
pageNum
}
`
,
{
title
:
''
,
type
:
3
}).
then
(
res
=>
{
if
(
res
)
{
wx
.
hideLoading
();
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
this
.
data
.
productFiles
.
list
=
this
.
data
.
productFiles
.
list
.
concat
(
data
.
content
);
this
.
data
.
productFiles
.
totalPage
=
data
.
totalPages
;
if
(
this
.
data
.
productFiles
.
list
.
length
==
0
)
{
this
.
data
.
productFiles
.
noData
=
true
;
}
this
.
setData
({
productFiles
:
this
.
data
.
productFiles
});
if
(
refresh
)
{
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
stopPullDownRefresh
();
}
}
}
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
if
(
this
.
data
.
current
==
1
){
this
.
data
.
guidCollege
.
pageNum
=
1
;
this
.
data
.
guidCollege
.
totalPage
=
0
;
this
.
data
.
guidCollege
.
list
=
[];
this
.
getGuidCollegeList
(
true
);
}
else
if
(
this
.
data
.
current
==
2
){
this
.
data
.
brandPromotions
.
pageNum
=
1
;
this
.
data
.
brandPromotions
.
totalPage
=
0
;
this
.
data
.
brandPromotions
.
list
=
[];
this
.
getBrandPromotionList
(
true
);
}
else
if
(
this
.
data
.
current
==
3
){
this
.
data
.
productFiles
.
pageNum
=
1
;
this
.
data
.
productFiles
.
totalPage
=
0
;
this
.
data
.
productFiles
.
list
=
[];
this
.
getProductFiles
(
true
);
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
current
==
1
)
{
if
(
this
.
data
.
guidCollege
.
pageNum
<
this
.
data
.
guidCollege
.
totalPage
){
this
.
data
.
guidCollege
.
pageNum
++
;
this
.
getGuidCollegeList
();
}
else
{
if
(
this
.
data
.
guidCollege
.
pageNum
>
1
){
wx
.
showToast
({
title
:
'暂无更多数据啦~'
,
icon
:
'none'
});
}
}
}
else
if
(
this
.
data
.
current
==
2
)
{
if
(
this
.
data
.
brandPromotions
.
pageNum
<
this
.
data
.
brandPromotions
.
totalPage
){
this
.
data
.
brandPromotions
.
pageNum
++
;
this
.
getBrandPromotionList
();
}
else
{
if
(
this
.
data
.
brandPromotions
.
pageNum
>
1
)
{
wx
.
showToast
({
title
:
'暂无更多数据啦~'
,
icon
:
'none'
});
}
}
}
else
if
(
this
.
data
.
current
==
3
)
{
if
(
this
.
data
.
productFiles
.
pageNum
<
this
.
data
.
productFiles
.
totalPage
)
{
this
.
data
.
productFiles
.
pageNum
++
;
this
.
getProductFiles
();
}
else
{
if
(
this
.
data
.
getProductFiles
.
pageNum
>
1
)
{
wx
.
showToast
({
title
:
'暂无更多数据啦~'
,
icon
:
'none'
});
}
}
}
},
})
\ No newline at end of file
src/shoppingGuid/page/pages/college/college.json
0 → 100644
View file @
a942a3da
{
"navigationBarTitleText"
:
"学院"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"tab-bar"
:
"../../../component/tabBar/tabBar"
}
}
\ No newline at end of file
src/shoppingGuid/page/pages/college/college.wxml
0 → 100644
View file @
a942a3da
<!--shoppingGuid/page/pages/welfare/welfare.wxml-->
<!-- 福利界面 -->
<view class='main-container'>
<view class='top-container'>
<view class='top-item {{item.isActive ? "active" : ""}}'
wx:for="{{navBar}}"
wx:key="nav"
bindtap='onTopBarTap'
data-index="{{idx}}"
data-item="{{item}}"
wx:for-index="idx"
wx:for-item="item">{{item.name}}</view>
</view>
<!-- 导购 -->
<view class='guid' wx:if="{{current == 1}}">
<view class='guid-item'
bindtap='onTapToGuidCollegeInfo'
wx:for="{{guidCollege.list}}"
wx:key="guidCollege"
data-index="{{idx}}"
data-item="{{item}}"
wx:for-index="idx"
wx:for-item="item">
<image src="{{item.titleUrl}}" mode='widthFix'></image>
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{guidCollege.noData}}">暂无数据~</view>
</view>
<!-- 品牌营销 -->
<view class='guid' wx:if="{{current == 2}}">
<view class='guid-item'
bindtap='onTapToGuidCollegeInfo'
wx:for="{{brandPromotions.list}}"
wx:key="brandPromotions{{idx}}"
data-index="{{idx}}"
data-item="{{item}}"
wx:for-index="idx"
wx:for-item="item">
<image src="{{item.titleUrl}}" mode='widthFix'></image>
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{brandPromotions.noData}}">暂无数据~</view>
</view>
<!-- 产品素材 -->
<view class='guid' wx:if="{{current == 3}}">
<view class='guid-item'
bindtap='onTapToGuidCollegeInfo'
wx:for="{{productFiles.list}}"
wx:key="productFiles{{idx}}"
data-index="{{idx}}"
data-item="{{item}}"
wx:for-index="idx"
wx:for-item="item">
<image src="{{item.titleUrl}}" mode='widthFix'></image>
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{productFiles.noData}}">暂无数据~</view>
</view>
</view>
<!-- tabbar -->
<tab-bar index="{{0}}"></tab-bar>
src/shoppingGuid/page/pages/college/college.wxss
0 → 100644
View file @
a942a3da
/* shoppingGuid/page/pages/welfare/welfare.wxss */
page{
background: #f2f2f2;
padding-bottom: 106rpx;
padding-top: 92rpx;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.main-container{
width: 100%;
height: auto;
}
.top-container{
position: fixed;
z-index: 2;
width: 100%;
height: 90rpx;
top: 0;
left: 0;
background: #ffffff;
display: flex;
border-bottom: solid 2rpx #dddddd;
}
.top-container .top-item{
flex: 0;
min-width: 33.3%;
max-width: 33.3%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.top-container .top-item.active{
color: #0091FF;
}
/* 导购学院 */
.guid{
padding: 30rpx;
width: 100%;
}
.guid .guid-item{
background: #ffffff;
border-radius: 16rpx;
padding-bottom: 10rpx;
margin-bottom: 20rpx;
}
.guid .guid-item image{
display: block;
width: 100%;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.guid .guid-item .guid-item-title{
padding: 20rpx;
color: #333333;
font-size: 24rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
max-height:100rpx;
}
/* 推荐商品 */
.recommand-product{
padding: 30rpx;
width: 100%;
}
.recommand-product .product-item{
width: 100%;
height: 220rpx;
background: #ffffff;
margin-bottom: 20rpx;
border-radius: 10rpx;
display: flex;
box-shadow: 2rpx 2rpx 6rpx 4rpx rgba(0,0,0,0.1);
}
.recommand-product .product-item .img{
flex: 0;
min-width: 220rpx;
max-width: 220rpx;
height: 100%;
padding: 10rpx;
}
.recommand-product .product-item .img image{
width: 100%;
height: 100%;
display: block;
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
}
.recommand-product .product-item .product-info{
flex: 1;
height: 100%;
padding: 20rpx;
}
.recommand-product .product-item .product-info .pro-main-title{
font-size: 26rpx;
color: #333333;
font-weight: bold;
margin-bottom: 15rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.pro-second-title{
font-size: 24rpx;
color: #666666;
margin-bottom: 10rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.price{
flex: 1;
}
.price-btn{
display: flex;
align-items: center;
width: 100%;
}
.price-btn .rg-btn{
flex: 0;
height: 100%;
min-width: 300rpx;
max-width: 300rpx;
display: flex;
align-items: flex-end;
justify-content: flex-end;
}
.price-btn .rg-btn button{
font-size: 22rpx;
height: 45rpx;
color: #cb3c3c;
display: flex;
align-items: center;
padding: 0 10rpx;
border: solid 2rpx #cb3c3c;
background: #ffffff;
margin: 0;
}
.price-btn .rg-btn button:first-child{
margin-right: 15rpx;
}
.price-btn .rg-btn button::after{
border: none;
}
.price .normal{
font-size: 32rpx;
font-weight: bold;
display: flex;
align-items: center;
}
.price .normal image{
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.coupon{
font-size: 24rpx;
display: flex;
align-items: center;
margin-top: 10rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
vertical-align:middle;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.coupon image{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.coupon text{
margin-right: 10rpx;
}
.price .plus{
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.price .plus image{
width: 70rpx;
margin-left: 10rpx;
}
/* 优惠券 */
.coupons{
padding: 30rpx;
width: 100%;
}
.coupons .coupon-item{
width: 100%;
height: 180rpx;
/* background: #ffffff; */
display: flex;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-bottom: 10rpx;
}
.coupons .coupon-item .coupon-item-lf{
flex: 0;
min-width: 180rpx;
max-width: 180rpx;
height: 180rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #0091FF ;
font-size: 24rpx;
justify-content: center;
}
.coupon-price{
margin-bottom: 6rpx;
}
.coupon-price text{
font-size: 38rpx;
font-weight: bold;
}
.coupons .coupon-item .coupon-item-rg{
flex: 1;
padding: 30rpx;
position: relative;
}
.coupons .coupon-item .coupon-item-rg .qrcode{
position: absolute;
right: 30rpx;
top: 30rpx;
width: 40rpx;
height: 40rpx;
}
.coupons .coupon-item .coupon-item-rg .qrcode image{
width: 100%;
height: 100%;
display: block;
}
.coupons .coupon-item .coupon-item-rg .coupon-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 15rpx;
margin-top: 15rpx;
}
.coupons .coupon-item .coupon-item-rg .op{
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
}
.coupons .coupon-item .coupon-item-rg .op .text-btn{
flex: 1;
font-size: 24rpx;
}
.coupons .coupon-item .coupon-item-rg .op .info-btn{
width: 160rpx;
height: 50rpx;
background: #0091FF ;
color: #ffffff;
display: flex;
align-items: center;
font-size: 24rpx;
}
/* 没有你想要的 */
.go-mall{
width: 100%;
height: auto;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
}
.bg{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 1000;
display: none;
}
.share-container{
position: fixed;
width: 100%;
height: 200rpx;
background: #ffffff;
bottom: 0;
left: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: space-around;
transition: all 0.3s;
transform: translateY(100%);
}
.share-container button{
appearance: none;
background: transparent;
border: none !important;
-webkit-appearance: none;
color:#333333;
}
.share-container button::after { border: none; }
.sliderUp{
transform: translateY(0) !important;
}
.share-container .share-item{
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.share-container .share-item image{
width: 80rpx;
height: 80rpx;
margin-bottom: 5rpx;
}
\ No newline at end of file
src/shoppingGuid/page/pages/couponQrcode/couponQrcode.wxss
View file @
a942a3da
src/shoppingGuid/page/pages/home/home.js
View file @
a942a3da
...
...
@@ -13,7 +13,25 @@ wxService.page({
rankList
:[],
storeList
:[],
defaultAvatar
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_default_logo.png'
,
loadingText
:
'数据加载中...'
loadingText
:
'数据加载中...'
,
coupon
:
{
couponTypeArr
:
[
{
name
:
'打折券'
,
type
:
2
,
active
:
true
},
{
name
:
'定额券'
,
type
:
3
,
active
:
false
},
{
name
:
'抵用券'
,
type
:
1
,
active
:
false
}
],
currentCouponType
:
2
,
couponList
:
[]
},
goods
:
{
goodsTypeArr
:
[
{
name
:
'最新'
,
type
:
2
,
active
:
true
},
{
name
:
'最热🔥'
,
type
:
3
,
active
:
false
},
{
name
:
'推荐👍'
,
type
:
1
,
active
:
false
}
],
currentGoodsType
:
2
,
goodsList
:
[]
}
},
/**
...
...
@@ -24,13 +42,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
...
...
@@ -43,7 +54,8 @@ wxService.page({
})
wxService
.
post
(
'/marketing/shoppingguide/recruitRanking'
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
;
if
(
result
==
0
)
{
wx
.
hideLoading
()
let
list
=
data
?
data
:
[];
...
...
@@ -51,6 +63,15 @@ wxService.page({
this
.
data
.
loadingText
=
'暂无榜单~'
;
}
list
.
map
(
item
=>
{
item
.
member
.
qiyeInfo
=
item
.
member
.
qiyeInfo
?
item
.
member
.
qiyeInfo
:
null
;
if
(
!
item
.
member
.
qiyeInfo
){
item
.
member
.
qiyeInfo
=
{
name
:
'暂无名称'
}
}
});
this
.
setData
({
rankList
:
list
,
loadingText
:
this
.
data
.
loadingText
...
...
@@ -63,14 +84,23 @@ wxService.page({
getStoreRanking
()
{
wx
.
showLoading
({
title
:
'加载中'
})
});
this
.
setData
({
loadingText
:
'数据加载中...'
});
wxService
.
post
(
'/marketing/shoppingguide/storeRanking'
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
();
if
(
!
data
){
this
.
data
.
loadingText
=
'暂无榜单~'
;
}
this
.
setData
({
storeList
:
data
||
[]
storeList
:
data
||
[],
loadingText
:
this
.
data
.
loadingText
})
}
}
...
...
@@ -101,6 +131,66 @@ wxService.page({
url
:
'/shoppingGuid/page/pages/qrcode/qrcode'
,
})
},
//跳转到任务中心
onTapToTaskList
(){
wx
.
redirectTo
({
url
:
'/shoppingGuid/page/pages/kpi/kpi'
,
})
},
//跳转到优惠券列表
onTapToCouponList
(){
wx
.
navigateTo
({
url
:
'/shoppingGuid/page/pages/moreCoupons/moreCoupons?type='
+
this
.
data
.
coupon
.
currentCouponType
,
});
},
//优惠券tab点击
onTapChangeCouponType
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
data
.
coupon
.
couponTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
});
this
.
data
.
coupon
.
couponTypeArr
[
index
].
active
=
true
;
this
.
data
.
coupon
.
currentCouponType
=
this
.
data
.
coupon
.
couponTypeArr
[
index
].
type
;
this
.
getCouponList
();
this
.
setData
({
coupon
:
this
.
data
.
coupon
});
},
//获取优惠券列表
getCouponList
(){
},
//跳转到更多商品列表
onTapToMoreProducts
(){
wx
.
navigateTo
({
url
:
'/shoppingGuid/page/pages/moreProducts/moreProducts?type='
+
this
.
data
.
goods
.
currentGoodsType
,
});
},
//切换商品筛选
onTapChangeGoodsType
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
data
.
goods
.
goodsTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
});
this
.
data
.
goods
.
goodsTypeArr
[
index
].
active
=
true
;
this
.
data
.
goods
.
currentGoodsType
=
this
.
data
.
goods
.
goodsTypeArr
[
index
].
type
;
this
.
getGoodsList
();
this
.
setData
({
goods
:
this
.
data
.
goods
});
},
//获取商品列表
getGoodsList
(){
},
// 回到商城
onTapToMall
(){
...
...
src/shoppingGuid/page/pages/home/home.wxml
View file @
a942a3da
<!--shoppingGuid/page/pages/home/home.wxml-->
<wxs src="../../../../wxs/utils.wxs" module="utils" />
<!--
导购首页
-->
<view class='
main-container
'>
<!-- top --
>
<view class='top-icon
s'>
<view class='icon-item' bindtap='onTapShowMyQrcode
'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_qrcode.png' mode='aspectFit' /
>
<view class='icon-title'>招募码
</view>
<!--
常用工具
-->
<view class='
top-items
'>
<view class='header'>常用工具</view
>
<view class='tools-item
s'>
<view class='tools-item' bindtap='onTapToMall
'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_mall.png' mode='aspectFit'></image
>
<view class='tool-name'>官方商城
</view>
</view>
<view class='icon-item' bindtap='onTapToMall'
>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_go_mall.png' mode='aspectFit' /
>
<view class='icon-title'>前往商城
</view>
<view class='tools-item'
>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_task.png' mode='aspectFit'></image
>
<view class='tool-name'>任务中心
</view>
</view>
<view class='icon
-item' bindtap='onTapToMember'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/home_member.png' mode='aspectFit' /
>
<view class='icon-title'>会员
</view>
<view class='tools
-item' bindtap='onTapToMember'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_member_center.png' mode='aspectFit'></image
>
<view class='tool-name'>会员中心
</view>
</view>
</view>
<!--招募榜 -->
<view class='header-tab'>
</view>
<!-- 整体布局 -->
<view class='main-container'>
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='header'>优惠券</view>
<view class='status-bar'>
<view class='status-items'>
<view
class='header-tab-item'
class='status-bar-item {{item.active ? "active" : ""}}'
wx:for="{{coupon.couponTypeArr}}"
wx:for-item="item"
bindtap='onTapChangeCouponType'
wx:for-index="idx"
wx:key="coupon{{idx}}"
data-index="{{idx}}">{{item.name}}</view>
</view>
<view class='more-data' bindtap='onTapToCouponList'>
<label>更多</label>
<image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image>
</view>
</view>
<!-- list -->
<view class='coupon-list'>
<view class='coupon-list-item'>
<view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dicount_coupon.png' mode='aspectFit'></image>
<view class='coupon-name'>打折券</view>
</view>
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_dinge_coupon.png' mode='aspectFit'></image>
<view class='coupon-name'>定额券</view>
</view>
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
<view class='coupon-list-item'>
<view class='top'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/icon_diyong_coupon.png' mode='aspectFit'></image>
<view class='coupon-name'>抵扣券</view>
</view>
<view class='center'>定向发券</view>
<view class='bottom'>群发推荐</view>
</view>
</view>
</view>
<!-- 爆款推荐 -->
<view class='mg-b-40'>
<view class='header'>爆款推荐</view>
<view class='status-bar'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
wx:for="{{goods.goodsTypeArr}}"
wx:for-item="item"
bindtap='onTapChangeGoodsType'
wx:for-index="idx"
wx:key="goods{{idx}}"
data-index="{{idx}}">{{item.name}}</view>
</view>
<view class='more-data' bindtap='onTapToMoreProducts'>
<label>更多</label>
<image src='/assets/imgs/arrow-right-sku.png' mode='aspectFit'></image>
</view>
</view>
<!-- list -->
<view class='goods-list'>
<view class='goods-item'>
<image class='goods-lf-icon'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view>
<view class='goods-price'>
<view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'>
<text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view>
</view>
<view class='goods-share'>
<view class='send-coupon'>定向发券</view>
<view class='send-coupon'>群发推荐</view>
</view>
</view>
</view>
</view>
<view class='goods-item'>
<image class='goods-lf-icon'
src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/man_logo.jpeg' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>雅诗兰黛DW持妆气垫油皮亲妈BB霜 持久控油遮瑕防晒</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view>
<view class='goods-price'>
<view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'>
<text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view>
</view>
<view class='goods-share'>
<view class='send-coupon'>定向发券</view>
<view class='send-coupon'>群发推荐</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 招募榜 -->
<view class='rank-container'>
<view class='top-filter'>
<view class='half-item {{item.isActive ? "active" : ""}}'
wx:for="{{navBar}}"
wx:key="topbar"
wx:for-item="item"
wx:key="topbar{{idx}}"
wx:for-index="idx"
bindtap='onTopBarTap'
data-index="{{idx}}"
data-item="{{item}}"
wx:for-item="item"
>
<view class='item-text {{item.isActive ? "active" : ""}}'>{{item.name}}</view>
>{{item.name}}</view>
</view>
<view class='rank-title'>
<image class='top20' src='/assets/imgs/shoppingGuide/home_top20.png' mode='aspectFit'></image>
<view class='rank-more'>更多点击查看更多></view>
</view>
<view class='list-container'>
<!-- 招募榜 -->
<view class='list' wx:if="{{current == 1}}">
<view class='title'>
<image src='/assets/imgs/shoppingGuide/home_top20.png' mode='widthFix' />
</view>
<view class='table-list' wx:if="{{rankList.length}}">
<view wx:if="{{current == 1}}">
<view class='rank-list' wx:if="{{rankList.length}}">
<block wx:for="{{rankList}}" wx:key="{{index}}" wx:for-item="item">
<view class='table-list-item'>
<view class='lf'>
<image src='{{item.member.avatar? item.member.avatar : defaultAvatar}}' mode='aspectFit' />
<text>{{utils.phoneFormat(item.member.mobile || 17521232119)}}</text>
</view>
<view class='rg'>已招募
<text>{{item.recruitCount}}</text>
人
<view class='rank-item'>
<image class='u-logo' src='{{item.member.avatar? item.member.avatar : defaultAvatar}}' mode='aspectFit'></image>
<view class='rank-u-info'>
<text>{{item.member.qiyeInfo.name}}</text>
<view>已招募<label class='main-color'>{{item.recruitCount}}</label>位</view>
</view>
</view>
</block>
</view>
<view class="no-list" wx:else>{{loadingText}}</view>
</view>
<!-- 门店榜单 -->
<view class='list' wx:if="{{current == 2}}">
<view class='title'>
<image src='/assets/imgs/shoppingGuide/home_top20.png' mode='widthFix' />
</view>
<view class='table-list' wx:if="{{storeList.length}}">
<!-- 门店榜 -->
<view wx:if="{{current == 2}}">
<view class='rank-list' wx:if="{{storeList.length}}">
<block wx:for="{{storeList}}" wx:key="{{index}}" wx:for-item="item">
<view class='table-list
-item'>
<view class='lf'
>
<image src='{{item.member.avatar? item.member.avatar : defaultAvatar}}' mode='aspectFit' /
>
<view class='rank
-item'>
<image class='u-logo' src='{{item.member.avatar? item.member.avatar : defaultAvatar}}' mode='aspectFit'></image
>
<view class='rank-u-info'
>
<text>{{item.store.name}}</text>
</view>
<view class='rg'>已招募
<text>{{item.recruitCount}}</text>
人
<view>已招募<label class='main-color'>{{item.recruitCount}}</label>位</view>
</view>
</view>
</block>
</view>
<view class="no-list" wx:else>
暂无榜单
</view>
<view class="no-list" wx:else>
{{loadingText}}
</view>
</view>
</view>
</view>
<!-- 整体布局 -->
<!-- tabbar -->
<tab-bar index="{{
0
}}" />
<tab-bar index="{{
2
}}" />
src/shoppingGuid/page/pages/home/home.wxss
View file @
a942a3da
This diff is collapsed.
Click to expand it.
src/shoppingGuid/page/pages/kpi/kpi.json
View file @
a942a3da
{
"navigationBarTitleText"
:
"
KPI
"
,
"navigationBarTitleText"
:
"
招募
"
,
"usingComponents"
:
{
"tab-bar"
:
"../../../component/tabBar/tabBar"
}
...
...
src/shoppingGuid/page/pages/kpi/kpi.wxss
View file @
a942a3da
/* shoppingGuid/page/pages/kpi/kpi.wxss */
page{
background:
#ffffff
;
background:
rgba(0,0,0,0.04)
;
padding-bottom: 106rpx;
padding-top: 82rpx;
box-sizing: border-box;
...
...
@@ -16,8 +16,6 @@ view{
-webkit-box-sizing: border-box;
}
.main-container{
width: 100%;
height: auto;
...
...
@@ -26,7 +24,7 @@ view{
.header-tab{
width: 100%;
height: 80rpx;
background:
-webkit-linear-gradient(left,rgb(0,145,255),rgba(0,145,255,0.8),rgba(0,145,255,0.3))
;
background:
#ffffff
;
display: flex;
position: fixed;
top: 0;
...
...
@@ -43,37 +41,42 @@ view{
display: flex;
justify-content: center;
align-items: center;
color: #
ffffff
;
font-size: 2
8
rpx;
color: #
666666
;
font-size: 2
4
rpx;
}
.header-tab .header-tab-item .item-text{
height: 50rpx;
width: auto;
padding:
0
20rpx;
padding:
8rpx
20rpx;
display: flex;
align-items: center;
transition: all 0.3s;
}
.header-tab .header-tab-item .item-text.active{
background: #ffffff;
color: rgb(0,145,255);
border-radius: 25rpx;
border-radius: 20px;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(0, 145, 255, 0.26);
font-weight: bold;
}
.list{
width: 100%;
padding:
3
0rpx;
padding:
2
0rpx;
}
.list .list-item{
width: 100%;
height: auto;
padding: 20rpx;
box-shadow: 0 0 6rpx 4rpx rgba(0,0,0,0.1);
margin-bottom:
3
0rpx;
/* box-shadow: 0 0 6rpx 4rpx rgba(0,0,0,0.1); */
margin-bottom:
2
0rpx;
position: relative;
border-radius: 10rpx;
background: #ffffff;
}
.list .list-item:active{
...
...
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.js
0 → 100644
View file @
a942a3da
// shoppingGuid/page/pages/moreCoupons/moreCoupons.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
const
app
=
getApp
();
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
coupon
:
{
couponTypeArr
:
[
{
name
:
'打折券'
,
type
:
2
,
active
:
true
},
{
name
:
'定额券'
,
type
:
3
,
active
:
false
},
{
name
:
'抵用券'
,
type
:
1
,
active
:
false
}
],
currentCouponType
:
2
,
couponList
:
[],
pageNum
:
1
,
pageSize
:
10
,
totalPage
:
0
,
noData
:
false
},
shareCouponObj
:
{
title
:
''
,
imageUrl
:
''
,
path
:
''
},
showShareModel
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
type
=
options
.
type
;
if
(
type
){
this
.
data
.
coupon
.
currentCouponType
=
type
;
this
.
data
.
coupon
.
couponTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
if
(
item
.
type
==
type
){
item
.
active
=
true
;
}
});
this
.
setData
({
coupon
:
this
.
data
.
coupon
});
}
//获取优惠券列表
this
.
getCouponList
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
//展示优惠券二维码
onTapShowQrcode
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
;
wx
.
setStorageSync
(
'_guidCouponInfo'
,
item
);
wx
.
navigateTo
({
url
:
'/shoppingGuid/page/pages/couponQrcode/couponQrcode'
,
});
},
//定向发送优惠券
onTapToSendConpon
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
id
=
item
.
id
;
let
content
=
{
title
:
item
.
title
,
id
:
id
,
url
:
item
.
imageBg
}
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
contentId
:
item
.
id
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
PRODUCT_DETAIL
,
//内容类型 STAFF_RECOMMAND
title
:
item
.
title
,
//标题
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
if
(
res
&&
res
.
id
)
{
let
tentacleId
=
res
.
id
;
let
inner_id
=
Integer
.
digit
(
item
.
id
,
10
,
64
);
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'subPackage/page/pages/scanCoupon/scanCoupon'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
this
.
data
.
shareCouponObj
.
title
=
item
.
title
;
this
.
data
.
shareCouponObj
.
imageUrl
=
item
.
imageBg
;
this
.
data
.
shareCouponObj
.
path
=
item
.
path
;
this
.
setData
({
shareCouponObj
:
this
.
data
.
shareCouponObj
,
showShareModel
:
true
});
}
});
},
//关闭模态框
onTapCancelShare
(){
this
.
setData
({
showShareModel
:
false
});
},
//群发
onTapToSendByGroup
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
id
=
item
.
id
;
let
content
=
{
title
:
item
.
title
,
id
:
item
.
id
,
url
:
item
.
imageBg
}
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
contentId
:
item
.
id
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
PRODUCT_DETAIL
,
//内容类型 STAFF_RECOMMAND
title
:
item
.
title
,
//标题
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
if
(
res
&&
res
.
id
)
{
let
tentacleId
=
res
.
id
;
let
inner_id
=
Integer
.
digit
(
item
.
couponId
,
10
,
64
);
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'subPackage/page/pages/scanCoupon/scanCoupon'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
//打开企业微信通讯录选择会员
wx
.
qy
.
shareToExternalContact
({
appid
:
app
.
globalData
.
appId
,
//小程序的appid
title
:
item
.
couponName
,
//小程序消息的title
imgUrl
:
item
.
imageBg
,
//小程序消息的封面图
page
:
path
,
//小程序消息打开后的路径
success
:
function
(
r
)
{
wx
.
showToast
({
title
:
'发送成功!'
});
},
fail
:
function
(
err
)
{
}
});
}
});
},
//优惠券tab点击
onTapChangeCouponType
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
data
.
coupon
.
couponTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
});
this
.
data
.
coupon
.
couponTypeArr
[
index
].
active
=
true
;
this
.
data
.
coupon
.
currentCouponType
=
this
.
data
.
coupon
.
couponTypeArr
[
index
].
type
;
this
.
data
.
coupon
.
pageNum
=
1
;
this
.
data
.
coupon
.
totalPage
=
0
;
this
.
data
.
coupon
.
couponList
=
[];
this
.
getCouponList
();
this
.
setData
({
coupon
:
this
.
data
.
coupon
});
},
//获取优惠券列表
getCouponList
(
refresh
)
{
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
let
pageNum
=
this
.
data
.
coupon
.
pageNum
,
pageSize
=
this
.
data
.
coupon
.
pageSize
,
param
=
{
couponName
:
''
};
wxService
.
post
(
`/marketing/shoppingguide/coupon/page4c?pageSize=
${
pageSize
}
&pageNo=
${
pageNum
}
`
,
param
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
wx
.
hideLoading
();
if
(
result
==
0
)
{
let
list
=
data
.
content
?
data
.
content
:
[];
list
.
forEach
(
item
=>
{
item
.
canUse
=
(
item
.
couponSetting
.
status
==
0
||
item
.
couponSetting
.
status
==
2
)
?
false
:
true
;
item
.
imageBg
=
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/coupon_bg.png'
;
item
.
typeText
=
item
.
couponSetting
.
typeDesc
;
item
.
price
=
parseFloat
(
item
.
couponSetting
.
faceAmount
/
100
).
toFixed
(
2
);
item
.
couponType
=
item
.
couponSetting
.
type
;
});
this
.
data
.
coupon
.
totalPage
=
Math
.
ceil
(
data
.
totalElements
/
this
.
data
.
coupon
.
pageSize
);
this
.
data
.
coupon
.
couponList
=
this
.
data
.
coupon
.
couponList
.
concat
(
list
);
if
(
this
.
data
.
coupon
.
couponList
.
length
==
0
)
{
this
.
data
.
coupon
.
noData
=
true
;
}
this
.
setData
({
coupon
:
this
.
data
.
coupon
});
}
if
(
refresh
){
wx
.
stopPullDownRefresh
();
wx
.
showToast
({
title
:
'刷新成功'
,
});
}
}
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
data
.
coupon
.
couponList
=
[];
this
.
data
.
coupon
.
pageNum
=
1
;
this
.
data
.
coupon
.
totalPage
=
0
;
this
.
getCouponList
(
true
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
coupon
.
pageNum
<
this
.
data
.
coupon
.
totalPage
){
this
.
data
.
coupon
.
pageNum
++
;
this
.
getCouponList
();
}
else
{
if
(
this
.
data
.
coupon
.
pageNum
>
1
){
wx
.
showToast
({
title
:
'没有更多数据了~'
,
icon
:
'none'
});
}
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
(
res
)
{
if
(
res
.
from
==
'button'
)
{
return
{
title
:
this
.
data
.
shareCouponObj
.
title
,
path
:
this
.
data
.
shareCouponObj
.
path
,
imageUrl
:
this
.
data
.
shareCouponObj
.
imageUrl
}
}
}
})
\ No newline at end of file
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.json
0 → 100644
View file @
a942a3da
{
"navigationBarTitleText"
:
"更多优惠券"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.wxml
0 → 100644
View file @
a942a3da
<!--shoppingGuid/page/pages/home/home.wxml-->
<!-- 整体布局 -->
<view class='main-container'>
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='status-bar'>
<view class='status-items'>
<view
class='status-bar-item {{item.active ? "active" : ""}}'
wx:for="{{coupon.couponTypeArr}}"
wx:for-item="item"
bindtap='onTapChangeCouponType'
wx:for-index="idx"
wx:key="coupon{{idx}}"
data-index="{{idx}}">{{item.name}}</view>
</view>
</view>
<!-- list -->
<view class='coupons'>
<view class='coupon-item'
wx:for="{{coupon.couponList}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="{{idx}}"
data-item="{{item}}"
style='background-image:url({{item.imageBg}})'>
<view class='coupon-item-lf' data-item="{{item}}" bindtap='onTapShowQrcode'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/7_3_0/daogou_qrcode.png' mode='aspectFit'></image>
<view>查看详情</view>
</view>
<view class='coupon-item-rg'>
<view class='coupon-title'>{{item.title}}</view>
<view class='op'>
<view class='text-btn'>数量:{{item.stock}}</view>
<view class='goods-share'>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToSendConpon'>定向发券</view>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToSendByGroup'>群发推荐</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showShareModel ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showShareModel ? "sliderUp" : ""}}'>
<button open-type="share">
<view class='share-item'>
<image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
<text>微信好友</text>
</view>
</button>
</view>
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.wxss
0 → 100644
View file @
a942a3da
/* shoppingGuid/page/pages/home/home.wxss */
page{
background: rgba(0, 0, 0, 0.04);
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding-top: 75rpx;
}
/* *,*::after,*::before{
box-sizing: border-box;
} */
.no-list {
font-size: 24rpx;
text-align: center;
color: #333333;
padding: 50rpx 0;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* 主要布局 */
.main-container{
width: 100%;
height: auto;
padding: 30rpx;
}
.main-container .header{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 30rpx;
}
.status-bar{
width: 100%;
height: 75rpx;
position: fixed;
background: #ffffff;
padding-right: 120rpx;
top: 0;
left: 0;
z-index: 2;
}
.status-bar .status-items{
width: 100%;
height: 100%;
display: flex;
align-items: center;
padding: 0 30rpx;
}
.status-bar .status-items .status-bar-item{
height: 50rpx;
width: auto;
padding: 8rpx 20rpx;
display: flex;
align-items: center;
transition: all 0.3s;
font-size: 24rpx;
margin-right: 10rpx;
}
.status-bar .status-items .status-bar-item.active{
background: #ffffff;
color: rgb(0,145,255);
border-radius: 20px;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(0, 145, 255, 0.26);
font-weight: bold;
}
.status-bar .more-data{
position: absolute;
width: 120rpx;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 24rpx;
color: #999999;
top: 0;
right: 0;
}
.status-bar .more-data:active{
opacity: 0.7;
}
.status-bar .more-data image{
width: 24rpx;
height: 24rpx;
}
/* 优惠券 */
.coupons{
width: 100%;
}
.coupons .coupon-item{
width: 100%;
height: 180rpx;
/* background: #ffffff; */
display: flex;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
margin-bottom: 10rpx;
}
.coupons .coupon-item .coupon-item-lf{
flex: 0;
min-width: 180rpx;
max-width: 180rpx;
height: 180rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #999999 ;
font-size: 22rpx;
justify-content: center;
}
.coupons .coupon-item .coupon-item-lf image{
width: 60rpx;
height: 60rpx;
margin-bottom: 8rpx;
}
.coupon-price{
margin-bottom: 6rpx;
}
.coupon-price text{
font-size: 38rpx;
font-weight: bold;
}
.coupons .coupon-item .coupon-item-rg{
flex: 1;
padding: 30rpx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.coupons .coupon-item .coupon-item-rg .qrcode{
position: absolute;
right: 30rpx;
top: 30rpx;
width: 40rpx;
height: 40rpx;
}
.coupons .coupon-item .coupon-item-rg .qrcode image{
width: 100%;
height: 100%;
display: block;
}
.coupons .coupon-item .coupon-item-rg .coupon-title{
font-size: 24rpx;
color: #333333;
font-weight: bold;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.coupons .coupon-item .coupon-item-rg .op{
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
}
.coupons .coupon-item .coupon-item-rg .op .text-btn{
flex: 1;
font-size: 24rpx;
}
.goods-share{
flex: 0;
min-width: 220rpx;
max-width: 220rpx;
height: 52rpx;
border: solid 2rpx #ff3333;
border-radius: 26rpx;
display: flex;
font-size: 22rpx;
}
.goods-share .send-coupon{
flex: 0;
min-width: 50%;
max-width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.goods-share .send-coupon:first-child{
color: #FA6400;
}
.goods-share .send-coupon:first-child:active{
opacity: 0.7;
}
.goods-share .send-coupon:last-child:active{
opacity: 0.7;
}
.goods-share .send-coupon:last-child{
color: #ffffff;
background: #ff3333;
border-top-right-radius: 26rpx;
border-bottom-right-radius: 26rpx;
}
.mg-b-40{
margin-bottom: 40rpx;
}
/* 分享 */
.bg{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 1000;
display: none;
}
.share-container{
position: fixed;
width: 100%;
height: 200rpx;
background: #ffffff;
bottom: 0;
left: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: space-around;
transition: all 0.3s;
transform: translateY(100%);
}
.share-container button{
appearance: none;
background: transparent;
border: none !important;
-webkit-appearance: none;
color:#333333;
}
.share-container button::after { border: none; }
.sliderUp{
transform: translateY(0) !important;
}
.share-container .share-item{
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.share-container .share-item image{
width: 80rpx;
height: 80rpx;
margin-bottom: 5rpx;
}
src/shoppingGuid/page/pages/moreProducts/moreProducts.js
0 → 100644
View file @
a942a3da
// shoppingGuid/page/pages/moreProducts/moreProducts.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
const
app
=
getApp
();
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
goods
:
{
goodsTypeArr
:
[
{
name
:
'最新'
,
type
:
2
,
active
:
true
},
{
name
:
'最热🔥'
,
type
:
3
,
active
:
false
},
{
name
:
'推荐👍'
,
type
:
1
,
active
:
false
}
],
currentGoodsType
:
2
,
goodsList
:
[]
},
shareModelObj
:
{
title
:
''
,
imageUrl
:
''
,
path
:
''
},
recommandProductsNoData
:
false
,
showShareModel
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
type
=
options
.
type
;
if
(
type
)
{
this
.
data
.
goods
.
currentGoodsType
=
type
;
this
.
data
.
goods
.
goodsTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
if
(
item
.
type
==
type
)
{
item
.
active
=
true
;
}
});
this
.
setData
({
goods
:
this
.
data
.
goods
});
}
//获取优惠券列表
this
.
getGoodsList
();
},
//筛选点击
onTapChangeGoodsType
(
e
){
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
data
.
goods
.
goodsTypeArr
.
map
(
item
=>
{
item
.
active
=
false
;
});
this
.
data
.
goods
.
goodsTypeArr
[
index
].
active
=
true
;
this
.
data
.
goods
.
currentGoodsType
=
this
.
data
.
goods
.
goodsTypeArr
[
index
].
type
;
this
.
getGoodsList
();
this
.
setData
({
goods
:
this
.
data
.
goods
});
},
//获取商品列表
getGoodsList
(
refresh
){
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
wxService
.
post
(
`/merchant/share/productBonus/buyer/findPage?pageNo=1&pageSize=20`
,
{}).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
let
list
=
data
.
content
?
data
.
content
:
[];
list
.
forEach
(
item
=>
{
item
.
productImgUrl
=
item
.
productImgUrl
?
item
.
productImgUrl
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/1571636466%281%29.jpg'
;
});
if
(
list
.
length
==
0
)
{
this
.
data
.
recommandProductsNoData
=
true
;
}
this
.
data
.
goods
.
goodsList
=
list
;
this
.
setData
({
goods
:
this
.
data
.
goods
,
recommandProductsNoData
:
this
.
data
.
recommandProductsNoData
});
}
if
(
refresh
)
{
wx
.
stopPullDownRefresh
();
wx
.
showToast
({
title
:
'刷新成功'
,
icon
:
'none'
});
}
}
});
},
//
//立即群发商品给用户
onTapToRecommandProduct
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
;
// 生成触点对象
let
content
=
{
title
:
item
.
productName
,
id
:
item
.
productId
,
url
:
item
.
productImgUrl
}
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
contentId
:
item
.
productId
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
PRODUCT_DETAIL
,
//内容类型
title
:
item
.
productName
,
//标题
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
if
(
res
&&
res
.
id
)
{
let
tentacleId
=
res
.
id
;
let
inner_id
=
Integer
.
digit
(
item
.
productId
,
10
,
64
);
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'pages/productDetail/productDetail'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
//打开企业微信通讯录选择会员
wx
.
qy
.
shareToExternalContact
({
appid
:
app
.
globalData
.
appId
,
//小程序的appid
title
:
item
.
productName
,
//小程序消息的title
imgUrl
:
item
.
productImgUrl
,
//小程序消息的封面图
page
:
path
,
//小程序消息打开后的路径
success
:
function
(
res
)
{
wx
.
showToast
({
title
:
'推荐成功!'
});
},
fail
:
function
(
err
)
{
console
.
log
(
'error---------------'
,
err
);
}
});
}
});
},
//定向发送
//定向转发商品给用户 分享功能
onTapToShare
(
e
)
{
let
item
=
e
.
currentTarget
.
dataset
.
item
;
// 生成触点对象
let
content
=
{
title
:
item
.
productName
,
id
:
item
.
productId
,
url
:
item
.
productImgUrl
}
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
contentId
:
item
.
productId
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
PRODUCT_DETAIL
,
//内容类型
title
:
item
.
productName
,
//标题
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
if
(
res
&&
res
.
id
)
{
let
tentacleId
=
res
.
id
;
let
inner_id
=
Integer
.
digit
(
item
.
productId
,
10
,
64
);
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
var
path
=
'pages/productDetail/productDetail'
+
'?i='
+
inner_id
+
'&t='
+
inner_tentacleId
;
this
.
data
.
shareModelObj
.
title
=
item
.
productName
;
this
.
data
.
shareModelObj
.
imageUrl
=
item
.
productImgUrl
;
this
.
data
.
shareModelObj
.
path
=
path
;
this
.
setData
({
shareModelObj
:
this
.
data
.
shareModelObj
,
showShareModel
:
true
,
});
}
});
},
//取消分享
onTapCancelShare
(){
this
.
setData
({
showShareModel
:
false
,
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
data
.
goods
.
goodsList
=
[];
this
.
getGoodsList
(
true
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
(
res
)
{
if
(
res
.
from
==
'button'
)
{
return
{
title
:
this
.
data
.
shareModelObj
.
title
,
path
:
this
.
data
.
shareModelObj
.
path
,
imageUrl
:
this
.
data
.
shareModelObj
.
imageUrl
}
}
}
})
\ No newline at end of file
src/shoppingGuid/page/pages/moreProducts/moreProducts.json
0 → 100644
View file @
a942a3da
{
"navigationBarTitleText"
:
"更多商品"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxml
0 → 100644
View file @
a942a3da
<!--shoppingGuid/page/pages/home/home.wxml-->
<view class='status-bar'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
wx:for="{{goods.goodsTypeArr}}"
wx:for-item="item"
bindtap='onTapChangeGoodsType'
wx:for-index="idx"
wx:key="goods{{idx}}"
data-index="{{idx}}">{{item.name}}</view>
</view>
</view>
<!-- 整体布局 -->
<view class='main-container'>
<!-- 爆款推荐 -->
<view>
<!-- list -->
<view class='goods-list' wx:if="{{goods.goodsList.length > 0}}">
<view class='goods-item'
wx:for="{{goods.goodsList}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="{{idx}}">
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'>
<view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>整日持妆 高遮瑕 高防晒</view>
<view class='goods-price'>
<view class='price'>
<view class='original-price'>¥126.08</view>
<view class='plus'>
<text>¥89.00</text>
<image src='/assets/imgs/7_1_0/plus-icon.png' mode='aspectFit'></image>
</view>
</view>
<view class='goods-share'>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToShare'>定向发送</view>
<view class='send-coupon' data-item="{{item}}" bindtap='onTapToRecommandProduct'>群发推荐</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class='empty' wx:if="{{goods.goodsList.length == 0}}">暂无数据~</view>
</view>
<!-- 分享 -->
<!-- 分享好友 -->
<view class='bg' style='display:{{showShareModel ? "block" : "none"}}' bindtap='onTapCancelShare'></view>
<view class='share-container {{showShareModel ? "sliderUp" : ""}}'>
<button open-type="share">
<view class='share-item'>
<image src='/assets/imgs/7_1_0/wx-icon.png' mode='aspectFit'></image>
<text>微信好友</text>
</view>
</button>
</view>
\ No newline at end of file
src/shoppingGuid/page/pages/moreProducts/moreProducts.wxss
0 → 100644
View file @
a942a3da
/* shoppingGuid/page/pages/home/home.wxss */
page{
background: rgba(0, 0, 0, 0.04);
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding-top: 75rpx;
}
/* *,*::after,*::before{
box-sizing: border-box;
} */
.no-list {
font-size: 24rpx;
text-align: center;
color: #333333;
padding: 50rpx 0;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* 主要布局 */
.main-container{
width: 100%;
height: auto;
padding: 30rpx;
}
.main-container .header{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 30rpx;
}
.status-bar{
width: 100%;
height: 75rpx;
position: fixed;
background: #ffffff;
padding-right: 120rpx;
top: 0;
left: 0;
z-index: 2;
}
.status-bar .status-items{
width: 100%;
height: 100%;
display: flex;
align-items: center;
padding: 0 30rpx;
}
.status-bar .status-items .status-bar-item{
height: 50rpx;
width: auto;
padding: 8rpx 20rpx;
display: flex;
align-items: center;
transition: all 0.3s;
font-size: 24rpx;
margin-right: 10rpx;
}
.status-bar .status-items .status-bar-item.active{
background: #ffffff;
color: rgb(0,145,255);
border-radius: 20px;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(0, 145, 255, 0.26);
font-weight: bold;
}
.mg-b-40{
margin-bottom: 40rpx;
}
/* 爆款 */
.goods-list{
width: 100%;
height: auto;
}
.goods-list .goods-item{
background: #ffffff;
border-radius: 10rpx;
display: flex;
margin-bottom: 20rpx;
}
.goods-list .goods-item .goods-lf-icon{
flex: 0;
min-width: 220rpx;
max-width: 220rpx;
height: 220rpx;
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
display: flex;
align-items: center;
}
.goods-list .goods-item .goods-rg-info{
flex: 1;
padding: 15rpx 20rpx;
font-size: 24rpx;
}
.goods-list .goods-item .goods-rg-info .goods-title{
color: #333333;
font-size: 24rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
font-weight: bold;
margin-bottom: 8rpx;
}
.goods-list .goods-item .goods-rg-info .goods-second-title{
font-size: 22rpx;
color: #999999;
margin-bottom: 20rpx;
}
.goods-list .goods-item .goods-rg-info .goods-price{
display: flex;
align-items: flex-end;
}
.goods-list .goods-item .goods-rg-info .goods-price .price{
flex: 1;
}
.goods-list .goods-item .goods-rg-info .goods-price .price .original-price{
color: #ff3333;
font-weight: bold;
}
.goods-list .goods-item .goods-rg-info .goods-price .price .plus{
display: flex;
align-items: center;
color: #000000;
}
.goods-list .goods-item .goods-rg-info .goods-price .price .plus image{
width: 60rpx;
height: 36rpx;
margin-left: 8rpx;
}
.goods-list .goods-item .goods-rg-info .goods-share{
flex: 0;
min-width: 220rpx;
max-width: 220rpx;
height: 52rpx;
border: solid 2rpx #ff3333;
border-radius: 26rpx;
display: flex;
font-size: 22rpx;
}
.goods-list .goods-item .goods-rg-info .goods-share .send-coupon{
flex: 0;
min-width: 50%;
max-width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.goods-list .goods-item .goods-rg-info .goods-share .send-coupon:first-child{
color: #FA6400;
}
.goods-list .goods-item .goods-rg-info .goods-share .send-coupon:first-child:active{
opacity: 0.7;
}
.goods-list .goods-item .goods-rg-info .goods-share .send-coupon:last-child:active{
opacity: 0.7;
}
.goods-list .goods-item .goods-rg-info .goods-share .send-coupon:last-child{
color: #ffffff;
background: #ff3333;
border-top-right-radius: 26rpx;
border-bottom-right-radius: 26rpx;
}
/* 分享 */
.bg{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 1000;
display: none;
}
.share-container{
position: fixed;
width: 100%;
height: 200rpx;
background: #ffffff;
bottom: 0;
left: 0;
z-index: 1001;
display: flex;
align-items: center;
justify-content: space-around;
transition: all 0.3s;
transform: translateY(100%);
}
.share-container button{
appearance: none;
background: transparent;
border: none !important;
-webkit-appearance: none;
color:#333333;
}
.share-container button::after { border: none; }
.sliderUp{
transform: translateY(0) !important;
}
.share-container .share-item{
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.share-container .share-item image{
width: 80rpx;
height: 80rpx;
margin-bottom: 5rpx;
}
\ No newline at end of file
src/shoppingGuid/page/pages/myMemberList/myMemberList.js
View file @
a942a3da
...
...
@@ -2,17 +2,13 @@
const
app
=
getApp
()
const
wxService
=
require
(
'../../../../utils/wxService'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
// {logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png', name : 'zhansgan'}
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
list
:
[
{
logo
:
'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/biaka_default_u_logo.png'
,
name
:
'zhansgan'
}
],
list
:
[],
name
:
''
,
loadingText
:
'数据加载中..'
},
...
...
@@ -41,12 +37,14 @@ wxService.page({
if
(
result
==
0
)
{
wx
.
hideLoading
()
let
list
=
data
?
data
:
[];
list
.
forEach
(
item
=>
{
item
.
disabled
=
item
.
qiyeExternalUserid
?
false
:
true
;
item
.
logo
=
item
.
member
?
(
item
.
member
.
memberWeixin
?
(
item
.
member
.
memberWeixin
.
headimgurl
?
item
.
member
.
memberWeixin
.
headimgurl
:
defaultImg
)
:
defaultImg
)
:
defaultImg
});
if
(
list
.
length
==
0
){
this
.
data
.
loadingText
=
'暂无数据~'
;
}
...
...
src/shoppingGuid/page/pages/myMemberList/myMemberList.wxss
View file @
a942a3da
...
...
@@ -52,7 +52,7 @@ view{
/* list */
.list{
padding: 20rpx
30rpx
;
padding: 20rpx;
width: 100%;
height: auto;
}
...
...
@@ -64,9 +64,7 @@ view{
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
/* border: solid 2rpx #ddd; */
border-radius: 10rpx;
box-shadow: 0 0 10rpx 4rpx rgba(0,0,0,0.1);
}
.list .item .u-info{
...
...
src/shoppingGuid/page/pages/selectUsers/selectUsers.json
View file @
a942a3da
{
"navigationBarTitleText"
:
"
我的
会员"
,
"navigationBarTitleText"
:
"会员"
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/shoppingGuid/page/pages/selectUsers/selectUsers.wxss
View file @
a942a3da
...
...
@@ -79,8 +79,9 @@ view{
.tags{
width: 100%;
height: 80rpx;
box-shadow: 0 0 10rpx 4rpx rgba(0, 0, 0, 0.1);
/* box-shadow: 0 0 10rpx 4rpx rgba(0, 0, 0, 0.1); */
position: relative;
background: #f2f2f2;
}
.tags .flex{
...
...
@@ -95,19 +96,22 @@ view{
min-width: 160rpx;
max-width: 160rpx;
height: 100%;
border-left: 6rpx solid rgba(0,0,0,0.1);
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-size: 24rpx;
color: #999999;
}
.tags .flex .lf{
flex: 1;
padding: 0 20rpx;
display: flex;
align-items: center;
overflow-x: auto;
border-right: 6rpx solid rgba(0,0,0,0.1);
}
.tags .flex .lf .tag-item{
...
...
@@ -145,7 +149,7 @@ view{
display: flex;
flex-wrap: wrap;
overflow-y: auto;
box-shadow: 0 4rpx 10rpx 4rpx rgba(0,0,0,0.1);
/* box-shadow: 0 4rpx 10rpx 4rpx rgba(0,0,0,0.1); */
}
.tag-hover.show{
...
...
@@ -171,18 +175,18 @@ view{
/* list */
.list{
padding: 20rpx 30rpx;
padding-top: 0;
}
.list .list-item{
width: 100%;
height: auto;
padding: 20rpx;
padding:
30rpx
20rpx;
background: #ffffff;
display: flex;
align-items: center;
box-shadow: 0 0 10rpx 4rpx rgba(0,0,0,0.1);
margin-bottom: 20rpx;
border-radius: 10rpx;
}
.list .list-item:active{
...
...
src/shoppingGuid/page/pages/welfare/welfare.json
View file @
a942a3da
{
"navigationBarTitleText"
:
"
福利
"
,
"navigationBarTitleText"
:
"
营销
"
,
"usingComponents"
:
{
"tab-bar"
:
"../../../component/tabBar/tabBar"
}
...
...
src/shoppingGuid/page/pages/welfare/welfare.wxml
View file @
a942a3da
This diff is collapsed.
Click to expand it.
src/shoppingGuid/page/pages/welfare/welfare.wxss
View file @
a942a3da
This diff is collapsed.
Click to expand it.
src/utils/Http.js
View file @
a942a3da
...
...
@@ -100,9 +100,9 @@ class Http {
method
:
'GET'
,
header
:
{
// 'tunnel-token' : 'brand1002', // 测试
'tunnel-token'
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
// 测试
//
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
//
'tunnel-token' : 'brand1001', // 开发
'tunnel-token'
:
'brand1001'
,
// 开发
'tentacle-content'
:
this
.
getTentacle
(),
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
...
...
@@ -138,9 +138,9 @@ class Http {
method
:
'POST'
,
header
:
{
// 'tunnel-token' : 'brand1002', // 测试
'tunnel-token'
:
'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD'
,
// 测试
//
'tunnel-token': 'aa8a1bfb7f6c5031d172d94b6574293ef954a6f2d4e16657da008e0cc15588feD', // 测试
// 'tunnel-token' : 'd6db651f8b9c7db4176465accfc1c913843fd9ad328cd5f4fe201d918072c9e8', // 生产
//
'tunnel-token' : 'brand1001', // 开发
'tunnel-token'
:
'brand1001'
,
// 开发
'tentacle-content'
:
this
.
getTentacle
()
// 'tentacle-content': '{"id":"621346354647797760","tentacleType":3,"tentacleId":"611969009872691200","contentType":1}'
},
...
...
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