Commit 7844df55 by 前端

合并

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