Commit a9f2089c authored by IvyXia123's avatar IvyXia123

长按图片保存

parent c777344a
......@@ -11,4 +11,4 @@
position: fixed;
background: #f4f4f4;
}
/* html{font-size: 1px;} */</style><link href=static/css/app.f983055a19b69eb54137ee36031e8a72.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script></script><script type=text/javascript src=static/js/manifest.567126a5dc82214172ee.js></script><script type=text/javascript src=static/js/vendor.5af9774cd57a16d7dc8b.js></script><script type=text/javascript src=static/js/app.90a0f046bcd34563e8e5.js></script></body></html>
\ No newline at end of file
/* html{font-size: 1px;} */</style><link href=static/css/app.f983055a19b69eb54137ee36031e8a72.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script></script><script type=text/javascript src=static/js/manifest.b0344f1f2a47a5f925dd.js></script><script type=text/javascript src=static/js/vendor.5af9774cd57a16d7dc8b.js></script><script type=text/javascript src=static/js/app.90a0f046bcd34563e8e5.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var c={},f={68:0};function d(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,d){a=f[e]=[c,d]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,n.crossOrigin="anonymous",d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+({0:"vendor-async"}[e]||e)+"."+{0:"911a2da21de8df19a623",1:"0d3ad025fb650559f7b2",2:"1507b746e61abb77c53d",3:"095866ef7b23f66373e9",4:"bb98337b5d40e1ae6d54",5:"61b4d837ac5b14c75528",6:"835bf24d97bbc52741e7",7:"1e556875e1bf6aa9c6b7",8:"a12c0a2b1ddffb9b39d3",9:"0e8b0d9c6095ddf14112",10:"00d7afa53181bcf56c9a",11:"967ca48629e9dec363cc",12:"380e4552da4c35a2e935",13:"e89ba2e79971dbad8724",14:"efa5df34c15627ff9a9f",15:"c2d24bfdd6c9e9f10470",16:"14995320a1e7474d4093",17:"725fde1924e908cb6b30",18:"d3154d680288bf48ea3e",19:"498058f9c32fcf30551d",20:"54a84b54d5944faf9156",21:"15e984d7ad7b81125cf6",22:"959e7181712bf43a1ea1",23:"6027e15d466465201cf5",24:"66115b335ef36e664560",25:"909f43c609352a10d705",26:"087acaaccc58e8a3a391",27:"8ee0be7fbb0fb087db54",28:"9a91c3a1aa02b5ff7b5f",29:"297903841c39562793f6",30:"9fe2ba4ed3d098c99f64",31:"496a4f1feee35020b28e",32:"9b60bd12f549b0cf9560",33:"cd0550b6a3272be00c97",34:"ac3544e265b8bf6336fc",35:"0a3efc02a8dac2584121",36:"59302d272357b6b9fdab",37:"2ea5b995a647a8f202b8",38:"f709dbdb0c15d6afca61",39:"04b3397e8f6926629967",40:"ff3778361e9c6e46fe3d",41:"0d143bfe82c865a81421",42:"779ead4e4777560ab21f",43:"e94c35882e203938cece",44:"ea020ac40019f7fc209a",45:"8cfbe60b4737e497624f",46:"0ce6b506d90e9c69b0d6",47:"36ebe1613cb961d3b75a",48:"a0f24071ee52a1d66406",49:"4c09a9dff13d7bc1c083",50:"5c01d810d0f9f67026ca",51:"fd9a0b22c96b0e4564fa",52:"0ee7ae890e4fcca895e3",53:"a6010aeebd5fbde2582c",54:"6b792ec4a32901312c88",55:"d39ec287d80caba93846",56:"8845249be04a11188470",57:"d2999bf942fb449f5a2b",58:"761e0bd77767b7a2f1a3",59:"d4d6559296d85e814076",60:"b2347d1f621376484d2a",61:"bacd7e95d517cf538590",62:"c76ad08ef30a62868ec5",63:"557e137c7b8fe2ac6cd8",64:"90674e4ddec138e7a53d",65:"b743a3660298e39b9df2"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},d.m=e,d.c=c,d.d=function(e,a,c){d.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},d.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(a,"a",a),a},d.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d.p="",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var c={},f={68:0};function d(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,d){a=f[e]=[c,d]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,n.crossOrigin="anonymous",d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+({0:"vendor-async"}[e]||e)+"."+{0:"911a2da21de8df19a623",1:"f2c4964459d018cf7f79",2:"d5c441206d700c2d59f2",3:"5a2c9e689d9276ba6db9",4:"bb98337b5d40e1ae6d54",5:"61b4d837ac5b14c75528",6:"835bf24d97bbc52741e7",7:"1e556875e1bf6aa9c6b7",8:"a12c0a2b1ddffb9b39d3",9:"0e8b0d9c6095ddf14112",10:"00d7afa53181bcf56c9a",11:"420aaba494dfcef0d03e",12:"380e4552da4c35a2e935",13:"e89ba2e79971dbad8724",14:"efa5df34c15627ff9a9f",15:"c2d24bfdd6c9e9f10470",16:"14995320a1e7474d4093",17:"725fde1924e908cb6b30",18:"d3154d680288bf48ea3e",19:"498058f9c32fcf30551d",20:"54a84b54d5944faf9156",21:"15e984d7ad7b81125cf6",22:"959e7181712bf43a1ea1",23:"6027e15d466465201cf5",24:"66115b335ef36e664560",25:"909f43c609352a10d705",26:"087acaaccc58e8a3a391",27:"8ee0be7fbb0fb087db54",28:"9a91c3a1aa02b5ff7b5f",29:"297903841c39562793f6",30:"9fe2ba4ed3d098c99f64",31:"496a4f1feee35020b28e",32:"9b60bd12f549b0cf9560",33:"cd0550b6a3272be00c97",34:"ac3544e265b8bf6336fc",35:"0a3efc02a8dac2584121",36:"59302d272357b6b9fdab",37:"2ea5b995a647a8f202b8",38:"f709dbdb0c15d6afca61",39:"04b3397e8f6926629967",40:"ff3778361e9c6e46fe3d",41:"0d143bfe82c865a81421",42:"779ead4e4777560ab21f",43:"e94c35882e203938cece",44:"ea020ac40019f7fc209a",45:"8cfbe60b4737e497624f",46:"0ce6b506d90e9c69b0d6",47:"36ebe1613cb961d3b75a",48:"a0f24071ee52a1d66406",49:"4c09a9dff13d7bc1c083",50:"5c01d810d0f9f67026ca",51:"fd9a0b22c96b0e4564fa",52:"0ee7ae890e4fcca895e3",53:"a6010aeebd5fbde2582c",54:"6b792ec4a32901312c88",55:"d39ec287d80caba93846",56:"8845249be04a11188470",57:"d2999bf942fb449f5a2b",58:"761e0bd77767b7a2f1a3",59:"d4d6559296d85e814076",60:"b2347d1f621376484d2a",61:"bacd7e95d517cf538590",62:"c76ad08ef30a62868ec5",63:"557e137c7b8fe2ac6cd8",64:"90674e4ddec138e7a53d",65:"b743a3660298e39b9df2"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},d.m=e,d.c=c,d.d=function(e,a,c){d.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},d.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(a,"a",a),a},d.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d.p="",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -130,268 +130,255 @@
</template>
<script>
import { Toast } from "vant";
import {
getUserAdressApi,
getGoodsDetailApi,
payApi,
getwechatParam,
getStatusWechatApi,
getCouponListApi,
getCourseInfoApi,
postPayBillApi
} from "../../service/api";
import addAddress from "./address";
import loginPage from "./login";
import youHuiUrl from "../../assets/shop/pic.png";
import saleDiv from "./sale";
import lineImage from "../../assets/shop/buyBg.png";
import clock from "../../assets/shop/clock.png";
import addressImg from "../../assets/shop/address.png";
import leftG from "../../assets/shop/leftg.png";
import popup_img from "../../assets/shop/popup_img@2x.png";
import weixin from "../../assets/evaluate/weixin.png";
import zhifubao from "../../assets/evaluate/zhifubao.png";
import xinyongka from "../../assets/evaluate/xinyongka.png";
import fenqi from "../../assets/evaluate/fenqi.png";
import icon_re from "../../assets/evaluate/icon_re.png";
import icon_re_acitve from "../../assets/evaluate/icon_re_acitve.png";
import { Popup } from "mint-ui";
import { Toast } from "vant";
import {
getUserAdressApi,
getGoodsDetailApi,
payApi,
getwechatParam,
getStatusWechatApi,
getCouponListApi,
getCourseInfoApi,
postPayBillApi
} from "../../service/api";
import addAddress from "./address";
import loginPage from "./login";
import youHuiUrl from "../../assets/shop/pic.png";
import saleDiv from "./sale";
import lineImage from "../../assets/shop/buyBg.png";
import clock from "../../assets/shop/clock.png";
import addressImg from "../../assets/shop/address.png";
import leftG from "../../assets/shop/leftg.png";
import popup_img from "../../assets/shop/popup_img@2x.png";
import weixin from "../../assets/evaluate/weixin.png";
import zhifubao from "../../assets/evaluate/zhifubao.png";
import xinyongka from "../../assets/evaluate/xinyongka.png";
import fenqi from "../../assets/evaluate/fenqi.png";
import icon_re from "../../assets/evaluate/icon_re.png";
import icon_re_acitve from "../../assets/evaluate/icon_re_acitve.png";
import { Popup } from "mint-ui";
export default {
name: "buy",
components: {
addAddress,
saleDiv,
loginPage,
[Popup.name]: Popup
export default {
name: "buy",
components: {
addAddress,
saleDiv,
loginPage,
[Popup.name]: Popup
},
data() {
return {
bindMobile: {
show: false,
mobile: "",
img_code: "",
verify_code: "",
flag: false
},
iconRe: icon_re,
icon_re_acitve: icon_re_acitve,
lineImage: lineImage,
youHuiUrl: youHuiUrl,
leftG: leftG,
addressImg: addressImg,
addressPop: false,
clock: clock,
groupDetail: false,
popupVisible: true,
orderFlag: false,
shopId: "",
salePop: {
show: false,
id: ""
},
saleObj: null,
hasMObile:
!JSON.parse(localStorage.getItem("userDesc")).mobile ||
JSON.parse(localStorage.getItem("userDesc")).mobile === "",
userDetail: JSON.parse(localStorage.getItem("userDesc")),
// mobile:'',
group_order_id: null,
addressObj: false,
price: "",
invite_code: "",
type: this.$route.query.type,
jsApiParameters: "",
orderNo: "",
canSale: false,
popup_img: popup_img,
orderCancel: false,
userCourse: {},
payList: [
{ icon: weixin, title: '微信支付', value: 0 },
{ icon: zhifubao, title: '支付宝支付', value: 1 }
],
payIndex: 0,
payUrl: ''
};
},
mounted() {
this.initPage();
},
filters: {
price(value) {
return (value / 100).toFixed(1);
}
},
computed: {
priceTotal() {
let priceT = 0;
if (this.type) {
priceT = this.groupDetail.original_price;
} else {
priceT = this.groupDetail.current_price;
}
if (this.saleObj) {
priceT = priceT - this.saleObj.money;
}
priceT = (priceT / 100).toFixed(2);
let str = priceT.toString();
if (str.length > 1) {
str = str.split(".")[1];
if (str === "0") priceT = parseInt(priceT);
}
return priceT;
}
},
methods: {
copy(e) {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}else if(this.payIndex === 2) {
Toast("信用卡支付获取成功");
}
},
data() {
return {
bindMobile: {
show: false,
mobile: "",
img_code: "",
verify_code: "",
flag: false
},
iconRe: icon_re,
icon_re_acitve: icon_re_acitve,
lineImage: lineImage,
youHuiUrl: youHuiUrl,
leftG: leftG,
addressImg: addressImg,
addressPop: false,
clock: clock,
groupDetail: false,
popupVisible: true,
orderFlag: false,
shopId: "",
salePop: {
show: false,
id: ""
},
saleObj: null,
hasMObile:
!JSON.parse(localStorage.getItem("userDesc")).mobile ||
JSON.parse(localStorage.getItem("userDesc")).mobile === "",
userDetail: JSON.parse(localStorage.getItem("userDesc")),
// mobile:'',
group_order_id: null,
addressObj: false,
price: "",
invite_code: "",
type: this.$route.query.type,
jsApiParameters: "",
orderNo: "",
canSale: false,
popup_img: popup_img,
orderCancel: false,
userCourse: {},
payList: [
{ icon: weixin, title: '微信支付', value: 0 },
{ icon: zhifubao, title: '支付宝支付', value: 1 },
{ icon: xinyongka,title: '信用卡分期', value: 2 },
{ icon: fenqi, title: '其他分期', value: 3 },
],
payIndex: 0,
payUrl: ''
};
onError() {
if(this.payIndex === 1) {
Toast("信用卡支付获取成功");
}
},
mounted() {
this.initPage();
// 支付方式
payListClick(val) {
this.payIndex = val
},
filters: {
price(value) {
return (value / 100).toFixed(1);
}
recursion() {
getCourseInfoApi().then(res => {
if(res.status){
this.userCourse = JSON.parse(JSON.stringify(res));
localStorage.setItem("userCourse", JSON.stringify(this.userCourse));
this.navPage(res);
}else{
setTimeout(() => {
this.recursion()
}, 500);
}
});
},
computed: {
priceTotal() {
let priceT = 0;
if (this.type) {
priceT = this.groupDetail.original_price;
} else {
priceT = this.groupDetail.current_price;
jsApiCall: function() {
let that = this;
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
that.jsApiParameters,
function(res) {
that.orderFlag = true;
console.log(res,110);
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 支付成功后处理
console.log(237)
Toast("支付成功");
setTimeout(() => {
console.log(238)
getCourseInfoApi().then(res => {
that.userCourse = JSON.parse(JSON.stringify(res));
localStorage.setItem(
"userCourse",
JSON.stringify(that.userCourse)
);
that.navPage(res);
});
}, 1500);
}
// alert(res.errMsg)
// alert(res.err_msg)
if (res.err_msg === "get_brand_wcpay_request:fail") {
}
if (res.err_msg === "get_brand_wcpay_request:cancel") {
that.orderCancel = true;
}
}
if (this.saleObj) {
priceT = priceT - this.saleObj.money;
);
},
chooseSale(data) {
this.saleObj = data;
},
showSale() {
this.salePop.id = this.shopId;
this.salePop.show = true;
},
buttonClick(buttonType, buttonName) {
this.$sa.track("buttonClick", {
tabTitle: "商品",
moduleTitle: "购买页",
buttonType: buttonType,
buttonName: buttonName
});
},
goToBuyPage() {
Toast("提交成功");
this.bindMobile.show = false;
},
payOrder(flag) {
let type = this.type ? 0 : 1;
let that = this;
this.orderCancel = false;
if (
!JSON.parse(localStorage.getItem("userDesc")).mobile ||
JSON.parse(localStorage.getItem("userDesc")).mobile === ""
) {
this.bindMobile.flag = type;
this.bindMobile.show = true;
setTimeout(() => {
this.$sa.track("ViewRegisterpage", {});
}, 1000);
} else if (flag) {
let json = {
goods_id: Number(this.shopId)
};
if (this.groupDetail.is_real === 1 && !this.addressObj) {
Toast("请填写地址");
return false;
}
priceT = (priceT / 100).toFixed(2);
let str = priceT.toString();
if (str.length > 1) {
str = str.split(".")[1];
if (str === "0") priceT = parseInt(priceT);
if (this.groupDetail.goods_type === 2 && !this.type) {
json.buy_type = 2;
}
return priceT;
}
},
methods: {
copy(e) {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}else if(this.payIndex === 2) {
Toast("信用卡支付获取成功");
if (this.invite_code) {
json.invite_code = this.invite_code;
}
},
onError() {
if(this.payIndex === 1) {
Toast("信用卡支付获取成功");
if (this.saleObj) {
json.order_coupon_id = this.saleObj.id;
}
},
// 支付方式
payListClick(val) {
this.payIndex = val
},
recursion() {
getCourseInfoApi().then(res => {
if(res.status){
this.userCourse = JSON.parse(JSON.stringify(res));
localStorage.setItem("userCourse", JSON.stringify(this.userCourse));
this.navPage(res);
}else{
setTimeout(() => {
this.recursion()
}, 500);
}
});
},
jsApiCall: function() {
let that = this;
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
that.jsApiParameters,
function(res) {
that.orderFlag = true;
console.log(res,110);
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 支付成功后处理
console.log(237)
Toast("支付成功");
setTimeout(() => {
console.log(238)
getCourseInfoApi().then(res => {
that.userCourse = JSON.parse(JSON.stringify(res));
localStorage.setItem(
"userCourse",
JSON.stringify(that.userCourse)
);
that.navPage(res);
});
}, 1500);
}
// alert(res.errMsg)
// alert(res.err_msg)
if (res.err_msg === "get_brand_wcpay_request:fail") {
}
if (res.err_msg === "get_brand_wcpay_request:cancel") {
that.orderCancel = true;
}
}
);
},
chooseSale(data) {
this.saleObj = data;
},
showSale() {
this.salePop.id = this.shopId;
this.salePop.show = true;
},
buttonClick(buttonType, buttonName) {
this.$sa.track("buttonClick", {
tabTitle: "商品",
moduleTitle: "购买页",
buttonType: buttonType,
buttonName: buttonName
let invite = this.$route.query.invite_code;
this.$sa.track("placeOrder", {
buyType: this.groupDetail.goods_type === 2 && !this.type ? "团购" : "直购",
couponAmount: this.saleObj ? Number(this.saleObj.money / 100) : 0,
paymentAmount: Number(this.priceTotal),
goodsID: this.shopId.toString(),
salesType: invite ? invite.split("-")[1] : "null",
salesID: invite ? Number(invite.split("-")[2]) : 0
});
},
goToBuyPage() {
Toast("提交成功");
this.bindMobile.show = false;
},
payOrder(flag) {
let type = this.type ? 0 : 1;
let that = this;
this.orderCancel = false;
if (
!JSON.parse(localStorage.getItem("userDesc")).mobile ||
JSON.parse(localStorage.getItem("userDesc")).mobile === ""
) {
this.bindMobile.flag = type;
this.bindMobile.show = true;
setTimeout(() => {
this.$sa.track("ViewRegisterpage", {});
}, 1000);
} else if (flag) {
let json = {
goods_id: Number(this.shopId)
};
if (this.groupDetail.is_real === 1 && !this.addressObj) {
Toast("请填写地址");
return false;
}
if (this.groupDetail.goods_type === 2 && !this.type) {
json.buy_type = 2;
}
if (this.invite_code) {
json.invite_code = this.invite_code;
}
if (this.saleObj) {
json.order_coupon_id = this.saleObj.id;
}
let invite = this.$route.query.invite_code;
this.$sa.track("placeOrder", {
buyType: this.groupDetail.goods_type === 2 && !this.type ? "团购" : "直购",
couponAmount: this.saleObj ? Number(this.saleObj.money / 100) : 0,
paymentAmount: Number(this.priceTotal),
goodsID: this.shopId.toString(),
salesType: invite ? invite.split("-")[1] : "null",
salesID: invite ? Number(invite.split("-")[2]) : 0
});
console.log(window.location.href.indexOf("gdt_vid"))
if(window.location.href.indexOf("gdt_vid") > -1){
json.gdt_vid = localStorage.getItem("gdt_vid")
}
if(window.location.href.indexOf("group_order_id") > -1){
json.cct_user_id = localStorage.getItem("cct_user_id")
}
if (window.location.href.indexOf("group_order_id") > -1) {
json.group_order_id = this.$route.query.group_order_id;
}
this.orderFlag = false;
/*let payTypeArr = ['WX', 'ALI', 'KFQ']
let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id }
postPayBillApi(data).then(res => {
if(this.payIndex === 0) {
window.location.href = res.pay_url;
}else if(this.payIndex === 1){
this.payUrl = res.pay_url;
}else if(this.payIndex === 2) {
this.payUrl = res.pay_url;
}
})*/
console.log(window.location.href.indexOf("gdt_vid"))
if(window.location.href.indexOf("gdt_vid") > -1){
json.gdt_vid = localStorage.getItem("gdt_vid")
}
if(window.location.href.indexOf("group_order_id") > -1){
json.cct_user_id = localStorage.getItem("cct_user_id")
}
if (window.location.href.indexOf("group_order_id") > -1) {
json.group_order_id = this.$route.query.group_order_id;
}
this.orderFlag = false;
/* if(this.payIndex === 0) {
payApi(json).then(res => {
this.orderNo = res.out_trade_no;
console.log(res)
......@@ -438,457 +425,512 @@
// alert(res)
this.orderFlag = true;
});
}else {
let data = { pay_type: 'ALI', return_url: window.location.href, buy_type: this.groupDetail.goods_type }
let dataObj = Object.assign({}, data, json)
postPayBillApi(dataObj).then(res => {
console.log(res.pay_url)
})
}
},
closeAdd(data) {
this.addressPop = data;
this.initPage();
},
showAdd() {
this.addressPop = true;
},
initPage() {
Toast.loading({
mask: true,
message: ""
});
sessionStorage.setItem("buyindex", 1);
getwechatParam({ api_list: "chooseWXPay" }).then(res => {
wx.config({
debug: false,
appId: res.appId,
timestamp: parseInt(res.timestamp),
nonceStr: res.nonceStr,
signature: res.signature,
jsApiList: res.jsApiList
});
});
getUserAdressApi().then(res => {
this.addressObj = res;
});
this.shopId = this.$route.query.shopId;
this.group_order_id = this.$route.query.group_order_id;
getCouponListApi(this.shopId).then(res => {
if (res.length > 0) {
let x = { money: 0 };
for (let k = 0; k < res.length; k++) {
x = res[k].money > x.money ? res[k] : x;
}
this.saleObj = x;
this.canSale = true;
}
});
getGoodsDetailApi(this.shopId).then(data => {
// debugger
data.desc = JSON.parse(data.desc);
data.goods_desc = JSON.parse(data.goods_desc);
data.share_desc = JSON.parse(data.share_desc);
this.groupDetail = JSON.parse(JSON.stringify(data));
sessionStorage.setItem("groupDetail", JSON.stringify(data));
console.log(this.groupDetail, 408);
this.invite_code = this.$route.query.invite_code;
if (this.type && this.type === 0) {
this.price = data.single_price / 100;
} else {
this.price = data.group_price / 100;
}
getStatusWechatApi({ goods_id: this.shopId }).then(res => {
Toast.clear();
let orderData = res;
return ;*/
payApi(json).then(res => {
this.orderNo = res.out_trade_no;
if (res.out_trade_no) {
console.log(res)
if (res.out_trade_no && !res.appId) {
getCourseInfoApi().then(res => {
this.userCourse = JSON.parse(JSON.stringify(res));
this.userCourse = res;
localStorage.setItem(
"userCourse",
JSON.stringify(this.userCourse)
"userCourse",
JSON.stringify(this.userCourse)
);
this.navPage(res);
console.log(res, 424);
});
} else {
let that = this;
this.orderNo = res.out_trade_no;
this.jsApiParameters = res;
wx.miniProgram.getEnv(function(res) {
if (res.miniprogram) {
let payParam = encodeURIComponent(JSON.stringify(json));
wx.miniProgram.navigateTo({
url: `pages/wxPay/main?payParam=${payParam}`
});
} else if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener(
"WeixinJSBridgeReady",
that.jsApiCall,
false
);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", that.jsApiCall);
document.attachEvent(
"onWeixinJSBridgeReady",
that.jsApiCall
);
}
} else {
that.jsApiCall();
}
});
}
});
this.$nextTick(() => {
})
.catch(res => {
// alert(res)
this.orderFlag = true;
});
}
},
closeAdd(data) {
this.addressPop = data;
this.initPage();
},
showAdd() {
this.addressPop = true;
},
initPage() {
Toast.loading({
mask: true,
message: ""
});
sessionStorage.setItem("buyindex", 1);
getwechatParam({ api_list: "chooseWXPay" }).then(res => {
wx.config({
debug: false,
appId: res.appId,
timestamp: parseInt(res.timestamp),
nonceStr: res.nonceStr,
signature: res.signature,
jsApiList: res.jsApiList
});
},
navPage(res) {
console.log(res, 437);
console.log(this.groupDetail);
if (
res.teacher_alias &&
res.teacher_alias.substr(0, 1) == 1 &&
this.groupDetail.goods_type != 4 &&
this.userDetail.open_info.is_subscribe == 1
) {
this.$router.push({
name: "guide",
query: { shopId: this.shopId }
});
});
getUserAdressApi().then(res => {
this.addressObj = res;
});
this.shopId = this.$route.query.shopId;
this.group_order_id = this.$route.query.group_order_id;
getCouponListApi(this.shopId).then(res => {
if (res.length > 0) {
let x = { money: 0 };
for (let k = 0; k < res.length; k++) {
x = res[k].money > x.money ? res[k] : x;
}
this.saleObj = x;
this.canSale = true;
}
});
getGoodsDetailApi(this.shopId).then(data => {
// debugger
data.desc = JSON.parse(data.desc);
data.goods_desc = JSON.parse(data.goods_desc);
data.share_desc = JSON.parse(data.share_desc);
this.groupDetail = JSON.parse(JSON.stringify(data));
sessionStorage.setItem("groupDetail", JSON.stringify(data));
console.log(this.groupDetail, 408);
this.invite_code = this.$route.query.invite_code;
if (this.type && this.type === 0) {
this.price = data.single_price / 100;
} else {
if (this.groupDetail.goods_type === 2 && !this.type) {
this.$router.push({
name: "success",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
});
} else if (this.groupDetail.goods_type === 4) {
this.$router.push({
name: "saleSuccess",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
});
} else {
this.$router.push({
name: "buySuccess",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
this.price = data.group_price / 100;
}
getStatusWechatApi({ goods_id: this.shopId }).then(res => {
Toast.clear();
let orderData = res;
this.orderNo = res.out_trade_no;
if (res.out_trade_no) {
getCourseInfoApi().then(res => {
this.userCourse = JSON.parse(JSON.stringify(res));
localStorage.setItem(
"userCourse",
JSON.stringify(this.userCourse)
);
this.navPage(res);
console.log(res, 424);
});
}
});
this.$nextTick(() => {
this.orderFlag = true;
});
});
},
navPage(res) {
console.log(res, 437);
console.log(this.groupDetail);
if (
res.teacher_alias &&
res.teacher_alias.substr(0, 1) == 1 &&
this.groupDetail.goods_type != 4 &&
this.userDetail.open_info.is_subscribe == 1
) {
this.$router.push({
name: "guide",
query: { shopId: this.shopId }
});
} else {
if (this.groupDetail.goods_type === 2 && !this.type) {
this.$router.push({
name: "success",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
});
} else if (this.groupDetail.goods_type === 4) {
this.$router.push({
name: "saleSuccess",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
});
} else {
this.$router.push({
name: "buySuccess",
query: {
out_trade_no: this.orderNo,
invite_code: this.invite_code,
shopId: this.shopId
}
});
}
}
}
};
}
};
</script>
<style scoped lang="less">
@import "../../util/public";
@import "../../util/public";
img {
max-width: none;
}
.slide-fade-enter-active {
transition: all 0.5s ease;
}
.you-block {
font-size: 16 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(0, 0, 0, 1);
line-height: 40 * @toVw;
margin-top: 10 * @toVw;
height: 40 * @toVw;
padding: 5 * @toVw 15 * @toVw;
background: white;
img {
max-width: none;
width: 16 * @toVw;
margin-left: 8 * @toVw;
vertical-align: middle;
}
.slide-fade-enter-active {
transition: all 0.5s ease;
.you-content {
float: right;
color: #999999;
font-size: 14 * @toVw;
}
.you-block {
font-size: 16 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(0, 0, 0, 1);
line-height: 40 * @toVw;
margin-top: 10 * @toVw;
height: 40 * @toVw;
padding: 5 * @toVw 15 * @toVw;
background: white;
img {
width: 16 * @toVw;
margin-left: 8 * @toVw;
vertical-align: middle;
}
.orderCancel {
top: 45%;
background: transparent;
.box {
width: 315 * @toVw;
}
.img {
width: 315 * @toVw;
}
.content {
position: absolute;
width: 315 * @toVw;
top: 112 * @toVw;
left: 0;
text-align: center;
h2 {
font-size: 25 * @toVw;
color: #6c6c6c;
}
.you-content {
float: right;
color: #999999;
p {
font-size: 14 * @toVw;
color: #999999;
margin: 20 * @toVw 0 0;
}
}
.orderCancel {
top: 45%;
background: transparent;
.box {
width: 315 * @toVw;
}
.img {
width: 315 * @toVw;
.warn {
font-size: 15 * @toVw;
color: #ec612a;
margin: 10 * @toVw 0 25 * @toVw;
font-weight: bold;
}
.content {
position: absolute;
width: 315 * @toVw;
top: 112 * @toVw;
left: 0;
text-align: center;
h2 {
font-size: 25 * @toVw;
color: #6c6c6c;
}
p {
.btnbox {
display: flex;
.btn {
width: 118 * @toVw;
height: 40 * @toVw;
line-height: 40 * @toVw;
font-size: 14 * @toVw;
color: #999999;
margin: 20 * @toVw 0 0;
}
.warn {
font-size: 15 * @toVw;
color: #ec612a;
margin: 10 * @toVw 0 25 * @toVw;
color: white;
border-radius: 20 * @toVw;
font-weight: bold;
}
.btnbox {
display: flex;
.btn {
width: 118 * @toVw;
height: 40 * @toVw;
line-height: 40 * @toVw;
font-size: 14 * @toVw;
color: white;
border-radius: 20 * @toVw;
font-weight: bold;
}
.fal {
background: #f8d56b;
box-shadow: 0px 4px 0px 0px rgba(239, 147, 70, 0.97);
}
.suc {
background: #ec612a;
box-shadow: 0px 4px 0px 0px rgba(190, 61, 10, 0.97);
}
.fal {
background: #f8d56b;
box-shadow: 0px 4px 0px 0px rgba(239, 147, 70, 0.97);
}
.suc {
background: #ec612a;
box-shadow: 0px 4px 0px 0px rgba(190, 61, 10, 0.97);
}
}
}
}
.slide-fade-leave-active {
transition: all 0.5s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-fade-enter, .slide-fade-leave-to
.slide-fade-leave-active {
transition: all 0.5s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-fade-enter, .slide-fade-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
transform: translateX(10px);
opacity: 0;
}
.phone-block {
padding: 10 * @toVw;
text-align: center;
background: #f8f8f8;
}
.phone-input {
width: 280 * @toVw;
height: 30 * @toVw;
border-radius: 8 * @toVw;
outline: none;
padding: 0 10 * @toVw;
border: 1px solid #e8e8e8;
text-align: center;
}
.block-title {
font-size: 12 * @toVw;
color: #999;
padding: 8 * @toVw 16 * @toVw;
}
.group-buy {
.main-background {
padding: 0 20 * @toVw;
background: white no-repeat;
background-size: 100% auto;
.title-top {
color: white;
font-size: 14 * @toVw;
transform: translateX(10px);
opacity: 0;
}
.phone-block {
padding: 10 * @toVw;
text-align: center;
background: #f8f8f8;
}
.phone-input {
width: 280 * @toVw;
height: 30 * @toVw;
border-radius: 8 * @toVw;
outline: none;
padding: 0 10 * @toVw;
border: 1px solid #e8e8e8;
text-align: center;
}
.block-title {
font-size: 12 * @toVw;
color: #999;
padding: 8 * @toVw 16 * @toVw;
}
.group-buy {
.main-background {
padding: 0 20 * @toVw;
background: white no-repeat;
background-size: 100% auto;
.title-top {
color: white;
font-size: 14 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: rgba(255, 255, 255, 1);
line-height: 60 * @toVw;
span {
vertical-align: middle;
}
img {
width: 20 * @toVw;
vertical-align: middle;
margin-right: 5 * @toVw;
}
}
.user-message {
border-radius: 8 * @toVw;
position: relative;
background: white;
padding: 20 * @toVw 40 * @toVw;
box-shadow: 0 1 * @toVw 20 * @toVw -3 * @toVw rgba(255, 77, 84, 0.2);
margin-bottom: 10 * @toVw;
.icon-left {
width: 10 * @toVw;
position: absolute;
right: 17 * @toVw;
top: 50%;
margin-top: -8 * @toVw;
}
.add-address {
line-height: 50 * @toVw;
text-align: center;
font-size: 16 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: rgba(255, 255, 255, 1);
line-height: 60 * @toVw;
span {
vertical-align: middle;
}
img {
width: 20 * @toVw;
vertical-align: middle;
margin-right: 5 * @toVw;
}
color: #666666;
}
.user-message {
border-radius: 8 * @toVw;
position: relative;
background: white;
padding: 20 * @toVw 40 * @toVw;
box-shadow: 0 1 * @toVw 20 * @toVw -3 * @toVw rgba(255, 77, 84, 0.2);
margin-bottom: 10 * @toVw;
.icon-left {
width: 10 * @toVw;
position: absolute;
right: 17 * @toVw;
top: 50%;
margin-top: -8 * @toVw;
}
.add-address {
line-height: 50 * @toVw;
text-align: center;
.icon-address {
width: 12 * @toVw;
position: absolute;
top: 23 * @toVw;
left: 17 * @toVw;
}
.address-content {
.name {
font-size: 16 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #666666;
}
.icon-address {
width: 12 * @toVw;
position: absolute;
top: 23 * @toVw;
left: 17 * @toVw;
}
.address-content {
.name {
font-size: 16 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: rgba(0, 0, 0, 1);
.mobile {
display: inline-block;
margin-left: 10 * @toVw;
font-size: 14 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(0, 0, 0, 1);
}
}
.address {
font-size: 12 * @toVw;
color: rgba(0, 0, 0, 1);
.mobile {
display: inline-block;
margin-left: 10 * @toVw;
font-size: 14 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(102, 102, 102, 1);
margin-top: 7 * @toVw;
}
}
}
}
background: #f0f0f0;
.shop-block {
background: white;
padding-top: 10 * @toVw;
.shop {
position: relative;
padding-bottom: 20 * @toVw;
&:after {
content: "";
display: block;
clear: both;
}
.img-block {
float: left;
margin-right: 20/7.5vw;
img {
width: 80 * @toVw;
color: rgba(0, 0, 0, 1);
}
}
.title {
font-size: 16 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: rgba(0, 0, 0, 1);
}
.content {
.address {
font-size: 12 * @toVw;
margin-top: 8 * @toVw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(102, 102, 102, 1);
margin-top: 7 * @toVw;
}
.price {
font-size: 16 * @toVw;
margin-top: 15 * @toVw;
}
}
}
background: #f0f0f0;
.shop-block {
background: white;
padding-top: 10 * @toVw;
.shop {
position: relative;
padding-bottom: 20 * @toVw;
&:after {
content: "";
display: block;
clear: both;
}
.img-block {
float: left;
margin-right: 20/7.5vw;
img {
width: 80 * @toVw;
}
}
.title {
font-size: 16 * @toVw;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: rgba(0, 0, 0, 1);
}
.content {
font-size: 12 * @toVw;
margin-top: 8 * @toVw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(102, 102, 102, 1);
}
.price {
font-size: 16 * @toVw;
margin-top: 15 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(248, 78, 78, 1);
.origina {
font-size: 12 * @toVw;
text-decoration: line-through;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(248, 78, 78, 1);
.origina {
font-size: 12 * @toVw;
text-decoration: line-through;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(153, 153, 153, 1);
}
color: rgba(153, 153, 153, 1);
}
}
}
}
.pay-list {
width: 100%;
padding-bottom: 80 * @toVw;
.pay-choice {
padding: 15 * @toVw;
font-size: 13 * @toVw;
color: #666;
box-sizing: border-box;
}
.pay-list {
.pay {
width: 100%;
padding-bottom: 80 * @toVw;
.pay-choice {
padding: 15 * @toVw;
font-size: 13 * @toVw;
color: #666;
li {
position: relative;
padding: 14 * @toVw 14 * @toVw;
box-sizing: border-box;
}
background: #ffffff;
border-bottom: 1px solid #DFDFDF;
img {
width: 28 * @toVw;
height: 28 * @toVw;
vertical-align: middle;
}
span {
padding-left: 7 * @toVw;
font-size: 15 * @toVw;
color: #333333;
vertical-align: middle;
}
.pay {
width: 100%;
li {
position: relative;
padding: 14 * @toVw 14 * @toVw;
box-sizing: border-box;
background: #ffffff;
border-bottom: 1px solid #DFDFDF;
.icon-re {
width: 18 * @toVw;
height: 18 * @toVw;
position: absolute;
top: 19 * @toVw;
right: 21 * @toVw;
img {
width: 28 * @toVw;
height: 28 * @toVw;
vertical-align: middle;
}
span {
padding-left: 7 * @toVw;
font-size: 15 * @toVw;
color: #333333;
vertical-align: middle;
}
.icon-re {
width: 18 * @toVw;
height: 18 * @toVw;
position: absolute;
top: 19 * @toVw;
right: 21 * @toVw;
img {
width: 100%;
height: 100%;
}
}
&:last-child {
border-bottom: none;
width: 100%;
height: 100%;
}
}
&:last-child {
border-bottom: none;
}
}
}
}
}
footer {
position: fixed;
background: white;
bottom: 0;
width: 100%;
.sub-block {
padding-left: 20/7.5vw;
line-height: 60 * @toVw;
height: 60 * @toVw;
.tips-price {
font-size: 12 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(0, 0, 0, 1);
display: inline-block;
vertical-align: middle;
max-width: 125 * @toVw;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
span {
font-size: 22 * @toVw;
color: #f83534;
}
.pay-btn {
width: 300/7.5vw;
text-align: center;
float: right;
height: 60 * @toVw;
background: #f83534;
color: white;
font-size: 16 * @toVw;
footer {
position: fixed;
background: white;
bottom: 0;
width: 100%;
.sub-block {
padding-left: 20/7.5vw;
line-height: 60 * @toVw;
height: 60 * @toVw;
.tips-price {
font-size: 12 * @toVw;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(0, 0, 0, 1);
display: inline-block;
vertical-align: middle;
max-width: 125 * @toVw;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.address-pop {
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
background: white;
span {
font-size: 22 * @toVw;
color: #f83534;
}
.pay-btn {
width: 300/7.5vw;
text-align: center;
float: right;
height: 60 * @toVw;
background: #f83534;
color: white;
font-size: 16 * @toVw;
}
}
.address-pop {
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
background: white;
}
}
</style>
......@@ -384,15 +384,12 @@ export default {
} else {
query.type = "";
}
if (localStorage.getItem("gdt_vid")) {
query.gdt_vid = localStorage.getItem("gdt_vid");
}
if (window.location.href.indexOf("cct_user_id") > -1) {
// console.log(comment.getParamhref())
// console.log(comment.getUrlParam())
query.cct_user_id = comment.getParamhref().cct_user_id;
}
if(window.localStorage.gdt_vid!="undefined"){
json.gdt_vid = window.localStorage.gdt_vid
}
if(window.localStorage.cct_user_id!="undefined"){
json.cct_user_id = window.localStorage.gdt_vid
}
console.log(comment.getParamhref(), 76);
this.$sa.track("buyCourse", {
......@@ -445,13 +442,14 @@ export default {
cct_user_id: localStorage.getItem("cct_user_id"),
redeem_code: localStorage.getItem("redeem_code"),
});
console.log(window.localStorage.gdt_vid);
if(window.localStorage.gdt_vid!="undefined"){
json.gdt_vid = window.localStorage.gdt_vid
}
if(window.localStorage.cct_user_id!="undefined"){
json.cct_user_id = window.localStorage.gdt_vid
}
if(localStorage.getItem("gdt_vid") != 'undefined'){
json.gdt_vid = localStorage.getItem("gdt_vid")
}
if(localStorage.getItem("cct_user_id") != 'undefined'){
json.cct_user_id = localStorage.getItem("cct_user_id")
}
this.orderFlag = false;
payApi(json).then(res=>{
// console.log(res)
......
......@@ -198,19 +198,8 @@
props: ["route", "totalStarNum"],
mounted() {
// 判断星星
this.dataSession = JSON.parse(window.sessionStorage.query)
//console.log(window.sessionStorage.query);
getUserDetailApi()
.then(res => {
console.log(res)
this.avatarActive = res.avatar
this.nicknameActive = res.nickname
localStorage.setItem("userDesc", JSON.stringify(res));
})
.catch(res => {
if (localStorage.getItem("userDesc")) {
}
});
// this.dataSession = JSON.parse(window.sessionStorage.query)
console.log(window.sessionStorage.query);
this.starNum = JSON.parse(localStorage.getItem('lessonDetail')).star_num
console.log(this.starNum)
......@@ -353,28 +342,46 @@
if (this.nickname.length >= 6) {
this.nickname = this.nickname.slice(0, 4) + "...";
}
this.minute = (parseInt(this.dataSession.stay_time) / 60).toFixed();
if (this.minute < 1) {
this.minute = 1;
}
if (this.minute < 8) {
this.imgPoint = good;
this.$store.dispatch("setLookStatus", 0);
if (this.minute < 5) {
this.percent = 75 + Math.floor(49 * Math.random()) / 10;
getUserDetailApi()
.then(res => {
console.log(res, 87878787)
this.avatarActive = res.avatar
this.nicknameActive = res.nickname
localStorage.setItem("userDesc", JSON.stringify(res));
})
.catch(res => {
if (localStorage.getItem("userDesc")) {
}
});
getUserWatchApi().then(res => {
this.dataSession = res
this.minute = (parseInt(this.dataSession.stay_time) / 60).toFixed();
if (this.minute < 1) {
this.minute = 1;
}
if (this.minute < 8) {
this.imgPoint = good;
this.$store.dispatch("setLookStatus", 0);
if (this.minute < 5) {
this.percent = 75 + Math.floor(49 * Math.random()) / 10;
} else {
this.percent = 81 + Math.floor(89 * Math.random()) / 10;
}
} else if (this.minute <= 12) {
this.$store.dispatch("setLookStatus", 1);
this.percent = 91 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = great;
} else {
this.percent = 81 + Math.floor(89 * Math.random()) / 10;
this.$store.dispatch("setLookStatus", 2);
console.log(Math.floor(39 * Math.random()));
this.percent = 96 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = perfect;
}
} else if (this.minute <= 12) {
this.$store.dispatch("setLookStatus", 1);
this.percent = 91 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = great;
} else {
this.$store.dispatch("setLookStatus", 2);
console.log(Math.floor(39 * Math.random()));
this.percent = 96 + Math.floor(39 * Math.random()) / 10;
this.imgPoint = perfect;
}
})
// Toast.clear();
let query = JSON.parse(sessionStorage.getItem("classQuery"));
let obj = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment