Commit 52ce49ee by 前端

审核

1 parent d8f8492c
...@@ -38,19 +38,11 @@ export default { ...@@ -38,19 +38,11 @@ export default {
} }
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 && !systemInfo.isCheckedUpdate) this.$store.dispatch("openUpdateModal"); if (res != version && !systemInfo.isCheckedUpdate)
this.$store.dispatch("openUpdateModal");
}); });
},
onHide: function () {
const recorderManager = uni.getRecorderManager();
if (this.isStart && !this.isEnd) {
recorderManager.stop();
recorderManager.start({
duration: 600000,
});
}
}, },
onHide: function () {},
onError: function (e) { onError: function (e) {
// sentry.captureException(e); // sentry.captureException(e);
}, },
......
...@@ -26,16 +26,16 @@ Vue.config.productionTip = false; ...@@ -26,16 +26,16 @@ Vue.config.productionTip = false;
App.mpType = "app"; App.mpType = "app";
Vue.prototype.$ossDomain = config.OSS_DOMAIN; Vue.prototype.$ossDomain = config.OSS_DOMAIN;
import permision from "@/js_sdk/wa-permission/permission.js"; import permision from "@/js_sdk/wa-permission/permission.js";
switch (uni.getSystemInfoSync().platform) { // switch (uni.getSystemInfoSync().platform) {
case "android": // case "android":
permision.requestAndroidPermission("android.permission.RECORD_AUDIO"); // permision.requestAndroidPermission("android.permission.RECORD_AUDIO");
permision.requestAndroidPermission("android.permission.CAMERA"); // permision.requestAndroidPermission("android.permission.CAMERA");
break; // break;
case "ios": // case "ios":
permision.judgeIosPermission("record"); // permision.judgeIosPermission("record");
permision.judgeIosPermission("camera"); // permision.judgeIosPermission("camera");
break; // break;
} // }
Vue.prototype.$permision = permision; Vue.prototype.$permision = permision;
import sentryInit from "@/utils/sentryConfig/sentryInit"; import sentryInit from "@/utils/sentryConfig/sentryInit";
sentryInit(); sentryInit();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "1.1.1", "versionName" : "1.2.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
"<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" : [ "armeabi-v7a", "arm64-v8a", "x86" ] "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : { "ios" : {
......
...@@ -151,13 +151,13 @@ export default { ...@@ -151,13 +151,13 @@ export default {
}); });
}, },
//结束录音 //结束录音
async stopAudio() { stopAudio: utils.throttle(async function () {
const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
); );
if (result !== 1) { if (result !== 1) {
uni.showToast({ uni.showToast({
title: "请打开录音权限", title: "为了记录语音通话,请打开录音权限",
icon: "none", icon: "none",
}); });
return; return;
...@@ -168,7 +168,7 @@ export default { ...@@ -168,7 +168,7 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
recorderManager.stop(); recorderManager.stop();
}, }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime() {
if (!this.isStart) return; if (!this.isStart) return;
......
...@@ -10,18 +10,11 @@ ...@@ -10,18 +10,11 @@
:value="mobile" :value="mobile"
placeholder="请输入手机号" placeholder="请输入手机号"
maxlength="11" maxlength="11"
@blur="input($event,'mobile')" @blur="input($event, 'mobile')"
/> />
<template v-if="mobile"> <template v-if="mobile">
<view <view class="icon" @click="mobile = ''">
class="icon" <icon type="clear" size="16" color="#000"> </icon>
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
</view> </view>
...@@ -31,43 +24,39 @@ ...@@ -31,43 +24,39 @@
:value="code" :value="code"
placeholder="请输入验证码" placeholder="请输入验证码"
maxlength="4" maxlength="4"
@blur="input($event,'code')" @blur="input($event, 'code')"
/> />
<template v-if="code"> <template v-if="code">
<view <view class="icon" @click="code = ''">
class="icon" <icon type="clear" size="16" color="#000"> </icon>
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
<view <view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]" :class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode" @click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view> >{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view
</view>
<button
class="btn"
@click="login"
>
登录
</button>
<view
class="autoLogin"
@click="noSignIn = !noSignIn"
> >
</view>
<button class="btn" @click="login">登录</button>
<view class="form-footer">
<view class="autoLogin" @click="readingStatus = !readingStatus">
<uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18"
:color="`${readingStatus ? '#2C66F7' : '#858A94'}`"
></uni-icons>
我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view>
<view class="autoLogin" @click="noSignIn = !noSignIn">
<uni-icons <uni-icons
:type="`${noSignIn ?'checkbox-filled':'circle'}`" :type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18" :size="18"
:color="`${noSignIn?'#2C66F7':'#858A94'}`" :color="`${noSignIn ? '#2C66F7' : '#858A94'}`"
></uni-icons> ></uni-icons>
30天内免登录 30天内免登录
</view> </view>
</view> </view>
</view>
<update-box /> <update-box />
</view> </view>
</template> </template>
...@@ -83,6 +72,7 @@ export default { ...@@ -83,6 +72,7 @@ export default {
code: '', code: '',
count: '', count: '',
noSignIn: true, noSignIn: true,
readingStatus:false,
dateKey:null dateKey:null
}; };
}, },
...@@ -134,11 +124,12 @@ export default { ...@@ -134,11 +124,12 @@ export default {
}, 1e3); }, 1e3);
}, },
async login () { async login () {
const { mobile, code: smsCode, noSignIn } = this; const { mobile, code: smsCode, noSignIn,readingStatus } = this;
try { try {
if(!mobile) throw '请输入手机号' if(!mobile) throw '请输入手机号'
if(!smsCode) throw '请输入验证码' if(!smsCode) throw '请输入验证码'
if(!readingStatus) throw '请阅读用户隐私协议'
let params = { let params = {
mobile, mobile,
code: smsCode code: smsCode
...@@ -175,6 +166,12 @@ export default { ...@@ -175,6 +166,12 @@ export default {
url: '/pages/common/accountItems' url: '/pages/common/accountItems'
}) })
}, },
jumpUrl () {
let url = 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
uni.navigateTo({
url: `/pages/common/webview?url=${url}`
})
},
jump (data, noSignIn) { jump (data, noSignIn) {
let { let {
loginUserInfoList, loginUserInfoList,
...@@ -280,13 +277,22 @@ export default { ...@@ -280,13 +277,22 @@ export default {
.btn[disabled][type="default"] { .btn[disabled][type="default"] {
background: #c9c9c9 !important; background: #c9c9c9 !important;
} }
.autoLogin { .form-footer {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
margin-top: 40rpx; margin-top: 40rpx;
.autoLogin {
display: flex;
align-items: center;
margin-right: 20rpx;
.uni-icons { .uni-icons {
margin-right: 8rpx; margin-right: 8rpx;
margin-left: 142rpx; // margin-left: 142rpx;
}
text {
color: #2c66f7;
}
} }
} }
} }
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
* @LastEditTime: 2024-04-18 17:08:12 * @LastEditTime: 2024-04-18 17:08:12
--> -->
<template> <template>
<view <view class="container" @click="handleTouchStart()">
class="container"
@click="handleTouchStart()"
>
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="bg"> <view class="bg">
<view class="top"> <view class="top">
...@@ -18,10 +15,7 @@ ...@@ -18,10 +15,7 @@
<view class="bottom"> <view class="bottom">
<view class="bottom-one" :style="randomize"></view> <view class="bottom-one" :style="randomize"></view>
<view class="bottom-two" :style="randomize"></view> <view class="bottom-two" :style="randomize"></view>
<view <view class="bottom-three" :style="randomize"></view>
class="bottom-three"
:style="randomize"
></view>
</view> </view>
</view> </view>
<!-- <template v-if="false"> --> <!-- <template v-if="false"> -->
...@@ -34,31 +28,30 @@ ...@@ -34,31 +28,30 @@
<!-- <view class="user-position">延保专员</view> --> <!-- <view class="user-position">延保专员</view> -->
</view> </view>
<view class="left-tabs"> <view class="left-tabs">
<template v-for="(i,index) in tabs"> <template v-for="(i, index) in tabs">
<view <view
:class="['tab-item', {tabActive:tabIndex == index} ]" :class="['tab-item', { tabActive: tabIndex == index }]"
:key="index" :key="index"
@click="changeIndex(index)" @click="changeIndex(index)"
> >
<view class="icon-box"> <view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view> <view
:class="[
'sprite-icon',
`icon-${i.icon}${tabIndex == index ? '-active' : ''}`,
]"
></view>
</view> </view>
{{i.label}} {{ i.label }}
</view> </view>
</template> </template>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view <view class="btn" @click="$refs.kfRef.open()">
class="btn"
@click="$refs.kfRef.open()"
>
<view class="sprite-icon icon-feedback"></view> <view class="sprite-icon icon-feedback"></view>
<view>反馈</view> <view>反馈</view>
</view> </view>
<view <view class="btn" @click="$refs.settingRef.open()">
class="btn"
@click="$refs.settingRef.open()"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
<view>设置</view> <view>设置</view>
</view> </view>
...@@ -87,11 +80,7 @@ ...@@ -87,11 +80,7 @@
</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>
...@@ -163,26 +152,17 @@ ...@@ -163,26 +152,17 @@
:isFooter="false" :isFooter="false"
> >
<view class="footer"> <view class="footer">
<view <view class="footer-btn confirm flex" @click="openStep">
class="footer-btn confirm flex"
@click="openStep"
>
完成接待<text>(推荐)</text> 完成接待<text>(推荐)</text>
</view> </view>
<view <view class="footer-btn cancel flex" @click="backHome">
class="footer-btn cancel flex"
@click="backHome"
>
仍要退出<text>(不推荐)</text> 仍要退出<text>(不推荐)</text>
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
<update-box /> <update-box />
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<novice-guide <novice-guide @nextStep="nextStep" @back="back" />
@nextStep="nextStep"
@back="back"
/>
<setting-box ref="settingRef" /> <setting-box ref="settingRef" />
</view> </view>
</template> </template>
...@@ -192,12 +172,12 @@ import detail from "../detail/detail"; ...@@ -192,12 +172,12 @@ 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";
import RecordList from './components/RecordList.vue'; import RecordList from "./components/RecordList.vue";
import SettingBox from './components/SettingBox' import SettingBox from "./components/SettingBox";
export default { export default {
mixins: [myClick], mixins: [myClick],
components: { detail, KfBox, NoviceGuide, RecordList, SettingBox }, components: { detail, KfBox, NoviceGuide, RecordList, SettingBox },
data () { data() {
return { return {
moduleList: [], moduleList: [],
userInfo: {}, userInfo: {},
...@@ -206,33 +186,36 @@ export default { ...@@ -206,33 +186,36 @@ export default {
chooseItem: {}, chooseItem: {},
skeletonStatus: true, skeletonStatus: true,
thumbnailFulfillList: [], thumbnailFulfillList: [],
tabs: [{ tabs: [
label: '首页', {
icon: 'home' label: "首页",
}, { icon: "home",
label: '接待记录', },
icon: 'record' {
}], label: "接待记录",
icon: "record",
},
],
tabIndex: 0, tabIndex: 0,
dateKey:null dateKey: null,
}; };
}, },
mounted () { mounted() {
setInterval(()=>{ setInterval(() => {
this.dateKey = Date.now() this.dateKey = Date.now();
},5e3) }, 5e3);
}, },
computed:{ computed: {
randomize () { randomize() {
let {dateKey} = this let { dateKey } = this;
const maxX = uni.getSystemInfoSync().windowWidth - 300, const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100, maxY = uni.getSystemInfoSync().windowHeight - 100,
x = Math.floor(Math.random() * maxX), x = Math.floor(Math.random() * maxX),
y = Math.floor(Math.random() * maxY) y = Math.floor(Math.random() * maxY);
return `transform:translate(${x}px,${y}px);${dateKey};` return `transform:translate(${x}px,${y}px);${dateKey};`;
}, },
}, },
onBackPress (options) { onBackPress(options) {
if (options.from === "backbutton") { if (options.from === "backbutton") {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -242,17 +225,16 @@ export default { ...@@ -242,17 +225,16 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onShow () { onShow() {
this.init() this.init();
}, },
async onReachBottom () { async onReachBottom() {
const { tabIndex } = this const { tabIndex } = this;
if (tabIndex == 0) this.$refs.detail?.pageonReachBottom(); if (tabIndex == 0) this.$refs.detail?.pageonReachBottom();
// else this.$refs.recordRef?.pageonReachBottom() // else this.$refs.recordRef?.pageonReachBottom()
}, },
methods: { methods: {
init() {
init () {
this.getSoure(); this.getSoure();
this.findPayInfo(); this.findPayInfo();
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
...@@ -283,22 +265,22 @@ export default { ...@@ -283,22 +265,22 @@ export default {
}, },
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
// 查询素材 // 查询素材
async getSoure () { async getSoure() {
const moduleList = await uni.$api.commonApi.findSoureList(); const moduleList = await uni.$api.commonApi.findSoureList();
moduleList.map(e => { moduleList.map((e) => {
e.top_bg = require(`@/assets/images/media/bg-${e.id}.webp`) e.top_bg = require(`@/assets/images/media/bg-${e.id}.webp`);
if (e.id == 2) e.background = '#fcfbf9' if (e.id == 2) e.background = "#fcfbf9";
}) });
this.moduleList = moduleList; this.moduleList = moduleList;
// this.skeletonStatus = false // this.skeletonStatus = false
}, },
async start () { async start() {
const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
); );
if (result !== 1) { if (result !== 1) {
uni.showToast({ uni.showToast({
title: "请打开录音权限", title: "为了记录语音通话,请打开录音权限",
icon: "none", icon: "none",
}); });
return; return;
...@@ -309,21 +291,21 @@ export default { ...@@ -309,21 +291,21 @@ export default {
this.type = "edit"; this.type = "edit";
}, },
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.$refs.finish.close(); this.$refs.finish.close();
this.stopAudio(); this.stopAudio();
// uni.navigateBack(); // uni.navigateBack();
...@@ -333,64 +315,66 @@ export default { ...@@ -333,64 +315,66 @@ export default {
this.setReceptionStatus(e); this.setReceptionStatus(e);
}, 1500); }, 1500);
}, },
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.backHome(); this.backHome();
}, },
backHome () { backHome() {
this.stopAudio(); this.stopAudio();
this.$refs.finish.close(); this.$refs.finish.close();
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.clearHistory(); this.clearHistory();
this.init() this.init();
}, },
thumbnailLoad (id) { thumbnailLoad(id) {
this.thumbnailFulfillList.push(id); this.thumbnailFulfillList.push(id);
if (this.thumbnailFulfillList.length == this.moduleList.length) if (this.thumbnailFulfillList.length == this.moduleList.length)
this.skeletonStatus = false; this.skeletonStatus = false;
}, },
nextStep () { nextStep() {
let { id } = this.moduleList[0]; let { id } = this.moduleList[0];
this.type = "preview"; this.type = "preview";
this.id = id; this.id = id;
}, },
clearHistory () { clearHistory() {
this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory"); this.$store.dispatch("clearHistory");
}, },
openStep () { openStep() {
this.$refs.finish.close(); this.$refs.finish.close();
this.$refs.detail.open(); this.$refs.detail.open();
}, },
// 查询门店支付配置 // 查询门店支付配置
async findPayInfo () { async findPayInfo() {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
const data = await uni.$api.commonApi.findPayInfo({ const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId, merchantId: shopMerchantId,
}); });
let paymentType = [] let paymentType = [];
data.find((item) => { data.find((item) => {
if(item.paymentType == 1) paymentType.push({ if (item.paymentType == 1)
paymentType.push({
name: "扫码支付", name: "扫码支付",
type: 1, type: 1,
title: '付款二维码', title: "付款二维码",
...item ...item,
}) });
if(item.paymentType == 2) paymentType.push( { if (item.paymentType == 2)
paymentType.push({
name: "对公账户", name: "对公账户",
type: 2, type: 2,
title: '付款方式', title: "付款方式",
...item ...item,
}) });
}) });
this.$store.dispatch("setPaymentType",paymentType) this.$store.dispatch("setPaymentType", paymentType);
},
changeIndex(index) {
this.tabIndex = index;
if (index == 0) this.init();
}, },
changeIndex (index) {
this.tabIndex = index
if (index == 0) this.init()
}
}, },
}; };
</script> </script>
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
--> -->
<template> <template>
<view class="information-entry"> <view class="information-entry">
<view class="information-tips">建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。</view> <view class="information-tips"
>建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。</view
>
<view class="information-box"> <view class="information-box">
<view <view
class="information-item" class="information-item"
...@@ -49,10 +51,7 @@ ...@@ -49,10 +51,7 @@
cancelBtnText="否" cancelBtnText="否"
confirmBtnText="是" confirmBtnText="是"
></MessageBox> ></MessageBox>
<finish-step <finish-step ref="stepRef" @submit="submit" />
ref="stepRef"
@submit="submit"
/>
<update-box /> <update-box />
</view> </view>
</template> </template>
...@@ -110,7 +109,7 @@ export default { ...@@ -110,7 +109,7 @@ export default {
); );
if (result !== 1) { if (result !== 1) {
uni.showToast({ uni.showToast({
title: "请打开相机权限", title: "为了访问您的相机和图库,请打开相机权限",
icon: "none", icon: "none",
}); });
return; return;
......
...@@ -52,22 +52,34 @@ function accDiv(arg1, arg2) { ...@@ -52,22 +52,34 @@ function accDiv(arg1, arg2) {
return (r1 / r2) * Math.pow(10, t2 - t1); return (r1 / r2) * Math.pow(10, t2 - t1);
} }
function debounce(fn, timer) { function debounce(fn, timer) {
var t = null var t = null;
return function () { return function () {
if (t) { if (t) {
clearTimeout(t) clearTimeout(t);
} }
if (t == null) { if (t == null) {
fn.apply(this, arguments) fn.apply(this, arguments);
} }
t = setTimeout(() => { t = setTimeout(() => {
t = null t = null;
}, timer) }, timer);
} };
} }
var throttle = function (fn, delay) {
var timer = null;
return function () {
var context = this,
args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(context, args);
}, delay);
};
};
export default { export default {
convertDateTimeFormat, convertDateTimeFormat,
deepClone, deepClone,
accDiv, accDiv,
debounce, debounce,
throttle,
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!