Commit d01c5911 by hank

bug

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