Commit 103a7d09 by zhangquan

Merge branch 'v3.0' into zq_dev_3.0

2 parents 3cae8679 5b77ff9f
Showing 107 changed files with 4655 additions and 7 deletions
project.config.json
project.private.config.json
sitemap.json
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
import api from '~/utils/request/request'
const path = 'scrm.api.assistant.service.activity'
module.exports = {
// 获取活动列表数据
getActivityList(data) {
return api.post({
method: `${path}.list`,
...data
})
},
// 获取活动中任务内容
getActiveTaskList(data) {
return api.post({
method: `${path}.detail.new`,
...data
})
},
// 获取活动诊断订单数据
getActivityEndOrderList(data) {
return api.post({
method: `${path}.detail.old`,
...data
})
}
}
\ No newline at end of file
import api from '~/utils/request/request'
import api from '../utils/request/request'
import ssoApi from './ssoApi'
const common = 'scrm.api.carlife.common.'
module.exports = {
......
......@@ -46,12 +46,36 @@
}
]
},
"subpackages": [],
"subpackages": [
{
"root": "packageActivity",
"pages": [
"pages/visitor/visitor",
"pages/order/order",
"pages/taskDetail/taskDetail",
"pages/warReport/warReport",
"pages/applyActivity/applyActivity",
"pages/applySuccess/applySuccess"
]
},
{
"root": "packageMine",
"pages": [
"pages/editBasicInfo/index",
"pages/settingName/index",
"pages/withdrawal/index",
"pages/withdrawalSuccess/index",
"pages/withdrawalNote/index"
]
}
],
"usingComponents": {
"navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index"
"van-popup": "@vant/weapp/popup/index",
"install-popup": "/components/installPopup/installPopup",
"van-loading": "@vant/weapp/loading/index"
},
"resolveAlias": {
"~/*": "/*"
......
......@@ -96,7 +96,21 @@
font-size: 24rpx;
height: 100%;
}
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
@keyframes show-box {
0% {
opacity: 0;
......
// components/installPopup/installPopup.js
import {imgUrlMixin} from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
show: {
type: Boolean,
value: false
},
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
hidePopup() {
let thisPage = wx.$router.getPageInstance()
if (thisPage) thisPage.setData({
showPopup: false
})
// 组件引用关闭弹窗
this.triggerEvent("hidePopup")
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* components/installPopup/installPopup.wxss */
.content{
width: 560rpx;
height: 480rpx;
background: #FFFFFF;
box-shadow: inset 0 0 48rpx 16rpx #E0EAFF;
.title{
font-weight: 600;
font-size: 40rpx;
color: #3D5BD6;
padding-top: 64rpx;
text-align: center;
}
.middle{
padding: 40rpx 0 80rpx 80rpx;
view{
font-size: 30rpx;
color: #1B233D;
.label{
color: #7A8299;
display: inline-block;
width: 140rpx;
}
}
}
.mobile{
padding-top: 10rpx;
line-height: 56rpx;
image{
width: 56rpx;
height: 56rpx;
margin-left: 16rpx;
}
}
.btn-box{
display: flex;
justify-content: center;
.btn{
width: 320rpx;
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
color: #ffffff;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
}
\ No newline at end of file
<!--components/installPopup/installPopup.wxml-->
<van-popup show="{{ show }}" round bind:close="onClose">
<view class="content">
<view class="title">预约安装信息</view>
<view class="middle">
<view class="name">
<text class="label">联系人</text>
<text>{{data.userName}}</text>
</view>
<view class="mobile">
<text class="label">联系方式</text>
<text>{{data.userMobile}}</text>
<image wx:if="{{data.userMobile}}" webp src="{{IMGURL}}activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{data.userMobile}}"></image>
</view>
</view>
<view class="btn-box">
<view class="btn" bind:tap="hidePopup">我知道了</view>
</view>
</view>
</van-popup>
Page({
data: {
list: [
{
name: '新车洽谈场景',
tip: '1.0 新车权益销售',
},
{
name: '新车交付场景',
tip: '1.1 新车精品升级',
},
{
name: '0-12个月',
tip: '1.2 新车线上转化',
},
{
name: '12个月以上',
tip: '1.3 存量用户众筹',
},
],
currentIndex: 0,
product: [
{
id: 0,
name: '360全景导航',
isSelect: false
},
{
id: 0,
name: '360全景导航',
isSelect: false
},
{
id: 0,
name: '360全景导航',
isSelect: false
},
{
id: 0,
name: '360全景导航',
isSelect: false
},
{
id: 0,
name: '360全景导航',
isSelect: false
}
]
},
select(e) {
const { index } = e.currentTarget.dataset
this.setData({
currentIndex: index
})
},
selectProduct(e) {
const { item, index } = e.currentTarget.dataset
let name = `product[${index}].isSelect`
this.setData({
[name]: !item.isSelect
})
},
// 申请开通
applyOpened() {
// 接口
wx.$router.go('packageActivity.applySuccess')
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "申请活动"
}
\ No newline at end of file
page {
background: white;
}
.container {
position: relative;
}
.pos_wrap {
position: absolute;
left: 24rpx;
top: 336rpx;
}
.wrapper {
width: calc(100% - 48rpx);
background: #FFFFFF;
box-shadow: 0 12rpx 24rpx 0 rgba(106, 126, 204, 0.12);
border-radius: 24rpx;
padding: 32rpx 0;
.title {
box-sizing: border-box;
padding: 0 32rpx 32rpx 32rpx;
font-weight: 400;
font-size: 28rpx;
color: #9E9EA8;
.txt {
color: #1B233D;
}
}
.titleSign {
box-sizing: border-box;
padding: 0 32rpx;
.lineTip {
width: 6rpx;
height: 28rpx;
transform: rotate(-180deg);
background: #4466F0;
border-radius: 8rpx 8rpx 0 0;
margin-right: 18rpx;
}
.label {
font-weight: 500;
font-size: 32rpx;
color: #1B233D;
line-height: 56rpx;
}
}
.sinceTitle {
font-weight: 500;
font-size: 28rpx;
color: #323436;
margin-top: 24rpx;
margin-bottom: 32rpx;
box-sizing: border-box;
padding-left: 32rpx;
}
.widget {
box-sizing: border-box;
padding: 0 16rpx;
.element {
width: 154rpx;
height: 180rpx;
background: #F7F8FA;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
border: 2rpx solid #F7F8FA;
.icon {
width: 56rpx;
height: 56rpx;
margin-top: 20rpx;
}
.name {
font-size: 24rpx;
color: #323436;
line-height: 44rpx;
font-weight: 500;
}
.tip {
font-size: 18rpx;
color: #8A8C90;
line-height: 24rpx;
}
.active_color {
color: #4466F0;
}
}
.active {
background-image: linear-gradient(145deg, #E6E6FF 0%, #FFFFFF 73%);
border: 2rpx solid #4466F0;
.triangle-down {
width: 18rpx;
height: 18rpx;
display: inline-block;
position: absolute;
bottom: -4rpx;
right: 50%;
background-color: #fff;
border-top: 2rpx solid #4466F0;
border-left: 2rpx solid #4466F0;
transform: rotate(225deg) translateX(-50%);
}
// .triangle-down_temp {
// width: 0;
// height: 0;
// border-left: 15rpx solid transparent;
// border-right: 15rpx solid transparent;
// border-top: 13rpx solid white;
// position: absolute;
// left: 50%;
// bottom: -13rpx;
// transform: translateX(-50%);
// }
}
}
.title_tip {
font-weight: 500;
font-size: 28rpx;
color: #323436;
margin: 48rpx 0 32rpx 32rpx;
.tips {
font-weight: 400;
font-size: 22rpx;
color: #323436;
}
}
.product_wrap {
box-sizing: border-box;
padding: 0 32rpx;
flex-wrap: wrap;
.box {
width: 33.33%;
box-sizing: border-box;
padding-right: 12rpx;
}
.element {
width: 100%;
height: 60rpx;
background: #F5F6FA;
border-radius: 12rpx;
font-weight: 400;
font-size: 28rpx;
color: #323436;
line-height: 44rpx;
margin-bottom: 20rpx;
border: 1rpx solid #F5F6FA;
}
.active {
background: rgba(71, 106, 250, 0.09);
border: 1rpx solid #6A84F0;
border-radius: 12rpx;
color: #4466F0;
font-weight: 500;
}
}
}
.btn {
width: 622rpx;
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin: 64rpx 0 64rpx 40rpx;
}
\ No newline at end of file
<view class="container">
<image mode="widthFix" class="topBg" src="{{IMGURL + 'apply_activity_bg_' + currentIndex + '.png'}}" />
<view class="pos_wrap">
<view class="wrapper">
<view class="title">
<text>开通门店:</text>
<text class="txt">嘀加辉鹏奥迪4s店</text>
</view>
<view class="titleSign flex_sc">
<view class="lineTip"></view>
<view class="label">开通门店活动产品/活动</view>
</view>
<view class="sinceTitle">业务场景</view>
<view class="widget flex_scb">
<block wx:for="{{list}}" wx:key="index">
<view bind:tap="select" data-index="{{index}}" class="element {{currentIndex==index?'active':''}}">
<image mode="widthFix" class="icon" src="{{IMGURL}}apply_activity_icon_{{index+1}}.png" />
<view class="name {{currentIndex==index?'active_color':''}}">
{{item.name}}
</view>
<view class="tip {{currentIndex==index?'active_color':''}}">
{{item.tip}}
</view>
<view class="triangle-down"></view>
<!-- <view class="triangle-down_temp"></view> -->
</view>
</block>
</view>
<view class="title_tip">
产品/活动
<text class="tips">(可多选)</text>
</view>
<view class="product_wrap flex_sc">
<block wx:for="{{product}}" wx:key="index">
<view class="box">
<view bind:tap="selectProduct" data-index="{{index}}" data-item="{{item}}" class="element flex_cc {{item.isSelect?'active':''}}">
{{item.name}}
</view>
</view>
</block>
</view>
</view>
<view class="btn flex_cc" bind:tap="applyOpened">申请开通</view>
</view>
</view>
\ No newline at end of file
// packageActivity/pages/applySuccess/applySuccess.js
Page({
/**
* 页面的初始数据
*/
data: {
},
// 返回首页
gotoHome() {
wx.reLaunch({
url: '/pages/tab/index/index'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "申请成功"
}
\ No newline at end of file
/* packageActivity/pages/applySuccess/applySuccess.wxss */
page{
min-height: 100vh;
background: #fff;
}
.content{
display: flex;
flex-flow: column;
align-items: center;
padding-top: 64rpx;
image{
width: 480rpx;
height: 480rpx;
}
.text-box{
text-align: center;
.success{
font-weight: 600;
font-size: 40rpx;
color: #1B233D;
margin: 16rpx 0 24rpx 0;
}
text{
color: #7A8299;
font-weight: 400;
font-size: 28rpx;
}
}
.back-btn{
width: 622rpx;
height: 84rpx;
background: #FFFFFF;
border: 2rpx solid #DCDFE6;
border-radius: 20rpx;
text-align: center;
line-height: 84rpx;
margin-top: 128rpx;
color: #1B233D;
font-size: 32rpx;
}
}
\ No newline at end of file
<!--packageActivity/pages/applySuccess/applySuccess.wxml-->
<view class="content">
<image webp src="{{IMGURL}}apply_activity_success.png"></image>
<view class="text-box">
<view class="success">申请成功</view>
<text>您的申请已提交,\n请耐心等待顾问专员与您联系。</text>
</view>
<view class="back-btn" bind:tap="gotoHome">返回首页</view>
</view>
// packageActivity/pages/order/order.js
import index_const from '../../../pages/tab/index/index_const'
Page({
/**
* 页面的初始数据
*/
data: {
list: [
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
userWechartNo: 'abcabc123',
orderStatus: 1,
activityName: 'AR导航',
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
activityType: 1,
viewAccount: 10,
time: "2022-10-13 12:00:00",
price: "50.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 2,
activityName: '全景',
activityType: 1,
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
viewAccount: 10,
time: "2022-10-13 10:00:00",
price: "0.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 2,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
time: "2022-10-13 12:33:00",
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
price: "15.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
orderStatus: 1,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
time: "2022-10-13 12:00:00",
price: "50.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 2,
activityName: '全景',
activityType: 1,
viewAccount: 10,
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
time: "2022-10-13 10:00:00",
price: "50.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 2,
activityName: '众筹',
activityType: 1,
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
viewAccount: 10,
time: "2022-10-13 12:33:00",
price: "50.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 3,
activityName: '全景',
activityType: 1,
viewAccount: 10,
time: "2022-10-13 10:00:00",
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
price: "50.45"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 3,
activityName: '众筹',
activityImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png',
activityType: 1,
viewAccount: 10,
time: "2022-10-13 12:33:00"
},
],
allVisitorNum: 861,
todayVisitorNum: 15,
orderStatusImgList: ['已完成', '待付款', '待安装'],
statusColor: ['#7A8299', '#DF9800', '#4466F0'],
statusBackgroundColor: [
'linear-gradient(90deg, #F2F4FA 9%, #FCFDFF 100%)',
'linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%)',
'linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%)'
],
installItem: {},
activityTypList: index_const.data.activityTypList
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
// 打电话
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"
})
}
})
},
// 查看预约安装信息
showPopup(e) {
let { item } = e.currentTarget.dataset
this.setData({
installItem: item,
showPopup: true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "我的订单"
}
\ No newline at end of file
/* packageActivity/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{
position: relative;
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);
.top{
display: flex;
align-items: center;
.top-left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
}
.name{
font-size: 30rpx;
color: #1B233D;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
}
}
.top-right{
margin-left: 20rpx;
image{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
background: #FFFFFF;
border-radius: 8px;
padding: 24rpx;
display: flex;
image{
width: 144rpx;
height: 144rpx;
margin-right: 16rpx;
}
.activity{
flex: 1;
.name{
font-size: 30rpx;
font-weight: 600;
line-height: 48rpx;
color: #1B233D;
text{
color: #EB4E4E;
font-size: 24rpx;
font-weight: bold;
float: right;
}
}
.activity-type{
display: inline-block;
padding: 0 16rpx;
height: 44rpx;
background: #F2F3F7;
border-radius: 22rpx;
color: #6E6E7A;
line-height: 44rpx;
font-size: 24rpx;
margin: 16rpx 0;
}
.time{
font-size: 26rpx;
color: #7A8299;
text{
margin-left: 16rpx;
color: #1B233D;
}
}
}
}
.order-status{
position: absolute;
top: 0;
right: 0;
width: 132rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
image{
position: absolute;
}
text{
position: absolute;
display: inline-block;
text-align: center;
width: 100%;
height: 100%;
line-height: 56rpx;
font-size: 28rpx;
}
}
.btn-box{
display: flex;
justify-content: center;
margin-top: 20rpx;
.btn{
width: 232rpx;
height: 64rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 16rpx;
text-align: center;
line-height: 64rpx;
color: #FFFFFF;
font-size: 28rpx;
}
}
}
.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 newline at end of file
<!--packageActivity/pages/order/order.wxml-->
<view class="visitor-box">
<view class="img-bg">
<image webp src="{{IMGURL}}visitor_bg.png?v={{img_version}}"></image>
</view>
<view class="content">
<view class="title">
<view>总订单<text> · {{allVisitorNum}}</text></view>
<view>今日订单<text> · {{todayVisitorNum}}</text></view>
</view>
<view class="list-box">
<block wx:for="{{list}}" wx:key="index">
<view class="list-item" style="background-image: {{statusBackgroundColor[item.orderStatus - 1]}};">
<view class="top">
<view class="top-left">
<image webp src="{{item.imgUrl ? item.imgUrl : IMGURL+'order_person_default.png'}}"></image>
<view class="name-mobile">
<view class="name">
{{item.userName}}
<text class="order-statue {{item.orderStatus == 1 ? '' : 'green'}}">{{item.orderStatus == 1 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile">{{item.userMobile}}</view>
</view>
</view>
<view class="top-right">
<image wx:if="{{item.userMobile}}" webp src="{{IMGURL}}activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.userMobile}}"></image>
<image wx:if="{{item.userWechartNo}}" webp src="{{IMGURL}}activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></image>
</view>
</view>
<view class="bottom">
<image webp src="{{item.activityImgUrl}}"></image>
<view class="activity">
<view class="name">{{item.activityName}} <text>¥{{item.price}}</text></view>
<view class="activity-type">{{item.activityName+'-'+activityTypList[item.activityType - 1]}}</view>
<view class="time">下单时间<text>{{item.time}}</text></view>
</view>
</view>
<view class="order-status">
<image webp src="{{IMGURL}}order_status_{{item.orderStatus}}.png"></image>
<text style="color: {{statusColor[item.orderStatus - 1]}};">{{orderStatusImgList[item.orderStatus - 1]}}</text>
</view>
<view wx:if="{{item.orderStatus == 3}}" class="btn-box"><view class="btn" bind:tap="showPopup" data-item="{{item}}">预约安装</view></view>
</view>
</block>
</view>
</view>
</view>
<!-- 预约安装弹窗 -->
<install-popup show="{{showPopup}}" data="{{installItem}}"></install-popup>
// packageActivity/pages/taskDetail/taskDetail.js
import index_const from "../../../pages/tab/index/index_const"
Page({
/**
* 页面的初始数据
*/
data: {
taskTypeImgList: index_const.data.taskTypeImgList,
activityTypList: index_const.data.activityTypList,
detailInfo: {
title: '今日完成首次分享',
content: '指定分享内容在今日完成首次分享',
integralAccount: 20,
activityName: '360全景活动',
merchantName: '广汽丰田鹏峰4S店360全景活动360全景活动',
userName: '余皖平123',
activityType: 1,
taskType: 1,
textContent: '💫广汽丰田鹏峰4S店💫\n#360全景影像系统大酬宾\n任意角度查看 行车无忧\n多角度高清采集,拒绝盲区\n活动时间:9月20日-26日\n联系我获取专属报名通道!',
imgUrlList: [
{url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png', type: 'image'},
{url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png', type: 'image'},
{url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png', type: 'image'},
{url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png', type: 'image'},
// {url: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/share_task_icon.png', type: 'image'},
{url: 'http://scrm.test.glsx.com.cn/group1/M00/00/59/wKgD3mGvIc2AHq2FAAtkYkTMHOI111.mp4', type: 'video', poster: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/order_person_default.png'}
]
},
isloading: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
// 预览图片/视频
previewMedia(e) {
let { imgUrlList } = this.data.detailInfo
let { current } = e.currentTarget.dataset
wx.previewMedia({
sources: imgUrlList,
current: current
})
},
// 复制文案
copyText(e) {
let { textContent } = this.data.detailInfo
wx.setClipboardData({
data: textContent,
success (res) {
wx.showToast({
title: '内容已复制',
icon: "none"
})
}
})
},
// 一键保存
saveWith() {
var that = this
if (that.data.isloading) return
that.setData({
isloading: true
})
// 获取保存到相册权限
wx.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success () {
// 调用保存图片promise队列
that.queue(that.data.detailInfo.imgUrlList)
.then(res => {
that.setData({
isloading: false
})
wx.showToast({
title: '下载完成'
})
})
.catch(err => {
that.setData({
isloading: false
})
})
},
fail() {
that.setData({
isloading: false
})
wx.showToast({
title: '您拒绝了保存到相册'
})
}
})
} else {
that.queue(that.data.detailInfo.imgUrlList)
.then(res => {
that.setData({
isloading: false
})
})
.catch(err => {
that.setData({
isloading: false
})
})
}
}
})
},
// 队列
queue(urls) {
let promise = Promise.resolve()
urls.forEach(item => {
promise = promise.then(() => {
return this.download(item.url, item.type)
})
})
return promise
},
// 下载
download(url, type) {
return new Promise((resolve, reject) => {
wx.downloadFile({
url: url,
success: function (res) {
var temp = res.tempFilePath
let fn = type == 'image' ? wx.saveImageToPhotosAlbum : wx.saveVideoToPhotosAlbum
fn({
filePath: temp,
success: function (res) {
resolve(res)
},
fail: function (err) {
reject(res)
}
})
},
fail: function (err) {
reject(err)
}
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "任务详情"
}
\ No newline at end of file
/* packageActivity/pages/taskDetail/taskDetail.wxss */
.task-detail-box{
padding: 32rpx 24rpx;
box-sizing: border-box;
.title{
margin: 0 0 24rpx 16rpx;
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
}
.task-box{
width: 100%;
height: 72px;
background: #FFFFFF;
border-radius: 10px;
padding: 32rpx;
box-sizing: border-box;
display: flex;
margin-bottom: 40rpx;
justify-content: space-between;
image{
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
}
.left{
flex: 0 0 75%;
display: flex;
font-size: 22rpx;
color: #9299AD;
.text-message{
view{
}
.name{
font-size: 28rpx;
color: #1B233D;
font-weight: 500;
}
}
}
.right{
display: flex;
align-items: center;
color: #FE5662;
font-size: 28rpx;
font-weight: 500;
image{
width: 32rpx;
height: 32rpx;
margin: 0;
}
}
}
.share-box{
background: #FFFFFF;
box-shadow: 0 8rpx 24rpx 0 rgba(106,126,204,0.12);
border-radius: 32rpx;
position: relative;
.bg{
width: 100%;
height: 176rpx;
}
.user-box{
position: absolute;
top: 0;
padding: 40rpx;
display: flex;
image{
width: 96rpx;
height: 96rpx;
margin-right: 24rpx;
flex-shrink: 0;
}
.message{
display: flex;
flex-flow: column;
justify-content: space-between;
font-size: 28rpx;
color: #2D2D33;
.name{
font-size: 32rpx;
text{
font-size: 24rpx;
color: #6E6E7A;
margin-left: 16rpx;
}
}
.activity{
text{
font-size: 20rpx;
color: #4466F0;
background: rgba(255,255,255,0.32);
border: 1px solid rgba(143,165,255,0.50);
padding: 0 12rpx;
border-radius: 2px;
margin-left: 8rpx;
}
}
}
}
.content{
padding: 40rpx 48rpx;
.img_video{
margin-top: 32rpx;
display: flex;
flex-wrap: wrap;
.image-box{
flex: 0 0 33.3%;
width: 176rpx;
height: 176rpx;
margin-bottom: 16rpx;
text-align: center;
image{
display: inline-block;
}
}
.video-box{
flex: 0 0 33.3%;
position: relative;
text-align: center;
image{
width: 176rpx;
height: 176rpx;
display: inline-block;
}
.paly-icon{
width: 60rpx;
height: 60rpx;
position: absolute;
z-index: 2;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
}
}
.btn-box{
margin-top: 54rpx;
display: flex;
flex-flow: column;
align-items: center;
.btn{
width: 400rpx;
height: 84rpx;
margin: 12rpx 0;
line-height: 84rpx;
text-align: center;
background: #FFFFFF;
display: flex;
align-items: center;
font-size: 32rpx;
justify-content: center;
border: 2rpx solid #DCDCE6;
border-radius: 20rpx;
}
.primary{
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border: none;
height: 88rpx;
color: #fff;
}
}
}
\ No newline at end of file
<!--packageActivity/pages/taskDetail/taskDetail.wxml-->
<view class="task-detail-box">
<view class="title">任务</view>
<view class="task-box">
<view class="left">
<image webp src="{{IMGURL}}{{taskTypeImgList[detailInfo.taskType - 1]}}.png"></image>
<view class="text-message">
<view class="name">{{detailInfo.title}}</view>
<view>{{detailInfo.content}}</view>
</view>
</view>
<view class="right">
<image webp src="{{IMGURL}}integral_icon.png"></image>
<view>+{{detailInfo.integralAccount}}积分</view>
</view>
</view>
<view class="title">分享内容</view>
<view class="share-box">
<image class="bg" webp src="{{IMGURL}}taskDetail_bg.png"></image>
<view class="user-box">
<image webp src="{{detailInfo.userImgUrl ? detailInfo.userImgUrl : IMGURL + 'order_person_default.png'}}"></image>
<view class="message">
<view class="name">{{detailInfo.userName}}<text>邀请你参加</text></view>
<view class="activity">{{detailInfo.merchantName}}{{detailInfo.activityName}}<text>{{activityTypList[detailInfo.activityType - 1]}}</text></view>
</view>
</view>
<view class="content">
<view class="text-box">
<text>{{detailInfo.textContent}}</text>
</view>
<view class="img_video">
<block wx:for="{{detailInfo.imgUrlList}}" wx:key="index">
<view wx:if="{{item.type == 'image'}}" class="image-box">
<image class="image-box" bind:tap="previewMedia" data-current="{{index}}" src="{{item.url}}"></image>
</view>
<view wx:else class="video-box" bind:tap="previewMedia" data-current="{{index}}">
<image src="{{item.poster}}"></image>
<image class="paly-icon" webp src="{{IMGURL}}video_paly_icon.png"></image>
</view>
</block>
</view>
</view>
</view>
<view class="btn-box">
<view class="btn" bind:tap="copyText" data-text="{{detailInfo.textContent}}">复制文案</view>
<view class="btn">复制链接</view>
<view class="btn" bind:tap="saveWith">
<text>一键保存图片</text>
<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
</view>
<view class="btn primary">分享</view>
<!-- <button class="btn primary" open-type="share">分享</button> -->
</view>
</view>
// packageActivity/pages/visitor/visitor.js
import index_const from "../../../pages/tab/index/index_const"
Page({
/**
* 页面的初始数据
*/
data: {
list: [
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
userWechartNo: 'abcabc123',
orderStatus: 1,
activityName: 'AR导航',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 12:00:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 2,
activityName: '全景',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 10:00:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 2,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 12:33:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
orderStatus: 1,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 12:00:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 2,
activityName: '全景',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 10:00:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 2,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 12:33:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947894',
orderStatus: 2,
activityName: '全景',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 10:00:00"
},
{
imgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0',
userName: '李四',
userMobile: '15678947784',
userWechartNo: 'abcabc123',
orderStatus: 2,
activityName: '众筹',
activityType: 1,
viewAccount: 10,
viewTime: "2022-10-13 12:33:00"
},
],
allVisitorNum: 861,
todayVisitorNum: 15,
activityTypList: index_const.data.activityTypList
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onRoute(options) {
console.log(options)
},
// 打电话
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() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "我的访客"
}
\ No newline at end of file
/* packageActivity/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);
.top{
display: flex;
justify-content: space-between;
align-items: center;
.top-left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
}
.name{
font-size: 30rpx;
color: #1B233D;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
}
}
.top-right{
image{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
background: #FFFFFF;
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;
}
}
}
.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);
}
}
}
}
<!--packageActivity/pages/visitor/visitor.wxml-->
<view class="visitor-box">
<view class="img-bg">
<image webp src="{{IMGURL}}visitor_bg.png?v={{img_version}}"></image>
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allVisitorNum}}</text></view>
<view>今日访客<text> · {{todayVisitorNum}}</text></view>
</view>
<view class="list-box">
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.orderStatus == 1 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
<image webp src="{{item.imgUrl}}"></image>
<view class="name-mobile">
<view class="name">
{{item.userName}}
<text class="order-statue {{item.orderStatus == 1 ? '' : 'green'}}">{{item.orderStatus == 1 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile">{{item.userMobile}}</view>
</view>
</view>
<view class="top-right">
<image wx:if="{{item.userMobile}}" webp src="{{IMGURL}}activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.userMobile}}"></image>
<image wx:if="{{item.userWechartNo}}" webp src="{{IMGURL}}activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></image>
</view>
</view>
<view class="bottom">
<view class="activity">
{{item.activityName}}
<text>{{activityTypList[item.activityType - 1]}}</text>
</view>
<view class="footprint">
<text>浏览 {{item.viewAccount}} 次</text>
<text>{{item.viewTime}} 访问过</text>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
// packageActivity/pages/warReport/warReport.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(e) {
this.setData({
infoData: e || {}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "活动战报"
}
\ No newline at end of file
/* packageActivity/pages/warReport/warReport.wxss */
.content{
width: 100%;
min-height: 100vh;
background: #000;
display: flex;
justify-content: center;
align-items: center;
}
.content video{
width: 100%;
height: 100%;
}
\ No newline at end of file
<!--packageActivity/pages/warReport/warReport.wxml-->
<view class="content">
<image src="{{infoData.linkUrl}}" mode="widthFix"></image>
</view>
Page({
data: {
list_fill: [
{
label: '姓名',
value: '百晓生',
},
{
label: '部门',
value: '市场部',
},
],
list_disable: [
{
label: '门店',
value: '广联数科4s店',
},
{
label: '电话',
value: '18269555555',
},
],
showModal: false,
department: [{
id: 1,
name: '销售部',
}, {
id: 2,
name: '售后部',
}, {
id: 3,
name: '客服部',
}, {
id: 4,
name: '续保部',
},]
},
onConfirm(e) {
let {value} = e.detail
this.setData({
'list_fill[1].value':value.name,
showModal:false,
'user.seriseName':value.name
},()=>{
wx.$eventbus.emit('SETTING',{user:this.data.user})
})
},
clickRow(e) {
const { index,name } = e.currentTarget.dataset
if (index == 1) {
this.setData({
showModal: true
})
return
}
wx.$router.go('packageMine.settingName.index',{name})
},
onClose() {
this.setData({
showModal: false
})
},
toComfirm() { },
onShow(options){
},
onRoute(options) {
let {list_fill,list_disable} = this.data
if(options.user){
let user = options.user
list_fill[0].value = user.nickName
list_fill[1].value = user.seriseName
list_disable[0].value = user.merchantName
list_disable[1].value = user.phone
this.setData({
list_fill,
list_disable,
user
})
}
}
})
\ No newline at end of file
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index"
},
"navigationBarTitleText":"编辑"
}
\ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.wrapper {
background: #FFFFFF;
border-radius: 16rpx;
.row_widget {
padding: 36rpx 32rpx;
.label {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.value {
font-weight: 400;
font-size: 30rpx;
color: #666666;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 8rpx;
}
}
.border_line {
border-bottom: 2rpx solid #F0F0F0;
}
}
.martop32 {
margin-top: 32rpx;
}
.popclass {
position: relative;
border-radius: 24rpx 24rpx 0 0;
}
.active-class {
font-weight: 500 !important;
font-size: 32rpx !important;
color: #333333 !important;
}
\ No newline at end of file
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view class="container">
<view class="wrapper">
<block wx:for="{{list_fill}}" wx:key="index">
<view class="row_widget flex_scb {{index?'':'border_line'}}" data-index="{{index}}" data-name="{{item.value}}" bind:tap="clickRow">
<view class="label">{{item.label}}</view>
<view class="value flex_sc">
<text>{{strSubstr.getString(item.value,12)}}</text>
<image class="icon" src="{{IMGURL}}right_arrow_icon.png" />
</view>
</view>
</block>
</view>
<view class="wrapper martop32">
<block wx:for="{{list_disable}}" wx:key="index">
<view class="row_widget flex_scb {{index?'':'border_line'}}">
<view class="label">{{item.label}}</view>
<view style="color:#999" class="value flex_sc">{{strSubstr.getString(item.value,12)}}</view>
</view>
</block>
</view>
</view>
<van-popup show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 55%" >
<van-picker
title="选择部门"
show-toolbar
active-class="active-class"
value-key="name"
columns="{{ department }}"
bind:cancel="onClose"
bind:confirm="onConfirm" />
</van-popup>
\ No newline at end of file
Page({
data: {
nickName:''
},
changeName(e){
this.setData({
nickName:e.detail.value
})
},
comfirm(){
if(!this.data.nickName)return wx.$api.showToast('请输入名字')
wx.$eventbus.emit('SETTING',{user:{nickName:this.data.nickName}})
wx.$router.back((p)=>{
p.setData({
'list_fill[0].value':this.data.nickName,
})
},1)
},
onRoute(options) {
this.setData({
nickName:options.name
})
},
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"设置名字"
}
\ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.input_wrapper {
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
box-sizing: border-box;
padding-left: 32rpx;
.int_class {
width: calc(100% - 64rpx);
height: 100%;
font-weight: 400;
font-size: 32rpx;
color: #333;
caret-color:#556AF5;
}
}
.sumbit_btn {
margin: 0 auto;
margin-top: 102rpx;
width: calc(100% - 32rpx);
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
\ No newline at end of file
<view class="container">
<view class="input_wrapper">
<input bindinput="changeName" class="int_class" maxlength="50" value="{{nickName}}" placeholder="请输入名字" />
</view>
<view class="sumbit_btn flex_cc" bind:tap="comfirm">提交</view>
</view>
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Page({
data: {
IMGURL: IMG_URL,
withdrawalScore: 0,
sumbitScore: ''
},
toSumbitData() {
let {sumbitScore} = this.data
if(!sumbitScore)return wx.$api.showToast('请输入提现积分')
if(sumbitScore==0)return wx.$api.showToast('提现积分不能为0')
wx.$router.go('packageMine.withdrawalSuccess.index')
},
onRoute(options) {
this.setData({
withdrawalScore: options.withdrawalScore,
user: options.user,
})
},
toFillCount(e) {
let { value } = e.detail
let { withdrawalScore, sumbitScore } = this.data
sumbitScore = this.priceVerify(value, withdrawalScore)
this.setData({
sumbitScore: sumbitScore || ''
})
},
// 失焦校验
checkNum(e){
let { value } = e.detail
if(value[value.length-1]=="."){
this.setData({
sumbitScore: ''
})
}
},
toTixianAll() {
let { withdrawalScore } = this.data
this.setData({
sumbitScore: withdrawalScore
})
},
// 价格输入校验规则
priceVerify(price, max, min = 0) {
let result = 0
// 1.限制小数点为2位
price = price.replace(/[^\d.]/g, "")
price = price.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
// 2.禁止第一位为小数点
if (price.indexOf('.') == 0) {
price = ''
}
// 3.如果第一位是0,那第二位开始禁止为数值,只可以为小数点
if (price.indexOf('0') == 0 && price.length > 1) {
if (price.indexOf('.') != 1) {
price = '0'
}
if (price[2] == '.') {
price = '0.'
}
}
result = price
// 4.判断最大值和最小值
if (price) {
price = Number(price)
max = Number(max)
if (max && price > max) {
result = max
}
if (min && price < min) {
result = min
}
}
return result
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.tip_wrapper {
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 32rpx;
.label {
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.tip {
.icon {
width: 56rpx;
height: 56rpx;
border-radius: 50%;
margin-right: 8rpx;
}
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.input_wrapper {
width: 686rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-top: 32rpx;
box-sizing: border-box;
padding: 32rpx;
.title {
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.int_widget {
box-sizing: border-box;
padding: 8rpx 0;
margin-top: 32rpx;
.input-placeholder {
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
.intClass {
width: calc(100% - 174rpx);
font-weight: 400;
font-size: 24rpx;
color: #333;
caret-color:#556AF5;
}
.btn {
width: 154rpx;
height: 48rpx;
background: rgba(85, 106, 245, 0.10);
border-radius: 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #556AF5;
}
}
}
.tip_msg{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-top: 16rpx;
margin-left: 32rpx;
}
.sumbit_btn {
margin: 0 auto;
margin-top: 70rpx;
width: calc(100% - 32rpx);
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
\ No newline at end of file
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view class="container">
<view class="tip_wrapper flex_scb">
<view class="label">提现人</view>
<view class="tip flex_sc">
<image mode="aspectFill" class="icon" src="{{user.headImgUrl}}" />
<text>{{strSubstr.getString(user.nickName)}}</text>
</view>
</view>
<view class="input_wrapper">
<view class="title">输入提现的积分值</view>
<view class="int_widget flex_scb">
<input type="digit" bindblur="checkNum" value="{{sumbitScore}}" focus="{{true}}" bindinput="toFillCount" class="intClass" maxlength="20" placeholder="请输入" placeholder-class="input-placeholder"/>
<view class="btn flex_cc" bind:tap="toTixianAll">全部提现</view>
</view>
</view>
<view class="tip_msg">当前可提现积分:{{withdrawalScore}}</view>
<view class="sumbit_btn flex_cc" bind:tap="toSumbitData">提交</view>
</view>
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Page({
data: {
IMGURL:IMG_URL,
STATUSICON:['wait','comlpete','fail'],
listData:[
{
num:110,
status:0,
},
{
num:1100,
status:1,
},
{
num:11000,
status:2,
},
]
},
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"提现记录"
}
\ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 40rpx 32rpx;
}
.title_widget {
margin-bottom: 38rpx;
.text_1 {
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
}
.marlf8 {
margin: 0 8rpx;
}
.text_2 {
font-weight: 400;
font-size: 28rpx;
color: #2D2D33;
}
}
.list {
.element {
position: relative;
.bgicon {
height: 260rpx;
}
.posi_wrap {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
box-sizing: border-box;
padding: 32rpx;
.avatar_info {
.icon {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 8rpx;
}
.nameText {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.countText {
font-weight: Bold;
font-size: 60rpx;
color: #333333;
line-height: 72rpx;
margin-top: 16rpx;
margin-bottom: 15rpx;
}
.line {
width: calc(100% - 32rpx);
height: 2rpx;
background: #EDEDED;
}
.date_wrap {
margin-top: 15rpx;
box-sizing: border-box;
padding-right: 32rpx;
.dateText {
font-weight: 400;
font-size: 20rpx;
color: #999999;
line-height: 32rpx;
}
}
}
}
}
\ No newline at end of file
<view class="container">
<view class="title_widget flex_sc">
<view class="text_1">提现记录</view>
<view class="text_2 marlf8">·</view>
<view class="text_2">80</view>
</view>
<view class="list">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<image mode="widthFix" class="bgicon" src="{{IMGURL}}status_{{STATUSICON[item.status]}}.png" />
<view class="posi_wrap">
<view class="avatar_info flex_sc">
<image mode="aspectFill" class="icon" src="{{IMGURL}}discovery_prod1.png" />
<view class="nameText">百晓生</view>
</view>
<view class="countText">-{{item.num}}</view>
<view class="line"></view>
<view class="date_wrap flex_scb">
<view class="dateText">申请时间:2022-10-12 17:32</view>
<view wx:if="{{item.status}}" class="dateText">完成时间:2022-10-12 17:32</view>
</view>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
Page({
data: {
},
toWatchNote(){
wx.$router.go('packageMine.withdrawalNote.index')
},
toBackMine(){
wx.switchTab({
url: '/pages/tab/mine/mine',
});
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file
page {
background: white;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.icon {
width: 400rpx;
height: 400rpx;
margin-top: 64rpx;
}
.max_text {
font-weight: 600;
font-size: 40rpx;
color: #1B233D;
margin-top: 16rpx;
margin-bottom: 24rpx;
}
.tip_text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
}
.btn_group {
margin-top: 128rpx;
.btn_left {
width: 316rpx;
height: 88rpx;
background: #FFFFFF;
border: 2rpx solid #DCDFE6;
border-radius: 20rpx;
font-weight: 400;
font-size: 32rpx;
color: #1B233D;
}
.btn_right {
width: 316rpx;
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin-left: 22rpx;
}
}
\ No newline at end of file
<view class="container">
<image mode="widthFix" class="icon" src="{{IMGURL}}success_icon_1.png" />
<view class="max_text">提交成功</view>
<view class="tip_text">您的提现申请已成功提交,预计将在24小时</view>
<view class="tip_text">到达您的微信零钱,请留意到账情况</view>
<view class="btn_group flex_cc">
<view class="btn_left flex_cc" bind:tap="toWatchNote">查看提现记录</view>
<view class="btn_right flex_cc" bind:tap="toBackMine">返回我的积分</view>
</view>
</view>
\ No newline at end of file
// pages/tab/index/components/activeBox/activeBox.js
import {imgUrlMixin} from '~/mixins/index'
import { activityApi } from "~/api/api"
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
activeList: {
type: Array,
value: [],
observer(newVal) {
if (newVal) {
this.setData({
activeList: newVal
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
activityOverviewList: ['shareData', 'browseData', 'visitorData', 'orderData'],
backStyle: [
'background-image: linear-gradient(180deg, #FFFFFF 72%, #FFEDEF 100%);margin: 0 16rpx 16rpx 0;',
'background-image: linear-gradient(179deg, #FFFFFF 76%, #FFF8E6 100%);',
'background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);margin: 0 16rpx 0 0;',
'background-image: linear-gradient(180deg, #FFFFFF 72%, #EBFEFF 100%);'
],
isloading: false
},
/**
* 组件的方法列表
*/
methods: {
// 图片加载完成
imageLoaded(event) {
if (event.detail.width) {
this.setData({imageLoaded: true})
}
},
// 展开收起
collapseClick(e) {
let { key, flag } = e.currentTarget.dataset
this.properties.activeList.forEach((val, ind) => {
// if (key == ind) {
// if (flag && !val.missionList.length) {
// this.setData({
// isloading: true
// })
// activityApi.getActiveTaskList({id: val.id}).then(res => {
// this.setData({
// isloading: false
// })
// val.isCollapse = !flag
// val.missionList = res.missionList
// })
// }
// } else {
// val.isCollapse = !flag
// }
if (flag) {
this.setData({
isloading: true
})
}
setTimeout(() => {
if (key == ind) {
val.isCollapse = !flag
val.newtaskCalenderList = this.calenderFilter(JSON.parse(JSON.stringify(val.missionList)) || [], 7)
let d = new Date()
let nowDate = (d.getMonth() + 1).toString().padStart(2, "0") + "月" + d.getDate().toString().padStart(2, "0") + "日"
let ind = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
k.time = (new Date(k.activeTime).getMonth() + 1).toString().padStart(2, "0") + "月" + new Date(k.activeTime).getDate().toString().padStart(2, "0") + "日"
k.ind = ind
if (d > k.activeTime) k.status = 2
if (nowDate == k.time) {
val.calenderActiveIndex = index
this.setData({activeDateIndex: ind})
}
ind++
})
})
}
this.setData({
isloading: false
})
this.setData({
activeList: this.properties.activeList
})
}, 1000)
})
this.setData({
activeList: this.properties.activeList
})
},
// 任务日历数据处理
calenderFilter (arr, length) {
var _arr = []
while (arr.length) {
_arr.push(arr.splice(0, length))
}
return _arr
},
// 分享活动(复制链接)
copyActivityUrl(e) {
let { url } = e.currentTarget.dataset
wx.setClipboardData({
data: url.toString(),
success (res) {
wx.showToast({
title: '活动链接已复制',
icon: "none"
})
}
})
},
// 活动详情
goToDetail(e) {
let { item } = e.currentTarget.dataset
let h5Url = `https://baidu.com?id=${item.name}`
wx.$router.jumpH5(h5Url)
},
// 活动战报
jump(e) {
let { item } = e.currentTarget.dataset
item.linkUrl = 'https://scrm.test.glsx.com.cn/group1/M00/02/69/wKgD3mNJFJ-AJMXHAAIXrDs4dcE605.jpg'
wx.$router.go('packageActivity.warReport', item)
}
}
})
{
"component": true,
"usingComponents": {
"activity-top": "../activityTop/activityTop",
"activity-overview": "../activityOverview/activityOverview",
"activity-calender": "../activityCalender/activityCalender"
}
}
\ No newline at end of file
/* pages/tab/index/components/activeBox/activeBox.wxss */
.content{
padding: 0 22rpx 2rpx 24rpx;
.content-item{
width: 100%;
box-sizing: border-box;
position: relative;
display: inline-block;
margin: 32rpx 0 8rpx 0;
.item-bg{
width: 100%;
height: 100%;
border-radius: 24rpx;
overflow: hidden;
position: absolute;
box-shadow: 0 10rpx 20rpx 0 rgba(204,133,122,0.16);
z-index: -1;
left: 0;
top: 0;
right: 0;
image{
object-fit: cover;
background-size: 100% auto;
}
}
.item-box{
box-sizing: border-box;
padding: 24rpx;
width: 100%;
height: 100%;
.hot {
color: #FE5662;
}
.active-btn{
display: flex;
margin: 24rpx 0 32rpx 0;
justify-content: center;
.btn{
color: #EB4E4E;
flex: 1;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 14rpx;
background: rgba(255,255,255,0.16);
border: 2rpx solid #EB4E4E;
margin-right: 16rpx;
}
.btn:last-child{
margin-right: 0;
}
.primary{
color: #ffffff;
height: 68rpx;
border: none;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
}
}
.task-box{
margin-top: 24rpx;
padding: 32rpx 24rpx;
border-radius: 24rpx;
background: #ffffff;
// transition: all 0.1s linear;
will-change: height;
}
.box-content{
display: block;
padding-bottom: 40rpx;
}
.hidden{
height: 80rpx;
padding: 0;
background: transparent;
transition: height .3;
.box-content{
display: none;
}
}
.collapse{
text-align: center;
color: #4466F0;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
.btn{
display: flex;
flex-flow: row;
}
.gg-chevron-down {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-down::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-bottom: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(45deg);
left: 8rpx;
top: 0;
}
.gg-chevron-up {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-up::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-top: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(-45deg);
left: 8rpx;
bottom: 0
}
}
}
}
}
\ No newline at end of file
<!--pages/tab/index/components/activeBox/activeBox.wxml-->
<view class="content">
<block wx:for="{{activeList}}" wx:key="index">
<view class="content-item">
<view class="item-bg">
<image webp src="{{IMGURL}}index_active_bg.png?v={{img_version}}" bindload="imageLoaded"></image>
</view>
<view class="item-box" wx:if="{{imageLoaded}}">
<!-- 活动top信息 -->
<activity-top data="{{item}}">
<image webp src="{{IMGURL}}hot-icon.png?v={{img_version}}"></image>
<view class="hot">火爆进行中</view>
</activity-top>
<!-- 活动操作按钮 -->
<view class="active-btn">
<view class="btn" bind:tap="jump" data-item="{{item}}">活动战报</view>
<view class="btn" bind:tap="copyActivityUrl" data-url="{{item.activityUrl}}">分享活动</view>
<view class="btn primary" bind:tap="goToDetail" data-item="{{item}}">查看详情</view>
</view>
<!-- 活动概览 -->
<activity-overview data="{{item}}" activityOverviewList="{{activityOverviewList}}" backStyle="{{backStyle}}" textType="{{1}}"></activity-overview>
<!-- 任务日历 -->
<view class="task-box {{item.isCollapse ? 'hidden' : ''}}">
<view class="box-content">
<activity-calender data="{{item}}" activeDateIndex="{{activeDateIndex}}" isCollapse="{{item.isCollapse}}"></activity-calender>
</view>
</view>
<!-- 展开/收起 -->
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" data-key="{{index}}">
<text>{{item.isCollapse ? '展开' : '收起'}}</text><text class="{{item.isCollapse ? 'gg-chevron-down' : 'gg-chevron-up'}}"></text>
<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
</view>
</view>
</view>
</block>
</view>
// pages/tab/index/components/activityCalender/activityCalender.js
import {imgUrlMixin} from '~/mixins/index'
import index_const from '../../index_const'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(newVal) {
}
},
// 展开收起
isCollapse: {
type: Boolean,
value: false
},
// 默认选中日期(今天)
activeDateIndex: {
type: Number,
value: 0
}
},
/**
* 组件的初始数据
*/
data: {
taskTypeImgList: index_const.data.taskTypeImgList,
},
/**
* 组件的方法列表
*/
methods: {
// 任务时间大于7天切换
changeTaskCalender(e) {
let data = this.properties.data
if(data) data.calenderActiveIndex = e.detail.current
this.setData({ data })
},
// 任务详情
jump(e) {
let { status, item } = e.currentTarget.dataset
if (status == 2) return // 已完成
wx.$router.go('packageActivity.taskDetail', item)
},
// 切换日期查看任务
changeDate(e) {
let { dateindex } = e.currentTarget.dataset
this.setData({
activeDateIndex: dateindex
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityCalender/activityCalender.wxss */
.title{
padding-left: 8rpx;
font-size: 32rpx;
color: #1B233D;
font-weight: 600;
text{
font-size: 28rpx;
color: #2D2D33;
font-weight: 400;
}
}
.calender-box{
padding: 32rpx 0;
position: relative;
.swiper{
height: 112rpx;
.swiper_item{
display: flex;
.time-box{
width: 100%;
height: 100%;
flex: 1;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
background: #F7F8FA;
border-radius: 6px;
margin: 0 4rpx;
image{
width: 48rpx;
height: 48rpx;
margin-bottom: 10rpx;
}
.task-time{
font-size: 18rpx;
color: #1B233D;
}
}
.completed{
background-image: linear-gradient(180deg, #FFD84B 28%, #FFB33E 76%);
.task-time{
color: #FFFFFF;
}
}
}
}
.swiper-dots{
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 100%;
bottom: 24rpx;
left: 0;
.dots {
width: 16rpx;
height: 6rpx;
margin: 0 4rpx;
border-radius: 3rpx;
background: #E1E4EB;
transition: all .5s;
}
.dots.active{
width: 24rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
}
}
}
.calender-box.p-b-54{
padding-bottom: 54rpx;
}
.task-show-box{
.task-item{
padding: 24rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 7rpx;
border-bottom: 1px solid #F0F1F5;
.left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.task-message{
display: flex;
flex-flow: column;
justify-content: space-around;
.task-title{
font-family: PingFangSC-Medium;
display: flex;
align-items: center;
flex-wrap: nowrap;
font-size: 28rpx;
font-weight: 500;
color: #1B233D;
image{
width: 28rpx;
height: 28rpx;
margin: 0;
flex-shrink: 0;
}
.integral-num{
font-family: PingFangSC-Medium;
flex-shrink: 0;
font-size: 24rpx;
font-weight: 500;
color: #FE5662;
}
}
.task-content{
font-size: 22rpx;
color: #9299AD;
}
}
}
.task-btn{
margin-left: 32rpx;
text-align: center;
.btn{
line-height: 48rpx;
width: 116rpx;
height: 48rpx;
background: #FEF1F4;
border: 2rpx solid rgba(254,86,98,0.40);
border-radius: 12rpx;
font-size: 24rpx;
color: #FE5662;
}
.primary{
border: none;
width: 120rpx;
height: 56rpx;
line-height: 56rpx;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
border-radius: 6px;
color: #FFFFFF;
}
.btn_title{
margin-top: 8rpx;
font-size: 11px;
color: #FE5662;
}
}
}
.task-item:last-child{
border: none;
margin: 0;
}
}
\ No newline at end of file
<!--pages/tab/index/components/activityCalender/activityCalender.wxml-->
<wxs src="../index.wxs" module="fn"></wxs>
<block wx:if="{{!isCollapse}}">
<view class="title">任务日历<text> · {{data.missionList.length}}</text></view>
<view class="calender-box {{data.newtaskCalenderList.length > 1 ? 'p-b-54' : ''}}">
<swiper class="swiper" current="{{data.calenderActiveIndex}}" bindchange="changeTaskCalender" data-index="{{index}}">
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="val" wx:for-index="k" wx:key="k">
<swiper-item class='swiper_item'>
<block wx:for="{{val}}" wx:for-item="v" wx:for-index="j" wx:key="j">
<view class="time-box {{v.status == 2 ? 'completed' : ''}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<image webp src="{{IMGURL}}{{v.status == 2 ? 'task_completed.png' : 'calender_integral_icon.png'}}"></image>
<view class="task-time">{{v.status == 2 ? '已完成' : v.time}}</view>
</view>
</block>
</swiper-item>
</block>
</swiper>
<block wx:if="{{data.newtaskCalenderList.length > 1}}">
<view class="swiper-dots">
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="value" wx:for-index="inde" wx:key="inde">
<view class="dots {{data.calenderActiveIndex == inde ?'active':''}}"></view>
</block>
</view>
</block>
</view>
<view class="task-show-box">
<block wx:for="{{data.missionList[activeDateIndex].platformMerchantMissionResponseList}}" wx:for-item="val" wx:for-index="ky" wx:key="ky">
<view class="task-item">
<view class="left">
<image webp src="{{IMGURL}}{{taskTypeImgList[val.type - 1]}}.png"></image>
<view class="task-message">
<view class="task-title">
<view class="text">{{val.title}}</view>
<image webp src="{{IMGURL}}integral_icon.png"></image>
<view class="integral-num">+{{val.inteNum}}积分</view>
</view>
<view class="task-content">{{val.content}}</view>
</view>
</view>
<view class="task-btn">
<view class="btn {{val.status == 1 ? 'primary' : ''}}" bind:tap="jump" data-status="{{val.status}}" data-item="{{val}}">{{val.status == 1 ? '去完成' : '已完成'}}</view>
<view class="btn_title" wx:if="{{val.status == 2}}">奖励已发放</view>
</view>
</view>
</block>
</view>
</block>
// pages/tab/index/components/activityDiagnosis/activityDiagnosis.js
import {imgUrlMixin} from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
activityList: {
type: Array,
value: []
}
},
/**
* 组件的初始数据
*/
data: {
activityOverviewList: ['overviewData'],
backStyle: [
'background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);margin: 0 0 16rpx 0;'
]
},
/**
* 组件的方法列表
*/
methods: {
// 图片加载完成
imageLoaded(event) {
if (event.detail.width) {
this.setData({imageLoaded: true})
}
},
// 展开收起
collapseClick(e) {
let { key, flag } = e.currentTarget.dataset
this.properties.activityList.forEach((val, ind) => {
// if (key == ind) {
// if (flag && !val.missionList.length) {
// this.setData({
// isloading: true
// })
// activityApi.getActivityEndOrderList({id: val.id}).then(res => {
// this.setData({
// isloading: false
// })
// val.isCollapse = !flag
// val.missionList = res.missionList
// })
// }
// } else {
// val.isCollapse = !flag
// }
if (flag) {
this.setData({
isloading: true
})
}
setTimeout(() => {
if (key == ind) {
val.isCollapse = !flag
}
this.setData({
isloading: false
})
this.setData({
activityList: this.properties.activityList
})
}, 1000)
})
this.setData({
activityList: this.properties.activityList
})
},
// 活动详情
goToDetail(e) {
let { item } = e.currentTarget.dataset
let h5Url = `https://baidu.com?id=${item.name}`
wx.$router.jumpH5(h5Url)
},
// 活动战报
jump(e) {
let { item } = e.currentTarget.dataset
wx.$router.go('packageActivity.warReport', item)
}
}
})
{
"component": true,
"usingComponents": {
"activity-top": "../activityTop/activityTop",
"activity-overview": "../activityOverview/activityOverview",
"invert-analyse": "../invertAnalyse/invertAnalyse",
"booking-order": "../bookingOrder/bookingOrder"
}
}
\ No newline at end of file
/* pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxss */
.content{
padding: 0 22rpx 2rpx 24rpx;
.content-item{
width: 100%;
box-sizing: border-box;
position: relative;
display: inline-block;
margin: 32rpx 0 8rpx 0;
.item-bg{
width: 100%;
height: 100%;
border-radius: 24rpx;
overflow: hidden;
position: absolute;
box-shadow: 0 10rpx 20rpx 0 rgba(116,132,194,0.16), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
z-index: -1;
left: 0;
top: 0;
right: 0;
image{
object-fit: cover;
background-size: 100% auto;
}
}
.item-box{
box-sizing: border-box;
padding: 24rpx;
width: 100%;
height: 100%;
.end{
color: #6E6E7A;
margin-left: 10rpx;
}
.active-btn{
display: flex;
margin: 24rpx 0 32rpx 0;
justify-content: center;
.btn{
color: #4466F0;
flex: 1;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 14rpx;
background: rgba(255,255,255,0.20);
border: 2rpx solid #4466F0;
margin-right: 16rpx;
}
.btn:last-child{
margin-right: 0;
}
.primary{
color: #ffffff;
height: 68rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border: none;
}
}
.earnings-box{
width: 100%;
height: 144rpx;
background-image: linear-gradient(180deg, #99B4FF 16%, #6276F5 93%);
border-radius: 20rpx;
display: flex;
padding: 32rpx;
box-sizing: border-box;
.left{
flex: 0 0 30%;
display: flex;
flex-flow: column;
justify-content: space-between;
color: #FFFFFF;
font-size: 28rpx;
.sort{
font-size: 20rpx;
}
}
.integral-num{
color: #FFEB98;
font-size: 68rpx;
font-weight: bold;
text{
font-size: 28rpx;
font-weight: 500;
margin-left: 12rpx;
}
}
}
.invert-box{
padding: 32rpx;
border-radius: 24rpx;
background: #ffffff;
// transition: all 0.1s linear;
will-change: height;
margin-top: 24rpx;
.box-content{
display: block;
padding-bottom: 40rpx;
}
}
.hidden{
height: 80rpx;
padding: 0;
background: transparent;
transition: height .3;
.box-content{
display: none;
}
}
.collapse{
text-align: center;
color: #4466F0;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
position: absolute;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
.btn{
display: flex;
flex-flow: row;
}
.gg-chevron-down {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-down::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-bottom: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(45deg);
left: 8rpx;
top: 0;
}
.gg-chevron-up {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-up::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-top: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(-45deg);
left: 8rpx;
bottom: 0
}
}
}
}
}
\ No newline at end of file
<!--pages/tab/index/components/activityDiagnosis/activityDiagnosis.wxml-->
<wxs src="../index.wxs" module="fn"></wxs>
<view class="content">
<block wx:for="{{activityList}}" wx:key="index">
<view class="content-item">
<view class="item-bg">
<image webp src="{{IMGURL}}activity_diagnosis_bg.png?v={{img_version}}" bindload="imageLoaded"></image>
</view>
<view class="item-box" wx:if="{{imageLoaded}}">
<!-- 活动top信息 -->
<activity-top data="{{item}}">
<image webp src="{{IMGURL}}activity_end_icon.png?v={{img_version}}"></image>
<view class="end">已结束</view>
</activity-top>
<!-- 活动操作按钮 -->
<view class="active-btn">
<view class="btn" bind:tap="jump" data-item="{{item}}">活动战报</view>
<view class="btn primary" bind:tap="goToDetail" data-item="{{item}}">查看详情</view>
</view>
<!-- 活动概览 -->
<activity-overview data="{{item}}" backStyle="{{backStyle}}" textType="{{2}}"></activity-overview>
<!-- 累计收益 -->
<view class="earnings-box">
<view class="left">
<view class="title">累计收益</view>
<view class="sort">最终排名:{{item.statistics.incomeRank}}</view>
</view>
<view class="integral-num">{{fn.filterIntegral(item.statistics.income)}}<text>积分</text></view>
</view>
<!-- 转化分析 -->
<view class="invert-box {{item.isCollapse ? 'hidden' : ''}}">
<view class="box-content">
<invert-analyse data="{{item}}"></invert-analyse>
<!-- 预约订单 -->
<booking-order data="{{item}}"></booking-order>
</view>
</view>
<!-- 展开/收起 -->
<view class="collapse" bindtap="collapseClick" data-flag="{{item.isCollapse}}" data-key="{{index}}">
<text>{{item.isCollapse ? '展开' : '收起'}}</text><text class="{{item.isCollapse ? 'gg-chevron-down' : 'gg-chevron-up'}}"></text>
<van-loading wx:if="{{isloading}}" size="30rpx" style="margin-left: 20rpx;" type="spinner" />
</view>
</view>
</view>
</block>
</view>
// pages/tab/index/components/activityOverview/activityOverview.js
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {},
observer(v) {
if (v) {
// 活动概览数据处理
let s = v.statistics
if (s && v.tabIndex == 0) {
v.overviewData = { // 活动中
shareData: {
all: { title: '总分享', num: s.shareCount, sort: s.shareRank },
today: { title: '今日分享', num: s.todayShareCount, sort: s.todayShareRank }
},
browseData: {
all: { title: '总浏览', num: s.browseCount, sort: s.browseRank },
today: { title: '今日浏览', num: s.todayBrowseCount, sort: s.todayBrowseRank }
},
visitorData: {
all: { title: '总访客', num: s.visitorCount, sort: s.visitorRank },
today: { title: '今日访客', num: s.todayVisitorCount, sort: s.todayVisitorRank }
},
orderData: {
all: { title: '总订单', num: s.orderCount, sort: s.orderRank },
today: { title: '今日订单', num: s.todayOrderCount, sort: s.todayOrderRank }
}
}
} else if (s) {
v.overviewData = [ // 活动诊断
{title: '分享', num: s.shareCount, sort: s.shareRank},
{title: '浏览', num: s.browseCount, sort: s.browseRank},
{title: '访客', num: s.visitorCount, sort: s.visitorRank},
{title: '订单', num: s.orderCount, sort: s.orderRank}
]
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访问量', num: s.visitorCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.conversionRate},
{title: '转化率', sort: s.visitorRate}
]
}
this.setData({data: v})
}
}
},
activityOverviewList: {
type: Array,
value: []
},
backStyle: {
type: Array,
value: []
},
textType: {
type: Number,
value: 0
}
},
/**
* 组件的初始数据
*/
data: {
textTypeList: ['', '当前排名:', '最终排名:']
},
/**
* 组件的方法列表
*/
methods: {
// 跳转
jump(e) {
let { index, flag } = e.currentTarget.dataset
if (index < 2) return // 分享和浏览数据不作跳转
switch(index) {
case 2: // 访客
wx.$router.go("packageActivity.visitor", flag)
break
case 3: // 订单
wx.$router.go("packageActivity.order", flag)
break
}
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityOverview/activityOverview.wxss */
.active-overview{
display: flex;
flex-wrap: wrap;
.overview-item-box{
flex: 1;
display: flex;
height: 188rpx;
border-radius: 8px;
padding: 24rpx 12rpx;
box-sizing: border-box;
min-width: calc((100% - 32rpx) / 2);
.all, .today{
flex: 1;
display: flex;
flex-flow: column;
align-items: center;
justify-content: space-between;
.title{
color: #6E6E7A;
font-size: 24rpx;
}
.primary-title{
color: #4466F0;
}
.number{
color: #2D2D33;
font-size: 44rpx;
font-weight: 600;
}
.sort{
font-size: 20rpx;
color: #2D2D33;
.up{
color: #EB4E4E;
}
.down{
color: #2FB87A;
}
}
}
}
}
\ No newline at end of file
<!--pages/tab/index/components/activityOverview/activityOverview.wxml-->
<view>
<wxs src="../index.wxs" module="fn"></wxs>
<!-- 活动中 -->
<view wx:if="{{textType == 1}}" class="active-overview">
<block wx:for="{{activityOverviewList}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="overview-item-box" style="{{backStyle[ind]}}" bind:tap="jump" data-index="{{ind}}" data-flag="1">
<view class="all">
<view class="title {{ind > 1 ? 'primary-title': ''}}">{{data.overviewData[i].all.title}}</view>
<view class="number">{{data.overviewData[i].all.num}}</view>
<view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].all.sort}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{data.overviewData[i].all.sort > 0 ? 'up' : 'down'}}">{{fn.mathABS(data.overviewData[i].all.sort)}}{{data.overviewData[i].all.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></view>
</view>
<view class="today">
<view class="title">{{data.overviewData[i].today.title}}</view>
<view class="number">{{data.overviewData[i].today.num}}</view>
<view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].today.sort}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{data.overviewData[i].today.sort > 0 ? 'up' : 'down'}}">{{fn.mathABS(data.overviewData[i].today.sort)}}{{data.overviewData[i].today.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></view>
</view>
</view>
</block>
</view>
<!-- 活动诊断 -->
<view wx:else class="active-overview">
<view class="overview-item-box" style="{{backStyle[0]}}">
<view class="all" wx:for="{{data.overviewData}}" wx:for-item="val" wx:for-index="key" wx:key="key" bind:tap="jump" data-index="{{key}}" data-flag="2">
<view class="title">{{val.title}}</view>
<view class="number">{{val.num}}</view>
<view class="sort"><text>最终排名:</text>{{val.sort}}</view>
</view>
</view>
</view>
</view>
// pages/tab/index/components/activityTop/activityTop.js
import index_const from "../../index_const"
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
activityTypList: index_const.data.activityTypList
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityTop/activityTop.wxss */
.active-top{
display: flex;
.active-img{
position: relative;
width: 160rpx;
height: 120rpx;
margin-right: 24rpx;
.thum-icon{
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.active-type{
position: absolute;
top: 0;
left: 0;
width: 72rpx;
height: 40rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
border-radius: 16rpx 0 24rpx 0;
color: #673F00;
font-size: 24rpx;
text-align: center;
}
}
.active-title{
flex: 1;
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 8rpx 0;
.name{
display: flex;
align-items: center;
.left{
flex: 0 0 60%;
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
line-height: 48rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.right{
flex: 0 0 40%;
display: flex;
flex-flow: 1;
font-size: 28rpx;
align-items: center;
image{
width: 32rpx;
height: 32rpx;
}
}
}
.time{
color: #7A8299;
font-size: 28rpx;
text{
color: #1B233D;
}
}
}
}
\ No newline at end of file
<!--pages/tab/index/components/activityTop/activityTop.wxml-->
<view>
<view class="active-top">
<view class="active-img">
<view class="thum-icon">
<image webp src="{{data.imgUrl}}"></image>
</view>
<view class="active-type">{{activityTypList[data.type]}}</view>
</view>
<view class="active-title">
<view class="name">
<view class="left">{{data.name}}</view>
<view class="right">
<slot></slot>
</view>
</view>
<view class="time">
<text>{{data.startTime}}</text> 至 <text>{{data.endTime}}</text>
</view>
</view>
</view>
</view>
// pages/tab/index/components/bookingOrder/bookingOrder.js
import {imgUrlMixin} from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(newVal) {
}
},
showPopup: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 打电话
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"
})
}
})
},
// 查看预约安装信息
showPopup(e) {
let { item } = e.currentTarget.dataset
console.log(item)
this.setData({
installItem: item,
showPopup: true
})
},
// 关联弹窗
hidePopup() {
this.setData({
showPopup: false
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/bookingOrder/bookingOrder.wxss */
.title{
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
display: flex;
justify-content: space-between;
text{
font-weight: 400;
font-size: 28rpx;
color: #2D2D33;
}
.text-btn{
font-size: 28rpx;
color: #4466F0;
font-weight: 400;
}
}
.item-content{
display: flex;
flex-flow: column;
padding: 32rpx 0;
font-size: 26rpx;
color: #7A8299;
border-bottom: 1px solid #F0F1F5;
.top{
display: flex;
justify-content: space-between;
.top-left{
display: flex;
image{
width: 96rpx;
height: 96rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.user-message{
display: flex;
flex-flow: column;
justify-content: space-between;
.name{
color: #1B233D;
font-size: 30rpx;
}
}
}
.btn-img{
image{
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-left: 32rpx;
}
}
}
.bottom{
padding: 10rpx 0 0 116rpx;
text{
color: #1B233D;
margin-left: 16rpx;
}
}
}
.item-content:last-child{
border: none;
}
\ No newline at end of file
<!--pages/tab/index/components/bookingOrder/bookingOrder.wxml-->
<view class="title">
<view>
待预约安装订单<text> · {{data.orderAccount}}</text>
</view>
<view class="text-btn" bind:tap="showPopup" data-item="{{data}}">预约安装信息</view>
</view>
<block wx:for="{{data.orderList}}" wx:key="index">
<view class="item-content">
<view class="top">
<view class="top-left">
<image webp src="{{item.userImgUrl ? item.userImgUrl : IMGURL+'order_person_default.png'}}"></image>
<view class="user-message">
<view class="name">{{item.userName}}</view>
<view class="mobile">{{item.mobile}}</view>
</view>
</view>
<view class="btn-img">
<image wx:if="{{item.mobile}}" webp src="{{IMGURL}}activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.mobile}}"></image>
<image wx:if="{{item.wechartNo}}" webp src="{{IMGURL}}activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.wechartNo}}"></image>
</view>
</view>
<view class="bottom">
下单时间
<text>{{item.time}}</text>
</view>
</view>
</block>
<!-- 预约安装弹窗 -->
<install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
var filterIntegral = function (e) {
return e && e.toLocaleString('en-US')
}
var mathABS = function (e) {
return Math.abs(e);
}
var formatNumber = function (e) {
return e / 1000 >= 1
? (e / 1000).toFixed(1) + "k"
: e;
}
module.exports = {
filterIntegral: filterIntegral,
mathABS: mathABS,
formatNumber: formatNumber
}
\ No newline at end of file
// pages/tab/index/components/invertAnalyse/invertAnalyse.js
import {imgUrlMixin} from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(v) {
let s = v.statistics
if (s) {
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访问量', num: s.visitorCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.conversionRate},
{title: '转化率', sort: s.visitorRate}
]
}
this.setData({data: v})
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title{
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box{
padding: 40rpx 0;
position: relative;
.funnel-bg{
position: absolute;
top: 40rpx;
left: 0;
width: 408rpx;
height: 336rpx;
}
.funnel-content{
display: flex;
height: 286rpx;
width: 100%;
padding-top: 50rpx;
.left,.right{
display: flex;
}
.left{
flex: 0 0 408rpx;
flex-flow: column;
justify-content: space-around;
align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
view{
display: flex;
align-items: center;
text{
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
}
.right{
flex: 1;
flex-flow: column;
align-items: flex-end;
margin-left: 8rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child{
position: absolute;
left: -36rpx;
top: 55%;
}
.sort{
font-size: 48rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
}
}
<!--pages/tab/index/components/invertAnalyse/invertAnalyse.wxml-->
<wxs src="../index.wxs" module="fn"></wxs>
<view class="title">转化分析</view>
<view class="funnel-box">
<view class="funnel-bg">
<image webp src="{{IMGURL}}activity_funnel.png"></image>
</view>
<view class="funnel-content">
<view class="left">
<view wx:for="{{data.numList}}" wx:key="index">{{item.title}}<text>{{fn.formatNumber(item.num)}}</text></view>
</view>
<view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index">
<view>{{item.title}}</view>
<view class="sort">{{item.sort}}%</view>
</view>
</view>
</view>
</view>
{
"usingComponents": {
"active-box": "./components/activeBox/activeBox",
"activity-diagnosis": "./components/activityDiagnosis/activityDiagnosis"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
}
.navigation-bar {
position: fixed;
top: 0;
left: 0;
z-index: 2;
.bar-text {
font-size: 34rpx;
font-weight: 600;
}
}
.layout {
position: relative;
.bg-box {
width: 100%;
overflow: hidden;
position: absolute;
left: 0;
.bg {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
top: 0;
left: 0;
}
}
.content {
position: relative;
.tab-box {
display: flex;
height: 112rpx;
.tab {
flex: 1;
display: flex;
flex-flow: column;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #2D2D33;
opacity: 0.9;
.text{
margin: 28rpx 0;
}
.line{
transform: scale(0);
transition: all .25s;
}
}
.active {
font-size: 36rpx;
font-weight: 600;
.line{
width: 48rpx;
height: 8rpx;
background: #708CFF;
border-radius: 3px 3px 0 0;
box-shadow: 0 4rpx 4rpx 0 #708CFF;
transform: scale(1);
}
}
}
}
.add-activity{
position: fixed;
top: 65%;
right: 16rpx;
width: 160rpx;
height: 160rpx;
}
}
\ No newline at end of file
<view class="navigation-bar">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="活动">门店助手</navigation-bar>
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="活动">
<view class="bar-text">门店助手</view>
</navigation-bar>
</view>
<block wx:if="{{navHeight}}">
<view class="layout" style="top:{{navHeight}}px">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<image webp src="{{IMGURL}}/index_bg.png?v={{img_version}}"></image>
</view>
</view>
<view class="content">
<!-- tab切换 -->
<view class="tab-box" style="top: {{navHeight}}px">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index == tabIndex? 'active' : '' }}" bindtap="click" data-index="{{index}}">
<view class="text">{{item.name}} ({{item.account}})</view>
<view class="line"></view>
</view>
</block>
</view>
<!-- 活动中 -->
<view class="active-content">
<block wx:if="{{tabIndex == 0}}">
<active-box activeList="{{activeList}}"></active-box>
</block>
</view>
<!-- 活动诊断 -->
<view class="activity-diag-content">
<block wx:if="{{tabIndex == 1}}">
<activity-diagnosis activityList="{{activityEndList}}"></activity-diagnosis>
</block>
</view>
</view>
<!-- 申请活动 -->
<view class="add-activity" bind:tap="applyActivity">
<image webp src="{{IMGURL}}application_activity.png"></image>
</view>
</view>
</block>
\ No newline at end of file
export default {
data: {
activityTypList: ['众筹', ''],
taskTypeImgList: ['share_task_icon', 'overview_task_icon', 'reward_task_icon'],
}
}
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
boxStyle: String,
user:Object
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
withdrawalScore:0,
},
/**
* 组件的方法列表
*/
methods: {
toTiXian(){
let {user,withdrawalScore} = this.data
if(!user.bindStatus){
this.triggerEvent('showModal',true)
return
}
wx.$router.go('packageMine.withdrawal.index',{withdrawalScore,user})
},
toWatchNote(){
wx.$router.go('packageMine.withdrawalNote.index')
},
},
lifetimes: {
attached() {
wx.$eventbus.on('WITHDRALWAL', (res) => {
this.setData({
withdrawalScore:res || 0
})
})
}
}
})
{
"component": true
}
\ No newline at end of file
.integral_widget {
position: relative;
z-index: 2;
.wrapper {
position: relative;
width: calc(100% - 64rpx);
margin-left: 33rpx;
.bg_icon {
width: 100%;
height: 100%;
}
.btn_wrap {
position: absolute;
top: 48rpx;
right: 20rpx;
height: 64rpx;
width: 160rpx;
}
.tip {
position: absolute;
top: 32rpx;
left: 40rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
letter-spacing: 0;
line-height: 44rpx;
}
.money {
position: absolute;
top: 84rpx;
left: 40rpx;
font-weight: Bold;
font-size: 72rpx;
color: #FFFFFF;
}
.note_btn {
position: absolute;
right: 60rpx;
top: 152rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
text-decoration: underline;
}
}
}
\ No newline at end of file
<view style="{{boxStyle}}" class="integral_widget">
<view class="wrapper">
<image mode="widthFix" class="bg_icon" src="{{IMGURL}}intergral_bg_icon.png" />
<view bind:tap="toTiXian" class="btn_wrap"></view>
<view class="tip">我的积分</view>
<view class="money">{{withdrawalScore}}</view>
<view class="note_btn" bind:tap="toWatchNote">提现记录</view>
</view>
</view>
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
listData:[1,2,3,4,5,6,7]
},
/**
* 组件的方法列表
*/
methods: {
getWithdrawalData(){
let data = {
score:{
currentScore:1000,
totalReWardScore:59895557,
totalWithdrawalScore:4546546
},
list:[
{
infoName:'充值赠送',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:0
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
]
}
wx.$eventbus.emit('WITHDRALWAL',data.score.currentScore)
this.setData({
score:data.score,
listData:data.list,
})
}
},
lifetimes: {
attached() {
this.getWithdrawalData()
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.list_widget {
position: relative;
z-index: 3;
margin-top: -70rpx;
.image_wrap {
position: relative;
.box {
width: 335rpx;
height: 152rpx;
.icon {
width: 72rpx;
height: 72rpx;
margin-right: 16rpx;
}
.text_wrap {
.price {
font-weight: Bold;
font-size: 32rpx;
color: #333333;
line-height: 48rpx;
}
.tip {
font-weight: 400;
font-size: 28rpx;
color: #6E6E7A;
}
}
}
.left_box {
position: absolute;
left: 32rpx;
top: 32rpx;
}
.right_box {
position: absolute;
right: 32rpx;
top: 32rpx;
}
}
.title_wrap {
margin-top: 24rpx;
margin-bottom: 8rpx;
.icon {
width: 176rpx;
height: 64rpx;
}
}
.list_data_widget {
box-sizing: border-box;
padding: 0 48rpx;
.element {
width: 100%;
border-bottom: 2rpx solid #f2f2f2;
padding: 28rpx 0;
position: relative;
.title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
line-height: 44rpx;
}
.date {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
}
.price {
position: absolute;
right: 0;
top: 50%;
transform: translate(0, -50%);
color: #FE5662;
font-size: 40rpx;
display: flex;
align-items: flex-end;
.mini {
font-size: 32rpx;
}
}
.blackColor{
color: #333333;
}
}
.no_more_tip {
margin-top: 40rpx;
font-weight: 400;
font-size: 24rpx;
color: #BEBEBE;
line-height: 36rpx;
text-align: center;
}
}
}
\ No newline at end of file
<view class="list_widget">
<view class="image_wrap">
<image mode="widthFix" class="banner_icon" src="{{IMGURL}}list_bg_icon.png" />
<view class="box flex_cc left_box">
<image class="icon" src="{{IMGURL}}num_icon_1.png" />
<view class="text_wrap">
<view class="price">{{score.totalReWardScore}}</view>
<view class="tip">累计收益积分</view>
</view>
</view>
<view class="box flex_cc right_box">
<image class="icon" src="{{IMGURL}}num_icon_2.png" />
<view class="text_wrap">
<view class="price">{{score.totalWithdrawalScore}}</view>
<view class="tip">累计提现积分</view>
</view>
</view>
</view>
<view class="title_wrap flex_cc">
<image mode="widthFix" class="icon" src="{{IMGURL}}title_icon.png" />
</view>
<view class="list_data_widget">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<view class="title">{{item.infoName}}</view>
<view class="date">{{item.updatedTime}}</view>
<view class="price {{item.type==0?'':'blackColor'}}">
<text class="mini">{{item.type==0?'+':'-'}}</text>
<text>{{item.withdrawalScore}}</text>
</view>
</view>
</block>
<view class="no_more_tip">没有更多啦</view>
</view>
</view>
\ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
boxStyle: String,
user:Object
},
data: {
IMGURL: IMG_URL,
},
methods: {
toEditPage() {
wx.$router.go('packageMine.editBasicInfo.index', { user: this.data.user })
},
// toAddEvent() {
// wx.$eventbus.on('SETTING', (res) => {
// let user = this.data.user
// if (res) {
// Object.assign(user, res.user)
// this.setData({
// user
// })
// }
// })
// }
},
lifetimes: {
attached() {
// this.toAddEvent()
}
}
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!