Commit 52ce49ee by 前端

审核

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