mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-04 03:06:39 +08:00
commit
9903ba3816
@ -33,6 +33,22 @@ let util = {
|
|||||||
} else {
|
} else {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
checkPaytypeValidated($paytype) {
|
||||||
|
if(isWx && $paytype == 1) {
|
||||||
|
//return 3;
|
||||||
|
return true;
|
||||||
|
} else if(isWx && $paytype!=1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isMobile && $paytype == 1) {
|
||||||
|
//Desktop, use native pay
|
||||||
|
return true;
|
||||||
|
} else if(isMobile && $paytype == 2) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default util;
|
export default util;
|
@ -1070,6 +1070,7 @@ export default {
|
|||||||
mobileVideoPlaying: false,
|
mobileVideoPlaying: false,
|
||||||
usertitle: "明星猫粮",
|
usertitle: "明星猫粮",
|
||||||
dogtitle: "明星犬粮",
|
dogtitle: "明星犬粮",
|
||||||
|
userdata:'999999',
|
||||||
processinformation: [],
|
processinformation: [],
|
||||||
catshi: [],
|
catshi: [],
|
||||||
userindex: 0,
|
userindex: 0,
|
||||||
@ -1413,7 +1414,6 @@ export default {
|
|||||||
// console.log("1");
|
// console.log("1");
|
||||||
// }
|
// }
|
||||||
if (this.realIndex == 2) {
|
if (this.realIndex == 2) {
|
||||||
console.log(vm.userdata.data.id)
|
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// var option = {
|
// var option = {
|
||||||
// customer: {
|
// customer: {
|
||||||
@ -1496,7 +1496,11 @@ export default {
|
|||||||
watch: {},
|
watch: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
this.userdata = this.$store.state.userInfo;
|
if(this.$store.state.userInfo===undefined){
|
||||||
|
this.userdata=' '
|
||||||
|
}else{
|
||||||
|
this.userdata = this.$store.state.userInfo.data.id;
|
||||||
|
}
|
||||||
console.log(this.userdata);
|
console.log(this.userdata);
|
||||||
const that = this;
|
const that = this;
|
||||||
|
|
||||||
@ -1521,19 +1525,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
diaoqi(){
|
diaoqi(){
|
||||||
console.log('----');
|
|
||||||
setTimeout(() => {
|
|
||||||
var option = {
|
var option = {
|
||||||
customer: {
|
customer: {
|
||||||
id: "",
|
id: "",
|
||||||
name: "",
|
name: "",
|
||||||
email: "",
|
email: "",
|
||||||
mobile: "",
|
mobile: "",
|
||||||
memberId: vm.userdata.data.id,
|
memberId: this.userdata,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
dis_livchat(option);
|
dis_livchat(option);
|
||||||
}, 500);
|
|
||||||
},
|
},
|
||||||
...mapMutations(["checkIsLogin"]),
|
...mapMutations(["checkIsLogin"]),
|
||||||
playMobileVideo(item) {
|
playMobileVideo(item) {
|
||||||
|
@ -140,10 +140,12 @@
|
|||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import MyFooter from '~/components/rc-footer.vue';
|
import MyFooter from '~/components/rc-footer.vue';
|
||||||
import tabs from "~/components/tabs.vue";
|
import tabs from "~/components/tabs.vue";
|
||||||
import { customerorders, userindent, canceldanhao,generateOrderWX } from "../../ajax/getData";
|
import util from "@/ajax/util";
|
||||||
|
import { customerorders, userindent, canceldanhao, repayOrde } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
util,
|
||||||
crumbs:[
|
crumbs:[
|
||||||
{
|
{
|
||||||
path:'/personal/mypersonal/',
|
path:'/personal/mypersonal/',
|
||||||
@ -348,26 +350,37 @@ export default {
|
|||||||
|
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(item) {
|
async getwei(item) {
|
||||||
console.log(item);
|
let data = await this.repayOrde(item.orderNumber);
|
||||||
let postData = [];
|
if(data.code==1) {
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
userprice: item.salesAmount,
|
userprice: item.usersalesAmount,
|
||||||
orderId:item.orderNumber,
|
orderId: item.orderNumber,
|
||||||
userinformation:item.addressUserName +
|
userinformation: item.addressUserName + " " + item.addressPhoneNumber,
|
||||||
" " +
|
wxPay:data.msg
|
||||||
item.phoneNumber,
|
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userData:item.orderNumber,
|
userData: item.orderNumber,
|
||||||
stype:1,
|
stype: 1,
|
||||||
userPayData: JSON.stringify(userPayData),
|
userPayData: JSON.stringify(userPayData),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: "error",
|
||||||
|
message: "订单数据错误,请联系客服进行处理",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async repayOrde(ordernumber) {
|
||||||
|
let payType = this.util.pickPaytype();
|
||||||
|
let res = await repayOrde(ordernumber, payType);
|
||||||
|
if (res) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
usertiaozhuan(item){
|
usertiaozhuan(item){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/myorder/usertion",
|
path: "/myorder/usertion",
|
||||||
|
@ -94,7 +94,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div style="display:none">
|
<div style="display:none">
|
||||||
<form :action="this.h5PayUrl" method="post" ref="h5SubmitForm"></form>
|
<form :action="this.h5PayUrl" method="post" ref="h5SubmitForm">
|
||||||
|
<input type="hidden" v-model="h5payRedirectUrl">
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -112,6 +114,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
util,
|
util,
|
||||||
|
h5payRedirectUrl:'',
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
paymentTimer:undefined,
|
paymentTimer:undefined,
|
||||||
isSucess: false,
|
isSucess: false,
|
||||||
@ -176,6 +179,7 @@ export default {
|
|||||||
goPayH5() {
|
goPayH5() {
|
||||||
let isMobile = this.util.isMobile();
|
let isMobile = this.util.isMobile();
|
||||||
if(this.userPayData.wxPay && isMobile) {
|
if(this.userPayData.wxPay && isMobile) {
|
||||||
|
//this.$refs["h5SubmitForm"].action="http://47.96.75.242:10086/royalcanin/royalcanin/redirectUrlWXH5";
|
||||||
this.$refs["h5SubmitForm"].action=this.userPayData.wxPay;
|
this.$refs["h5SubmitForm"].action=this.userPayData.wxPay;
|
||||||
this.$refs["h5SubmitForm"].submit();
|
this.$refs["h5SubmitForm"].submit();
|
||||||
//window.location.href=this.userPayData.wxPay;;
|
//window.location.href=this.userPayData.wxPay;;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
>
|
>
|
||||||
<div class="uservideo" v-if="videoshow">
|
<div class="uservideo" v-if="videoshow">
|
||||||
<video controls="" preload="videoimg">
|
<video controls="" preload="videoimg">
|
||||||
<source :src= videolist type="video/mp4">
|
<source :src="videolist" type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-column" v-if="!videoshow">
|
<div class="rc-column" v-if="!videoshow">
|
||||||
@ -111,21 +111,17 @@
|
|||||||
<div class="rc-productdetail" v-if="!userbuy">
|
<div class="rc-productdetail" v-if="!userbuy">
|
||||||
<i class="ts-row-title">所属分类:</i>
|
<i class="ts-row-title">所属分类:</i>
|
||||||
<span>{{ curItem.categoryName }}</span>
|
<span>{{ curItem.categoryName }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button" v-if="!userbuy">
|
<div class="rc-button" v-if="userloginbuy">
|
||||||
<span @click="chuafangbuy()">立即购买</span>
|
<span @click="chuafangbuy()">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="rc-productdetail" v-if="userbuy">
|
<div class="rc-productdetail" v-if="userbuy">
|
||||||
<i class="ts-row-title">商品价格:</i>
|
<i class="ts-row-title">商品价格:</i>
|
||||||
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
||||||
<span class="ts-remove ts-ecprice"
|
<span class="ts-remove ts-ecprice">¥{{ curItem.rsp }} </span>
|
||||||
>¥{{ curItem.rsp }}
|
<span class="ts-record" v-if="curItem.basePoint !== 0">
|
||||||
</span>
|
购买该商品你将获得{{ curItem.basePoint }}积分
|
||||||
<span class="ts-record" v-if="curItem.basePoint!==0">
|
|
||||||
购买该商品你将获得{{curItem.basePoint}}积分
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- <span class="rc-title">购买该商品你将得到22积分</span> -->
|
<!-- <span class="rc-title">购买该商品你将得到22积分</span> -->
|
||||||
@ -151,7 +147,17 @@
|
|||||||
<i class="ts-row-title">商品规格:</i>
|
<i class="ts-row-title">商品规格:</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ts-tag-list">
|
<div class="ts-tag-list">
|
||||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[(activeIndexa==index && item.leftAllotment>0)?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
<em
|
||||||
|
v-for="(item, index) in newlist"
|
||||||
|
:key="index"
|
||||||
|
@click="selectsearch(item, index)"
|
||||||
|
:class="[
|
||||||
|
activeIndexa == index && item.leftAllotment > 0
|
||||||
|
? 'active'
|
||||||
|
: 'unactive',
|
||||||
|
item.leftAllotment > 0 ? '' : 'disabled',
|
||||||
|
]"
|
||||||
|
>
|
||||||
{{ item.specifications }}
|
{{ item.specifications }}
|
||||||
</em>
|
</em>
|
||||||
</div>
|
</div>
|
||||||
@ -163,7 +169,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-produnnum" v-if="(userbuy && curItem.leftAllotment>0)">
|
<div
|
||||||
|
class="rc-produnnum"
|
||||||
|
v-if="userbuy && curItem.leftAllotment > 0"
|
||||||
|
>
|
||||||
<div><i class="ts-row-title">商品数量:</i></div>
|
<div><i class="ts-row-title">商品数量:</i></div>
|
||||||
<img
|
<img
|
||||||
src="../../assets/image/userjian.png"
|
src="../../assets/image/userjian.png"
|
||||||
@ -208,11 +217,13 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button" v-if="(userbuy && curItem.leftAllotment>0)">
|
<div
|
||||||
|
class="rc-button"
|
||||||
|
v-if="userbuy && curItem.leftAllotment > 0"
|
||||||
|
>
|
||||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold rc-md-down"></div>
|
<div class="online bold rc-md-down"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -224,10 +235,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<FixRight></FixRight>
|
<FixRight></FixRight>
|
||||||
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon" :close-on-click-modal="false">
|
<el-dialog
|
||||||
<div class="ts-no-data" v-if="usernewlist.length<=0">目前还没有可用的优惠券</div>
|
:visible.sync="dialogInfo1"
|
||||||
|
@close="userclose"
|
||||||
|
class="pop_coupon"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="ts-no-data" v-if="usernewlist.length <= 0">
|
||||||
|
目前还没有可用的优惠券
|
||||||
|
</div>
|
||||||
<div class="rs-dis">
|
<div class="rs-dis">
|
||||||
<div
|
<div
|
||||||
class="rc-discount"
|
class="rc-discount"
|
||||||
@ -238,11 +255,15 @@
|
|||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left">
|
<div class="rc-left">
|
||||||
<div>
|
<div>
|
||||||
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
<i v-if="item.couponTypeId != '4' && item.couponAmount > 0">
|
||||||
¥
|
¥
|
||||||
</i>
|
</i>
|
||||||
<span>
|
<span>
|
||||||
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
{{
|
||||||
|
item.couponAmount
|
||||||
|
? item.couponAmount
|
||||||
|
: parseInt(item.discount * 10) + "折"
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<strong>{{ item.couponName }}</strong>
|
<strong>{{ item.couponName }}</strong>
|
||||||
@ -253,8 +274,8 @@
|
|||||||
</i>
|
</i>
|
||||||
<div class="rc-userfont">
|
<div class="rc-userfont">
|
||||||
<strong>有效期</strong>
|
<strong>有效期</strong>
|
||||||
<span>{{item.validFrom}}至</span>
|
<span>{{ item.validFrom }}至</span>
|
||||||
<em>{{item.validTo}}</em>
|
<em>{{ item.validTo }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-footer">
|
<div class="rc-footer">
|
||||||
<span @click="usergetconf(item)">立即领取</span>
|
<span @click="usergetconf(item)">立即领取</span>
|
||||||
@ -280,14 +301,16 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div class="rc-button rc-md-down" v-if="(userbuy && curItem.leftAllotment>0)">
|
<div
|
||||||
|
class="rc-button rc-md-down"
|
||||||
|
v-if="userbuy && curItem.leftAllotment > 0"
|
||||||
|
>
|
||||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button rc-md-down " v-if="(!userbuy)">
|
<div class="rc-button rc-md-down" v-if="userloginbuy">
|
||||||
<span @click="chuafangbuy()" style="margin-right: 20px">立即购买</span>
|
<span @click="chuafangbuy()" style="margin-right: 20px">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -306,80 +329,88 @@ import {
|
|||||||
getdraw,
|
getdraw,
|
||||||
alldiscount,
|
alldiscount,
|
||||||
oncequery,
|
oncequery,
|
||||||
biaomessage
|
biaomessage,
|
||||||
} from "../../ajax/getData";
|
} from "../../ajax/getData";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async asyncData (context) {
|
async asyncData(context) {
|
||||||
let isRxGoods = context.route.query.isRxGoods;
|
let isRxGoods = context.route.query.isRxGoods;
|
||||||
let userbuy = true;
|
let userbuy = true;
|
||||||
let newlist = [];
|
let newlist = [];
|
||||||
let curItem = {};
|
let curItem = {};
|
||||||
let chufang = {};
|
let chufang = {};
|
||||||
let videolist=[];
|
let videolist = [];
|
||||||
let productAttachmentList = [];
|
let productAttachmentList = [];
|
||||||
let userlistmenu = [];
|
let userlistmenu = [];
|
||||||
isRxGoods = (isRxGoods == '1'?true:false);
|
isRxGoods = isRxGoods == "1" ? true : false;
|
||||||
let mainProductCode = context.route.query.mainProductCode;
|
let mainProductCode = context.route.query.mainProductCode;
|
||||||
let productCode = context.route.query.productCode;
|
let productCode = context.route.query.productCode;
|
||||||
let activeIndexa = 0;
|
let activeIndexa = 0;
|
||||||
if(!productCode || productCode.length<=0)
|
if (!productCode || productCode.length <= 0)
|
||||||
throw new Error('Empty product code');
|
throw new Error("Empty product code");
|
||||||
productCode = productCode.split(",");
|
productCode = productCode.split(",");
|
||||||
// console.log(this.productCode);
|
// console.log(this.productCode);
|
||||||
if(isRxGoods){
|
if (isRxGoods) {
|
||||||
let data = await oncequery(mainProductCode);
|
let data = await oncequery(mainProductCode);
|
||||||
let outputObj = {};
|
let outputObj = {};
|
||||||
if (data) {
|
if (data) {
|
||||||
chufang=data;
|
chufang = data;
|
||||||
outputObj = data;
|
outputObj = data;
|
||||||
outputObj.productName = data.name;
|
outputObj.productName = data.name;
|
||||||
outputObj.picture = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.picture;
|
outputObj.picture =
|
||||||
outputObj.showImgFile = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.showImgFile;
|
"https://royalcanincn.escase.cn/jc/royalcanin/" + outputObj.picture;
|
||||||
|
outputObj.showImgFile =
|
||||||
|
"https://royalcanincn.escase.cn/jc/royalcanin/" +
|
||||||
|
outputObj.showImgFile;
|
||||||
newlist = [outputObj];
|
newlist = [outputObj];
|
||||||
curItem = outputObj;
|
curItem = outputObj;
|
||||||
}
|
}
|
||||||
let insertTmpObj = {id:1, attachmentType:1, sort:1, attachmentPath:newlist[0].picture};
|
let insertTmpObj = {
|
||||||
|
id: 1,
|
||||||
|
attachmentType: 1,
|
||||||
|
sort: 1,
|
||||||
|
attachmentPath: newlist[0].picture,
|
||||||
|
};
|
||||||
productAttachmentList = [insertTmpObj];
|
productAttachmentList = [insertTmpObj];
|
||||||
userbuy = false;
|
userbuy = false;
|
||||||
console.log('这是处方量数据')
|
console.log(curItem);
|
||||||
|
// debugger
|
||||||
|
|
||||||
|
console.log("这是处方量数据");
|
||||||
} else {
|
} else {
|
||||||
let stopLeftAllotmentChecking = false;
|
let stopLeftAllotmentChecking = false;
|
||||||
let stopIndex = 0;
|
let stopIndex = 0;
|
||||||
for(let singleCode of productCode) {
|
for (let singleCode of productCode) {
|
||||||
let data = await goodsmessage(singleCode);
|
let data = await goodsmessage(singleCode);
|
||||||
if (data && data.data.length>0) {
|
if (data && data.data.length > 0) {
|
||||||
newlist.push(data.data[0]);
|
newlist.push(data.data[0]);
|
||||||
|
|
||||||
if(data.data[0].leftAllotment>0 && !stopLeftAllotmentChecking) {
|
if (data.data[0].leftAllotment > 0 && !stopLeftAllotmentChecking) {
|
||||||
activeIndexa = stopIndex;
|
activeIndexa = stopIndex;
|
||||||
curItem = data.data[0];
|
curItem = data.data[0];
|
||||||
stopLeftAllotmentChecking=true;
|
stopLeftAllotmentChecking = true;
|
||||||
}
|
}
|
||||||
stopIndex++;
|
stopIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(curItem.productAttachmentList != undefined)
|
if (curItem.productAttachmentList != undefined)
|
||||||
productAttachmentList = curItem.productAttachmentList;
|
productAttachmentList = curItem.productAttachmentList;
|
||||||
let list=[];
|
let list = [];
|
||||||
|
|
||||||
if(curItem.productName == undefined)
|
if (curItem.productName == undefined) curItem = newlist[0];
|
||||||
curItem = newlist[0];
|
|
||||||
userbuy = true;
|
userbuy = true;
|
||||||
}
|
}
|
||||||
if(!curItem || curItem.productName == undefined)
|
if (!curItem || curItem.productName == undefined)
|
||||||
throw new Error("商品信息错误");
|
throw new Error("商品信息错误");
|
||||||
let crumbs = [
|
let crumbs = [
|
||||||
{
|
{
|
||||||
path:'/productdetails/productlist/',
|
path: "/productdetails/productlist/",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: curItem.productName,
|
title: curItem.productName,
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
console.log(curItem);
|
|
||||||
return {
|
return {
|
||||||
crumbs,
|
crumbs,
|
||||||
activeIndexa,
|
activeIndexa,
|
||||||
@ -388,8 +419,8 @@ export default {
|
|||||||
chufang,
|
chufang,
|
||||||
videolist,
|
videolist,
|
||||||
productAttachmentList,
|
productAttachmentList,
|
||||||
userbuy
|
userbuy,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -397,10 +428,11 @@ export default {
|
|||||||
userimage: require("../../assets/image/unused.png"),
|
userimage: require("../../assets/image/unused.png"),
|
||||||
gotop: false,
|
gotop: false,
|
||||||
dialogInfo1: false,
|
dialogInfo1: false,
|
||||||
videolist:[],
|
videolist: [],
|
||||||
videoimg:'',
|
videoimg: "",
|
||||||
videoshow: false,
|
videoshow: false,
|
||||||
name: [],
|
name: [],
|
||||||
|
userloginbuy: false,
|
||||||
userlist: [],
|
userlist: [],
|
||||||
drawlist: [], //用户可以领取的优惠券
|
drawlist: [], //用户可以领取的优惠券
|
||||||
alldraw: [],
|
alldraw: [],
|
||||||
@ -461,7 +493,7 @@ export default {
|
|||||||
tabs,
|
tabs,
|
||||||
unlogin,
|
unlogin,
|
||||||
Myfooter,
|
Myfooter,
|
||||||
FixRight
|
FixRight,
|
||||||
},
|
},
|
||||||
// middleware: 'metaTitle',
|
// middleware: 'metaTitle',
|
||||||
// // middleware: 'metaTitle',
|
// // middleware: 'metaTitle',
|
||||||
@ -469,21 +501,35 @@ export default {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
// console.log(this.curItem);
|
console.log(this.curItem);
|
||||||
|
if(!this.userbuy){
|
||||||
|
if (this.curItem.goodUrl.includes("pages")) {
|
||||||
|
this.userloginbuy = false;
|
||||||
|
console.log("------");
|
||||||
|
} else {
|
||||||
|
this.userloginbuy = true;
|
||||||
|
console.log("-22222222");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
||||||
this.usermessage = this.$store.state.userInfo;
|
this.usermessage = this.$store.state.userInfo;
|
||||||
this.productCode = this.$route.query.productCode;
|
this.productCode = this.$route.query.productCode;
|
||||||
//video显示
|
//video显示
|
||||||
this.productAttachmentList.map(element=>{
|
this.productAttachmentList.map((element) => {
|
||||||
if(element.attachmentPath.substring(element.attachmentPath.lastIndexOf(".")+1)=='mp4'){
|
if (
|
||||||
this.videolist=element.attachmentPath;
|
element.attachmentPath.substring(
|
||||||
|
element.attachmentPath.lastIndexOf(".") + 1
|
||||||
|
) == "mp4"
|
||||||
|
) {
|
||||||
|
this.videolist = element.attachmentPath;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.videoimg=this.productAttachmentList[0].attachmentPath;
|
this.videoimg = this.productAttachmentList[0].attachmentPath;
|
||||||
if(this.videolist.length>0){
|
if (this.videolist.length > 0) {
|
||||||
this.videoshow=true
|
this.videoshow = true;
|
||||||
}else{
|
} else {
|
||||||
this.videoshow=false;
|
this.videoshow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -501,7 +547,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["changemessage","checkIsLogin"]),
|
...mapMutations(["changemessage", "checkIsLogin"]),
|
||||||
showmesg() {
|
showmesg() {
|
||||||
this.toTop();
|
this.toTop();
|
||||||
},
|
},
|
||||||
@ -516,10 +562,9 @@ export default {
|
|||||||
//获取用户领取的优惠券
|
//获取用户领取的优惠券
|
||||||
async getconf(memberId, couponId) {
|
async getconf(memberId, couponId) {
|
||||||
let data = await getConfig(memberId, couponId);
|
let data = await getConfig(memberId, couponId);
|
||||||
let msg = '领取成功';
|
let msg = "领取成功";
|
||||||
if (data) {
|
if (data) {
|
||||||
if(data.code!='0')
|
if (data.code != "0") msg = data.msg;
|
||||||
msg = data.msg;
|
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
message: msg,
|
message: msg,
|
||||||
@ -527,8 +572,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//处方用粮跳转
|
//处方用粮跳转
|
||||||
chuafangbuy(){
|
chuafangbuy() {
|
||||||
window.location.href =this.chufang.goodUrl;
|
window.location.href = this.chufang.goodUrl;
|
||||||
},
|
},
|
||||||
|
|
||||||
// changeName(newName){
|
// changeName(newName){
|
||||||
@ -537,13 +582,13 @@ export default {
|
|||||||
|
|
||||||
userclose() {
|
userclose() {
|
||||||
this.userlist = [];
|
this.userlist = [];
|
||||||
this.dialogInfo1=false;
|
this.dialogInfo1 = false;
|
||||||
},
|
},
|
||||||
async userquery() {
|
async userquery() {
|
||||||
let data = await goodsmessage(this.productCode);
|
let data = await goodsmessage(this.productCode);
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data)
|
console.log(data);
|
||||||
debugger
|
debugger;
|
||||||
this.newlist = data.data;
|
this.newlist = data.data;
|
||||||
}
|
}
|
||||||
this.productAttachmentList = this.newlist[0].productAttachmentList;
|
this.productAttachmentList = this.newlist[0].productAttachmentList;
|
||||||
@ -557,11 +602,14 @@ export default {
|
|||||||
let outputObj = {};
|
let outputObj = {};
|
||||||
if (data) {
|
if (data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
debugger
|
debugger;
|
||||||
outputObj = data;
|
outputObj = data;
|
||||||
outputObj.productName = data.name;
|
outputObj.productName = data.name;
|
||||||
outputObj.picture = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.picture;
|
outputObj.picture =
|
||||||
outputObj.showImgFile = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.showImgFile;
|
"https://royalcanincn.escase.cn/jc/royalcanin/" + outputObj.picture;
|
||||||
|
outputObj.showImgFile =
|
||||||
|
"https://royalcanincn.escase.cn/jc/royalcanin/" +
|
||||||
|
outputObj.showImgFile;
|
||||||
this.newlist = [outputObj];
|
this.newlist = [outputObj];
|
||||||
}
|
}
|
||||||
let picture = this.newlist[0].picture.split(",");
|
let picture = this.newlist[0].picture.split(",");
|
||||||
@ -587,7 +635,10 @@ export default {
|
|||||||
let alllist = [];
|
let alllist = [];
|
||||||
this.userlist = this.alldraw.data;
|
this.userlist = this.alldraw.data;
|
||||||
this.userlist.forEach((element, index) => {
|
this.userlist.forEach((element, index) => {
|
||||||
if (typeof element.productCodes == "string" || !element.productCodes) {
|
if (
|
||||||
|
typeof element.productCodes == "string" ||
|
||||||
|
!element.productCodes
|
||||||
|
) {
|
||||||
userlist.push(element);
|
userlist.push(element);
|
||||||
// let s=element.productCodes.split(',');
|
// let s=element.productCodes.split(',');
|
||||||
// console.log(s.indexOf(this.productCode) != -1 )
|
// console.log(s.indexOf(this.productCode) != -1 )
|
||||||
@ -596,24 +647,24 @@ export default {
|
|||||||
});
|
});
|
||||||
let menualist = [];
|
let menualist = [];
|
||||||
userlist.filter((item) => {
|
userlist.filter((item) => {
|
||||||
let valDateFromTime=0;
|
let valDateFromTime = 0;
|
||||||
let valDateToTime=0;
|
let valDateToTime = 0;
|
||||||
let curTime = new Date().getTime();
|
let curTime = new Date().getTime();
|
||||||
let dateChecked=true;
|
let dateChecked = true;
|
||||||
if(item.fValidFrom) {
|
if (item.fValidFrom) {
|
||||||
valDateFromTime = new Date(item.fValidFrom).getTime();
|
valDateFromTime = new Date(item.fValidFrom).getTime();
|
||||||
}
|
}
|
||||||
if(item.fValidTo) {
|
if (item.fValidTo) {
|
||||||
valDateToTime = new Date(item.fValidTo).getTime();
|
valDateToTime = new Date(item.fValidTo).getTime();
|
||||||
}
|
}
|
||||||
if(valDateFromTime && curTime < valDateFromTime) {
|
if (valDateFromTime && curTime < valDateFromTime) {
|
||||||
dateChecked=false;
|
dateChecked = false;
|
||||||
}
|
}
|
||||||
if(valDateToTime && curTime > valDateToTime) {
|
if (valDateToTime && curTime > valDateToTime) {
|
||||||
dateChecked=false;
|
dateChecked = false;
|
||||||
}
|
}
|
||||||
if(dateChecked && item.activityId!=10) {
|
if (dateChecked && item.activityId != 10) {
|
||||||
if(!item.productCodes) {
|
if (!item.productCodes) {
|
||||||
menualist.push(item);
|
menualist.push(item);
|
||||||
} else {
|
} else {
|
||||||
item.productCodes = item.productCodes.split(",");
|
item.productCodes = item.productCodes.split(",");
|
||||||
@ -632,10 +683,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
plus(num, index) {
|
plus(num, index) {
|
||||||
if(this.sales_num >= this.curItem.leftAllotment) {
|
if (this.sales_num >= this.curItem.leftAllotment) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
message: '已达到本品最大购买上限',
|
message: "已达到本品最大购买上限",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.sales_num = parseInt(this.sales_num) + 1;
|
this.sales_num = parseInt(this.sales_num) + 1;
|
||||||
@ -655,7 +706,7 @@ export default {
|
|||||||
// let mobile=JSON.parse(location.getItem('userInfo'));
|
// let mobile=JSON.parse(location.getItem('userInfo'));
|
||||||
// console.log(userid,mobile);
|
// console.log(userid,mobile);
|
||||||
let basePoint = item.basePoint;
|
let basePoint = item.basePoint;
|
||||||
basePoint = basePoint?basePoint:0;
|
basePoint = basePoint ? basePoint : 0;
|
||||||
let data = await postCourseId(
|
let data = await postCourseId(
|
||||||
item.productCode,
|
item.productCode,
|
||||||
this.sales_num,
|
this.sales_num,
|
||||||
@ -724,13 +775,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectsearch(item, index) {
|
selectsearch(item, index) {
|
||||||
if(!item.leftAllotment || item.leftAllotment<=0)
|
if (!item.leftAllotment || item.leftAllotment <= 0) return;
|
||||||
return;
|
|
||||||
this.activeIndexa = index;
|
this.activeIndexa = index;
|
||||||
this.curItem = item;
|
this.curItem = item;
|
||||||
this.productAttachmentList = item.productAttachmentList;
|
this.productAttachmentList = item.productAttachmentList;
|
||||||
this.crumbs.pop();
|
this.crumbs.pop();
|
||||||
this.crumbs.push({title: item.productName});
|
this.crumbs.push({ title: item.productName });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
267
rc-busness/pages/resentation/resentation.vue
Normal file
267
rc-busness/pages/resentation/resentation.vue
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Myheader></Myheader>
|
||||||
|
<div class="rc-top"></div>
|
||||||
|
<div class="ts-banner-swiper-container">
|
||||||
|
<img src="/images/userbanner.png" alt="" class="user-pc" />
|
||||||
|
<img src="/images/rc-phone.png" alt="" class="user-phone" />
|
||||||
|
</div>
|
||||||
|
<div class="all-contair">
|
||||||
|
<div class="all-contair dog-foot">
|
||||||
|
<h2>明星犬粮</h2>
|
||||||
|
<img src="/images/dogfoot.png" alt="" />
|
||||||
|
<strong>中型幼犬离乳期全家奶糕</strong>
|
||||||
|
<p>
|
||||||
|
中心犬离乳期专属<br />高易再水合颗粒<br />
|
||||||
|
帮助增强保护健康成长
|
||||||
|
</p>
|
||||||
|
<em
|
||||||
|
class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center"
|
||||||
|
@click="userselect(1)"
|
||||||
|
>
|
||||||
|
点击查看
|
||||||
|
</em>
|
||||||
|
</div>
|
||||||
|
<div class="all-contair cat-foot">
|
||||||
|
<h2>明星猫粮</h2>
|
||||||
|
<img src="/images/catfoot.png" alt="" />
|
||||||
|
<strong>皇家离乳期幼猫全家奶糕</strong>
|
||||||
|
<p>
|
||||||
|
幼猫成长专属<br />
|
||||||
|
支持幼猫自身保护力<br />
|
||||||
|
为快速生长提供足够能量
|
||||||
|
</p>
|
||||||
|
<em
|
||||||
|
class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center"
|
||||||
|
@click="userselect(2)"
|
||||||
|
>
|
||||||
|
点击查看
|
||||||
|
</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="contair">
|
||||||
|
<nuxt-link :to="`/productdetails/productlist/`">
|
||||||
|
<span class="ts-standard-btn center">查看更多</span>
|
||||||
|
</nuxt-link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Myheader from "~/components/header.vue";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
Myheader,
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
userselect(item){
|
||||||
|
let productCode=88451
|
||||||
|
if(item==1){
|
||||||
|
|
||||||
|
this.$router.push({
|
||||||
|
path: "/productdetails/producted",
|
||||||
|
query: {
|
||||||
|
stype: 1,
|
||||||
|
isRxGoods: false,
|
||||||
|
productCode: '80240008F24',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$router.push({
|
||||||
|
path: "/productdetails/producted",
|
||||||
|
query: {
|
||||||
|
stype: 1,
|
||||||
|
isRxGoods: false,
|
||||||
|
productCode: '80240008F24',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped >
|
||||||
|
@import url("../../assets/css/global.less");
|
||||||
|
|
||||||
|
//手机端
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.user-pc {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.user-phone {
|
||||||
|
display: block;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
.contair {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
margin-top: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-banner-swiper-container {
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.all-contair {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
img {
|
||||||
|
width: 260px;
|
||||||
|
height: 185px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
color: #e2001a;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e2001a;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 20px;
|
||||||
|
margin-top: 13px;
|
||||||
|
}
|
||||||
|
.dog-foot {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48%;
|
||||||
|
img {
|
||||||
|
width: 260px;
|
||||||
|
height: 185px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cat-foot {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48%;
|
||||||
|
img {
|
||||||
|
width: 260px;
|
||||||
|
height: 185px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 769px) {
|
||||||
|
.user-phone {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.contair {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-bottom: 106px;
|
||||||
|
margin-top: 206px;
|
||||||
|
.ts-standard-btn {
|
||||||
|
width: 271px;
|
||||||
|
height: 83px;
|
||||||
|
background: #e2001a;
|
||||||
|
opacity: 1;
|
||||||
|
border-radius: 30px;
|
||||||
|
font-size: 29px;
|
||||||
|
color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-banner-swiper-container {
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.all-contair {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 70px;
|
||||||
|
img {
|
||||||
|
width: 371px;
|
||||||
|
height: 525px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
color: #e2001a;
|
||||||
|
font-size: 83px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-size: 52px;
|
||||||
|
color: #e2001a;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 40px;
|
||||||
|
margin-top: 33px;
|
||||||
|
}
|
||||||
|
.dog-foot {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48%;
|
||||||
|
img {
|
||||||
|
width: 371px;
|
||||||
|
height: 525px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.cat-foot {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 48%;
|
||||||
|
img {
|
||||||
|
width: 371px;
|
||||||
|
height: 525px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 40px;
|
||||||
|
margin-top: 33px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ts-standard-btn {
|
||||||
|
width: 270px;
|
||||||
|
height: 83px;
|
||||||
|
border: 2px solid #e2001a;
|
||||||
|
border-radius: 30px;
|
||||||
|
color: #e2001a;
|
||||||
|
font-size: 29px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
BIN
rc-busness/static/images/catfoot.png
Normal file
BIN
rc-busness/static/images/catfoot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 143 KiB |
BIN
rc-busness/static/images/dogfoot.png
Normal file
BIN
rc-busness/static/images/dogfoot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
BIN
rc-busness/static/images/rc-phone.png
Normal file
BIN
rc-busness/static/images/rc-phone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
BIN
rc-busness/static/images/userbanner.png
Normal file
BIN
rc-busness/static/images/userbanner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 710 KiB |
Loading…
Reference in New Issue
Block a user