mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 16:13:48 +08:00
Merge branch 'sit-Carl' of gitee.com:carl_Ming_1/smart-admin into sit-He
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
|
||||
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
|
||||
<div class="address-list">
|
||||
<tabs></tabs>
|
||||
<div class="online"></div>
|
||||
|
||||
<div class="rc-main" v-for="(item,index) in goldmedal" :key="index" >
|
||||
<div class="rc-border"></div>
|
||||
<div
|
||||
class="mypersonal"
|
||||
v-for="(item, index) in useraddress"
|
||||
@@ -107,13 +106,11 @@
|
||||
|
||||
<script>
|
||||
import Myheader from "~/components/header.vue";
|
||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import myAddress from "../address/address.vue";
|
||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||
import {userin} from "../../ajax/getData";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
meta: { title: "订单结算" },
|
||||
middleware: 'metaTitle',
|
||||
meta: {title: '订单结算'},
|
||||
data() {
|
||||
return {
|
||||
goldmedal: [],
|
||||
@@ -129,18 +126,39 @@ export default {
|
||||
curAddress: {},
|
||||
saveType: "",
|
||||
useraddress: [
|
||||
// {
|
||||
// state: "李某某",
|
||||
// tel: "15124117917",
|
||||
// address: "广东省 广州市 天河区 天河客运站118号",
|
||||
// isdefault: true,
|
||||
// },
|
||||
// {
|
||||
// state: "李某某",
|
||||
// tel: "15124117917",
|
||||
// address: "广东省 广州市 天河区 天河客运站118号",
|
||||
// isdefault: false,
|
||||
// },
|
||||
{
|
||||
state: "李某某",
|
||||
tel: "15124117917",
|
||||
address: "广东省 广州市 天河区 天河客运站118号",
|
||||
},
|
||||
{
|
||||
state: "李某某",
|
||||
tel: "15124117917",
|
||||
address: "广东省 广州市 天河区 天河客运站118号",
|
||||
},
|
||||
{
|
||||
state: "李某某",
|
||||
tel: "15124117917",
|
||||
address: "广东省 广州市 天河区 天河客运站118号",
|
||||
},
|
||||
{
|
||||
state: "李某某",
|
||||
tel: "15124117917",
|
||||
address: "广东省 广州市 天河区 天河客运站118号",
|
||||
},
|
||||
],
|
||||
|
||||
goldmedal: [
|
||||
{
|
||||
ordernumber: "1111111111111111111",
|
||||
orderstype: 1,
|
||||
index:0,
|
||||
usereat: "英国短毛猫成猫全价湿粮",
|
||||
num: "5kg",
|
||||
specification: "1",
|
||||
userprice: "167.00",
|
||||
catimage: require("../../assets/image/rc-win.png"),
|
||||
},
|
||||
],
|
||||
shopprice: {
|
||||
price: "标准快递",
|
||||
@@ -311,16 +329,12 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
myAddress,
|
||||
tabs
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@import "./settlement.less";
|
||||
@import url("../../assets/css/global.less");
|
||||
// @import url("../../assets/css/settlement.less");
|
||||
|
||||
@import url("../../assets/css/settlement.less");
|
||||
</style>
|
||||
@@ -1,48 +1,77 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="user">
|
||||
<Myheader></Myheader>
|
||||
<!-- <unlogin></unlogin> -->
|
||||
<!-- <tabs></tabs> -->
|
||||
<div class="online" id="fixed-catbar-seperator"></div>
|
||||
<div class="rc-top"></div>
|
||||
<div
|
||||
class="
|
||||
rc-usermain
|
||||
ts-product-detail
|
||||
rc-max-width--xl
|
||||
rc-layout-container rc-two-column rc-border-bottom
|
||||
rc-border-colour--brand4
|
||||
"
|
||||
>
|
||||
<!--
|
||||
<magnifier v-bind:parentmsg="msg" ></magnifier>
|
||||
-->
|
||||
<div class="rc-column">
|
||||
<div data-js-carousel="" data-image-gallery="true">
|
||||
<div
|
||||
class="rc-carousel rc-carousel__gallery-image"
|
||||
data-zoom-container="328b2e5f-6904-4cac-9709-51ed18d2500f"
|
||||
data-zoom-factor="2"
|
||||
>
|
||||
<!-- Big images-->
|
||||
|
||||
<div v-for="(item, index) in productAttachmentList" :key="index">
|
||||
<div>
|
||||
<img
|
||||
:src="item.attachmentPath + '?w=420&fm=jpg&auto=compress'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<div>
|
||||
<img
|
||||
src="https://cdn.royalcanin-weshare-online.io/m2kia2QBG95Xk-RBC8jn/v1/medium-maxi-giant-pos-2012-packshots-ma-ad-shn-packshot?w=420&fm=jpg&auto=compress"
|
||||
alt="Product alt text"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Big images end-->
|
||||
<div>
|
||||
<div class="user" v-for="(item,index) in newlist" :key="index">
|
||||
<Myheader></Myheader>
|
||||
<unlogin></unlogin>
|
||||
<tabs></tabs>
|
||||
<div class="online" id="fixed-catbar-seperator"></div>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc-usermain ts-product-detail rc-max-width--xl rc-layout-container rc-two-column rc-border-bottom rc-border-colour--brand4">
|
||||
<div class="rc-column">
|
||||
<div data-js-carousel="" data-image-gallery="true">
|
||||
<div class="rc-carousel rc-carousel__gallery-image" data-zoom-container="328b2e5f-6904-4cac-9709-51ed18d2500f" data-zoom-factor="2">
|
||||
<!-- Big images-->
|
||||
<div>
|
||||
<div>
|
||||
<img src="https://cdn.royalcanin-weshare-online.io/m2kia2QBG95Xk-RBC8jn/v1/medium-maxi-giant-pos-2012-packshots-ma-ad-shn-packshot?w=420&fm=jpg&auto=compress" alt="Product alt text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<img src="https://cdn.royalcanin-weshare-online.io/m2kia2QBG95Xk-RBC8jn/v1/medium-maxi-giant-pos-2012-packshots-ma-ad-shn-packshot?w=420&fm=jpg&auto=compress" alt="Product alt text" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Big images end-->
|
||||
</div>
|
||||
<div class="rc-carousel__gallery-thumbnails-wrapper">
|
||||
<div class="rc-carousel rc-carousel__gallery-thumbnails">
|
||||
<!-- Thunb images-->
|
||||
<div class="rc-carousel__gallery-thumbnail">
|
||||
<figure class="rc-img--square" style="background-image: url('https://cdn.royalcanin-weshare-online.io/m2kia2QBG95Xk-RBC8jn/v1/medium-maxi-giant-pos-2012-packshots-ma-ad-shn-packshot?w=64&fm=jpg&auto=compress')">
|
||||
<figcaption class="rc-screen-reader-text">Product caption text</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="rc-carousel__gallery-thumbnail">
|
||||
<figure class="rc-img--square" style="background-image: url('https://cdn.royalcanin-weshare-online.io/UCEUa2QBaxEApS7L_-Xz/v2/fbn-2013-graphiccodes-packshots-siam-ad-int-fbn-packshot?w=64&fm=jpg&auto=compress')">
|
||||
<figcaption class="rc-screen-reader-text">Product caption text</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
<!-- Thunb images end-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ts-product-header rc-column" id="328b2e5f-6904-4cac-9709-51ed18d2500f">
|
||||
<div class="usermain">
|
||||
<div class="online bold rc-md-down"></div>
|
||||
<div class="rc-main">
|
||||
<div class="rc-title">
|
||||
<h2>{{ item.productName }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="online rc-md-down"></div>
|
||||
<div class="rc-main">
|
||||
<div class="productdetails">
|
||||
<div class="rc-productdetail">
|
||||
<i class="ts-row-title">商品价格:</i>
|
||||
<span class="ts-realprice">¥{{ item.rsp }}</span>
|
||||
<span class="ts-remove ts-ecprice">¥{{ item.ecPrice }} </span>
|
||||
</div>
|
||||
<div class="rc-productdetai">
|
||||
<div>
|
||||
<i class="ts-row-title">活动促销:</i>
|
||||
<span>全场商品限时优惠</span>
|
||||
</div>
|
||||
<em class="ts-right-arr" @click="userget()">立即领取</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="online bold rc-md-down"></div>
|
||||
<div class="rc-main rc-md-up">
|
||||
<div class="online"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="rc-carousel__gallery-thumbnails-wrapper">
|
||||
@@ -266,25 +295,25 @@ export default {
|
||||
// meta: {title: '产品详情'},
|
||||
data() {
|
||||
return {
|
||||
tableLabelTest: [],
|
||||
tableLabelTest:[],
|
||||
userimage: require("../../assets/image/unused.png"),
|
||||
activeIndexa: 0,
|
||||
gotop: false,
|
||||
dialogInfo1: false,
|
||||
activeIndexa:0,
|
||||
gotop: false,
|
||||
dialogInfo1:false,
|
||||
name: [],
|
||||
userlist: [],
|
||||
drawlist: [], //用户可以领取的优惠券
|
||||
alldraw: [],
|
||||
userlistmenu: [],
|
||||
msg: ["11111111"],
|
||||
parent_msg: ["111"],
|
||||
usermessage: [],
|
||||
dialogInfo2: false,
|
||||
productCode: "", //商品code
|
||||
productlist: [],
|
||||
userbuy: true,
|
||||
sales_num: 1,
|
||||
usernewlist: [
|
||||
userlist:[],
|
||||
drawlist:[],//用户可以领取的优惠券
|
||||
alldraw:[],
|
||||
userlistmenu:[],
|
||||
msg:['11111111'],
|
||||
parent_msg:['111'],
|
||||
usermessage:[],
|
||||
dialogInfo2:false,
|
||||
productCode:'',//商品code
|
||||
productlist:[],
|
||||
userbuy:true,
|
||||
sales_num:1,
|
||||
usernewlist: [
|
||||
{
|
||||
price: "30",
|
||||
pricestype: "新客优惠券",
|
||||
@@ -377,6 +406,35 @@ export default {
|
||||
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
unlogin,
|
||||
Myfooter
|
||||
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("scroll", this.handleScroll, true);
|
||||
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
|
||||
this.usermessage= JSON.parse(localStorage.getItem("userInfo"));
|
||||
let stype=this.$route.query.stype;
|
||||
this.productCode=this.$route.query.productCode;
|
||||
console.log(this.productCode)
|
||||
this.userquery(this.productCode);
|
||||
console.log(this.userlistmenu)
|
||||
this.$nextTick(()=>{
|
||||
|
||||
})
|
||||
if(stype==1){
|
||||
this.userbuy=true;
|
||||
}else if(stype==2){
|
||||
console.log('这是要消失的')
|
||||
this.$nextTick(() => {
|
||||
this.userbuy=false;
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
tabs,
|
||||
magnifier,
|
||||
@@ -406,19 +464,21 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(["changemessage"]),
|
||||
handleScroll(e) {
|
||||
let fixedCatbarSeperator = document.querySelector(
|
||||
"#fixed-catbar-seperator"
|
||||
);
|
||||
let scrolltop =
|
||||
document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if (fixedCatbarSeperator !== "null") {
|
||||
if (scrolltop - fixedCatbarSeperator.offsetTop) {
|
||||
this.gotop = true;
|
||||
} else {
|
||||
this.gotop = false;
|
||||
}
|
||||
}
|
||||
handleScroll(e)
|
||||
{
|
||||
let fixedCatbarSeperator = document.querySelector("#fixed-catbar-seperator");
|
||||
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if(fixedCatbarSeperator!=='null' ){
|
||||
if((scrolltop-fixedCatbarSeperator.offsetTop))
|
||||
{
|
||||
this.gotop = true
|
||||
}
|
||||
else
|
||||
{
|
||||
this.gotop = false;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
lianxi(item, index) {
|
||||
console.log(item, index);
|
||||
@@ -586,27 +646,47 @@ export default {
|
||||
this.sales_num = parseInt(this.sales_num) - 1;
|
||||
}
|
||||
},
|
||||
usertanchu(item,orderm){
|
||||
|
||||
async courseId(item) {
|
||||
console.log(item);
|
||||
console.log(this.usermessage);
|
||||
// let userid=JSON.parse(location.getItem('userInfo'));
|
||||
// let mobile=JSON.parse(location.getItem('userInfo'));
|
||||
// console.log(userid,mobile);
|
||||
let data = await postCourseId(
|
||||
this.productCode,
|
||||
this.sales_num,
|
||||
this.usermessage.data.id,
|
||||
this.usermessage.data.mobile,
|
||||
item.picFile,
|
||||
item.productName,
|
||||
item.basePrice,
|
||||
item.specifications
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
}
|
||||
console.log(data);
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.dialogInfo2=true;
|
||||
return
|
||||
}else{
|
||||
|
||||
this.courseId(item);
|
||||
if(orderm==0){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '加入购物车成功'
|
||||
});
|
||||
}
|
||||
if(orderm==1){
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
userget(){
|
||||
|
||||
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.dialogInfo2=true;
|
||||
return
|
||||
}else{
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
this.alldrawlist(this.usermessage.data.id);
|
||||
this.dialogInfo1=true;
|
||||
}
|
||||
|
||||
},
|
||||
usertanchu(item, orderm) {
|
||||
let user = localStorage.getItem("userInfo");
|
||||
|
||||
Reference in New Issue
Block a user