Commit 77014985 authored by liwei's avatar liwei

liwei

parent 799f9ee1
......@@ -23,13 +23,16 @@
<div class="timeInfo">
<div class="text">
<p>地址修改时间:{{deliverDetail.updated_at}}</p>
<p v-if="deliverDetail.express_no">发货时间:{{deliverDetail.deliver_at}}</p>
<div v-if="deliverDetail.express_no && deliverDetail.status === '1'" class="express-no">
<p v-if="!!deliverDetail.express_no">发货时间:{{deliverDetail.deliver_at}}</p>
<p
v-if="!!!deliverDetail.express_no"
>预计发货时间:{{deliverDetail.deliver_start_at}}-{{deliverDetail.deliver_end_at}}</p>
<div v-if="!!deliverDetail.express_no && deliverDetail.status == 1" class="express-no">
<span>物流信息:</span>
<span style="flex: 1;">{{deliverDetail.express_name}} {{deliverDetail.express_no}}</span>
<van-button round size="small" @click="search(1)" type="info">查看物流</van-button>
</div>
<div v-if="deliverDetail.express_no && deliverDetail.status === '0'" class="express-no">
<div v-if="!!!deliverDetail.express_no && deliverDetail.status == 0" class="express-no">
<span>物流信息:</span>
<span style="flex: 1;">待发货</span>
</div>
......@@ -42,10 +45,7 @@
<div class="head next">
<i style="background:#FFD454"></i>
下期收货地址
<span class="fl-r" @click="goEdit" v-if="noDeliverDetail.flag">
<span class="iconfont icon-icon_edit"></span> 修改
</span>
<span class="fl-r Invalid" v-if="!noDeliverDetail.flag">
<span class="fl-r" @click="goEdit">
<span class="iconfont icon-icon_edit"></span> 修改
</span>
</div>
......@@ -62,17 +62,17 @@
<div class="text">
<p>地址修改时间:{{noDeliverDetail.updated_at}}</p>
<p
v-if="!noDeliverDetail.express_no"
v-if="!!!noDeliverDetail.express_no"
>预计发货时间:{{noDeliverDetail.deliver_start_at}}-{{noDeliverDetail.deliver_end_at}}</p>
<div
v-if="noDeliverDetail.express_no && noDeliverDetail.status === '1'"
v-if="!!noDeliverDetail.express_no && noDeliverDetail.status == 1"
style="justify-content:space-between;"
>
物流信息:{{noDeliverDetail.express_name}} {{noDeliverDetail.express_no}}
<van-button round size="small" @click="search(2)" type="info">查看物流</van-button>
</div>
<div
v-if="noDeliverDetail.express_no && noDeliverDetail.status === '0'"
v-if="!!!noDeliverDetail.express_no && noDeliverDetail.status == 0"
style="justify-content:space-between;"
>物流信息:待发货</div>
<!-- <div v-if="!noDeliverDetail.express_no">物流信息:- -</div> -->
......@@ -81,7 +81,7 @@
</div>
</div>
<div class="tip" v-if="deliverDetail || noDeliverDetail">
<p>*预计发货前24小时不可修改地址,若有需要请联系您的专属班主任老师</p>
<p>*预计发货时间内不可修改地址,若有需要请联系您的专属班主任老师</p>
</div>
<div
class
......
......@@ -48,8 +48,8 @@ import {
modifyAddressApi
} from "../../service/api";
import addressList from "../address-picker/addr";
import {Toast } from "vant";
import {Field,Cell} from 'mint-ui'
import { Toast } from "vant";
import { Field, Cell } from "mint-ui";
export default {
name: "",
components: {
......@@ -156,15 +156,12 @@ export default {
param.city = labels[1];
param.area_id = values[2];
param.area = labels[2];
console.log(param);
modifyAddressApi(param)
.then(res => {
this.closeAdd();
Toast("修改成功");
this.$nextTick(() => {
this.$router.replace({
name: "Address"
});
this.$router.replace({
name: "Address"
});
})
.catch(error => {
......
<template>
<div>
<div class="share-good-page" ref="share_page">
<div class="share-good-head" v-if="userDetail" >
<img :src="shareGoodsBg" alt="">
<img class="head" :src="userDetail.user_info.avatar">
<div class="tip2"><p v-if="nickname">{{userDetail.user_info.nickname}}家宝宝</p><p>在「唱唱启蒙英语」累计学习</p></div>
<!-- <div class="title" :style="{backgroundImage:`url('${title_share_goods}')`}" >
{{userDetail.user_info.nickname}}
</div> -->
<div class="day">
{{userDetail.total_day}}
<p>
Days
</p>
</div>
<div class="textBox">
<!-- <p class="top">继续坚持</p> -->
<p class="btn">学无涯 行必知</p>
</div>
<!-- <div class="iknow" v-if="goodsDetail.current_price!=0" @click="toBuy(1)">
<img :src="btncoin" alt="">
</div>
<div class="iknow" v-if="goodsDetail.current_price==0" @click="toBuy(3)">
<img :src="btnfree" alt="">
</div> -->
<div class="Fml"><p>邀您一起带宝宝学习</p> <div><span>100万+</span>家庭推荐的哈佛英语启蒙课」</div>
<div class="line"></div>
</div>
<div class="nav" @click="move" v-if="goodsDetail">
<img class="move" :src="icon_point" alt="">
课程详情
<img class="move" :src="icon_point" alt="">
</div>
</div>
<div class="good-content" v-if="goodsDetail&&goodsDetail.desc&&goodsDetail.desc.detail">
<div class="content" v-html="goodsDetail.desc.detail">
</div>
<div class="btn-block" ref="btn_block">
<div class="lastTime">
距优惠结束仅剩 {{lastTime.day}}{{lastTime.hour}}{{lastTime.min}}{{lastTime.second}}
</div>
<div class="btn" @click="toBuy(2)" v-if="goodsDetail.current_price>100">
正在疯抢 · 超值VIP课程
</div>
<div class="btn" @click="toBuy(2)" v-if="goodsDetail.current_price==100">
1元领取 · 超值VIP课程
</div>
</div>
</div>
<!-- <div class="good-content" v-if="goodsDetail&&goodsDetail.goods_type==2">
<div class="content" v-html="goodsDetail.desc.detail">
</div>
<div class="btn-block" ref="btn_block">
<div class="lastTime">
优惠倒计时 {{lastTime.day}}{{lastTime.hour}}{{lastTime.min}}{{lastTime.second}}
</div>
<div class="btnBox">
<div class="btn slg" @click="toBuy(1)">
单独购&nbsp;&nbsp;{{goodsDetail.original_price/100}}
</div>
<div class="btn grp" @click="toBuy(3)">
{{goodsDetail.desc.group_number}}人团&nbsp;&nbsp;{{goodsDetail.current_price/100}}
</div>
</div>
</div>
</div> -->
</div>
<login-page v-if="goodsDetail" :bind-mobile="bindMobile" :groupDetail="goodsDetail" @goToBuyPage="goToBuyPage"></login-page>
</div>
</template>
<script>
import shareGoodsBg from '../../assets/newLesson/shareGoodsBg5.png'
import title_share_goods from '../../assets/newLesson/title-share-goods.png'
import btncoin from '../../assets/newLesson/btncoin.png'
import btnfree from '../../assets/newLesson/btnfree.png'
import icon_point from '../../assets/newLesson/icon_point@2x.png'
import {getOtherUserWatchApi,getShareGoodsApi} from "../../service/api";
import loginPage from '../buy/login'
import {Toast} from 'vant'
export default {
name: "shareGoods",
components: {loginPage},
data(){
return {
shareGoodsBg:shareGoodsBg,
title_share_goods:title_share_goods,
userDetail:null,
bindMobile:{
show:false,
mobile:'',
img_code:'',
verify_code:''
},
btncoin:btncoin,
btnfree:btnfree,
icon_point:icon_point,
shopId:null,
goodsDetail:null,
lastTime:localStorage.getItem('lastTimeShare')?JSON.parse(localStorage.getItem('lastTimeShare')):{day:0,hour:8,min:0,second:0},
nickname:""
}
},
methods:{
move(){
let moneyDom = document.getElementsByClassName('nav');
if(moneyDom.length>0){
console.log(moneyDom[0].offsetTop)
window.scrollTo(0,moneyDom[0].offsetTop);
}
// window.scrollTo(100,1200)
},
lastTimeOut(){
if(this.lastTime.second === 0 ){
this.lastTime.second = 59;
if(this.lastTime.min === 0 ){
this.lastTime.min = 59;
if(this.lastTime.hour === 0 ){
this.lastTime.hour = 8;
}else{
this.lastTime.hour--;
}
}else{
this.lastTime.min--;
}
}else{
this.lastTime.second--;
}
localStorage.setItem('lastTimeShare',JSON.stringify(this.lastTime))
},
initPage(){
Toast.loading({
mask: true,
message: ''
});
this.$sa.track('ViewInvitation',{
salesID:this.$route.query.userID,
});
console.log(JSON.parse(localStorage.getItem('userDesc')))
this.nickname = JSON.parse(localStorage.getItem('userDesc')).nickname
getOtherUserWatchApi(this.$route.query.userID).then(res=>{
res.user_info.avatar = res.user_info.avatar.replace('http://','https://');
this.userDetail = res
this.nickname= res.user_info.nickname
});
// this.shopId
getShareGoodsApi().then(res=>{
this.shopId = res.id;
res.desc = JSON.parse(res.desc)
res.goods_desc = JSON.parse(res.goods_desc);
this.goodsDetail = res
console.log(res)
setTimeout(() => {
this.goodsDetail = {}
this.goodsDetail = res
Toast.clear()
}, 500);
// debugger
// getGoodsDetailApi(this.shopId).then(res=>{
// res.desc = JSON.parse(res.desc)
// res.goods_desc = JSON.parse(res.goods_desc);
// this.goodsDetail = res
// })
})
},
goToBuyPage(type){
if(type==1){
window.location.href = `${process.env.API_URL}#/buy?shopId=${this.shopId}&type=single&invite_code=CC-UDK-${this.$route.query.userID}`
}else{
window.location.href = `${process.env.API_URL}#/buy?shopId=${this.shopId}&invite_code=CC-UDK-${this.$route.query.userID}`
}
},
toBuy(type){
if(this.goodsDetail.current_price==100){
this.$sa.track('buttonClick',{
tabTitle:'打卡商品页',
moduleTitle:'功能按钮',
buttonType:'购买',
buttonName:'1元领取 · 超值VIP课程'
});
}else{
this.$sa.track('buttonClick',{
tabTitle:'打卡商品页',
moduleTitle:'功能按钮',
buttonType:'购买',
buttonName:'正在疯抢.超值VIP课程'
});
}
if(!JSON.parse(localStorage.getItem('userDesc')).mobile|| JSON.parse(localStorage.getItem('userDesc')).mobile === ''){
this.bindMobile.show = true;
setTimeout(()=>{
this.$sa.track('ViewRegisterpage',{});
},1000)
}else{
this.goToBuyPage(type);
}
}
},
mounted(){
let that = this
this.initPage();
setInterval(()=>{this.lastTimeOut(
)},1000);
window.onscroll= ()=>{
//变量t是滚动条滚动时,距离顶部的距离
let t = document.documentElement.scrollTop||document.body.scrollTop;
if( this.$refs.btn_block){
if(t>500){
this.$refs.btn_block.style.opacity = 1
}else{
this.$refs.btn_block.style.opacity = 0
}
}
}
}
}
</script>
<style scoped lang="less">
@import "../../util/public";
@-webkit-keyframes spin {
from {
-webkit-transform: translateY(-3*@toVw);
}
to {
-webkit-transform: translateY(3*@toVw);
}
}
@keyframes spin {
from {
transform: translateY(-3*@toVw);
}
to {
transform: translateY(3*@toVw);
}
}
.move{-webkit-animation: spin 2s linear 1s 5 alternate;animation: spin 2s linear infinite;}
.share-good-page{
// position: absolute;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
}
.share-good-head{
width: 100vw;
// height: 584*@toVw;
// margin-top: -64*@toVw;
// background-size: 100% 100%;
position: relative;
.textBox{position: absolute;top: 265*@toVw;left:142*@toVw ;text-align: center;color: #746D6E; font-size: 15*@toVw;
.top{ font-size: 17*@toVw;}
.btn{ font-size: 15*@toVw;}
}
.iknow{
position: absolute;
top: 415*@toVw;
width: 265*@toVw;
// height: 44*@toVw;
left: 58*@toVw;
}
.head{
position: absolute;
width: 60*@toVw;
height: 60*@toVw;
top: 42*@toVw;
left: 159*@toVw;
border-radius: 100*@toVw;
}
.tip2{
position: absolute;
width: 350*@toVw;
color: #746D6E;
font-size: 15*@toVw;
text-align: center;
top: 110*@toVw;
left: 13*@toVw;
}
.title{
position: absolute;
width: 225*@toVw;
height: 54*@toVw;
background-size: 100% 100%;
top: 175*@toVw;
left: 75*@toVw;
text-align: center;
color: white;
font-size: 20*@toVw;
line-height: 48*@toVw;
}
.day{
position: absolute;
top: 176*@toVw;
width: 100%;
text-align: center;
color: white;
font-size:40*@toVw;
font-family:PingFangSC-Semibold;
font-weight:bold;
p{
font-size:15*@toVw;
font-family:PingFangSC-Semibold;
// font-weight:bold;
line-height: 16*@toVw;
font-weight:300;
color:white;
}
}
.Fml{position: absolute;top:314*@toVw;left:56*@toVw;font-size: 15*@toVw;color: #55343A;
text-align: center;
p{line-height: 36*@toVw;color: #55343A;}
div{color: #6A3028;font-weight: bold; }
.line{width: 95%;height: 4*@toVw;background: #F6C9A2;opacity: 0.44;position: relative;top: -5*@toVw;}
span{color: #E17640;}
}
.nav{position: absolute;top:412*@toVw;left: 108*@toVw;
img{width: 10*@toVw;}
width: 157*@toVw;height: 30*@toVw;
line-height: 30*@toVw;
border-radius: 15*@toVw;
background: #F98F55;
text-align: center;
color: white;}
}
.good-content{
background: #F4CAA2;
padding: 0 15*@toVw 80*@toVw 15*@toVw;
position: relative;
top: -5*@toVw;
.content{
// background: white;
border-radius: 8*@toVw;
overflow: hidden;
// padding: 10*@toVw;
};
}
.btn-block{
position: fixed;
padding: 10*@toVw 0 ;
left: 0;
width: 100%;
background: white;
opacity: 0;
transition: all 0.5s;
bottom: 0;
.lastTime{
top: -30*@toVw;
height: 30*@toVw;
line-height: 30*@toVw;
color: #FF785D;
background: #FFE543;
position: absolute;
text-align: center;
left: 0;
width: 100%;
}
.btnBox{
display: flex;
padding:0 29*@toVw;
.slg{background: white;color: #666666;border: 1px solid #666666;box-sizing: border-box;margin-right: 10*@toVw;}
}
.btn{
width: 287*@toVw;
height: 44*@toVw;
margin: auto;
background: #FF785D;
border-radius: 100*@toVw;
color: white;
line-height: 44*@toVw;
text-align: center;
font-size:18*@toVw;
font-family:PingFang-SC-Medium;
font-weight:500;
}
}
</style>
<style>
img{
max-width: 100% !important;
}
</style>
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