Browse Source

Merge branch 'devlop' of http://git.qniao.cn/qniao/paper-shopkeeper-H5 into devlop

devlop
邓雄飞 4 years ago
parent
commit
8587d6d96c
3 changed files with 29 additions and 20 deletions
  1. 4
      env/index.js
  2. 13
      pages/enquiry-list/index.vue
  3. 32
      pages/vip-center/index.vue

4
env/index.js

@ -1,8 +1,8 @@
/**
* @description 唯一环境变量
*/
const env = 'test'
// const env = 'test'
// const env = 'dev'
// const env = 'production'
const env = 'production'
export default env

13
pages/enquiry-list/index.vue

@ -62,7 +62,7 @@
</template>
<script>
import { go2, back } from '@/utils/hook.js'
import { go2, back, loginGo2 } from '@/utils/hook.js'
import uGap from '@/components/u-gap/u-gap.vue'
import { getEnquiryOrder, createByEnquiry } from '@/apis/enquiryListApi.js'
export default {
@ -110,8 +110,17 @@ export default {
return name
}
},
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
}
},
onShow() {
this.downCallback()
if (this.hasLogin()) {
this.downCallback()
} else {
loginGo2('enquiry-list')
}
},
methods: {
go2,

32
pages/vip-center/index.vue

@ -66,6 +66,22 @@ export default {
wxCode: null
}
},
onLoad() {
let url = window.location.href
let codeIndex = url.indexOf('code=')
if (codeIndex === -1) {
uni.showModal({
title: '提示',
content: '参数错误,请重新打开',
success: (res) => {
back()
}
})
} else {
let endIndex = url.indexOf('&', codeIndex)
this.wxCode = url.substring(codeIndex + 5, endIndex)
}
},
methods: {
back,
payForVip() {
@ -110,22 +126,6 @@ export default {
}, 1000)
}
})
},
onLoad() {
let url = window.location.href
let codeIndex = url.indexOf('code=')
if (codeIndex === -1) {
uni.showModal({
title: '提示',
content: '参数错误,请重新打开',
success: (res) => {
back()
}
})
} else {
let endIndex = url.indexOf('&', codeIndex)
this.wxCode = url.substring(codeIndex + 5, endIndex)
}
}
}
}

Loading…
Cancel
Save