ems.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. console.log('扫描二维码成功,结果:' + JSON.parse(res.result).merchantId,);
  26. console.log(uni.getStorageSync('merchantId'))
  27. if(JSON.parse(res.result).merchantId!=uni.getStorageSync('merchantId')){
  28. uni.showToast({
  29. title:'您的核销码不是该商家的核销码',
  30. icon:'none',
  31. duration:1500
  32. })
  33. }else{
  34. uni.navigateTo({
  35. url: "/pagesHouse/Verification/detailsewm?list=" + res.result
  36. })
  37. }
  38. },
  39. error: (res) => {
  40. console.log('扫描二维码出现错误')
  41. }
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style scoped lang="less">
  48. .page{
  49. text-align: center;
  50. box-sizing: border-box;
  51. }
  52. image{
  53. width: 345rpx;
  54. height: 345rpx;
  55. margin: 80rpx 0 24rpx;
  56. }
  57. .tip{
  58. font-size: 32rpx;
  59. color: #111;
  60. text{
  61. margin-right:12rpx;
  62. }
  63. }
  64. .price{
  65. margin: 28rpx 0 110rpx;
  66. text{
  67. &:first-child{
  68. font-size: 36rpx;
  69. }
  70. &:last-child{
  71. font-size: 48rpx;
  72. font-weight: bold;
  73. }
  74. }
  75. }
  76. .btn{
  77. width: 610rpx;
  78. height: 88rpx;
  79. line-height: 88rpx;
  80. background-color: #007A69;
  81. color: #fff;
  82. font-size: 32rpx;
  83. border-radius: 46rpx;
  84. margin: 0 auto;
  85. }
  86. </style>