Commit 456c552e by 前端

Merge branch 'v1.0.2' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.2

2 parents 993b317a 0f2dfd0e
Showing 58 changed files with 1450 additions and 412 deletions
...@@ -32,6 +32,11 @@ export default { ...@@ -32,6 +32,11 @@ export default {
url: "/pages/common/login", url: "/pages/common/login",
}); });
} }
// let version = '1.0.0'
let version = plus.runtime.version
uni.$api.commonApi.getAPPVersion().then(res =>{
if(res != version) this.$store.dispatch('openUpdateModal')
})
}, },
onHide: function () { onHide: function () {
const recorderManager = uni.getRecorderManager(); const recorderManager = uni.getRecorderManager();
......
import http from "../request/http"; import http from "../request/http";
module.exports = { module.exports = {
search (data) { /**获取APP更新 */
getAPPVersion (data) {
return http.post({ return http.post({
method: "scrm.api.carlife.weapp.homeSearch.search", method: 'dj.api.smartcarlife.recepiton.findVersion',
pageSize: 10, projectName: "boutique",
...data, ...data,
}); });
}, },
......
...@@ -6,7 +6,7 @@ const serverConfig = { ...@@ -6,7 +6,7 @@ const serverConfig = {
mockTimer: {}, mockTimer: {},
mockCache: null, mockCache: null,
}; };
const configModule = 'mini-wuye' const configModule = 'app-tape'
const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`; const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`;
/**获取mock数据 */ /**获取mock数据 */
...@@ -19,7 +19,8 @@ const getMockData = async () => { ...@@ -19,7 +19,8 @@ const getMockData = async () => {
if (!serverConfig.mockRequestCount) { if (!serverConfig.mockRequestCount) {
serverConfig.mockCache = null; serverConfig.mockCache = null;
serverConfig.mockRequestCount = Date.now(); serverConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url:configUrl });; const data = await http.uni_request({ url:configUrl });
console.log(data,'===')
data.createTime = Date.now(); data.createTime = Date.now();
serverConfig.mockCache = data; serverConfig.mockCache = data;
uni.$storage.set("mock_data", data); uni.$storage.set("mock_data", data);
......
...@@ -11,9 +11,14 @@ module.exports = { ...@@ -11,9 +11,14 @@ module.exports = {
data.projectName = 'boutique' data.projectName = 'boutique'
data.source = 'MINIAPP' data.source = 'MINIAPP'
data.productCode = 'PC00c2' data.productCode = 'PC00c2'
return http.fetch('dj.api.smartcarlife.sms.login', data) // return http.fetch('dj.api.smartcarlife.sms.login', data)
return http.fetch('dj.api.smartcarlife.sms.applogin', data)
},
/**免登 */
autoLogin (data = {}) {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.sms.noSignIn.login', data)
}, },
/**获取当前登录账号能查看的园区店列表 */ /**获取当前登录账号能查看的园区店列表 */
getYQList () { getYQList () {
data.projectName = 'boutique' data.projectName = 'boutique'
......
...@@ -11,6 +11,7 @@ const HOST = { ...@@ -11,6 +11,7 @@ const HOST = {
scrm: domain, scrm: domain,
dj: djDomain, dj: djDomain,
merchant: merchantDomain, merchant: merchantDomain,
ip: 'http://192.168.9.119:8292'
}; };
class Request { class Request {
get(params, returnAll = false, hostType) { get(params, returnAll = false, hostType) {
......
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 418rpx 328rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 496rpx 434rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -358rpx -70rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -212rpx -268rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -276rpx 0rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: -276rpx -106rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: 0rpx -268rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -106rpx -268rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -276rpx -212rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -318rpx -212rpx;}
.icon-icon-avatar { width: 128rpx; height: 128rpx; background-position: 0rpx 0rpx;} .icon-icon-avatar { width: 128rpx; height: 128rpx; background-position: 0rpx 0rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -358rpx -112rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -212rpx -328rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -276rpx 0rpx;} .icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -382rpx 0rpx;}
.icon-icon-logout { width: 32rpx; height: 32rpx; background-position: -358rpx -154rpx;} .icon-icon-logout { width: 32rpx; height: 32rpx; background-position: -254rpx -328rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -358rpx -196rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -296rpx -328rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -358rpx -238rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -338rpx -328rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -138rpx 0rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -138rpx 0rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -358rpx -280rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -408rpx -374rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -464rpx 0rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -464rpx -42rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -464rpx -84rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -464rpx -126rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: 0rpx -138rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: 0rpx -138rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -130rpx -138rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -130rpx -138rpx;}
.icon-tool-1 { width: 60rpx; height: 60rpx; background-position: -276rpx -82rpx;}
.icon-tool-2 { width: 60rpx; height: 60rpx; background-position: -276rpx -152rpx;}
.icon-tool-3 { width: 60rpx; height: 60rpx; background-position: 0rpx -268rpx;}
.icon-tool-4 { width: 60rpx; height: 60rpx; background-position: -70rpx -268rpx;}
.icon-tool-5 { width: 60rpx; height: 60rpx; background-position: -140rpx -268rpx;}
.icon-tool-6 { width: 60rpx; height: 60rpx; background-position: -210rpx -268rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -280rpx -268rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -358rpx 0rpx;}
\ No newline at end of file \ No newline at end of file
.icon-qw { width: 48rpx; height: 48rpx; background-position: -350rpx -374rpx;}
.icon-tool-1 { width: 60rpx; height: 60rpx; background-position: -382rpx -82rpx;}
.icon-tool-2 { width: 60rpx; height: 60rpx; background-position: -382rpx -152rpx;}
.icon-tool-3 { width: 60rpx; height: 60rpx; background-position: -382rpx -222rpx;}
.icon-tool-4 { width: 60rpx; height: 60rpx; background-position: -382rpx -292rpx;}
.icon-tool-5 { width: 60rpx; height: 60rpx; background-position: 0rpx -374rpx;}
.icon-tool-6 { width: 60rpx; height: 60rpx; background-position: -70rpx -374rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -140rpx -374rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -210rpx -374rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -280rpx -374rpx;}
\ 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
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

145 KB | W: | H:

224 KB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

30.1 KB | W: | H:

28.5 KB | W: | H:

assets/spritesmith/pen-active.png
assets/spritesmith/pen-active.png
assets/spritesmith/pen-active.png
assets/spritesmith/pen-active.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -242,8 +242,7 @@ export default { ...@@ -242,8 +242,7 @@ export default {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
console.log(newval) if (newval) this.clearBoard()
if(newval) this.clearBoard()
} }
}, },
}, },
...@@ -824,13 +823,14 @@ export default { ...@@ -824,13 +823,14 @@ export default {
} else { } else {
this.isLandScape = false this.isLandScape = false
} }
let imageInfoObj = (await uni.getImageInfo({ if (this.drawImage) {
src: this.drawImage let imageInfoObj = (await uni.getImageInfo({
}))[1] || {}; src: this.drawImage
}))[1] || {};
this.aspectRatio = imageInfoObj.width / imageInfoObj.height; this.aspectRatio = imageInfoObj.width / imageInfoObj.height;
console.log(imageInfoObj); }
if (this.isUnderBkg) { if (this.isUnderBkg) {
this.bgColor = "rgba(0,0,0,0)" this.bgColor = "rgba(0,0,0,0)"
} else { } else {
......
...@@ -10,18 +10,39 @@ ...@@ -10,18 +10,39 @@
:style="{ width: popupW + 'rpx', minHeight: popupH + 'rpx',maxHeight: maxHeight + 'rpx' }" :style="{ width: popupW + 'rpx', minHeight: popupH + 'rpx',maxHeight: maxHeight + 'rpx' }"
> >
<view class="tips-content"> <view class="tips-content">
<view class="tips-title" <view class="tips-title">
>{{ title }} <template v-if="back">
<view class="icon-close" @click="close">×</view> <view
class="sprite-icon icon-back"
@click="close"
></view>
</template>
{{ title }}
<view
class="icon-close"
@click="close"
>×</view>
</view> </view>
<view class="tips-text" v-if="content">{{ content }}</view> <view
class="tips-text"
v-if="content"
>{{ content }}</view>
<slot></slot> <slot></slot>
</view> </view>
<view class="tips-footer" v-if="isFooter"> <view
<view class="tips-btn close" @click="cancel()">{{ class="tips-footer"
v-if="isFooter"
>
<view
class="tips-btn close"
@click="cancel()"
>{{
cancelBtnText cancelBtnText
}}</view> }}</view>
<view class="tips-btn preview" @click="confirm()">{{ <view
class="tips-btn preview"
@click="confirm()"
>{{
confirmBtnText confirmBtnText
}}</view> }}</view>
</view> </view>
...@@ -31,7 +52,7 @@ ...@@ -31,7 +52,7 @@
<script> <script>
export default { export default {
name: "MessageBox", name: "MessageBox",
data() { data () {
return {}; return {};
}, },
props: { props: {
...@@ -74,21 +95,22 @@ export default { ...@@ -74,21 +95,22 @@ export default {
type: String, type: String,
default: "取消", default: "取消",
}, },
maxHeight:Number maxHeight: Number,
back: Boolean
}, },
methods: { methods: {
close() { close () {
this.$refs.tips.close(); this.$refs.tips.close();
this.$emit("close"); this.$emit("close");
}, },
open() { open () {
this.$refs.tips.open(); this.$refs.tips.open();
}, },
cancel() { cancel () {
this.$refs.tips.close(); if (this.isAutoClose) this.$refs.tips.close();
this.$emit("cancel"); this.$emit("cancel");
}, },
confirm() { confirm () {
if (this.isAutoClose) this.$refs.tips.close(); if (this.isAutoClose) this.$refs.tips.close();
this.$emit("confirm"); this.$emit("confirm");
}, },
...@@ -121,6 +143,12 @@ export default { ...@@ -121,6 +143,12 @@ export default {
padding-right: 20rpx; padding-right: 20rpx;
line-height: 96rpx; line-height: 96rpx;
} }
.icon-back {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
} }
} }
.tips-text { .tips-text {
...@@ -151,6 +179,7 @@ export default { ...@@ -151,6 +179,7 @@ export default {
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
line-height: 44rpx; line-height: 44rpx;
font-weight: 500;
} }
} }
</style> </style>
<template>
<view
class="noviceGuide-box"
v-if="showNoviceGuide"
>
<!-- <template v-if="step == 1">
<img
:src="step_1[1]"
class="step-1-1"
>
<img
:src="step_1[2]"
class="step-1-2"
@click="step = 2"
>
</template>
<template v-else-if="step = 2">
<img
:src="step_1[1]"
class="step-2-1"
>
<img
:src="step_1[2]"
class="step-2-2"
@click="step = 2"
>
</template> -->
<template v-for="(i,index) in stepList">
<view
:key="index"
v-if="index == step"
>
<image
:src="i[1]"
:class="['step',`step-${index + 1}-1`]"
/>
<image
:src="i[2]"
:class="['step',`step-${index + 1}-2`]"
@click="jump"
/>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'NoviceGuide',
computed: {
watchUpdateStatus () {
return this.$store.state.update.status
},
},
watch: {
watchUpdateStatus: {
immediate: true,
handler (newval) {
this.showNoviceGuide = !newval && !uni.$storage.get('noviceGuideStatus')
}
},
},
data () {
return {
showNoviceGuide: false,
step: 0,
stepList: [
{
'1': require('@/assets/images/noviceGuide/step1-1.webp'),
'2': require('@/assets/images/noviceGuide/step1-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step2-1.webp'),
'2': require('@/assets/images/noviceGuide/step2-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step3-1.webp'),
'2': require('@/assets/images/noviceGuide/step3-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step4-1.webp'),
'2': require('@/assets/images/noviceGuide/step4-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step5-1.webp'),
'2': require('@/assets/images/noviceGuide/step5-2.webp')
}
],
}
},
mounted () {
},
methods: {
jump () {
this.step += 1
if (this.step == 2) this.$emit('nextStep')
if(this.step == 5) {
this.showNoviceGuide = false
uni.$storage.set('noviceGuideStatus', Date.now())
this.$emit('back')
}
}
}
}
</script>
<style scoped lang='scss'>
.noviceGuide-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10086;
background-color: #000000bf;
.step {
position: absolute;
}
.step-1-1 {
width: 2060rpx;
height: 244rpx;
top: 70rpx;
left: 256rpx;
}
.step-1-2 {
width: 662rpx;
height: 462rpx;
top: 424rpx;
left: 50%;
transform: translateX(-50%);
}
.step-2-1 {
left: 8rpx;
bottom: 152rpx;
width: 294rpx;
height: 120rpx;
}
.step-2-2 {
left: 326rpx;
bottom: 150rpx;
width: 1066rpx;
height: 350rpx;
}
.step-3-1 {
width: 2168rpx;
height: 340rpx;
top: 262rpx;
left: 50%;
transform: translateX(-50%);
}
.step-3-2 {
width: 662rpx;
height: 510rpx;
top: 602rpx;
left: 50%;
transform: translateX(-50%);
}
.step-4-1 {
width: 190rpx;
height: 1248rpx;
top: 96rpx;
right: 20rpx;
}
.step-4-2 {
width: 1074rpx;
height: 312rpx;
top: 50%;
right: 226rpx;
transform: translateY(-50%);
}
.step-5-1 {
width: 190rpx;
height: 192rpx;
bottom: 96rpx;
right: 20rpx;
}
.step-5-2 {
width: 1074rpx;
height: 312rpx;
right: 226rpx;
bottom: 144rpx;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view>
<view
class="update-modal"
v-if="show"
>
<view class="update-box">
<image
class="bg"
:src="bg"
/>
<view class="content">
<view class="title">新版本升级 V.{{versionData.version}}</view>
<template v-for="(i,index) in versionData.textList">
<view
class="content-item"
:key="index"
>
{{i}}
</view>
</template>
</view>
<view
class="btn"
@click="toMarket"
>立即更新</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'updateBox',
data () {
return {
show: false,
versionData: {},
bg: require('@/assets/images/common/update-bg.png')
}
},
computed: {
watchUpdateStatus () {
return this.$store.state.update.status
},
},
watch: {
watchUpdateStatus: {
immediate: true,
handler (newval) {
this.versionData = uni.$storage.get("mock_data")
if (newval) this.show = true
}
},
},
mounted () {
},
methods: {
toMarket () {
let { appUrl } = this.versionData
if (!appUrl) appUrl = 'market://details?id=io.dcloud.hellouniapp'
plus.runtime.openURL(appUrl)
}
}
}
</script>
<style scoped lang='scss'>
.update-modal {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 99999999999;
background: #00000066;
.update-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 800rpx;
height: 752rpx;
background: #ffffff;
border-radius: 32rpx;
box-sizing: border-box;
padding-top: 288rpx;
.bg {
width: 800rpx;
height: 400rpx;
position: absolute;
left: 0;
top: -84rpx;
}
.content {
position: relative;
z-index: 2;
width: 640rpx;
height: 288rpx;
overflow-y: scroll;
margin: 0 auto 32rpx;
.title {
text-align: center;
font-weight: 500;
font-size: 32rpx;
margin-bottom: 24rpx;
}
&-item {
color: #5a5e66;
font-size: 28rpx;
}
}
.btn {
width: 608rpx;
height: 80rpx;
background-image: linear-gradient(270deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 98rpx;
text-align: center;
line-height: 80rpx;
font-weight: 500;
font-size: 32rpx;
color: #ffffff;
margin: 0 auto;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -14,10 +14,12 @@ import api from "./api/index"; ...@@ -14,10 +14,12 @@ import api from "./api/index";
import { Storage } from "./utils/cache/index"; import { Storage } from "./utils/cache/index";
import GlsxImage from "./components/GlsxImage"; import GlsxImage from "./components/GlsxImage";
import MessageBox from "./components/MessageBox/index"; import MessageBox from "./components/MessageBox/index";
import wnCanvas from "./components/Canvas/wn-canvas";
import UpdateBox from "./components/UpdateBox";
Vue.component("GlsxImage", GlsxImage); Vue.component("GlsxImage", GlsxImage);
Vue.component("MessageBox", MessageBox); Vue.component("MessageBox", MessageBox);
import wnCanvas from "./components/Canvas/wn-canvas";
Vue.component("wnCanvas", wnCanvas); Vue.component("wnCanvas", wnCanvas);
Vue.component("UpdateBox", UpdateBox);
uni.$api = api; uni.$api = api;
uni.$storage = new Storage(); uni.$storage = new Storage();
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
...@@ -12,8 +12,15 @@ ...@@ -12,8 +12,15 @@
maxlength="11" maxlength="11"
/> />
<template v-if="mobile"> <template v-if="mobile">
<view class="icon" @click="mobile = ''"> <view
<icon type="clear" size="16" color="#000"> </icon> class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
</view> </view>
...@@ -25,39 +32,69 @@ ...@@ -25,39 +32,69 @@
maxlength="4" maxlength="4"
/> />
<template v-if="code"> <template v-if="code">
<view class="icon" @click="code = ''"> <view
<icon type="clear" size="16" color="#000"> </icon> class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
<view <view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]" :class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode" @click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view >{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view>
>
</view> </view>
<button class="btn" :disabled="!mobile || !code" @click="login"> <button
class="btn"
:disabled="!mobile || !code"
@click="login"
>
登录 登录
</button> </button>
<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 />
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import {loginMixin} from '@/mixin/index' import { loginMixin } from '@/mixin/index'
export default { export default {
mixins: [loginMixin], mixins: [loginMixin],
data () { data () {
return { return {
mobile: '15816539334', mobile: '',
code: '1', code: '',
count: '', count: '',
noSignIn: false
}; };
}, },
onLoad (options) { onLoad (options) {
const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid)
}, },
methods: { methods: {
async autoLogin (noSignInUuid) {
uni.showLoading();
const { data } = await uni.$api.userApi.autoLogin({ noSignInUuid })
uni.hideLoading();
if (data) this.jump(data, true)
},
/**获取验证码 */ /**获取验证码 */
async getSmsCode () { async getSmsCode () {
const { mobile, count } = this; const { mobile, count } = this;
...@@ -94,28 +131,19 @@ export default { ...@@ -94,28 +131,19 @@ export default {
}, 1e3); }, 1e3);
}, },
async login () { async login () {
const { mobile, code: smsCode } = this; const { mobile, code: smsCode, noSignIn } = this;
try { try {
uni.showLoading(); let params = {
const { code, data, message } = await uni.$api.userApi.smsLogin({
mobile, mobile,
code: smsCode, code: smsCode
noSignIn: false, }
}); if(noSignIn) params.noSignIn = noSignIn
uni.showLoading();
const { code, data, message } = await uni.$api.userApi.smsLogin(params);
console.log(code, data, message); console.log(code, data, message);
uni.hideLoading(); uni.hideLoading();
if (code == 0) { if (code == 0) this.jump(data, noSignIn)
let { else
loginUserInfoList,
sessionId,
} = data;
if (loginUserInfoList.length) {
uni.$storage.set('sessionId', sessionId);
this.getAccountLoginList(loginUserInfoList)
} else uni.reLaunch({
url: '/pages/common/nothing'
});
} else
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: message, content: message,
...@@ -133,12 +161,26 @@ export default { ...@@ -133,12 +161,26 @@ export default {
}, },
// 获取登录账号下园区店列表 // 获取登录账号下园区店列表
getAccountLoginList (loginUserInfoList) { getAccountLoginList (loginUserInfoList) {
console.log(loginUserInfoList,'===') console.log(loginUserInfoList, '===')
if (loginUserInfoList?.length == 1) this.get4SStoreList(loginUserInfoList[0]) if (loginUserInfoList?.length == 1) this.get4SStoreList(loginUserInfoList[0])
else uni.navigateTo({ else uni.navigateTo({
url: '/pages/common/accountItems' url: '/pages/common/accountItems'
}) })
}, },
jump (data, noSignIn) {
let {
loginUserInfoList,
noSignInUuid,
sessionId,
} = data;
if (loginUserInfoList.length) {
uni.$storage.set('sessionId', sessionId);
if (noSignInUuid && noSignIn) uni.$storage.set('noSignInUuid', noSignInUuid)
this.getAccountLoginList(loginUserInfoList)
} else uni.reLaunch({
url: '/pages/common/nothing'
});
}
}, },
}; };
...@@ -226,5 +268,14 @@ export default { ...@@ -226,5 +268,14 @@ export default {
.btn[disabled][type="default"] { .btn[disabled][type="default"] {
background: #c9c9c9 !important; background: #c9c9c9 !important;
} }
.autoLogin {
display: flex;
align-items: center;
margin-top: 40rpx;
.uni-icons {
margin-right: 8rpx;
margin-left: 142rpx;
}
}
} }
</style> </style>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
v-if="loginUserInfoList.length && selectIndex == 0" v-if="loginUserInfoList.length && selectIndex == 0"
class="list" class="list"
scroll-y scroll-y
style="height: calc(100% - 120rpx);" style="height: 100%;"
> >
<template v-if="flag"> <template v-if="flag">
<template v-for="(item,index) in loginUserInfoList"> <template v-for="(item,index) in loginUserInfoList">
......
<template>
<view>
<MessageBox
ref="carBrandListVisible"
position="bottom"
:isFooter="false"
title="请选择车品牌"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: carBrand == item.name }"
@click="selectCar(item)"
v-for="(item, index) in carBrandList"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
<MessageBox
ref="carBoxVisible"
position="bottom"
:isFooter="false"
title="请选择车型"
:maxHeight="1000"
back
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: carModel == item.name }"
@click="handleSelect(item)"
v-for="(item, index) in carlist"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CarBrands',
data () {
return {
carlist: [],
}
},
computed: {
carModel () {
return this.$store.state.user.customerInfo.carModel
},
carBrandList () {
return this.$store.state.user.carBrands
},
carBrand () {
return this.$store.state.user.customerInfo.carBrand
}
},
mounted () {
},
methods: {
open () {
this.$refs.carBrandListVisible.open()
},
selectCar (e) {
uni.showLoading()
const customerInfo = this.$store.state.user.customerInfo
customerInfo.carBrand = e.name
this.$store.dispatch('setCustomerInfo', customerInfo)
uni.$api.commonApi.getCarBrandsList({
brandId: e.brandId,
childBrandId: e.id
}).then(res => {
uni.hideLoading()
this.carlist = res
this.$refs.carBoxVisible.open()
}).catch(() => uni.hideLoading())
},
handleSelect (item) {
this.$refs.carBoxVisible.close();
this.$emit('select', item)
},
close () {
this.$refs.carBrandListVisible.close()
}
}
}
</script>
<style scoped lang='scss'>
.select-box {
margin: 40rpx 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
opacity: 1;
border: 2rpx solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
&.checked {
border: 2rpx solid #292d33;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<MessageBox
ref="employeeBoxVisible"
position="bottom"
:isFooter="false"
title="请选择销售"
:maxHeight="1000"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: salesUuid == item.uuid }"
@click="handleSelect(item)"
v-for="(item, index) in employeeList"
:key="index"
>
{{ item.staffName }}
</view>
</view>
</MessageBox>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Employee',
data () {
return {
}
},
watch:{
},
computed: {
salesUuid(){
return this.$store.state.user.customerInfo.salesUuid
},
employeeList () {
return this.$store.state.user.employeeList
}
},
mounted () {
},
methods: {
open(){
this.$refs.employeeBoxVisible.open()
},
handleSelect (item) {
this.$refs.employeeBoxVisible.close();
this.$emit('select', item)
},
close(){
this.$refs.employeeBoxVisible.close()
}
}
}
</script>
<style scoped lang='scss'>
.select-box {
margin: 40rpx 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
opacity: 1;
border: 2rpx solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
&.checked {
border: 2rpx solid #292d33;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="step">
<MessageBox
ref="formRef"
@cancel="cancel"
@confirm="submit"
:cancelBtnText="`${step == 1? '取消' : '上一步'}`"
:confirmBtnText="`${step == 1? '下一步' : '完成接待'}`"
:title="`${step == 1? '客户信息完善' : '结果反馈'}`"
:popupW="820"
:maxHeight="820"
:isAutoClose="false"
>
<view name="content">
<template v-if="step == 1">
<view
class="error-tip"
v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view>
<view
class="pop-tips"
v-else
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view>
<view class="form">
<template v-for="(i, index) in formObject">
<view
class="form-item"
:key="index"
>
<view class="label">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) }]">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="formData[i.key]"
class="input"
:placeholder="i.placeholder"
placeholder-class="placeholder"
/>
</template>
<template v-else>
<view
:class="['select', `${formData[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)"
>
{{ formData[i.key] || i.placeholder }}
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
</template>
<template v-else>
<view class="pop-tips">请完善本次接待结果</view>
<view class="choose-box">
<template v-for="(i,index) in resultList">
<view
:class="['choose-item', `${i.status == receptionStatus ? i.status == 1 ? 'success' : 'error' : ''}`]"
:key="index"
@click="chooseResult(i.status)"
>
<view :class="['sprite-icon' , `icon-face-${i.status == receptionStatus ? `${i.icon}-active` : i.icon }`]"></view>
{{ i.text}}
</view>
</template>
</view>
</template>
</view>
</MessageBox>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
/>
<employee
ref="employeeBoxVisible"
@select="handleSelect($event,'employeeBoxVisible')"
/>
</view>
</template>
<script type='text/ecmascript-6'>
import Employee from './Employee.vue'
import CarBrands from './CarBrands.vue'
import { mapMutations } from "vuex";
export default {
components: { Employee, CarBrands },
name: 'FinishStep',
props: {
},
data () {
return {
step: 1,
formObject: [
{
label: "车主姓名",
key: "customerName",
type: "input",
inputType: "text",
maxlength: 50,
placeholder: '请输入姓名'
},
{
label: "车主电话",
key: "phoneNumber",
type: "input",
inputType: "tel",
maxlength: 20,
placeholder: '请输入电话'
},
{
label: "车型",
key: "carModel",
type: "select",
popKey: "carBrandListVisible",
placeholder: '请选择车型'
},
{
label: "销售姓名",
key: "staffName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择销售'
},
],
formData: {
customerName: "",
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
},
resultList: [
{
icon: 'success',
text: '结果完美,成交了',
status: 1
},
{
icon: 'error',
text: '仍需努力,战败了',
status: 0
}
],
errorTip: false,
receptionStatus: -1,
}
},
mounted () {
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
showError (key) {
return this.errorTip && !this.formData[key]
},
showPopup (e) {
this.$refs[e].open();
},
// 取消
cancel () {
if (this.step == 1) this.close()
else this.step = 1
},
close () {
this.errorTip = false
this.$refs.formRef.close()
},
// 保存
submit () {
if (this.step == 1) {
this.errorTip = true;
if (Object.values(this.formData).every((value) => !!value)) this.step = 2
} else {
let { receptionStatus } = this
if (receptionStatus == -1) return uni.showToast({
title: '请完善本次接待结果',
icon: 'none'
})
this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus)
}
},
handleSelect (item, popkey) {
this.$refs[popkey].close();
if (popkey == "employeeBoxVisible") {
this.formData.salesUuid = item.uuid;
this.formData.staffName = item.staffName;
} else {
this.$refs.carBrandListVisible.close();
this.formData.carModel = item.name;
}
this.$store.dispatch("setCustomerInfo", this.formData);
},
open () {
this.$store.dispatch('getCustomerInfo').then((customerInfo) => {
this.formData = customerInfo
this.step = Object.values(customerInfo).every((value) => !!value) ? 2 : 1
this.$refs.formRef.open()
})
},
chooseResult (val) {
this.receptionStatus = val
}
}
}
</script>
<style scoped lang='scss'>
.pop-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
font-size: 28rpx;
padding: 24rpx 80rpx 24rpx;
margin-top: 30rpx;
text-align: center;
}
.error-tip {
font-size: 28rpx;
padding: 32rpx 60rpx 24rpx;
margin-top: 30rpx;
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
}
.form {
display: flex;
flex-wrap: wrap;
gap: 24rpx 0;
padding-top: 30rpx;
&-item {
// flex: 50%;
display: flex;
align-items: center;
color: #6c6c70;
font-size: 30rpx;
box-sizing: border-box;
margin: 0 auto;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
&::before {
content: "*";
color: #ff0000;
position: absolute;
left: -20rpx;
top: 50%;
transform: translate(0, -50%);
}
}
.value {
width: 520rpx;
height: 80rpx;
border: 2rpx solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
box-sizing: border-box;
padding: 0 40rpx;
border-radius: 8rpx;
&.error {
border: 2rpx solid #f24724;
border-radius: 8rpx;
}
.input,
.select {
width: 100%;
height: 100%;
border: none !important;
outline: none;
padding: 0 !important;
}
.select {
display: flex;
align-items: center;
.arrow {
margin-left: auto;
}
}
/deep/ .placeholder {
font-size: 30rpx;
color: #c9c9c9;
}
}
}
}
.choose-box {
display: flex;
flex-direction: column;
align-items: center;
.choose-item {
width: 100%;
height: 128rpx;
border: 2rpx solid #e8e8e8;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-top: 24rpx;
.sprite-icon {
margin-right: 16rpx;
}
}
.success {
background: #14cc681a;
border-color: #14cc681a;
}
.error {
background: #f247241a;
border-color: #f247241a;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -4,10 +4,13 @@ ...@@ -4,10 +4,13 @@
<image src="../../../assets/images/media/bg-1.webp" /> <image src="../../../assets/images/media/bg-1.webp" />
</view> </view>
<view class="content"> <view class="content">
<view class="title">问界·交车告知书</view> <view class="title">{{title||'问界·交车告知书'}}</view>
<view class="form"> <view class="form">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view class="form-item" :key="index"> <view
class="form-item"
:key="index"
>
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="value"> <view class="value">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
...@@ -20,9 +23,16 @@ ...@@ -20,9 +23,16 @@
/> />
</template> </template>
<template v-else> <template v-else>
<view class="select" @click="showPopup(i.popKey)"> <view
class="select"
@click="showPopup(i.popKey)"
>
{{ customerInfo[i.key] }} {{ customerInfo[i.key] }}
<uni-icons class="arrow" type="down" :size="16"></uni-icons> <uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view> </view>
</template> </template>
</view> </view>
...@@ -30,88 +40,43 @@ ...@@ -30,88 +40,43 @@
</template> </template>
</view> </view>
<template v-for="(i, index) in views"> <template v-for="(i, index) in views">
<view class="view" :key="index"> <view
class="view"
:key="index"
>
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
:drawImage="i.detailUrl" :drawImage="i.detailUrl"
:canvasId="`c-1-${index}`" :canvasId="`c-1-${index}`"
:drawStatus="penSwitch" :drawStatus="penSwitch"
></wnCanvas> ></wnCanvas>
</view> </view>
</template> </template>
</view> </view>
<MessageBox <car-brands
ref="carBrandListVisible" ref="carBrandListVisible"
position="bottom" @select="handleSelect($event,'carBrandListVisible')"
:isFooter="false" />
title="请选择车品牌" <employee
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: carBrand == item.name }"
@click="selectCar(item)"
v-for="(item, index) in carBrandList"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
<MessageBox
ref="carBoxVisible"
position="bottom"
:isFooter="false"
title="请选择车型"
:maxHeight="1000"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: customerInfo.carModel == item.name }"
@click="handleSelect(item, 'carBoxVisible')"
v-for="(item, index) in carlist"
:key="index"
>
{{ item.name }}
</view>
</view>
</MessageBox>
<MessageBox
ref="employeeBoxVisible" ref="employeeBoxVisible"
position="bottom" @select="handleSelect($event,'employeeBoxVisible')"
:isFooter="false" />
title="请选择销售"
:maxHeight="1000"
>
<view class="select-box">
<view
class="select-item"
:class="{ checked: customerInfo.salesUuid == item.uuid }"
@click="handleSelect(item, 'employeeBoxVisible')"
v-for="(item, index) in employeeList"
:key="index"
>
{{ item.staffName }}
</view>
</view>
</MessageBox>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import Employee from './Employee.vue'
import CarBrands from './CarBrands.vue'
export default { export default {
components: { Employee, CarBrands },
props: { props: {
views: Array, views: Array,
penSwitch: Boolean penSwitch: Boolean,
title: String
}, },
name: 'Media_1', name: 'Media_1',
data () { data () {
return { return {
carBrandList: [],
carlist: [],
employeeList: [],
formObject: [ formObject: [
{ {
label: '车主姓名', label: '车主姓名',
...@@ -140,45 +105,26 @@ export default { ...@@ -140,45 +105,26 @@ export default {
popKey: 'employeeBoxVisible' popKey: 'employeeBoxVisible'
} }
], ],
customerInfo: this.$store.state.user.customerInfo, customerInfo: {}
carBrand: ''
} }
}, },
mounted () { watch: {
let userInfo = uni.$storage.get('userInfo') watchCustomerInfo: {
uni.$api.commonApi.getMerchantCarBrandList([userInfo.shopMerchantId]).then(({ data }) => { immediate: true,
let list = data[0].carBrandList, handler (newval) {
carBrandList = [] if(newval) this.customerInfo = newval
list.map(e => { }
e.childs.map(i => { },
i.brandId = e.id },
carBrandList.push(i) computed: {
}) watchCustomerInfo () {
}) return this.$store.state.user.customerInfo
this.carBrandList = carBrandList }
})
uni.$api.commonApi.getEmployeeList({
merchantId: userInfo.shopMerchantId,
}).then(res => {
this.employeeList = res
})
}, },
methods: { methods: {
inputCustomer () { inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
}, },
selectCar (e) {
uni.showLoading()
this.carBrand = e.name
uni.$api.commonApi.getCarBrandsList({
brandId: e.brandId,
childBrandId: e.id
}).then(res => {
uni.hideLoading()
this.carlist = res
this.$refs.carBoxVisible.open()
}).catch(() => uni.hideLoading())
},
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close() this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') { if (popkey == 'employeeBoxVisible') {
...@@ -193,9 +139,8 @@ export default { ...@@ -193,9 +139,8 @@ export default {
showPopup (e) { showPopup (e) {
this.$refs[e].open() this.$refs[e].open()
}, },
closeAllPopup(){ closeAllPopup () {
this.$refs.carBrandListVisible.close() this.$refs.carBrandListVisible.close()
this.$refs.carBoxVisible.close()
this.$refs.employeeBoxVisible.close() this.$refs.employeeBoxVisible.close()
} }
} }
...@@ -281,26 +226,4 @@ export default { ...@@ -281,26 +226,4 @@ export default {
} }
} }
} }
.select-box {
margin: 40rpx 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
opacity: 1;
border: 2rpx solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
&.checked {
border: 2rpx solid #292d33;
}
}
}
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<image src="../../../assets/images/media/bg-2.webp" /> <image src="../../../assets/images/media/bg-2.webp" />
</view> </view>
<view class="content"> <view class="content">
<view class="title">问界·商城延保价格明细</view> <view class="title">{{title||'问界·商城延保价格明细'}}</view>
<template v-if="views.length"> <template v-if="views.length">
<tabs <tabs
:list="views" :list="views"
...@@ -39,7 +39,8 @@ export default { ...@@ -39,7 +39,8 @@ export default {
components: { Tabs }, components: { Tabs },
props: { props: {
views: Array, views: Array,
penSwitch: Boolean penSwitch: Boolean,
title:String
}, },
name: 'Media_2', name: 'Media_2',
data () { data () {
...@@ -89,10 +90,10 @@ export default { ...@@ -89,10 +90,10 @@ export default {
} }
.canvas-box { .canvas-box {
.left { .left {
animation: show-view-left 0.15s; animation: show-view-left 0.3s;
} }
.right{ .right{
animation: show-view-right 0.15s; animation: show-view-right 0.3s;
} }
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<image src="../../../assets/images/media/bg-4.webp" /> <image src="../../../assets/images/media/bg-4.webp" />
</view> </view>
<view class="content"> <view class="content">
<view class="title">问界·汽车产品三包凭证</view> <view class="title">{{title||'问界·汽车产品三包凭证'}}</view>
<template v-if="views.length"> <template v-if="views.length">
<tabs <tabs
:list="views" :list="views"
...@@ -40,7 +40,8 @@ export default { ...@@ -40,7 +40,8 @@ export default {
components: { Tabs }, components: { Tabs },
props: { props: {
views: Array, views: Array,
penSwitch: Boolean penSwitch: Boolean,
title:String
}, },
name: 'Media_4', name: 'Media_4',
data () { data () {
...@@ -52,7 +53,6 @@ export default { ...@@ -52,7 +53,6 @@ export default {
}, },
methods: { methods: {
changeView (index) { changeView (index) {
console.log()
this.viewIndex = index this.viewIndex = index
}, },
} }
...@@ -90,10 +90,10 @@ export default { ...@@ -90,10 +90,10 @@ export default {
} }
.canvas-box { .canvas-box {
.left { .left {
animation: show-view-left 0.15s; animation: show-view-left 0.3s;
} }
.right{ .right{
animation: show-view-right 0.15s; animation: show-view-right 0.3s;
} }
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<image src="../../../assets/images/media/bg-6.webp" /> <image src="../../../assets/images/media/bg-6.webp" />
</view> </view>
<view class="content"> <view class="content">
<view class="title">历史成交记录</view> <view class="title">{{title||'历史成交记录'}}</view>
<template v-if="list.length && shopMerchantId"> <template v-if="list.length && shopMerchantId">
<Tabs :list="list" @tabclick="tabclick" /> <Tabs :list="list" @tabclick="tabclick" />
</template> </template>
...@@ -70,7 +70,8 @@ import Tabs from './Tabs.vue'; ...@@ -70,7 +70,8 @@ import Tabs from './Tabs.vue';
export default { export default {
name: 'Media_6', name: 'Media_6',
props: { props: {
show:Boolean show:Boolean,
title:String
}, },
components: {Tabs}, components: {Tabs},
data () { data () {
......
...@@ -53,7 +53,6 @@ export default { ...@@ -53,7 +53,6 @@ export default {
query query
.select(`#tab-${tabIndex}`) .select(`#tab-${tabIndex}`)
.boundingClientRect((data) => { .boundingClientRect((data) => {
console.log(data)
this.borderLeft = `left:${data.left}px;` this.borderLeft = `left:${data.left}px;`
setTimeout(() => { setTimeout(() => {
this.borderLeft += `display:block;` this.borderLeft += `display:block;`
......
...@@ -13,16 +13,29 @@ ...@@ -13,16 +13,29 @@
class="title" class="title"
@click="show = true" @click="show = true"
>文件夹</view> >文件夹</view>
<template v-for="(i,index) in toolList"> <template v-for="(i,index) in data">
<view <view
class="item" :class="['item', {active: i.id == id} ]"
:key="index" :key="index"
@click="jump(i)" @click="jump(i)"
> >
<image
class="icon"
:src="i.shortTitleUrl"
mode="scaleToFill"
/>
{{i.shortTitle}}
</view>
</template>
<template v-if="showPayBtn">
<view
class="item"
@click="toPay"
>
<view class="icon"> <view class="icon">
<view :class="['icon sprite-icon', i.icon]"> </view> <view class="sprite-icon icon-tool-pay"></view>
</view> </view>
{{i.label}} 付款方式
</view> </view>
</template> </template>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
...@@ -44,53 +57,33 @@ ...@@ -44,53 +57,33 @@
export default { export default {
name: 'ToolBox', name: 'ToolBox',
props: { props: {
type: String type: String,
data: Array,
id: [String, Number],
showPayBtn: Object
}, },
data () { data () {
return { return {
show: true, show: true,
toolList: [
{
id: 1,
label: '交车告知书',
icon: 'icon-tool-1'
},
{
id: 2,
label: '延保明细',
icon: 'icon-tool-2'
},
{
id: 3,
label: '质保确认书',
icon: 'icon-tool-3'
},
{
id: 4,
label: '三包政策',
icon: 'icon-tool-3'
},
{
id: 5,
label: '质保升级',
icon: 'icon-tool-5'
},
{
id: 6,
label: '历史成交',
icon: 'icon-tool-6'
},
]
} }
}, },
methods: { methods: {
hide () {
this.show = true
},
jump (item) { jump (item) {
this.show = true this.show = true
this.$emit('choose', item) this.$emit('choose', item)
}, },
finish () { finish () {
this.$emit('finish') this.$emit('finish')
} },
// 选择付款方式
toPay () {
this.$emit('toPay')
},
} }
} }
</script> </script>
...@@ -167,11 +160,25 @@ export default { ...@@ -167,11 +160,25 @@ export default {
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
} }
.active {
color: #2c66f7;
}
} }
.showList { .showList {
display: flex; display: flex;
height: 896rpx; height: 896rpx;
opacity: 1; opacity: 1;
animation: scale-up-top-right 0.4s;
}
@keyframes scale-up-top-right {
0% {
transform: scale(0.5);
transform-origin: top right;
}
100% {
transform: scale(1);
transform-origin: top right;
}
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -14,71 +14,74 @@ ...@@ -14,71 +14,74 @@
> >
<view class="popup-wrapper"> <view class="popup-wrapper">
<view class="popup-box"> <view class="popup-box">
<view class="payment-title" <view class="payment-title">{{title}}
>{{title}} <view
<view class="icon-close" @click="close">×</view> class="icon-close"
@click="close"
>×</view>
</view> </view>
<view class="popup-content"> <view class="popup-content">
<view class="tab-list"> <view class="tab-list">
<view <view
:class="['tab-item', { active: payActive === item.type }]" :class="['tab-item', { active: payActive === item.type }, { single :paymentType.length == 1}]"
v-for="item in paymentType" v-for="item in paymentType"
:key="item.type" :key="item.type"
@click="handleSwitchTab(item)" @click="handleSwitchTab(item)"
>{{ item.name }}</view >{{ item.name }}</view>
>
</view> </view>
<view class="payment-content"> <view class="payment-content">
<view v-show="payActive === 1" class="qr-code-content"> <template v-if="payInfo && payInfo.paymentType">
<image <view
class="qr-code-img" v-show="payActive === 1"
:src="payInfo.storePaymentQrcodeUrl" class="qr-code-content"
mode="scaleToFill" >
/> <image
<!-- <image class="qr-code-img"
:src="payInfo.storePaymentQrcodeUrl"
mode="scaleToFill"
/>
<!-- <image
class="qr-code-img" class="qr-code-img"
src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png" src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode="scaleToFill" mode="scaleToFill"
/> --> /> -->
<view class="qr-code-info">扫码付款,支持多渠道付款</view> <view class="qr-code-info">扫码付款,支持多渠道付款</view>
</view> </view>
<view v-show="payActive === 2" class="corporate-content"> </template>
<image <template v-if="accountInfo && accountInfo.paymentType">
class="bank-logo"
:src="accountInfo.bankUrl" <view
mode="scaleToFill" v-show="payActive === 2"
/> class="corporate-content"
<view class="bank-info"> >
<view <image
class="bank-item" class="bank-logo"
v-for="item in accountList" :src="accountInfo.bankUrl"
:key="item.field" mode="scaleToFill"
> />
<text class="bank-label">{{ item.label }}:</text> <view class="bank-info">
<view class="bank-value">{{ accountInfo[item.field] }}</view> <view
class="bank-item"
v-for="item in accountList"
:key="item.field"
>
<text class="bank-label">{{ item.label }}:</text>
<view class="bank-value">{{ accountInfo[item.field] }}</view>
</view>
</view> </view>
</view> </view>
</view> </template>
</view> </view>
</view> </view>
<view class="payment-done" @click="done()">已支付,去上传付款凭证</view> <view
class="payment-done"
@click="done()"
>已支付,去上传付款凭证</view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
<script> <script>
const PAYMENT_TYPE = [
{
name: "扫码支付",
type: 1,
title: '付款二维码'
},
{
name: "对公账户",
type: 2,
title: '付款方式'
},
];
const ACCOUT_LIST = [ const ACCOUT_LIST = [
{ {
label: "公司名称", label: "公司名称",
...@@ -103,43 +106,59 @@ const ACCOUT_LIST = [ ...@@ -103,43 +106,59 @@ const ACCOUT_LIST = [
]; ];
export default { export default {
name: "payPop", name: "payPop",
data() { props: {
payInfo: Object,// 支付信息
accountInfo: Object // 对公账户信息
},
data () {
return { return {
payInfo: {}, // 支付信息
accountInfo: {}, // 对公账户信息
payActive: 1, payActive: 1,
paymentType: PAYMENT_TYPE, paymentType: [],
accountList: ACCOUT_LIST, accountList: ACCOUT_LIST,
title: PAYMENT_TYPE[0].title title: ''
}; };
}, },
watch: {
payInfo (n) {
if (n) {
let item = {
name: "扫码支付",
type: 1,
title: '付款二维码'
}
this.paymentType.push(item)
this.handleSwitchTab(item)
}
},
accountInfo (n) {
if (n) {
let item = {
name: "对公账户",
type: 2,
title: '付款方式'
}
this.paymentType.push(item)
if(this.paymentType.length == 1) this.handleSwitchTab(item)
}
}
},
methods: { methods: {
// 切换tab // 切换tab
handleSwitchTab(item) { handleSwitchTab (item) {
this.payActive = item.type; this.payActive = item.type;
this.title = item.title this.title = item.title
}, },
// 查询门店支付配置
async findPayInfo() {
const { shopMerchantId } = uni.$storage.get("userInfo");
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId,
});
this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2);
},
// 显示弹窗 // 显示弹窗
show() { show () {
this.payActive = 1 // this.payActive = 1
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] // 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this.$refs.popup.open("bottom"); this.$refs.popup.open("bottom");
this.findPayInfo();
}, },
close() { close () {
this.$refs.popup.close(); this.$refs.popup.close();
}, },
// 已支付 // 已支付
done() { done () {
// uni.navigateBack({ // uni.navigateBack({
// delta: 1, // delta: 1,
// }); // });
...@@ -202,6 +221,9 @@ export default { ...@@ -202,6 +221,9 @@ export default {
border-radius: 0 48rpx 48rpx 0; border-radius: 0 48rpx 48rpx 0;
} }
} }
.single{
border-radius:48rpx !important;
}
} }
.payment-content { .payment-content {
width: 100%; width: 100%;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<view <view
class="detail-box" class="detail-box"
@click="handleTouchStart()" @click="handleTouchStart()"
@dblclick="dbClick"
> >
<view class="nav-bar"> <view class="nav-bar">
<view <view
...@@ -21,63 +22,31 @@ ...@@ -21,63 +22,31 @@
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
<template v-for="index in 6"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == index }]" :class="['view', { showView: id == item.id }]"
:key="index" :key="index"
> >
<component <component
:is="'media_' + index" :is="'media_' + item.id"
:views="media[index]" :views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch" :penSwitch="penSwitch"
:show="id == 6" :show="id == 6"
:ref="'media'+index" :ref="'media'+item.id"
:title="item.detailTitle || ''"
/> />
</view> </view>
</template> </template>
<!-- <view :class="['view', { showView: id == 1 }]">
<media_1
:views="media[1]"
:penSwitch="penSwitch"
ref="media1"
/>
</view>
<view :class="['view', { showView: id == 2 }]">
<media_2
:views="media[2]"
:penSwitch="penSwitch"
/>
</view>
<view :class="['view', { showView: id == 3 }]">
<media_3
:views="media[3]"
:penSwitch="penSwitch"
/>
</view>
<view :class="['view', { showView: id == 4 }]">
<media_4
:views="media[4]"
:penSwitch="penSwitch"
/>
</view>
<view :class="['view', { showView: id == 5 }]">
<media_5
:views="media[5]"
:penSwitch="penSwitch"
/>
</view>
<view :class="['view', { showView: id == 6 }]">
<media_6
ref="history"
:show="id == 6"
/>
</view> -->
<pay-pop ref="pay"></pay-pop>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
<tool-box <tool-box
ref="toolRef"
:data="media"
:type="type" :type="type"
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="payInfo || accountInfo"
/> />
<view <view
class="pen-box" class="pen-box"
...@@ -86,28 +55,18 @@ ...@@ -86,28 +55,18 @@
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view> <view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view> </view>
</template> </template>
<!-- <MessageBox <pay-pop
ref="tipBox" ref="pay"
@cancel="tipCancel" :payInfo="payInfo"
@confirm="tipConfirm" :accountInfo="accountInfo"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" ></pay-pop>
cancelBtnText="否" <finish-step
confirmBtnText="是" ref="stepRef"
></MessageBox> --> @submit="done"
<MessageBox />
ref="payRef"
@cancel="done"
@confirm="toPay"
:popupW="704"
content="若客户成交,请点击付款方式协助客户完成后续流程。"
confirmBtnText="选择付款方式"
cancelBtnText="完成接待"
></MessageBox>
</view> </view>
</template> </template>
<script> <script>
import payPop from "./components/payPop.vue";
import ToolBox from "./components/ToolBox.vue"; import ToolBox from "./components/ToolBox.vue";
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import Media_1 from "./components/Media_1.vue"; import Media_1 from "./components/Media_1.vue";
...@@ -116,22 +75,25 @@ import Media_3 from "./components/Media_3.vue"; ...@@ -116,22 +75,25 @@ import Media_3 from "./components/Media_3.vue";
import Media_4 from "./components/Media_4.vue"; import Media_4 from "./components/Media_4.vue";
import Media_5 from "./components/Media_5.vue"; import Media_5 from "./components/Media_5.vue";
import Media_6 from "./components/Media_6.vue"; import Media_6 from "./components/Media_6.vue";
import payPop from "./components/payPop.vue";
import FinishStep from './components/FinishStep.vue';
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
export default { export default {
components: { components: {
ToolBox, ToolBox,
payPop,
Media_1, Media_1,
Media_2, Media_2,
Media_3, Media_3,
Media_4, Media_4,
Media_5, Media_5,
Media_6, Media_6,
payPop,
FinishStep
}, },
mixins: [myClick], mixins: [myClick],
props: { props: {
id: [String, Number], id: [String, Number],
media: Object, media: Array,
type: { type: {
type: String, type: String,
default: 'preview' default: 'preview'
...@@ -139,15 +101,10 @@ export default { ...@@ -139,15 +101,10 @@ export default {
}, },
data () { data () {
return { return {
media: {
1: [],
2: [],
3: [],
4: [],
5: [],
},
drawStatus: false, drawStatus: false,
finishVisible: false, finishVisible: false,
payInfo: null,
accountInfo: null
}; };
}, },
computed: { computed: {
...@@ -155,31 +112,13 @@ export default { ...@@ -155,31 +112,13 @@ export default {
return this.type != 'preview' && this.drawStatus return this.type != 'preview' && this.drawStatus
} }
}, },
mounted () {
// onLoad (options) { this.findPayInfo();
// console.log(options);
// this.type = options.type;
// this.id = options.id;
// if (options.type != 'preview') this.media = uni.$storage.get('mediaList')
// else this.getFindSoureDetail(options.id);
// },
// onBackPress (options) {
// if (options.from === "backbutton") {
// // 物理返回按钮触发
// // 阻止默认行为,即不执行页面返回
// if (this.type != "preview") this.$refs.finish.open();
// return true;
// }
// // 其他情况允许正常返回
// return false;
// },
async onReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList();
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
open () { open () {
this.$refs.payRef.open(); this.$refs.stepRef.open()
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
...@@ -189,7 +128,6 @@ export default { ...@@ -189,7 +128,6 @@ export default {
console.log(this.$refs[`media${e.id}`][0].$refs) console.log(this.$refs[`media${e.id}`][0].$refs)
this.$refs[`media${e.id}`][0].$refs.tabs.init() this.$refs[`media${e.id}`][0].$refs.tabs.init()
} }
// this.getFindSoureDetail(e.id);
}, },
async getFindSoureDetail (id) { async getFindSoureDetail (id) {
try { try {
...@@ -205,15 +143,33 @@ export default { ...@@ -205,15 +143,33 @@ export default {
console.log(error); console.log(error);
} }
}, },
// 选择付款方式
toPay () {
this.$refs.pay.show();
},
back () { back () {
this.$refs?.toolRef?.hide()
this.$emit('back') this.$emit('back')
}, },
done () { done (e) {
this.$emit('done') this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.$emit('done', e)
},
pageonReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList();
},
toPay () {
this.$refs.pay.show()
},
// 查询门店支付配置
async findPayInfo () {
const { shopMerchantId } = uni.$storage.get("userInfo");
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId,
});
this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2);
},
dbClick(){
if(this.type != 'preview') this.drawStatus = !this.drawStatus
} }
}, },
}; };
...@@ -260,7 +216,7 @@ export default { ...@@ -260,7 +216,7 @@ export default {
top: 5%; top: 5%;
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
z-index: 9; z-index: 10;
box-shadow: 0 4px 12px 0 #00000033; box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
......
<template>
<uni-popup
ref="popup"
type="bottom"
border-radius="16px"
>
<view class="kf-box">
<view
class="close flex"
@click="close"
>
<uni-icons
type="closeempty"
:size="14"
color="#1A1A1A"
></uni-icons>
</view>
<view class="title flex">
<view class="sprite-icon icon-qw"></view>
嘀加智慧云
</view>
<view class="info flex">
<view class="text">
<view class="name flex">
云小白 <view class="duty">产品经理</view>
</view>
<view class="content">嘀加智慧云|产品中心</view>
<view class="tool">
<template v-for="(i,index) in tool">
<view
class="tool-item flex"
:key="index"
>
<view :class="['sprite-icon',`icon-kf-${index}`]"></view>
{{i}}
</view>
</template>
</view>
</view>
<view class="qr-box flex">
<image
class="qr"
:src="qr"
/>
使用企业微信扫码
</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
tool: ['使用反馈', '功能建议', '心得分享', '吐槽拍砖'],
qr: require('@/assets/images/common/qr.png')
}
},
mounted () {
},
methods: {
open () {
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
}
}
}
</script>
<style scoped lang='scss'>
.kf-box {
position: relative;
width: 864rpx;
height: 478rpx;
background: #ffffff;
border-radius: 32rpx;
padding: 0 48rpx;
box-sizing: border-box;
.close {
position: absolute;
width: 120rpx;
height: 120rpx;
top: 0;
right: 0;
justify-content: center;
}
.title {
font-weight: 500;
font-size: 32rpx;
padding: 46rpx 0;
.sprite-icon {
margin-right: 16rpx;
}
}
.info {
.name {
position: relative;
width: 480rpx;
font-weight: 600;
font-size: 48rpx;
align-items: baseline;
padding-bottom: 24rpx;
border-bottom: 2rpx solid #e6e6e6;
.duty {
font-weight: 400;
font-size: 28rpx;
margin-left: 16rpx;
}
&::after {
position: absolute;
left: 0;
bottom: -2rpx;
width: 280rpx;
height: 4rpx;
background: #2c66f7;
content: "";
}
}
.content {
padding: 28rpx 0;
font-weight: 500;
font-size: 28rpx;
}
.tool {
display: flex;
flex-wrap: wrap;
&-item {
flex: 50%;
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
.sprite-icon {
margin-right: 8rpx;
}
}
}
}
.qr-box {
margin-left: 48rpx;
flex-shrink: 0;
flex-direction: column;
font-weight: 500;
font-size: 28rpx;
.qr {
width: 240rpx;
height: 240rpx;
margin-bottom: 8rpx;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -11,12 +11,14 @@ import Vuex from "vuex"; ...@@ -11,12 +11,14 @@ import Vuex from "vuex";
import getters from "./getters"; import getters from "./getters";
import user from "./modules/user"; import user from "./modules/user";
import audio from "./modules/audio"; import audio from "./modules/audio";
import update from "./modules/update";
Vue.use(Vuex); Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
modules: { modules: {
user, user,
audio, audio,
update
}, },
getters, getters,
}); });
......
export default {
state () {
return {
status: false
};
},
mutations: {
},
actions: {
openUpdateModal ({ state }) {
state.status = true
},
},
};
...@@ -12,13 +12,15 @@ export default { ...@@ -12,13 +12,15 @@ export default {
return { return {
customerInfo: { customerInfo: {
customerName: "", customerName: "",
carBrand:'',
carModel: "", carModel: "",
phoneNumber: "", phoneNumber: "",
salesUuid: "", salesUuid: "",
staffName: "", staffName: "",
}, },
canvasStatus:false canvasStatus:false,
carBrands:[],
employeeList:[],
}; };
}, },
mutations: { mutations: {
...@@ -51,6 +53,12 @@ export default { ...@@ -51,6 +53,12 @@ export default {
}, },
clearCanvas({state}, value = false){ clearCanvas({state}, value = false){
state.canvasStatus = value state.canvasStatus = value
},
setCarBrandsList({state},value){
state.carBrands = value
},
setEmployeeList({state},value){
state.employeeList = value
} }
}, },
}; };
...@@ -32,4 +32,8 @@ ...@@ -32,4 +32,8 @@
opacity: 1; opacity: 1;
transform: translateX(0); transform: translateX(0);
} }
}
.flex{
display: flex;
align-items: center;
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -12,7 +12,8 @@ export const STORAGE_OBJECTkEY = {
mock_data: "mock_data", mock_data: "mock_data",
storageFile: "storageFile", storageFile: "storageFile",
userInfo: 'userInfo', userInfo: 'userInfo',
mediaList: 'mediaList' noSignInUuid: 'noSignInUuid',
noviceGuideStatus:'noviceGuideStatus'
}; };
// export const IMG_VERSION = async () => { // export const IMG_VERSION = async () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!