Commit ddc1e70c by xinla

--no commit message

1 parent 478f4d8c
...@@ -48,18 +48,22 @@ export default { ...@@ -48,18 +48,22 @@ export default {
getWxCode().then((openId) => { getWxCode().then((openId) => {
if (openId) { if (openId) {
this.openId = openId this.openId = openId
this.getRedPacketInfo()
} else { } else {
this.$toast.clear() this.$toast('授权异常,请刷新重试')
} }
}) })
}, },
getRedPacketInfo() { getRedPacketInfo() {
getRedPacketInfo(form).then(({ data }) => { getRedPacketInfo().then(({ data }) => {
Object.assign(this.redPacket, data) this.redPacket = data
this.$toast.clear() this.$toast.clear()
}) })
}, },
receive() { receive() {
if (!this.openId) {
return
}
this.$toast.loading({ this.$toast.loading({
duration: 0, duration: 0,
forbidClick: true, forbidClick: true,
...@@ -67,7 +71,7 @@ export default { ...@@ -67,7 +71,7 @@ export default {
let query = param2Obj(window.location.search) let query = param2Obj(window.location.search)
let hash = param2Obj(window.location.hash) let hash = param2Obj(window.location.hash)
Object.assign(query, hash) Object.assign(query, hash)
this.redPacket = query Object.assign(this.redPacket, query)
let form = { let form = {
orderNo: query.orderId, // 订单id orderNo: query.orderId, // 订单id
openId: this.openId, // 客户公众号id openId: this.openId, // 客户公众号id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!