This commit is contained in:
guanj
2025-08-13 20:45:10 +08:00
parent c387cc9589
commit 127adcd524
5 changed files with 265 additions and 265 deletions

View File

@@ -1,23 +1,23 @@
const debug = true // true 是连地服务端本地false 是连接线上 const debug = false // true 是连地服务端本地false 是连接线上
const development = { const development = {
domain: 'http://192.168.1.62:10215', domain: 'http://192.168.1.62:10215',
} }
const production = { const production = {
domain: 'https://pqmcn.com:8092/api', domain: 'https://pqmcn.com:8092/api',
} }
const config = debug ? development : production const config = debug ? development : production
// #ifdef H5 // #ifdef H5
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
config.domain = '/api' config.domain = '/api'
} else { } else {
config.domain = window.location.origin config.domain = window.location.origin
} }
// #endif // #endif
config.static = config.domain + '/system-boot/file/download?filePath=' config.static = config.domain + '/system-boot/file/download?filePath='
export default config export default config

View File

@@ -1,14 +1,14 @@
// export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt export const MQTT_IP = 'pqmcn.com:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
export const MQTT_IP = '192.168.1.24:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt // export const MQTT_IP = '192.168.1.24:8085/mqtt'//mqtt地址端口, 使用emqx时一定要加mqtt
const MQTT_USERNAME = 't_user'//mqtt用户名 const MQTT_USERNAME = 't_user'//mqtt用户名
const MQTT_PASSWORD = 'njcnpqs'//密码 const MQTT_PASSWORD = 'njcnpqs'//密码
export const MQTT_OPTIONS = { export const MQTT_OPTIONS = {
connectTimeout: 5000, connectTimeout: 5000,
clientId: '', clientId: '',
username: MQTT_USERNAME, username: MQTT_USERNAME,
password: MQTT_PASSWORD, password: MQTT_PASSWORD,
clean: false, clean: false,
Qos: 1, Qos: 1,
} }

View File

@@ -2,8 +2,8 @@
"name" : "灿能物联", "name" : "灿能物联",
"appid" : "__UNI__88BC25B", "appid" : "__UNI__88BC25B",
"description" : "", "description" : "",
"versionName" : "1.6.6", "versionName" : "1.6.7",
"versionCode" : 166, "versionCode" : 167,
"transformPx" : false, "transformPx" : false,
"sassImplementationName" : "node-sass", "sassImplementationName" : "node-sass",
/* 5+App */ /* 5+App */
@@ -144,8 +144,8 @@
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"https" : true, "https" : true,
// "target" : "https://pqmcn.com:8092/api", "target" : "https://pqmcn.com:8092/api",
"target" : "http://192.168.1.62:10215", // "target" : "http://192.168.1.62:10215",
"changOrigin" : true, "changOrigin" : true,
"pathRewrite" : { "pathRewrite" : {
"/api" : "" "/api" : ""

View File

@@ -1,50 +1,50 @@
<template> <template>
<Cn-page :loading="loading"> <Cn-page :loading="loading">
<view slot="body"> <view slot="body">
<view class="about"> <view class="about">
<image src="/static/logo.png" class="logo"></image> <image src="/static/logo.png" class="logo"></image>
<view class="name">灿能物联</view> <view class="name">灿能物联</view>
<view class="version">Version 1.6.1</view> <view class="version">Version 1.6.6</view>
</view> </view>
</view> </view>
</Cn-page> </Cn-page>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
} }
}, },
methods: {}, methods: {},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.about { .about {
box-sizing: border-box; box-sizing: border-box;
padding: 34rpx; padding: 34rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
overflow: hidden; overflow: hidden;
.logo { .logo {
margin-top: 200rpx; margin-top: 200rpx;
height: 120rpx; height: 120rpx;
width: 120rpx; width: 120rpx;
} }
.name { .name {
margin-top: 80rpx; margin-top: 80rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 700; font-weight: 700;
color: #333; color: #333;
} }
.version { .version {
margin-top: 20rpx; margin-top: 20rpx;
font-size: 38rpx; font-size: 38rpx;
color: #333; color: #333;
} }
} }
</style> </style>

View File

@@ -1,174 +1,174 @@
<template> <template>
<view :loading="loading"> <view :loading="loading">
<view class="mine"> <view class="mine">
<view class="mine-nav" @click="jump('changePhone')" style="box-shadow: 0 4rpx 8rpx #e7e7e74c"> <view class="mine-nav" @click="jump('changePhone')" style="box-shadow: 0 4rpx 8rpx #e7e7e74c">
<view class="mine-nav-label">更换手机号</view> <view class="mine-nav-label">更换手机号</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<view class="mine-nav" @click="jump('changePwd')"> <view class="mine-nav" @click="jump('changePwd')">
<view class="mine-nav-label">修改密码</view> <view class="mine-nav-label">修改密码</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<view class="mine-nav" @click="jump('deleteUser')" style="border-bottom: none"> <view class="mine-nav" @click="jump('deleteUser')" style="border-bottom: none">
<view class="mine-nav-label">账号注销</view> <view class="mine-nav-label">账号注销</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<!-- <view class="mine-nav" @click="jump('setupMessage')" style="margin-top:20rpx;border-bottom: none; "> <!-- <view class="mine-nav" @click="jump('setupMessage')" style="margin-top:20rpx;border-bottom: none; ">
<view class="mine-nav-label">消息配置</view> <view class="mine-nav-label">消息配置</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> --> </view> -->
<view class="mine-nav" @click="jump('agreement')" style="margin-top: 20rpx"> <view class="mine-nav" @click="jump('agreement')" style="margin-top: 20rpx">
<view class="mine-nav-label">用户协议</view> <view class="mine-nav-label">用户协议</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<view class="mine-nav" @click="jump('policy')"> <view class="mine-nav" @click="jump('policy')">
<view class="mine-nav-label">隐私政策</view> <view class="mine-nav-label">隐私政策</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<view class="mine-nav" @click="jump('system')"> <view class="mine-nav" @click="jump('system')">
<view class="mine-nav-label">系统介绍</view> <view class="mine-nav-label">系统介绍</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<view class="mine-nav" @click="jump('book')"> <view class="mine-nav" @click="jump('book')">
<view class="mine-nav-label">使用手册</view> <view class="mine-nav-label">使用手册</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<!-- <view class="mine-nav" @click="jump('database')"> <!-- <view class="mine-nav" @click="jump('database')">
<view class="mine-nav-label">资料库</view> <view class="mine-nav-label">资料库</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> --> </view> -->
<view class="mine-nav" @click="jump('company')"> <view class="mine-nav" @click="jump('company')">
<view class="mine-nav-label">公司介绍</view> <view class="mine-nav-label">公司介绍</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> </view>
<!-- <view class="mine-nav" @click="jump('feedback')"> <!-- <view class="mine-nav" @click="jump('feedback')">
<view class="mine-nav-label">意见反馈</view> <view class="mine-nav-label">意见反馈</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons> <uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> --> </view> -->
<!-- @click="jump('about')" --> <!-- @click="jump('about')" -->
<view class="mine-nav" style="border-bottom: none"> <view class="mine-nav" style="border-bottom: none">
<view class="mine-nav-label">版本信息</view> <view class="mine-nav-label">版本信息</view>
<view style="color: #828282; font-size: 14rpx">当前版本V1.6.6</view> <view style="color: #828282; font-size: 14rpx">当前版本V1.6.6</view>
<!-- <uni-icons type="forward" color="#aaa" size="20"></uni-icons> --> <!-- <uni-icons type="forward" color="#aaa" size="20"></uni-icons> -->
</view> </view>
<view class="mine-nav" @click="jump('layout')" style="margin-top: 20rpx; border-bottom: none"> <view class="mine-nav" @click="jump('layout')" style="margin-top: 20rpx; border-bottom: none">
<view class="mine-nav-label" style="text-align: center">退出登录</view> <view class="mine-nav-label" style="text-align: center">退出登录</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { queryPersonSet } from '@/common/api/mine.js' import { queryPersonSet } from '@/common/api/mine.js'
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
} }
}, },
methods: { methods: {
async init() {}, async init() {},
jump(type) { jump(type) {
switch (type) { switch (type) {
case 'changePwd': case 'changePwd':
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/changePwd`, url: `/pages/user/changePwd`,
}) })
break break
case 'changePhone': case 'changePhone':
uni.navigateTo({ uni.navigateTo({
url: `/pages/user/changePhone`, url: `/pages/user/changePhone`,
}) })
break break
case 'book': case 'book':
uni.openDocument({ uni.openDocument({
filePath: '/static/user_manual.docx', filePath: '/static/user_manual.docx',
success: function (res) { success: function (res) {
console.log('打开文档成功') console.log('打开文档成功')
}, },
}) })
break break
case 'layout': case 'layout':
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否确认退出登录?', content: '是否确认退出登录?',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.removeStorageSync(this.$cacheKey.messageCount) uni.removeStorageSync(this.$cacheKey.messageCount)
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.setBadgeNumber(0) plus.runtime.setBadgeNumber(0)
// #endif // #endif
uni.reLaunch({ uni.reLaunch({
url: `/pages/user/login`, url: `/pages/user/login`,
}) })
} }
}, },
}) })
break break
default: default:
uni.navigateTo({ uni.navigateTo({
url: `/pages/mine/${type}`, url: `/pages/mine/${type}`,
}) })
break break
} }
}, },
}, },
onLoad() { onLoad() {
this.init() this.init()
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.mine { .mine {
padding-top: 20rpx; padding-top: 20rpx;
.mine-header { .mine-header {
padding: 200rpx 34rpx 34rpx; padding: 200rpx 34rpx 34rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: $uni-theme-white; background: $uni-theme-white;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow: 0 4rpx 8rpx #e7e7e74c; box-shadow: 0 4rpx 8rpx #e7e7e74c;
.mine-header-head { .mine-header-head {
margin-right: 30rpx; margin-right: 30rpx;
height: 128rpx; height: 128rpx;
width: 128rpx; width: 128rpx;
border-radius: $uni-theme-radius; border-radius: $uni-theme-radius;
overflow: hidden; overflow: hidden;
} }
.mine-header-name { .mine-header-name {
margin-right: 30rpx; margin-right: 30rpx;
flex: 1; flex: 1;
font-size: 36rpx; font-size: 36rpx;
color: #111; color: #111;
font-weight: 700; font-weight: 700;
} }
} }
.mine-nav { .mine-nav {
padding: 34rpx; padding: 34rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: $uni-theme-white; background: $uni-theme-white;
border-bottom: 1rpx solid #e8e8e8; border-bottom: 1rpx solid #e8e8e8;
&-icon { &-icon {
margin-right: 30rpx; margin-right: 30rpx;
height: 44rpx; height: 44rpx;
width: 44rpx; width: 44rpx;
border-radius: $uni-theme-radius; border-radius: $uni-theme-radius;
overflow: hidden; overflow: hidden;
} }
&-label { &-label {
margin-right: 30rpx; margin-right: 30rpx;
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
color: #111; color: #111;
} }
} }
} }
</style> </style>