Commit 7870f789 by 李伟康

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

2 parents 4b8d90f3 2fec260b
......@@ -8,10 +8,19 @@ module.exports = {
...data,
});
},
findSoureList(data) {
// 查询接待素材
findSoureList() {
return http.post({
method: 'dj.api.smartcarlife.recepiton.soure.findSoureList',
...data,
projectName: "boutique",
})
},
// 查询门店支付配置
findPayInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId',
projectName: "boutique",
...data
})
},
getToken(data) {
......
......@@ -2,51 +2,61 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 13:47:00
* @LastEditTime: 2024-04-08 16:38:43
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const recorderManager = uni.getRecorderManager();
import upload from "@/utils/ossUploadFile/uploadFile.js";
export default {
data() {
return {
voicePath: "",
timer: null,
times: 0,
timeout: 10 * 60,
reaction: 10,
message: "3",
};
},
onShow() {
window.addEventListener("devicemotion", this.handleDeviceMotion);
},
onHide() {
window.removeEventListener("devicemotion", this.handleDeviceMotion);
},
// onShow() {
// window.addEventListener("devicemotion", this.handleDeviceMotion);
// },
// onHide() {
// window.removeEventListener("devicemotion", this.handleDeviceMotion);
// },
created() {
recorderManager.start();
this.initTime();
document.addEventListener("visibilitychange", this.handleVisibilityChange);
this.checkVoice();
recorderManager.onStop((res) => {
uni.$storage.set("storageFile", res.tempFilePath);
this.uploadVoice(res.tempFilePath);
});
},
methods: {
handleDeviceMotion(event) {
let acceleration = event.accelerationIncludingGravity;
let brightness =
Math.abs(acceleration.x) +
Math.abs(acceleration.y) +
Math.abs(acceleration.z);
if (brightness < 10) {
// 假设<10的值代表屏幕可能变暗了
console.log("屏幕可能熄灭了");
// 在这里执行你需要的操作
}
checkVoice() {
const file = uni.$storage.get("storageFile");
if (file) this.uploadVoice(file);
},
uploadVoice(tempFilePath) {
upload(tempFilePath).then((res) => {
uni.$storage.set("storageFile", "");
});
},
//开始录音
start() {
recorderManager.start();
},
//结束录音
pause() {
recorderManager.stop();
},
//监听点击事件
initTime() {
this.timer = setInterval(() => {
this.times++;
console.log(this.times);
if (this.times >= this.timeout) {
this.showToast();
// this.showToast();
}
if (this.times >= this.reaction + this.timeout) {
this.handleEnd();
......@@ -56,12 +66,13 @@ export default {
handleTouchStart() {
this.times = 0;
},
},
handleVisibilityChange() {
if (document.visibilityState === "hidden") {
// 屏幕被关闭
console.log("Screen closed");
}
handleVisibilityChange() {
this.message = 999;
if (document.visibilityState === "hidden") {
// 屏幕被关闭
this.message = 999;
}
},
},
beforeCreate() {
clearInterval(this.timer);
......
......@@ -4,11 +4,18 @@
},
"pages": [
{
"path": "pages/home/home",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/login",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/detail/detail",
"style": {
......
......@@ -3,41 +3,235 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 13:44:50
* @LastEditTime: 2024-04-08 17:09:42
-->
<template>
<view>
详情页
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom" background-color="#fff" border-radius="10px 10px 0 0"
>
<view>
<view class="">付款二维码</view>
<uni-popup ref="popup" type="bottom" :mask-click="false" border-radius="16px 16px 0 0">
<view class="popup-wrapper">
<view class="popup-box">
<view class="payment-title">付款二维码
<view class="icon-close" @click="close">×</view>
</view>
<view class="popup-content">
<view class="tab-list">
<view
:class="['tab-item', { active: payActive === item.type }]"
v-for="item in paymentType"
:key="item.type"
@click="handleSwitchTab(item)"
>{{ item.name }}</view
>
</view>
<view class="payment-content">
<view v-show="payActive === 1" class="qr-code-content">
<image class="qr-code-img" :src="payInfo.storePaymentQrcodeUrl" mode="scaleToFill" />
<!-- <image
class="qr-code-img"
src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode="scaleToFill"
/> -->
<view class="qr-code-info">扫码付款,支持多渠道付款</view>
</view>
<view v-show="payActive === 2" class="corporate-content">
<image
class="bank-logo"
src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode="scaleToFill"
/>
<view class="bank-info">
<view class="bank-item">
<text class="bank-label">公司名称:</text>
<view class="bank-value">东莞问界交付中心</view>
</view>
</view>
</view>
</view>
</view>
<view class="payment-done">已完成支付,去付款凭证</view>
</view>
</uni-popup
>
</view>
</uni-popup>
</view>
</template>
<script>
const PAYMENT_TYPE = [
{
name: "扫码支付",
type: 1,
},
{
name: "对公账户",
type: 2,
},
];
export default {
data() {
return {};
return {
payInfo: {},
accountInfo: {},
payActive: 1,
paymentType: PAYMENT_TYPE,
};
},
onLoad(options) {
console.log(options, "==");
console.log(uni.getDeviceInfo(), "==");
// const text = options.text
// uni.setNavigationBarTitle({
// title: text
// });
},
methods: {
// 切换tab
handleSwitchTab(item) {
this.payActive = item.type;
},
// 查询门店支付配置
async findPayInfo() {
const data = await uni.$api.commonApi.findPayInfo({
merchantId: 44209880,
})
this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2);
},
open() {
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this.$refs.popup.open("top");
this.$refs.popup.open("bottom");
this.findPayInfo();
},
close() {
this.$refs.popup.close();
}
},
};
</script>
<style scoped lang="scss">
.popup-box {
margin-top: 286rpx;
background-color: #f8f9f9;
min-height: 1154rpx;
padding-bottom: 30rpx;
.payment-title {
position: relative;
width: 100%;
height: 96rpx;
padding: 24rpx 0 26rpx;
text-align: center;
border-bottom: 1px solid #e8e8e8;
.icon-close {
position: absolute;
right: 0;
top: 0;
width: 160rpx;
height: 96rpx;
font-size: 50rpx;
text-align: right;
padding-right: 20rpx;
line-height: 96rpx;
}
}
}
.popup-content {
.tab-list {
display: flex;
justify-content: center;
margin-top: 40rpx;
.tab-item {
width: 320rpx;
padding: 24rpx 0 28rpx;
text-align: center;
background-color: #fff;
color: #666;
&.active {
background-color: #2c66f7;
color: #fff;
}
&:first-child {
border-radius: 200rpx 0 0 200rpx;
}
&:last-child {
border-radius: 0 48rpx 48rpx 0;
}
}
}
.payment-content {
width: 100%;
display: flex;
justify-content: center;
margin-top: 40rpx;
.qr-code-content {
width: 538rpx;
background-color: #fff;
border-radius: 24rpx;
text-align: center;
padding: 59rpx 0 67rpx;
.qr-code-img {
width: 420rpx;
height: 420rpx;
}
.qr-code-info {
margin-top: 40rpx;
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
}
}
.corporate-content {
width: 1080rpx;
background-color: #fff;
border-radius: 24rpx;
.bank-logo {
width: 100%;
height: 136rpx;
}
.bank-info {
font-weight: 500;
font-size: 32rpx;
padding: 27rpx 80rpx 39rpx;
.bank-item {
display: flex;
align-items: center;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.bank-label {
color: #6C6C70;
line-height: 94rpx;
}
.bank-value {
box-sizing: border-box;
background-color: #F8F9F9;
border-radius: 8rpx;
width: 740rpx;
height: 80rpx;
line-height: 80rpx;
padding-left: 24rpx;
font-weight: 500;
font-size: 32rpx;
color: #1A1A1A;
letter-spacing: 0;
}
}
}
}
}
}
.payment-done {
width: calc(100% - 240rpx);
height: 80rpx;
font-weight: 500;
font-size: 32rpx;
color: #ffffff;
text-align: center;
line-height: 80rpx;
// padding: 18rpx 0;
margin: 112rpx 120rpx 30rpx;
// margin-top: auto;
background-color: #2c66f7;
border-radius: 40rpx;
}
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 11:44:51
* @LastEditTime: 2024-04-08 16:44:42
-->
<template>
<view class="container">
......@@ -45,10 +45,10 @@
<view class="module-item" v-for="item in moduleList" :key="item.id" @click="toDetail(item)">
<image
class="module-img"
:src="item.picUrl"
:src="item.thumbnail"
mode="scaleToFill"
/>
<view class="module-name">{{item.name}}</view>
<view class="module-name">{{item.title}}</view>
</view>
</view>
</view>
......@@ -61,33 +61,10 @@ export default {
moduleList: [
{
id: 1,
name: '问界交车告知书',
picUrl: '../../static/logo.png'
},
{
id: 2,
name: '商城延保价格明细',
picUrl: '../../static/logo.png'
},
{
id: 3,
name: '保修升级告知书',
picUrl: '../../static/logo.png'
},
{
id: 4,
name: '问界三包政策',
picUrl: '../../static/logo.png'
},
{
id: 5,
name: '整车质保升级政策',
picUrl: '../../static/logo.png'
},
{
id: 6,
name: '历史成交客户',
picUrl: '../../static/logo.png'
sort: 1,
thumbnail: "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png",
title: "问界三包政策",
type: 1,
}
]
};
......@@ -97,8 +74,12 @@ export default {
uni.setNavigationBarTitle({
title: text,
});
this.getSoure()
},
methods: {
async getSoure() {
this.moduleList = await uni.$api.commonApi.findSoureList()
},
toDetail(item) {
// this.$Router.push({name:'detail'})
uni.navigateTo({
......@@ -162,7 +143,7 @@ export default {
}
.store-addr {
display: flex;
align-items: flex-start;
align-items: stretch;
padding: 0 16rpx 60rpx;
margin-top: 38rpx;
.icon-addr {
......@@ -175,6 +156,7 @@ export default {
color: #6C6C70;
word-wrap: break-word;
white-space: normal;
line-height: 32rpx;
}
}
}
......
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">
uView - 多平台快速开发的UI框架
</text>
</view>
<view class="button-demo">
<u-button type="primary" plain @click="go()">登录</u-button>
</view>
</view>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title"> {{ voicePath }} </text>
</view>
<view class="button-demo">
<u-button type="primary" plain @click="start()">开始</u-button>
<u-button type="primary" plain @click="go()">登录</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {
},
methods: {
go() {
this.$Router.push({name:'login'})
}
}
}
import myClick from "@/mixin/click";
export default {
mixins: [myClick],
data() {
return {
title: "Hello",
};
},
onLoad() {},
methods: {
go() {
uni.navigateTo({
url: "/pages/login/login",
success: function (res) {
// success
},
fail: function () {
// fail
},
complete: function () {
// complete
},
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 100rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 100rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 28rpx;
color: $u-content-color;
}
.title {
font-size: 28rpx;
color: $u-content-color;
}
.button-demo {
margin-top: 80rpx;
}
.button-demo {
margin-top: 80rpx;
}
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 14:11:38
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
export default {
......
// export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/'
// import util from '~/utils/util'
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/app-tape/'
export const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/app-tape/";
// 缓存get方法为空的默认指定值
export const DEFAULT_GET_STORAGEKEY = ['sessionId', 'merchantId', 'userInfo']
export const DEFAULT_GET_STORAGEKEY = ["sessionId", "merchantId", "userInfo"];
// 缓存get方法key的对应才映射值
export const STORAGE_OBJECTkEY = {
DEFAULT_GET_STORAGEKEY,
mock_data: 'mock_data',
mock_data: "mock_data",
storageFile: "storageFile",
userInfo: 'userInfo'
}
};
// export const IMG_VERSION = async () => {
// const accountInfo = await util.getMockData()
// return accountInfo?.version || Date.now()
// }
\ No newline at end of file
// }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!