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 唯一环境变量 * @description 唯一环境变量
*/ */
const env = 'test'
// const env = 'test'
// const env = 'dev' // const env = 'dev'
// const env = 'production'
const env = 'production'
export default env export default env

13
pages/enquiry-list/index.vue

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

32
pages/vip-center/index.vue

@ -66,6 +66,22 @@ export default {
wxCode: null 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: { methods: {
back, back,
payForVip() { payForVip() {
@ -110,22 +126,6 @@ export default {
}, 1000) }, 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