forget.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <app-layout>
  3. <view class="bd-forget" >
  4. <view class="bd-image">
  5. <image class="bd-img" src="./image/forget.png"/>
  6. <view class="bd-text">请联系平台客服修改</view>
  7. </view>
  8. <view class="bd-wechat">
  9. <view class="bd-border">
  10. <view class="border-title">客服微信</view>
  11. <image class="bd-img-wechat" :src="detail.qrcode_url"/>
  12. <view v-if="detail.name" class="bd-name">微信号:{{detail.name}}</view>
  13. <view class="bd-btns main-center cross-center">
  14. <view class="bd-btn" @click="saveImg">保存客服二维码图片</view>
  15. <view class="bd-btn" v-if="detail.name" @click="saveName">复制客服微信号</view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </app-layout>
  21. </template>
  22. <script>
  23. import { mapGetters, mapState } from "vuex";
  24. export default {
  25. name: "forget",
  26. data() {
  27. return {
  28. detail: null
  29. }
  30. },
  31. computed: {
  32. ...mapState({
  33. mall: state => state.mallConfig.mall
  34. }),
  35. },
  36. onLoad() {
  37. this.detail = this.mall.setting.current_customer_service;
  38. },
  39. methods: {
  40. saveImg() {
  41. this.$utils.batchSave(this.detail.qrcode_url, 'image').then(() => {
  42. uni.showToast({title: '保存成功'});
  43. });
  44. },
  45. saveName() {
  46. this.$utils.uniCopy({
  47. data: this.detail.name,
  48. success() {
  49. uni.showToast({
  50. icon: 'none',
  51. title: '微信客服复制成功'
  52. });
  53. }
  54. });
  55. }
  56. }
  57. }
  58. </script>
  59. <style scoped lang="scss">
  60. .bd-image {
  61. width: 750upx;
  62. height: 460upx;
  63. background: #ffffff;
  64. }
  65. .bd-img {
  66. width:335upx;
  67. height: 200upx;
  68. margin: 100upx 207.5upx 0 207.5upx;
  69. }
  70. .bd-wechat {
  71. padding: 70upx 40upx;
  72. width:750upx;
  73. }
  74. .bd-text {
  75. font-size: 35upx;
  76. font-weight: bold;
  77. color: #333333;
  78. text-align: center;
  79. margin-top:50upx;
  80. }
  81. .bd-border {
  82. border: 1upx dashed #999999;
  83. background: #ffffff;
  84. border-radius: 15upx;
  85. position: relative;
  86. height: 650upx;
  87. }
  88. .border-title {
  89. height: 80upx;
  90. line-height: 80upx;
  91. text-align: center;
  92. width: 240upx;
  93. color: #353535;
  94. font-size: 35upx;
  95. border: 1upx dashed #999999;
  96. background: #ffffff;
  97. border-radius: 15upx;
  98. position: absolute;
  99. top: 0;
  100. transform: translate(-50%, -50%);
  101. left: 50%;
  102. }
  103. .bd-img-wechat {
  104. width: 360upx;
  105. height:360upx;
  106. margin:90upx 155upx 25upx 155upx;
  107. }
  108. .bd-name {
  109. font-size:26upx;
  110. color: #999999;
  111. text-align: center;
  112. }
  113. .bd-btns {
  114. padding: 24upx 0;
  115. }
  116. .bd-btn {
  117. width:264upx;
  118. height:64upx;
  119. border: 1upx solid #ff4544;
  120. border-radius: 32upx;
  121. color: #ff4544;
  122. font-size:24upx;
  123. line-height: 64upx;
  124. text-align: center;
  125. margin: 0 40upx;
  126. }
  127. </style>