Login / Register flow done , index resources move to static

This commit is contained in:
Vion
2022-01-14 20:11:10 +08:00
parent c5cabaa65f
commit d15130723a
58 changed files with 1361 additions and 30334 deletions

View File

@@ -2,14 +2,11 @@
<div>
<div class="user" v-for="(item,index) in newlist" :key="index">
<Myheader></Myheader>
<div class="rc-top"></div>
<unlogin></unlogin>
<tabs></tabs>
<div class="online" ></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">
@@ -47,14 +44,14 @@
</div>
<div class="ts-product-header rc-column" id="328b2e5f-6904-4cac-9709-51ed18d2500f">
<div class="usermain">
<div class="usermain fixed-catbar-seperator">
<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="online rc-md-down" id="fixed-catbar-seperator"></div>
<div class="rc-main">
<div class="productdetails">
<div class="rc-productdetail">
@@ -223,7 +220,6 @@
<script>
import Myheader from "~/components/header.vue";
import magnifier from "@/components/magnifier.vue";
import tabs from "@/components/tabs.vue";
import unlogin from "~/components/unlogin.vue";
import { mapMutations } from "vuex";
@@ -236,24 +232,24 @@ export default {
meta: {title: '产品详情'},
data() {
return {
tableLabelTest:[],
userimage: require("../../assets/image/unused.png"),
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,
tableLabelTest:[],
userimage: require("../../assets/image/unused.png"),
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: [
{
price: "30",
@@ -320,43 +316,41 @@ export default {
components: {
Myheader,
tabs,
magnifier,
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;
})
}
}
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;
})
}
}
},
methods: {
...mapMutations(["changemessage"]),
handleScroll(e)
handleScroll(e)
{
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
if(!fixedCatbarSeperator)
{
return;
}
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
if((scrolltop-fixedCatbarSeperator.offsetTop))
{
@@ -549,32 +543,25 @@ if(this.usermessage.data!==''||this.usermessage.data!==undefined){
console.log(data);
},
usertanchu(item,orderm){
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",
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(){

View File

@@ -464,15 +464,29 @@ export default {
});
},
openclose(){
this.dialogInfo1=false;
this.dialogInfo1=false;
},
selectproduce(){
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
},
});
selectproduce(item){
if(item.productList[0]==undefined){
item.productlist[0].productCode=0;
}
if(item.productList[0]==undefined){
item.productlist[0]=[];
}
this.$router.push({
path: "/productdetails/producted",
query: {
stype: 1,
productCode:item.productList[0].productCode
},
});
// this.$router.push({
// path: "/productdetails/producted",
// query: {
// stype: 1,
// }
// });
},
ifadroind(){
var sUserAgent = navigator.userAgent.toLowerCase();
@@ -486,7 +500,7 @@ this.dialogInfo1=false;
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
//console.log("当前是电脑打开")
this.$nextTick(() => {
this.isadrond=false;
@@ -498,7 +512,7 @@ this.dialogInfo1=false;
}else{
console.log("当前是手机打开")
//console.log("当前是手机打开")
this.$nextTick(() => {
this.isadrond=true;
@@ -590,18 +604,17 @@ this.dialogInfo1=false;
this.activeIndexe=index;
},
selectproduct(item, index){
this.activeIndexb=index;
let categoryName={
petType:this.activeIndex1,
categoryName:item.tagName,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(categoryName)){
this.userserachlist.push(categoryName)
}
}
this.usersearch(this.userserachlist)
this.activeIndexb=index;
let categoryName={
petType:this.activeIndex1,
categoryName:item.tagName,
}
for(let i =0;i<this.userserachlist.length;i++){
if(!this.userserachlist.includes(categoryName)){
this.userserachlist.push(categoryName)
}
}
this.usersearch(this.userserachlist)
},
//弹框的显示隐藏