Commit f1d1fde0 by 前端

Merge branch 'zhangxw_dev_3.0' into 'v3.0'

Zhangxw dev 3.0

See merge request !10
2 parents 1b82c8ad ad3db05c
Showing 45 changed files with 1318 additions and 63 deletions
......@@ -45,6 +45,15 @@
},
"subpackages": [
{
"root": "packageActivity",
"pages": [
"pages/visitor/visitor",
"pages/order/order",
"pages/taskDetail/taskDetail",
"pages/warReport/warReport"
]
},
{
"root": "packageMine",
"pages": [
"pages/editBasicInfo/index",
......@@ -57,9 +66,10 @@
],
"usingComponents": {
"navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup"
"popup": "/components/Popup/Popup",
"van-popup": "@vant/weapp/popup/index",
"install-popup": "/components/installPopup/installPopup"
},
"resolveAlias": {
"~/*": "/*"
},
......
// 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>
// 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'],
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 {{item.orderStatus == 1 ? '' : 'orderde'}}">
<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,
}
},
/**
* 生命周期函数--监听页面加载
*/
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/taskDetail/taskDetail.wxss */
.task-detail-box{
margin: 32rpx 24rpx;
.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;
}
}
\ 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.type - 1]}}.png"></image>
<view class="text-message">
<view>{{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 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="name">{{detailInfo.userName}}<text>邀请你参加</text></view>
<view class="activity">{{detailInfo.merchantName}}{{detailInfo.activityName}}<text>{{activityTypList[detailInfo.activityType - 1]}}</text></view>
</view>
<view class="content">
<view class="text-box">
{{detailInfo.textContent}}
</view>
<view class="img_video">
</view>
</view>
</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) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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 */
\ No newline at end of file
<!--packageActivity/pages/warReport/warReport.wxml-->
<text>packageActivity/pages/warReport/warReport.wxml</text>
......@@ -53,6 +53,30 @@ Component({
this.setData({
activeList: this.properties.activeList
})
},
// 分享活动(复制链接)
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
wx.$router.go('packageActivity.warReport', item)
}
}
})
......@@ -13,9 +13,9 @@
</activity-top>
<!-- 活动操作按钮 -->
<view class="active-btn">
<view class="btn">活动战报</view>
<view class="btn">分享活动</view>
<view class="btn primary">查看详情</view>
<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>
......
// pages/tab/index/components/activityCalender/activityCalender.js
import {imgUrlMixin} from '~/mixins/index'
import index_const from '../../index_const'
Component({
/**
* 组件的属性列表
......@@ -20,7 +21,6 @@ Component({
if (nowDate == k.time) item.calenderActiveIndex = index
})
})
console.log(item)
this.setData({
data: item
})
......@@ -36,7 +36,7 @@ Component({
* 组件的初始数据
*/
data: {
taskTypeList: ['share_task_icon', 'overview_task_icon', 'reward_task_icon'],
taskTypeImgList: index_const.data.taskTypeImgList,
},
/**
......@@ -56,6 +56,12 @@ Component({
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)
}
}
})
......@@ -121,8 +121,8 @@
}
.task-btn{
margin-left: 32rpx;
text-align: center;
.btn{
text-align: center;
line-height: 48rpx;
width: 116rpx;
height: 48rpx;
......@@ -131,15 +131,21 @@
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{
......
<!--pages/tab/index/components/activityCalender/activityCalender.wxml-->
<wxs module="fn">
module.exports = {
split: function(e){
return e.split('-')[1] + '月' + e.split('-')[2] + '日';
}
}
</wxs>
<wxs src="../index.wxs" module="fn"></wxs>
<block wx:if="{{!isCollapse}}">
<view class="title">任务日历<text> · {{data.taskNum}}</text></view>
<view class="calender-box {{data.newtaskCalenderList.length > 1 ? 'p-b-54' : ''}}">
......@@ -16,7 +10,7 @@
<block wx:for="{{val}}" wx:for-item="v" wx:for-index="j" wx:key="j">
<view class="time-box {{v.status == 2 ? 'completed' : ''}}">
<image webp src="{{IMGURL}}{{v.status == 2 ? 'task_completed.png' : 'calender_integral_icon.png'}}"></image>
<view class="task-time">{{v.status == 2 ? '已完成' : fn.split(v.time)}}</view>
<view class="task-time">{{v.status == 2 ? '已完成' : fn.dateFilter(v.time)}}</view>
</view>
</block>
</swiper-item>
......@@ -34,7 +28,7 @@
<block wx:for="{{data.taskList}}" wx:for-item="val" wx:for-index="ky" wx:key="ky">
<view class="task-item">
<view class="left">
<image webp src="{{IMGURL}}{{taskTypeList[val.type - 1]}}.png"></image>
<image webp src="{{IMGURL}}{{taskTypeImgList[val.type - 1]}}.png"></image>
<view class="task-message">
<view class="task-title">
<view class="text">{{val.title}}</view>
......@@ -45,7 +39,8 @@
</view>
</view>
<view class="task-btn">
<view class="btn {{val.status == 1 ? 'primary' : ''}}">{{val.status == 1 ? '去完成' : '已完成'}}</view>
<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>
......
......@@ -32,6 +32,7 @@ Component({
this.setData({imageLoaded: true})
}
},
// 展开收起
collapseClick(e) {
let { key, flag } = e.currentTarget.dataset
this.properties.activityList.forEach((val, ind) => {
......@@ -42,6 +43,17 @@ Component({
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)
}
}
})
......@@ -88,7 +88,7 @@
}
}
.invert-box{
padding: 32rpx 24rpx;
padding: 32rpx;
border-radius: 24rpx;
background: #ffffff;
// transition: all 0.1s linear;
......
<!--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">
......@@ -13,16 +14,9 @@
</activity-top>
<!-- 活动操作按钮 -->
<view class="active-btn">
<view class="btn">活动战报</view>
<view class="btn primary">查看详情</view>
<view class="btn" bind:tap="jump" data-item="{{item}}">活动战报</view>
<view class="btn primary" bind:tap="goToDetail" data-item="{{item}}">查看详情</view>
</view>
<wxs module="fn">
module.exports = {
filterIntegral: function(e) {
return e.toLocaleString('en-US')
}
}
</wxs>
<!-- 活动概览 -->
<activity-overview data="{{item}}" backStyle="{{backStyle}}" textType="{{2}}"></activity-overview>
<!-- 累计收益 -->
......
......@@ -33,6 +33,19 @@ Component({
* 组件的方法列表
*/
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
}
}
}
})
<!--pages/tab/index/components/activityOverview/activityOverview.wxml-->
<view>
<wxs module="fn">
module.exports = {
abs: function(num){
return Math.abs(num);
}
}
</wxs>
<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]}}">
<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.abs(data.overviewData[i].all.sort)}}{{data.overviewData[i].all.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></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.abs(data.overviewData[i].today.sort)}}{{data.overviewData[i].today.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></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">
<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>
......
// pages/tab/index/components/activityTop/activityTop.js
import index_const from "../../index_const"
Component({
/**
* 组件的属性列表
......@@ -14,7 +15,7 @@ Component({
* 组件的初始数据
*/
data: {
activityName: ['众筹', '']
activityTypList: index_const.data.activityTypList
},
/**
......
......@@ -5,7 +5,7 @@
<view class="thum-icon">
<image webp src="{{data.imgUrl}}"></image>
</view>
<view class="active-type">{{activityName[data.type]}}</view>
<view class="active-type">{{activityTypList[data.type]}}</view>
</view>
<view class="active-title">
<view class="name">
......
......@@ -12,6 +12,10 @@ Component({
observer(newVal) {
}
},
showPopup: {
type: Boolean,
value: false
}
},
......@@ -32,6 +36,34 @@ Component({
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
})
}
}
})
......@@ -3,11 +3,18 @@
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;
......@@ -43,6 +50,7 @@
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-left: 32rpx;
}
}
}
......
<!--pages/tab/index/components/bookingOrder/bookingOrder.wxml-->
<view class="title">待预约安装订单<text> · {{data.orderAccount}}</text></view>
<block wx:for="{{data.orderList}}">
<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">
......@@ -13,7 +18,7 @@
<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"></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">
......@@ -22,3 +27,5 @@
</view>
</view>
</block>
<!-- 预约安装弹窗 -->
<install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
var dateFilter = function (e) {
return e.split('-')[1] + '月' + e.split('-')[2] + '日';
}
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 = {
dateFilter: dateFilter,
filterIntegral: filterIntegral,
mathABS: mathABS,
formatNumber: formatNumber
}
\ No newline at end of file
......@@ -6,12 +6,12 @@
line-height: 48rpx;
}
.funnel-box{
padding: 40rpx 32rpx;
padding: 40rpx 0;
position: relative;
.funnel-bg{
position: absolute;
top: 40rpx;
left: 32rpx;
left: 0;
width: 408rpx;
height: 336rpx;
}
......
<!--pages/tab/index/components/invertAnalyse/invertAnalyse.wxml-->
<wxs module="fn">
module.exports = {
formatNumber: function(num){
return num / 1000 >= 1
? (num / 1000).toFixed(1) + "k"
: num;
}
}
</wxs>
<wxs src="../index.wxs" module="fn"></wxs>
<view class="title">转化分析</view>
<view class="funnel-box">
<view class="funnel-bg">
......
......@@ -13,6 +13,7 @@ Page({
],
tabIndex: 0,
activeList: [{
activityUrl: 'https://baidu.com',
name: '全景导航国庆优先123',
startTime: '2022-10-01',
endTime: '2022-10-07',
......@@ -120,8 +121,8 @@ Page({
orderList: [
{userName: '张三', mobile: '15656565678', time: '2022-09-09'},
{userName: '张三', userImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram-test/glsx/equity/scrm_mini_no_vip.png?v=1.0.0', time: '2022-09-09'},
{userName: '张三', mobile: '15656565678', time: '2022-09-09'}
]
{userName: '张三', mobile: '15656565678', time: '2022-09-09', wechartNo: 'abc123'}
],
},{
isCollapse: true
}]
......
<view class="navigation-bar">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="活动">
<view class="bar-text">门店助手</view>
</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">
......
export default {
data: {
activityTypList: ['众筹', ''],
taskTypeImgList: ['share_task_icon', 'overview_task_icon', 'reward_task_icon'],
}
}
\ No newline at end of file
/* pages/webView/webView.wxss */
\ No newline at end of file
......@@ -41,6 +41,48 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/visitor/visitor",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/order/order",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageActivity/pages/taskDetail/taskDetail",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
......@@ -38,7 +38,7 @@ class Router {
const router = `${thisPage.__route__}.html`
if (__wxConfig && __wxConfig.page && __wxConfig.page[router]) {
let { navigationBarTitleText, navigationStyle } = __wxConfig.page[router].window
if (!title) title = '生意助手'
if (!title) title = '门店助手'
if (!navigationBarTitleText && !navigationStyle)
wx.setNavigationBarTitle({
title
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!