新
2
App.vue
@ -19,7 +19,7 @@
|
||||
this.globalData.$i18n = this.$i18n
|
||||
this.globalData.$t = str => this.$t(str)
|
||||
initApp();
|
||||
uniIdPageInit()
|
||||
uniIdPageInit()
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
//checkIsAgree(); APP端暂时先用原生默认生成的。目前,自定义方式启动vue界面时,原生层已经请求了部分权限这并不符合国家的法规
|
||||
|
||||
@ -47,17 +47,17 @@ export default async function() {
|
||||
methodName, // 云对象的方法名称
|
||||
params // 参数列表
|
||||
}) {
|
||||
// console.log('interceptObject',{
|
||||
// objectName, // 云对象名称
|
||||
// methodName, // 云对象的方法名称
|
||||
// params // 参数列表
|
||||
// });
|
||||
console.log('interceptObject',{
|
||||
objectName, // 云对象名称
|
||||
methodName, // 云对象的方法名称
|
||||
params // 参数列表
|
||||
});
|
||||
if(objectName == "uni-id-co" && (methodName.includes('loginBy') || ['login','registerUser'].includes(methodName) )){
|
||||
console.log('执行登录相关云对象');
|
||||
params[0].inviteCode = await new Promise((callBack) => {
|
||||
params[0].inviteCode = await new Promise((callBack) => {
|
||||
uni.getClipboardData({
|
||||
success: function(res) {
|
||||
console.log('剪切板内容:'+res.data);
|
||||
console.log('剪切板内容:'+JSON.stringify(res));
|
||||
if (res.data.slice(0, 18) == 'uniInvitationCode:') {
|
||||
let uniInvitationCode = res.data.slice(18, 38)
|
||||
console.log('当前用户是其他用户推荐下载的,推荐者的code是:' + uniInvitationCode);
|
||||
|
||||
33
env.js
Normal file
@ -0,0 +1,33 @@
|
||||
// 参考文档: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/#envjs
|
||||
module.exports = {
|
||||
"is-custom-runtime": false,
|
||||
"UNI_TEST_CUSTOM_ENV": {},
|
||||
"compile": true,
|
||||
"h5": {
|
||||
"options": {
|
||||
"headless": true
|
||||
},
|
||||
"executablePath": ""
|
||||
},
|
||||
"mp-weixin": {
|
||||
"port": 9420,
|
||||
"account": "",
|
||||
"args": "",
|
||||
"cwd": "",
|
||||
"launch": true,
|
||||
"teardown": "disconnect",
|
||||
"remote": false,
|
||||
"executablePath": ""
|
||||
},
|
||||
"app-plus": {
|
||||
"android": {
|
||||
"id": "",
|
||||
"executablePath": ""
|
||||
},
|
||||
"version": "",
|
||||
"ios": {
|
||||
"id": "",
|
||||
"executablePath": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
11
jest.config.js
Normal file
@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
testTimeout: 10000,
|
||||
reporters: [
|
||||
'default'
|
||||
],
|
||||
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
|
||||
moduleFileExtensions: ['js', 'json'],
|
||||
rootDir: __dirname,
|
||||
testMatch: ["<rootDir>/pages/**/*test.[jt]s?(x)"],
|
||||
testPathIgnorePatterns: ['/node_modules/']
|
||||
}
|
||||
@ -1,43 +1,36 @@
|
||||
/* /// Pages-Tool: 该文件是pages-tool插件的配置文件,根据pages-config.json的配置,本文件的内容可能合并到pages.json*/
|
||||
{
|
||||
"pages": [
|
||||
// {
|
||||
// "path": "pages/grid/login",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom"
|
||||
// }
|
||||
// }
|
||||
// ,
|
||||
|
||||
{
|
||||
"path": "pages/grid/grid",
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "pages/ucenter",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "主页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/list/list",
|
||||
"path": "pages/cal/cal",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "计算"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/list/detail",
|
||||
"path": "pages/info/info",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/ucenter/ucenter",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
,{
|
||||
,
|
||||
{
|
||||
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
|
||||
"style": {
|
||||
"disableScroll": true,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
/* /// Pages-Tool: 该文件是pages-tool插件的配置文件,根据pages-config.json的配置,本文件的内容可能合并到pages.json*/
|
||||
{
|
||||
"tabBar": {
|
||||
"color": "#7A7E83",
|
||||
@ -6,23 +5,28 @@
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"list": [{
|
||||
"pagePath": "pages/grid/grid",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/list.png",
|
||||
"selectedIconPath": "static/tabbar/list_active.png",
|
||||
"text": "首页"
|
||||
}, {
|
||||
"pagePath": "pages/cal/cal",
|
||||
"iconPath": "static/tabbar/cal.png",
|
||||
"selectedIconPath": "static/tabbar/cal_active.png",
|
||||
"text": "计算"
|
||||
}, {
|
||||
"pagePath": "pages/info/info",
|
||||
"iconPath": "static/tabbar/info.png",
|
||||
"selectedIconPath": "static/tabbar/info_active.png",
|
||||
"text": "资料"
|
||||
}
|
||||
// , {
|
||||
// "pagePath": "pages/list/list",
|
||||
// "iconPath": "static/tabbar/grid.png",
|
||||
// "selectedIconPath": "static/tabbar/grid_active.png",
|
||||
// "text": "常用资料"
|
||||
// }
|
||||
|
||||
, {
|
||||
"pagePath": "pages/ucenter",
|
||||
"pagePath": "pages/ucenter/ucenter",
|
||||
"iconPath": "static/tabbar/me.png",
|
||||
"selectedIconPath": "static/tabbar/me_active.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}s
|
||||
60
pages.json
@ -1,42 +1,35 @@
|
||||
{
|
||||
"pages": [
|
||||
// {
|
||||
// "path": "pages/grid/login",
|
||||
// "style": {
|
||||
// "navigationStyle": "custom"
|
||||
// }
|
||||
// }
|
||||
// ,
|
||||
|
||||
{
|
||||
"path": "pages/grid/grid",
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{
|
||||
"path": "pages/ucenter",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "主页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/list/list",
|
||||
"path": "pages/cal/cal",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "计算"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/list/detail",
|
||||
"path": "pages/info/info",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "资料"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/ucenter/ucenter",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
,{
|
||||
,
|
||||
{
|
||||
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
|
||||
"style": {
|
||||
"disableScroll": true,
|
||||
@ -648,19 +641,24 @@
|
||||
"borderStyle": "black",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"list": [{
|
||||
"pagePath": "pages/grid/grid",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/list.png",
|
||||
"selectedIconPath": "static/tabbar/list_active.png",
|
||||
"text": "首页"
|
||||
}, {
|
||||
"pagePath": "pages/cal/cal",
|
||||
"iconPath": "static/tabbar/cal.png",
|
||||
"selectedIconPath": "static/tabbar/cal_active.png",
|
||||
"text": "计算"
|
||||
}, {
|
||||
"pagePath": "pages/info/info",
|
||||
"iconPath": "static/tabbar/info.png",
|
||||
"selectedIconPath": "static/tabbar/info_active.png",
|
||||
"text": "资料"
|
||||
}
|
||||
// , {
|
||||
// "pagePath": "pages/list/list",
|
||||
// "iconPath": "static/tabbar/grid.png",
|
||||
// "selectedIconPath": "static/tabbar/grid_active.png",
|
||||
// "text": "常用资料"
|
||||
// }
|
||||
|
||||
, {
|
||||
"pagePath": "pages/ucenter",
|
||||
"pagePath": "pages/ucenter/ucenter",
|
||||
"iconPath": "static/tabbar/me.png",
|
||||
"selectedIconPath": "static/tabbar/me_active.png",
|
||||
"text": "我的"
|
||||
|
||||
370
pages/cal/cal.vue
Normal file
@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<view class="warp">
|
||||
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="计算工具" />
|
||||
<view>
|
||||
<!-- 流量计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{ $t('llJs.grid') }}</text>
|
||||
</view>
|
||||
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item, index) in llJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/' + item.icon)" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 参数计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{ $t('wxcsJs.grid') }}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item, index) in wxcsJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/' + item.icon)" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- CNG计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{ $t('CNGJs.grid') }}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item, index) in CNGJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/' + item.icon)" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <!-- CNG计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{ $t('QtJs.grid') }}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item, index) in QtJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/' + item.icon)" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// getJsonTree,
|
||||
// groupBy
|
||||
// } from "@/js_sdk/util/jsonData";
|
||||
import deviceinfo from '@/js_sdk/dc-deviceinfo/deviceinfo.js';
|
||||
import { saveDepartStore, saveDictItemStore } from '@/js_sdk/util/dictTools';
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
import statusBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar';
|
||||
// #endif
|
||||
const db = uniCloud.database();
|
||||
|
||||
export default {
|
||||
// #ifdef APP-PLUS
|
||||
components: {
|
||||
statusBar
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
llJsgridList: [],
|
||||
wxcsJsgridList: [],
|
||||
CNGJsgridList: [],
|
||||
QtJsgridList: [],
|
||||
current: 0,
|
||||
hasLogin: false,
|
||||
CPUNo: [],
|
||||
msgList: []
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.hasLogin = uniCloud.getCurrentUserInfo().tokenExpired > Date.now();
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef APP
|
||||
|
||||
plus.device.getInfo({
|
||||
success: function (e) {
|
||||
console.log('getDeviceInfo success: ' + JSON.stringify(e));
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log('getDeviceInfo failed: ' + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
// this.CPUNo=JSON.stringify(plus.device.getInfo())
|
||||
//#endif
|
||||
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
// console.log(res)
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad() {
|
||||
this.getGrid();
|
||||
saveDictItemStore();
|
||||
saveDepartStore();
|
||||
},
|
||||
methods: {
|
||||
getGrid() {
|
||||
let gridList = [];
|
||||
gridList.push({
|
||||
type: this.$t('llJs.cysllJs.title'),
|
||||
url: this.$t('llJs.cysllJs.url'),
|
||||
icon: this.$t('llJs.cysllJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('llJs.sdsllJs.title'),
|
||||
url: this.$t('llJs.sdsllJs.url'),
|
||||
icon: this.$t('llJs.sdsllJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('llJs.ljlllJs.title'),
|
||||
url: this.$t('llJs.ljlllJs.url'),
|
||||
icon: this.$t('llJs.ljlllJs.icon')
|
||||
});
|
||||
|
||||
this.llJsgridList = gridList;
|
||||
gridList = [];
|
||||
gridList.push({
|
||||
type: this.$t('wxcsJs.ysyzJs.title'),
|
||||
url: this.$t('wxcsJs.ysyzJs.url'),
|
||||
icon: this.$t('wxcsJs.ysyzJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('wxcsJs.rzJs.title'),
|
||||
url: this.$t('wxcsJs.rzJs.url'),
|
||||
icon: this.$t('wxcsJs.rzJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('wxcsJs.qtJs.title'),
|
||||
url: this.$t('wxcsJs.qtJs.url'),
|
||||
icon: this.$t('wxcsJs.qtJs.icon')
|
||||
});
|
||||
this.wxcsJsgridList = gridList;
|
||||
|
||||
gridList = [];
|
||||
|
||||
gridList.push({
|
||||
type: this.$t('CNGJs.srjJs.title'),
|
||||
url: this.$t('CNGJs.srjJs.url'),
|
||||
icon: this.$t('CNGJs.srjJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('CNGJs.zxcJs.title'),
|
||||
url: this.$t('CNGJs.zxcJs.url'),
|
||||
icon: this.$t('CNGJs.zxcJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('CNGJs.LNGQhJs.title'),
|
||||
url: this.$t('CNGJs.LNGQhJs.url'),
|
||||
icon: this.$t('CNGJs.LNGQhJs.icon')
|
||||
});
|
||||
this.CNGJsgridList = gridList;
|
||||
gridList = [];
|
||||
|
||||
gridList.push({
|
||||
type: this.$t('QtJs.ZBGJs.title'),
|
||||
url: this.$t('QtJs.ZBGJs.url'),
|
||||
icon: this.$t('QtJs.ZBGJs.icon')
|
||||
});
|
||||
gridList.push({
|
||||
type: this.$t('QtJs.srjBGJs.title'),
|
||||
url: this.$t('QtJs.srjBGJs.url'),
|
||||
icon: this.$t('QtJs.srjBGJs.icon')
|
||||
});
|
||||
// gridList.push({
|
||||
// "type": this.$t('QtJs.SqgyJs.title'),
|
||||
// "url": this.$t('QtJs.SqgyJs.url')
|
||||
// })
|
||||
this.QtJsgridList = gridList;
|
||||
},
|
||||
|
||||
/**
|
||||
* banner加载后触发的回调
|
||||
*/
|
||||
onqueryload(data) {
|
||||
// console.log(JSON.stringify(data))
|
||||
},
|
||||
changeSwiper(e) {
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
/**
|
||||
* 点击banner的处理
|
||||
*/
|
||||
clickBannerItem(item) {
|
||||
// 有外部链接-跳转url
|
||||
if (item.open_url) {
|
||||
uni.navigateTo({
|
||||
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + item.open_url + '&title=' + item.title,
|
||||
success: (res) => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
// 其余业务处理
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.section-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: left;
|
||||
padding-left: calc(10vw / 2);
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.decoration {
|
||||
width: 4px;
|
||||
height: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: #2979ff;
|
||||
// margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.section-text {
|
||||
color: blue;
|
||||
margin-left: 10rpx;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* #ifdef APP-NVUE */
|
||||
.warp {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.Grid {
|
||||
width: 90vw;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-content: space-between;
|
||||
padding-left: calc(10vw / 2);
|
||||
column-gap: calc(25% / 3);
|
||||
row-gap: 5rpx;
|
||||
box-sizing: content-box;
|
||||
|
||||
.Grid-Item {
|
||||
width: 25%;
|
||||
height: 150rpx;
|
||||
text-align: center;
|
||||
border: 0rpx solid #ccc;
|
||||
box-sizing: content-box;
|
||||
background: #ffffff;
|
||||
background-image: '@/static/uni-center/headers.png';
|
||||
|
||||
.GSimg {
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
text-align: center;
|
||||
|
||||
.Image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.GStitle {
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: orangered;
|
||||
font-size: 26rpx;
|
||||
padding-top: 15px;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner-image {
|
||||
width: 750rpx;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.search-icons {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.search-container-bar {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* #ifndef APP-NVUE || VUE3*/
|
||||
::v-deep
|
||||
|
||||
/* #endif */
|
||||
.uni-searchbar__box {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* #ifndef APP-NVUE || VUE3 */
|
||||
::v-deep
|
||||
|
||||
/* #endif */
|
||||
.uni-input-placeholder {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
@ -1,399 +0,0 @@
|
||||
<template>
|
||||
<view class="warp">
|
||||
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="天然气计算工具集" />
|
||||
<view>
|
||||
|
||||
|
||||
|
||||
<!-- 流量计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{$t('llJs.grid')}}</text>
|
||||
</view>
|
||||
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item,index) in llJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 参数计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{$t('wxcsJs.grid')}}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item,index) in wxcsJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- CNG计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{$t('CNGJs.grid')}}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item,index) in CNGJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <!-- CNG计算 -->
|
||||
<view class="section-box">
|
||||
<text class="decoration"></text>
|
||||
<text class="section-text">{{$t('QtJs.grid')}}</text>
|
||||
</view>
|
||||
<view class="Grid">
|
||||
<view class="Grid-Item" v-for="(item,index) in QtJsgridList" :key="index">
|
||||
<navigator :url="item.url">
|
||||
<view class="GSimg">
|
||||
<image class="Image" :src="getStaticFilePath('mianicon/'+item.icon)" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<view class="GStitle">{{ item.type }}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// getJsonTree,
|
||||
// groupBy
|
||||
// } from "@/js_sdk/util/jsonData";
|
||||
import deviceinfo from '@/js_sdk/dc-deviceinfo/deviceinfo.js'
|
||||
import {
|
||||
saveDepartStore,
|
||||
saveDictItemStore
|
||||
} from '@/js_sdk/util/dictTools';
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
// #endif
|
||||
const db = uniCloud.database();
|
||||
|
||||
export default {
|
||||
// #ifdef APP-PLUS
|
||||
components: {
|
||||
statusBar
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
llJsgridList: [],
|
||||
wxcsJsgridList: [],
|
||||
CNGJsgridList: [],
|
||||
QtJsgridList: [],
|
||||
current: 0,
|
||||
hasLogin: false,
|
||||
CPUNo: [],
|
||||
msgList: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.hasLogin = uniCloud.getCurrentUserInfo().tokenExpired > Date.now()
|
||||
},
|
||||
mounted() {
|
||||
|
||||
//#ifdef APP
|
||||
|
||||
plus.device.getInfo({
|
||||
success: function(e) {
|
||||
console.log('getDeviceInfo success: ' + JSON.stringify(e));
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log('getDeviceInfo failed: ' + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
// this.CPUNo=JSON.stringify(plus.device.getInfo())
|
||||
//#endif
|
||||
|
||||
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
// console.log(res)
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.getGrid();
|
||||
saveDictItemStore();
|
||||
saveDepartStore();
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getGrid() {
|
||||
let gridList = []
|
||||
gridList.push({
|
||||
"type": this.$t('llJs.cysllJs.title'),
|
||||
"url": this.$t('llJs.cysllJs.url'),
|
||||
"icon": this.$t('llJs.cysllJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('llJs.sdsllJs.title'),
|
||||
"url": this.$t('llJs.sdsllJs.url'),
|
||||
"icon": this.$t('llJs.sdsllJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('llJs.ljlllJs.title'),
|
||||
"url": this.$t('llJs.ljlllJs.url'),
|
||||
"icon": this.$t('llJs.ljlllJs.icon')
|
||||
})
|
||||
|
||||
this.llJsgridList = gridList
|
||||
gridList = []
|
||||
gridList.push({
|
||||
"type": this.$t('wxcsJs.ysyzJs.title'),
|
||||
"url": this.$t('wxcsJs.ysyzJs.url'),
|
||||
"icon": this.$t('wxcsJs.ysyzJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('wxcsJs.rzJs.title'),
|
||||
"url": this.$t('wxcsJs.rzJs.url'),
|
||||
"icon": this.$t('wxcsJs.rzJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('wxcsJs.qtJs.title'),
|
||||
"url": this.$t('wxcsJs.qtJs.url'),
|
||||
"icon": this.$t('wxcsJs.qtJs.icon')
|
||||
})
|
||||
this.wxcsJsgridList = gridList
|
||||
|
||||
gridList = []
|
||||
|
||||
gridList.push({
|
||||
"type": this.$t('CNGJs.srjJs.title'),
|
||||
"url": this.$t('CNGJs.srjJs.url'),
|
||||
"icon": this.$t('CNGJs.srjJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('CNGJs.zxcJs.title'),
|
||||
"url": this.$t('CNGJs.zxcJs.url'),
|
||||
"icon": this.$t('CNGJs.zxcJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('CNGJs.LNGQhJs.title'),
|
||||
"url": this.$t('CNGJs.LNGQhJs.url'),
|
||||
"icon": this.$t('CNGJs.LNGQhJs.icon')
|
||||
})
|
||||
this.CNGJsgridList = gridList
|
||||
gridList = []
|
||||
|
||||
gridList.push({
|
||||
"type": this.$t('QtJs.ZBGJs.title'),
|
||||
"url": this.$t('QtJs.ZBGJs.url'),
|
||||
"icon": this.$t('QtJs.ZBGJs.icon')
|
||||
})
|
||||
gridList.push({
|
||||
"type": this.$t('QtJs.srjBGJs.title'),
|
||||
"url": this.$t('QtJs.srjBGJs.url'),
|
||||
"icon": this.$t('QtJs.srjBGJs.icon')
|
||||
})
|
||||
// gridList.push({
|
||||
// "type": this.$t('QtJs.SqgyJs.title'),
|
||||
// "url": this.$t('QtJs.SqgyJs.url')
|
||||
// })
|
||||
this.QtJsgridList = gridList
|
||||
},
|
||||
|
||||
/**
|
||||
* banner加载后触发的回调
|
||||
*/
|
||||
onqueryload(data) {
|
||||
// console.log(JSON.stringify(data))
|
||||
},
|
||||
changeSwiper(e) {
|
||||
this.current = e.detail.current
|
||||
},
|
||||
/**
|
||||
* 点击banner的处理
|
||||
*/
|
||||
clickBannerItem(item) {
|
||||
// 有外部链接-跳转url
|
||||
if (item.open_url) {
|
||||
uni.navigateTo({
|
||||
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + item.open_url +
|
||||
'&title=' + item.title,
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
// 其余业务处理
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
view {
|
||||
font-size: 14px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* #endif */
|
||||
|
||||
.section-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: left;
|
||||
padding-left: calc(10vw /2);
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.decoration {
|
||||
width: 4px;
|
||||
height: 12px;
|
||||
border-radius: 10px;
|
||||
background-color: #2979ff;
|
||||
// margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.section-text {
|
||||
color: blue;
|
||||
margin-left: 10rpx;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* #ifdef APP-NVUE */
|
||||
.warp {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
|
||||
|
||||
.Grid {
|
||||
width: 90vw;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-content: space-between;
|
||||
padding-left: calc(10vw /2);
|
||||
column-gap: calc(25% / 3);
|
||||
row-gap: 5rpx;
|
||||
box-sizing: content-box;
|
||||
|
||||
.Grid-Item {
|
||||
width: 25%;
|
||||
height: 150rpx;
|
||||
text-align: center;
|
||||
border: 0rpx solid #ccc;
|
||||
box-sizing: content-box;
|
||||
background: #ffffff;
|
||||
background-image: "@/static/uni-center/headers.png";
|
||||
|
||||
.GSimg {
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
text-align: center;
|
||||
|
||||
.Image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.GStitle {
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: orangered;
|
||||
font-size: 26rpx;
|
||||
padding-top: 15px;
|
||||
margin-top: 80rpx;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.banner-image {
|
||||
width: 750rpx;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.swiper-box {
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.search-icons {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.search-container-bar {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* #ifndef APP-NVUE || VUE3*/
|
||||
::v-deep
|
||||
|
||||
/* #endif */
|
||||
.uni-searchbar__box {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* #ifndef APP-NVUE || VUE3 */
|
||||
::v-deep
|
||||
|
||||
/* #endif */
|
||||
.uni-input-placeholder {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
@ -1,21 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
onLoad() {
|
||||
uni.navigateTo({
|
||||
url: '/uni_modules/uni-id-pages/pages/login/login-withpwd'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
52
pages/index/index.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/logo.png"></image>
|
||||
<view class="text-area">
|
||||
<text class="title">{{title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: 'Hello'
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 200rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 200rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.text-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #8f8f94;
|
||||
}
|
||||
</style>
|
||||
9
pages/info/info.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<view class="warp">
|
||||
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar title="文档资料" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script></script>
|
||||
|
||||
<style></style>
|
||||
@ -1,373 +0,0 @@
|
||||
<template>
|
||||
<!--
|
||||
本页面模板教程:https://ext.dcloud.net.cn/plugin?id=2717
|
||||
uni-list 文档:https://ext.dcloud.net.cn/plugin?id=24
|
||||
uniCloud 文档:https://uniapp.dcloud.io/uniCloud/README
|
||||
unicloud-db 组件文档:https://uniapp.dcloud.net.cn/uniCloud/unicloud-db-component
|
||||
DB Schema 规范:https://uniapp.dcloud.net.cn/uniCloud/schema
|
||||
-->
|
||||
<view class="article">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<uni-nav-bar :statusBar="true" :border="false"></uni-nav-bar>
|
||||
<!-- #endif -->
|
||||
<view class="article-title">{{ title }}</view>
|
||||
<unicloud-db v-slot:default="{data, loading, error, options}" :options="formData" collection="opendb-news-articles,uni-id-users"
|
||||
:field="field" :getone="true" :where="where" :manual="true" ref="detail"
|
||||
foreignKey="opendb-news-articles.user_id" @load="loadData">
|
||||
<template v-if="!loading && data">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item thumbSize="lg" :thumb="data.image">
|
||||
<!-- 通过body插槽定义作者信息内容 -->
|
||||
<template v-slot:body>
|
||||
<view class="header-content">
|
||||
<view class="uni-title">{{data.user_id && data.user_id[0] && data.user_id[0].nickname || '未知'}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<view class="footer">
|
||||
<view class="uni-note">更新于
|
||||
<uni-dateformat :date="data.last_modify_date" format="yyyy-MM-dd hh:mm"
|
||||
:threshold="[60000, 2592000000]" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
<view class="banner">
|
||||
<!-- 文章开头,缩略图 -->
|
||||
<image class="banner-img" :src="data.avatar" mode="widthFix"></image>
|
||||
<!-- 文章摘要 -->
|
||||
<view class="banner-title">
|
||||
<text class="uni-ellipsis">{{data.excerpt}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="article-content">
|
||||
<rich-text :nodes="data.content"></rich-text>
|
||||
</view>
|
||||
</template>
|
||||
</unicloud-db>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP
|
||||
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
|
||||
import uniNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue';
|
||||
const uniShare = new UniShare()
|
||||
// #endif
|
||||
const db = uniCloud.database();
|
||||
const readNewsLog = db.collection('read-news-log')
|
||||
export default {
|
||||
// #ifdef APP
|
||||
components:{
|
||||
"uni-nav-bar":uniNavBar
|
||||
},
|
||||
onBackPress({from}) {
|
||||
if(from == 'backbutton'){
|
||||
if(uniShare.isShow){
|
||||
this.$nextTick(function(){
|
||||
console.log(uniShare);
|
||||
uniShare.hide()
|
||||
})
|
||||
}
|
||||
return uniShare.isShow;
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
// 当前显示 _id
|
||||
id: "",
|
||||
title: 'title',
|
||||
// 数据表名
|
||||
// 查询字段,多个字段用 , 分割
|
||||
field: 'user_id.nickname,user_id._id,avatar,excerpt,last_modify_date,comment_count,like_count,title,content',
|
||||
formData: {
|
||||
noData: '<p style="text-align:center;color:#666">详情加载中...</p>'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
uniStarterConfig() {
|
||||
return getApp().globalData.config
|
||||
},
|
||||
where(){
|
||||
//拼接where条件 查询条件 ,更多详见 :https://uniapp.dcloud.net.cn/uniCloud/unicloud-db?id=jsquery
|
||||
return `_id =="${this.id}"`
|
||||
}
|
||||
},
|
||||
onLoad(event) {
|
||||
//获取真实新闻id,通常 id 来自上一个页面
|
||||
if (event.id) {
|
||||
this.id = event.id
|
||||
}
|
||||
//若上一页传递了标题过来,则设置导航栏标题
|
||||
if (event.title) {
|
||||
this.title = event.title
|
||||
uni.setNavigationBarTitle({
|
||||
title: event.title
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// 开始加载数据,修改 where 条件后才开始去加载 clinetDB 的数据 ,需要等组件渲染完毕后才开始执行 loadData,所以不能再 onLoad 中执行
|
||||
if (this.id) { // ID 不为空,则发起查询
|
||||
this.$refs.detail.loadData()
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: this.$t('listDetail.newsErr')
|
||||
})
|
||||
}
|
||||
},
|
||||
onNavigationBarButtonTap(event) {
|
||||
if (event.type == 'share') {
|
||||
this.shareClick();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
$log(...args){
|
||||
console.log('args',...args,this.id)
|
||||
},
|
||||
setReadNewsLog(){
|
||||
let item = {
|
||||
"article_id":this.id,
|
||||
"last_time":Date.now()
|
||||
},
|
||||
readNewsLog = uni.getStorageSync('readNewsLog')||[],
|
||||
index = -1;
|
||||
readNewsLog.forEach(({article_id},i)=>{
|
||||
if(article_id == item.article_id){
|
||||
index = i
|
||||
}
|
||||
})
|
||||
if(index === -1){
|
||||
readNewsLog.push(item)
|
||||
}else{
|
||||
readNewsLog.splice(index,1,item)
|
||||
}
|
||||
uni.setStorageSync('readNewsLog',readNewsLog)
|
||||
console.log(readNewsLog);
|
||||
},
|
||||
setFavorite() {
|
||||
if ( uniCloud.getCurrentUserInfo().tokenExpired < Date.now() ){
|
||||
return console.log('未登录用户');
|
||||
}
|
||||
let article_id = this.id,
|
||||
last_time = Date.now();
|
||||
console.log({article_id,last_time});
|
||||
readNewsLog.where(`"article_id" == "${article_id}" && "user_id"==$env.uid`)
|
||||
.update({last_time})
|
||||
.then(({result:{updated}}) => {
|
||||
console.log('updated',updated);
|
||||
if (!updated) {
|
||||
readNewsLog.add({article_id}).then(e=>{
|
||||
console.log(e);
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
loadData(data) {
|
||||
//如果上一页未传递标题过来(如搜索直达详情),则从新闻详情中读取标题
|
||||
if (this.title == '' && data[0].title) {
|
||||
this.title = data[0].title
|
||||
uni.setNavigationBarTitle({
|
||||
title: data[0].title
|
||||
});
|
||||
|
||||
}
|
||||
this.setReadNewsLog();
|
||||
},
|
||||
/**
|
||||
* followClick
|
||||
* 点击关注
|
||||
*/
|
||||
followClick() {
|
||||
uni.showToast({
|
||||
title:this.$t('listDetail.follow'),
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 分享该文章
|
||||
*/
|
||||
// #ifdef APP
|
||||
shareClick() {
|
||||
let {
|
||||
_id,
|
||||
title,
|
||||
excerpt,
|
||||
avatar
|
||||
} = this.$refs.detail.dataList
|
||||
console.log( JSON.stringify({
|
||||
_id,
|
||||
title,
|
||||
excerpt,
|
||||
avatar
|
||||
}) );
|
||||
uniShare.show({
|
||||
content: { //公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
type: 0,
|
||||
href: this.uniStarterConfig.h5.url + `/#/pages/list/detail?id=${_id}&title=${title}`,
|
||||
title: this.title,
|
||||
summary: excerpt,
|
||||
imageUrl: avatar + '?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题
|
||||
},
|
||||
menus: [{
|
||||
"img": "/static/app-plus/sharemenu/wechatfriend.png",
|
||||
"text": this.$t('common.wechatFriends'),
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneSession"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/wechatmoments.png",
|
||||
"text": this.$t('common.wechatBbs'),
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneTimeline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/mp_weixin.png",
|
||||
"text": this.$t('common.wechatApplet'),
|
||||
"share": {
|
||||
provider: "weixin",
|
||||
scene: "WXSceneSession",
|
||||
type: 5,
|
||||
miniProgram: {
|
||||
id: this.uniStarterConfig.mp.weixin.id,
|
||||
path: `/pages/list/detail?id=${_id}&title=${title}`,
|
||||
webUrl: this.uniStarterConfig.h5.url +
|
||||
`/#/pages/list/detail?id=${_id}&title=${title}`,
|
||||
type: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/weibo.png",
|
||||
"text": this.$t('common.weibo'),
|
||||
"share": {
|
||||
"provider": "sinaweibo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/qq.png",
|
||||
"text": "QQ",
|
||||
"share": {
|
||||
"provider": "qq"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/copyurl.png",
|
||||
"text": this.$t('common.copy'),
|
||||
"share": "copyurl"
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/more.png",
|
||||
"text": this.$t('common.more'),
|
||||
"share": "shareSystem"
|
||||
}
|
||||
],
|
||||
cancelText: this.$t('common.cancelShare'),
|
||||
}, e => { //callback
|
||||
console.log(e);
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.header-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 标题 */
|
||||
.uni-title {
|
||||
display: flex;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #3b4144;
|
||||
}
|
||||
|
||||
/* 描述 额外文本 */
|
||||
.uni-note {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
color: #fff;
|
||||
background-color: #ff5a5f;
|
||||
}
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
margin: 0 15px;
|
||||
height: 180px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.banner-img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.banner-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
padding: 0 15px;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
height: 30px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.article-title {
|
||||
padding: 20px 15px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
padding: 15px;
|
||||
font-size: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@ -1,206 +0,0 @@
|
||||
<template>
|
||||
<view class="pages">
|
||||
<!-- #ifndef H5 -->
|
||||
<statusBar></statusBar>
|
||||
<!-- #endif -->
|
||||
<info-list></info-list>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let cdbRef;
|
||||
|
||||
import infoList from '@/pagesPackage/ngtools_information/list.vue'
|
||||
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
|
||||
import Gps from '@/uni_modules/json-gps/js_sdk/gps.js';
|
||||
const gps = new Gps(),
|
||||
db = uniCloud.database();
|
||||
|
||||
export default {
|
||||
components: {
|
||||
statusBar,
|
||||
infoList
|
||||
},
|
||||
computed: {
|
||||
inputPlaceholder(e) {
|
||||
if (uni.getStorageSync('CURRENT_LANG') == "en") {
|
||||
return 'Please enter the search content'
|
||||
} else {
|
||||
return '请输入搜索内容'
|
||||
}
|
||||
},
|
||||
colList() {
|
||||
return [
|
||||
db.collection('opendb-news-articles').where(this.where).field(
|
||||
'avatar,title,last_modify_date,user_id').getTemp(),
|
||||
db.collection('uni-id-users').field('_id,nickname').getTemp()
|
||||
]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
where: '"article_status" == 1',
|
||||
keyword: "",
|
||||
showRefresh: false,
|
||||
listHight: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
keyword(keyword, oldValue) {
|
||||
let where = '"article_status" == 1 '
|
||||
if (keyword) {
|
||||
this.where = where + `&& /${keyword}/.test(title)`;
|
||||
} else {
|
||||
this.where = where;
|
||||
}
|
||||
}
|
||||
},
|
||||
async onReady() {
|
||||
// #ifdef APP-NVUE
|
||||
/* 可用窗口高度 - 搜索框高 - 状态栏高 */
|
||||
this.listHight = uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - 50 +
|
||||
'px';
|
||||
// #endif
|
||||
// #ifndef APP-NVUE
|
||||
this.listHight = 'auto'
|
||||
// #endif
|
||||
cdbRef = this.$refs.udb
|
||||
},
|
||||
async onShow() {
|
||||
this.keyword = getApp().globalData.searchText
|
||||
getApp().globalData.searchText = ''
|
||||
//这里仅演示如何,在onShow生命周期获取设备位置,并在设备或者应用没有权限时自动引导。设置完毕自动重新获取。
|
||||
//你可以基于他做自己的业务,比如:根据距离由近到远排序列表数据等
|
||||
// uni.showLoading({
|
||||
// title:"获取定位中"
|
||||
// });
|
||||
//默认h5端不获取定位
|
||||
// #ifndef H5
|
||||
let location = await gps.getLocation({
|
||||
geocode: true
|
||||
})
|
||||
// console.log(location);
|
||||
// #endif
|
||||
// if(location){
|
||||
// uni.showToast({
|
||||
// title: JSON.stringify(location),
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
// uni.hideLoading()
|
||||
},
|
||||
methods: {
|
||||
searchClick(e) { //点击搜索框
|
||||
uni.hideKeyboard();
|
||||
uni.navigateTo({
|
||||
url: '/pages/list/search/search',
|
||||
animationType: 'fade-in'
|
||||
});
|
||||
},
|
||||
retry() {
|
||||
this.refresh()
|
||||
},
|
||||
refresh() {
|
||||
cdbRef.loadData({
|
||||
clear: true
|
||||
}, () => {
|
||||
uni.stopPullDownRefresh()
|
||||
// #ifdef APP-NVUE
|
||||
this.showRefresh = false
|
||||
// #endif
|
||||
console.log('end');
|
||||
})
|
||||
console.log('refresh');
|
||||
},
|
||||
loadMore() {
|
||||
cdbRef.loadMore()
|
||||
},
|
||||
onqueryerror(e) {
|
||||
console.error(e);
|
||||
},
|
||||
onpullingdown(e) {
|
||||
console.log(e);
|
||||
this.showRefresh = true
|
||||
if (e.pullingDistance > 100) {
|
||||
this.refresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
// #ifndef APP-NVUE
|
||||
onPullDownRefresh() {
|
||||
this.refresh()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.loadMore()
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* #ifndef APP-NVUE */
|
||||
view {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.pages {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.main {
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.info {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.author,
|
||||
.last_modify_date {
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.uni-search-box {
|
||||
background-color: #FFFFFF;
|
||||
position: sticky;
|
||||
height: 50px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* #ifndef APP-PLUS */
|
||||
z-index: 9;
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
width: 580rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.cover-search-bar {
|
||||
height: 50px;
|
||||
position: relative;
|
||||
top: -50px;
|
||||
margin-bottom: -50px;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 999;
|
||||
/* #endif */
|
||||
}
|
||||
</style>
|
||||
@ -1,505 +0,0 @@
|
||||
<template>
|
||||
<view class="center">
|
||||
<uni-sign-in ref="signIn"></uni-sign-in>
|
||||
<view class="userInfo" @click.capture="toUserInfo">
|
||||
<cloud-image width="150rpx" height="150rpx" v-if="hasLogin&&userInfo.avatar_file&&userInfo.avatar_file.url"
|
||||
:src="userInfo.avatar_file.url"></cloud-image>
|
||||
|
||||
<view v-else class="defaultAvatarUrl">
|
||||
<uni-icons color="#ffffff" size="50" type="person-filled" />
|
||||
</view>
|
||||
|
||||
<view class="logo-title">
|
||||
|
||||
<text class="uer-name" v-if="hasLogin">{{userInfo.nickname||userInfo.username||userInfo.mobile}}</text>
|
||||
<text class="uer-name" v-else>{{$t('mine.notLogged')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <uni-grid class="grid" :column="4" :showBorder="false" :square="true">
|
||||
<uni-grid-item class="item" v-for="(item,index) in gridList" @click.native="tapGrid(index)" :key="index">
|
||||
<uni-icons class="icon" color="#007AFF" :type="item.icon" size="26"></uni-icons>
|
||||
<text class="text">{{item.text}}</text>
|
||||
</uni-grid-item>
|
||||
</uni-grid> -->
|
||||
<uni-list class="center-list" v-for="(sublist , index) in ucenterList" :key="index">
|
||||
<uni-list-item v-for="(item,i) in sublist" :title="item.title" link :rightText="item.rightText" :key="i"
|
||||
:clickable="true" :to="item.to" @click="ucenterListClick(item)" :show-extra-icon="true"
|
||||
:extraIcon="{type:item.icon,color:'#999'}">
|
||||
<template v-slot:footer>
|
||||
<view v-if="item.showBadge" class="item-footer">
|
||||
<text class="item-footer-text">{{item.rightText}}</text>
|
||||
<view class="item-footer-badge"></view>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||
import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version';
|
||||
// #ifdef APP
|
||||
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
|
||||
const uniShare = new UniShare()
|
||||
// #endif
|
||||
const db = uniCloud.database();
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js'
|
||||
export default {
|
||||
// #ifdef APP
|
||||
onBackPress({
|
||||
from
|
||||
}) {
|
||||
if (from == 'backbutton') {
|
||||
this.$nextTick(function() {
|
||||
uniShare.hide()
|
||||
})
|
||||
return uniShare.isShow;
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
gridList: [{
|
||||
"text": this.$t('mine.dict'),
|
||||
"icon": "chat"
|
||||
},
|
||||
{
|
||||
"text": this.$t('mine.showText'),
|
||||
"icon": "cloud-upload"
|
||||
},
|
||||
{
|
||||
"text": this.$t('mine.showText'),
|
||||
"icon": "contact"
|
||||
},
|
||||
{
|
||||
"text": this.$t('mine.showText'),
|
||||
"icon": "download"
|
||||
}
|
||||
],
|
||||
ucenterList: [
|
||||
[
|
||||
|
||||
{
|
||||
"title": this.$t('mine.dict'),
|
||||
"event": 'dictSetting',
|
||||
"icon": "compose"
|
||||
},
|
||||
{
|
||||
"title": this.$t('mine.depart'),
|
||||
"event": 'departSetting',
|
||||
"icon": "compose"
|
||||
},
|
||||
|
||||
// {
|
||||
// "title": this.$t('mine.myPay'),
|
||||
// "event": 'myPaySetting',
|
||||
// "icon": "compose"
|
||||
// },
|
||||
|
||||
|
||||
// // #ifdef APP-PLUS
|
||||
// {
|
||||
// "title": this.$t('mine.toEvaluate'),
|
||||
// "event": 'gotoMarket',
|
||||
// "icon": "star"
|
||||
// },
|
||||
// //#endif
|
||||
// {
|
||||
// "title":this.$t('mine.readArticles'),
|
||||
// "to": '/pages/ucenter/read-news-log/read-news-log',
|
||||
// "icon": "flag"
|
||||
// },
|
||||
// {
|
||||
// "title": this.$t('mine.myScore'),
|
||||
// "to": '',
|
||||
// "event": 'getScore',
|
||||
// "icon": "paperplane"
|
||||
// }
|
||||
// // #ifdef APP-PLUS
|
||||
// , {
|
||||
// "title": this.$t('mine.invite'),
|
||||
// "event": 'share',
|
||||
// "icon": "redo"
|
||||
// }
|
||||
// // #endif
|
||||
],
|
||||
[
|
||||
// {
|
||||
// "title": this.$t('mine.feedback'),
|
||||
// "to": '/uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback',
|
||||
// "icon": "help"
|
||||
// },
|
||||
{
|
||||
"title": this.$t('mine.settings'),
|
||||
"to": '/pagesPackage/ucenter/settings/settings',
|
||||
"icon": "gear"
|
||||
}],
|
||||
// #ifdef APP-PLUS
|
||||
[{
|
||||
"title": this.$t('mine.about'),
|
||||
"to": '/pagesPackage/ucenter/about/about',
|
||||
"icon": "info"
|
||||
}]
|
||||
// #endif
|
||||
],
|
||||
listStyles: {
|
||||
"height": "150rpx", // 边框高度
|
||||
"width": "150rpx", // 边框宽度
|
||||
"border": { // 如果为 Boolean 值,可以控制边框显示与否
|
||||
"color": "#eee", // 边框颜色
|
||||
"width": "1px", // 边框宽度
|
||||
"style": "solid", // 边框样式
|
||||
"radius": "100%" // 边框圆角,支持百分比
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
//#ifdef APP-PLUS
|
||||
this.ucenterList[this.ucenterList.length - 2].unshift({
|
||||
title: this.$t('mine.checkUpdate'), // this.this.$t('mine.checkUpdate')"检查更新"
|
||||
rightText: this.appVersion.version + '-' + this.appVersion.versionCode,
|
||||
event: 'checkVersion',
|
||||
icon: 'loop',
|
||||
showBadge: this.appVersion.hasNew
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
onShow() {},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return store.userInfo
|
||||
},
|
||||
hasLogin() {
|
||||
return store.hasLogin
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
appVersion() {
|
||||
return getApp().appVersion
|
||||
},
|
||||
// #endif
|
||||
appConfig() {
|
||||
return getApp().globalData.config
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toSettings() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/ucenter/settings/settings"
|
||||
})
|
||||
},
|
||||
signIn() { //普通签到
|
||||
this.$refs.signIn.open()
|
||||
},
|
||||
dictSetting() { //数据字典设置
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pagesPackage/ngTools_Dict/list"
|
||||
})
|
||||
|
||||
},
|
||||
departSetting() { //组织机构设置
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pagesPackage/ngTools_depart/list"
|
||||
})
|
||||
|
||||
},
|
||||
myPaySetting() { //购买打赏
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pagesPackage/ucenter/pay/index"
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 个人中心项目列表点击事件
|
||||
*/
|
||||
ucenterListClick(item) {
|
||||
if (!item.to && item.event) {
|
||||
this[item.event]();
|
||||
}
|
||||
},
|
||||
async checkVersion() {
|
||||
let res = await callCheckVersion()
|
||||
console.log(res);
|
||||
if (res.result.code > 0) {
|
||||
checkUpdate()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.result.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
toUserInfo() {
|
||||
uni.navigateTo({
|
||||
url: '/uni_modules/uni-id-pages/pages/userinfo/userinfo'
|
||||
})
|
||||
},
|
||||
tapGrid(index) {
|
||||
uni.showToast({
|
||||
// title: '你点击了,第' + (index + 1) + '个',
|
||||
title: this.$t('mine.clicked') + " " + (index + 1),
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 去应用市场评分
|
||||
*/
|
||||
gotoMarket() {
|
||||
// #ifdef APP-PLUS
|
||||
if (uni.getSystemInfoSync().platform == "ios") {
|
||||
// 这里填写appstore应用id
|
||||
let appstoreid = this.appConfig.marketId.ios; // 'id1417078253';
|
||||
console.log({
|
||||
appstoreid
|
||||
});
|
||||
plus.runtime.openURL("itms-apps://" + 'itunes.apple.com/cn/app/wechat/' + appstoreid + '?mt=8',
|
||||
err => {
|
||||
console.log('plus.runtime.openURL err:' + JSON.stringify(err));
|
||||
});
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform == "android") {
|
||||
var Uri = plus.android.importClass("android.net.Uri");
|
||||
var uri = Uri.parse("market://details?id=" + this.appConfig.marketId.android);
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
main.startActivity(intent);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 获取积分信息
|
||||
*/
|
||||
getScore() {
|
||||
if (!this.userInfo) return uni.showToast({
|
||||
title: this.$t('mine.checkScore'),
|
||||
icon: 'none'
|
||||
});
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
db.collection("uni-id-scores")
|
||||
.where('"user_id" == $env.uid')
|
||||
.field('score,balance')
|
||||
.orderBy("create_date", "desc")
|
||||
.limit(1)
|
||||
.get()
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const data = res.result.data[0];
|
||||
let msg = '';
|
||||
msg = data ? (this.$t('mine.currentScore') + data.balance) : this.$t('mine.noScore');
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
});
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
async share() {
|
||||
let {
|
||||
result
|
||||
} = await db.collection('uni-id-users').where("'_id' == $cloudEnv_uid").field('my_invite_code').get()
|
||||
let myInviteCode = result.data[0].my_invite_code
|
||||
if (!myInviteCode) {
|
||||
return uni.showToast({
|
||||
title: '请检查uni-config-center中uni-id配置,是否已启用 autoSetInviteCode',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
console.log({
|
||||
myInviteCode
|
||||
});
|
||||
let {
|
||||
appName,
|
||||
logo,
|
||||
company,
|
||||
slogan
|
||||
} = this.appConfig.about
|
||||
// #ifdef APP-PLUS
|
||||
uniShare.show({
|
||||
content: { //公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
type: 0,
|
||||
href: this.appConfig.h5.url +
|
||||
`/#/pages/ucenter/invite/invite?code=uniInvitationCode:${myInviteCode}`,
|
||||
title: appName,
|
||||
summary: slogan,
|
||||
imageUrl: logo +
|
||||
'?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题
|
||||
},
|
||||
menus: [{
|
||||
"img": "/static/app-plus/sharemenu/wechatfriend.png",
|
||||
"text": this.$t('common.wechatFriends'),
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneSession"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/wechatmoments.png",
|
||||
"text": this.$t('common.wechatBbs'),
|
||||
"share": {
|
||||
"provider": "weixin",
|
||||
"scene": "WXSceneTimeline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/weibo.png",
|
||||
"text": this.$t('common.weibo'),
|
||||
"share": {
|
||||
"provider": "sinaweibo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/qq.png",
|
||||
"text": "QQ",
|
||||
"share": {
|
||||
"provider": "qq"
|
||||
}
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/copyurl.png",
|
||||
"text": this.$t('common.copy'),
|
||||
"share": "copyurl"
|
||||
},
|
||||
{
|
||||
"img": "/static/app-plus/sharemenu/more.png",
|
||||
"text": this.$t('common.more'),
|
||||
"share": "shareSystem"
|
||||
}
|
||||
],
|
||||
cancelText: this.$t('common.cancelShare'),
|
||||
}, e => { //callback
|
||||
console.log(e);
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* #ifndef APP-NVUE */
|
||||
view {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* #endif*/
|
||||
|
||||
.center {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.userInfo {
|
||||
// padding: 20rpx;
|
||||
padding-top: 60px;
|
||||
background-image: url(http://h5.ngtools.cn/pic/static/uni-center/headers.png);
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.defaultAvatarUrl {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
background-color: #007aff;
|
||||
border-radius: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo-title {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.uer-name {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 38rpx;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.center-list {
|
||||
margin-bottom: 30rpx;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.center-list-cell {
|
||||
width: 750rpx;
|
||||
background-color: #007AFF;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.grid {
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.uni-grid .text {
|
||||
font-size: 16px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
color: #817f82;
|
||||
}
|
||||
|
||||
.uni-grid .item ::v-deep .uni-grid-item__box {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/*修改边线粗细示例*/
|
||||
/* #ifndef APP-NVUE */
|
||||
.center-list ::v-deep .uni-list--border:after {
|
||||
-webkit-transform: scaleY(0.2);
|
||||
transform: scaleY(0.2);
|
||||
margin-left: 80rpx;
|
||||
}
|
||||
|
||||
.center-list ::v-deep .uni-list--border-top,
|
||||
.center-list ::v-deep .uni-list--border-bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.item-footer {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-footer-text {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.item-footer-badge {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
border-radius: 50%;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
border-radius: 10rpx;
|
||||
/* #endif */
|
||||
background-color: #DD524D;
|
||||
}
|
||||
</style>
|
||||
508
pages/ucenter/ucenter.vue
Normal file
@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<view class="center">
|
||||
<uni-sign-in ref="signIn"></uni-sign-in>
|
||||
<view class="userInfo" @click.capture="toUserInfo">
|
||||
<cloud-image width="150rpx" height="150rpx" v-if="hasLogin && userInfo.avatar_file && userInfo.avatar_file.url" :src="userInfo.avatar_file.url"></cloud-image>
|
||||
|
||||
<view v-else class="defaultAvatarUrl">
|
||||
<uni-icons color="#ffffff" size="50" type="person-filled" />
|
||||
</view>
|
||||
|
||||
<view class="logo-title">
|
||||
<text class="uer-name" v-if="hasLogin">{{ userInfo.nickname || userInfo.username || userInfo.mobile }}</text>
|
||||
<text class="uer-name" v-else>{{ $t('mine.notLogged') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <uni-grid class="grid" :column="4" :showBorder="false" :square="true">
|
||||
<uni-grid-item class="item" v-for="(item,index) in gridList" @click.native="tapGrid(index)" :key="index">
|
||||
<uni-icons class="icon" color="#007AFF" :type="item.icon" size="26"></uni-icons>
|
||||
<text class="text">{{item.text}}</text>
|
||||
</uni-grid-item>
|
||||
</uni-grid> -->
|
||||
<uni-list class="center-list" v-for="(sublist, index) in ucenterList" :key="index">
|
||||
<uni-list-item
|
||||
v-for="(item, i) in sublist"
|
||||
:title="item.title"
|
||||
link
|
||||
:rightText="item.rightText"
|
||||
:key="i"
|
||||
:clickable="true"
|
||||
:to="item.to"
|
||||
@click="ucenterListClick(item)"
|
||||
:show-extra-icon="true"
|
||||
:extraIcon="{ type: item.icon, color: '#999' }"
|
||||
>
|
||||
<template v-slot:footer>
|
||||
<view v-if="item.showBadge" class="item-footer">
|
||||
<text class="item-footer-text">{{ item.rightText }}</text>
|
||||
<view class="item-footer-badge"></view>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||
import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version';
|
||||
// #ifdef APP
|
||||
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
|
||||
const uniShare = new UniShare();
|
||||
// #endif
|
||||
const db = uniCloud.database();
|
||||
import { store, mutations } from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
export default {
|
||||
// #ifdef APP
|
||||
onBackPress({ from }) {
|
||||
if (from == 'backbutton') {
|
||||
this.$nextTick(function () {
|
||||
uniShare.hide();
|
||||
});
|
||||
return uniShare.isShow;
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
gridList: [
|
||||
{
|
||||
text: this.$t('mine.dict'),
|
||||
icon: 'chat'
|
||||
},
|
||||
{
|
||||
text: this.$t('mine.showText'),
|
||||
icon: 'cloud-upload'
|
||||
},
|
||||
{
|
||||
text: this.$t('mine.showText'),
|
||||
icon: 'contact'
|
||||
},
|
||||
{
|
||||
text: this.$t('mine.showText'),
|
||||
icon: 'download'
|
||||
}
|
||||
],
|
||||
ucenterList: [
|
||||
[
|
||||
{
|
||||
title: this.$t('mine.dict'),
|
||||
event: 'dictSetting',
|
||||
icon: 'compose'
|
||||
},
|
||||
{
|
||||
title: this.$t('mine.depart'),
|
||||
event: 'departSetting',
|
||||
icon: 'compose'
|
||||
}
|
||||
|
||||
// {
|
||||
// "title": this.$t('mine.myPay'),
|
||||
// "event": 'myPaySetting',
|
||||
// "icon": "compose"
|
||||
// },
|
||||
|
||||
// // #ifdef APP-PLUS
|
||||
// {
|
||||
// "title": this.$t('mine.toEvaluate'),
|
||||
// "event": 'gotoMarket',
|
||||
// "icon": "star"
|
||||
// },
|
||||
// //#endif
|
||||
// {
|
||||
// "title":this.$t('mine.readArticles'),
|
||||
// "to": '/pages/ucenter/read-news-log/read-news-log',
|
||||
// "icon": "flag"
|
||||
// },
|
||||
// {
|
||||
// "title": this.$t('mine.myScore'),
|
||||
// "to": '',
|
||||
// "event": 'getScore',
|
||||
// "icon": "paperplane"
|
||||
// }
|
||||
// // #ifdef APP-PLUS
|
||||
// , {
|
||||
// "title": this.$t('mine.invite'),
|
||||
// "event": 'share',
|
||||
// "icon": "redo"
|
||||
// }
|
||||
// // #endif
|
||||
],
|
||||
[
|
||||
// {
|
||||
// "title": this.$t('mine.feedback'),
|
||||
// "to": '/uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback',
|
||||
// "icon": "help"
|
||||
// },
|
||||
{
|
||||
title: this.$t('mine.settings'),
|
||||
to: '/pagesPackage/ucenter/settings/settings',
|
||||
icon: 'gear'
|
||||
}
|
||||
],
|
||||
// #ifdef APP-PLUS
|
||||
[
|
||||
{
|
||||
title: this.$t('mine.about'),
|
||||
to: '/pagesPackage/ucenter/about/about',
|
||||
icon: 'info'
|
||||
}
|
||||
]
|
||||
// #endif
|
||||
],
|
||||
listStyles: {
|
||||
height: '150rpx', // 边框高度
|
||||
width: '150rpx', // 边框宽度
|
||||
border: {
|
||||
// 如果为 Boolean 值,可以控制边框显示与否
|
||||
color: '#eee', // 边框颜色
|
||||
width: '1px', // 边框宽度
|
||||
style: 'solid', // 边框样式
|
||||
radius: '100%' // 边框圆角,支持百分比
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
//#ifdef APP-PLUS
|
||||
this.ucenterList[this.ucenterList.length - 2].unshift({
|
||||
title: this.$t('mine.checkUpdate'), // this.this.$t('mine.checkUpdate')"检查更新"
|
||||
rightText: this.appVersion.version + '-' + this.appVersion.versionCode,
|
||||
event: 'checkVersion',
|
||||
icon: 'loop',
|
||||
showBadge: this.appVersion.hasNew
|
||||
});
|
||||
//#endif
|
||||
},
|
||||
onShow() {},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return store.userInfo;
|
||||
},
|
||||
hasLogin() {
|
||||
return store.hasLogin;
|
||||
},
|
||||
// #ifdef APP-PLUS
|
||||
appVersion() {
|
||||
return getApp().appVersion;
|
||||
},
|
||||
// #endif
|
||||
appConfig() {
|
||||
return getApp().globalData.config;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toSettings() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/ucenter/settings/settings'
|
||||
});
|
||||
},
|
||||
signIn() {
|
||||
//普通签到
|
||||
this.$refs.signIn.open();
|
||||
},
|
||||
dictSetting() {
|
||||
//数据字典设置
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pagesPackage/ngTools_Dict/list'
|
||||
});
|
||||
},
|
||||
departSetting() {
|
||||
//组织机构设置
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pagesPackage/ngTools_depart/list'
|
||||
});
|
||||
},
|
||||
myPaySetting() {
|
||||
//购买打赏
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pagesPackage/ucenter/pay/index'
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 个人中心项目列表点击事件
|
||||
*/
|
||||
ucenterListClick(item) {
|
||||
if (!item.to && item.event) {
|
||||
this[item.event]();
|
||||
}
|
||||
},
|
||||
async checkVersion() {
|
||||
let res = await callCheckVersion();
|
||||
console.log(res);
|
||||
if (res.result.code > 0) {
|
||||
checkUpdate();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.result.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
toUserInfo() {
|
||||
uni.navigateTo({
|
||||
url: '/uni_modules/uni-id-pages/pages/userinfo/userinfo'
|
||||
});
|
||||
},
|
||||
tapGrid(index) {
|
||||
uni.showToast({
|
||||
// title: '你点击了,第' + (index + 1) + '个',
|
||||
title: this.$t('mine.clicked') + ' ' + (index + 1),
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 去应用市场评分
|
||||
*/
|
||||
gotoMarket() {
|
||||
// #ifdef APP-PLUS
|
||||
if (uni.getSystemInfoSync().platform == 'ios') {
|
||||
// 这里填写appstore应用id
|
||||
let appstoreid = this.appConfig.marketId.ios; // 'id1417078253';
|
||||
console.log({
|
||||
appstoreid
|
||||
});
|
||||
plus.runtime.openURL('itms-apps://' + 'itunes.apple.com/cn/app/wechat/' + appstoreid + '?mt=8', (err) => {
|
||||
console.log('plus.runtime.openURL err:' + JSON.stringify(err));
|
||||
});
|
||||
}
|
||||
if (uni.getSystemInfoSync().platform == 'android') {
|
||||
var Uri = plus.android.importClass('android.net.Uri');
|
||||
var uri = Uri.parse('market://details?id=' + this.appConfig.marketId.android);
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
main.startActivity(intent);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
/**
|
||||
* 获取积分信息
|
||||
*/
|
||||
getScore() {
|
||||
if (!this.userInfo)
|
||||
return uni.showToast({
|
||||
title: this.$t('mine.checkScore'),
|
||||
icon: 'none'
|
||||
});
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
});
|
||||
db.collection('uni-id-scores')
|
||||
.where('"user_id" == $env.uid')
|
||||
.field('score,balance')
|
||||
.orderBy('create_date', 'desc')
|
||||
.limit(1)
|
||||
.get()
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const data = res.result.data[0];
|
||||
let msg = '';
|
||||
msg = data ? this.$t('mine.currentScore') + data.balance : this.$t('mine.noScore');
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
async share() {
|
||||
let { result } = await db.collection('uni-id-users').where("'_id' == $cloudEnv_uid").field('my_invite_code').get();
|
||||
let myInviteCode = result.data[0].my_invite_code;
|
||||
if (!myInviteCode) {
|
||||
return uni.showToast({
|
||||
title: '请检查uni-config-center中uni-id配置,是否已启用 autoSetInviteCode',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
console.log({
|
||||
myInviteCode
|
||||
});
|
||||
let { appName, logo, company, slogan } = this.appConfig.about;
|
||||
// #ifdef APP-PLUS
|
||||
uniShare.show(
|
||||
{
|
||||
content: {
|
||||
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
|
||||
type: 0,
|
||||
href: this.appConfig.h5.url + `/#/pages/ucenter/invite/invite?code=uniInvitationCode:${myInviteCode}`,
|
||||
title: appName,
|
||||
summary: slogan,
|
||||
imageUrl: logo + '?x-oss-process=image/resize,m_fill,h_100,w_100' //压缩图片解决,在ios端分享图过大导致的图片失效问题
|
||||
},
|
||||
menus: [
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/wechatfriend.png',
|
||||
text: this.$t('common.wechatFriends'),
|
||||
share: {
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneSession'
|
||||
}
|
||||
},
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/wechatmoments.png',
|
||||
text: this.$t('common.wechatBbs'),
|
||||
share: {
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneTimeline'
|
||||
}
|
||||
},
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/weibo.png',
|
||||
text: this.$t('common.weibo'),
|
||||
share: {
|
||||
provider: 'sinaweibo'
|
||||
}
|
||||
},
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/qq.png',
|
||||
text: 'QQ',
|
||||
share: {
|
||||
provider: 'qq'
|
||||
}
|
||||
},
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/copyurl.png',
|
||||
text: this.$t('common.copy'),
|
||||
share: 'copyurl'
|
||||
},
|
||||
{
|
||||
img: '/static/app-plus/sharemenu/more.png',
|
||||
text: this.$t('common.more'),
|
||||
share: 'shareSystem'
|
||||
}
|
||||
],
|
||||
cancelText: this.$t('common.cancelShare')
|
||||
},
|
||||
(e) => {
|
||||
//callback
|
||||
console.log(e);
|
||||
}
|
||||
);
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* #ifndef APP-NVUE */
|
||||
view {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* #endif*/
|
||||
|
||||
.center {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.userInfo {
|
||||
// padding: 20rpx;
|
||||
padding-top: 60px;
|
||||
background-image: url(http://ngtools.cn:3000/pic/static/uni-center/headers.png);
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.defaultAvatarUrl {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
background-color: #007aff;
|
||||
border-radius: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logo-title {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.uer-name {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
font-size: 38rpx;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.center-list {
|
||||
margin-bottom: 30rpx;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.center-list-cell {
|
||||
width: 750rpx;
|
||||
background-color: #007aff;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.grid {
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.uni-grid .text {
|
||||
font-size: 16px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
color: #817f82;
|
||||
}
|
||||
|
||||
.uni-grid .item ::v-deep .uni-grid-item__box {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/*修改边线粗细示例*/
|
||||
/* #ifndef APP-NVUE */
|
||||
.center-list ::v-deep .uni-list--border:after {
|
||||
-webkit-transform: scaleY(0.2);
|
||||
transform: scaleY(0.2);
|
||||
margin-left: 80rpx;
|
||||
}
|
||||
|
||||
.center-list ::v-deep .uni-list--border-top,
|
||||
.center-list ::v-deep .uni-list--border-bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.item-footer {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-footer-text {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.item-footer-badge {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
border-radius: 50%;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
border-radius: 10rpx;
|
||||
/* #endif */
|
||||
background-color: #dd524d;
|
||||
}
|
||||
</style>
|
||||
BIN
static/logo.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/tabbar/cal.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
static/tabbar/cal_active.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
BIN
static/tabbar/info.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
static/tabbar/info_active.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
@ -1 +1,63 @@
|
||||
{"bsonType":"object","required":[],"permission":{"read":true,"create":true,"update":true,"delete":true},"properties":{"_id":{"description":"ID,系统自动生成"},"dictName":{"description":"字典名称","bsonType":"string","title":"字典名称","trim":"both"},"dictCode":{"description":"字典编码","bsonType":"string","title":"字典编码","trim":"both"},"description":{"description":"描述","bsonType":"string","title":"描述","trim":"both"},"delFlag":{"description":"删除状态","bsonType":"int","title":"删除状态","trim":"both"},"createTime":{"description":"创建时间","bsonType":"string","title":"创建时间","trim":"both"},"createBy":{"description":"创建人","bsonType":"string","title":"创建人","trim":"both"},"updateTime":{"description":"更新时间","bsonType":"datetime","title":"更新时间","trim":"both"},"updateBy":{"description":"更新人","bsonType":"string","title":"更新人","trim":"both"}}}
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": true,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"dictName": {
|
||||
"description": "字典名称",
|
||||
"bsonType": "string",
|
||||
"title": "字典名称",
|
||||
"trim": "both"
|
||||
},
|
||||
"dictCode": {
|
||||
"description": "字典编码",
|
||||
"bsonType": "string",
|
||||
"title": "字典编码",
|
||||
"trim": "both"
|
||||
},
|
||||
"description": {
|
||||
"description": "描述",
|
||||
"bsonType": "string",
|
||||
"title": "描述",
|
||||
"trim": "both"
|
||||
},
|
||||
"delFlag": {
|
||||
"description": "删除状态",
|
||||
"bsonType": "int",
|
||||
"title": "删除状态",
|
||||
"trim": "both"
|
||||
},
|
||||
"createTime": {
|
||||
"description": "创建时间",
|
||||
"bsonType": "string",
|
||||
"title": "创建时间",
|
||||
"trim": "both"
|
||||
},
|
||||
"createBy": {
|
||||
"description": "创建人",
|
||||
"bsonType": "string",
|
||||
"title": "创建人",
|
||||
"trim": "both"
|
||||
},
|
||||
"updateTime": {
|
||||
"description": "更新时间",
|
||||
"bsonType": "datetime",
|
||||
"title": "更新时间",
|
||||
"trim": "both"
|
||||
},
|
||||
"updateBy": {
|
||||
"description": "更新人",
|
||||
"bsonType": "string",
|
||||
"title": "更新人",
|
||||
"trim": "both"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1 +1,82 @@
|
||||
{"bsonType":"object","required":[],"permission":{"read":true,"create":true,"update":true,"delete":true},"properties":{"_id":{"description":"ID,系统自动生成"},"dictID":{"description":"字典ID","bsonType":"string","title":"字典ID","trim":"both"},"itemValue":{"description":"字典项值","bsonType":"string","title":"字典项值","trim":"both","length":"1024"},"itemText":{"description":"字典项文本","bsonType":"string","title":"字典项文本","trim":"both"},"itemColor":{"description":"字典项颜色","bsonType":"string","title":"字典项颜色","trim":"both"},"description":{"description":"描述","bsonType":"string","title":"描述","trim":"both"},"sortOrder":{"description":"排序","bsonType":"string","title":"排序","trim":"both"},"status":{"description":"状态","bsonType":"int","title":"状态","trim":"both"},"createTime":{"description":"创建时间","bsonType":"datetime","title":"创建时间","trim":"both"},"createBy":{"description":"创建人","bsonType":"string","title":"创建人","trim":"both"},"updateTime":{"description":"更新时间","bsonType":"datetime","title":"更新时间","trim":"both"},"updateBy":{"description":"更新人","bsonType":"string","title":"更新人","trim":"both"}}}
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": true,
|
||||
"create": true,
|
||||
"update": true,
|
||||
"delete": true
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"dictID": {
|
||||
"description": "字典ID",
|
||||
"bsonType": "string",
|
||||
"title": "字典ID",
|
||||
"trim": "both"
|
||||
},
|
||||
"itemValue": {
|
||||
"description": "字典项值",
|
||||
"bsonType": "string",
|
||||
"title": "字典项值",
|
||||
"trim": "both",
|
||||
"length": "1024"
|
||||
},
|
||||
"itemText": {
|
||||
"description": "字典项文本",
|
||||
"bsonType": "string",
|
||||
"title": "字典项文本",
|
||||
"trim": "both"
|
||||
},
|
||||
"itemColor": {
|
||||
"description": "字典项颜色",
|
||||
"bsonType": "string",
|
||||
"title": "字典项颜色",
|
||||
"trim": "both"
|
||||
},
|
||||
"description": {
|
||||
"description": "描述",
|
||||
"bsonType": "string",
|
||||
"title": "描述",
|
||||
"trim": "both"
|
||||
},
|
||||
"sortOrder": {
|
||||
"description": "排序",
|
||||
"bsonType": "string",
|
||||
"title": "排序",
|
||||
"trim": "both"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"bsonType": "int",
|
||||
"title": "状态",
|
||||
"trim": "both"
|
||||
},
|
||||
"createTime": {
|
||||
"description": "创建时间",
|
||||
"bsonType": "datetime",
|
||||
"title": "创建时间",
|
||||
"trim": "both"
|
||||
},
|
||||
"createBy": {
|
||||
"description": "创建人",
|
||||
"bsonType": "string",
|
||||
"title": "创建人",
|
||||
"trim": "both"
|
||||
},
|
||||
"updateTime": {
|
||||
"description": "更新时间",
|
||||
"bsonType": "datetime",
|
||||
"title": "更新时间",
|
||||
"trim": "both"
|
||||
},
|
||||
"updateBy": {
|
||||
"description": "更新人",
|
||||
"bsonType": "string",
|
||||
"title": "更新人",
|
||||
"trim": "both"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1 +1,102 @@
|
||||
{"bsonType":"object","description":"记录上报的应用运行错误日志","required":[],"permission":{"read":false,"create":false,"update":false,"delete":false},"properties":{"_id":{"description":"ID,系统自动生成"},"appid":{"bsonType":"string","description":"用户端上报的应用ID"},"version":{"bsonType":"string","description":"用户端上报的应用版本号"},"platform":{"bsonType":"string","description":"用户端上报的平台code"},"channel":{"bsonType":"string","description":"用户端上报的渠道code\/场景值"},"error_type":{"bsonType":"int","description":"错误类型","defaultValue":0,"enum":[{"text":"未知","value":0},{"text":"表示webview页面js异常(uni-app项目对应vue页面)","value":2},{"text":"表示uni框架js异常(仅uni-app项目)","value":4},{"text":"表示控制页js异常(仅uni-app项目)","value":5},{"text":"表示nvue页面js异常(仅uni-app项目)","value":6}]},"device_id":{"bsonType":"string","description":"客户端携带的设备标识"},"uid":{"bsonType":"string","description":"用户编号, 对应uni-id-users._id"},"os":{"bsonType":"string","description":"客户端操作系统"},"ua":{"bsonType":"string","description":"客户端user-agent信息"},"space_id":{"bsonType":"string","description":"服务空间编号"},"space_provider":{"bsonType":"string","description":"服务空间提供商"},"sdk_version":{"bsonType":"string","description":"小程序基础库版本号"},"platform_version":{"bsonType":"string","description":"微信、支付宝宿主App的版本号"},"error_msg":{"bsonType":"string","description":"错误信息"},"error_hash":{"bsonType":"string","description":"错误hash码"},"page_url":{"bsonType":"string","description":"页面url"},"create_time":{"bsonType":"timestamp","description":"创建时间"}},"version":"0.0.2"}
|
||||
{
|
||||
"bsonType": "object",
|
||||
"description": "记录上报的应用运行错误日志",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": false,
|
||||
"create": false,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"appid": {
|
||||
"bsonType": "string",
|
||||
"description": "用户端上报的应用ID"
|
||||
},
|
||||
"version": {
|
||||
"bsonType": "string",
|
||||
"description": "用户端上报的应用版本号"
|
||||
},
|
||||
"platform": {
|
||||
"bsonType": "string",
|
||||
"description": "用户端上报的平台code"
|
||||
},
|
||||
"channel": {
|
||||
"bsonType": "string",
|
||||
"description": "用户端上报的渠道code\/场景值"
|
||||
},
|
||||
"error_type": {
|
||||
"bsonType": "int",
|
||||
"description": "错误类型",
|
||||
"defaultValue": 0,
|
||||
"enum": [{
|
||||
"text": "未知",
|
||||
"value": 0
|
||||
}, {
|
||||
"text": "表示webview页面js异常(uni-app项目对应vue页面)",
|
||||
"value": 2
|
||||
}, {
|
||||
"text": "表示uni框架js异常(仅uni-app项目)",
|
||||
"value": 4
|
||||
}, {
|
||||
"text": "表示控制页js异常(仅uni-app项目)",
|
||||
"value": 5
|
||||
}, {
|
||||
"text": "表示nvue页面js异常(仅uni-app项目)",
|
||||
"value": 6
|
||||
}]
|
||||
},
|
||||
"device_id": {
|
||||
"bsonType": "string",
|
||||
"description": "客户端携带的设备标识"
|
||||
},
|
||||
"uid": {
|
||||
"bsonType": "string",
|
||||
"description": "用户编号, 对应uni-id-users._id"
|
||||
},
|
||||
"os": {
|
||||
"bsonType": "string",
|
||||
"description": "客户端操作系统"
|
||||
},
|
||||
"ua": {
|
||||
"bsonType": "string",
|
||||
"description": "客户端user-agent信息"
|
||||
},
|
||||
"space_id": {
|
||||
"bsonType": "string",
|
||||
"description": "服务空间编号"
|
||||
},
|
||||
"space_provider": {
|
||||
"bsonType": "string",
|
||||
"description": "服务空间提供商"
|
||||
},
|
||||
"sdk_version": {
|
||||
"bsonType": "string",
|
||||
"description": "小程序基础库版本号"
|
||||
},
|
||||
"platform_version": {
|
||||
"bsonType": "string",
|
||||
"description": "微信、支付宝宿主App的版本号"
|
||||
},
|
||||
"error_msg": {
|
||||
"bsonType": "string",
|
||||
"description": "错误信息"
|
||||
},
|
||||
"error_hash": {
|
||||
"bsonType": "string",
|
||||
"description": "错误hash码"
|
||||
},
|
||||
"page_url": {
|
||||
"bsonType": "string",
|
||||
"description": "页面url"
|
||||
},
|
||||
"create_time": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间"
|
||||
}
|
||||
},
|
||||
"version": "0.0.2"
|
||||
}
|
||||
@ -1 +1,96 @@
|
||||
{"bsonType":"object","description":"存储汇总的错误日志的数据","required":[],"permission":{"read":false,"create":false,"update":false,"delete":false},"properties":{"_id":{"description":"ID,系统自动生成"},"appid":{"bsonType":"string","description":"应用ID"},"platform_id":{"bsonType":"string","description":"应用平台ID,对应uni-stat-app-platforms._id","foreignKey":"uni-stat-app-platforms._id"},"channel_id":{"bsonType":"string","description":"渠道\/场景值ID,对应uni-stat-app-channels._id","foreignKey":"uni-stat-app-channels._id"},"version_id":{"bsonType":"string","description":"应用版本ID,对应opendb-app-versions._id","foreignKey":"opendb-app-versions._id"},"type":{"bsonType":"string","description":"错误类型","enum":[{"text":"前端js错误","value":"js"},{"text":"原生应用崩溃错误","value":"crash"}]},"hash":{"bsonType":"string","description":"错误hash码"},"msg":{"bsonType":"string","description":"错误信息"},"count":{"bsonType":"int","description":"报错次数"},"app_launch_count":{"bsonType":"int","description":"本时间段App启动或从后台切到前台的次数"},"last_time":{"bsonType":"timestamp","description":"最近一次报错事件"},"dimension":{"bsonType":"string","description":"统计范围 day:按天统计,hour:按小时统计","enum":[{"text":"月","value":"month"},{"text":"周","value":"week"},{"text":"天","value":"day"},{"text":"小时","value":"hour"}]},"stat_date":{"bsonType":"int","description":"统计日期,格式yyyymmdd,例:20211201"},"start_time":{"bsonType":"timestamp","description":"开始时间"},"end_time":{"bsonType":"timestamp","description":"结束时间"}},"version":"0.0.2"}
|
||||
{
|
||||
"bsonType": "object",
|
||||
"description": "存储汇总的错误日志的数据",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": false,
|
||||
"create": false,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"appid": {
|
||||
"bsonType": "string",
|
||||
"description": "应用ID"
|
||||
},
|
||||
"platform_id": {
|
||||
"bsonType": "string",
|
||||
"description": "应用平台ID,对应uni-stat-app-platforms._id",
|
||||
"foreignKey": "uni-stat-app-platforms._id"
|
||||
},
|
||||
"channel_id": {
|
||||
"bsonType": "string",
|
||||
"description": "渠道\/场景值ID,对应uni-stat-app-channels._id",
|
||||
"foreignKey": "uni-stat-app-channels._id"
|
||||
},
|
||||
"version_id": {
|
||||
"bsonType": "string",
|
||||
"description": "应用版本ID,对应opendb-app-versions._id",
|
||||
"foreignKey": "opendb-app-versions._id"
|
||||
},
|
||||
"type": {
|
||||
"bsonType": "string",
|
||||
"description": "错误类型",
|
||||
"enum": [{
|
||||
"text": "前端js错误",
|
||||
"value": "js"
|
||||
}, {
|
||||
"text": "原生应用崩溃错误",
|
||||
"value": "crash"
|
||||
}]
|
||||
},
|
||||
"hash": {
|
||||
"bsonType": "string",
|
||||
"description": "错误hash码"
|
||||
},
|
||||
"msg": {
|
||||
"bsonType": "string",
|
||||
"description": "错误信息"
|
||||
},
|
||||
"count": {
|
||||
"bsonType": "int",
|
||||
"description": "报错次数"
|
||||
},
|
||||
"app_launch_count": {
|
||||
"bsonType": "int",
|
||||
"description": "本时间段App启动或从后台切到前台的次数"
|
||||
},
|
||||
"last_time": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最近一次报错事件"
|
||||
},
|
||||
"dimension": {
|
||||
"bsonType": "string",
|
||||
"description": "统计范围 day:按天统计,hour:按小时统计",
|
||||
"enum": [{
|
||||
"text": "月",
|
||||
"value": "month"
|
||||
}, {
|
||||
"text": "周",
|
||||
"value": "week"
|
||||
}, {
|
||||
"text": "天",
|
||||
"value": "day"
|
||||
}, {
|
||||
"text": "小时",
|
||||
"value": "hour"
|
||||
}]
|
||||
},
|
||||
"stat_date": {
|
||||
"bsonType": "int",
|
||||
"description": "统计日期,格式yyyymmdd,例:20211201"
|
||||
},
|
||||
"start_time": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "开始时间"
|
||||
},
|
||||
"end_time": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "结束时间"
|
||||
}
|
||||
},
|
||||
"version": "0.0.2"
|
||||
}
|
||||
1034
uni_modules/next-tree/components/next-tree/next-tree.vue
Normal file
269
uni_modules/next-tree/components/next-tree/style.css
Normal file
@ -0,0 +1,269 @@
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('//at.alicdn.com/t/c/font_4110624_qs48wckazsh.ttf?t=1712479573821') format('truetype');
|
||||
}
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: iconfont;
|
||||
font-style: normal;
|
||||
}
|
||||
.iconfont-loading {
|
||||
font-family: iconfont;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
.next-tree-mask {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: 997;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease;
|
||||
visibility: hidden;
|
||||
}
|
||||
.next-tree-mask.show {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.next-tree-cnt {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: 997;
|
||||
top: 360rpx;
|
||||
transition: all 0.3s ease;
|
||||
transform: translateY(100%);
|
||||
}
|
||||
.next-tree-cnt.next-tree-cnt-page {
|
||||
transition: none;
|
||||
}
|
||||
.next-tree-cnt.show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.next-tree-bar {
|
||||
background-color: #fff;
|
||||
height: 72rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border-bottom-width: 1rpx !important;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #f5f5f5;
|
||||
font-size: 32rpx;
|
||||
color: #757575;
|
||||
line-height: 1;
|
||||
}
|
||||
.next-tree-bar-btns {
|
||||
display: inline-block;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.btn-divid {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
margin: 0 10px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.next-tree-bar-confirm {
|
||||
color: #f9ae3d;
|
||||
}
|
||||
.next-tree-view {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
top: 72rpx;
|
||||
background-color: #fff;
|
||||
padding-top: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.next-tree-view-sc {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.next-tree-view-sc .empty {
|
||||
text-align: center;
|
||||
color: #757575;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.next-tree-item-block {
|
||||
|
||||
}
|
||||
.next-tree-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #757575;
|
||||
line-height: 1;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
transition: 0.2s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.next-tree-item .icon-btn {
|
||||
font-size: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.next-tree-item .left-line {
|
||||
position: relative;
|
||||
width: 1rpx;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.next-tree-item .left-line::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 1rpx;
|
||||
height: 100%;
|
||||
background-color: rgba(204,204,204,0.9);
|
||||
box-sizing: border-box;
|
||||
|
||||
left: -18rpx;
|
||||
}
|
||||
.next-tree-item .parent-horizontal-line {
|
||||
width: 1rpx;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(204,204,204,0.9);
|
||||
}
|
||||
.next-tree-item .left-line .horizontal-line {
|
||||
width: 20rpx;
|
||||
height: 1rpx;
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 0rpx;
|
||||
background-color: rgba(204,204,204,0.9);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.next-tree-item.show {
|
||||
height: 80rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
.next-tree-item.showchild:before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.next-tree-item.border {
|
||||
border-bottom: 1rpx solid rgba(204,204,204,0.2);
|
||||
}
|
||||
.next-tree-item.last:before {
|
||||
opacity: 0;
|
||||
}
|
||||
.next-tree-item.disabled {
|
||||
color: #ccc!important;
|
||||
}
|
||||
|
||||
.next-tree-icon {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.next-tree-label {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.next-tree-label .label-input {
|
||||
border: 1rpx solid #f0f0f0;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
padding: 12rpx 18rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.next-tree-check {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.next-tree-check-yes,
|
||||
.next-tree-check-no {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
border-bottom-left-radius: 20%;
|
||||
border-top-width: 1rpx;
|
||||
border-left-width: 1rpx;
|
||||
border-bottom-width: 1rpx;
|
||||
border-right-width: 1rpx;
|
||||
border-style: solid;
|
||||
border-color: #f9ae3d;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.next-tree-check-yes-b {
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
border-bottom-right-radius: 20%;
|
||||
border-bottom-left-radius: 20%;
|
||||
background-color: #f9ae3d;
|
||||
color: #fff;
|
||||
}
|
||||
.next-tree-check-yes-b .icon-text {
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-family: uicon-iconfont;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.next-tree-check .radio {
|
||||
border-top-left-radius: 50%;
|
||||
border-top-right-radius: 50%;
|
||||
border-bottom-right-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
}
|
||||
.next-tree-check .radio .next-tree-check-yes-b {
|
||||
border-top-left-radius: 50%;
|
||||
border-top-right-radius: 50%;
|
||||
border-bottom-right-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
}
|
||||
|
||||
.next-tree-item.disabled .next-tree-check-no {
|
||||
color: #ccc!important;
|
||||
}
|
||||
.next-tree-item.disabled .next-tree-check-yes-b {
|
||||
background-color: #ccc!important;
|
||||
}
|
||||
.hover-c {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.fixed-bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
|
||||
84
uni_modules/next-tree/package.json
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"id": "next-tree",
|
||||
"displayName": "next-tree(超强树选择器、树组件、树插件、无限级联树、单选树、多选树、自定义样式树、树形选择器)",
|
||||
"version": "1.8.7",
|
||||
"description": "next-tree 弹窗树形选择器,支持多选,支持大数据, 无限级联,单选,父子级级联,远程/ajax加载,子节点增量/异步渲染,自定义样式定制,具名插槽等;支持h5/小程序/APP,全端通用",
|
||||
"keywords": [
|
||||
"树选择",
|
||||
"tree",
|
||||
"弹窗树选择器",
|
||||
"多选树",
|
||||
"单选树"
|
||||
],
|
||||
"engines": {
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "修改版本说明",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["next-search-more"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "n"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "n",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "u"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "u",
|
||||
"QQ": "y",
|
||||
"钉钉": "y",
|
||||
"快手": "u",
|
||||
"飞书": "u",
|
||||
"京东": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,15 +1,17 @@
|
||||
{
|
||||
"passwordSecret": "passwordSecret-demo",
|
||||
"tokenSecret": "tokenSecret-demo",
|
||||
"passwordSecret": "test-passwordSecret",
|
||||
"tokenSecret": "test-tokenSecret",
|
||||
"tokenExpiresIn": 7200,
|
||||
"tokenExpiresThreshold": 600,
|
||||
"passwordErrorLimit": 6,
|
||||
"bindTokenToDevice": false,
|
||||
"passwordErrorRetryTime": 3600,
|
||||
"autoSetInviteCode": false,
|
||||
"autoSetInviteCode": true,
|
||||
"forceInviteCode": false,
|
||||
"preferedAppPlatform": "app",
|
||||
"requestAuthSecret": "testSecret",
|
||||
"app": {
|
||||
"tokenExpiresIn": 2592000,
|
||||
"tokenExpiresIn": 2592000,
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
"appid": "wx97a8f7019d175ced",
|
||||
@ -20,6 +22,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"web": {
|
||||
"oauth": {
|
||||
"weixin-h5": {
|
||||
"appid": "微信浏览器内微信登录,所用的微信公众号appid",
|
||||
"appsecret": "微信公众号后台获取的appsecret"
|
||||
},
|
||||
"weixin-web": {
|
||||
"appid": "手机微信扫码登录,所用的微信开放平台(https://open.weixin.qq.com/)-网站应用的appid",
|
||||
"appsecret": "微信开放平台-网站应用的appsecret"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mp-weixin": {
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
@ -31,26 +45,22 @@
|
||||
"mp-alipay": {
|
||||
"oauth": {
|
||||
"alipay": {
|
||||
"appid": "alipay appid",
|
||||
"privateKey": "alipay privateKey"
|
||||
"appid": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr",
|
||||
"privateKey": "支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service": {
|
||||
"sms": {
|
||||
"name": "应用名称,对应短信模版的name",
|
||||
"codeExpiresIn": 180,
|
||||
"smsKey": "短信密钥key,开通短信服务处可以看到",
|
||||
"smsSecret": "短信密钥secret,开通短信服务处可以看到",
|
||||
"scene": {
|
||||
"bind-mobile-by-sms": {
|
||||
"templateId": "绑定手机号使用的短信验证码模板",
|
||||
"codeExpiresIn": 240
|
||||
}
|
||||
}
|
||||
"codeExpiresIn": 300,
|
||||
"smsKey": "ec5fba39363dc30af7f21bbb5ac6e857",
|
||||
"smsSecret": "09abff426ab62fd2e104c3be794b84c7"
|
||||
},
|
||||
"univerify": {
|
||||
"appid": "当前应用的appid,使用云函数URL化,此项必须配置"
|
||||
"appid": "当前应用的appid,使用云函数URL化,此项必须配置",
|
||||
"apiKey": "apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965",
|
||||
"apiSecret": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "uni-id",
|
||||
"dependencies": {}
|
||||
}
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
appid: {
|
||||
weixin: {
|
||||
// 微信公众号的appid,来源:登录微信公众号(https://mp.weixin.qq.com)-> 设置与开发 -> 基本配置 -> 公众号开发信息 -> AppID
|
||||
h5: 'xxxxxx',
|
||||
h5: 'wx9f9b7d747d261686',
|
||||
// 微信开放平台的appid,来源:登录微信开放平台(https://open.weixin.qq.com) -> 管理中心 -> 网站应用 -> 选择对应的应用名称,点击查看 -> AppID
|
||||
web: 'xxxxxx'
|
||||
}
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
## 1.0.0(2024-04-25)
|
||||
- 更新 在 Android 和 iOS 上打开链接的 UTS API
|
||||
@ -1,82 +0,0 @@
|
||||
{
|
||||
"id": "uts-openSchema",
|
||||
"displayName": "uts-openSchema",
|
||||
"version": "1.0.0",
|
||||
"description": "在 Android 和 iOS 上打开链接的 UTS API",
|
||||
"keywords": [
|
||||
"uts-openSchema"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^4.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"type": "uts",
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "y"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "n",
|
||||
"vue3": "y"
|
||||
},
|
||||
"App": {
|
||||
"app-android": "y",
|
||||
"app-ios": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "n",
|
||||
"Android Browser": "n",
|
||||
"微信浏览器(Android)": "n",
|
||||
"QQ浏览器(Android)": "n"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "n",
|
||||
"IE": "n",
|
||||
"Edge": "n",
|
||||
"Firefox": "n",
|
||||
"Safari": "n"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "n",
|
||||
"阿里": "n",
|
||||
"百度": "n",
|
||||
"字节跳动": "n",
|
||||
"QQ": "n",
|
||||
"钉钉": "n",
|
||||
"快手": "n",
|
||||
"飞书": "n",
|
||||
"京东": "n"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "n",
|
||||
"联盟": "n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
# uts-openSchema
|
||||
### 开发文档
|
||||
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
|
||||
[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
|
||||
[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html)
|
||||
[Hello UTS](https://gitcode.net/dcloud/hello-uts)
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"minSdkVersion": "21"
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
import Intent from 'android.content.Intent'
|
||||
import Uri from 'android.net.Uri'
|
||||
import { OpenSchema } from '../interface.uts'
|
||||
|
||||
export const openSchema: OpenSchema = function (url: string) {
|
||||
if (typeof url === 'string' && url.length > 0) {
|
||||
const context = UTSAndroid.getUniActivity()!
|
||||
const uri = Uri.parse(url)
|
||||
const intent = new Intent(Intent.ACTION_VIEW, uri)
|
||||
intent.setData(uri)
|
||||
context.startActivity(intent)
|
||||
} else {
|
||||
console.error('url param ERROR:', JSON.stringify(url))
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"deploymentTarget": "12.0"
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
import { OpenSchema } from '../interface.uts'
|
||||
|
||||
export const openSchema: OpenSchema = function(url: string): void {
|
||||
if (typeof url == 'string' && url.length > 0) {
|
||||
let uri = new URL(string = url)
|
||||
if (uri != null && UIApplication.shared.canOpenURL(uri!)) {
|
||||
UIApplication.shared.open(uri!, options = new Map<UIApplication.OpenExternalURLOptionsKey, any>(), completionHandler = null)
|
||||
}else {
|
||||
console.error('url param Error: ', url)
|
||||
}
|
||||
}else {
|
||||
console.error('url param Error: ', url)
|
||||
}
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
export type OpenSchema = (url: string) => void
|
||||