更改样式

This commit is contained in:
952108534@qq.com 2022-01-24 19:29:33 +08:00
parent 69c2664e21
commit a2a6ca14bd
4 changed files with 415 additions and 321 deletions

View File

@ -10,6 +10,7 @@ body {
border:unset; border:unset;
} }
.rc-menu--xs .rc-screen-reader{ .rc-menu--xs .rc-screen-reader{
left:28%; left:28%;
} }
@ -141,6 +142,9 @@ picture {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.useruantity{
margin: 1rem 1.25rem;
}
.ts-remove { .ts-remove {
text-decoration: line-through; text-decoration: line-through;

View File

@ -2,8 +2,110 @@ ul li ol li em strong i {
list-style: none; list-style: none;
font-style: normal; font-style: normal;
} }
.rc-main{
margin: 0;
padding: 0;
}
//手机端 //手机端
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.online{
margin: 0;
&.bold{
height: 0.5rem;
}
}
// 订单状态
.rc-receiving {
width: 100%;
display: flex;
align-items: center;
// margin: 1rem 1.25rem;
em {
font-style: normal;
color: #e1001a;
font-size: 1.375rem;
font-weight: bold;
}
span {
color: #666666;
font-size: 0.875rem;
display: block;
margin-left: 1.125rem;
width: 62%;
margin-top: 0.5rem;
}
}
//快递列表
.delivery {
display: flex;
flex-direction: column;
margin: 1rem 1.25rem;
.to-delivery {
img{
width: 1rem;
height: 1rem;
object-fit: contain;
}
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 0.18rem;
color: #333333;
font-size: 1rem;
font-weight: 500;
}
i {
font-style: normal;
margin-left: 0.5rem;
display: block;
color: #999999;
font-size: 0.75rem;
margin-top: 0.31rem;
}
}
.bo-delivery {
span {
font-size: 0.87rem;
color: #666666;
display: block;
margin-top: 0.5rem;
}
}
}
//地址列表
.mypersonal{
.my-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
font-size: 0.87rem;
color: #333333;
}
i {
font-style: normal;
display: block;
font-size: 0.87rem;
color: #333333;
margin-left: .5rem;
}
}
.per-delivery {
span {
font-size:0.875rem;
color: #666666;
display: block;
margin-top: 0.43rem;
}
}
}
.rc-margin-y--md{ .rc-margin-y--md{
width: 100%; width: 100%;
height: 80px; height: 80px;
@ -39,83 +141,7 @@ margin-right: 20px;
.rc-foo{ .rc-foo{
display: none; display: none;
} }
.rc-receiving {
width: 100%;
height: 80px;
display: flex;
align-items: center;
em {
font-style: normal;
color: #e1001a;
font-size: 22px;
font-weight: bold;
}
span {
color: #666666;
font-size: 12px;
display: block;
margin-left: 18px;
width: 62%;
}
}
.delivery {
display: flex;
flex-direction: column;
height: 80px;
.to-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 3px;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
}
}
.bo-delivery {
span {
font-size: 14px;
color: #666666;
display: block;
margin-top: 8px;
}
}
}
.mypersonal {
display: flex;
flex-direction: column;
height: 80px;
.my-delivery {
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 3px;
}
i {
font-style: normal;
margin-left: 8px;
display: block;
}
}
.per-delivery {
span {
font-size: 14px;
color: #666666;
display: block;
margin-top: 8px;
}
}
}
.rc-usermain { .rc-usermain {
display: flex; display: flex;
@ -207,14 +233,16 @@ margin-right: 20px;
.rc-merchandise { .rc-merchandise {
width: 100%; width: 100%;
margin-top: 32px; margin-top: 24px;
padding-right: 0.7rem;
padding-left: 0.7rem;
ul { ul {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
line-height: 26px; line-height: 30px;
i { i {
font-style: normal; font-style: normal;
color: #666666; color: #666666;
@ -240,10 +268,15 @@ margin-right: 20px;
} }
} }
} }
.useruantity{
padding-right: 20px;
}
} }
.rc-payment{ .rc-payment{
padding-right: 0.7rem;
padding-left: 0.7rem;
width: 100%; width: 100%;
margin-top: 32px; margin-top: 32px;
.u-trackingnumber{ .u-trackingnumber{
@ -294,6 +327,48 @@ margin-right: 20px;
//pc端 //pc端
@media screen and (min-width: 768px) and (max-width: 1920px) { @media screen and (min-width: 768px) and (max-width: 1920px) {
//快递列表
.delivery {
display: flex;
flex-direction: column;
margin: 1rem 1.25rem;
.to-delivery {
margin-top: 20px;
img{
width: 24px;
height: 24px;
object-fit: contain;
}
display: flex;
align-items: center;
font-style: normal;
span {
display: block;
margin-left: 16px;
color: #333333;
font-size: 18px;
font-weight: 500;
}
i {
font-style: normal;
margin-left: 0.5rem;
display: block;
color: #999999;
font-size: 0.75rem;
margin-top: 0.31rem;
}
}
.bo-delivery {
margin-top: 16px;
span {
font-size: 0.87rem;
color: #666666;
display: block;
margin-top: 16px;
}
}
}
.rc-margin-y--md{ .rc-margin-y--md{
display: none; display: none;
} }
@ -329,7 +404,6 @@ margin-right: 20px;
.delivery { .delivery {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 140px;
display: flex; display: flex;
justify-content: center; justify-content: center;
.viewdetails{ .viewdetails{

View File

@ -2,40 +2,65 @@
<div class="user-main"> <div class="user-main">
<Myheader></Myheader> <Myheader></Myheader>
<div class="rc-top"></div> <div class="rc-top"></div>
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" > <div class="rc-main" v-for="(item, index) in goldmedal" :key="item.id">
<div class="rc-main rc-receiving" > <div class="online bold">
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
<span>{{orderstatus}}</span>
</div> </div>
<div class="rc-receiving useruantity">
<div class="delivery" v-if="isshow" > <em>{{
item.status == "0"
? "待付款"
: item.status == "1"
? "待收货"
: item.status == "2"
? "已完成"
: item.status == "3"
? "已取消"
: "异常订单"
}}</em>
<span>{{ orderstatus }}</span>
</div>
<div class="online bold">
</div>
<div class="delivery useruantity" v-if="isshow">
<div class="to-delivery"> <div class="to-delivery">
<span>{{ trackingstates}}</span> <img src="../../static/images/delivery.png" alt="">
<span>{{ trackingstates }}</span>
<!-- <i>2021-1-21</i> -->
</div> </div>
<div class="bo-delivery"> <div class="bo-delivery">
<span>{{ logisticsCompany }}</span> <!-- <span> 广州天河刘某某15124617917正在派送中</span> -->
<!-- {{ logisticsCompany }} -->
</div> </div>
<div class="viewdetails"> <div class="viewdetails">
<span>查看详情</span> <span>查看详情</span>
<img :src="leftico" alt="" /> <img :src="leftico" alt="" />
</div> </div>
</div> </div>
<div <div class="online bold">
class="mypersonal" </div>
> <div class="mypersonal useruantity">
<div class="my-delivery"> <div class="my-delivery">
<span>{{ item.addressUserName }}</span> <span>{{ item.addressUserName }}</span>
<i>{{ item.addressPhoneNumber }}</i> <i>{{ item.addressPhoneNumber }}</i>
</div> </div>
<div class="per-delivery"> <div class="per-delivery">
<span>{{ item.addressProvinceName }}{{item.addressCityName}}{{item.addressCountyName}}</span> <span
>{{ item.addressProvinceName }}{{ item.addressCityName
}}{{ item.addressCountyName }}</span
>
</div> </div>
</div> </div>
<div > <div class="online bold"></div>
<div>
<div class="rc-center"> <div class="rc-center">
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index"> <div
class="rc-usermain useruantity"
v-for="(userlist, index) in item.orderDetailList"
:key="index"
>
<div class="rc-image"> <div class="rc-image">
<img :src= userlist.picFile alt="" /> <img :src="userlist.picFile" alt="" />
</div> </div>
<div class="rc-right"> <div class="rc-right">
<div class="rc-usercenter"> <div class="rc-usercenter">
@ -48,11 +73,11 @@
<span>数量:{{ userlist.pcs }}</span> <span>数量:{{ userlist.pcs }}</span>
<i>{{ userlist.ecPrice }}</i> <i>{{ userlist.ecPrice }}</i>
<div class="rc-bottom"> <div class="rc-bottom">
<span @click="userpay()">{{customer}}</span> <span @click="userpay()">{{ customer }}</span>
</div> </div>
</div> </div>
<div class="rc-bottomm"> <div class="rc-bottomm">
<span @click="userpay()">{{customer}}</span> <span @click="userpay()">{{ customer }}</span>
</div> </div>
<!-- <div class="rc-userbottomm"> <!-- <div class="rc-userbottomm">
<i>{{ item.userprice }}</i> <i>{{ item.userprice }}</i>
@ -61,8 +86,10 @@
</div> --> </div> -->
</div> </div>
</div> </div>
<div class="online bold"></div>
</div> </div>
<div class="rc-merchandise"> <div class="rc-merchandise ">
<div class="rc-merchandise ">
<ul> <ul>
<li> <li>
<span>商品总价:</span> <span>商品总价:</span>
@ -82,7 +109,9 @@
</li> </li>
</ul> </ul>
</div> </div>
</div>
<div class="rc-payment">
<div class="rc-payment"> <div class="rc-payment">
<ul> <ul>
<li> <li>
@ -104,34 +133,34 @@
<li> <li>
<span>快递单号:</span> <span>快递单号:</span>
<div class="u-trackingnumber"> <div class="u-trackingnumber">
<i>{{ logisticsNumber }} <i>{{ logisticsNumber }} </i>
</i>
<!-- <img :src="information.catimage" alt=""> --> <!-- <img :src="information.catimage" alt=""> -->
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<div class="rc-foot"> <div class="rc-foot">
<div class="rc-foo"> <div class="rc-foo">
<div style="padding-top:55px"> <div style="padding-top: 55px">
<i>合计金额:</i> <i>合计金额:</i>
<em>{{usersalesAmount}}</em> <em>{{ usersalesAmount }}</em>
</div>
<div style="padding-bottom: 40px; cursor: pointer">
<span @click="onceagain(item)"> {{ payorsucess }}</span>
</div> </div>
<div style="padding-bottom:40px;cursor: pointer">
<span @click="onceagain(item)"> {{payorsucess}}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="rc-full-width rc-margin-y--md"> <div class="rc-full-width rc-margin-y--md">
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain()"> <i
{{payorsucess}} class="ts-standard-btn ts-standard-btn--two center"
@click="onceagain()"
>
{{ payorsucess }}
</i> </i>
</div> </div>
<MyFooter></MyFooter> <MyFooter></MyFooter>
@ -141,55 +170,51 @@
<script> <script>
import Myheader from "~/components/header.vue"; import Myheader from "~/components/header.vue";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { userin} from "../../ajax/getData"; import { userin } from "../../ajax/getData";
import MyFooter from '~/components/rc-footer.vue'; import MyFooter from "~/components/rc-footer.vue";
import Vue from 'vue'; import Vue from "vue";
let vm = new Vue(); let vm = new Vue();
import formatConversion from '../../static/js/date' import formatConversion from "../../static/js/date";
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData"; import {
selectaddress,
canceldanhao,
generateOrderWX,
} from "../../ajax/getData";
export default { export default {
data() { data() {
return { return {
goldmedal:[], goldmedal: [],
userproductId:'', userproductId: "",
logisticsDate:'', logisticsDate: "",
addressPhoneNumber:'', addressPhoneNumber: "",
userphone:'', userphone: "",
logisticsNumber:'', logisticsNumber: "",
customer:'',// customer: "", //
payorsucess:'', // payorsucess: "", //
addressstype: null, addressstype: null,
addressUserName:'', addressUserName: "",
logisticsCompany:'',// logisticsCompany: "", //
orderstatus: '', orderstatus: "",
goldastates:'', goldastates: "",
userisdelivery:'待收货', userisdelivery: "待收货",
userdelivery: "派送中", userdelivery: "派送中",
isshow:true, isshow: true,
usersalesAmount:'', usersalesAmount: "",
leftico: require("../../assets/image/rc-left.png"), leftico: require("../../assets/image/rc-left.png"),
orderNumber:'', orderNumber: "",
userdata:"", userdata: "",
usermessage:null, usermessage: null,
userid: null, userid: null,
trackingstates:'',// trackingstates: "", //
useralllist:[], useralllist: [],
delivery: [ delivery: [],
], useraddress: [],
useraddress: [ goldmedal: [],
shopprice: {},
],
goldmedal: [
],
shopprice: {
},
information: { information: {
reference: "1111111111111111", reference: "1111111111111111",
ordertime: "2012-12-01 11:20:00", ordertime: "2012-12-01 11:20:00",
@ -201,14 +226,14 @@ export default {
}; };
}, },
methods: { methods: {
...mapMutations(["checkIsLogin"]), ...mapMutations(["checkIsLogin"]),
refreshDesktopNav:function(){ refreshDesktopNav: function () {
RCDL.navigation.currentState=null; RCDL.navigation.currentState = null;
RCDL.navigation.rebuild(); RCDL.navigation.rebuild();
}, },
// //
async canceldanhao(orderNumber) { async canceldanhao(orderNumber) {
let data = await canceldanhao(this.userphone,this.orderNumber); let data = await canceldanhao(this.userphone, this.orderNumber);
if (data) { if (data) {
this.$message({ this.$message({
type: "warning", type: "warning",
@ -222,153 +247,145 @@ export default {
}, },
}); });
}, 500); }, 500);
} }
}, },
userpay(){ userpay() {
console.log('---'); console.log("---");
if(this.goldastates==0){ if (this.goldastates == 0) {
this.canceldanhao(); this.canceldanhao();
} } else if ((this.customer = "联系客服申请售后")) {
else if( this.customer='联系客服申请售后'){
var option = { var option = {
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id} customer: {
} id: "",
name: "",
email: "",
mobile: "",
memberId: this.userdata.data.id,
},
};
dis_livchat(option); dis_livchat(option);
} }
}, },
// //
onceagain(item){ onceagain(item) {
console.log(this.payorsucess); console.log(this.payorsucess);
if(this.payorsucess=='立即支付'){ if (this.payorsucess == "立即支付") {
console.log('----') console.log("----");
this.getwei(item); this.getwei(item);
} else {
}else{
this.$router.push({ this.$router.push({
path: "/productdetails/producted", path: "/productdetails/producted",
query: { query: {
stype: 1, stype: 1,
productCode: this.userproductId productCode: this.userproductId,
}, },
}); });
console.log('不是立即支付'); console.log("不是立即支付");
} }
}, },
async orderquantity(orderNumber){ async orderquantity(orderNumber) {
let data = await userin(orderNumber);
let data=await userin(orderNumber); if (data) {
if(data){ this.goldmedal = data;
this.goldmedal=data;
console.log(this.goldmedal); console.log(this.goldmedal);
for(let i=0;i<this.goldmedal.length;i++){ for (let i = 0; i < this.goldmedal.length; i++) {
this.goldastates=this.goldmedal[i].status; this.goldastates = this.goldmedal[i].status;
this.userproductId=this.goldmedal[i].orderDetailList[0].productId; this.userproductId = this.goldmedal[i].orderDetailList[0].productId;
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber; // this.logisticsNumber =
this.trackingstates=this.goldmedal[i].orderDetailList[0].status// this.goldmedal[i].orderDetailList[0].logisticsNumber; //
this.trackingstates = this.goldmedal[i].orderDetailList[0].status; //
if( this.trackingstates==0){ if (this.trackingstates == 0) {
this.trackingstates='运输中' this.trackingstates = "运输中";
}else if(this.trackingstates==1){ } else if (this.trackingstates == 1) {
this.trackingstates='已签收' this.trackingstates = "已签收";
} else if (this.trackingstates == 2) {
this.trackingstates = "未发货";
} }
else if(this.trackingstates==2){ this.logisticsDate = this.formatConversion(
this.trackingstates='未发货' this.goldmedal[i].orderDate
); //
this.logisticsCompany =
this.goldmedal[i].orderDetailList[0].logisticsCompany; //
this.orderNumber = this.goldmedal[i].orderNumber;
this.usersalesAmount = this.goldmedal[i].salesAmount;
this.addressUserName = this.goldmedal[i].addressUserName;
this.addressPhoneNumber = this.goldmedal[i].addressPhoneNumber;
} }
this.logisticsDate=this.formatConversion(this.goldmedal[i].orderDate)// console.log(this.goldmedal, this.userproductId, this.usersalesAmount);
this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //
this.orderNumber=this.goldmedal[i].orderNumber
this.usersalesAmount=this.goldmedal[i].salesAmount;
this.addressUserName=this.goldmedal[i].addressUserName;
this.addressPhoneNumber=this.goldmedal[i].addressPhoneNumber;
} }
console.log(this.goldmedal,this.userproductId,this.usersalesAmount); },
}
},
// //
async getwei(user) { async getwei(user) {
console.log(user); console.log(user);
let userPayData = { let userPayData = {
userprice: this.usersalesAmount, userprice: this.usersalesAmount,
orderId:this.orderNumber, orderId: this.orderNumber,
userinformation:this.addressUserName + userinformation: this.addressUserName + " " + this.addressPhoneNumber,
" "+this.addressPhoneNumber
}; };
this.$router.push({ this.$router.push({
path: "/personal/userpay", path: "/personal/userpay",
query: { query: {
userData:this.orderNumber, userData: this.orderNumber,
stype:1, stype: 1,
userPayData: JSON.stringify(userPayData), userPayData: JSON.stringify(userPayData),
}, },
}); });
}, },
async editaddress(user) { async editaddress(user) {
// user.data.id=844350; // user.data.id=844350;
let data = await selectaddress(this.userid); let data = await selectaddress(this.userid);
let list=[] let list = [];
this.useraddress=data.data; this.useraddress = data.data;
for(let i =0;i<this.useraddress.length;i++){ for (let i = 0; i < this.useraddress.length; i++) {
if(this.useraddress[i].isDefault==true){ if (this.useraddress[i].isDefault == true) {
list.push(this.useraddress[i]); list.push(this.useraddress[i]);
} }
} }
this.useraddress=list; this.useraddress = list;
console.log( this.useraddress[0].recipient); console.log(this.useraddress[0].recipient);
// console.log(this.list); // console.log(this.list);
}, },
}, },
mounted() { mounted() {
this.checkIsLogin(); this.checkIsLogin();
this.userdata=this.$store.state.userInfo; this.userdata = this.$store.state.userInfo;
console.log(this.userdata); console.log(this.userdata);
this.usermessage = JSON.parse(localStorage.getItem("userInfo")); this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
this.userid = this.usermessage.data.id; this.userid = this.usermessage.data.id;
this.userphone=this.usermessage.data.mobile; this.userphone = this.usermessage.data.mobile;
this.editaddress(this.userid); this.editaddress(this.userid);
this.addressstype = this.$route.query.stype; this.addressstype = this.$route.query.stype;
this.orderNumber=this.$route.query.orderNumber; this.orderNumber = this.$route.query.orderNumber;
this.orderquantity(this.orderNumber) this.orderquantity(this.orderNumber);
if(this.addressstype==2){ if (this.addressstype == 2) {
this.orderstatus='您的订单已完成'; this.orderstatus = "您的订单已完成";
this.isshow=false; this.isshow = false;
this.userisdelivery='待发货'; this.userisdelivery = "待发货";
this.customer='联系客服申请售后' this.customer = "联系客服申请售后";
this.payorsucess='再次购买' this.payorsucess = "再次购买";
console.log( this.orderstatus); console.log(this.orderstatus);
}else if(this.addressstype==0){ } else if (this.addressstype == 0) {
this.orderstatus='您的订单还未付款,请尽快付款!'; this.orderstatus = "您的订单还未付款,请尽快付款!";
this.isshow=false; this.isshow = false;
this.userisdelivery='待付款'; this.userisdelivery = "待付款";
this.customer='取消订单' this.customer = "取消订单";
this.payorsucess='立即支付' this.payorsucess = "立即支付";
} } else if (this.addressstype == 1) {
else if(this.addressstype==1){ this.orderstatus = "您的订单已发出,请耐心等候。";
this.orderstatus='您的订单已发出,请耐心等候。'; this.isshow = true;
this.isshow=true; this.userisdelivery = "待收货";
this.userisdelivery='待收货'; this.customer = "联系客服申请售后";
this.customer='联系客服申请售后' this.payorsucess = "再次购买";
this.payorsucess='再次购买' } else if (this.addressstype == 3) {
} this.orderstatus = "您的订单已取消!";
else if(this.addressstype==3){ this.isshow = false;
this.orderstatus='您的订单已取消!'; this.userisdelivery = "已取消";
this.isshow=false; this.customer = "联系客服申请售后";
this.userisdelivery='已取消'; this.payorsucess = "再次购买";
this.customer='联系客服申请售后'
this.payorsucess='再次购买'
} }
console.log(this.addressstype); console.log(this.addressstype);
}, },
@ -382,5 +399,4 @@ console.log(this.userdata);
<style lang="less" scoped> <style lang="less" scoped>
@import url("../../assets/css/global.less"); @import url("../../assets/css/global.less");
@import url("../../assets/css/usertion.less"); @import url("../../assets/css/usertion.less");
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB