5.16

parent 559af868
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
overflow: hidden; overflow: hidden;
position: fixed; position: fixed;
background: #f4f4f4; background: #f4f4f4;
}</style><link href=static/css/app.a33637a3392be2fde512aa6031b6e4df.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script src=static/vconsole/vconsole.min.js></script><script type=text/javascript src=static/js/manifest.fd3a18b916a67a13c7fb.js></script><script type=text/javascript src=static/js/vendor.971a89734ef51957abe6.js></script><script type=text/javascript src=static/js/app.436f01e1569fecfb6bca.js></script></body></html> }</style><link href=static/css/app.a33637a3392be2fde512aa6031b6e4df.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script src=static/vconsole/vconsole.min.js></script><script type=text/javascript src=static/js/manifest.862bdde8ecfa95495503.js></script><script type=text/javascript src=static/js/vendor.971a89734ef51957abe6.js></script><script type=text/javascript src=static/js/app.436f01e1569fecfb6bca.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,t,f){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(c&&c(n,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=a(a.s=f[i]);return b};var n={},r={34:0};function a(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,a){c=r[e]=[n,a]});c[2]=n;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,a.nc&&f.setAttribute("nonce",a.nc),f.src=a.p+"static/js/"+e+"."+{0:"45a25b564a1d9d0780f1",1:"712a57ff738f6f79064f",2:"88eb6979ee991170dd43",3:"49b5451bf0ef02f66b49",4:"973d1cc7b086ea345be4",5:"09e142b4a9093fd2d98c",6:"ecff242195849c51892f",7:"75e6c06eb09e98ab3b3f",8:"96e00676211b990557c0",9:"c0fbc0b19b1857f63c48",10:"827fb93ad16992519742",11:"b2db1db9ac9ab09a90ef",12:"20990e7a965aa0c5c0b4",13:"d9b69084d108cefea655",14:"d478ab3287fedb08f004",15:"4d1c0a4b96843b0dced9",16:"12cc93e73c71922dca3a",17:"205c3c21ebcb4df60d2b",18:"1953d2930aae0ad3e34e",19:"9ce5c5235725211384e3",20:"768213446401f107d3dd",21:"81b8f5f4ff3a42b5e563",22:"18aa9096fdaa1b39e26d",23:"abd000c2d42590325658",24:"7d513d80b42dc2d2f825",25:"4fdd6bc434a0df6dc787",26:"f688ad0a42f7f2456842",27:"70e17fb44e1bb5b2e2bd",28:"30feeb113b054e94eca0",29:"05cc55c2ed39ea616f21",30:"2e9330178c4953f41110",31:"54c444f6bf2000ad2de9"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return f.onerror=f.onload=d,t.appendChild(f),n},a.m=e,a.c=n,a.d=function(e,c,n){a.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(c,"a",c),c},a.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},a.p="",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(n,c,f){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(e[o]=c[o]);for(a&&a(n,c,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=t(t.s=f[i]);return b};var n={},r={34:0};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var a=r[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var n=new Promise(function(n,t){a=r[e]=[n,t]});a[2]=n;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,t.nc&&f.setAttribute("nonce",t.nc),f.src=t.p+"static/js/"+e+"."+{0:"c3215ea3d0f4b9203928",1:"c210ba9652199433aba2",2:"88eb6979ee991170dd43",3:"49b5451bf0ef02f66b49",4:"973d1cc7b086ea345be4",5:"09e142b4a9093fd2d98c",6:"ecff242195849c51892f",7:"75e6c06eb09e98ab3b3f",8:"96e00676211b990557c0",9:"9c6596cb1371f67d909c",10:"827fb93ad16992519742",11:"b2db1db9ac9ab09a90ef",12:"20990e7a965aa0c5c0b4",13:"956b095c0a0e2fe38264",14:"d478ab3287fedb08f004",15:"929b80643377a6bd8412",16:"94c57d9b4532d295fd17",17:"205c3c21ebcb4df60d2b",18:"1953d2930aae0ad3e34e",19:"9ce5c5235725211384e3",20:"768213446401f107d3dd",21:"81b8f5f4ff3a42b5e563",22:"18aa9096fdaa1b39e26d",23:"abd000c2d42590325658",24:"7d513d80b42dc2d2f825",25:"189a4ab5e51684f6c908",26:"f688ad0a42f7f2456842",27:"990bec66a2b0a8e0f57a",28:"30feeb113b054e94eca0",29:"7747cb8246f34a64535b",30:"e8f9124f83677fb6d1ae",31:"f6611d39d1dda1664e79"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var a=r[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return f.onerror=f.onload=d,c.appendChild(f),n},t.m=e,t.c=n,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
...@@ -373,9 +373,9 @@ ...@@ -373,9 +373,9 @@
.title{ .title{
font-size: 18px; font-size: 18px;
overflow: hidden; // overflow: hidden;
text-overflow:ellipsis; // text-overflow:ellipsis;
white-space: nowrap; // white-space: nowrap;
color: #333333; color: #333333;
margin-bottom: 5/7.5vw; margin-bottom: 5/7.5vw;
} }
......
...@@ -373,23 +373,23 @@ export default { ...@@ -373,23 +373,23 @@ export default {
} }
}) })
// 未成团订单 // 未成团订单
// getOrderListApi().then(res=>{ getOrderListApi().then(res=>{
// let that = this let that = this
// let arr = [] let arr = []
// res.list.forEach(el => { res.list.forEach(el => {
// if(el.buy_type==2&&el.status==1){ if(el.buy_type==2&&el.status==1){
// if(new Date(el.group_info.deadline.replace(/-/g, '/')).getTime()>=new Date().getTime()){ if(new Date(el.group_info.deadline.replace(/-/g, '/')).getTime()>=new Date().getTime()){
// el.goods_desc= JSON.parse(el.goods_desc) el.goods_desc= JSON.parse(el.goods_desc)
// arr.push(el) arr.push(el)
// let Interval = setInterval(function () { let Interval = setInterval(function () {
// that.countTime = commom.leftTimer(new Date(el.group_info.deadline.replace(/-/g, '/')),Interval) that.countTime = commom.leftTimer(new Date(el.group_info.deadline.replace(/-/g, '/')),Interval)
// }, 1000) }, 1000)
// } }
// } }
// }); });
// this.orderList = arr this.orderList = arr
// console.log(arr) console.log(arr)
// }) })
}, },
dateParse(dateString) { dateParse(dateString) {
let SEPARATOR_BAR = "-"; let SEPARATOR_BAR = "-";
......
<template>
<div>
<van-popup class="refer-share" position="top" v-model="showShare"><img :src="shareTipsUrl"></van-popup>
<!-- <div class="tips" v-if="orderList.length < 1">
暂无订单
</div> -->
<div v-if="orderList.length < 1" class="unStart">
<img :src="mok4" alt="">
<p>还没有订单哦~</p>
<div @click="goIndex">去逛逛吧</div>
</div>
<div class="listBox">
<div v-for="(data,index) in orderList" class="list">
<div class="head" @click="goDetail(index)">
<div class="bg-img" v-if="data.goods_desc" :style="{backgroundImage: `url(${data.goods_desc.img[0].url})`}">
</div>
<div class="content">
<div class="title">{{data.goods_name}}</div>
<div v-if="data.goods_desc" class="desc">{{data.goods_desc.desc}}</div>
<div class="time">付款时间:{{data.pay_at}}</div>
<div class="bottom"><span class="payMoney">实付:{{data.money/100}}</span><span class="share" v-if="data.buy_type === 2 && data.status !== 4" @click="shareOrder(data)">
<img :src="shareUrl"/>点击分享
</span></div>
</div>
</div>
<!-- <div class="footer">
<span :class="{red:data.status === 1}">{{data.status | orderType}}</span>
</div> -->
</div>
</div>
</div>
</template>
<script>
import {getOrderListApi,getwechatParam} from "../service/api";
import {ORDERTYPE} from "../util/wordbook";
import shareUrl from '../assets/share.png'
import mok4 from '../assets/orderless.png'
import { Toast } from 'vant';
import shareTipsUrl from '../assets/Bitmap@2x.png'
export default {
name: "order",
data(){
return {
orderList:[],
showShare:false,
shareTipsUrl:shareTipsUrl,
shareUrl:shareUrl,
mok4:mok4,
shopId:''
}
},
filters:{
orderType(value){
return ORDERTYPE[value]
}
},
mounted(){
this.initPage()
},
methods:{
goDetail(index){
if(this.orderList[index].buy_type==1){
this.$router.push({
name: 'buySuccess',
query:{
out_trade_no:this.orderList[index].out_trade_no
}
});
}else{
this.$router.push({
name: 'success',
query:{
out_trade_no:this.orderList[index].out_trade_no
}
});
}
},
goIndex(){
this.$router.push({
name: "index"
});
},
initPage(){
getwechatParam({
api_list:'onMenuShareAppMessage,onMenuShareTimeline',
url:window.location.href.split('#')[0]
}).then(res=>{
wx.config({
debug: false,
appId: res.appId,
timestamp: parseInt(res.timestamp),
nonceStr: res.nonceStr,
signature: res.signature,
jsApiList: res.jsApiList
});
});
getOrderListApi({status:1}).then(res=>{
res.list.forEach(i=>{
if(i.goods_desc){
i.goods_desc= JSON.parse(i.goods_desc)
}
});
this.orderList = res.list
})
},
shareOrder(data){
this.$sa.track('buttonClick',{
tabTitle:'订单',
moduleTitle:'订单',
buttonType:'分享',
buttonName:'团购分享'
});
this.showShare = true;
let invite_code;
if(!data.invite_id || data.invite_id == '') {
invite_code = 'CC-USER-' + data.user_id;
}else if(data.invite_type === 'TEACHER'){
invite_code = `CC-USER-${data.user_id}`;
}else{
invite_code = `CC-${data.invite_type}-${data.user_id}`;
}
let shareData = JSON.parse(data.share_desc);
let that =this;
let shareUrl = `${process.env.BUY_URL}shopId=${data.goods_id}&groupId=${data.order_group_id}&invite_code=${invite_code}'`;
wx.onMenuShareAppMessage({
title: shareData.title, // 分享标题
desc: shareData.content,// 分享描述
link: shareUrl, // 分享链接
imgUrl: shareData.img[0]?shareData.img[0].url : 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
Toast('分享成功');
that.showShare = false
},
});
wx.onMenuShareTimeline({
title: shareData.title, // 分享标题
desc: shareData.content,// 分享描述
link: shareUrl, // 分享链接
imgUrl: shareData.img[0]?shareData.img[0].url : 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
Toast('分享成功');
that.showShare = false
},
});
}
}
}
</script>
<style scoped lang="less">
@import "../util/public";
.child-view{background: white;}
.unStart{
text-align: center;
img{width:300*@toVw; }
p{line-height: 22px;font-size: 16px;color: #666666;}
div{width:250*@toVw;height: 40*@toVw;line-height:40*@toVw;background: #40A9FF;color: white;border-radius: 20*@toVw;margin-top: 72*@toVw }
}
.refer-share {
width: 100%;overflow-y:visible;
}
.refer-share img {
position: absolute;
width: 80%;
right: 0;
z-index: 2002;
}
.tips{
padding: 20 * @toVw;
font-size: 24px;
text-align: center;
color: #888888;
}
.listBox{padding: 15*@toVw;}
.list{
box-shadow:0px 3px 8px 0px rgba(0,0,0,0.1);
border-radius:15px;
overflow: hidden;
.bg-img{
width: 108*@toVw;
height:108*@toVw ;
margin-right: 5 * @toVw;
margin-left: 0 * @toVw;
background-size:100% 100%;
}
.head{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
line-height: 1.4em;
position: relative;
flex-flow: row nowrap;
// margin-right: 10px;
.content{
font-size: 12* @toVw;
color: #999;
.title{
width: 160* @toVw;margin-left: 0; overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
color: #666;
}
.desc{width: 160* @toVw;margin-left: 0; overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap}
.bottom{display: flex;display: -webkit-flex;justify-content: space-between;
.share{
img{
width: 16 *@toVw;
display: inline-block;
margin-right: 3 * @toVw;
vertical-align: text-bottom;
}
}
.payMoney{margin-left: 0;}
}
}
}
.footer{
display: flex;
display: -webkit-flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
margin-left: 10px;
margin-right: 10px;
padding: 6px 12px;
color: #999;
font-size: 12 * @toVw;
border: 1px solid #ccc;
border-top: none;
border-bottom-left-radius: 9px;
border-bottom-right-radius: 9px;
box-shadow: 0px 2px 1px 0px rgba(0,0,0,0.1);
span{
margin: 0;
line-height: 20 * @toVw;
}
.red{
color: #f06a33;
}
}
}
</style>
...@@ -9,22 +9,26 @@ ...@@ -9,22 +9,26 @@
<p>还没有订单哦~</p> <p>还没有订单哦~</p>
<div @click="goIndex">去逛逛吧</div> <div @click="goIndex">去逛逛吧</div>
</div> </div>
<div v-for="(data,index) in orderList" class="list"> <div class="listBox">
<div class="head" @click="goDetail(index)"> <div v-for="(data,index) in orderList" class="list">
<div class="bg-img" v-if="data.goods_desc" :style="{backgroundImage: `url(${data.goods_desc.img[0].url})`}"> <div class="head" >
<div @click="goDetail(index)" class="bg-img" v-if="data.goods_desc" :style="{backgroundImage: `url(${data.goods_desc.img[0].url})`}">
</div>
<div class="content">
<img @click="goDetail(index)" class="status" v-if="data.status!=0" :src="data | orderType" alt="">
<div @click="goDetail(index)" class="title">{{data.goods_name}}</div>
<div @click="goDetail(index)" v-if="data.goods_desc" class="desc">{{data.goods_desc.desc}}</div>
<div @click="goDetail(index)" class="time">付款时间:{{data.pay_at}}</div>
<div class="bottom"><span class="payMoney">实付:{{data.money/100}}</span><span class="share" v-if="data.buy_type === 2 && data.status !== 4" @click="shareOrder(data)">
我要分享&nbsp;<img :src="shareUrl"/>
</span>
<!-- <div class="pay" v-if="data.status==0">去付款</div> -->
</div>
</div>
</div> </div>
<div class="content"> <!-- <div class="footer">
<div class="title">{{data.goods_name}}</div> <span :class="{red:data.status === 1}">{{}}</span>
<div v-if="data.goods_desc" class="desc">{{data.goods_desc.desc}}</div> </div> -->
<div class="time">付款时间:{{data.pay_at}}</div>
</div>
</div>
<div class="footer">
<span class="payMoney">实付:{{data.money/100}}</span>
<span class="share" v-if="data.buy_type === 2 && data.status !== 4" @click="shareOrder(data)">
<img :src="shareUrl"/>点击分享
</span>
<span :class="{red:data.status === 1}">{{data.status | orderType}}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -33,6 +37,7 @@ ...@@ -33,6 +37,7 @@
<script> <script>
import {getOrderListApi,getwechatParam} from "../service/api"; import {getOrderListApi,getwechatParam} from "../service/api";
import {ORDERTYPE} from "../util/wordbook"; import {ORDERTYPE} from "../util/wordbook";
import {order} from "../util/imgUrl.js"
import shareUrl from '../assets/share.png' import shareUrl from '../assets/share.png'
import mok4 from '../assets/orderless.png' import mok4 from '../assets/orderless.png'
import { Toast } from 'vant'; import { Toast } from 'vant';
...@@ -46,13 +51,28 @@ ...@@ -46,13 +51,28 @@
shareTipsUrl:shareTipsUrl, shareTipsUrl:shareTipsUrl,
shareUrl:shareUrl, shareUrl:shareUrl,
mok4:mok4, mok4:mok4,
shopId:'' shopId:'',
orderImg:order
} }
}, },
filters:{ filters:{
orderType(value){ orderType(value){
return ORDERTYPE[value] if(value.buy_type === 2){
} if(value.status == 1){
return order.orderStatus2
}else if(value.status == 4){
return order.orderStatus3
}
}else if(value.buy_type === 1 && value.status == 1){
return order.orderStatus1
}else if(value.status == 2){
return order.orderStatus4
}
// return ORDERTYPE[value]
},
// orderType(value){
// return ORDERTYPE[value]
// }
}, },
mounted(){ mounted(){
this.initPage() this.initPage()
...@@ -171,11 +191,16 @@ ...@@ -171,11 +191,16 @@
text-align: center; text-align: center;
color: #888888; color: #888888;
} }
.listBox{padding: 15*@toVw;}
.list{ .list{
box-shadow:0px 3*@toVw 8*@toVw 0px rgba(0,0,0,0.06);
border-radius:15*@toVw;
overflow: hidden;
.bg-img{ .bg-img{
width: 160*@toVw; width: 108*@toVw;
margin-right: 5 * @toVw; height:108*@toVw ;
height: 80*@toVw; margin-right: 15 * @toVw;
margin-left: 0 * @toVw;
background-size:100% 100%; background-size:100% 100%;
} }
.head{ .head{
...@@ -183,22 +208,40 @@ ...@@ -183,22 +208,40 @@
display: -webkit-flex; display: -webkit-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
line-height: 1.4em; line-height: 1.6em;
position: relative; position: relative;
flex-flow: row nowrap; flex-flow: row nowrap;
margin-left: 10px; // margin-right: 10px;
margin-right: 10px;
margin-top: 12px;
padding: 12px;
border: 1px solid #ccc;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
.content{ .content{
font-size: 3.2vw; font-size: 12* @toVw;
color: #999; color: #999;
margin-left: 0;
position: relative;
.title{ .title{
font-size: 3.73333vw; width: 160* @toVw;margin-left: 0; overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
color: #666; color: #666;
font-size: 15* @toVw;
}
.desc{width: 160* @toVw;margin-left: 0; overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap}
.status{position: absolute;width:60* @toVw ;right: 0;}
.bottom{display: flex;display: -webkit-flex;justify-content: space-between;
width: 226*@toVw;
.share{
margin-right: 10 *@toVw;
img{
width: 13 *@toVw;
display: inline-block;
margin-right: 3 * @toVw;
vertical-align: text-bottom;
}
}
.payMoney{margin-left: 0;}
.pay{width: 70* @toVw;height: 28* @toVw;border:1px solid rgba(244,99,99,1);color:rgba(244,99,99,1);
text-align: center;line-height: 28* @toVw;border-radius: 14* @toVw; }
} }
} }
} }
...@@ -222,15 +265,7 @@ ...@@ -222,15 +265,7 @@
margin: 0; margin: 0;
line-height: 20 * @toVw; line-height: 20 * @toVw;
} }
.share{
img{
width: 16 *@toVw;
display: inline-block;
margin-right: 3 * @toVw;
vertical-align: text-bottom;
}
}
.red{ .red{
color: #f06a33; color: #f06a33;
} }
......
...@@ -59,6 +59,17 @@ import listen1 from '../assets/newLesson/icon_listen2@3x.png' ...@@ -59,6 +59,17 @@ import listen1 from '../assets/newLesson/icon_listen2@3x.png'
import look2 from '../assets/newLesson/icon_look2@3x.png' import look2 from '../assets/newLesson/icon_look2@3x.png'
import play2 from '../assets/newLesson/icon_play2@3x.png' import play2 from '../assets/newLesson/icon_play2@3x.png'
import orderStatus1 from '../assets/order/order_status1.png'
import orderStatus2 from '../assets/order/order_status2.png'
import orderStatus3 from '../assets/order/order_status3.png'
import orderStatus4 from '../assets/order/order_status4.png'
// 订单状态
export const order = {
orderStatus1:orderStatus1,
orderStatus2:orderStatus2,
orderStatus3:orderStatus3,
orderStatus4:orderStatus4
};
// 分享学习记录 // 分享学习记录
export const share = { export const share = {
background:share_background, background:share_background,
......
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