app-my-app.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="app-view">
  3. <view class="app-my-app point-box"
  4. v-if='is_add_show'
  5. :style="{'background-color':setting.add_app_bg_color,
  6. 'opacity':setting.add_app_bg_transparency / 100,
  7. 'border-radius': setting.add_app_bg_radius + `rpx`}"
  8. >
  9. <view class='triangle'
  10. :style="{'border-bottom':'16rpx solid ' + setting.add_app_bg_color,'opacity': setting.add_app_bg_transparency / 100}"
  11. ></view>
  12. <view class='dir-left-nowrap cross-center'>
  13. <image @click='close'
  14. v-if='setting.add_app_icon_color_type == 1'
  15. class='icon-fork'
  16. src='/static/image/icon/fork_white.png'
  17. ></image>
  18. <image @click='close'
  19. v-else-if='setting.add_app_icon_color_type == 2'
  20. class='icon-fork'
  21. src='/static/image/icon/fork_black.png'
  22. ></image>
  23. <view class='cross-center point-text'
  24. :style="{'color':setting.add_app_text_color}">
  25. {{setting.add_app_text}}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { mapState } from "vuex";
  33. export default {
  34. name: "app-my-app",
  35. data() {
  36. return {
  37. is_add_show: false,
  38. }
  39. },
  40. computed: {
  41. ...mapState('mallConfig', {
  42. setting: state => state.mall.setting
  43. }),
  44. },
  45. methods: {
  46. close: function () {
  47. this.is_add_show = false;
  48. this.$storage.setStorageSync('_IS_ADD_APP', !this.is_add_show);
  49. }
  50. },
  51. created() {
  52. this.is_add_show = !this.$storage.getStorageSync('_IS_ADD_APP');
  53. }
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .point-box {
  58. position: fixed;
  59. z-index: 9999;
  60. top: 16#{rpx};
  61. right: 24#{rpx};
  62. height: 72#{rpx};
  63. .triangle {
  64. width: 0;
  65. height: 0;
  66. border-right: 16#{rpx} solid transparent;
  67. border-left: 16#{rpx} solid transparent;
  68. position: absolute;
  69. top: -15#{rpx};
  70. right: 114#{rpx};
  71. }
  72. .icon-fork {
  73. width: 72#{rpx};
  74. height: 72#{rpx};
  75. }
  76. .point-text {
  77. margin: 0 28#{rpx};
  78. font-size: $uni-font-size-general-one;
  79. }
  80. }
  81. </style>