paySuccess.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="Body">
  3. <image src="/static/login/logo1.png" mode=""></image>
  4. <button type="primary" @click="goBack()">返回宜格服务APP</button>
  5. <!-- <a href="ygfwUrlSchemes://">返回宜格服务APP</a> -->
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. orderNo: "",
  13. error: {}
  14. }
  15. },
  16. onLoad(options) {
  17. if (options.orderNo) {
  18. this.orderNo = options.orderNo
  19. } else {
  20. uni.showToast({
  21. icon: "none",
  22. title: "参数缺失!",
  23. duration: 2000
  24. });
  25. }
  26. },
  27. methods: {
  28. goBack() {
  29. this.isIos = uni.getSystemInfoSync().platform //判断是否安卓、ios
  30. if (this.isIos == 'android') {
  31. // let ifr = document.createElement("iframe");
  32. // ifr.src =
  33. // "ygfwUrlSchemes://"; // 这里的hbuilder在manifest.json中配置->“App常用其它设置” -> “Android设置” -> “UrlSchemes” 项中进行设置
  34. // ifr.style.display = "none";
  35. // document.body.appendChild(ifr);
  36. window.location = "ygfwUrlSchemes://&orderNo=" + this.orderNo;
  37. } else {
  38. window.location = "https://yigeapp.songlanyun.com"
  39. // window.open("https://apps.apple.com/cn/app/nano-health/id1615496457");
  40. // window.location="https://appstore.nanomirai.com"
  41. // window.location = "https://yigeapp.songlanyun.com/ygfw/" //你的苹果应用app链接
  42. // plus.runtime.launchApplication({
  43. // action: "ygfy://?callback=interapp-callback=123&merchantKey=SG23323424EXS3"
  44. // }, function(e) {
  45. // uni.showToast({
  46. // icon: "none",
  47. // title: e.message
  48. // })
  49. // console.log("Open system default browser failed: " + e.message)
  50. // });
  51. }
  52. // window.location ="ygfwUrlSchemes://";
  53. // this.error='aaa'
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .Body {
  60. padding-top: 300rpx;
  61. text-align: center;
  62. image {
  63. width: 200rpx;
  64. height: 200rpx;
  65. }
  66. button {
  67. width: 80%;
  68. margin: 200rpx auto 0;
  69. // background: rgb(107,228,247);
  70. }
  71. }
  72. </style>