auth.vue 790 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="">
  3. <web-view :src="src"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: '',
  9. data() {
  10. return {
  11. src: ''
  12. };
  13. },
  14. onLoad(options) {
  15. this.queryCmccPoint(options.mobile)
  16. },
  17. methods: {
  18. //查询移动积分
  19. async queryCmccPoint(mobile) {
  20. let params = {
  21. mobile
  22. }
  23. let res = (await this.$api.CMCC.queryCmccPoint(this.$u.queryParams(params))).data.data
  24. if (res.resultCode == '0001') {
  25. //跳转到移动授权页
  26. this.src = res.data
  27. this.$forceUpdate()
  28. } else if (res.resultCode == '0000') {
  29. //授权成功
  30. let data = JSON.parse(res.data)
  31. console.log(data);
  32. } else {
  33. console.log("授权失败");
  34. }
  35. },
  36. }
  37. };
  38. </script>
  39. <style lang="scss" scoped>
  40. </style>