Commit a66cc77f by 李伟康

删除多余代码

1 parent 1d71e4eb
......@@ -11,12 +11,7 @@ export default {
methods: {
wxInit () {
let _this = this
wxConfig.init(['getContext', 'shareAppMessage', 'sendChatMessage', 'shareToExternalMoments']).then(() => {
wxConfig.getContext().then(({ entry }) => {
_this.$parent.entry = entry
_this.entry = entry
})
})
wxConfig.init(['getContext', 'shareAppMessage', 'shareToExternalMoments'])
},
shareToExternalMoments (i) {
this.sendMessage(i, true)
......@@ -65,8 +60,7 @@ export default {
desc: description || '',
imgUrl: titleUrl || imgUrl
}
if (entry != 'normal') this.sendChatMessage(params, { id, merchantId, uuid })
else this.shareAppMessage(params, { id, merchantId, uuid })
this.shareAppMessage(params, { id, merchantId, uuid })
}
})
},
......@@ -78,22 +72,6 @@ export default {
staffUuid: uuid
})
},
sendChatMessage (params, sendParams) {
wxConfig
.sendChatMessage({
msgtype,
news: params,
enterChat: false
})
.then(res => {
this.hideLoading()
this.sendReadBuriedPoint(sendParams)
})
.catch(err => {
console.log(err)
this.hideLoading()
})
},
shareAppMessage (params, sendParams) {
wxConfig
.shareAppMessage(params)
......@@ -104,13 +82,6 @@ export default {
.catch(() => {
this.hideLoading()
})
},
toUnicode (chineseStr = '') {
let unicodeStr = ''
for (let i = 0, iLength = chineseStr.length; i < iLength; i++) {
unicodeStr += '@' + chineseStr.charCodeAt(i).toString(16)
}
return unicodeStr
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!