Commit 48e179f7 by 前端

授权提示

1 parent 456c552e
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-11 21:55:29
* @LastEditTime: 2024-04-16 18:46:26
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -33,10 +33,10 @@ export default {
});
}
// let version = '1.0.0'
let version = plus.runtime.version
uni.$api.commonApi.getAPPVersion().then(res =>{
if(res != version) this.$store.dispatch('openUpdateModal')
})
let version = plus.runtime.version;
uni.$api.commonApi.getAPPVersion().then((res) => {
if (res != version) this.$store.dispatch("openUpdateModal");
});
},
onHide: function () {
const recorderManager = uni.getRecorderManager();
......@@ -45,9 +45,6 @@ export default {
recorderManager.start({
duration: 600000,
});
setTimeout(() => {
recorderManager.stop();
}, 600000);
}
},
onError: function (e) {
......
import http from '../request/http'
import http from "../request/http";
module.exports = {
/**获取短信 */
getSmsCode (data = {}) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.sms.get.code', data)
getSmsCode(data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.sms.get.code", data);
},
/**手机验证码登录 */
smsLogin (data = {}) {
data.projectName = 'boutique'
data.source = 'MINIAPP'
data.productCode = 'PC00c2'
// return http.fetch('dj.api.smartcarlife.sms.login', data)
return http.fetch('dj.api.smartcarlife.sms.applogin', data)
smsLogin(data = {}) {
data.projectName = "boutique";
data.source = "MINIAPP";
data.productCode = "PC00c2";
// return http.fetch("dj.api.smartcarlife.sms.login", data);
return http.fetch("dj.api.smartcarlife.sms.applogin", data);
},
/**免登 */
autoLogin (data = {}) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.sms.noSignIn.login', data)
autoLogin(data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.sms.noSignIn.login", data);
},
/**获取当前登录账号能查看的园区店列表 */
getYQList () {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.serviceMerchant.curYqList')
getYQList() {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.serviceMerchant.curYqList");
},
// 获取园区店下的4s店
getSceneMerchantRefStoreList (data) {
data.projectName = 'boutique'
getSceneMerchantRefStoreList(data) {
data.projectName = "boutique";
return http.post({
method: 'dj.api.scenemerchantref.query4SRefByYqShopByLogin',
method: "dj.api.scenemerchantref.query4SRefByYqShopByLogin",
...data,
})
});
},
/**获取帐号列表 */
getListSelectAccount (data = {}) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.workWechat.listSelectAccount', data)
getListSelectAccount(data = {}) {
data.projectName = "boutique";
return http.fetch("dj.api.smartcarlife.workWechat.listSelectAccount", data);
},
/**选择帐号登陆 */
selectAccountLogin (data) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.workWechat.selectAccountLogin', data)
selectAccountLogin(data) {
data.projectName = "boutique";
return http.fetch(
"dj.api.smartcarlife.workWechat.selectAccountLogin",
data
);
},
// 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI (data) {
data.projectName = 'boutique'
getYqMerchantSceneConfigAPI(data) {
data.projectName = "boutique";
return http.post({
method: 'dj.api.smartcarlife.select.openScene.info',
method: "dj.api.smartcarlife.select.openScene.info",
...data,
})
});
},
}
\ No newline at end of file
};
......@@ -36,6 +36,7 @@ switch (uni.getSystemInfoSync().platform) {
permision.judgeIosPermission("camera");
break;
}
Vue.prototype.$permision = permision;
// import sentryInit from "@/utils/sentryConfig/sentryInit";
// sentryInit();
const app = new Vue({
......
......@@ -2,7 +2,7 @@
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "1.0.0",
"versionName" : "1.0.1",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-16 10:17:34
* @LastEditTime: 2024-04-16 18:48:06
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -118,12 +118,6 @@ export default {
},
//开始录音
async startAudio() {
const result = await permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
return;
}
if (this.isStart) return;
this.setAudioStart(true);
this.setAudioList([]);
......@@ -149,7 +143,17 @@ export default {
});
},
//结束录音
stopAudio() {
async stopAudio() {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "请打开录音权限",
icon: "none",
});
return;
}
this.setAudioStart(false);
this.setAudioEnd(true);
recorderManager.stop();
......
......@@ -2,15 +2,12 @@
* @Description: 首页
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @LastEditors: huyue
* @LastEditTime: 2024-04-11 14:26:25
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-16 18:31:54
-->
<template>
<view
class="container"
@click="handleTouchStart()"
>
<view :class="['home',{show:!id}]">
<view class="container" @click="handleTouchStart()">
<view :class="['home', { show: !id }]">
<view class="left-side">
<!-- 左侧内容 -->
<view class="user-info">
......@@ -20,17 +17,11 @@
<view class="user-position">延保专员</view>
</view>
<view class="left-footer">
<view
class="logout"
@click="$refs.kfRef.open()"
>
<view class="logout" @click="$refs.kfRef.open()">
<view class="icon-logout sprite-icon icon-feedback"></view>
<view>反馈</view>
</view>
<view
class="logout"
@click="logout"
>
<view class="logout" @click="logout">
<view class="icon-logout sprite-icon icon-icon-logout"></view>
<view>退出</view>
</view>
......@@ -47,22 +38,17 @@
<view class="module-list">
<view
class="module-item"
v-for="(item,index) in 10"
v-for="(item, index) in 10"
:key="index"
>
<view class="module-img">
</view>
<view class="module-img"> </view>
<view class="module-name"></view>
</view>
</view>
</view>
</template>
<view class="home-title">客户接待</view>
<button
class="start"
@click="start"
hover-class="hover-class"
>
<button class="start" @click="start" hover-class="hover-class">
<view class="icon-start sprite-icon icon-icon-handshake"></view>
<view class="start-text">开始接待</view>
......@@ -81,7 +67,6 @@
mode="scaleToFill"
@load="thumbnailLoad(item.id)"
/>
</view>
<view class="module-name">{{ item.title }}</view>
</view>
......@@ -110,9 +95,8 @@
confirmBtnText="是"
></MessageBox>
</view>
</view>
<view :class="['detail',{show:id}]">
<view :class="['detail', { show: id }]">
<detail
:id.sync="id"
:media="moduleList"
......@@ -137,79 +121,92 @@
</template>
<script>
import myClick from "@/mixin/click";
import detail from '../detail/detail'
import KfBox from './components/KfBox'
import detail from "../detail/detail";
import KfBox from "./components/KfBox";
import { mapMutations } from "vuex";
import NoviceGuide from '@/components/NoviceGuide.vue'
import NoviceGuide from "@/components/NoviceGuide.vue";
export default {
mixins: [myClick],
components: { detail, KfBox, NoviceGuide },
data () {
data() {
return {
moduleList: [],
userInfo: {},
id: "",
type: '',
type: "",
chooseItem: {},
skeletonStatus: true,
thumbnailFulfillList: []
thumbnailFulfillList: [],
};
},
mounted () {
mounted() {
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo
this.userInfo = userInfo
{ shopMerchantId } = userInfo;
this.userInfo = userInfo;
/**获取品牌车型 */
uni.$api.commonApi.getMerchantCarBrandList([shopMerchantId]).then(({ data }) => {
let list = data[0].carBrandList,
carBrandList = []
list?.map(e => {
e.childs.map(i => {
i.brandId = e.id
carBrandList.push(i)
})
})
this.$store.dispatch('setCarBrandsList', carBrandList)
})
uni.$api.commonApi
.getMerchantCarBrandList([shopMerchantId])
.then(({ data }) => {
let list = data[0].carBrandList,
carBrandList = [];
list?.map((e) => {
e.childs.map((i) => {
i.brandId = e.id;
carBrandList.push(i);
});
});
this.$store.dispatch("setCarBrandsList", carBrandList);
});
/**获取销售人员 */
uni.$api.commonApi.getEmployeeList({
merchantId: shopMerchantId,
}).then(res => {
this.$store.dispatch('setEmployeeList', res)
})
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res);
});
},
onBackPress (options) {
onBackPress(options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back()
this.back();
return true;
}
// 其他情况允许正常返回
return false;
},
onShow () {
onShow() {
this.getSoure();
},
async onReachBottom () {
this.$refs.detail?.pageonReachBottom()
async onReachBottom() {
this.$refs.detail?.pageonReachBottom();
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
// 查询素材
async getSoure () {
async getSoure() {
const moduleList = await uni.$api.commonApi.findSoureList();
this.moduleList = moduleList
this.moduleList = moduleList;
// this.skeletonStatus = false
},
start () {
async start() {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "请打开录音权限",
icon: "none",
});
return;
}
this.startAudio();
this.id = this.moduleList[0].id
this.type = 'edit'
this.id = this.moduleList[0].id;
this.type = "edit";
},
// 退出
logout () {
logout() {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.$storage.rm("noSignInUuid");
......@@ -218,49 +215,49 @@ export default {
url: "/pages/common/login",
});
},
toDetail (item) {
this.chooseItem = item
toDetail(item) {
this.chooseItem = item;
this.$refs.previewRef.open();
},
cancel () {
cancel() {
this.$refs.previewRef.close();
},
preview () {
preview() {
let { id } = this.chooseItem;
this.type = 'preview'
this.id = id
this.type = "preview";
this.id = id;
this.$refs.previewRef.close();
},
// 完成接待
done (e) {
done(e) {
this.stopAudio();
// uni.navigateBack();
this.id = ''
this.type = ''
this.id = "";
this.type = "";
this.$store.dispatch("clearCanvas", true);
this.$store.dispatch('clearCustomerInfo')
this.$store.dispatch("clearCustomerInfo");
this.setReceptionStatus(e);
},
back () {
if (!this.id) return uni.navigateBack()
back() {
if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.finish.open();
this.$store.dispatch("clearCustomerInfo");
this.id = ''
this.type = ''
this.id = "";
this.type = "";
},
thumbnailLoad (id) {
this.thumbnailFulfillList.push(id)
if (this.thumbnailFulfillList.length == this.moduleList.length) this.skeletonStatus = false
thumbnailLoad(id) {
this.thumbnailFulfillList.push(id);
if (this.thumbnailFulfillList.length == this.moduleList.length)
this.skeletonStatus = false;
},
openKf () {
this.$refs.kfRef.open()
openKf() {
this.$refs.kfRef.open();
},
nextStep() {
let { id } = this.moduleList[0];
this.type = "preview";
this.id = id;
},
nextStep(){
let {id} = this.moduleList[0]
this.type = 'preview'
this.id = id
}
},
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!