Commit 48e179f7 by 前端

授权提示

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