Commit 7844df55 by 前端

合并

1 parent 53239c95
......@@ -41,7 +41,7 @@ export default {
userInfo: Object
},
name: '',
data () {
data() {
return {
tabs: [
{
......@@ -52,40 +52,47 @@ export default {
label: "接待记录",
icon: "record",
},
{
label: "个人中心",
icon: "point",
},
],
}
},
watch: {
userInfo (n) {
userInfo(n) {
if (n.shopMerchantId) this.haveCustomerAccess(n.shopMerchantId)
}
},
computed: {
perRecordNumber () {
perRecordNumber() {
return this.$store.state.audio.perRecordNumber
}
},
mounted () {
mounted() {
},
methods: {
changeIndex (index) {
changeIndex(index) {
if (this.tabIndex == index) return;
this.$emit('update:tabIndex', index)
this.$emit("changeTab", index)
},
async haveCustomerAccess (merchantId) {
async haveCustomerAccess(merchantId) {
const res = await uni.$api.customerApi.haveCustomerAccess({
merchantId
})
if (res) this.tabs.splice(2,0,{
const len = this.tabs.length - 1
if (res) this.tabs.splice(len, 0, {
label: "客户档案",
icon: "customer-file",
})
this.$store.state.user.haveCustomerAccess = res
const { permissionPhone = [] } = uni.$storage.get('mock_data')
const { phone } = uni.$storage.get('userInfo')
if (!permissionPhone.includes(+phone)) {
this.tabs.push({
label: "个人中心",
icon: "point",
})
}
}
}
}
......@@ -98,6 +105,7 @@ export default {
position: relative;
width: toRpx(240);
flex-shrink: 0;
.left-tabs {
width: 100%;
height: toRpx(1080);
......@@ -114,6 +122,7 @@ export default {
margin: auto;
box-sizing: border-box;
padding-left: toRpx(32);
&::after {
position: absolute;
left: 0;
......@@ -125,6 +134,7 @@ export default {
content: '';
z-index: -1;
}
.tab-item {
width: toRpx(112);
font-size: toRpx(28);
......@@ -132,6 +142,7 @@ export default {
text-align: center;
padding-bottom: toRpx(46);
position: relative;
.dot {
width: toRpx(16);
height: toRpx(16);
......@@ -141,6 +152,7 @@ export default {
right: toRpx(20);
top: toRpx(20);
}
.icon-box {
width: toRpx(112);
height: toRpx(112);
......@@ -150,26 +162,32 @@ export default {
border-radius: 100%;
}
}
.tabActive {
color: #3773f8;
.icon-box {
animation: arc-move 0.15s forwards;
}
}
@keyframes arc-move {
from {
transform: scale(0.1) rotate(0);
}
to {
transform: scale(1) rotate(360deg);
}
}
}
.three {
.tab-item {
padding-bottom: toRpx(64);
}
}
.user-info {
width: toRpx(184);
box-sizing: border-box;
......@@ -178,6 +196,7 @@ export default {
position: relative;
z-index: 2;
text-align: center;
.account-change {
width: toRpx(136);
height: toRpx(32);
......@@ -189,6 +208,7 @@ export default {
margin-top: toRpx(10);
}
}
.user-avatar {
width: toRpx(100);
height: toRpx(100);
......@@ -196,6 +216,7 @@ export default {
box-shadow: 0 toRpx(4) toRpx(8) 0 #0000001a;
border-radius: 100%;
}
.user-name {
font-weight: 500;
font-size: toRpx(28);
......@@ -203,15 +224,18 @@ export default {
margin-top: toRpx(16);
padding: 0 toRpx(24);
}
.user-position {
font-size: toRpx(20);
color: #9b9b9e;
margin-top: toRpx(8);
}
.left-footer {
margin-top: auto;
padding: 0 0 toRpx(80) 0;
}
.btn {
display: flex;
align-items: center;
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1
const index = 2
/**
*
0本地
......
{
"name": "展业助手",
"appid": "__UNI__D3BD3DF",
"description": "",
"versionName": "2.4.0",
"versionCode": "100",
"transformPx": false,
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.4.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus": {
"bounce": "none",
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true
"app-plus" : {
"bounce" : "none",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true
},
"screenOrientation": "landscape",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"screenOrientation" : "landscape",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules": {
"Camera": {},
"Record": {},
"VideoPlayer": {},
"AudioPlayer": {},
"SQLite": {}
"modules" : {
"Camera" : {},
"Record" : {},
"VideoPlayer" : {},
"AudioPlayer" : {},
"SQLite" : {}
},
/* 应用发布信息 */
"distribute": {
"distribute" : {
/* android打包配置 */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
......@@ -48,83 +48,76 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"targetSdkVersion": 30
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"UIBackgroundModes": "audio"
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : "audio"
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"speech": {},
"geolocation": {
"system": {
"__platform__": [
"ios",
"android"
]
"sdkConfigs" : {
"ad" : {},
"speech" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "ios", "android" ]
}
}
},
"icons": {
"android": {
"hdpi": "static/72.png",
"xhdpi": "static/96.png",
"xxhdpi": "static/144.png"
"icons" : {
"android" : {
"hdpi" : "static/72.png",
"xhdpi" : "static/96.png",
"xxhdpi" : "static/144.png"
}
}
},
"nativePlugins": {
"Ba-KeepAliveSuit": {
"__plugin_info__": {
"name": "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description": "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms": "Android",
"url": "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name": "uni.gltap",
"ios_bundle_id": "",
"isCloud": true,
"bought": 1,
"pid": "11765",
"parameters": {}
"nativePlugins" : {
"Ba-KeepAliveSuit" : {
"__plugin_info__" : {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "11765",
"parameters" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp": {},
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx79d1ff39bee3d047",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "wx79d1ff39bee3d047",
"setting" : {
"urlCheck" : false
},
"usingComponents": true
"usingComponents" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "2",
"h5": {
"devServer": {
"port": 8080,
"https": false
"vueVersion" : "2",
"h5" : {
"devServer" : {
"port" : 8080,
"https" : false
}
}
}
\ No newline at end of file
}
......@@ -5,17 +5,20 @@ export default {
},
methods: {
async mergeRecord() {
console.log('mergeRecord')
const records = uni.$recordManager.getRecords() || []
const tempRecords = storageApi.getRecords('preRecordList') || []
for (let i = 0; i < records.length; i++) {
await uni.$dbManager.addRecord(records[i])
uni.$recordManager.removeRecord(records[i].id)
try {
const tempRecords = storageApi.getRecords('preRecordList') || []
uni.$logger.local.info(`获取待合并记录${JSON.stringify(tempRecords)}`)
for (let i = 0; i < tempRecords.length; i++) {
tempRecords[i].recordUrlList.forEach(record => {
record.file = record.file.split('/').pop()
})
uni.$logger.local.info(`合并记录${JSON.stringify(tempRecords[i])}`)
this.record.addRecord(tempRecords[i])
}
storageApi.removeRecords('preRecordList')
} catch (error) {
uni.$logger.error(`【合并异常】 ${JSON.stringify(error)}`)
}
for (let i = 0; i < tempRecords.length; i++) {
await uni.$dbTempRecord.addRecord(tempRecords[i])
}
storageApi.setRecords('preRecordList', [])
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!