ems.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="page" :style="{'min-height':(h)+'px','padding-top':mt+'px'}">
  3. <c-nav-bar title="核销"></c-nav-bar>
  4. <image @click="hexiao" src="https://i.ringzle.com/file/20240317/d5f047e986a04bff9cfbfef2c5dab095.png"></image>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. boatNo:'',
  12. price:''
  13. //merchantType:uni.getStorageSync('merchantType');
  14. }
  15. },
  16. onLoad(opt) {
  17. },
  18. methods: {
  19. hexiao() {
  20. console.log('21321321',)
  21. uni.scanCode({
  22. onlyFromCamera: true,
  23. success: (res) => {
  24. //
  25. if(JSON.parse(res.result).merchantId!=uni.getStorageSync('merchantId')){
  26. uni.showToast({
  27. title:'您的核销码不是该商家的核销码',
  28. icon:'none',
  29. duration:1500
  30. })
  31. }else{
  32. uni.navigateTo({
  33. url: "/pagesHouse/Verification/detailsewm?list=" + res.result
  34. })
  35. }
  36. },
  37. error: (res) => {
  38. console.log('扫描二维码出现错误')
  39. }
  40. })
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped lang="less">
  46. .page{
  47. text-align: center;
  48. box-sizing: border-box;
  49. }
  50. image{
  51. width: 345rpx;
  52. height: 345rpx;
  53. margin: 80rpx 0 24rpx;
  54. }
  55. .tip{
  56. font-size: 32rpx;
  57. color: #111;
  58. text{
  59. margin-right:12rpx;
  60. }
  61. }
  62. .price{
  63. margin: 28rpx 0 110rpx;
  64. text{
  65. &:first-child{
  66. font-size: 36rpx;
  67. }
  68. &:last-child{
  69. font-size: 48rpx;
  70. font-weight: bold;
  71. }
  72. }
  73. }
  74. .btn{
  75. width: 610rpx;
  76. height: 88rpx;
  77. line-height: 88rpx;
  78. background-color: #007A69;
  79. color: #fff;
  80. font-size: 32rpx;
  81. border-radius: 46rpx;
  82. margin: 0 auto;
  83. }
  84. </style>