Commit a66cc77f by 李伟康

删除多余代码

1 parent 1d71e4eb
...@@ -11,12 +11,7 @@ export default { ...@@ -11,12 +11,7 @@ export default {
methods: { methods: {
wxInit () { wxInit () {
let _this = this let _this = this
wxConfig.init(['getContext', 'shareAppMessage', 'sendChatMessage', 'shareToExternalMoments']).then(() => { wxConfig.init(['getContext', 'shareAppMessage', 'shareToExternalMoments'])
wxConfig.getContext().then(({ entry }) => {
_this.$parent.entry = entry
_this.entry = entry
})
})
}, },
shareToExternalMoments (i) { shareToExternalMoments (i) {
this.sendMessage(i, true) this.sendMessage(i, true)
...@@ -65,8 +60,7 @@ export default { ...@@ -65,8 +60,7 @@ export default {
desc: description || '', desc: description || '',
imgUrl: titleUrl || imgUrl imgUrl: titleUrl || imgUrl
} }
if (entry != 'normal') this.sendChatMessage(params, { id, merchantId, uuid }) this.shareAppMessage(params, { id, merchantId, uuid })
else this.shareAppMessage(params, { id, merchantId, uuid })
} }
}) })
}, },
...@@ -78,22 +72,6 @@ export default { ...@@ -78,22 +72,6 @@ export default {
staffUuid: uuid 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) { shareAppMessage (params, sendParams) {
wxConfig wxConfig
.shareAppMessage(params) .shareAppMessage(params)
...@@ -104,13 +82,6 @@ export default { ...@@ -104,13 +82,6 @@ export default {
.catch(() => { .catch(() => {
this.hideLoading() 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!