Commit d3131e47 by 李伟康

commit

1 parent e36293c5
......@@ -139,7 +139,6 @@ export default {
},
mounted () {
this.showLoading()
this.getList()
wxConfig.init(['shareAppMessage'])
},
......@@ -147,6 +146,7 @@ export default {
getList () {
let { uuid } = this.getLocalStorage('dj_scrm_userInfo')
let { pageNum, tabIndex, list, name } = this
this.showLoading()
giftApi.getGiftList({
pageNum,
name,
......@@ -169,7 +169,6 @@ export default {
this.clearData()
},
clearData () {
this.showLoading()
this.list = []
this.flag = false
this.pageNum = 1
......@@ -199,17 +198,27 @@ export default {
this.pageNum = pageNum + 1
this.getList()
},
send (e) {
const { shopmall_appid } = window.$fetchConfig
jump ({ id }) {
this.$router.push({ name: 'gift.detail', query: { id } })
},
getMiniParams (e) {
let { merchantId, sapCode } = this.getLocalStorage('dj_scrm_userInfo')
let query = `id=${e.id}&merchantId=${merchantId}`
if (sapCode) query = `${query}&storeCode=${sapCode}`
const { shopmall_appid } = window.$fetchConfig
let scene = `id=${e.id}&merchantId=${merchantId}`
if (sapCode) scene = `${scene}&storeCode=${sapCode}`
this.showLoading('生成中...')
return {
appId: shopmall_appid,
query: scene
}
},
send (e) {
let { query, appId } = this.getMiniParams(e)
wxConfig
.createMiniprogramUrlLink({
path: 'packageEquity/pages/directional/directional',
query,
appId: shopmall_appid
appId
})
.then(link => {
console.log(link)
......@@ -228,22 +237,15 @@ export default {
})
})
},
jump ({ id }) {
this.$router.push({ name: 'gift.detail', query: { id } })
},
createQr (e) {
const { envVersion } = window.$fetchConfig
let { merchantId, sapCode } = this.getLocalStorage('dj_scrm_userInfo')
const { shopmall_appid } = window.$fetchConfig
let scene = `id=${e.id}&merchantId=${merchantId}`
if (sapCode) scene = `${scene}&storeCode=${sapCode}`
this.showLoading('生成中...')
let { query, appId } = this.getMiniParams(e)
// 正式版为:release 体验版为:trial 开发版为:develop
giftApi.createQr({
appId: shopmall_appid,
appId,
path: 'packageEquity/pages/directional/directional',
envVersion,
scene
scene: query
}).then(res => {
this.hideLoading()
this.showQr = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!