tools.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="bg_color_fff tools flex-center-between">
  3. <view class="font_size25 nowrap">今日次数 <text class="color_price">{{appStore.userInfo?.aiQuotaDaily}}</text> 次</view>
  4. <view class="font_size25 nowrap">余额 <text class="color_price">{{appStore.userInfo?.rechargeBalance}}</text> {{appStore.moneyUnit}}</view>
  5. <view>
  6. <image src="/static/img/wenhua.png" mode="" class="mr20 tool-icon" @click="tohistoryList"/>
  7. <image src="/static/img/addHuiHua.png" mode="" class="mr20 ml20 tool-icon" @click="addHuiHuaFn"/>
  8. </view>
  9. </view>
  10. </template>
  11. <script setup>
  12. import { ref } from "vue";
  13. import { useAppStore } from "@/stores/app";
  14. import { onShow} from '@dcloudio/uni-app'
  15. const appStore = useAppStore();
  16. const emit = defineEmits(['addHuiHuaFn'])
  17. // 新增:添加回话功能
  18. function addHuiHuaFn(){
  19. appStore.sessionId = '';
  20. emit('addHuiHuaFn');
  21. }
  22. function tohistoryList(){
  23. uni.navigateTo({
  24. url: '/pages/historyList/historyList',
  25. })
  26. }
  27. </script>
  28. <style lang="scss" scoped>
  29. .tools{
  30. padding: 0 20rpx 20rpx;
  31. .tool-icon{
  32. width: 50rpx;
  33. height: 50rpx;
  34. }
  35. }
  36. </style>