editionIntro.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="edition-intro">
  3. <image src="https://gxsz-bucket-01.obs.cn-south-1.myhuaweicloud.com/ce174971e4874053822c52edb403c685.png" class="logo" />
  4. <h1> {{config.name}}</h1>
  5. <view class='version'>
  6. <!-- #ifdef APP-PLUS -->
  7. Version {{localVersion.version}}
  8. <!-- #endif -->
  9. </view>
  10. <!-- {{localVersion}} -->
  11. <u-cell-group class="cell" :border="false">
  12. <!-- #ifdef APP-PLUS -->
  13. <u-cell-item v-if="IosWhether" @click="checkStar" title="去评分"></u-cell-item>
  14. <u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
  15. <u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
  16. <!-- #endif -->
  17. <u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
  18. <u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
  19. <u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
  20. <u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
  21. </u-cell-group>
  22. <view class="intro">
  23. <view>客服热线:020-34152794</view>
  24. <view style="margin:20rpx 0 0 0;">客服邮箱:defu@nanyue6688.com</view>
  25. <view>
  26. <view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">《南粤商城用户协议》</view>
  27. <view>CopyRight @{{config.name}} </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import APPUpdate from "@/plugins/APPUpdate";
  34. import config from "@/config/config";
  35. import { getAppVersion } from "@/api/message.js";
  36. export default {
  37. data() {
  38. return {
  39. config,
  40. IosWhether: false, //是否是ios
  41. editionHistory: [], //版本历史
  42. versionData: {}, //版本信息
  43. localVersion: "", //当前版本信息
  44. params: {
  45. pageNumber: 1,
  46. pageSize: 5,
  47. },
  48. };
  49. },
  50. onLoad() {
  51. const platform = uni.getSystemInfoSync().platform;
  52. /**
  53. * 获取是否是安卓
  54. */
  55. if (platform === "android") {
  56. this.params.type = 0;
  57. } else {
  58. this.IosWhether = true;
  59. this.params.type = 1;
  60. }
  61. this.getVersion(platform);
  62. plus.runtime.getProperty(plus.runtime.appid, (inf) => {
  63. this.localVersion = {
  64. versionCode: inf.version.replace(/\./g, ""),
  65. version: inf.version,
  66. };
  67. });
  68. },
  69. methods: {
  70. async getVersion(platform) {
  71. let type;
  72. platform == "android" ? (type = "ANDROID") : (type = "IOS");
  73. let res = await getAppVersion(type);
  74. if (res.data.success) {
  75. this.versionData = res.data.result;
  76. }
  77. },
  78. navigateTo(url) {
  79. uni.navigateTo({
  80. url,
  81. });
  82. },
  83. /**
  84. * ios点击评分
  85. */
  86. checkStar() {
  87. plus.runtime.launchApplication({
  88. action: `itms-apps://itunes.apple.com/app/${config.iosAppId}?action=write-review`,
  89. });
  90. },
  91. /**
  92. * 检查更新
  93. */
  94. checkUpdate() {
  95. if (
  96. this.versionData.version.replace(/\./g, "") <
  97. this.localVersion.versionCode
  98. ) {
  99. APPUpdate();
  100. } else {
  101. uni.showToast({
  102. title: "当前版本已是最新版",
  103. duration: 2000,
  104. icon: "none",
  105. });
  106. }
  107. },
  108. },
  109. };
  110. </script>
  111. <style lang="scss" scoped>
  112. page {
  113. background: #fff !important;
  114. }
  115. .cell {
  116. width: 90%;
  117. margin: 0 auto;
  118. }
  119. .edition-intro {
  120. min-height: 100vh;
  121. background: #fff;
  122. display: flex;
  123. flex-direction: column;
  124. justify-content: center;
  125. align-items: center;
  126. > h1 {
  127. margin: 20rpx 0 20rpx 0;
  128. letter-spacing: 2rpx;
  129. }
  130. > .version {
  131. font-size: 30rpx;
  132. margin-bottom: 100rpx;
  133. }
  134. }
  135. .intro {
  136. margin-top: 100rpx;
  137. font-size: 24rpx;
  138. letter-spacing: 2rpx;
  139. }
  140. .logo {
  141. width: 200rpx;
  142. height: 200rpx;
  143. }
  144. </style>