index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="container">
  3. <!-- 顶部导航栏 -->
  4. <view class="header-box">
  5. <text class="title">星球造物</text>
  6. <view class="currency-area">
  7. </view>
  8. </view>
  9. <!-- 功能卡片区域 -->
  10. <view class="major-function">
  11. <view class="major-function-left" @click="handleCardClick('character')">
  12. <image src="../../static/make/chuangjiao.png" class="scale-tap card-image" mode="widthFix"></image>
  13. </view>
  14. <view class="major-function-right">
  15. <image src="../../static/make/songwriting.png" @click="handleCardClick('music')"
  16. class="scale-tap card-image" mode="widthFix"></image>
  17. <image src="../../static/make/shengTu.png" @click="handleCardClick('cube')" class="scale-tap card-image"
  18. mode="widthFix"></image>
  19. </view>
  20. </view>
  21. <view class="guide-title"> 引导教程</view>
  22. <view class="guide-content">
  23. <block v-for="(item, index) in guideList" :key="index" >
  24. <image :src="item.url" class="scale-tap card-image" @click="goWeb(item.webUrl, item.subheading)" mode="widthFix"></image>
  25. </block>
  26. </view>
  27. <tabbar-view :tabbars="tabbars" :currentIndex="1" ref="tabbar"></tabbar-view>
  28. <!-- 新手引导组件 -->
  29. <novice-guidance :step="step"></novice-guidance>
  30. </view>
  31. </template>
  32. <script>
  33. import tabbarView from "@/components/tabbar/tabbar.vue";
  34. import tabbar from "@/mixins/tabbar";
  35. import { mapState } from 'vuex'
  36. export default {
  37. components: {
  38. tabbarView,
  39. },
  40. mixins: [tabbar],
  41. data() {
  42. return {
  43. myinfo: {},
  44. windowHeight: uni.getWindowInfo().windowHeight,
  45. tabCurrent: 0,
  46. step: {
  47. name: "make",
  48. guideList: [
  49. {
  50. el: ".currency-area",
  51. tips: "积分可在这里查看,每日签到可获得积分!",
  52. next: "知道了",
  53. },
  54. {
  55. el: ".character",
  56. tips: "创建星灵,入驻星球",
  57. next: "知道了",
  58. tipesStyle: "left: 40px;"
  59. },
  60. {
  61. el: ".music",
  62. tips: "输入灵感,生成歌曲",
  63. next: "知道了",
  64. },
  65. {
  66. el: ".cube",
  67. tips: "输入关键词,生成萌玩",
  68. next: "完成",
  69. }]
  70. },
  71. tutorial: [
  72. {
  73. title: "官方教程"
  74. , url: "https://docs.qingque.cn/d/home/eZQBj5luSHVkaqpJmL5PTuFfZ?identityId=2HSXOrUAEOx"
  75. },
  76. {
  77. title: "官方教程"
  78. , url: "https://docs.qingque.cn/d/home/eZQDGgIXzR08ssYlwoy2tjiNA?identityId=2HSXOrUAEOx"
  79. },
  80. {
  81. title: "官方教程"
  82. , url: "https://docs.qingque.cn/d/home/eZQC3yyQj9gK-KnVUZOT6vYmn?identityId=2HSXOrUAEOx"
  83. },
  84. ],
  85. guideList: [
  86. { url: '../../static/make/guide-item1.png', webUrl: "https://docs.qingque.cn/d/home/eZQBj5luSHVkaqpJmL5PTuFfZ?identityId=2HSXOrUAEOx", content: "教你如何创作内容,激发创作灵感!", subheading: "萌萌智绘魔方" },
  87. { url: '../../static/make/guide-item2.png', webUrl: "https://docs.qingque.cn/d/home/eZQDGgIXzR08ssYlwoy2tjiNA?identityId=2HSXOrUAEOx", content: "使用AI超能力释放你的无限创造力!", subheading: "AI灵感写歌" },
  88. { url: '../../static/make/guide-item3.png', webUrl: "https://docs.qingque.cn/d/home/eZQC3yyQj9gK-KnVUZOT6vYmn?identityId=2HSXOrUAEOx", content: "使用自然语言,创建独属于你的智能体", subheading: "星球造物,AI创角" },
  89. { url: '../../static/make/guide-item4.png', webUrl: "https://docs.qingque.cn/d/home/eZQCk1MWQJHxZvrIXODj-3ALk?identityId=2HSXOrUAEOx", content: "使用自然语言,创建独属于你的智能体", subheading: "星球造物,AI创角" },
  90. ]
  91. }
  92. },
  93. computed: {
  94. ...mapState('switchingModule', ['isRecharge', 'isGuiding'])
  95. },
  96. onLoad() {
  97. },
  98. onShow() {
  99. this.getMyInfo();
  100. },
  101. // 下拉刷新数据
  102. methods: {
  103. goWeb(url, title) {
  104. console.log(1);
  105. uni.navigateTo({
  106. url: `/pages/webview/index?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`
  107. })
  108. },
  109. getMyInfo() {
  110. },
  111. tabChange(index) {
  112. this.tabCurrent = index;
  113. },
  114. handleCardClick(type) {
  115. console.log('Card clicked:', type);
  116. uni.$emit('check_login', () => {
  117. if (type == 'cube') {
  118. uni.navigateTo({
  119. // url: '/pages/makedetail/makeImgDetail'
  120. url: '/pages/makedetail/intelligentLifeChart'
  121. // url: '/pages/my/dome/dome'
  122. })
  123. } else if (type == 'music') {
  124. uni.navigateTo({
  125. //url: '/pages/makedetail/makeMusicDetail'
  126. url: '/pages/makedetail/intelligentMusicProduction'
  127. })
  128. } else if (type == 'character') {
  129. uni.navigateTo({
  130. url: '/pages/my/myStar'
  131. })
  132. } else {
  133. uni.showToast({
  134. title: '待开放'
  135. })
  136. }
  137. })
  138. },
  139. handleTutorialClick(index) {
  140. console.log('Tutorial clicked:', index + 1);
  141. },
  142. goPage(page) {
  143. console.log('page: ', page);
  144. if (page.includes('/pages/my/job') || page.includes('vip')) {
  145. uni.$emit("check_login", () => {
  146. uni.navigateTo({
  147. url: page,
  148. });
  149. })
  150. } else {
  151. uni.navigateTo({
  152. url: page,
  153. });
  154. }
  155. },
  156. }
  157. }
  158. </script>
  159. <style lang="scss">
  160. @import './index.scss';
  161. </style>