提交 19ce46c4 作者: 方治民

Merge branch '3.x' of https://gitlab.yiring.com/basic/basic-uniapp-v3 into examples

......@@ -68,5 +68,8 @@ module.exports = {
],
'vue/multi-word-component-names': 'off',
'no-console': 'off',
'@stylistic/ts/indent': 'off',
'@stylistic/ts/brace-style': 'off',
'@stylistic/js/operator-linebreak': 'off',
},
}
......@@ -66,67 +66,65 @@
}
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-3081220230817001",
"@dcloudio/uni-app-plus": "3.0.0-3081220230817001",
"@dcloudio/uni-components": "3.0.0-3081220230817001",
"@dcloudio/uni-h5": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-alipay": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-baidu": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-jd": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-lark": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-qq": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-weixin": "3.0.0-3081220230817001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3081220230817001",
"@dcloudio/uni-app": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-components": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-h5": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-jd": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-ui": "^1.4.28",
"@faker-js/faker": "^8.0.2",
"@faker-js/faker": "^8.1.0",
"@vue/runtime-core": "~3.2.47",
"@vueuse/core": "^10.4.1",
"axios": "^1.5.0",
"axios": "^1.5.1",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.9",
"dayjs": "^1.11.10",
"lodash-es": "^4.17.21",
"nanoid": "^4.0.2",
"nanoid": "^5.0.1",
"pinia": "~2.0.36",
"pinyin-pro": "^3.16.2",
"qs": "~6.9.7",
"stompjs": "^2.3.3",
"urijs": "^1.19.11",
"vue": "~3.2.47",
"vue-i18n": "^9.2.2",
"vue-i18n": "^9.5.0",
"vue-request": "^2.0.3",
"vue-types": "^5.1.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@commitlint/cli": "^17.7.1",
"@antfu/eslint-config": "^0.43.1",
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@dcloudio/types": "^3.3.3",
"@dcloudio/uni-automator": "3.0.0-3081220230817001",
"@dcloudio/uni-cli-shared": "3.0.0-3081220230817001",
"@dcloudio/types": "^3.4.0",
"@dcloudio/uni-automator": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3090120230927001",
"@dcloudio/uni-helper-json": "^1.0.13",
"@dcloudio/uni-stacktracey": "3.0.0-3081220230817001",
"@dcloudio/vite-plugin-uni": "3.0.0-3081220230817001",
"@iconify/json": "^2.2.109",
"@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.8",
"@types/mapbox-gl": "^2.7.13",
"@types/node": "^20.4.10",
"@types/prettier": "^2.7.3",
"@types/qs": "^6.9.7",
"@types/stompjs": "^2.3.5",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3090120230927001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3090120230927001",
"@iconify/json": "^2.2.125",
"@types/crypto-js": "^4.1.2",
"@types/lodash-es": "^4.17.9",
"@types/node": "^20.8.3",
"@types/qs": "^6.9.8",
"@types/stompjs": "^2.3.6",
"@types/urijs": "^1.19.20",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"commitizen": "^4.3.0",
"conventional-changelog-cli": "^4.0.0",
"conventional-changelog-cli": "^4.1.0",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.0.0",
"cz-git": "^1.7.1",
"czg": "^1.7.1",
"dotenv": "^16.3.1",
"eslint": "^8.48.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-vue": "^9.17.0",
......@@ -139,24 +137,24 @@
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"pont-engine": "^1.5.12",
"postcss": "^8.4.29",
"postcss": "^8.4.31",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.1",
"sass": "^1.66.1",
"sort-package-json": "^2.5.1",
"rimraf": "^5.0.5",
"sass": "^1.69.0",
"sort-package-json": "^2.6.0",
"stylelint": "^15.10.3",
"stylelint-config-html": "^1.1.0",
"stylelint-config-recommended": "^13.0.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "^6.0.3",
"typescript": "~5.1.6",
"unocss": "^0.55.4",
"unocss-preset-weapp": "^0.55.2",
"unocss": "^0.56.5",
"unocss-preset-weapp": "^0.56.0",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.4.9",
"vite": "^4.4.11",
"vue-eslint-parser": "^9.3.1"
},
"engines": {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -46,8 +46,8 @@ export const Message = {
},
/**
* 消息确认提示
* @param title 标题
* @param content 提示内容
* @param title 标题
* @param confirmText 确认按钮文字
* @param showCancel 是否显示取消按钮
* @returns Promise<boolean> 是否点击了确认按钮
......
import type { App } from 'vue'
import type { I18n, I18nOptions } from 'vue-i18n'
import { createI18n } from 'vue-i18n'
import dayjs from 'dayjs'
import dayjsLocalizedFormat from 'dayjs/plugin/localizedFormat'
import dayjsZh from 'dayjs/locale/zh-cn'
import langs from './lang'
dayjs.extend(dayjsLocalizedFormat)
dayjs.locale(dayjsZh)
// eslint-disable-next-line import/no-mutable-exports
export let i18n: ReturnType<typeof createI18n>
......
......@@ -12,6 +12,7 @@
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"vueVersion" : "3",
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"autoclose" : false,
......@@ -109,8 +110,15 @@
"splashscreen" : {
"useOriginalMsgbox" : true
}
},
"uniStatistics" : {
"enable" : true
}
},
"uniStatistics" : {
"enable" : true,
"version" : "2"
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
......@@ -129,10 +137,5 @@
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : true,
"version" : "2"
},
"vueVersion" : "3"
}
}
......@@ -31,7 +31,7 @@
// ================================ 通用页面分割线 ====================================
// === 关于我们 ===
{
"path": "pages/about/index",
"path": "pages/common/about/index",
"style": {
"navigationBarTitleText": "关于我们",
"backgroundColorTop": "#FFFFFF",
......@@ -70,8 +70,7 @@
// #endif
"navigationBarTitleText": "开发中",
"backgroundColorTop": "#FFFFFF",
"backgroundColorBottom": "#FFFFFF",
"backgroundColor": "#FFFFFE"
"backgroundColorBottom": "#FFFFFF"
}
},
// === 版本更新 ===
......
<script setup lang="ts">
import dayjs from 'dayjs'
import Link from '@/utils/page/link'
import Navigate from '@/utils/page/navigate'
const startYear = ref(2005)
const currentYear = ref(dayjs().year())
const { privacy, services, copyright, company } = Navigate.links
</script>
<template>
......@@ -15,13 +16,13 @@
<fui-footer isFixed>
<template #text>
<view class="links">
<text class="underline" @tap="Link.to(Link.services, '服务协议')">服务协议</text>
<text class="underline" @tap="Link.to(Link.privacy, '隐私政策')">隐私政策</text>
<text class="underline" @tap="Navigate.webview(services, '服务协议')">服务协议</text>
<text class="underline" @tap="Navigate.webview(privacy, '隐私政策')">隐私政策</text>
</view>
<view class="mt-1">Copyright © {{ startYear }}-{{ currentYear }} {{ Link.copyright.name }}</view>
<view class="mt-2" v-if="Link.copyright.name !== Link.company.name">
<view class="mt-1">Copyright © {{ startYear }}-{{ currentYear }} {{ copyright.name }}</view>
<view class="mt-2" v-if="copyright.name !== company.name">
技术支持:
<fui-link underline color="#b2b2b2" size="24" :href="Link.company.link" :text="Link.company.name" />
<fui-link underline color="#b2b2b2" size="24" :href="company.link" :text="company.name" />
</view>
</template>
</fui-footer>
......
## 0.6.4(2023-09-01)
chore: 优化代码结构
## 0.6.3(2023-08-30)
- 修复 下载 wgt 时如果后缀名不正确,重命名后安装
## 0.6.2(2022-11-21)
......
{
"displayName": "升级中心 uni-upgrade-center - App",
"version": "0.6.3",
"version": "0.6.4",
"description": "uni升级中心 - 客户端检查更新",
"keywords": [
"uniCloud",
......
......@@ -281,15 +281,16 @@
if (res.statusCode == 200) {
this.downloadSuccess = true;
// fix: wgt 文件下载完成后后缀不是 wgt
if (this.isWGT && res.tempFilePath.split('.').slice(-1) !== 'wgt') {
if (this.isWGT && !res.tempFilePath.endsWith('.wgt')) {
const failCallback = (e) => {
console.log('[FILE RENAME FAIL]:', JSON.stringify(e));
}
plus.io.resolveLocalFileSystemURL(res.tempFilePath, function(entry) {
plus.io.resolveLocalFileSystemURL(res.tempFilePath, (entry) => {
const originName = entry.name
entry.getParent((parent) => {
const newName = `new_wgt_${Date.now()}.wgt`
entry.copyTo(parent, newName, (res) => {
this.tempFilePath = res.fullPath
entry.copyTo(parent, newName, (result) => {
this.tempFilePath = res.tempFilePath.replace(originName, newName)
this.downLoadComplete()
}, failCallback)
}, failCallback)
......@@ -328,6 +329,7 @@
if (this.isWGT) {
this.installing = true;
}
plus.runtime.install(this.tempFilePath, {
force: false
}, async res => {
......@@ -451,7 +453,8 @@
background-color: #fff;
box-sizing: border-box;
padding: 0 50rpx;
font-family: Source Han Sans CN;
font-family: -apple-system-font, BlinkMacSystemFont, 'Droid Sans', 'Noto Sans', 'PingFang SC', 'Heiti SC',
'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', SimSun, sans-serif;
}
.text {
......
......@@ -8,12 +8,6 @@ export default function() {
appVersion: plus.runtime.version,
wgtVersion: widgetInfo.version
}
data = {
"action": "checkVersion",
"appid": "__UNI__TEST__",
"appVersion": "1.0",
"wgtVersion": "1.0"
}
uniCloud.callFunction({
name: 'uni-upgrade-center',
data,
......
......@@ -50,7 +50,7 @@ export function getEnv(): string {
/**
* 获取运行环境中文标识
* @returns
* @returns string
*/
export function getEnvText(): string {
switch (import.meta.env.MODE) {
......
......@@ -12,7 +12,7 @@ export function getPendingUrl(config: AxiosRequestConfig) {
export class AxiosCanceler {
/**
* Add request
* @param {Object} config
* @param {object} config
*/
addPending(config: AxiosRequestConfig) {
this.removePending(config)
......@@ -39,7 +39,7 @@ export class AxiosCanceler {
/**
* Removal request
* @param {Object} config
* @param {object} config
*/
removePending(config: AxiosRequestConfig) {
const url = getPendingUrl(config)
......
export default {
links: {
/**
* 公司信息
*/
......@@ -23,15 +24,16 @@ export default {
* @description TODO: 隐私政策地址需要根据实际情况进行修改
*/
privacy: 'https://app.yiring.com/privacy.html',
},
/**
* 从内部打开指定页面
* @param link 链接
* @param title 页面标题
* 跳转到指定页面
* @param page 页面全路径
*/
to(link: string, title: string) {
to(page: string, options?: UniNamespace.NavigateToOptions) {
uni.navigateTo({
url: `/pages/common/webview/index?title=${encodeURIComponent(title)}&link=${encodeURIComponent(link)}`,
url: page,
...options,
})
},
/**
......@@ -52,4 +54,14 @@ export default {
window.open(link)
// #endif
},
/**
* 从内部打开指定页面
* @param link 链接
* @param title 页面标题
*/
webview(link: string, title: string) {
uni.navigateTo({
url: `/pages/common/webview/index?title=${encodeURIComponent(title)}&link=${encodeURIComponent(link)}`,
})
},
}
......@@ -230,8 +230,8 @@ class StompInstance {
/**
* 向服务器发送消息
* @param {string} destination 主题
* @param {Object | string} message 消息内容
* @param {Object} headers 消息头
* @param {object | string} message 消息内容
* @param {object} headers 消息头
*/
send(destination: string, message: Object | string, headers?: Object) {
if (this.client) {
......
......@@ -101,25 +101,25 @@ class UniWebSocket {
/**
* 连接开启
* @param {Object} _res
* @param {object} _res
*/
onopen(_res: object) {}
/**
* 连接关闭
* @param {Object} _res
* @param {object} _res
*/
onclose(_res: object) {}
/**
* 连接异常
* @param {Object} _res
* @param {object} _res
*/
onerror(_res: object) {}
/**
* 接收消息
* @param {Object} _res
* @param {object} _res
*/
onmessage(_res: object) {}
......
......@@ -90,5 +90,5 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
}
......@@ -15,6 +15,7 @@ export default defineConfig({
{
'border-base': 'border border-[#eee]',
'flex-center': 'flex justify-center items-center',
ellipsis: 'text-ellipsis whitespace-nowrap overflow-hidden',
},
],
safelist: ICONS.map((icon) => `icon-${icon.replace(/:/g, '-')}`),
......@@ -25,7 +26,7 @@ export default defineConfig({
presetWeappAttributify(),
// icon
presetIcons({
prefix: 'icon-',
prefix: ['i-', 'icon-'],
extraProperties: {
display: 'inline-flex',
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论