switchStore.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view>
  3. <view class="yinc" @tap="closeLayer" v-if="storeShow&&!first&&merchant" ></view>
  4. <view class="kjpop" v-if="storeShow&&!first">
  5. <view class="tops">
  6. <image src="/static/pages/images/mengdianxuanze.png"></image>
  7. </view>
  8. <view class="cont">
  9. <text>当前门店:</text>
  10. <view class="title">{{merchant.title}}</view>
  11. <!-- <view class="btn" @tap="closeLayer">我知道了</view> -->
  12. </view>
  13. <view class="bottom dflex">
  14. <view class="botLeft" @tap="switchStore">切换</view>
  15. <view class="botRight" @tap="closeLayer">确认</view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. const req = require("../../utils/request");
  22. const utils = require("../../utils/util");
  23. const app = getApp();
  24. export default {
  25. data() {
  26. return {
  27. };
  28. },
  29. components: {},
  30. props: {
  31. storeShow:Boolean, //门店二次确认, 乡亲小程序开启了
  32. first:Boolean, // 是否第一次进入小程序
  33. merchant:Object //门店
  34. },
  35. options: {
  36. addGlobalClass: true
  37. },
  38. // created(){
  39. // console.log(this.data.merchant)
  40. // req.getRequest('/api/merchant/getMerchantList',{}, res => {
  41. // res = res.filter(it=>it.isDefault==1)
  42. // this.setData({merchant:res[0]})
  43. // })
  44. // },
  45. mounted() {
  46. // console.log(this.storeShow,"123456")
  47. },
  48. methods: {
  49. closeLayer(){
  50. this.$emit('onFather',false)
  51. },
  52. switchStore(){
  53. app.globalData.openPage('merchant/nearby/nearby')
  54. this.$emit('onFather',false)
  55. },
  56. }
  57. };
  58. </script>
  59. <style>
  60. /* @import "./popAd.css"; */
  61. .yinc{
  62. position: fixed;
  63. top: 0;
  64. left: 0;
  65. right: 0;
  66. bottom: 0;
  67. background: rgba(0,0,0,.7);
  68. z-index: 99;
  69. }
  70. </style>