每日线报

master
fanfan 5 months ago
parent ab300bc194
commit 1d4f799be7
  1. 5
      api/help.js
  2. 189
      pages/gamll/dailyReport.vue
  3. 54
      pages/goods/detail.vue

@ -11,8 +11,11 @@ const api = {
storeInfo: 'store/getStoreInfo',
getAgreement: 'user/getAgreement',
}
export const JDShortLinks = (param) => {
return request.get('goods/JDShortLinks', param)
}
export const tipOffList = (param) => {
return request.get('goods/tipOffList ', param)
return request.get('goods/tipOffList', param)
}
export const openShop = (param) => {
return request.post('store/openShop', param)

@ -3,7 +3,7 @@
<view class="park" :style="{backgroundImage:`url(${indexBackgroundImage})`}">
<view style="margin-top:870rpx;overflow: hidden;height: 830rpx;">
<view class="report" v-if="list.length>0">
<view class="report-box" v-for="(a,index) in list">
<view class="report-box" v-for="(a,index) in list" @click="onClickReport(a)">
{{a.channel_name}}
</view>
</view>
@ -13,6 +13,42 @@
好东西就要分享给大家让生活更美好
</view> -->
</view>
<!-- 催单弹框 -->
<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>
@ -24,7 +60,11 @@
background: {
background: 'none'
},
cdDia: false,
list: [],
shortList: [],
today: '',
fromData: '',
indexBackgroundImage: 'https://www.amiami.com.cn/static/openshop.png?t=' + new Date().getTime(),
}
},
@ -32,13 +72,72 @@
this.getTipOffList()
},
methods: {
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'
});
}
});
},
getTipOffList() {
help.tipOffList().then(result => {
if (result.status == 200) {
this.list = result.data.list.data
// this.list = [...result.data.list.data, ...result.data.list.data, ...result.data.list.data,
// ...result.data.list.data, ...result.data.list.data, ...result.data.list.data
// ]
}
})
}
@ -53,6 +152,88 @@
}
</style>
<style lang="scss" scoped>
.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%;

@ -257,7 +257,8 @@
</view>
</view>
<view class="footerCus firstBtn" v-else>
<view class="" v-if="setting.provider=='wxqykf' || setting.provider=='ewmkf'" @click="handleContact">
<view class="" v-if="setting.provider=='wxqykf' || setting.provider=='ewmkf'"
@click="handleContact">
<view class="cusIcon">
<image :src="$picUrl+'/static/user/customer.png'"></image>
</view>
@ -826,22 +827,39 @@
},
//
toJDdetal() {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', //app.json
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url),
extraData: {
foo: 'bar'
},
envVersion: 'release',
success(res) {
//
console.log(res);
console.log("打开成功")
}
})
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
if (this.goods.jd_short_url) {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', //app.json
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url),
extraData: {
foo: 'bar'
},
envVersion: 'release',
success(res) {
//
console.log(res);
console.log("打开成功")
}
})
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
} else {
// #ifdef MP-WEIXIN
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: '/pages/item/detail/detail?sku=' + this.goods_sku_no,
envVersion: 'release',
success(res) {
//
console.log(res);
}
})
// #endif
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
}
},
//
openPirce(type) {
@ -2500,4 +2518,4 @@
.detail-content {
overflow: hidden;
}
</style>
</style>

Loading…
Cancel
Save