Commit d3131e47 by 李伟康

commit

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