Commit d01c5911 by hank

bug

parent be9fb9bb
......@@ -86,7 +86,7 @@ export default {
created() {
let id = this.$route.query.id;
this.currentId = id;
// this.getPiceureDetail(id);
this.getPiceureDetail(id);
// this.getActiveInfo();
// this.hiddenBar();
......@@ -116,12 +116,7 @@ export default {
this.kongtuLock = false;
let id = this.$route.query.id;
window.wx.miniProgram.getEnv(function (res) {
if (res.miniprogram) {
// todo
window.wx.miniProgram.postMessage({data: {id: id, page: 'detail'}}); // 传的参数
}
})
this.currentId = id;
this.getPiceureDetail(id);
......@@ -143,6 +138,12 @@ export default {
: `${noSharp}?shareId=${id}`;
// alert('this.url');
// alert(this.url);
window.wx.miniProgram.getEnv(function (res) {
if (res.miniprogram) {
// todo
window.wx.miniProgram.postMessage({data: {id: id, page: 'detail'}}); // 传的参数
}
})
},
......@@ -352,6 +353,7 @@ export default {
});
},
getCanvasDrawImage(imgUrl) {
try {
var _this = this
var canvas = document.createElement('canvas')
canvas.width = '960'
......@@ -375,6 +377,9 @@ export default {
// document.body.appendChild(canvas)
}
} catch(err) {
alert(err)
}
},
share() {
var _this = this
......
......@@ -40,14 +40,14 @@ export default {
this.getWeixinPower();
},
activated() {
axios.post('/weixin/getcode', {
scene: '999999999',
pages: 'pages/upload/upload'
}).then(res => {
if(res.data.data.weixinCode) {
this.img = res.data.data.weixinCode
}
})
// axios.post('/weixin/getcode', {
// scene: '999999999',
// pages: 'pages/upload/upload'
// }).then(res => {
// if(res.data.data.weixinCode) {
// this.img = res.data.data.weixinCode
// }
// })
},
created() {
var vm = this;
......@@ -149,7 +149,7 @@ body {
left: 0;
right: 0;
bottom: 0;
display: flex;
// display: flex;
align-items: center;
img {
width: 45vw;
......
......@@ -56,7 +56,7 @@ export default {
company: '',
userId: '',
alertOnoff: false,
area: '请选择-请选择-请选择',
area: '',
popupVisible: false,
slots: [
{
......@@ -85,7 +85,7 @@ export default {
textAlign: 'center'
}
],
address: ['请选择', '请选择', '请选择'],
addressTemp: ['请选择', '请选择', '请选择'],
address1: '',
};
},
......@@ -166,11 +166,11 @@ export default {
},
showPopupVisible() {
if(this.area) {
this.address = JSON.parse(JSON.stringify(this.area)).split('-')
this.addressTemp = JSON.parse(JSON.stringify(this.area)).split('-')
let index , index2, index3
index = this.getIndex( citys.provinceList, 'name', this.address[0])
index2 = this.getIndex( citys.provinceList[index].childs, 'name', this.address[1])
index3 = this.getIndex( citys.provinceList[index].childs[index2].childs, 'name', this.address[2])
index = this.getIndex( citys.provinceList, 'name', this.addressTemp[0])
index2 = this.getIndex( citys.provinceList[index].childs, 'name', this.addressTemp[1])
index3 = this.getIndex( citys.provinceList[index].childs[index2].childs, 'name', this.addressTemp[2])
console.log(index , index2, index3 , citys.provinceList[index].childs[index2].childs, 'aaaa')
this.slots[0].defaultIndex = index
this.slots[2].defaultIndex = index2
......@@ -186,7 +186,10 @@ export default {
this.address3 = this.address3.map(item => {
return item.name
})
if(this.address3.join('-' !== '')) {
if(this.address3.length && this.address3.includes('请选择')) {
return
}
if(this.address3.join('-') !== '' && this.address3.join('-') !== '--' ) {
this.area = this.address3.join('-')
}
this.popupVisible = false;
......
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 sign in to comment