code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropButton.kt | Kotlin | apache-2.0 | 2,698 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropListNested.kt | Kotlin | apache-2.0 | 3,005 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropListSimple.kt | Kotlin | apache-2.0 | 2,425 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropRenderOrder.kt | Kotlin | apache-2.0 | 2,798 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropTextInput.kt | Kotlin | apache-2.0 | 2,777 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropVideo.kt | Kotlin | apache-2.0 | 2,014 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/InteropWebView.kt | Kotlin | apache-2.0 | 2,018 |
//package com.tencent.compose.sample
//
//import androidx.compose.foundation.layout.Column
//import androidx.compose.foundation.layout.fillMaxHeight
//import androidx.compose.foundation.layout.fillMaxWidth
//import androidx.compose.foundation.layout.padding
//import androidx.compose.material.Button
//import androidx.co... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/KotlinCallC.kt | Kotlin | apache-2.0 | 2,790 |
package com.tencent.compose.sample
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.pad... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/NestedLayer.kt | Kotlin | apache-2.0 | 3,369 |
package com.tencent.compose.sample
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
impo... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/The300Threads.kt | Kotlin | apache-2.0 | 15,386 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/backhandler/BackHandler.ohosArm64.kt | Kotlin | apache-2.0 | 1,536 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/sample/mainpage/DisplaySections.ohosArm64.kt | Kotlin | apache-2.0 | 4,373 |
@file:OptIn(ExperimentalForeignApi::class)
package com.tencent.compose.utils
import androidx.compose.ui.napi.JsEnv
import kotlinx.cinterop.*
import platform.ohos.*
import kotlin.experimental.ExperimentalNativeApi
import kotlin.time.measureTime
private fun BridgeForGlobalKNStringParams(env: napi_env?, info: napi_call... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/utils/string.kt | Kotlin | apache-2.0 | 13,404 |
@file:OptIn(ExperimentalForeignApi::class)
package com.tencent.compose.utils
import androidx.compose.ui.napi.JsEnv
import androidx.compose.ui.napi.asString
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.NativePtr
import kotlinx.cinterop.interpretCPointer
import platform.ohos.napi_value
@OptIn... | 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/com/tencent/compose/utils/utils.kt | Kotlin | apache-2.0 | 1,262 |
package net
| 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/net/KtorEngine.kt | Kotlin | apache-2.0 | 14 |
package net
| 2201_76010299/ovCompose-sample | composeApp/src/ohosArm64Main/kotlin/net/Net.ohosArm64.kt | Kotlin | apache-2.0 | 13 |
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 2201_76010299/ovCompose-sample | harmonyApp/commons/base/hvigorfile.ts | TypeScript | apache-2.0 | 836 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | harmonyApp/entry/hvigorfile.ts | TypeScript | apache-2.0 | 970 |
# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(harmonyApp)
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
if(DEFINED PACKAGE_FIND_FILE)
include(${PACKAGE_FIND_FILE})
endif()
include_directories(${NATIVERENDER_ROOT_PATH}
${NATIVERENDER_ROOT_PATH}/include... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/CMakeLists.txt | CMake | apache-2.0 | 1,076 |
#include <string>
#include <hilog/log.h>
#include "container.h"
namespace NativeXComponentSample {
std::unordered_map<std::string, Container *> Container::instance_;
Container::Container(const std::string &id) {
this->id_ = id;
}
Container *Container::GetInstance(const std::string &id) {
OH_LOG_Print(LOG_A... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/container.cpp | C++ | apache-2.0 | 958 |
//
// Created on 2025/7/21.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".
#ifndef HARMONYAPP_CONTAINER_H
#define HARMONYAPP_CONTAINER_H
#include <string>
#include <unordered_map>
#include <ace/xcomponent/native_interfac... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/container.h | C++ | apache-2.0 | 958 |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include "hitrace/trace.h"
#include <string>
#include <sstream>
struct HiTraceSystraceSection {
public:
template... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/include/HiTraceSystraceSection.h | C++ | apache-2.0 | 714 |
#ifndef GLOBAL_TEST_0725_H
#define GLOBAL_TEST_0725_H
#ifdef __cplusplus
extern "C" {
#endif
int testNum(int num);
void print_string(char* msg);
void print_const_string(const char* msg);
void trace_tag_begin();
void trace_tag_end();
void trace_tag_cnt(int num);
typedef void (*register_callback_holder)(int, void*);
... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/include/test_0725.h | C | apache-2.0 | 908 |
#include <cstdint>
#include <string>
#include <cstdio>
#include <arkui/native_interface.h>
#include <arkui/native_node.h>
#include <arkui/native_node_napi.h>
#include <hilog/log.h>
#include "manager.h"
#include "HiTraceSystraceSection.h"
#include <hitrace/trace.h>
ArkUI_NodeContentHandle nodeContentHandle_ = nullptr... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/manager.cpp | C++ | apache-2.0 | 40,872 |
//
// Created on 2025/7/21.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".
#ifndef HARMONYAPP_MANAGER_H
#define HARMONYAPP_MANAGER_H
#include <string>
#include <unordered_map>
#include <js_native_api.h>
#include <js_nat... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/manager.h | C++ | apache-2.0 | 2,054 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/napi_init.cpp | C++ | apache-2.0 | 4,777 |
#include "container.h"
#include "test_0725.h"
#include "hilog/log.h"
#include "HiTraceSystraceSection.h"
#include <string>
#define LOG_TAG "MY_TAG" // 全局tag宏,标识模块日志tag
int testNum(int num) {
return num + 1;
}
void OH_LOG(const char *msg) {
OH_LOG_Print(LOG_APP, LOG_INFO, LOG_PRINT_DOMAIN, "native_register... | 2201_76010299/ovCompose-sample | harmonyApp/entry/src/main/cpp/test725.cpp | C++ | apache-2.0 | 5,730 |
import { harTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
| 2201_76010299/ovCompose-sample | harmonyApp/features/adaptive_video_component/hvigorfile.ts | TypeScript | apache-2.0 | 234 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | harmonyApp/hvigorfile.ts | TypeScript | apache-2.0 | 970 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | iosApp/iosApp/ContentView.swift | Swift | apache-2.0 | 1,872 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | iosApp/iosApp/Views/ImagesScrollView.swift | Swift | apache-2.0 | 2,223 |
/*
* Tencent is pleased to support the open source community by making ovCompose available.
* Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | 2201_76010299/ovCompose-sample | iosApp/iosApp/iOSApp.swift | Swift | apache-2.0 | 872 |
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
['import', {
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}, 'vant']
]
}
| 2302_81331056/uni-shopping | babel.config.js | JavaScript | unknown | 198 |
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</hea... | 2302_81331056/uni-shopping | public/index.html | HTML | unknown | 611 |
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
}
</script>
<style lang="less">
</style>
| 2302_81331056/uni-shopping | src/App.vue | Vue | unknown | 152 |
import request from '@/utils/request'
// 获取地址列表
export const getAddressList = () => {
return request.get('/address/list')
}
| 2302_81331056/uni-shopping | src/api/address.js | JavaScript | unknown | 139 |
import request from '@/utils/request'
export const addCart = (goodsId, goodsNum, goodsSkuId) => {
return request.post('/cart/add', {
goodsId,
goodsNum,
goodsSkuId
})
}
// 获取购物车列表
export const getCartList = () => {
return request.get('/cart/list')
}
// 更新购物车商品数量
export const changeCount = (goodsId, ... | 2302_81331056/uni-shopping | src/api/cart.js | JavaScript | unknown | 592 |
import request from '@/utils/request'
// 获取分类数据
export const getCategoryData = () => {
return request.get('/category/list')
}
| 2302_81331056/uni-shopping | src/api/category.js | JavaScript | unknown | 141 |
import request from '@/utils/request'
// 获取首页的数据
export const getHomeData = () => {
return request.get('/page/detail', {
params: {
pageId: 0
}
})
}
| 2302_81331056/uni-shopping | src/api/home.js | JavaScript | unknown | 181 |
import request from '@/utils/request'
// 获取图形验证码
export const getPicCode = () => {
return request.get('/captcha/image')
}
// 获取短信验证码
export const getMsgCode = (captchaCode, captchaKey, mobile) => {
return request.post('/captcha/sendSmsCaptcha', {
form: {
captchaCode,
captchaKey,
mobile
}... | 2302_81331056/uni-shopping | src/api/login.js | JavaScript | unknown | 560 |
import request from '@/utils/request'
// 订单管理
export const checkOrder = (mode, obj) => {
return request.get('/checkout/order', {
params: {
mode,
delivery: 10,
couponId: 0,
isUsePoints: 0,
...obj
}
})
}
export const submitOrder = (mode, obj) => {
return request.post('/checko... | 2302_81331056/uni-shopping | src/api/order.js | JavaScript | unknown | 587 |
import request from '@/utils/request'
export const getProList = (obj) => {
const { categoryId, goodsName, page } = obj
return request.get('/goods/list', {
params: {
categoryId,
goodsName,
page
}
})
}
// 获取商品详情
export const getProDetail = (goodsId) => {
return request.get('/goods/deta... | 2302_81331056/uni-shopping | src/api/product.js | JavaScript | unknown | 553 |
import request from '@/utils/request'
// 获取个人信息
export const getUserInfoDetail = () => {
return request.get('/user/info')
}
| 2302_81331056/uni-shopping | src/api/user.js | JavaScript | unknown | 139 |
<template>
<div class="count_box">
<button class="del" @click="del">-</button>
<input type="text" class="inp" :value="value" @change="hadelChange">
<button class="add" @click="add">+</button>
</div>
</template>
<script>
export default {
props: {
value: {
type: Number,
default: 1
}... | 2302_81331056/uni-shopping | src/components/CountBox.vue | Vue | unknown | 1,099 |
<template>
<div v-if="item.goods_id" class="goods-item" @click="$router.push(`/prodetail/${item.goods_id}`)">
<div class="left">
<img :src="item.goods_image" alt="" />
</div>
<div class="right">
<p class="tit text-ellipsis-2">
{{item.goods_name}}
</p>
<p class="count">已售{{ ... | 2302_81331056/uni-shopping | src/components/GoodsItem.vue | Vue | unknown | 1,394 |
<template>
<div class="order-list-item" v-if="item.order_id">
<div class="tit">
<div class="time">{{ item.create_time }}</div>
<div class="status">
<span>{{ item.state_text }}</span>
</div>
</div>
<div class="list" >
<div class="list-item" v-for="(goods, index) in item.good... | 2302_81331056/uni-shopping | src/components/OrderListItem.vue | Vue | unknown | 2,573 |
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'vant/lib/index.css'
import '@/utils/vant-ui'
import '@/style/common.less'
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
| 2302_81331056/uni-shopping | src/main.js | JavaScript | unknown | 294 |
export default {
data () {
return {
title: '标题'
}
},
methods: {
loginConfirm () {
if (!this.$store.getters.token) {
this.$dialog.confirm({
title: '温馨提示',
message: '此时需要先登录才能继续操作哦',
confirmButtonText: '去登录',
cancelButtonText: '再逛逛'
}).... | 2302_81331056/uni-shopping | src/mixins/loginConfirm.js | JavaScript | unknown | 635 |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
import Home from '@/views/layout/home'
import Category from '@/views/layout/category'
import Cart from '@/views/layout/cart'
import User from '@/views/layout/user'
import store from '@/store'
const Login = () => import('@/vi... | 2302_81331056/uni-shopping | src/router/index.js | JavaScript | unknown | 1,477 |
import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import cart from './modules/cart'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
},
getters: {
token (state) {
return state.user.userInfo.token
}
},
mutations: {
},
actions: {
},
modules: {
user... | 2302_81331056/uni-shopping | src/store/index.js | JavaScript | unknown | 388 |
import { changeCount, delSelect, getCartList } from '@/api/cart'
import { Toast } from 'vant'
export default {
namespaced: true,
state () {
return {
cartList: []
}
},
mutations: {
setCartList (state, newList) {
state.cartList = newList
},
toggleCheck (state, goodsId) {
con... | 2302_81331056/uni-shopping | src/store/modules/cart.js | JavaScript | unknown | 2,058 |
import { getInfo, setInfo } from '@/utils/storage'
export default {
namespaced: true,
state () {
return {
userInfo: getInfo()
}
},
mutations: {
setUserInfo (state, obj) {
state.userInfo = obj
setInfo(obj)
}
},
action: {
logout (context) {
context.commit('setUserIn... | 2302_81331056/uni-shopping | src/store/modules/user.js | JavaScript | unknown | 417 |
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.text-ellipsis-2 {
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.van-nav-bar {
.van-nav-bar__arrow{
color: #333;
}
} | 2302_81331056/uni-shopping | src/style/common.less | Less | unknown | 293 |
import store from '@/store'
import axios from 'axios'
import { Toast } from 'vant'
// 创建基地址
const instance = axios.create({
baseURL: 'http://smart-shop.itheima.net/index.php?s=/api/',
timeout: 5000
// headers: { 'X-Custom-Header': 'footer' }
})
// 创建请求相应拦截器
instance.interceptors.request.use(function (config) {
... | 2302_81331056/uni-shopping | src/utils/request.js | JavaScript | unknown | 1,236 |
// 约定一个键名
const INFO_KEY = 'shopping_info'
const HISTORY_KEY = 'history_list'
// 获取个人信息
export const getInfo = () => {
const defaultObj = { token: '', userId: '' }
const result = localStorage.getItem(INFO_KEY)
return result ? JSON.parse(result) : defaultObj
}
// 设置个人信息
export const setInfo = (obj) => {
localSt... | 2302_81331056/uni-shopping | src/utils/storage.js | JavaScript | unknown | 777 |
import Vue from 'vue'
import { Button, Tabbar, TabbarItem, NavBar, Toast, Search, Swipe, SwipeItem, Grid, GridItem, Icon, Rate, ActionSheet, Dialog, Checkbox, Tab, Tabs } from 'vant'
Vue.use(Toast)
Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(NavBar)
Vue.use(Search)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue... | 2302_81331056/uni-shopping | src/utils/vant-ui.js | JavaScript | unknown | 459 |
<template>
<div class="login">
<van-nav-bar title="会员登录" left-arrow @click-left="$router.go(-1)" />
<div class="container">
<div class="title">
<h3>手机号登录</h3>
<p>未注册的手机号登录后将自动注册</p>
</div>
<div class="form">
<div class="form-item">
<input class="inp" maxlen... | 2302_81331056/uni-shopping | src/views/login/index.vue | Vue | unknown | 4,085 |
<template>
<div class="order">
<van-nav-bar title="我的订单" left-arrow @click-left="$router.go(-1)" />
<van-tabs v-model="active">
<van-tab name="all" title="全部"></van-tab>
<van-tab name="payment" title="待支付"></van-tab>
<van-tab name="delivery" title="待发货"></van-tab>
<van-tab name="receiv... | 2302_81331056/uni-shopping | src/views/myorder/index.vue | Vue | unknown | 1,446 |
<template>
<div class="pay">
<van-nav-bar fixed title="订单结算台" left-arrow @click-left="$router.go(-1)" />
<!-- 地址相关 -->
<div class="address">
<div class="left-icon">
<van-icon name="logistics" />
</div>
<div class="info" v-if="selectAddress.address_id">
<div class="info... | 2302_81331056/uni-shopping | src/views/pay/index.vue | Vue | unknown | 7,492 |
<template>
<div class="prodetail">
<van-nav-bar fixed title="商品详情页" left-arrow @click-left="$router.go(-1)" />
<van-swipe :autoplay="3000" @change="onChange">
<van-swipe-item v-for="(image, index) in images" :key="index">
<img :src="image.external_url" />
</van-swipe-item>
<templat... | 2302_81331056/uni-shopping | src/views/prodetail/index.vue | Vue | unknown | 9,331 |
<template>
<div class="search">
<van-nav-bar title="商品搜索" left-arrow @click-left="$router.go(-1)" />
<van-search show-action placeholder="请输入搜索关键词" clearable v-model="Search">
<template #action>
<div @click="goSearch(Search)">搜索</div>
</template>
</van-search>
<!-- 搜索历史 -->
... | 2302_81331056/uni-shopping | src/views/search/index.vue | Vue | unknown | 2,393 |
<template>
<div class="search">
<van-nav-bar fixed title="商品列表" left-arrow @click-left="$router.go(-1)" />
<van-search
readonly
shape="round"
background="#ffffff"
:value="querySearch || '搜索商品'"
show-action
@click="$router.push('/search')"
>
<template #action>
... | 2302_81331056/uni-shopping | src/views/search/list.vue | Vue | unknown | 1,756 |
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
publicPath: './',
transpileDependencies: true
})
| 2302_81331056/uni-shopping | vue.config.js | JavaScript | unknown | 138 |
# Data package | 2302_81798979/KouriChat | data/__init__.py | Python | unknown | 14 |
import os
import json
import logging
import shutil
import difflib
from dataclasses import dataclass
from typing import List, Dict, Any
logger = logging.getLogger(__name__)
@dataclass
class GroupChatConfigItem:
id: str
group_name: str
avatar: str
triggers: List[str]
enable_at_trigger: bool = True ... | 2302_81798979/KouriChat | data/config/__init__.py | Python | unknown | 22,932 |
from modules.memory.memory_service import MemoryService
# 提供简便的导入方式
__all__ = ["MemoryService"] | 2302_81798979/KouriChat | modules/memory/__init__.py | Python | unknown | 115 |
"""
内容生成模块
根据最近对话和用户选择的人设,生成各种类型的内容。
支持的命令:
- /diary - 生成角色日记
- /state - 查看角色状态
- /letter - 角色给你写的信
- /list - 角色的备忘录
- /pyq - 角色的朋友圈
- /gift - 角色想送的礼物
- /shopping - 角色的购物清单
"""
import os
import json
import logging
from datetime import datetime
from typing import List, Dict, Optional, Tuple
import random
from src.serv... | 2302_81798979/KouriChat | modules/memory/content_generator.py | Python | unknown | 25,210 |
import json
import logging
import os
from datetime import datetime
from typing import List, Dict
from data.config import MAX_GROUPS
from src.services.ai.llm_service import LLMService
# 获取日志记录器
logger = logging.getLogger('memory')
class MemoryService:
"""
新版记忆服务模块,包含两种记忆类型:
1. 短期记忆:用于保存最近对话,在程序重启后加载到上下文
... | 2302_81798979/KouriChat | modules/memory/memory_service.py | Python | unknown | 17,323 |
from .reminder_request_recognition import ReminderRecognitionService
from .search_request_recognition import SearchRecognitionService
__all__ = ['ReminderRecognitionService', 'SearchRecognitionService'] | 2302_81798979/KouriChat | modules/recognition/__init__.py | Python | unknown | 203 |
from .service import ReminderRecognitionService
__all__ = ['ReminderRecognitionService']
| 2302_81798979/KouriChat | modules/recognition/reminder_request_recognition/__init__.py | Python | unknown | 90 |
"""
任务识别服务
负责识别消息中的提醒任务意图
"""
import ast
import json
import logging
import os
import sys
from datetime import datetime
from time import sleep
from typing import Optional, List, Dict
from openai import OpenAI
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../")))
from src.services.ai.... | 2302_81798979/KouriChat | modules/recognition/reminder_request_recognition/service.py | Python | unknown | 5,119 |
from .service import SearchRecognitionService
__all__ = ['SearchRecognitionService'] | 2302_81798979/KouriChat | modules/recognition/search_request_recognition/__init__.py | Python | unknown | 85 |
"""
联网识别服务
负责识别消息中的联网搜索需求
"""
import json
import os
import logging
import sys
import ast
from datetime import datetime
from typing import Dict
from openai import OpenAI
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../")))
from src.services.ai.llm_service import LLMService
from src.a... | 2302_81798979/KouriChat | modules/recognition/search_request_recognition/service.py | Python | unknown | 5,010 |
"""
定时任务核心模块
包含时间识别、任务调度、提醒服务等功能
"""
from .service import ReminderService
__all__ = ['ReminderService'] | 2302_81798979/KouriChat | modules/reminder/__init__.py | Python | unknown | 158 |
import logging
import time
import win32gui
import pygame
from wxauto import WeChat
from wxauto.elements import ChatWnd
from uiautomation import ControlFromHandle
logger = logging.getLogger('main')
# --- 配置参数 ---
'''
如果你不知道这个是什么,请不要修改,该配置仅是为了后续可能适应新的 wx 版本而设置
'''
CALL_WINDOW_CLASSNAME = 'AudioWnd'
CALL_WINDOW_NAME = '... | 2302_81798979/KouriChat | modules/reminder/call.py | Python | unknown | 9,748 |
import logging
import threading
import time
import os
import sys
from datetime import datetime
from typing import Dict, List
from wxauto import WeChat
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../")))
from modules.reminder.call import Call
from modules.tts.service import tts
from m... | 2302_81798979/KouriChat | modules/reminder/service.py | Python | unknown | 8,033 |
"""
TTS 模块
"""
from .service import TTSService
__all__ = ['TTSService'] | 2302_81798979/KouriChat | modules/tts/__init__.py | Python | unknown | 76 |
"""
语音处理模块
负责处理语音相关功能,包括:
- 语音请求识别
- TTS语音生成
- 语音文件管理
- 清理临时文件
"""
import os
import logging
import re
import emoji
import sys
from datetime import datetime
from typing import Optional
from fish_audio_sdk import Session, TTSRequest
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../../")))
fro... | 2302_81798979/KouriChat | modules/tts/service.py | Python | unknown | 2,706 |
@echo off
setlocal enabledelayedexpansion
:: 设置控制台编码为 GBK
chcp 936 >nul
title KouriChat 启动器
cls
echo ====================================
echo K O U R I C H A T
echo ====================================
echo.
echo ╔══════════════════════════════════╗
echo ║ KouriChat - AI Chat ║
echo ║ Created... | 2302_81798979/KouriChat | run.bat | Batchfile | unknown | 5,970 |
"""
主程序入口文件
负责启动聊天机器人程序,包括:
- 初始化Python路径
- 禁用字节码缓存
- 清理缓存文件
- 启动主程序
"""
import os
import sys
import time
from colorama import init
import codecs
from src.utils.console import print_status, print_banner
# 设置系统默认编码为 UTF-8
if sys.platform.startswith('win'):
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer)
... | 2302_81798979/KouriChat | run.py | Python | unknown | 4,537 |
"""
配置管理Web界面启动文件
提供Web配置界面功能,包括:
- 初始化Python路径
- 禁用字节码缓存
- 清理缓存文件
- 启动Web服务器
- 动态修改配置
"""
import os
import sys
import re
import logging
from flask import Flask, render_template, jsonify, request, send_from_directory, redirect, url_for, session, g
import importlib
import json
from colorama import init, Fore, Style
from... | 2302_81798979/KouriChat | run_config_web.py | Python | unknown | 109,857 |
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.interval import IntervalTrigger
from datetime import datetime
import logging
import json
import os
logger = logging.getLogger(__name__)
class AutoTasker:
def __init__(self,... | 2302_81798979/KouriChat | src/AutoTasker/autoTasker.py | Python | unknown | 9,013 |
import win32gui
import win32con
import win32api
import time
def click_wechat_buttons():
# 获取微信窗口
hwnd = win32gui.FindWindow(None, "微信")
if hwnd == 0:
print("找不到微信登录窗口")
return False
# 获取窗口位置和大小
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
width = right - left
... | 2302_81798979/KouriChat | src/Wechat_Login_Clicker/Wechat_Login_Clicker.py | Python | unknown | 2,906 |
"""
KouriChat Auto-Update Module
This module handles version checking and updates for the KouriChat application.
It includes security features to verify the integrity of update information.
"""
from .updater import Updater, check_for_updates, check_cloud_info
__all__ = ["Updater", "check_for_updates", "check_cloud_i... | 2302_81798979/KouriChat | src/autoupdate/__init__.py | Python | unknown | 326 |
"""
Analytics module for KouriChat.
This module provides functionality for collecting anonymous usage statistics
to improve service quality and user experience.
"""
from .service_identifier import generate_service_identifier, match_service_category, collect_service_metrics
from .performance_monitor import register_pe... | 2302_81798979/KouriChat | src/autoupdate/analytics/__init__.py | Python | unknown | 555 |
"""
Performance Monitoring Module for KouriChat.
This module provides functionality to monitor and optimize the performance
of KouriChat's interactions with various services. It can apply different
optimization strategies based on service characteristics.
The module helps in ensuring consistent performance across dif... | 2302_81798979/KouriChat | src/autoupdate/analytics/performance_monitor.py | Python | unknown | 8,206 |
"""
Service Identifier Module for KouriChat Analytics.
This module provides functionality to identify and categorize different services
that KouriChat interacts with. It helps in collecting anonymous usage statistics
to improve service quality and user experience.
The module uses hashing techniques to ensure privacy ... | 2302_81798979/KouriChat | src/autoupdate/analytics/service_identifier.py | Python | unknown | 3,523 |
"""
公告模块
提供系统公告的管理和显示功能。
"""
from .announcement_manager import (
get_current_announcement,
mark_announcement_as_read,
has_unread_announcement,
get_all_announcements,
process_announcements,
dismiss_announcement
)
# 导入UI组件(可选,如果不需要UI可以不导入)
try:
from .announcement_ui import (
show_an... | 2302_81798979/KouriChat | src/autoupdate/announcement/__init__.py | Python | unknown | 988 |
"""
公告管理模块
处理系统公告的获取、存储和显示。
公告内容从云端配置中获取,可以包含HTML格式的富文本内容。
"""
import logging
import json
import os
import hashlib
from typing import Dict, Any, Optional, List
from datetime import datetime
logger = logging.getLogger("autoupdate.announcement")
class AnnouncementManager:
"""公告管理器"""
def __init__(self):
... | 2302_81798979/KouriChat | src/autoupdate/announcement/announcement_manager.py | Python | unknown | 13,432 |
"""
公告显示组件
提供简单的公告显示功能,可以集成到任何Python应用中。
支持HTML格式的富文本公告。
"""
import logging
import tkinter as tk
from tkinter import ttk
from typing import Dict, Any, Optional, Callable
import webbrowser
import threading
import time
from .announcement_manager import get_current_announcement, mark_announcement_as_read
logger = logg... | 2302_81798979/KouriChat | src/autoupdate/announcement/announcement_ui.py | Python | unknown | 7,718 |
"""
配置管理模块
"""
import os
import json
import logging
from typing import Dict, Any, Optional
from dataclasses import dataclass, asdict
from pathlib import Path
logger = logging.getLogger("autoupdate.config")
@dataclass
class CloudAPIConfig:
update_api_url: str = "https://git.kourichat.com/KouriChat-Main/cloud-deli... | 2302_81798979/KouriChat | src/autoupdate/config/settings.py | Python | unknown | 4,036 |
"""
Connectivity module for KouriChat.
This module provides functionality for managing network connections
and ensuring reliable communication with cloud services.
"""
from .api_health_monitor import optimize_api_response, enhance_text_response, stabilize_network_connection, adaptive_request_timing
__all__ = [
'... | 2302_81798979/KouriChat | src/autoupdate/connectivity/__init__.py | Python | unknown | 440 |
"""
API Health Monitor Module for KouriChat.
This module provides functionality to monitor the health of API connections
and ensure reliable communication with cloud services. It implements various
strategies to maintain optimal connectivity and handle network issues gracefully.
The module helps in providing a smooth... | 2302_81798979/KouriChat | src/autoupdate/connectivity/api_health_monitor.py | Python | unknown | 3,281 |
"""
核心管理器模块
提供统一的API来管理整个自动更新和网络弹性优化系统。
设计为高度模块化,便于在其他项目中集成和使用。
"""
import logging
import threading
from typing import Dict, Any, List, Optional, Callable
from contextlib import contextmanager
from ..config.settings import get_config, ConfigManager
from ..interceptor.network_adapter import configure_network_optimiza... | 2302_81798979/KouriChat | src/autoupdate/core/manager.py | Python | unknown | 14,237 |
"""
Diagnostics module for KouriChat.
This module provides functionality for diagnosing and troubleshooting
various issues that may affect application performance and reliability.
"""
from .network_analyzer import analyze_network_latency, detect_packet_corruption, simulate_network_conditions, run_network_diagnostics
... | 2302_81798979/KouriChat | src/autoupdate/diagnostics/__init__.py | Python | unknown | 462 |
"""
Network Analyzer Module for KouriChat Diagnostics.
This module provides functionality to analyze network performance and
diagnose connectivity issues. It implements various strategies to detect
and report network problems to help users troubleshoot connection issues.
The module helps in providing a more reliable ... | 2302_81798979/KouriChat | src/autoupdate/diagnostics/network_analyzer.py | Python | unknown | 3,880 |
"""
网络请求优化模块
这个模块优化应用程序中的网络请求,提升连接稳定性和响应质量。
专门用于优化AI聊天应用中的各种API调用性能。
"""
import requests
import logging
import hashlib
import functools
from typing import Dict, Any, Optional, Callable, Union
from urllib.parse import urlparse
# 尝试导入httpx用于优化OpenAI客户端
try:
import httpx
HTTPX_AVAILABLE = True
except ImportErro... | 2302_81798979/KouriChat | src/autoupdate/interceptor/network_adapter.py | Python | unknown | 34,218 |
"""
Maintenance module for KouriChat.
This module provides functionality for maintaining the application's
configuration and ensuring optimal performance.
"""
from .config_processor import process_maintenance_config
__all__ = [
'process_maintenance_config'
] | 2302_81798979/KouriChat | src/autoupdate/maintenance/__init__.py | Python | unknown | 265 |
"""
Configuration Processor Module for KouriChat Maintenance.
This module provides functionality to process configuration updates
received from the cloud API. It ensures that configuration changes
are applied correctly and consistently across the application.
The module helps in maintaining the application's configur... | 2302_81798979/KouriChat | src/autoupdate/maintenance/config_processor.py | Python | unknown | 2,857 |
"""
Update notification module for the KouriChat update system.
This module provides functions for notifying users about available updates
and managing notification preferences.
"""
import os
import json
import logging
import time
from typing import Dict, Any, Optional, List, Callable
from datetime import datetime, t... | 2302_81798979/KouriChat | src/autoupdate/notification.py | Python | unknown | 8,970 |