mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 08:03:49 +08:00
Data tracking point added / Resentation template updated
This commit is contained in:
@@ -283,6 +283,13 @@ export default {
|
||||
if (this.payorsucess == "立即支付") {
|
||||
this.getwei(item);
|
||||
} else {
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"order_repay",
|
||||
{
|
||||
"status":"fail",
|
||||
}
|
||||
])
|
||||
this.$router.push({
|
||||
path: "/productdetails/producted",
|
||||
query: {
|
||||
@@ -333,7 +340,13 @@ export default {
|
||||
userinformation: this.addressUserName + " " + this.addressPhoneNumber,
|
||||
wxPay:data.msg
|
||||
};
|
||||
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"order_repay",
|
||||
{
|
||||
"status":"success",
|
||||
}
|
||||
])
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
@@ -343,6 +356,13 @@ export default {
|
||||
},
|
||||
});
|
||||
} else {
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"order_repay",
|
||||
{
|
||||
"status":"fail - " + this.orderNumber,
|
||||
}
|
||||
])
|
||||
this.$message({
|
||||
type: "error",
|
||||
message: "订单数据错误,请联系客服进行处理",
|
||||
|
||||
@@ -480,6 +480,13 @@ export default {
|
||||
this.showPaytypeWarning = !this.paytypeWarning.result;
|
||||
if(this.paytypeWarning.result) {
|
||||
if(item.status==0){
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"order_repay",
|
||||
{
|
||||
"status":"success",
|
||||
}
|
||||
])
|
||||
this.getwei(item);
|
||||
}else{
|
||||
this.$router.push({
|
||||
@@ -490,6 +497,14 @@ export default {
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"order_repay",
|
||||
{
|
||||
"status":"fail",
|
||||
}
|
||||
])
|
||||
}
|
||||
},
|
||||
usertwo() {
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
<span>{{ curItem.categoryName }}</span>
|
||||
|
||||
</div>
|
||||
<div class="rc-button" v-if="!userbuy && curItem.goodUrl && curItem.goodUrl.length>5">
|
||||
<a :href="curItem.goodUrl" target='_blank' class="ts-standard-btn">立即购买</a>
|
||||
<div class="rc-button" v-if="!userbuy && curItem.curGoodUrl && curItem.curGoodUrl.length>5">
|
||||
<a :href="curItem.curGoodUrl" target='_blank' class="ts-standard-btn">立即购买</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -293,6 +293,7 @@ import FixRight from "~/components/fixed-right.vue";
|
||||
import unlogin from "~/components/unlogin.vue";
|
||||
import Myfooter from "~/components/rc-footer.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import util from "@/ajax/util";
|
||||
const settings = require("@/config");
|
||||
import {
|
||||
goodsmessage,
|
||||
@@ -378,6 +379,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
util,
|
||||
tableLabelTest: [],
|
||||
userimage: require("../../assets/image/unused.png"),
|
||||
gotop: false,
|
||||
@@ -454,8 +456,16 @@ export default {
|
||||
mounted() {
|
||||
this.checkIsLogin();
|
||||
// console.log(this.curItem);
|
||||
if(this.isRxGoods) {
|
||||
let isMobile = this.util.isMobile();
|
||||
this.curItem.goodUrl = JSON.parse(this.curItem.goodUrl);
|
||||
if(isMobile)
|
||||
this.curItem.curGoodUrl = this.curItem.goodUrl.mobile;
|
||||
else
|
||||
this.curItem.curGoodUrl = this.curItem.goodUrl.pc;
|
||||
}
|
||||
this.usermessage = this.$store.state.userInfo;
|
||||
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
||||
this.usermessage = this.$store.state.userInfo;
|
||||
this.productCode = this.$route.query.productCode;
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
@@ -703,8 +713,8 @@ export default {
|
||||
}
|
||||
},
|
||||
userget() {
|
||||
let user = localStorage.getItem("userInfo");
|
||||
if (user == undefined || user == null || user == "") {
|
||||
let user = this.$store.state.userInfo;
|
||||
if (!user) {
|
||||
this.dialogInfo2 = true;
|
||||
return;
|
||||
} else {
|
||||
|
||||
239
rc-busness/pages/resentation/doggie.vue
Normal file
239
rc-busness/pages/resentation/doggie.vue
Normal file
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div class="ts-resentation rc-padding-y--lg">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<div class="ts-banner-swiper-container">
|
||||
<picture>
|
||||
<source
|
||||
media="(max-width: 768px)"
|
||||
srcset="/images/rc-phone.png"
|
||||
/>
|
||||
<source
|
||||
media="(min-width: 769px)"
|
||||
srcset="/images/userbanner.png"
|
||||
/>
|
||||
<img src="/images/banner/pc-weixin.png" />
|
||||
</picture>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="rc-alpha rc-margin-y--md rc-text--center rc-margin-y--lg--mobile">明星犬粮</h2>
|
||||
<ul class="ts-product-list rc-margin-bottom--lg rc-md-up">
|
||||
<li
|
||||
v-for="(item, index) in dataList.doggie.dog"
|
||||
:key="index"
|
||||
class="rc-margin-top--md"
|
||||
>
|
||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item, index)">
|
||||
<div class="rc-rccontair">
|
||||
<img :src="item.productimage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item, index)">
|
||||
<span>{{ item.title }}</span>
|
||||
<div class="desc">{{ item.detail }}</div>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
ts-standard-btn ts-standard-btn--two
|
||||
rc-margin-y--md
|
||||
center
|
||||
"
|
||||
@click="selectproduce(item, index)"
|
||||
>立即购买</strong
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="rc-md-down ts-product-list">
|
||||
<swiper :options="swiperAOption">
|
||||
<swiper-slide
|
||||
v-for="(item, index) in dataList.doggie.dog"
|
||||
:key="index"
|
||||
>
|
||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item, index)">
|
||||
<div class="rc-rccontair">
|
||||
<img :src="item.productimage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item, index)">
|
||||
<h2 class="rc-beta">{{ item.title }}</h2>
|
||||
<div class="desc">{{ item.detail }}</div>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
ts-standard-btn ts-standard-btn--two
|
||||
rc-margin-y--md
|
||||
center
|
||||
"
|
||||
@click="selectproduce(item, index)"
|
||||
>立即购买</strong
|
||||
>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
<div id="swiperAPagnation" class="swiper-pagination ts-carousel-indicator center"></div>
|
||||
<div id="swiperAprev" class="swiper-button-prev ts-swiper-arrow"></div>
|
||||
<div id="swiperAnext" class="swiper-button-next ts-swiper-arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contair rc-margin-y--lg--mobile">
|
||||
<nuxt-link :to="`/productdetails/productlist/?stype=1`">
|
||||
<span class="ts-standard-btn center">查看更多</span>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<!-- Dog end -->
|
||||
<div class="online bold rc-margin-y--lg"></div>
|
||||
<!-- Cat start -->
|
||||
<div>
|
||||
<h2 class="rc-alpha rc-margin-y--md rc-text--center rc-margin-y--lg--mobile">明星猫粮</h2>
|
||||
<ul class="ts-product-list rc-margin-bottom--lg rc-md-up">
|
||||
<li
|
||||
v-for="(item, index) in dataList.doggie.cat"
|
||||
:key="index"
|
||||
class="rc-margin-top--md"
|
||||
>
|
||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item, index)">
|
||||
<div class="rc-rccontair">
|
||||
<img :src="item.productimage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item, index)">
|
||||
<span>{{ item.title }}</span>
|
||||
<div class="desc">{{ item.detail }}</div>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
ts-standard-btn ts-standard-btn--two
|
||||
rc-margin-y--md
|
||||
center
|
||||
"
|
||||
@click="selectproduce(item, index)"
|
||||
>立即购买</strong
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="rc-md-down ts-product-list">
|
||||
<swiper :options="swiperBOption">
|
||||
<swiper-slide
|
||||
v-for="(item, index) in dataList.doggie.cat"
|
||||
:key="index"
|
||||
>
|
||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item, index)">
|
||||
<div class="rc-rccontair">
|
||||
<img :src="item.productimage" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-column">
|
||||
<div class="rc-click" @click="selectproduce(item, index)">
|
||||
<h2 class="rc-beta">{{ item.title }}</h2>
|
||||
<div class="desc">{{ item.detail }}</div>
|
||||
</div>
|
||||
<strong
|
||||
class="
|
||||
ts-standard-btn ts-standard-btn--two
|
||||
rc-margin-y--md
|
||||
center
|
||||
"
|
||||
@click="selectproduce(item, index)"
|
||||
>立即购买</strong
|
||||
>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
<div id="swiperBPagnation" class="swiper-pagination ts-carousel-indicator center"></div>
|
||||
<div id="swiperBprev" class="swiper-button-prev ts-swiper-arrow"></div>
|
||||
<div id="swiperBnext" class="swiper-button-next ts-swiper-arrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contair rc-margin-y--lg--mobile">
|
||||
<nuxt-link :to="`/productdetails/productlist/?stype=0`">
|
||||
<span class="ts-standard-btn center">查看更多</span>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<!-- Cat end-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Myheader from "~/components/header.vue";
|
||||
import envData from "~/config/env-data.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
envData,
|
||||
dataList:{doggie:{dog:[],cat:[]}},
|
||||
swiperAOption: {
|
||||
loop: false,
|
||||
slidesPerView: "auto",
|
||||
centeredSlides: true,
|
||||
speed: 1000,
|
||||
spaceBetween: 0,
|
||||
pagination: {
|
||||
el: "#swiperAPagnation",
|
||||
clickable: true,
|
||||
},
|
||||
loopAdditionalSlides: 100,
|
||||
navigation: {
|
||||
nextEl: "#swiperAprev",
|
||||
prevEl: "#swiperAnext",
|
||||
}
|
||||
},
|
||||
swiperBOption: {
|
||||
loop: false,
|
||||
slidesPerView: "auto",
|
||||
centeredSlides: true,
|
||||
speed: 1000,
|
||||
spaceBetween: 0,
|
||||
pagination: {
|
||||
el: "#swiperBPagnation",
|
||||
clickable: true,
|
||||
},
|
||||
loopAdditionalSlides: 100,
|
||||
navigation: {
|
||||
nextEl: "#swiperBprev",
|
||||
prevEl: "#swiperBnext",
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
},
|
||||
mounted(){
|
||||
let env=process.env.NODE_ENV;
|
||||
this.dataList=this.envData[env];
|
||||
},
|
||||
methods:{
|
||||
selectproduce(item) {
|
||||
let isRxGoods = false;
|
||||
let productCode = [];
|
||||
let mainProductCode = item.productCode;
|
||||
if (!item.ecPrice && !item.price) {
|
||||
isRxGoods = 1;
|
||||
productCode = [item.productCode];
|
||||
} else {
|
||||
for (let i of item.productList) {
|
||||
productCode.push(i.productCode);
|
||||
}
|
||||
}
|
||||
this.$router.push({
|
||||
path: "/productdetails/producted",
|
||||
query: {
|
||||
stype: 1,
|
||||
isRxGoods: isRxGoods,
|
||||
mainProductCode: mainProductCode,
|
||||
productCode: productCode.join(","),
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped >
|
||||
@import url("../../assets/css/resentation.less");
|
||||
</style>
|
||||
Reference in New Issue
Block a user