Commit b4786eb1 by 前端

Merge branch 'SAAS+V4.44' into 'master'

上线合并

See merge request !11
2 parents 9dff4d07 c7a9c461
...@@ -7,55 +7,53 @@ ...@@ -7,55 +7,53 @@
* @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
--> -->
<script> <script>
var wv; var wv
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js";
import { mapState } from "vuex"; import { mapState } from 'vuex'
export default { export default {
computed: { computed: {
...mapState("audio", ["isEnd", "isStart"]), ...mapState('audio', ['isEnd', 'isStart'])
},
onLoad() {
}, },
onLoad() {},
onLaunch: async function () { onLaunch: async function () {
this.setAPPVersion() this.setAPPVersion()
setTimeout(() => { setTimeout(() => {
plus.screen.unlockOrientation(); //解除锁定屏幕方向 plus.screen.unlockOrientation() //解除锁定屏幕方向
plus.screen.lockOrientation("landscape-primary"); plus.screen.lockOrientation('landscape-primary')
}, 300); }, 300)
uni.setKeepScreenOn({ uni.setKeepScreenOn({
keepScreenOn: true, keepScreenOn: true
}); })
}, },
methods: { methods: {
setAPPVersion() { setAPPVersion() {
let version = plus.runtime.version; let version = plus.runtime.version
let storageVersion = uni.$storage.get("storageVersion") let storageVersion = uni.$storage.get('storageVersion')
console.log(storageVersion,version) console.log(storageVersion, version)
if(storageVersion != version) { if (storageVersion != version) {
uni.$storage.rm('userInfo'); uni.$storage.rm('userInfo')
uni.$storage.rm('noSignInUuid'); uni.$storage.rm('noSignInUuid')
} }
uni.$storage.set("storageVersion",version) uni.$storage.set('storageVersion', version)
}, }
}, },
onShow: async function () { onShow: async function () {
const systemInfo = await uni.$api.systemApi.getMockData(); // const systemInfo = await uni.$api.systemApi.getMockData();
if (systemInfo.isCheckedUpdate) { // if (systemInfo.isCheckedUpdate) {
checkUpdate(); // checkUpdate();
} // }
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) // if (res != version && !systemInfo.isCheckedUpdate)
this.$store.dispatch("openUpdateModal"); // this.$store.dispatch("openUpdateModal");
}); // });
}, },
onHide: function () {}, onHide: function () {},
onError: function (e) { onError: function (e) {
this.$sendSentry(e); this.$sendSentry(e)
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -5,9 +5,16 @@ const serverConfig = { ...@@ -5,9 +5,16 @@ const serverConfig = {
mockRequestCount: null, mockRequestCount: null,
mockTimer: {}, mockTimer: {},
mockCache: null, mockCache: null,
}; },
const configModule = 'app-tape' bydServerConfig = {
const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`; mockRequestCount: null,
mockTimer: {},
mockCache: null,
},
configModule = 'app-tape',
bydConfigModule = 'byd-pad-config',
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`,
bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}`
/**获取mock数据 */ /**获取mock数据 */
const getMockData = async (immediate = false) => { const getMockData = async (immediate = false) => {
...@@ -24,7 +31,7 @@ const getMockData = async (immediate = false) => { ...@@ -24,7 +31,7 @@ const getMockData = async (immediate = false) => {
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail') data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail') data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail')
serverConfig.mockCache = data; serverConfig.mockCache = data;
uni.$storage.set("mock_data", data); uni.$storage.set('mock_data', data);
return Promise.resolve(data); return Promise.resolve(data);
} else { } else {
const key = Date.now(); const key = Date.now();
...@@ -71,15 +78,53 @@ const imgToBase64 = (list, urlKey) => { ...@@ -71,15 +78,53 @@ const imgToBase64 = (list, urlKey) => {
}) })
}) })
}; };
const updateMockData = (dataList, keyList) => { const updateMockData = (dataList, keyList, storageName = 'mock_data') => {
const mockData = uni.$storage.get('mock_data') const mockData = uni.$storage.get(storageName)
keyList.map(key => { keyList.map(key => {
mockData[key] = dataList[key] mockData[key] = dataList[key]
}) })
setTimeout(() => { setTimeout(() => {
uni.$storage.set("mock_data", mockData) uni.$storage.set(storageName, mockData)
}, 1e3) }, 1e3)
} }
/**
*获取比亚迪配置
*/
const getBydMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('byd_mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
} else {
if (!bydServerConfig.mockRequestCount || immediate) {
bydServerConfig.mockCache = null;
bydServerConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: bydConfigUrl });
data.createTime = Date.now();
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
bydServerConfig.mockCache = data;
uni.$storage.set('byd_mock_data', data);
return Promise.resolve(data);
} else {
const key = Date.now();
return new Promise((resolve) => {
bydServerConfig.mockTimer[key] = setInterval(() => {
if (bydServerConfig.mockCache) {
clearInterval(bydServerConfig.mockTimer[key]);
bydServerConfig.mockRequestCount = null;
resolve(bydServerConfig.mockCache);
}
}, 1e3);
});
}
}
} catch (error) {
console.log(error)
if (bydServerConfig.mockTimer[key]) clearInterval(bydServerConfig.mockTimer[key]);
bydServerConfig.mockRequestCount = null;
return Promise.reject(error);
}
};
// 图片版本号 // 图片版本号
const getImageVersion = async () => { const getImageVersion = async () => {
const accountInfo = await getMockData() const accountInfo = await getMockData()
...@@ -90,5 +135,6 @@ module.exports = { ...@@ -90,5 +135,6 @@ module.exports = {
getImageVersion, getImageVersion,
getMockData, getMockData,
imgToBase64, imgToBase64,
updateMockData updateMockData,
getBydMockData
} }
\ No newline at end of file \ No newline at end of file
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1028rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1028rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -1261rpx -557rpx;} .icon-addr { width: 32rpx; height: 32rpx; background-position: -1240rpx -557rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;} .icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;}
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -381rpx -726rpx;} .icon-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -111rpx -853rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;}
.icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;} .icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;}
.icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;} .icon-change-account { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;}
.icon-clone { width: 24rpx; height: 24rpx; background-position: -1285rpx -668rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;} .icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;} .icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;}
.icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -1041rpx -557rpx;} .icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -830rpx -668rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -492rpx -726rpx;} .icon-customer-file-active { width: 112rpx; height: 112rpx; background-position: -638rpx -558rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: -603rpx -726rpx;} .icon-customer-file { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -714rpx -726rpx;} .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -746rpx -726rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -825rpx -726rpx;} .icon-face-error { width: 96rpx; height: 96rpx; background-position: -857rpx -726rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -968rpx -726rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -1079rpx -726rpx;}
.icon-feedback { width: 64rpx; height: 64rpx; background-position: -1216rpx -469rpx;} .icon-feedback { width: 64rpx; height: 64rpx; background-position: -1216rpx -469rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;} .icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -638rpx -558rpx;} .icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;}
.icon-home { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;} .icon-home { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;}
.icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;} .icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;}
.icon-icon-close { width: 72rpx; height: 72rpx; background-position: -1216rpx -382rpx;} .icon-icon-close { width: 72rpx; height: 72rpx; background-position: -1216rpx -382rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -830rpx -668rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1050rpx -668rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -877rpx -668rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1097rpx -668rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -924rpx -668rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1144rpx -668rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -971rpx -668rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1191rpx -668rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -1096rpx -557rpx;} .icon-invisible { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1018rpx -668rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1238rpx -668rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1065rpx -668rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -1112rpx -668rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1159rpx -668rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;} .icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -936rpx -726rpx;} .icon-qr-success { width: 96rpx; height: 96rpx; background-position: -1190rpx -726rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;} .icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;} .icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -1206rpx -668rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -1047rpx -726rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -1158rpx -726rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1151rpx -557rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;} .icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;}
.icon-setting { width: 64rpx; height: 64rpx; background-position: 0rpx -964rpx;} .icon-setting { width: 64rpx; height: 64rpx; background-position: 0rpx -964rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;} .icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -79rpx -964rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -79rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -1253rpx -668rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1206rpx -557rpx;}
\ No newline at end of file \ No newline at end of file
.icon-total { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type

1.09 MB | W: | H:

1.13 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<zoom-pan <zoom-pan
:class="['canvas-box',{fill:custom}]" :class="['canvas-box',{fill:custom}]"
:disabled="drawStatus || !scaleSwitch" :disabled="drawStatus || !scaleSwitch"
:scale-max="5" :scale-max="3"
:scale-min="1" :scale-min="1"
@scale="scale" @scale="scale"
> >
......
...@@ -114,11 +114,11 @@ const formObject_boutique = [{ ...@@ -114,11 +114,11 @@ const formObject_boutique = [{
required: true required: true
}, },
{ {
label: "车型", label: "品牌车型",
key: "carModel", key: "carModel",
type: "select", type: "select",
popKey: "carBrandListVisible", popKey: "carBrandListVisible",
placeholder: '请选择车型' placeholder: '请选择品牌车型'
}, },
{ {
label: "车主电话", label: "车主电话",
...@@ -174,11 +174,11 @@ export default { ...@@ -174,11 +174,11 @@ export default {
required: true required: true
}, },
{ {
label: "车型", label: "品牌车型",
key: "carModel", key: "carModel",
type: "select", type: "select",
popKey: "carBrandListVisible", popKey: "carBrandListVisible",
placeholder: '请选择车型', placeholder: '请选择品牌车型',
required: true required: true
}, },
{ {
...@@ -220,7 +220,7 @@ export default { ...@@ -220,7 +220,7 @@ export default {
}, },
tips () { tips () {
let { sceneType, titleTips } = this, let { sceneType, titleTips } = this,
text = titleTips || '检测到“交车通知书”中未填写客户档案,请填写后再完成接待。' text = titleTips || '检测到“交车告知书”中未填写客户档案,请填写后再完成接待。'
if (sceneType == 1) text = '请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。' if (sceneType == 1) text = '请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。'
return text return text
} }
......
...@@ -409,10 +409,6 @@ export default { ...@@ -409,10 +409,6 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@font-face {
font-family: 'numberBold';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf');
}
.record-box { .record-box {
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
...@@ -593,7 +589,7 @@ export default { ...@@ -593,7 +589,7 @@ export default {
} }
.num-box { .num-box {
.num { .num {
font-family: 'numberBold'; font-family: 'number-700';
font-size: 48rpx; font-size: 48rpx;
font-weight: 700; font-weight: 700;
margin: 0 4rpx; margin: 0 4rpx;
......
<template> <template>
<uni-popup <uni-popup ref="popup" border-radius="20px">
ref="popup"
border-radius="20px"
>
<view class="setting-box"> <view class="setting-box">
<view <view class="close flex" @click="close">
class="close flex" <uni-icons type="closeempty" :size="18" color="#1A1A1A"></uni-icons>
@click="close"
>
<uni-icons
type="closeempty"
:size="18"
color="#1A1A1A"
></uni-icons>
</view> </view>
<view class="app-info flex"> <view class="app-info flex">
<view class="sprite-icon icon-logo"></view> <view class="sprite-icon icon-logo"></view>
展业助手 展业助手
<view class="version"> <view class="version">版本号:V{{ version }}</view>
版本号:V{{version}} <view class="check-box" @click="handleCheck">检查更新</view>
</view>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view <view class="btn flex" @click="changeAccount">切换账号</view>
class="btn flex" <view class="btn flex logout" @click="logout">退出</view>
@click="changeAccount"
>
切换账号
</view>
<view
class="btn flex logout"
@click="logout"
>退出</view>
</view> </view>
<view <view class="a" @click="jump('agreement')">《用户隐私协议》</view>
class="a" <view class="icp flex" @click="jump('icp')">
@click="jump('agreement')"
>《用户隐私协议》</view>
<view
class="icp flex"
@click="jump('icp')"
>
ICP备案号:苏ICP备18023686号-2A ICP备案号:苏ICP备18023686号-2A
<view class="sprite-icon icon-arrow-right"></view> <view class="sprite-icon icon-arrow-right"></view>
</view> </view>
<view class="app-code flex">
APP编码:{{ deviceId }}
<view class="sprite-icon icon-clone" @click="copyText"></view>
</view>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js";
export default { export default {
name: 'SettingBox', name: 'SettingBox',
data () { data() {
return { return {
version: '', version: '',
} deviceId: ''
}, }
mounted () { },
this.version = plus?.runtime?.version || '1.0.0' mounted() {
}, this.version = plus?.runtime?.version || '1.0.0'
methods: { const {
open () { deviceId
this.$refs.popup.open("center"); } = uni.getDeviceInfo()
}, this.deviceId = deviceId
close () { },
this.$refs.popup.close() methods: {
}, copyText() {
changeAccount () { uni.setClipboardData({
uni.redirectTo({ data: this.deviceId,
url: '/pages/common/accountItems' success: function() {
}) uni.showToast({
}, title: '复制成功',
// 退出 icon: 'success'
logout () { });
let _this = this }
uni.showModal({ });
title: '温馨提示', },
content: '是否退出当前账号?', /** 比较版本号的大小
confirmColor: '#347BFF', **/
async success (res) { compareVersions(version1, version2) {
if (res.confirm) { const v1 = version1.split('.').map(v => +v) // 转化成数字数组
_this.$emit('stopAudio') const v2 = version2.split('.').map(v => +v)
try { const b1 = v1.every(v => !isNaN(v)) // 判断数组的每一项是否是数字
uni.showLoading({ const b2 = v2.every(v => !isNaN(v)) // 如果不是则返回错误信息
mask: true if (!b1 || !b2) return '版本号错误,只能包含数字、.'
}) const len = Math.max(v1.length, v2.length)
const { code, message } = await uni.$api.userApi.logout(), for (let i = 0; i < len; i++) {
userInfo = uni.$storage.get("userInfo") const num1 = v1[i] || 0
console.log(code) const num2 = v2[i] || 0
if (code == 0) { if (num1 > num2) return 1 // 如果版本号1大于版本号2,则输出1
uni.$storage.rm("userInfo"); if (num1 < num2) return -1 // 反之则输出 -1
uni.$storage.rm("sessionId"); }
uni.$storage.rm("noSignInUuid"); // 如果版本号1 等于版本号2,则输出0
setTimeout(() => { return 0
uni.hideLoading() },
uni.reLaunch({
url: `/pages/common/login?mobile=${userInfo.phone}`, async handleCheck() {
}); const {
}, 500) textList,
} else throw message tempFileURL,
} catch (error) { version
console.log(error) } = uni.$storage.get('mock_data')
uni.hideLoading() const res = this.compareVersions(this.version,version)
uni.showToast({ if(res > -1) {
title: error, uni.showToast({
icon: "none", title: '目前已是最新版本',
}); duration: 2000,
} icon: 'none'
} });
} return
}) }
}, this.close()
jump (type) { const e = {
let url = type == 'icp' ? 'https://beian.miit.gov.cn/' : 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html' result: {
uni.navigateTo({ "is_silently": false,
url: `/pages/common/webview?url=${url}` "is_mandatory": true,
}) "name": "",
} "title": "",
} "contents": textList.join('\n'),
"version": version,
"url": tempFileURL,
"stable_publish": true,
},
}
checkUpdate(e)
},
open() {
this.$refs.popup.open("center");
},
close() {
this.$refs.popup.close()
},
changeAccount() {
uni.reLaunch({
url: '/pages/common/accountItems'
})
},
// 退出
logout() {
let _this = this
uni.showModal({
title: '温馨提示',
content: '是否退出当前账号?',
confirmColor: '#347BFF',
async success(res) {
if (res.confirm) {
_this.$emit('stopAudio')
try {
uni.showLoading({
mask: true
})
const {
code,
message
} = await uni.$api.userApi.logout(),
userInfo = uni.$storage.get("userInfo")
console.log(code)
if (code == 0) {
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
uni.$storage.rm("noSignInUuid");
setTimeout(() => {
uni.hideLoading()
uni.reLaunch({
url: `/pages/common/login?mobile=${userInfo.phone}`,
});
}, 500)
} else throw message
} catch (error) {
console.log(error)
uni.hideLoading()
uni.showToast({
title: error,
icon: "none",
});
}
}
}
})
},
jump(type) {
let url = type == 'icp' ? 'https://beian.miit.gov.cn/' :
'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
uni.navigateTo({
url: `/pages/common/webview?url=${url}`
})
}
}
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.setting-box { .setting-box {
position: relative; position: relative;
width: 720rpx; width: 720rpx;
...@@ -134,6 +182,7 @@ export default { ...@@ -134,6 +182,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
.close { .close {
position: absolute; position: absolute;
width: 120rpx; width: 120rpx;
...@@ -142,23 +191,40 @@ export default { ...@@ -142,23 +191,40 @@ export default {
right: 0; right: 0;
justify-content: center; justify-content: center;
} }
.app-info { .app-info {
flex-direction: column; flex-direction: column;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
.sprite-icon { .sprite-icon {
margin-bottom: 12rpx; margin-bottom: 12rpx;
box-shadow: 0 0 24rpx 0 #3682ef33; box-shadow: 0 0 24rpx 0 #3682ef33;
border-radius: 40rpx; border-radius: 40rpx;
} }
.version { .version {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
.check-box {
width: 120rpx;
padding: 10rpx 0rpx 4rpx;
background: #f2f2f2;
border-radius: 6rpx;
font-size: 22rpx;
color: #999999;
text-align: center;
margin-top: 16rpx;
box-sizing: border-box;
}
} }
.btn-box { .btn-box {
margin-top: 120rpx; margin-top: 120rpx;
.btn { .btn {
width: 384rpx; width: 384rpx;
height: 64rpx; height: 64rpx;
...@@ -170,20 +236,34 @@ export default { ...@@ -170,20 +236,34 @@ export default {
color: #3b73ff; color: #3b73ff;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.logout { .logout {
background: #ffffff; background: #ffffff;
color: #333333; color: #333333;
border: 2rpx solid #e8e8e8; border: 2rpx solid #e8e8e8;
} }
} }
.a { .a {
font-size: 24rpx; font-size: 24rpx;
color: #2c66f7; color: #2c66f7;
margin: 48rpx 0 16rpx; margin: 48rpx 0 16rpx;
} }
.icp { .icp {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
.app-code {
font-size: 24rpx;
color: #999999;
line-height: 40rpx;
.icon-clone {
width: 24rpx;
height: 24rpx;
}
}
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -427,6 +427,8 @@ export default { ...@@ -427,6 +427,8 @@ export default {
padding-top: 92rpx; padding-top: 92rpx;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
position: relative;
z-index: 2;
.account-change { .account-change {
width: 136rpx; width: 136rpx;
height: 32rpx; height: 32rpx;
......
<template> <template>
<view class="layout"> <view :class="['layout',{'byd-layout':isByd}]">
<wnCanvas <wnCanvas
canvasId="c-5" :canvasId="`c-${madiaId}`"
:drawStatus="penSwitch" :drawStatus="penSwitch"
custom custom
@scale="$emit('scale',$event)" @scale="$emit('scale',$event)"
...@@ -81,7 +81,9 @@ export default { ...@@ -81,7 +81,9 @@ export default {
penSwitch: Boolean, penSwitch: Boolean,
show: Boolean, show: Boolean,
title: String, title: String,
isPreview: Boolean isPreview: Boolean,
isByd: Boolean,
madiaId: Number
}, },
name: 'Reception', name: 'Reception',
data () { data () {
...@@ -102,7 +104,7 @@ export default { ...@@ -102,7 +104,7 @@ export default {
maxlength: 11, maxlength: 11,
}, },
{ {
placeholder: '车型', placeholder: '品牌车型',
key: 'carModel', key: 'carModel',
type: 'select', type: 'select',
popKey: 'carBrandListVisible', popKey: 'carBrandListVisible',
...@@ -276,4 +278,13 @@ export default { ...@@ -276,4 +278,13 @@ export default {
} }
} }
} }
.byd-layout {
background-image: url('@/assets/images/media/byd-insurance-bg.webp') !important;
.title {
padding: 120rpx 128rpx 48rpx;
.text {
text-align: center;
}
}
}
</style> </style>
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<scroll-view <scroll-view
class="table" class="table"
scroll-y scroll-y
@touchmove.stop
:scroll-top="scrollTop" :scroll-top="scrollTop"
> >
<template v-if="flag"> <template v-if="flag">
...@@ -131,10 +130,6 @@ export default { ...@@ -131,10 +130,6 @@ export default {
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
}
},
show (n) {
if (n) {
const { storageKey } = this, const { storageKey } = this,
insuranceList = uni.getStorageSync(storageKey) insuranceList = uni.getStorageSync(storageKey)
if (insuranceList) { if (insuranceList) {
...@@ -142,6 +137,11 @@ export default { ...@@ -142,6 +137,11 @@ export default {
this.insuranceList = JSON.parse(JSON.stringify(insuranceList)) this.insuranceList = JSON.parse(JSON.stringify(insuranceList))
this.flag = true this.flag = true
} }
}
},
show (n) {
if (n) {
this.getMerchantInsuranceList() this.getMerchantInsuranceList()
} }
}, },
...@@ -259,8 +259,8 @@ export default { ...@@ -259,8 +259,8 @@ export default {
return processedString return processedString
}, },
choose(item, index) { choose (item, index) {
if(this.isPreview) return if (this.isPreview) return
this.insuranceList[index].checked = !item.checked this.insuranceList[index].checked = !item.checked
}, },
} }
......
const target = ["ip", "dev", "uat", "prod", "beta"]; const target = ["ip", "dev", "uat", "prod", "beta"];
const index = 4; const index = 2;
/** /**
* *
0本地 0本地
......
...@@ -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-26 10:04:31 * @LastEditTime: 2024-08-30 17:49:04
* @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
*/ */
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
this.setAudioInfo({ endReasonType: 1 }) this.setAudioInfo({ endReasonType: 1 })
}, },
getParams() { getParams() {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType } = uni.$storage.get('userInfo'), const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo, { customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map(item => { receptionCustomerPaySourceList = this.booksList.map(item => {
return { return {
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
} }
}), }),
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo, { receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ deviceId: appCode } = uni.getDeviceInfo(),
params = { params = {
staffUuid: uuid, staffUuid: uuid,
staffName: name, staffName: name,
...@@ -98,6 +99,7 @@ export default { ...@@ -98,6 +99,7 @@ export default {
endReasonType, //原因 1.异常 0.正常 endReasonType, //原因 1.异常 0.正常
customerName, customerName,
phoneNumber, phoneNumber,
appCode,
loginPhone: phone, loginPhone: phone,
salesName: staffName, salesName: staffName,
salesUuid, salesUuid,
...@@ -106,15 +108,34 @@ export default { ...@@ -106,15 +108,34 @@ export default {
receptionEndTime, receptionEndTime,
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径 receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改 bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1 //1问界 2 比亚迪 3 其他 channelType: channelType || 1 //1问界 2 比亚迪 3 其他
} }
return params return params
}, },
/**
* 修改文件名。
* @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName
*/
RenameFile(oldFilePath, newFileName) {
plus.io.resolveLocalFileSystemURL(oldFilePath, entry => {
entry.getParent(_oldFile => {
entry.moveTo(_oldFile, '/' + newFileName, newFilePath => {
console.log('newFilePath', newFilePath.fullPath)
})
})
})
},
//开始录音 //开始录音
startAudio: utils.throttle(async function () { startAudio: utils.throttle(async function () {
if (this.audioInfo.audioStatus == 'start') return if (this.audioInfo.audioStatus == 'start') return
this.setAudioInfo({ audioList: [], audioStatus: 'start' }) this.setAudioInfo({ audioList: [], audioStatus: 'start' })
this.setBooks([])
this.$store.dispatch('clearCustomerInfo')
this.setReceptionStatus(1)
this.initTime() this.initTime()
recorderManager.start({ recorderManager.start({
duration: 600000, duration: 600000,
...@@ -149,7 +170,12 @@ export default { ...@@ -149,7 +170,12 @@ export default {
console.log(res) console.log(res)
} }
}) })
this.handleSave(saveResult[1].savedFilePath) const oldFilePath = saveResult[1].savedFilePath
const { phone } = uni.$storage.get('userInfo')
const newFileName = String(phone).slice(-4) + '_' + oldFilePath.replace(/.+\/(\d+\.mp3)/, '$1')
const newFilePath = oldFilePath.replace(/(.+\/)(\d+\.mp3)/, '') + newFileName
this.RenameFile(oldFilePath, newFileName)
this.handleSave(newFilePath)
}) })
}, 300), }, 300),
handleSave(file) { handleSave(file) {
...@@ -157,13 +183,10 @@ export default { ...@@ -157,13 +183,10 @@ export default {
if (file) { if (file) {
this.setAudioInfo({ audioList }) this.setAudioInfo({ audioList })
} }
if (this.audioInfo.audioStatus != 'end') { if (this.audioInfo.audioStatus != 'end' && this.audioInfo.audioStatus != 'finish') {
return return
} }
this.saveRecord() this.saveRecord()
this.setBooks([])
this.$store.dispatch('clearCustomerInfo')
this.setReceptionStatus(1)
this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' }) this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' })
}, },
/**保存记录*/ /**保存记录*/
...@@ -177,7 +200,9 @@ export default { ...@@ -177,7 +200,9 @@ export default {
file: path + i.split('/').pop() file: path + i.split('/').pop()
} }
}) })
console.log(this.getParams()) if (recordUrlList.length) {
this.$store.dispatch('clearCustomerInfo')
}
uni.$recordManager.addRecord({ uni.$recordManager.addRecord({
...params, ...params,
id: utils.uuid(), id: utils.uuid(),
...@@ -217,6 +242,9 @@ export default { ...@@ -217,6 +242,9 @@ export default {
}) })
setTimeout(() => { setTimeout(() => {
uni.hideLoading() uni.hideLoading()
if (this.audioInfo.audioStatus == 'end') {
this.handleSave()
}
}, 3000) }, 3000)
this.times = 0 this.times = 0
clearInterval(this.timer) clearInterval(this.timer)
......
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
uni.hideLoading() uni.hideLoading()
this.flag = true; this.flag = true;
this.isEnd = true this.isEnd = true
throw error;
} }
}, },
}, },
......
...@@ -44,12 +44,11 @@ export default { ...@@ -44,12 +44,11 @@ export default {
await this.uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName) await this.uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName)
} else { } else {
this.reportError(recordId, fileName, data) this.reportError(recordId, fileName, data)
// this.$sendSentry(`上传失败:文件名-${fileName} 错误码-${data.oss.res.status},失败原因-${JSON.stringify(data.oss.res)}`);
} }
} catch (e) { } catch (e) {
this.reportError(recordId, fileName, e) this.reportError(recordId, fileName, e)
} finally { } finally {
console.log('本次任务完成,开启下一次上传任务!'); console.log('本次任务完成,开启下一次上传任务!')
this.polling() this.polling()
} }
}, },
...@@ -58,7 +57,7 @@ export default { ...@@ -58,7 +57,7 @@ export default {
*/ */
reportError(recordId, filePath, res) { reportError(recordId, filePath, res) {
const { customerName, phoneNumber, carModel, salesName } = uni.$recordManager.getRecordById(recordId) || {} const { customerName, phoneNumber, carModel, salesName } = uni.$recordManager.getRecordById(recordId) || {}
const { name } = uni.$storage.get('userInfo') const { name } = uni.$storage.get('userInfo') || {}
this.$sendSentry(`上传失败:文件-${filePath} 手机号-${phoneNumber} 姓名-${customerName} 销售-${salesName} 车型-${carModel} 员工-${name}失败原因-${JSON.stringify(res)}`) this.$sendSentry(`上传失败:文件-${filePath} 手机号-${phoneNumber} 姓名-${customerName} 销售-${salesName} 车型-${carModel} 员工-${name}失败原因-${JSON.stringify(res)}`)
}, },
/** /**
...@@ -72,11 +71,19 @@ export default { ...@@ -72,11 +71,19 @@ export default {
initWebview() { initWebview() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var currentWebview = this.$parent.$scope.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效 var currentWebview = this.$parent.$scope.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
setTimeout(function () { let i = setInterval(() => {
var wv = currentWebview.children()[0] var wv = currentWebview.children()[0]
wv.setStyle({ top: '100%', height: 300 }) if (wv) {
resolve(wv) clearInterval(i)
}, 1000) //如果是页面初始化调用时,需要延时一下 wv.setStyle({ top: '100%', height: 300 })
resolve(wv)
}
}, 100)
// setTimeout(function () {
// var wv = currentWebview.children()[0]
// wv.setStyle({ top: '100%', height: 300 })
// resolve(wv)
// }, 1000) //如果是页面初始化调用时,需要延时一下
}) })
}, },
/** /**
...@@ -93,6 +100,7 @@ export default { ...@@ -93,6 +100,7 @@ export default {
async enQueue() { async enQueue() {
const _snapshot = await this.getRecordsSnapshotFlatten() const _snapshot = await this.getRecordsSnapshotFlatten()
this.snapshot = new Queue(_snapshot) this.snapshot = new Queue(_snapshot)
console.log('创建任务快照.下一轮快照文件个数:', this.snapshot.size)
}, },
/** /**
* 获取记录快照并展平数据 * 获取记录快照并展平数据
...@@ -119,6 +127,7 @@ export default { ...@@ -119,6 +127,7 @@ export default {
*/ */
async uploadRecord(record) { async uploadRecord(record) {
const { lsaccessKeySecret, securityToken, lsaccessKeyId } = await getOssToken() const { lsaccessKeySecret, securityToken, lsaccessKeyId } = await getOssToken()
console.log('获取Token成功!!', `lsaccessKeySecret: ${lsaccessKeySecret}, lsaccessKeyId: ${lsaccessKeyId}`)
this.wv.evalJS(`msgFromUniapp('${lsaccessKeyId}','${lsaccessKeySecret}','${securityToken}','${record.fileName}','${record.filePath}','${record.recordId}')`) this.wv.evalJS(`msgFromUniapp('${lsaccessKeyId}','${lsaccessKeySecret}','${securityToken}','${record.fileName}','${record.filePath}','${record.recordId}')`)
}, },
/** /**
...@@ -142,7 +151,7 @@ export default { ...@@ -142,7 +151,7 @@ export default {
const record = uni.$recordManager.getRecordById(recordId) const record = uni.$recordManager.getRecordById(recordId)
if (!record) return if (!record) return
this._changeFilePathToServer(record, filePathOnClient, filePathOnServer, fileName) this._changeFilePathToServer(record, filePathOnClient, filePathOnServer, fileName)
await this._saveOrUpdate(record,filePathOnClient) await this._saveOrUpdate(record, filePathOnClient)
} catch (err) { } catch (err) {
throw new Error(err) throw new Error(err)
} finally { } finally {
...@@ -196,7 +205,7 @@ export default { ...@@ -196,7 +205,7 @@ export default {
* @param {Object} record - 要保存或更新的记录对象 * @param {Object} record - 要保存或更新的记录对象
* @throws {Error} 如果在保存或更新记录时发生错误,将抛出错误 * @throws {Error} 如果在保存或更新记录时发生错误,将抛出错误
*/ */
async _saveOrUpdate(record,filePathOnClient) { async _saveOrUpdate(record, filePathOnClient) {
if (record.recordUrlList?.every(i => i.status == undefined)) { if (record.recordUrlList?.every(i => i.status == undefined)) {
const pathArr = record.recordUrlList.map(i => i.file) const pathArr = record.recordUrlList.map(i => i.file)
const params = { ...record, recordUrlList: pathArr } const params = { ...record, recordUrlList: pathArr }
...@@ -260,7 +269,11 @@ export default { ...@@ -260,7 +269,11 @@ export default {
console.log(this.snapshot.size, '当前待上传文件快照数量') console.log(this.snapshot.size, '当前待上传文件快照数量')
if (this.snapshot === null) return if (this.snapshot === null) return
// prettier-ignore // prettier-ignore
uni.$isNetWork().then(this.upload).catch(() =>{this.pollingLater(interval)}) uni.$isNetWork().then(this.upload).catch(e =>{
console.log('网络错误',e);
this.reportError('', '异常', e)
this.pollingLater(interval)
})
}, },
/** /**
* 上传文件或执行队列操作 * 上传文件或执行队列操作
...@@ -268,16 +281,13 @@ export default { ...@@ -268,16 +281,13 @@ export default {
* *
* @throws {Error} 如果在上传过程中发生错误,将抛出错误,延迟 interval 后继续 polling * @throws {Error} 如果在上传过程中发生错误,将抛出错误,延迟 interval 后继续 polling
*/ */
upload() { async upload() {
if (this.snapshot.size == 0) { if (this.snapshot.size == 0) {
this.pollingLater(interval) this.pollingLater(interval)
this.enQueue() this.enQueue()
} else { } else {
let record = this.snapshot.dequeue() let record = this.snapshot.dequeue()
// while(record.file.startsWith('http')) { await this.uploadRecord(record)
// record = this.snapshot.dequeue()
// }
this.uploadRecord(record)
} }
}, },
/** /**
...@@ -287,8 +297,10 @@ export default { ...@@ -287,8 +297,10 @@ export default {
* 然后,它将 snapshot 对象设置为 null,以释放资源并停止轮询 * 然后,它将 snapshot 对象设置为 null,以释放资源并停止轮询
*/ */
stopPolling() { stopPolling() {
this.snapshot.clear() if (this.snapshot) {
this.snapshot = null this.snapshot.clear()
this.snapshot = null
}
if (timer) clearTimeout(timer) if (timer) clearTimeout(timer)
}, },
/** /**
...@@ -302,6 +314,7 @@ export default { ...@@ -302,6 +314,7 @@ export default {
timer = setTimeout(() => { timer = setTimeout(() => {
this.polling() this.polling()
}, interval * 1000) }, interval * 1000)
console.log(interval + 's后开始下一轮上传!')
} }
}, },
/** /**
......
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-weight: 500; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
} }
......
...@@ -497,7 +497,7 @@ export default { ...@@ -497,7 +497,7 @@ export default {
} }
.text { .text {
line-height: 112rpx; line-height: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 80rpx; font-size: 80rpx;
color: #333333; color: #333333;
} }
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-weight: 500; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
color: #1a1a1a; color: #1a1a1a;
} }
......
...@@ -82,6 +82,9 @@ export default { ...@@ -82,6 +82,9 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onLoad () {
this.init();
},
onShow () { onShow () {
const userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo")
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
...@@ -92,7 +95,6 @@ export default { ...@@ -92,7 +95,6 @@ export default {
}); });
return; return;
} }
this.init()
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
}) })
uni.hideLoading() uni.hideLoading()
userInfo.channelType = res.channelType || 1 // 默认1 1问界 2 比亚迪 3 其他 userInfo.channelType = res.channelType || 1 // 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType = 3 // userInfo.channelType = 2
uni.$storage.set('userInfo', userInfo) uni.$storage.set('userInfo', userInfo)
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
--> -->
<template> <template>
<view <view
class="layout" :class="['layout',{'byd-layout':isByd}]"
@click.prevent="touch" @click.prevent="touch"
> >
<wnCanvas <wnCanvas
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
class="serice-image" class="serice-image"
/> />
<view class="ul"> <view class="ul">
<view class="ul-title">高价值零部件</view> <view class="ul-title">{{isByd?'部分零部件更换成本':'高价值零部件'}}</view>
<view <view
class="li-item" class="li-item"
v-for="i in ulList" v-for="i in ulList"
...@@ -61,7 +61,10 @@ ...@@ -61,7 +61,10 @@
<view class="li-item-content"> <view class="li-item-content">
<view class="li-number">{{ i.index }}</view>{{ i.name }} <view class="li-number">{{ i.index }}</view>{{ i.name }}
</view> </view>
<view v-if="i.hasArrow" class="sprite-icon icon-icon-arrow icon-arrow"></view> <view
v-if="i.hasArrow"
class="sprite-icon icon-icon-arrow icon-arrow"
></view>
<!-- <image <!-- <image
v-if="i.hasArrow" v-if="i.hasArrow"
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp" src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
...@@ -93,7 +96,8 @@ export default { ...@@ -93,7 +96,8 @@ export default {
title: String, title: String,
madiaId: Number, madiaId: Number,
ulList: Array, ulList: Array,
screenList: Array screenList: Array,
isByd: Boolean
}, },
components: { partsPop }, components: { partsPop },
data () { data () {
...@@ -118,12 +122,10 @@ export default { ...@@ -118,12 +122,10 @@ export default {
this.$emit('onProductModel', false) this.$emit('onProductModel', false)
}, },
open (name) { open (name) {
console.log(name);
if (name) this.$refs.partsRef.show(name) if (name) this.$refs.partsRef.show(name)
this.$emit('onProductModel', true) this.$emit('onProductModel', true)
}, },
showSection (index) { showSection (index) {
console.log(index);
if (this.showIndex === index) { if (this.showIndex === index) {
// 如果当前点击的项已经是翻转状态,则关闭它 // 如果当前点击的项已经是翻转状态,则关闭它
this.showIndex = -1; this.showIndex = -1;
...@@ -154,7 +156,7 @@ export default { ...@@ -154,7 +156,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
...@@ -294,6 +296,7 @@ export default { ...@@ -294,6 +296,7 @@ export default {
.li-number { .li-number {
font-size: 32rpx; font-size: 32rpx;
margin-right: 12rpx; margin-right: 12rpx;
font-family: 'number-400'
} }
.li-content { .li-content {
...@@ -306,7 +309,7 @@ export default { ...@@ -306,7 +309,7 @@ export default {
} }
.icon-arrow { .icon-arrow {
margin-left: 12rpx; margin-left: 6rpx;
} }
} }
...@@ -368,4 +371,13 @@ export default { ...@@ -368,4 +371,13 @@ export default {
transform: translateY(100%); transform: translateY(100%);
} }
} }
.byd-layout {
.li-item {
padding-left: 20rpx !important;
}
.li-item-content{
font-size: 26rpx !important;
}
}
</style> </style>
<template> <template>
<view class="layout"> <view :class="['layout',{ 'byd-layout':isByd } ]">
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
<template v-if="views&&views.length > 1">
<view class="tabs-box">
<tabs
:list="views"
@tabclick="changeTab"
></tabs>
</view>
</template>
<template v-if="list.length > 0"> <template v-if="list.length > 0">
<!-- {'has-tabs':views && views.length > 1} -->
<scroll-view <scroll-view
class="record-box" :class="['record-box']"
scroll-y scroll-y
:scroll-top="scrollTop" :scroll-top="scrollTop"
@scrolltolower="pageonReachBottom" @scrolltolower="pageonReachBottom"
...@@ -75,31 +84,35 @@ ...@@ -75,31 +84,35 @@
<script> <script>
import utils from '@/utils/utils'; import utils from '@/utils/utils';
import Record from "@/mixin/record"; import Record from "@/mixin/record";
import Tabs from './Tabs.vue'
export default { export default {
components: {
Tabs
},
name: 'History', name: 'History',
mixins: [Record], mixins: [Record],
props: { props: {
title: String, title: String,
madiaId: Number, madiaId: Number,
show: Boolean, show: Boolean,
isByd: Boolean,
views: Array,
}, },
data () { data () {
return { return {
isEnd: false,
shopMerchantId: '', shopMerchantId: '',
goodsName: null, goodsName: null,
scrollTop: 0 scrollTop: 0
} }
}, },
watch: { watch: {
show(n) { show (n) {
console.log('=======', n, this.list)
if (n) this.init() if (n) this.init()
else this.scrollTop = 0 else this.scrollTop = 0
}, },
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler(newval) { handler (newval) {
this.pageNum = 1 this.pageNum = 1
this.scrollTop = 1000 this.scrollTop = 1000
this.list = [] this.list = []
...@@ -140,36 +153,40 @@ export default { ...@@ -140,36 +153,40 @@ export default {
init () { init () {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
if (this.pageNum == 1) this.getQuotationList();
if (this.list.length == 0) { if (this.list.length == 0) {
this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
this.isEnd = true this.isEnd = true
} }
if (this.pageNum == 1) this.getQuotationList();
}, },
async getQuotationList () { async getQuotationList () {
const { goodsName, shopMerchantId, pageNum, pageSize } = this const { goodsName, shopMerchantId, pageNum, pageSize } = this
await this.getList('getQuotationList', { try {
merchantId: shopMerchantId, await this.getList('getQuotationList', {
pageNum, merchantId: shopMerchantId,
pageSize, pageNum,
goodsName, pageSize,
orderStatus: 3, goodsName,
}) orderStatus: 3,
if (pageNum == 1) { })
uni.setStorageSync(`${shopMerchantId}-historyList`, this.list) if (pageNum == 1) {
if (goodsName && this.list.length == 0) { uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
await this.getList('getQuotationList', { if (goodsName && this.list.length == 0) {
merchantId: shopMerchantId, await this.getList('getQuotationList', {
pageNum, merchantId: shopMerchantId,
pageSize, pageNum,
goodsName: null, pageSize,
orderStatus: 3, goodsName: null,
}) orderStatus: 3,
})
}
} }
// if (!goodsName && this.pageNum == 1 && this.list.length) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
} catch (error) {
if (!goodsName && this.pageNum == 1) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
} }
// if (pageNum == 1) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
}, },
pageonReachBottom() { pageonReachBottom () {
this.isEnd = false this.isEnd = false
let { pageNum, total, isEnd, pageSize } = this let { pageNum, total, isEnd, pageSize } = this
if (!isEnd) isEnd = false if (!isEnd) isEnd = false
...@@ -185,6 +202,15 @@ export default { ...@@ -185,6 +202,15 @@ export default {
accDiv (val) { accDiv (val) {
return utils.accDiv(val || 0, 100) return utils.accDiv(val || 0, 100)
}, },
changeTab (index) {
let { views } = this,
goodsName = index == 0 ? null : views[index].tabName
if (this.goodsName == goodsName) return
this.list = []
this.pageNum = 1
this.goodsName = goodsName
this.getQuotationList()
}
} }
} }
</script> </script>
...@@ -194,14 +220,22 @@ export default { ...@@ -194,14 +220,22 @@ export default {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
position: relative; position: relative;
background-image: url("@/assets/images/media/media-bg.webp"); background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%; background-size: 100%;
position: relative;
.tabs-box {
width: 1160rpx;
position: absolute;
top: 228rpx;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
.title { .title {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
...@@ -215,7 +249,9 @@ export default { ...@@ -215,7 +249,9 @@ export default {
height: 100%; height: 100%;
padding-top: 244rpx; padding-top: 244rpx;
} }
.has-tabs {
padding-top: 360rpx;
}
.card-list { .card-list {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
...@@ -267,8 +303,10 @@ export default { ...@@ -267,8 +303,10 @@ export default {
.value { .value {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
// margin-left: auto;
} }
.price { .price {
// margin-left: auto;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
font-weight: 500; font-weight: 500;
...@@ -280,6 +318,7 @@ export default { ...@@ -280,6 +318,7 @@ export default {
} }
} }
.image-box { .image-box {
display: block;
position: absolute; position: absolute;
right: 0rpx; right: 0rpx;
top: 0rpx; top: 0rpx;
...@@ -287,6 +326,7 @@ export default { ...@@ -287,6 +326,7 @@ export default {
height: 364rpx; height: 364rpx;
border-radius: 0 32rpx 32rpx 0; border-radius: 0 32rpx 32rpx 0;
z-index: -1; z-index: -1;
// display: none;
} }
.gradient-overlay { .gradient-overlay {
z-index: -1; z-index: -1;
...@@ -295,11 +335,7 @@ export default { ...@@ -295,11 +335,7 @@ export default {
right: 0; right: 0;
width: 252rpx; width: 252rpx;
height: 364rpx; height: 364rpx;
background: linear-gradient( background: linear-gradient(to left, rgba(247, 249, 255, 0) 0%, rgba(247, 249, 255, 1) 100%);
to left,
rgba(247, 249, 255, 0) 0%,
rgba(247, 249, 255, 1) 100%
);
} }
} }
} }
...@@ -328,4 +364,26 @@ export default { ...@@ -328,4 +364,26 @@ export default {
margin-top: 24rpx; margin-top: 24rpx;
} }
} }
.byd-layout {
.card-list {
.card-item {
.image-box {
display: block;
position: absolute;
right: 0rpx;
top: 0rpx;
width: 252rpx;
height: 364rpx;
border-radius: 0 32rpx 32rpx 0;
z-index: -1;
}
.card-info {
.value,
.price {
margin-left: 0;
}
}
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="layout"> <view class="layout">
<!-- <template v-if="views.length>1">
<view class="tabs-box">
<tabs
:list="views"
@tabclick="changeTab"
></tabs>
</view>
</template> -->
<wnCanvas <wnCanvas
:drawStatus="penSwitch" :drawStatus="penSwitch"
:canvasId="`c-${madiaId}`" :canvasId="`c-${madiaId}`"
custom custom
@scale="$emit('scale',$event)" @scale="$emit('scale',$event)"
ref="canvasRef"
> >
<template slot="customContent"> <template slot="customContent">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
<image <image
class="content" :class="['content',modeName]"
:src="views[viewIndex].detailUrl" :src="views[viewIndex].detailUrl"
/> />
</template> </template>
...@@ -18,17 +27,23 @@ ...@@ -18,17 +27,23 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
export default { export default {
props: { props: {
views: Array, views: Array,
penSwitch: Boolean, penSwitch: Boolean,
title: String, title: String,
madiaId: Number, madiaId: Number,
isByd: Boolean
},
components: {
Tabs
}, },
name: 'MediaComponent', name: 'MediaComponent',
data () { data () {
return { return {
viewIndex: 0 viewIndex: 0,
modeName: ''
} }
}, },
watch: { watch: {
...@@ -47,13 +62,23 @@ export default { ...@@ -47,13 +62,23 @@ export default {
} }
}, },
computed: { computed: {
watchCarModel () { watchCarModel () {
return this.$store.state.user.customerInfo.carModel return this.$store.state.user.customerInfo.carModel
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
changeTab (index) {
if(this.viewIndex == index) return
let { viewIndex } = this
this.modeName = viewIndex > index ? 'to-left' : 'to-right'
this.viewIndex = index
this.$refs.canvasRef.clearBoard()
setTimeout(() => {
this.modeName = ''
}, 300)
}
} }
} }
</script> </script>
...@@ -67,7 +92,7 @@ export default { ...@@ -67,7 +92,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
...@@ -81,5 +106,35 @@ export default { ...@@ -81,5 +106,35 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.tabs-box {
width: 1112rpx;
position: absolute;
top: 228rpx;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
}
.to-left {
animation: to-left 0.25s forwards;
}
.to-right {
animation: to-right 0.25s forwards;
}
@keyframes to-left {
0% {
left: -100%;
}
100% {
left: 0;
}
}
@keyframes to-right {
0% {
left: 100%;
}
100% {
left: 0;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -42,9 +42,7 @@ export default { ...@@ -42,9 +42,7 @@ export default {
}, },
methods: { methods: {
show(name) { show(name) {
console.log(name,'====')
this.screenInfo = this.screenList.find(item => item.name === name) this.screenInfo = this.screenList.find(item => item.name === name)
console.log(this.screenInfo)
this.$refs.partsRef.open("center"); this.$refs.partsRef.open("center");
}, },
close() { close() {
...@@ -73,11 +71,13 @@ export default { ...@@ -73,11 +71,13 @@ export default {
.feature-title { .feature-title {
font-weight: 500; font-weight: 500;
font-size: 40rpx; font-size: 40rpx;
line-height: 56rpx;
} }
.feature-description { .feature-description {
font-size: 28rpx; font-size: 28rpx;
margin-top: 8rpx; margin-top: 8rpx;
color: rgba(255, 255, 255, 0.7); color: rgba(255, 255, 255, 0.7);
line-height: 40rpx;
} }
} }
} }
...@@ -92,6 +92,7 @@ export default { ...@@ -92,6 +92,7 @@ export default {
font-size: 26rpx; font-size: 26rpx;
color: #141414; color: #141414;
border-radius: 0 0 40rpx 40rpx; border-radius: 0 0 40rpx 40rpx;
line-height: 40rpx;
.notice-title { .notice-title {
color: #666666; color: #666666;
} }
......
<template> <template>
<view class="layout"> <view :class="['layout',`${isByd?'byd-layout':''}`]">
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
canvasId="c-1" canvasId="c-1"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/> />
</view> </view>
<view class="title"> <view class="title">
<view class="sprite-icon icon-aito"></view> <view :class="['sprite-icon',`${isByd?'icon-byd':'icon-aito'}`]"></view>
<view class="text">{{title}}</view> <view class="text">{{title}}</view>
</view> </view>
<view class="content"> <view class="content">
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
show: Boolean, show: Boolean,
title: String, title: String,
views: Array, views: Array,
isByd: Boolean,
carTypeList: Array carTypeList: Array
}, },
name: 'Reception', name: 'Reception',
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
maxlength: 11 maxlength: 11
}, },
{ {
placeholder: '车型', placeholder: '品牌车型',
key: 'carModel', key: 'carModel',
type: 'select', type: 'select',
popKey: 'carBrandListVisible' popKey: 'carBrandListVisible'
...@@ -137,7 +138,7 @@ export default { ...@@ -137,7 +138,7 @@ export default {
} }
}, },
show (n) { show (n) {
if (n && !this.customerInfo.carModel) this.$refs.carBrandListVisible.autoSelect() if (n && !this.customerInfo.carModel && !this.isByd) this.$refs.carBrandListVisible.autoSelect()
} }
}, },
computed: { computed: {
...@@ -193,7 +194,7 @@ export default { ...@@ -193,7 +194,7 @@ export default {
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-image: url("@/assets/images/media/reception-bg.webp"); background-image: url('@/assets/images/media/reception-bg.webp');
background-size: 100%; background-size: 100%;
.carType { .carType {
width: 864rpx; width: 864rpx;
...@@ -215,7 +216,7 @@ export default { ...@@ -215,7 +216,7 @@ export default {
} }
.text { .text {
line-height: 112rpx; line-height: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 80rpx; font-size: 80rpx;
color: #333333; color: #333333;
} }
...@@ -276,7 +277,7 @@ export default { ...@@ -276,7 +277,7 @@ export default {
top: -2rpx; top: -2rpx;
width: calc(100% + 4rpx); width: calc(100% + 4rpx);
height: calc(100% + 4rpx); height: calc(100% + 4rpx);
content: ""; content: '';
background-image: linear-gradient(#2f6af7, #75bcff); background-image: linear-gradient(#2f6af7, #75bcff);
box-shadow: 0 0 0 8rpx #2c66f71a; box-shadow: 0 0 0 8rpx #2c66f71a;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -312,7 +313,6 @@ export default { ...@@ -312,7 +313,6 @@ export default {
* See http://animista.net/license for more info. * See http://animista.net/license for more info.
* w: http://animista.net, t: @cssanimista * w: http://animista.net, t: @cssanimista
* ---------------------------------------------- */ * ---------------------------------------------- */
/** /**
* ---------------------------------------- * ----------------------------------------
* animation slide-bl * animation slide-bl
...@@ -346,9 +346,47 @@ export default { ...@@ -346,9 +346,47 @@ export default {
filter: blur(0); filter: blur(0);
} }
} }
.slide-bl { .slide-bl {
-webkit-animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; -webkit-animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
} }
.byd-layout {
background-image: url('@/assets/images/media/byd-reception-bg.webp') !important;
.content .views-box {
margin-top: 44rpx;
.item {
.img {
height: 960rpx;
}
}
}
}
.aito-layout {
.title {
padding: 112rpx 0 40rpx 112rpx;
}
.content {
.form-box {
position: fixed;
right: 72rpx;
top: 188rpx;
padding: 0;
}
.views-box {
margin-top: 0;
display: flex;
flex-wrap: wrap;
padding: 0 38rpx;
gap: 0;
justify-content: flex-start;
.item {
width: 1132rpx;
.img {
width: 100%;
height: 100%;
}
}
}
}
}
</style> </style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</template> </template>
<view <view
class="border" class="border"
:style="borderLeft" :style="`${borderStyle}width:calc(${100 / list.length}% - 4rpx)`"
></view> ></view>
</view> </view>
</template> </template>
...@@ -30,9 +30,22 @@ export default { ...@@ -30,9 +30,22 @@ export default {
data () { data () {
return { return {
tabIndex: 0, tabIndex: 0,
borderLeft: 'display:none;', borderStyle: '',
} }
}, },
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () { mounted () {
this.init() this.init()
}, },
...@@ -48,17 +61,9 @@ export default { ...@@ -48,17 +61,9 @@ export default {
this.setBorderLeft() this.setBorderLeft()
}, },
setBorderLeft () { setBorderLeft () {
let { tabIndex } = this let { tabIndex, list } = this,
const query = uni.createSelectorQuery().in(this) blockWidth = 100 / list.length
query this.borderStyle = `left:${blockWidth * tabIndex}%;`
.select(`#tab-${tabIndex}`)
.boundingClientRect((data) => {
this.borderLeft = `left:${data.left}px;`
setTimeout(() => {
this.borderLeft += `display:block;`
}, 100)
}).exec()
} }
} }
} }
...@@ -66,49 +71,45 @@ export default { ...@@ -66,49 +71,45 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.tabs { .tabs {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; height: 76rpx;
gap: 0 32rpx; background: #ffffff59;
margin-bottom: 32rpx; box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 16rpx;
backdrop-filter: blur(8rpx);
position: relative; position: relative;
padding: 4rpx;
.tab { .tab {
width: 384rpx; flex: 1;
height: 80rpx; height: 100%;
background: #ffffff; background: transparent;
border: 2rpx solid #fff; font-size: 28rpx;
font-size: 32rpx; color: #1f2133;
color: #292d33;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: all 0.15s; transition: all 0.15s;
border-radius: 16rpx;
} }
.active { .active {
// border: 4rpx solid #292d33;
font-weight: 500; font-weight: 500;
color: #292d33; color: #ffffff;
} }
.border { .border {
width: 384rpx;
height: 80rpx;
border: 4rpx solid #292d33;
box-sizing: border-box;
position: absolute; position: absolute;
height: calc(100% - 8rpx);
background-image: linear-gradient(180deg, #6795ff 0%, #4a84f9 100%);
box-shadow: 0 8rpx 24rpx 0 #849dc240;
left: 0; left: 0;
top: 0; top: 50%;
transform: translate(4rpx, -50%);
border-radius: 16rpx;
z-index: -1;
transition: all 0.15s; transition: all 0.15s;
z-index: 3;
} }
} }
.skeleton-box{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #000;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == item.id }]" :class="['view', { showView: id == item.id }, modeName]"
:key="index" :key="index"
@touchstart.stop="touchStart" @touchstart.stop="touchStart"
@touchend.stop="touchEnd" @touchend.stop="touchEnd"
...@@ -37,12 +37,13 @@ ...@@ -37,12 +37,13 @@
:ref="'media' + item.id" :ref="'media' + item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.id" :madiaId="item.id"
:carTypeList="item.carTypeList || []"
@scale="scale" @scale="scale"
:ulList="item.ulList" :ulList="item.ulList"
:screenList="item.screenList" :screenList="item.screenList"
@onProductModel="productModelStatus = $event" @onProductModel="productModelStatus = $event"
:isPreview="type == 'preview'" :isPreview="type == 'preview'"
:isByd="isByd"
:carTypeList="item.carTypeList || []"
/> />
</view> </view>
</template> </template>
...@@ -122,7 +123,8 @@ export default { ...@@ -122,7 +123,8 @@ export default {
screenWidth: null, screenWidth: null,
scaleValueObject: {}, scaleValueObject: {},
showPayPage: false, showPayPage: false,
productModelStatus: false productModelStatus: false,
modeName: ''
}; };
}, },
computed: { computed: {
...@@ -140,11 +142,15 @@ export default { ...@@ -140,11 +142,15 @@ export default {
name = this.media.find((e) => e.id == id)?.detailTitle || "" name = this.media.find((e) => e.id == id)?.detailTitle || ""
return name; return name;
}, },
finishTips(){ finishTips () {
const {channelType} = uni.$storage.get("userInfo") const { channelType } = uni.$storage.get("userInfo")
let text = '' let text = ''
if(channelType != 1) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。' if (channelType == 3) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
return text return text
},
isByd () {
const { channelType } = uni.$storage.get("userInfo")
return channelType == 2
} }
}, },
watch: { watch: {
...@@ -166,7 +172,13 @@ export default { ...@@ -166,7 +172,13 @@ export default {
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup() Object.keys(this.$refs).map(refKey => {
let ref = this.$refs[refKey];
if (ref) {
if (Array.isArray(ref)) ref = ref[0]
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.$emit('update:id', e.id) this.$emit('update:id', e.id)
}, },
back () { back () {
...@@ -192,6 +204,7 @@ export default { ...@@ -192,6 +204,7 @@ export default {
} }
}, },
touchEnd (e) { touchEnd (e) {
if(this.modeName) return
try { try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return
...@@ -202,18 +215,30 @@ export default { ...@@ -202,18 +215,30 @@ export default {
if (Math.abs(this.startY - touch.pageY) > 100) return if (Math.abs(this.startY - touch.pageY) > 100) return
if (!scaleValueObject[id]) scaleValueObject[id] = 1 if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) { if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const nextId = this.getNextId(index, toolList, startX, halfScreenWidth) const { nextId, modeName } = this.getNextId(index, toolList, startX, halfScreenWidth)
this.modeName = modeName
this.$emit('update:id', nextId) this.$emit('update:id', nextId)
setTimeout(() => {
this.modeName = ''
}, 500)
} }
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
}, },
getNextId (index, toolList, startX, halfScreenWidth) { getNextId (index, toolList, startX, halfScreenWidth) {
let nextId = '',
modeName = ''
if (startX > halfScreenWidth) { if (startX > halfScreenWidth) {
return index === toolList.length - 1 ? toolList[0].id : toolList[index + 1].id; nextId = index === toolList.length - 1 ? toolList[0].id : toolList[index + 1].id;
modeName = 'to-right'
} else { } else {
return index === 0 ? toolList[toolList.length - 1].id : toolList[index - 1].id; nextId = index === 0 ? toolList[toolList.length - 1].id : toolList[index - 1].id;
modeName = 'to-left'
}
return {
nextId,
modeName
} }
}, },
scale (e) { scale (e) {
...@@ -245,6 +270,21 @@ export default { ...@@ -245,6 +270,21 @@ export default {
justify-content: center; justify-content: center;
} }
} }
.pen-box {
position: fixed;
right: 40rpx;
top: 5%;
width: 120rpx;
height: 120rpx;
z-index: 10;
box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.view { .view {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -253,31 +293,27 @@ export default { ...@@ -253,31 +293,27 @@ export default {
top: 0; top: 0;
left: 0; left: 0;
visibility: hidden; visibility: hidden;
// display: none;
} }
.showView { .showView {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
visibility: visible; visibility: visible;
// display: block;
animation: show-content-left 0.15s forwards;
} }
.pen-box { .to-left {
position: fixed; animation: to-left 0.25s forwards;
right: 40rpx; }
top: 5%; .to-right {
width: 120rpx; animation: to-right 0.25s forwards;
height: 120rpx; }
z-index: 10; @keyframes to-left {
box-shadow: 0 4px 12px 0 #00000033; 0% {
border-radius: 16rpx; left: -100%;
overflow: hidden; }
image { 100% {
width: 100%; left: 0;
height: 100%;
} }
} }
@keyframes show-content-left { @keyframes to-right {
0% { 0% {
left: 100%; left: 100%;
} }
......
...@@ -84,10 +84,9 @@ export default { ...@@ -84,10 +84,9 @@ export default {
}; };
}, },
computed: { computed: {
/**是否是问界 */ channelType () {
isAITO () {
const { channelType } = uni.$storage.get("userInfo") const { channelType } = uni.$storage.get("userInfo")
return (channelType != 2 && channelType != 3) return channelType || 1 //默认问界
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -101,14 +100,7 @@ export default { ...@@ -101,14 +100,7 @@ export default {
return false; return false;
}, },
onLoad () { onLoad () {
const { this.setViewInfo()
default_moduleList,
default_toolList,
moduleList,
toolList
} = uni.$storage.get("mock_data") || {}
this.moduleList = (this.isAITO ? moduleList : default_moduleList) || []
this.toolList = (this.isAITO ? toolList : default_toolList) || []
this.getSoure(); this.getSoure();
this.get_Vehicle_Sales_Data(); this.get_Vehicle_Sales_Data();
}, },
...@@ -170,42 +162,67 @@ export default { ...@@ -170,42 +162,67 @@ export default {
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
let { moduleList, toolList, default_moduleList, default_toolList } = await uni.$api.systemApi.getMockData( /**比亚迪 */
true if (this.channelType == 2) {
); let { moduleList, toolList } = await uni.$api.systemApi.getBydMockData(true)
if (this.isAITO) { moduleList = await Promise.all(
/**默认问界 */ moduleList.map(async e => ({
await moduleList.map(async (e) => { ...e,
if (e.receptionSourceDetailList) receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList, e.receptionSourceDetailList,
"detailUrl" "detailUrl"
); ) : undefined,
if (e.carTypeList) screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(
e.carTypeList = await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
);
if (e.screenList)
e.screenList = await uni.$api.systemApi.imgToBase64(
e.screenList, e.screenList,
"url" "url"
) ) : undefined
}); }))
)
toolList = await uni.$api.systemApi.imgToBase64( toolList = await uni.$api.systemApi.imgToBase64(toolList, "shortTitleUrl")
uni.$api.systemApi.updateMockData({
moduleList,
toolList, toolList,
"shortTitleUrl" }, ['moduleList', 'toolList'],'byd_mock_data')
); this.setViewInfo(moduleList, toolList)
} else default_toolList = await uni.$api.systemApi.imgToBase64(default_toolList, "shortTitleUrl"); } else {
this.moduleList = this.isAITO ? moduleList : default_moduleList let { moduleList, toolList,
this.toolList = this.isAITO ? toolList : default_toolList default_moduleList, default_toolList,
uni.$api.systemApi.updateMockData({ } = await uni.$api.systemApi.getMockData(true)
default_moduleList, if (this.channelType == 3) {
default_toolList, /**其他品牌 */
moduleList, default_toolList = await uni.$api.systemApi.imgToBase64(default_toolList, "shortTitleUrl");
toolList uni.$api.systemApi.updateMockData({
}, ["moduleList", 'toolList', 'default_moduleList', 'default_toolList']); default_moduleList,
default_toolList,
}, ['default_moduleList', 'default_toolList'])
this.setViewInfo(default_moduleList, default_toolList)
} else {
/**默认问界 */
moduleList = await Promise.all(
moduleList.map(async e => ({
...e,
receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList,
"detailUrl"
) : undefined,
carTypeList: e.carTypeList ? await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
) : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(
e.screenList,
"url"
) : undefined
}))
)
toolList = await uni.$api.systemApi.imgToBase64(toolList, "shortTitleUrl")
uni.$api.systemApi.updateMockData({
moduleList,
toolList
}, ["moduleList", 'toolList'])
this.setViewInfo(moduleList, toolList)
}
}
}, },
errorImg (index) { errorImg (index) {
this.moduleList[index].showAlt = true; this.moduleList[index].showAlt = true;
...@@ -317,6 +334,7 @@ export default { ...@@ -317,6 +334,7 @@ export default {
/**按序加载车型 */ /**按序加载车型 */
async getCarBrandsList (carBrandList, index) { async getCarBrandsList (carBrandList, index) {
const item = carBrandList[index] const item = carBrandList[index]
if (!item) return
const carList = uni.getStorageSync( const carList = uni.getStorageSync(
`${item.id}_${item.brandId}_carlist` `${item.id}_${item.brandId}_carlist`
); );
...@@ -331,6 +349,37 @@ export default { ...@@ -331,6 +349,37 @@ export default {
this.getCarBrandsList(carBrandList, ++index) this.getCarBrandsList(carBrandList, ++index)
} else this.getCarBrandsList(carBrandList, ++index) } else this.getCarBrandsList(carBrandList, ++index)
} }
},
/**素材内容 */
setViewInfo (_moduleList, _toolList) {
if (_moduleList && _toolList) {
this.moduleList = _moduleList
this.toolList = _toolList
return
}
if (this.channelType == 2) {
const {
moduleList,
toolList
} = uni.$storage.get("byd_mock_data")
this.moduleList = moduleList
this.toolList = toolList
} else {
const {
default_moduleList,
default_toolList,
moduleList,
toolList
} = uni.$storage.get("mock_data") || {}
this.moduleList = {
3: default_moduleList,
1: moduleList
}[this.channelType]
this.toolList = {
3: default_toolList,
1: toolList
}[this.channelType]
}
} }
}, },
}; };
......
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
*/ */
@import './assets/css/sprite.scss'; @import './assets/css/sprite.scss';
@font-face {
font-family: 'number-700';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf');
}
@font-face {
font-family: 'number-400';
src: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-400-Regular.ttf');
}
@keyframes show-view { @keyframes show-view {
0% { 0% {
opacity: 0; opacity: 0;
...@@ -58,4 +66,8 @@ ...@@ -58,4 +66,8 @@
/* 定义文本的行数 */ /* 定义文本的行数 */
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
}
.byd-layout {
background-image: url('@/assets/images/media/byd-media-bg.webp');
} }
\ No newline at end of file \ No newline at end of file
function callCheckVersion() {
// #ifdef APP-PLUS
return new Promise((resolve, reject) => {
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
let data = {
action: 'checkVersion',
appid: plus.runtime.appid,
appVersion: plus.runtime.version,
wgtVersion: widgetInfo.version
}
uniCloud.callFunction({
name: 'uni-upgrade-center',
data,
success: (e) => {
resolve(e)
},
fail: (error) => {
reject(error)
}
})
})
})
// #endif
// #ifndef APP-PLUS
return new Promise((resolve, reject) => {})
// #endif
}
// 推荐再App.vue中使用 // 推荐再App.vue中使用
const PACKAGE_INFO_KEY = '__package_info__' const PACKAGE_INFO_KEY = '__package_info__'
export default function() { export default function (e) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
return new Promise((resolve, reject) => { uni.setStorageSync(PACKAGE_INFO_KEY, e.result)
callCheckVersion().then(async (e) => { uni.navigateTo({
if (!e.result) return; url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`,
const { fail: err => {
code, console.error('更新弹框跳转失败', err)
message, uni.removeStorageSync(PACKAGE_INFO_KEY)
is_silently, // 是否静默更新 }
url, // 安装包下载地址 })
platform, // 安装包平台
type // 安装包类型
} = e.result;
// 此处逻辑仅为实例,可自行编写
if (code > 0) {
// 腾讯云和阿里云下载链接不同,需要处理一下,阿里云会原样返回
const {
fileList
} = await uniCloud.getTempFileURL({
fileList: [url]
});
if (fileList[0].tempFileURL)
e.result.url = fileList[0].tempFileURL;
resolve(e)
// 静默更新,只有wgt有
if (is_silently) {
uni.downloadFile({
url: e.result.url,
success: res => {
if (res.statusCode == 200) {
// 下载好直接安装,下次启动生效
plus.runtime.install(res.tempFilePath, {
force: false
});
}
}
});
return;
}
/**
* 提示升级一
* 使用 uni.showModal
*/
// return updateUseModal(e.result)
/** // #endif
* 提示升级二
* 官方适配的升级弹窗,可自行替换资源适配UI风格
*/
uni.setStorageSync(PACKAGE_INFO_KEY, e.result)
uni.navigateTo({
url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`,
fail: (err) => {
console.error('更新弹框跳转失败', err)
uni.removeStorageSync(PACKAGE_INFO_KEY)
}
})
return
} else if (code < 0) {
// TODO 云函数报错处理
console.error(message)
return reject(e)
}
return resolve(e)
}).catch(err => {
// TODO 云函数报错处理
console.error(err.message)
reject(err)
})
});
// #endif
} }
/** /**
* 使用 uni.showModal 升级 * 使用 uni.showModal 升级
*/ */
function updateUseModal(packageInfo) { function updateUseModal(packageInfo) {
const { const {
title, // 标题 title, // 标题
contents, // 升级内容 contents, // 升级内容
is_mandatory, // 是否强制更新 is_mandatory, // 是否强制更新
url, // 安装包下载地址 url, // 安装包下载地址
platform, // 安装包平台 platform, // 安装包平台
type // 安装包类型 type // 安装包类型
} = packageInfo; } = packageInfo
let isWGT = type === 'wgt' let isWGT = type === 'wgt'
let isiOS = !isWGT ? platform.includes('iOS') : false; let isiOS = !isWGT ? platform.includes('iOS') : false
let confirmText = isiOS ? '立即跳转更新' : '立即下载更新' let confirmText = isiOS ? '立即跳转更新' : '立即下载更新'
return uni.showModal({ return uni.showModal({
title, title,
content: contents, content: contents,
showCancel: !is_mandatory, showCancel: !is_mandatory,
confirmText, confirmText,
success: res => { success: res => {
if (res.cancel) return; if (res.cancel) return
// 安装包下载 // 安装包下载
if (isiOS) { if (isiOS) {
plus.runtime.openURL(url); plus.runtime.openURL(url)
return; return
} }
uni.showToast({ uni.showToast({
title: '后台下载中……', title: '后台下载中……',
duration: 1000 duration: 1000
}); })
// wgt 和 安卓下载更新 // wgt 和 安卓下载更新
downloadTask = uni.downloadFile({ downloadTask = uni.downloadFile({
url, url,
success: res => { success: res => {
if (res.statusCode !== 200) { if (res.statusCode !== 200) {
console.error('下载安装包失败', err); console.error('下载安装包失败', err)
return; return
} }
// 下载好直接安装,下次启动生效 // 下载好直接安装,下次启动生效
plus.runtime.install(res.tempFilePath, { plus.runtime.install(
force: false res.tempFilePath,
}, () => { {
if (is_mandatory) { force: false
//更新完重启app },
plus.runtime.restart(); () => {
return; if (is_mandatory) {
} //更新完重启app
uni.showModal({ plus.runtime.restart()
title: '安装成功是否重启?', return
success: res => { }
if (res.confirm) { uni.showModal({
//更新完重启app title: '安装成功是否重启?',
plus.runtime.restart(); success: res => {
} if (res.confirm) {
} //更新完重启app
}); plus.runtime.restart()
}, err => { }
uni.showModal({ }
title: '更新失败', })
content: err },
.message, err => {
showCancel: false uni.showModal({
}); title: '更新失败',
}); content: err.message,
} showCancel: false
}); })
} }
}); )
}
})
}
})
} }
...@@ -90,7 +90,7 @@ class RecordManager { ...@@ -90,7 +90,7 @@ class RecordManager {
* 根据给定的 ID 获取一条记录 * 根据给定的 ID 获取一条记录
* *
* @param {number} id - 要获取的记录的 ID * @param {number} id - 要获取的记录的 ID
* @returns {Object} - 具有给定 ID 的记录对象,如果没有找到符合条件的记录,则返回 undefined881008 * @returns {Object} - 具有给定 ID 的记录对象,如果没有找到符合条件的记录,则返回 undefined
* *
*/ */
getRecordById(id) { getRecordById(id) {
......
...@@ -21,9 +21,5 @@ export const STORAGE_OBJECTkEY = { ...@@ -21,9 +21,5 @@ export const STORAGE_OBJECTkEY = {
recordSuccessList: "recordSuccessList", recordSuccessList: "recordSuccessList",
historyList: "historyList", historyList: "historyList",
storageVersion: "storageVersion", storageVersion: "storageVersion",
byd_mock_data:'byd_mock_data'
}; };
// export const IMG_VERSION = async () => {
// const accountInfo = await util.getMockData()
// return accountInfo?.version || Date.now()
// }
...@@ -25,7 +25,7 @@ class Storage { ...@@ -25,7 +25,7 @@ class Storage {
* @param {*} type | 类型,是 get set rm * @param {*} type | 类型,是 get set rm
* @param {*} emptyFlag | 是否判断为空情况,默认判断 true,false 为不判断 * @param {*} emptyFlag | 是否判断为空情况,默认判断 true,false 为不判断
*/ */
checkKeyType(key, type, emptyFlag = true) { checkKeyType (key, type, emptyFlag = true) {
if (typeof key != 'string') { if (typeof key != 'string') {
throw new Error(`Storage ${this.types[type]} func: key must be string`) throw new Error(`Storage ${this.types[type]} func: key must be string`)
return false return false
...@@ -69,7 +69,7 @@ class Storage { ...@@ -69,7 +69,7 @@ class Storage {
* *
* @param {*} 空key返回默认定义数组的值 * @param {*} 空key返回默认定义数组的值
*/ */
getObjectKeyValue(key) { getObjectKeyValue (key) {
// ObjectList // ObjectList
if (typeof key == 'string') { if (typeof key == 'string') {
key = this.addEvnToKey(key) key = this.addEvnToKey(key)
...@@ -125,6 +125,8 @@ class Storage { ...@@ -125,6 +125,8 @@ class Storage {
} }
}) })
} }
// const storageInfo = uni.getStorageInfoSync();
// console.log(`Used storage size: ${storageInfo.currentSize} bytes`);
}) })
} }
} }
......
...@@ -96,9 +96,9 @@ var isNetWork = function () { ...@@ -96,9 +96,9 @@ var isNetWork = function () {
uni.getNetworkType({ uni.getNetworkType({
complete: function (res) { complete: function (res) {
if (res.networkType == "none") { if (res.networkType == "none") {
reject(); reject('网络异常,请检查网络连接');
} else { } else {
resolve(); resolve('网络正常');
} }
}, },
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!