68 lines
1.5 KiB
JavaScript
68 lines
1.5 KiB
JavaScript
const app = new Vue({
|
|
el: "#app",
|
|
data: {
|
|
active: 0,
|
|
info: {},
|
|
btns: [{
|
|
img: './images/blue/rzicon1.png',
|
|
img1: './images/blue/rzicon2.png'
|
|
},
|
|
{
|
|
img: './images/blue/cpicon1.png',
|
|
img1: './images/blue/cpicon2.png'
|
|
},
|
|
{
|
|
img: './images/blue/jcicon1.png',
|
|
img1: './images/blue/jcicon2.png'
|
|
},
|
|
{
|
|
img: './images/blue/syicon1.png',
|
|
img1: './images/blue/syicon2.png'
|
|
},
|
|
{
|
|
img: './images/blue/ppicon1.png',
|
|
img1: './images/blue/ppicon2.png'
|
|
},
|
|
],
|
|
},
|
|
created() {
|
|
},
|
|
mounted() {
|
|
this.reload();
|
|
},
|
|
methods: {
|
|
async reload() {
|
|
var code = 123;
|
|
var url = "https://dev.themblem.com/api/product-info/" + code + "/api/properties";
|
|
url = 'http://localhost:8000/api/product-info/c3170586095/api/properties/';
|
|
var r = await fetch(url);
|
|
var info = await r.json();
|
|
console.log(info);
|
|
this.info = info;
|
|
},
|
|
changeBtn(index) {
|
|
this.active = index
|
|
},
|
|
goDetails(index) {
|
|
location.href = "img_details.html?index=" + index
|
|
},
|
|
goPageZfsy() {
|
|
// location.href=this.zfsy_url
|
|
},
|
|
showImg(e) {
|
|
let url = e.currentTarget.dataset.url
|
|
vant.ImagePreview({
|
|
images: [url],
|
|
startPosition: 0
|
|
});
|
|
},
|
|
previewReport() {
|
|
let reports = this.reports
|
|
vant.ImagePreview({
|
|
images: reports,
|
|
startPosition: 0
|
|
});
|
|
},
|
|
}
|
|
})
|