index.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view v-if="showUserInfoPop">
  3. <view class="ceng"></view>
  4. <view class="update-pop">
  5. <image src="/static/images/editInfo.png" class="update-img"></image>
  6. <view class="update-tip">您的资料未完善,是否完善资料以便我们提供更优质的服务。</view>
  7. <view class="ddflex" style="margin:0 30rpx;">
  8. <button class="update-btn fflex" @click="closeUpdate">取消</button>
  9. <button class="update-btn fflex" style="margin-left: 30rpx !important;" @click="jumpUrl('/mine/userinfo/userinfo')">去完善</button>
  10. </view>
  11. <!-- <image :src="picUrlss+'update_close.png'" class="update-close" @click="closeUpdate"></image> -->
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. const app = getApp();
  17. const req = require("../../utils/request.js");
  18. export default {
  19. data() {
  20. return {
  21. picUrlss: req.public.picUrls,
  22. showUserInfoPop:false
  23. };
  24. },
  25. components: {},
  26. props: {
  27. },
  28. watch: {},
  29. mounted() {
  30. this.getInfo()
  31. },
  32. methods: {
  33. jumpUrl(url){
  34. uni.navigateTo({
  35. url:url
  36. })
  37. this.closeUpdate()
  38. },
  39. getInfo() {
  40. let that = this;
  41. req.getRequest('/api/user/myInfo', {}, data => {
  42. if( data.saleNo) return this.showUserInfoPop = false;
  43. if( !data.avatar) return this.showUserInfoPop = true;
  44. if( !data.nickName) return this.showUserInfoPop = true;
  45. // if( !data.realName) return this.showUserInfoPop = true;
  46. // if( !data.cardNo) return this.showUserInfoPop = true;
  47. if( !data.mobile) return this.showUserInfoPop = true;
  48. // if( !data.birthday) return this.showUserInfoPop = true;
  49. // if (!data.district) return this.showUserInfoPop = true;
  50. // if (!data.areaAdd) return this.showUserInfoPop = true;
  51. });
  52. },
  53. closeUpdate(){
  54. this.showUserInfoPop = false;
  55. this.$emit('closeUpdate',true)
  56. },
  57. }
  58. };
  59. </script>
  60. <style>
  61. @import "./index.css";
  62. </style>