index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="page" :style="{'min-height':(h-th)+'px'}">
  3. <c-nav-bar title="核销"></c-nav-bar>
  4. <view class="content">
  5. <view class="content-one" @click="SweepIt">
  6. <view class="image">
  7. <image src="https://i.ringzle.com/file/20240224/f7c81755b4f74f47b80c53ba4e6b051a.png" mode="">
  8. </image>
  9. </view>
  10. <view class="text">
  11. 扫一扫核销
  12. </view>
  13. </view>
  14. <view class="content-two" @click="handiwork">
  15. <view class="image">
  16. <image src="https://i.ringzle.com/file/20240224/49af25724572427fadff57f73a29d15b.png" mode="">
  17. </image>
  18. </view>
  19. <view class="text">
  20. 手工核销
  21. </view>
  22. </view>
  23. </view>
  24. <Tabbares :tabbarid="1"></Tabbares>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. h: uni.getSystemInfoSync().windowHeight - 87,
  32. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  33. }
  34. },
  35. methods: {
  36. // 扫码
  37. SweepIt() {
  38. // this.$showToast('正在开发中...');
  39. uni.scanCode({
  40. onlyFromCamera: true,
  41. success: (res) => {
  42. console.log('扫描二维码成功,结果:' + res.result);
  43. this.$api.get('/merchant/merchantFisherman/home/getDetails?writeOffCode=' + res.result)
  44. .then(res => {
  45. if (res.data.code == 0) {
  46. this.value = ''
  47. uni.setStorageSync('list', res.data.data);
  48. uni.navigateTo({
  49. url: '/pagesHouse/Verification/details'
  50. })
  51. } else {
  52. this.value = ''
  53. this.$showToast(res.data.msg)
  54. }
  55. })
  56. },
  57. error: (res) => {
  58. console.log('扫描二维码出现错误')
  59. }
  60. })
  61. },
  62. // 手工
  63. handiwork() {
  64. uni.navigateTo({
  65. url: '/pagesHouse/Verification/handiwork'
  66. })
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="less">
  72. * {
  73. margin: 0;
  74. padding: 0;
  75. box-sizing: border-box
  76. }
  77. .page {
  78. height: 100%;
  79. background-color: #FFFFFF;
  80. .content {
  81. // height: 100%;
  82. // line-height: 100%;
  83. // padding: 40rpx auto;
  84. margin: 34% 64rpx;
  85. display: flex;
  86. flex-wrap: wrap;
  87. .content-one,
  88. .content-two {
  89. box-sizing: border-box;
  90. width: 100%;
  91. height: 224rpx;
  92. background-color: #F0F8F6;
  93. padding: 40rpx 0;
  94. margin-top: 60rpx;
  95. border-radius: 24rpx;
  96. .image {
  97. width: 88rpx;
  98. height: 88rpx;
  99. margin: auto;
  100. image {
  101. width: 100%;
  102. height: 100%;
  103. }
  104. }
  105. .text {
  106. margin-top: 24rpx;
  107. text-align: center;
  108. font-size: 32rpx;
  109. color: #111111;
  110. font-weight: Regular;
  111. }
  112. }
  113. }
  114. }
  115. </style>