showmp_debug.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="container">
  3. <!-- <view class="bg-image" style=""></view> -->
  4. <!-- <view class="bg-image" style="background-image: url({{bgImageUrl}});"></view> -->
  5. <uni-popup ref="popup" :is-mask-click="false" type="message" background-color="#ffffff" style="border-radius: 10px;">
  6. <view class="message-box" style="z-index: 1001;">
  7. <view class="message-title">用电发起成功</view>
  8. <view class="message-content">请前往【用电小助理】用电中心查看详细支付记录。</view>
  9. <!-- 微信环境 -->
  10. <!-- #ifdef MP-WEIXIN -->
  11. <view style="display: grid;width: 100%;">
  12. <button size="mini" v-if="is_automobile" @click="launchWeapp" class="weapp-btn">立即前往</button>
  13. <button size="mini" @click="gotoLocation" class="weapp-btn m">我知道了</button>
  14. </view>
  15. <!-- #endif -->
  16. <!-- 非微信环境 -->
  17. <!-- #ifdef H5 -->
  18. <view style="display: grid;width: 100%;">
  19. <button size="mini" @click="serviceStatus" class="weapp-btn">立即前往</button>
  20. <button size="mini" @click="gotoLocation" class="weapp-btn m">我知道了</button>
  21. <!-- <navigator url="/pages/service_status/service_status?type=1">立即前往</navigator>
  22. <view @click="gotoLocation">我知道了</view> -->
  23. </view>
  24. <!-- #endif -->
  25. </view>
  26. </uni-popup>
  27. <view class="icon-area">
  28. <uni-icons color="#0586ff" type="checkbox-filled" size="60"></uni-icons>
  29. <text>支付成功</text>
  30. </view>
  31. <uni-card class="order-info">
  32. <view class="order-item">
  33. <text>订单金额:</text>
  34. <text>1{{count}}</text>
  35. </view>
  36. <view class="order-item">
  37. <text>设备编号:</text>
  38. <text>{{sn}}</text>
  39. </view>
  40. </uni-card>
  41. <view v-if="orderFlag == 0">
  42. <button @click="checkOrder">刷新订单状态</button>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. data() {
  49. return {
  50. // bgImageUrl: this.$_W['config']['oss']['url'] + '/common/index/bgimage.png',
  51. count: '', // 订单金额
  52. sn: '', // 设备编号
  53. //useragent: this.$_W['useragent'], // 用户代理
  54. is_automobile: false, // 是否是汽车
  55. orderFlag: 0, // 订单标志
  56. };
  57. },
  58. onReady() {
  59. this.$refs.popup.open('center')
  60. },
  61. methods: {
  62. checkOrder() {
  63. // AJAX请求检查订单状态
  64. uni.request({
  65. url:config.baseUrl+''
  66. })
  67. },
  68. launchWeapp() {
  69. // 微信小程序跳转逻辑
  70. uni.navigateTo({
  71. url: '/pages/sevice_status/sevice_status'
  72. })
  73. // uni.request({
  74. // url:config.baseUrl+'app/index.php?i=1&j=1&c=auth&a=usercenter&do=service_status&type=1'
  75. // })
  76. },
  77. gotoLocation() {
  78. // 跳转逻辑
  79. this.$refs.popup.close('center')
  80. },
  81. serviceStatus(){
  82. uni.navigateTo({
  83. url:'/pages/sevice_status/sevice_status'
  84. })
  85. }
  86. },
  87. };
  88. </script>
  89. <style>
  90. .container {
  91. display: flex;
  92. flex-direction: column;
  93. width: 100vw;
  94. background-color: #ffffff;
  95. justify-content: flex-start;
  96. align-items: center;
  97. }
  98. .message-title {
  99. font-size: 20px;
  100. font-weight: 700;
  101. }
  102. .message-content {
  103. font-size: 13px;
  104. }
  105. .bg-image {
  106. width: 100%;
  107. height: 100%;
  108. background-size: cover;
  109. background-position: center;
  110. }
  111. .message-box {
  112. width: 50vw;
  113. background-color: #ffffff;
  114. display: flex;
  115. flex-direction: column;
  116. align-items: center;
  117. padding: 20px;
  118. border-radius: 10px;
  119. }
  120. /* .overlay {
  121. position: fixed;
  122. top: 0;
  123. right: 0;
  124. width: 100%;
  125. height: 100%;
  126. background-color: rgba(0, 0, 0, 0.4);
  127. z-index: 999;
  128. } */
  129. .icon-area {
  130. margin-top: 48px;
  131. display: grid;
  132. }
  133. .order-info {
  134. padding: 20px;
  135. background: white;
  136. border-radius: 3px;
  137. width: 90%;
  138. display: grid;
  139. justify-items: start;
  140. }
  141. .order-item {
  142. width: 75vw;
  143. margin: 10px 20px;
  144. display: flex;
  145. flex-direction: row;
  146. justify-content: space-between;
  147. border-bottom: 1px dotted black;
  148. }
  149. .weapp-btn {
  150. margin: 10px;
  151. border-radius: 8px;
  152. background: #0687ff;
  153. color: black;
  154. }
  155. .m {
  156. background-color: aqua;
  157. }
  158. </style>