contact-us.uvue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <cl-popup v-model="visible" :title="t('联系我们')">
  3. <view class="p-3">
  4. <view class="flex flex-row justify-center py-3">
  5. <view class="rounded-2xl p-2 border border-solid border-surface-100">
  6. <cl-image
  7. src="https://unix.cool-js.com/show/wechat.png"
  8. :height="150"
  9. :width="150"
  10. show-menu-by-longpress
  11. ></cl-image>
  12. </view>
  13. </view>
  14. <cl-text :pt="{ className: 'mt-3 mb-6' }"
  15. >我们期待与您携手,共同探索技术的边界,共同推动技术的进步</cl-text
  16. >
  17. <view class="flex flex-row">
  18. <cl-button size="large" text border fluid @tap="saveImage">保存图片</cl-button>
  19. <cl-button size="large" fluid @tap="toWebSite">访问官网</cl-button>
  20. </view>
  21. </view>
  22. </cl-popup>
  23. </template>
  24. <script setup lang="ts">
  25. import { useUi } from "@/uni_modules/cool-ui";
  26. import { ref } from "vue";
  27. import { t } from "@/.cool";
  28. import { openWeb } from "@/uni_modules/cool-open-web";
  29. import { config } from "@/config";
  30. const visible = ref(false);
  31. const ui = useUi();
  32. function saveImage() {
  33. uni.saveImageToPhotosAlbum({
  34. filePath: "https://unix.cool-js.com/show/wechat.png",
  35. success: () => {
  36. ui.showToast({
  37. message: "保存成功"
  38. });
  39. }
  40. });
  41. }
  42. function toWebSite() {
  43. openWeb(config.website);
  44. }
  45. function open() {
  46. visible.value = true;
  47. }
  48. function close() {
  49. visible.value = false;
  50. }
  51. defineExpose({
  52. open,
  53. close
  54. });
  55. </script>