Commit d02570f7 authored by Mac's avatar Mac

离线收益的弹窗

parent ac12c46b
<style>
.order-page .box{
width: 520rpx;
height: 700rpx;
position: relative;
}
.order-page .Xbox{
width: 520rpx;
height: 700rpx;
background: #FFF;
border: 3px solid;
border-image: linear-gradient(0deg, #FF7115, #FFE253) 3 3;
box-shadow: 0px 0px 18px 0px rgba(81, 81, 81, 0.78);
position: relative;
}
.Xbox-top{
width: 580rpx;
height: 120rpx;
background: linear-gradient(90deg, #FAA014, #F57019, #FBAA12);
box-shadow: 0px 2px 15px 0px rgba(247, 123, 25, 0.74);
border-radius: 5px;
margin-top: 44rpx;
font-size: 44rpx;
color: #FFF;
display: flex;
align-items: center;
justify-content: center;
margin-left: -35rpx;
}
.Xbox-center{
width: 616rpx;
height: 306rpx;
background: url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/orderpopunp.png');
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin-top: 15px;
margin-left: -49rpx;
font-size: 80rpx;
font-weight: 500;
}
.Xbox-center-text{
color: #FFFFFF;
background: linear-gradient(0deg, #FCEDD9 0%, #FBC86E 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: flex;
align-items: flex-end;
}
.xbox-c-posi{
position: absolute;right: 60rpx;bottom: 40rpx;font-size: 18px;color: #FFFFFF;
line-height: 35px;
font-weight: 800;
background: linear-gradient(0deg, #FCEDD9 0%, #FBC86E 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.xbox-btn{
width: 250rpx;
height: 74rpx;
background: linear-gradient(90deg, #F5A454, #F93836);
box-shadow: 1px 6px 10px 0px rgba(250, 88, 83, 0.36);
border-radius: 19px;
margin-top: 66rpx;
margin-left: 136rpx;
font-size: 34rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<template>
<div class="order-page" style='position: relative;'>
<u-popup v-model="showDialog" mode="center" :mask-close-able="false" custom-style="padding:0;background:none;">
<view class="box">
<view style="width: 140rpx;height: 140rpx;position: absolute;right: -50rpx;top: -50rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<view style="width: 90rpx;height: 90rpx;position: absolute;left: -45rpx;bottom: 60rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<view class="Xbox">
<view class="Xbox-top">
恭喜增加 <text style="font-size: 60rpx;margin: 0 3px;">{{orderPopupdata.OrderNum}}</text> 个订单
</view>
<view class="Xbox-center">
<view class="Xbox-center-text">
<text style="line-height: 55px;">
+¥
</text>
<text style="font-size: 120rpx;">{{orderPopupdata.CommissionMoney}}</text>
<text style="line-height: 55px;font-size: 50rpx;">
</text>
</view>
<view class="xbox-c-posi" >收益</view>
</view>
<view class="xbox-btn" @click="gosalesvolume">
马上查看
</view>
<view style="width: 56rpx;height: 56rpx;position: absolute;right: -20rpx;bottom: 134rpx;">
<image src="../../static/images/orderyuan.png" style="width: 100%;height: 100%;"></image>
</view>
<u-icon name="close" style='position: absolute;left: 230rpx;bottom: -100rpx;' color="#FFFFFF" size="60" @click='closeBtn'></u-icon>
</view>
</view>
</u-popup>
</div>
</template>
<script>
export default {
props: {
orderPopupdata: {
type: Object,
default: 0
},
},
data() {
return {
pageinfo: {},
showDialog: true,
};
},
created() {
console.log(this.orderPopupdata,'数据')
},
methods: {
closeBtn() {
this.showDialog = false;
this.$emit('closeBtn');
},
gosalesvolume(){
this.$emit('gosalesvolume');
}
}
};
</script>
......@@ -18,7 +18,7 @@
<u-icon name="arrow-left" size="44"></u-icon>
</view>
</view>
<view @click='yj' style="width: 200px;height: 50px;">活动</view>
<!-- <view @click='yj' style="width: 200px;height: 50px;">活动</view> -->
<u-tabs v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" name="name" :list="myPageData.home_pages.navs"
:is-scroll="true" :active-color="mainColor" :current="active" :bar-width="80" :font-size="32" :bold="false" @change="changeHandler"></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
......@@ -87,6 +87,7 @@
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<official-account></official-account>
<orderPopup v-if='showorder' :orderPopupdata='orderPopupdata' @gosalesvolume='gosalesvolume' @closeBtn="closeBtn_order"></orderPopup>
</view>
</view>
</view>
......@@ -127,6 +128,7 @@
import matchmaking from "@/components/matchmaking/index"
import miaiactivitytype from "@/components/miaiactivitytype/index"
import miaiactivityCustom from "@/components/miaiactivityCustom/index"
import orderPopup from "@/components/coupons/orderPopup.vue";//离线订单弹窗
const innerAudioContext = uni.createInnerAudioContext();
export default {
data() {
......@@ -164,6 +166,8 @@
startData:{},
ComeFrom:'',
cardsmoney:0,//储值卡带过来的金额
orderPopupdata:{},//离线收益的弹窗
showorder:false,//显示弹出
};
},
components: {
......@@ -199,7 +203,8 @@
navpage,
matchmaking,
miaiactivitytype,
miaiactivityCustom
miaiactivityCustom,
orderPopup
},
onLoad(options) {
let that = this;
......@@ -680,8 +685,58 @@
}
);
},
getorderPupop(){
// TODO由一个来判断是否开启 暂时不知道默认是开启状态
let now = new Date()
let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1
let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1
let nowtime = now.getFullYear()+'-'+Month+'-'+day+' '+ now.getHours()+':'+ now.getMinutes()+':'+ now.getSeconds()
if(uni.getStorageSync('order_old_time')){
let oldtime = uni.getStorageSync('order_old_time').time;
if(new Date(nowtime).getTime()!= new Date(oldtime).getTime()){
this.getUserOffline(nowtime,oldtime)
}
}
uni.setStorageSync("order_old_time",{time:nowtime});//吧当前时间存起来
},
getUserOffline(now,old){
this.request2({
url: '/api/AppletUser/GetUserOfflineEarningsInfo',
data: {
StartTime: old,
EndTime: now,
}
},
(res) => {
res.data = {//模拟数据
State:1,
OrderNum:2,
CommissionMoney:78,
}
this.orderPopupdata = res.data
if(res.data.State==1){
if(res.data.OrderNum>1){
this.showorder = true
}
}
}
);
},
closeBtn(){
this.showorder = false
},
gosalesvolume(){
this.showorder = false;
setTimeout(()=>{
uni.navigateTo({
url: "/pages/share/salesvolume",
});
},10)
},
sharejump(){//分享的总跳转
let that = this
this.
// getorderPupop()//4-9新加
setTimeout(() => {
if (that.JumpType == 1) {
//商品详情
......@@ -1145,9 +1200,9 @@
yj(){
uni.navigateTo({
// url: '/pages/blindDate/userList?Sex=0&listStyle=1'
url: '/pages/coupon/cards/purchase'
// url: '/pages/coupon/cards/list'
// url: '/pages/coupon/cards/purchase'
url: '/pages/share/index/index'
})
}
},
......
......@@ -207,15 +207,17 @@
<view style="width: 100%;height: 30px;background: #f3f4f6;"></view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='goback'></auth>
<orderPopup v-if='showorder' :orderPopupdata='orderPopupdata' @gosalesvolume='gosalesvolume' @closeBtn="closeBtn"></orderPopup>
</view>
</scroll-view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
import orderPopup from "@/components/coupons/orderPopup.vue";
export default {
components: {
auth,
orderPopup,
},
data() {
return {
......@@ -232,7 +234,9 @@
scrollTop: 0,
words: {},
UserPageType: {}, //校园的数据
IsEducation: 0
IsEducation: 0,
orderPopupdata:{},//离线收益的弹窗
showorder:false,//显示弹出
}
},
created() {
......@@ -310,10 +314,54 @@
},
(res) => {
uni.hideNavigationBarLoading()
this.sharedata = res.data
this.sharedata = res.data;
//2021-4-9新加订单弹窗处理
if(this.sharedata.CustomModel.OpenOfflineEarnings==1){//打开弹窗
let now = new Date()
let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1
let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1
let nowtime = now.getFullYear()+'-'+Month+'-'+day+' '+ now.getHours()+':'+ now.getMinutes()+':'+ now.getSeconds()
if(uni.getStorageSync('order_old_time')){
let oldtime = uni.getStorageSync('order_old_time').time;
if(new Date(nowtime).getTime()!= new Date(oldtime).getTime()){
this.getUserOffline(nowtime,oldtime)
}
}
uni.setStorageSync("order_old_time",{time:nowtime});//吧当前时间存起来
}
}
);
},
getUserOffline(now,old){
this.request2({
url: '/api/AppletUser/GetUserOfflineEarningsInfo',
data: {
StartTime: old,
EndTime: now,
}
},
(res) => {
this.orderPopupdata = res.data
if(res.data.State==1){
if(res.data.OrderNum>1){
this.showorder = true
}
}
}
);
},
closeBtn(){
this.showorder = false
},
gosalesvolume(){
this.showorder = false;
setTimeout(()=>{
uni.navigateTo({
url: "/pages/share/salesvolume",
});
},10)
},
goaddurl() {
if (this.sharestatus.Status == 1 && (this.sharestatus.ApplyFor == 1 || this.sharestatus.ApplyFor == 2)) {
uni.navigateTo({
......
......@@ -6,7 +6,7 @@
}
.salesvolume .zongxiaos{
width: 100%;
margin-top: 50rpx;
margin-top: 40rpx;
}
.salesvolume .distext{
font-size: 12px;
......@@ -20,7 +20,7 @@
color: #FFF;
}
.salesvolume .top-b{
margin-top: 35rpx;
margin-top: 30rpx;
width: 100%;
display: flex;
align-items: center;
......@@ -79,7 +79,7 @@
</view>
<view class="disc zongxiaos" >
<text class="distext">总销售额</text>
<view class="dised" style="margin-top: 12px;">{{data.Total?data.Total.toFixed(2):0}} <text style="font-size: 15px;margin-bottom: 16rpx;">(元)</text> </view>
<view class="dised" style="margin-top: 10px;">{{data.Total?data.Total.toFixed(2):0}} <text style="font-size: 15px;margin-bottom: 16rpx;">(元)</text> </view>
</view>
<view class="top-b">
<view class="top-b-item">
......@@ -103,7 +103,7 @@
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/salesxiala.png" style="width: 17px;height: 17px;margin-left: 7px;"></image>
</view>
</view>
<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" disable-scroll=true
<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" disable-scroll=true
@touchstart="touchColumn" @touchmove="moveColumn" @touchend="touchEndColumn">
</canvas>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment