Commit d3864156 by 前端

更新代码

1 parent ba22e404
Showing 36 changed files with 1571 additions and 0 deletions
{
"component": true,
"usingComponents": {
"crowdfund-poster":"../CrowdfundPoster/CrowdfundPoster"
}
}
/* subvehicleConversion/components/activityList/activityList.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/components/activityList/activityList.wxml-->
<view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;">
<block>
<view class="main">
<view class="to-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon"/>
<input type="text" placeholder="请输入活动名称" class="input" confirm-type="search"
value="{{activityName}}" placeholder-class="input-placeholder" bindinput="input"
bindconfirm="search"/>
<block wx:if="{{activityName}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset"/>
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick"/>
</view>
</view>
</block>
</view>
<view>{{crowdPosterItem}}</view>
<block>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - 208rpx);"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}">
<block>
<view class="empty"></view>
<block wx:for="{{list}}" wx:key="index">
<view class="activity-box">
<view class="activity-name">
<view class="activity-avatar">
<image src="{{item.activityImg}}" />
</view>
<view class="activity-status">
<view class="left">
<view class="name">{{item.activityName}}</view>
<view class="status">
进行中
</view>
<view class="time">
<view wx:if="{{item.startTime && item.endTime}}">
<text>{{item.startTime || ''}}</text>
<text> 至 </text>
<text>{{item.endTime}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="details-list">
<view class="details">
<view class="details-num">111</view>
<view class="details-text">访客</view>
</view>
<view class="details">
<view class="details-num">111</view>
<view class="details-text">订单</view>
</view>
<view class="details">
<view class="details-num">111</view>
<view class="details-text">产值(总)/元</view>
</view>
</view>
<view class="activity-menu">
<view class="orderListBtn" bindtap="clickVisitor">我的访客</view>
<view class="orderListBtn" bindtap="clickOrder">我的订单</view>
<view class="orderListBtn" bindtap="shareActivity">分享活动</view>
<view class="orderListBtn" bindtap="download">分享母链</view>
</view>
</view>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="/packageCrowdFunding/images/noData.png" />
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</block>
<!--&lt;!&ndash; bindlongtouch="longtouch"&ndash;&gt; scrollImg="{{false}}"-->
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" />
// packageEquity/components/storePicker/storePicker.js
Component({
options: {
// 在组件定义时的选项中启用多slot支持
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
items: {
type: Array,
value: [],
observer: function (n) {
let { selectObj, defaultSelectInfo } = this.data
if (n && selectObj.key) {
let defaultSelectIndex = n?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) > -1 ? n?.findIndex(v => {return v[selectObj.key] == defaultSelectInfo[selectObj.key]}) : 0
this.setData({defaultSelectIndex: [defaultSelectIndex], selectIndex: defaultSelectIndex})
}
}
},
show: {
type: Boolean,
},
defaultSelectInfo: {
type: Object
},
selectObj: {
type: Object
}
},
/**
* 组件的初始数据
*/
data: {
searchValue:'',
selectIndex:'',
edit: false,
defaultSelectIndex: []
},
/**
* 组件的方法列表
*/
methods: {
open() {
if (this.data.disabled) return
this.setData({
edit: true,
inputFocus: true
})
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let {
value
} = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
inputBlur(e) {
this.emit(e)
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail:{
value
},
type
} = e
this.setData({
edit: false
})
this.setValue(value)
this.triggerEvent(type == 'confirm' ? 'search' : 'blur', {value})
},
confirm() {
let {selectIndex, items } = this.data
if (!items.length) {
return wx.$util.showToast('请选择门店')
}
this.triggerEvent('confirm', selectIndex)
this.setData({
show: false
})
},
changeStore(e) {
this.setData({
selectIndex: e.detail.value[0]
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx">
<view class='date-container'>
<view class='date-confirm'>
<view class="search-box">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
<block wx:if="{{searchValue}}">
{{searchValue}}
</block>
<block wx:else>
<image src="../../../images/search.png" class="icon"></image>
请输入{{selectObj.placeholder}}
</block>
</view>
</block>
<block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view class="picker" value="{{defaultSelectIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore">
<picker-view-column>
<block wx:for="{{items}}" wx:key="item">
<view class="view pickViewColumn">{{item[selectObj.label]}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
/* packageEquity/components/storePicker/storePicker.wxss */
.search-box {
height: 104rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 0 32rpx;
font-size: 28rpx;
}
.search-box .search-input {
width: 686rpx;
height: 72rpx;
background: #F7F8FA;
border-radius: 38rpx;
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon{
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
.search-input .placeholder{
color: #C8C9CC;
}
.date-confirm {
display: flex;
justify-content: center;
align-items: center;
padding:0 20rpx;
font-size:34rpx;
line-height: 70rpx;
}
.picker-box{
height: 450rpx;
display: flex;
}
.picker-box .picker{
width: 100%;
}
.tbn_class{
font-size: 26rpx;
color: #333;
}
.pickViewColumn{
text-align: center;
line-height: 34px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file \ No newline at end of file
// subvehicleConversion/pages/activityManagement/activityManagement.js
import { get4SStoreList, getStaffListByMerchant } from '~/store/index'
Page({
/**
* 页面的初始数据
*/
data: {
showStorePicker: false,
userInfo: {},
navBarHeight: 0,
selectObj: {
key: 'merchantId',
label: 'merchantName',
placeholder: '门店'
},
defaultSelectInfo: {}
},
init(userInfo) {
this.setData({ userInfo })
this.getStoreList()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
showStorePicker() {
this.setData({
showStorePicker: true
})
},
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
this.setData({
defaultSelectInfo: userInfo?.default4SStoreInfo_crowdFunding
})
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
})
: 0
// 获取门店下的员工(推荐人)
let params = {
merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}
getStaffListByMerchant({...params})
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
})
.catch(err => {})
},
changePicker(e) {
let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo_crowdFunding = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding })
this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding }
})
// 获取门店下的员工(推荐人)
let params = {
merchantId: storeListRange[value]?.merchantId
}
getStaffListByMerchant({...params})
// 获取门店下活动列表
this.selectComponent(`#order-list`)?.onLoad && this.selectComponent(`#order-list`).onLoad()
},
back() {
wx.$router.reLaunch('pages.sceneIndex')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
{
"usingComponents": {
"top-select-picker": "../../components/topSelectPicker/topSelectPicker",
"activity-list": "../../components/activityList/activityList"
},
"navigationStyle": "custom"
}
/* subvehicleConversion/pages/activityManagement/activityManagement.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/activityManagement/activityManagement.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view>
<view class="arrow">
<image src="/images/back.png"/>
</view>
</view>
</navigation-bar>
<block wx:if="{{navBarHeight && showPage}}">
<activity-list id="activityList-list" navBarHeight="{{navBarHeight}}"></activity-list>
</block>
<top-select-picker show="{{showStorePicker}}" selectObj="{{selectObj}}" bindsearch="getStoreList" defaultSelectInfo="{{defaultSelectInfo}}" items="{{storeListRange}}" bindconfirm="changePicker"></top-select-picker>
// subvehicleConversion/pages/index/index.js
import { get4SStoreList, getStaffListByMerchant } from '~/store/index'
Page({
/**
* 页面的初始数据
*/
data: {
showStorePicker: false,
userInfo: {},
navBarHeight: 0,
selectObj: {
key: 'merchantId',
label: 'merchantName',
placeholder: '门店'
},
defaultSelectInfo: {}
},
init(userInfo) {
this.setData({ userInfo })
this.getStoreList()
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
showStorePicker() {
this.setData({
showStorePicker: true
})
},
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
this.setData({
defaultSelectInfo: userInfo?.default4SStoreInfo_crowdFunding
})
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_crowdFunding?.merchantId
})
: 0
// 获取门店下的员工(推荐人)
let params = {
merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId
}
getStaffListByMerchant({...params})
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
})
.catch(err => {})
},
changePicker(e) {
let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo_crowdFunding = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding })
this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo_crowdFunding }
})
// 获取门店下的员工(推荐人)
let params = {
merchantId: storeListRange[value]?.merchantId
}
getStaffListByMerchant({...params})
// 获取门店下活动列表
this.selectComponent(`#order-list`)?.onLoad && this.selectComponent(`#order-list`).onLoad()
},
back() {
wx.$router.reLaunch('pages.sceneIndex')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
{
"usingComponents": {
"top-select-picker": "../../components/topSelectPicker/topSelectPicker",
"conversion-list": "../../components/conversionList/conversionList"
},
"navigationStyle": "custom"
}
/* subvehicleConversion/pages/index/index.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/index/index.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_crowdFunding && userInfo.default4SStoreInfo_crowdFunding.merchantName}}</view>
<view class="arrow">
<image src="/images/back.png"/>
</view>
</view>
</navigation-bar>
<block wx:if="{{navBarHeight && showPage}}">
<conversion-list id="conversion-list" navBarHeight="{{navBarHeight}}"></conversion-list>
</block>
<top-select-picker show="{{showStorePicker}}" selectObj="{{selectObj}}" bindsearch="getStoreList" defaultSelectInfo="{{defaultSelectInfo}}" items="{{storeListRange}}" bindconfirm="changePicker"></top-select-picker>
// subvehicleConversion/pages/order/order.js
Page({
/**
* 页面的初始数据
*/
data: {
list: [
{
"customerUnionId" : "oV6hWtyKQL-BTOf1RAcE5KMiGe48",
"guestId" : null,
"customerImageUrl" : "https://thirdwx.qlogo.cn/mmopen/vi_32/umbyoicGRSunibJ8YjeW7AicNej8ITIyick8AzwC7gOp4cIBCgwcbsEh6uchRs0DmrgyP7ngclRFXytiaBeibILg1VWw/132",
"customerPhone" : "17750020170",
"customerNickName" : "stupid z.",
"customerType" : 1,
"activityImg" : "https://scrm.test.glsx.com.cn/group1/M00/04/B1/wKgD3mRYX0KAUczcAAUiRiy-Ug4173.jpg",
"activityName" : "关联尾款单确认活动",
"visitCount" : 3,
"orderStatus" : 0,
"lastVisitTime" : "2天前",
"lastVisitDate" : 1683705816000,
"firstVisitDate" : 1683705778000
}, {
"customerUnionId": "oV6hWt3f6-c36hpqcr3TwYvlfmNs",
"guestId": null,
"customerImageUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKsrkKhApf2yFIkoeOy3CP2mtJLjJVDT4guibOpCYXUIk44c2tE0gTzSHfaW1WTvYuukEMicNDKFLBg/132",
"customerPhone": "18978849947",
"customerNickName": "专吃猴面包树的绵羊",
"customerType": 1,
"activityImg": "https://scrm.test.glsx.com.cn/group1/M00/04/B1/wKgD3mRYX0KAUczcAAUiRiy-Ug4173.jpg",
"activityName": "关联尾款单确认活动",
"visitCount": 1,
"orderStatus": 0,
"lastVisitTime": "4天前",
"lastVisitDate": 1683513213000,
"firstVisitDate": 1683513213000
}
],
allNum: 0,
todayNum: 0,
// activityTypList: index_const.data.activityTypList,
// IMG_URL:IMG_URL_STORE,
isPravite:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
// onRoute(options) {
// let activityId = options.activityId
// ActivityApi.getActivityVisitorList({
// activityId,
// staffFlag:true
// }).then(res => {
// res.visitorList && res.visitorList.forEach(val => {
// val.lastVisitFormatTime = commentTime(val.lastVisitDate)
// if(!val.customerPhone&&val.guestId){
// val.gId = (val.guestId.split('_')).pop() || ''
// }
// })
// this.setData({
// allNum: res.visitorTotal,
// todayNum: res.todayTotal,
// list: res.visitorList
// })
// })
// },
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
wx.setClipboardData({
data: name
})
}
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success (res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
{
"usingComponents": {},
"navigationBarTitleText": "我的订单"
}
/* subvehicleConversion/pages/order/order.wxss */
.visitor-box{
min-height: 100vh;
//background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden;
.img-bg{
width: 100%;
height: 400rpx;
float: left;
}
.content{
width: 100%;
float: left;
margin-top: -400rpx;
.title{
padding: 32rpx 34rpx 0 34rpx;
font-size: 36rpx;
font-weight: 600;
color: #1B233D;
display: flex;
view:last-child{
margin-left: 48rpx;
}
text {
font-size: 28rpx;
font-weight: 400;
}
}
.list-box{
margin: 32rpx 24rpx;
right: 0;
left: 0;
.list-item{
margin-bottom: 24rpx;
//background-image: linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%);
border-radius: 24rpx;
padding: 24rpx 40rpx;
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, 0.24), inset 0 -2rpx 6rpx 0 rgba(255, 255, 255, 0.40);
position: relative;
.status{
position: absolute;
right: 0;
top: 0;
width: 120rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border-radius: 0 24rpx;
color: #819AEA;
font-size: 28rpx;
background: linear-gradient(to right,#819AEA,#fff);
}
.top{
display: flex;
align-items: center;
.top-left{
display: flex;
image {
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 50%;
}
.name{
font-size: 30rpx;
color: #1B233D;
display: flex;
align-items: center;
max-width: 400rpx;
.copy{
width: 28rpx;
height: 28rpx;
margin-left: 8rpx;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
}
.top-right{
.btn_icon{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
background: #F2F7FE;
border-radius: 8px;
padding: 24rpx 32rpx;
.activity-box .activity-name {
display: flex;
}
.activity-box .activity-name .activity-avatar {
width: 150rpx;
height: 150rpx;
}
.activity-box .activity-name .activity-status {
width: 70%;
display: flex;
justify-content: space-between;
padding-top: 15rpx;
margin: 0rpx 20rpx;
}
.activity-box .activity-name .activity-status .left{
width: calc(100% - 100rpx);
}
.activity-box .activity-name .activity-status .right{
color: #F35251;
}
.activity-box .activity-name .activity-status .name {
font-size: 32rpx;
width: 300rpx;
font-weight: 500
}
.activity-box .activity-name .activity-status .describe {
margin: 10rpx 0 10rpx 10rpx;
font-size: 24rpx;
color: #7A8299
}
.activity-box .activity-name .activity-status .time {
font-size: 26rpx;
color: #9B9B9E;
display: flex;
}
.footprint{
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
margin-top: 16rpx;
}
.pravite-text{
font-weight: 500;
font-size: 30rpx;
color: #6E6E7A;
line-height: 44rpx;
text {
margin-left: 0;
}
}
}
//.status{
// position: absolute;
// right: 0;
// top: 0;
// width: 172rpx;
// height: 52rpx;
// display: flex;
// align-items: center;
// justify-content: center;
// font-weight: 400;
// font-size: 26rpx;
// color: #EB9109;
//
//}
//.status-2{
// color: #3FCF77;
//
//}
}
.orderde{
background-image: linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%);
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, 0.24), inset 0 -2rpx 6rpx 0 rgba(255, 255, 255, 0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
.no_data_image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
<!--subvehicleConversion/pages/order/order.wxml-->
<view class="visitor-box">
<view class="img-bg">
<!-- <glsx-image class="bg_image" webp src="store-assistant/visitor_bg.png"></glsx-image>-->
</view>
<view class="content">
<view class="title">
<view>总订单<text> · {{allNum}}</text></view>
<view>今日订单<text> · {{todayNum}}</text></view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="status">待安装</view>
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" data-name="{{item.customerNickName}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view>
<view class="mobile" wx:if="{{item.customerPhone}}">
{{item.customerPhone}}
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>-->
</view>
<view class="mobile" wx:else>
ID:{{item.gId}}
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>-->
</view>
<!-- <image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></image>-->
</view>
</view>
<view class="top-right">
<image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></image>
</view>
</view>
<view class="bottom">
<view class="activity-box">
<view class="activity-name">
<view class="activity-avatar">
<image src="{{item.activityImg}}" />
</view>
<view class="activity-status">
<view class="left">
<view class="name">{{item.activityName}}</view>
<view class="describe">嘻嘻嘻嘻嘻</view>
<view class="time">
<text >活动时间:</text>
</view>
</view>
<view class="right">
$111
</view>
</view>
</view>
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view style="padding-top:8rpx" class="name">
{{item.customerNickName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="activity pravite-text">
<text>活动</text>
{{item.taskName || ''}}
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
<view class="status {{item.visitStatus==1?'status-2':''}}" style="background: url({{IMG_URL}}store-assistant/{{item.visitStatus==1?'order_status_11':'order_status_1'}}.png);background-size: 100% 100%;">{{item.visitStatus==1?'已':'未'}}领取奖励</view>
</view>
</block>
</block>
</view>
<view class="no-data" wx:if="{{!list.length}}">
<glsx-image class="no_data_image" webp src="store-assistant/no_visitor_data.png"></glsx-image>
<view class="text">暂无访客</view>
</view>
</view>
</view>
// subvehicleConversion/pages/visitor/visitor.js
Page({
/**
* 页面的初始数据
*/
data: {
list: [
{
"customerUnionId" : "oV6hWtyKQL-BTOf1RAcE5KMiGe48",
"guestId" : null,
"customerImageUrl" : "https://thirdwx.qlogo.cn/mmopen/vi_32/umbyoicGRSunibJ8YjeW7AicNej8ITIyick8AzwC7gOp4cIBCgwcbsEh6uchRs0DmrgyP7ngclRFXytiaBeibILg1VWw/132",
"customerPhone" : "17750020170",
"customerNickName" : "stupid z.",
"customerType" : 1,
"activityImg" : "https://scrm.test.glsx.com.cn/group1/M00/04/B1/wKgD3mRYX0KAUczcAAUiRiy-Ug4173.jpg",
"activityName" : "关联尾款单确认活动",
"visitCount" : 3,
"orderStatus" : 0,
"lastVisitTime" : "2天前",
"lastVisitDate" : 1683705816000,
"firstVisitDate" : 1683705778000
}, {
"customerUnionId": "oV6hWt3f6-c36hpqcr3TwYvlfmNs",
"guestId": null,
"customerImageUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKsrkKhApf2yFIkoeOy3CP2mtJLjJVDT4guibOpCYXUIk44c2tE0gTzSHfaW1WTvYuukEMicNDKFLBg/132",
"customerPhone": "18978849947",
"customerNickName": "专吃猴面包树的绵羊",
"customerType": 1,
"activityImg": "https://scrm.test.glsx.com.cn/group1/M00/04/B1/wKgD3mRYX0KAUczcAAUiRiy-Ug4173.jpg",
"activityName": "关联尾款单确认活动",
"visitCount": 1,
"orderStatus": 0,
"lastVisitTime": "4天前",
"lastVisitDate": 1683513213000,
"firstVisitDate": 1683513213000
}
],
allNum: 0,
todayNum: 0,
// activityTypList: index_const.data.activityTypList,
// IMG_URL:IMG_URL_STORE,
isPravite:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
// onRoute(options) {
// let activityId = options.activityId
// ActivityApi.getActivityVisitorList({
// activityId,
// staffFlag:true
// }).then(res => {
// res.visitorList && res.visitorList.forEach(val => {
// val.lastVisitFormatTime = commentTime(val.lastVisitDate)
// if(!val.customerPhone&&val.guestId){
// val.gId = (val.guestId.split('_')).pop() || ''
// }
// })
// this.setData({
// allNum: res.visitorTotal,
// todayNum: res.todayTotal,
// list: res.visitorList
// })
// })
// },
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
wx.setClipboardData({
data: name
})
}
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success (res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
{
"usingComponents": {},
"navigationBarTitleText": "我的访客"
}
\ No newline at end of file \ No newline at end of file
/* subvehicleConversion/pages/visitor/visitor.wxss */
.visitor-box{
min-height: 100vh;
//background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden;
.img-bg{
width: 100%;
height: 400rpx;
float: left;
}
.content{
width: 100%;
float: left;
margin-top: -400rpx;
.title{
padding: 32rpx 34rpx 0 34rpx;
font-size: 36rpx;
font-weight: 600;
color: #1B233D;
display: flex;
view:last-child{
margin-left: 48rpx;
}
text{
font-size: 28rpx;
font-weight: 400;
}
}
.list-box{
margin: 32rpx 24rpx;
right: 0;
left: 0;
.list-item{
margin-bottom: 24rpx;
//background-image: linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%);
border-radius: 24rpx;
padding: 24rpx 40rpx;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
position: relative;
.top{
display: flex;
justify-content: space-between;
align-items: center;
.top-left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 50%;
}
.name{
font-size: 30rpx;
color: #1B233D;
display: flex;
align-items: center;
max-width: 400rpx;
.copy{
width: 28rpx;
height: 28rpx;
margin-left: 8rpx;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
}
.top-right{
.btn_icon{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
background: #F2F7FE;
border-radius: 8px;
padding: 24rpx 32rpx;
.activity{
font-size: 30rpx;
font-weight: 600;
line-height: 48rpx;
color: #1B233D;
text{
display: inline-block;
padding: 2rpx 16rpx;
height: 40rpx;
border-radius: 22rpx;
font-weight: 400;
font-size: 24rpx;
color: #673F00;
text-align: center;
line-height: 40rpx;
margin-left: 16rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
}
}
.footprint{
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
margin-top: 16rpx;
}
.pravite-text{
font-weight: 500;
font-size: 30rpx;
color: #6E6E7A;
line-height: 44rpx;
text{
margin-left: 0;
}
}
}
.status{
position: absolute;
right: 0;
top: 0;
width: 172rpx;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26rpx;
color: #EB9109;
}
.status-2{
color: #3FCF77;
}
}
.orderde{
background-image: linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%);
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
.no_data_image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
<!--subvehicleConversion/pages/visitor/visitor.wxml-->
<view class="visitor-box">
<view class="img-bg">
<!-- <glsx-image class="bg_image" webp src="store-assistant/visitor_bg.png"></glsx-image>-->
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" data-name="{{item.customerNickName}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view>
<view class="mobile" wx:if="{{item.customerPhone}}">
{{item.customerPhone}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile" wx:else>
ID:{{item.gId}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
</view>
</view>
<view class="top-right">
<image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></image>
<!-- <glsx-image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></glsx-image>-->
<!-- <glsx-image class="btn_icon" wx:if="{{item.userWechartNo}}" webp src="store-assistant/activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></glsx-image>-->
</view>
</view>
<view class="bottom">
<view class="activity">
{{item.activityName}}
<!-- <text>{{activityTypList[0]}}</text> -->
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top">
<view class="top-left">
<image webp src="{{item.customerImageUrl ? item.customerImageUrl : '{{IMG_URL}}store-assistant/default_avatar.png'}}"></image>
<view class="name-mobile">
<view style="padding-top:8rpx" class="name">
{{item.customerNickName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="activity pravite-text">
<text>活动</text>
{{item.taskName || ''}}
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
<view class="status {{item.visitStatus==1?'status-2':''}}" style="background: url({{IMG_URL}}store-assistant/{{item.visitStatus==1?'order_status_11':'order_status_1'}}.png);background-size: 100% 100%;">{{item.visitStatus==1?'已':'未'}}领取奖励</view>
</view>
</block>
</block>
</view>
<view class="no-data" wx:if="{{!list.length}}">
<glsx-image class="no_data_image" webp src="store-assistant/no_visitor_data.png"></glsx-image>
<view class="text">暂无访客</view>
</view>
</view>
</view>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!