xieyi.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <!-- 基础设置组 -->
  5. <view class="item" v-for="(item,index) in basicSettings" :key="index" @click="goWeb(item.path, item.name)">
  6. <view class="item-left">
  7. <image class="icon" :src="item.icon" mode="widthFix"></image>
  8. <text>{{item.name}}</text>
  9. </view>
  10. <view class="item-right">
  11. <switch v-if="item.switch == 1" checked color="#FFCC33" style="transform:scale(0.7)" />
  12. <image v-else class="arrow" src="../../static/me/arrow_right_gray.png" mode="widthFix"></image>
  13. </view>
  14. </view>
  15. </view>
  16. <DialogBox ref="DialogBox"></DialogBox>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. components: {},
  22. data() {
  23. return {
  24. title: '',
  25. sel: 1,
  26. myinfo: {},
  27. version: '',
  28. basicSettings: [{
  29. 'name': '隐私政策',
  30. 'desc': '',
  31. 'path': 'https://e.zhichao.art/web/yszc.php',
  32. 'icon': '../../static/me/security.png'
  33. },
  34. {
  35. 'name': '用户协议',
  36. 'desc': '',
  37. 'path': 'https://e.zhichao.art/web/yhxy.php',
  38. 'icon': '../../static/me/profile.png'
  39. }
  40. ],
  41. }
  42. },
  43. onLoad() {
  44. // this.getAppVersion()
  45. },
  46. onShow() {
  47. // this.loadData();
  48. },
  49. methods: {
  50. goWeb(url, title) {
  51. uni.navigateTo({
  52. url: `/pages/webview/index?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title) }`
  53. })
  54. },
  55. onBack() {},
  56. chkSel() {
  57. if (this.sel == 1) {
  58. this.sel = 0;
  59. } else {
  60. this.sel = 1;
  61. }
  62. },
  63. goPage(page) {
  64. if (page == 'delete') {
  65. this.DelMem();
  66. } else if (page == 'yszc') {
  67. // #ifdef APP-PLUS
  68. plus.runtime.openURL('https://e.zhichao.art/web/yszc.php') // plus.runtime.openWeb(href);
  69. // #endif
  70. // #ifdef H5
  71. window.open('https://e.zhichao.art/web/yszc.php')
  72. // #endif
  73. } else if (page == 'kefu') {
  74. let that = this;
  75. // #ifdef APP-PLUS
  76. plus.share.getServices(res => {
  77. const wechat = res.find(i => i.id === 'weixin')
  78. if (wechat) {
  79. wechat.openCustomerServiceChat({
  80. corpid: 'wwbc06aa8311b6ac08',
  81. // url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
  82. url: that.myinfo.wxkf
  83. }, src => {
  84. console.log("success:")
  85. }, err => {
  86. console.log("error:")
  87. })
  88. } else {
  89. uni.showToast({
  90. title: '没有检测到微信,请先安装',
  91. icon: "error"
  92. });
  93. }
  94. });
  95. // #endif
  96. } else if (page != '') {
  97. uni.navigateTo({
  98. url: page,
  99. })
  100. }
  101. },
  102. }
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. @import 'xieyi.scss';
  107. </style>