You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/gamll/dailyReport.vue

280 lines
5.8 KiB

<template>
<view>
1 month ago
<view class="park" :style="{backgroundImage:`url(${indexBackgroundImage})`}">
<view style="margin-top:870rpx;overflow: hidden;height: 830rpx;">
<view class="report" v-if="list.length>0">
1 month ago
<view class="report-box" v-for="(a,index) in list" @click="onClickReport(a)">
1 month ago
{{a.channel_name}}
</view>
</view>
</view>
<!-- <view class="wenan">
好东西就要分享给大家让生活更美好
</view> -->
</view>
1 month ago
<!-- 催单弹框 -->
<view class="dia" v-if="cdDia" catchtouchmove="true">
<view class="diaMain">
<!-- <view class="ld" @click="cdDia=false">
<u-icon name="close" color="#999" size="32"></u-icon>
</view> -->
<view class="report-name">今天 {{today}}{{fromData.header_content}}</view>
<view class="cdInfo">
<view class="report-line" v-for="(item) in shortList">
<view class="">
{{item.goods_name}}
</view>
<view class="">
市场价:{{item.cost_price_min}}
</view>
<view class="">
推广价:{{item.goods_price_min}}
</view>
<view class="">
SKU:{{item.goods_no}}
</view>
<view class="">
{{item.jd_short_url}}
</view>
</view>
</view>
<view class="reportCopy">
<view class="reportbut" style="color: rgb(96, 98, 102);" @click="cdDia=false">
取消
</view>
<view class="reportbut" @click="copyData">
复制
</view>
</view>
</view>
</view>
</view>
</template>
<script>
1 month ago
import * as help from '@/api/help'
export default {
data() {
return {
background: {
background: 'none'
},
1 month ago
cdDia: false,
1 month ago
list: [],
1 month ago
shortList: [],
today: '',
fromData: '',
1 month ago
indexBackgroundImage: 'https://www.amiami.com.cn/static/openshop.png?t=' + new Date().getTime(),
}
},
1 month ago
onLoad() {
this.getTipOffList()
},
methods: {
1 month ago
getCurrentDate() {
let now = new Date()
let year = now.getFullYear()
let month = now.getMonth() + 1
let day = now.getDate()
this.today = year + '年' + month + '月' + day + '日'
},
onClickReport(item) {
this.fromData = item
uni.showLoading({
title: '加载中'
});
this.getJDShortLinks(item.id)
this.getCurrentDate()
},
getJDShortLinks(id) {
help.JDShortLinks({
id: id
}).then(result => {
if (result.status == 200) {
this.shortList = result.data.goodsList
this.cdDia = true
uni.hideLoading();
}
})
},
copyData() {
let that = this
let text = ''
that.shortList.forEach(function(obj) {
text +=
obj.goods_name +
'\n' +
'市场价:' +
obj.goods_price_min +
'\n' +
'推广价:' +
obj.cost_price_min +
'\n' +
'SKU:' +
obj.goods_no +
'\n' +
obj.jd_short_url +
';\n'
})
uni.setClipboardData({
data: '今天' + that.today + ',' + this.fromData.header_content + '\n' + text,
success: () => {
// 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
uni.showToast({
title: '复制成功',
icon: 'none'
});
},
fail: () => {
uni.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
1 month ago
getTipOffList() {
help.tipOffList().then(result => {
if (result.status == 200) {
this.list = result.data.list.data
}
})
}
}
}
</script>
<style>
page {
background: #fff;
width: 100%;
}
</style>
<style lang="scss" scoped>
1 month ago
.dia {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
.reportCopy {
height: 80rpx;
width: 100%;
border-top: 1rpx solid #f7f7f7;
display: flex;
.reportbut {
width: 50%;
line-height: 80rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: rgb(41, 121, 255);
;
}
}
.report-name {
font-size: 28rpx;
color: #000;
font-weight: 700;
margin: 20rpx 24rpx;
}
.report-line {
font-size: 28rpx;
color: #000;
padding-top: 16rpx;
margin-top: 16rpx;
border-top: 1rpx dashed #999;
}
.report-line:nth-child(1) {
border-top: none !important;
margin-top: 0 !important;
padding-top: 0 !important;
}
.diaMain {
width: 600rpx;
max-height: 900rpx;
background: #fff;
border-radius: 12rpx 12rpx 12rpx 12rpx;
opacity: 1;
position: relative;
overflow: hidden;
.ld {
width: 40rpx;
height: 40rpx;
position: absolute;
top: 24rpx;
right: 24rpx;
}
.cdInfo {
overflow: hidden;
max-height: 620rpx;
overflow-y: auto;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #727272;
line-height: 38rpx;
margin: 0 24rpx 20rpx 24rpx;
}
}
}
.park {
overflow: hidden;
width: 100%;
background-size: 100% auto;
min-height: 100vh;
padding-bottom: 68rpx;
1 month ago
background-size: cover;
1 month ago
.report {
box-shadow: 0 5rpx 10rpx 5rpx #fff;
// box-shadow: 5rpx 5rpx 5rpx #fff,5rpx -5rpx 5rpx #fff,-5rpx 5rpx 5rpx #fff,-5rpx -5rpx 5rpx #fff;
border-radius: 8rpx;
margin: 20rpx 50rpx 0rpx 50rpx;
padding: 12rpx;
max-height: 570rpx;
overflow-y: auto;
.report-box {
display: inline-block;
background: #3d84f2;
height: 60rpx;
padding: 0 24rpx;
color: #fff;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #fff;
line-height: 60rpx;
border-radius: 16rpx;
margin: 12rpx;
}
}
.wenan {
font-size: 54rpx;
color: #000;
font-family: PingFang SC, PingFang SC;
font-weight: 800;
margin: 30rpx 100rpx 60rpx 100rpx;
text-align: center;
}
}
</style>