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 = { ...@@ -8,10 +8,19 @@ module.exports = {
...data, ...data,
}); });
}, },
findSoureList(data) { // 查询接待素材
findSoureList() {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.recepiton.soure.findSoureList', 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) { getToken(data) {
......
...@@ -2,51 +2,61 @@ ...@@ -2,51 +2,61 @@
* @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-08 13:47:00 * @LastEditTime: 2024-04-08 16:38:43
* @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
*/ */
const recorderManager = uni.getRecorderManager(); const recorderManager = uni.getRecorderManager();
import upload from "@/utils/ossUploadFile/uploadFile.js";
export default { export default {
data() { data() {
return { return {
voicePath: "",
timer: null, timer: null,
times: 0, times: 0,
timeout: 10 * 60, timeout: 10 * 60,
reaction: 10, reaction: 10,
message: "3",
}; };
}, },
onShow() { // onShow() {
window.addEventListener("devicemotion", this.handleDeviceMotion); // window.addEventListener("devicemotion", this.handleDeviceMotion);
}, // },
onHide() { // onHide() {
window.removeEventListener("devicemotion", this.handleDeviceMotion); // window.removeEventListener("devicemotion", this.handleDeviceMotion);
}, // },
created() { created() {
recorderManager.start();
this.initTime(); this.initTime();
document.addEventListener("visibilitychange", this.handleVisibilityChange); this.checkVoice();
recorderManager.onStop((res) => {
uni.$storage.set("storageFile", res.tempFilePath);
this.uploadVoice(res.tempFilePath);
});
}, },
methods: { methods: {
handleDeviceMotion(event) { checkVoice() {
let acceleration = event.accelerationIncludingGravity; const file = uni.$storage.get("storageFile");
let brightness = if (file) this.uploadVoice(file);
Math.abs(acceleration.x) + },
Math.abs(acceleration.y) + uploadVoice(tempFilePath) {
Math.abs(acceleration.z); upload(tempFilePath).then((res) => {
if (brightness < 10) { uni.$storage.set("storageFile", "");
// 假设<10的值代表屏幕可能变暗了 });
console.log("屏幕可能熄灭了"); },
// 在这里执行你需要的操作 //开始录音
} start() {
recorderManager.start();
},
//结束录音
pause() {
recorderManager.stop();
}, },
//监听点击事件 //监听点击事件
initTime() { initTime() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.times++; this.times++;
console.log(this.times);
if (this.times >= this.timeout) { if (this.times >= this.timeout) {
this.showToast(); // this.showToast();
} }
if (this.times >= this.reaction + this.timeout) { if (this.times >= this.reaction + this.timeout) {
this.handleEnd(); this.handleEnd();
...@@ -56,12 +66,13 @@ export default { ...@@ -56,12 +66,13 @@ export default {
handleTouchStart() { handleTouchStart() {
this.times = 0; this.times = 0;
}, },
}, handleVisibilityChange() {
handleVisibilityChange() { this.message = 999;
if (document.visibilityState === "hidden") { if (document.visibilityState === "hidden") {
// 屏幕被关闭 // 屏幕被关闭
console.log("Screen closed"); this.message = 999;
} }
},
}, },
beforeCreate() { beforeCreate() {
clearInterval(this.timer); clearInterval(this.timer);
......
...@@ -4,11 +4,18 @@ ...@@ -4,11 +4,18 @@
}, },
"pages": [ "pages": [
{ {
"path": "pages/home/home",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/login", "path": "pages/common/login",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/detail/detail", "path": "pages/detail/detail",
"style": { "style": {
......
...@@ -3,41 +3,235 @@ ...@@ -3,41 +3,235 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-08 13:44:50 * @LastEditTime: 2024-04-08 17:09:42
--> -->
<template> <template>
<view> <view>
详情页 详情页
<button @click="open">打开弹窗</button> <button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom" background-color="#fff" border-radius="10px 10px 0 0" <uni-popup ref="popup" type="bottom" :mask-click="false" border-radius="16px 16px 0 0">
> <view class="popup-wrapper">
<view> <view class="popup-box">
<view class="">付款二维码</view> <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> </view>
</uni-popup </view>
> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
const PAYMENT_TYPE = [
{
name: "扫码支付",
type: 1,
},
{
name: "对公账户",
type: 2,
},
];
export default { export default {
data() { data() {
return {}; return {
payInfo: {},
accountInfo: {},
payActive: 1,
paymentType: PAYMENT_TYPE,
};
}, },
onLoad(options) { onLoad(options) {
console.log(options, "=="); console.log(uni.getDeviceInfo(), "==");
// const text = options.text // const text = options.text
// uni.setNavigationBarTitle({ // uni.setNavigationBarTitle({
// title: text // title: text
// }); // });
}, },
methods: { 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() { open() {
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] // 通过组件定义的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> </script>
<style scoped lang="scss"> <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> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-08 11:44:51 * @LastEditTime: 2024-04-08 16:44:42
--> -->
<template> <template>
<view class="container"> <view class="container">
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<view class="module-item" v-for="item in moduleList" :key="item.id" @click="toDetail(item)"> <view class="module-item" v-for="item in moduleList" :key="item.id" @click="toDetail(item)">
<image <image
class="module-img" class="module-img"
:src="item.picUrl" :src="item.thumbnail"
mode="scaleToFill" mode="scaleToFill"
/> />
<view class="module-name">{{item.name}}</view> <view class="module-name">{{item.title}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -61,33 +61,10 @@ export default { ...@@ -61,33 +61,10 @@ export default {
moduleList: [ moduleList: [
{ {
id: 1, id: 1,
name: '问界交车告知书', sort: 1,
picUrl: '../../static/logo.png' thumbnail: "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png",
}, title: "问界三包政策",
{ type: 1,
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'
} }
] ]
}; };
...@@ -97,8 +74,12 @@ export default { ...@@ -97,8 +74,12 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: text, title: text,
}); });
this.getSoure()
}, },
methods: { methods: {
async getSoure() {
this.moduleList = await uni.$api.commonApi.findSoureList()
},
toDetail(item) { toDetail(item) {
// this.$Router.push({name:'detail'}) // this.$Router.push({name:'detail'})
uni.navigateTo({ uni.navigateTo({
...@@ -162,7 +143,7 @@ export default { ...@@ -162,7 +143,7 @@ export default {
} }
.store-addr { .store-addr {
display: flex; display: flex;
align-items: flex-start; align-items: stretch;
padding: 0 16rpx 60rpx; padding: 0 16rpx 60rpx;
margin-top: 38rpx; margin-top: 38rpx;
.icon-addr { .icon-addr {
...@@ -175,6 +156,7 @@ export default { ...@@ -175,6 +156,7 @@ export default {
color: #6C6C70; color: #6C6C70;
word-wrap: break-word; word-wrap: break-word;
white-space: normal; white-space: normal;
line-height: 32rpx;
} }
} }
} }
......
<template> <template>
<view class="content"> <view class="content">
<image class="logo" src="/static/logo.png"></image> <image class="logo" src="/static/logo.png"></image>
<view class="text-area"> <view class="text-area">
<text class="title"> <text class="title"> {{ voicePath }} </text>
uView - 多平台快速开发的UI框架 </view>
</text> <view class="button-demo">
</view> <u-button type="primary" plain @click="start()">开始</u-button>
<view class="button-demo"> <u-button type="primary" plain @click="go()">登录</u-button>
<u-button type="primary" plain @click="go()">登录</u-button> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
export default { import myClick from "@/mixin/click";
data() { export default {
return { mixins: [myClick],
title: 'Hello', data() {
} return {
}, title: "Hello",
onLoad() { };
},
}, onLoad() {},
methods: { methods: {
go() { go() {
this.$Router.push({name:'login'}) uni.navigateTo({
} url: "/pages/login/login",
} success: function (res) {
} // success
},
fail: function () {
// fail
},
complete: function () {
// complete
},
});
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 40rpx; padding: 40rpx;
} }
.logo { .logo {
height: 200rpx; height: 200rpx;
width: 200rpx; width: 200rpx;
margin-top: 100rpx; margin-top: 100rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
.text-area { .text-area {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.title { .title {
font-size: 28rpx; font-size: 28rpx;
color: $u-content-color; color: $u-content-color;
} }
.button-demo { .button-demo {
margin-top: 80rpx; margin-top: 80rpx;
} }
</style> </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';; // import { setToken, getToken, removeToken } from '@/utils/token';;
export default { export default {
......
// export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/' // export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/'
// import util from '~/utils/util' // 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方法为空的默认指定值 // 缓存get方法为空的默认指定值
export const DEFAULT_GET_STORAGEKEY = ['sessionId', 'merchantId', 'userInfo'] export const DEFAULT_GET_STORAGEKEY = ["sessionId", "merchantId", "userInfo"];
// 缓存get方法key的对应才映射值 // 缓存get方法key的对应才映射值
export const STORAGE_OBJECTkEY = { export const STORAGE_OBJECTkEY = {
DEFAULT_GET_STORAGEKEY, DEFAULT_GET_STORAGEKEY,
mock_data: 'mock_data', mock_data: "mock_data",
storageFile: "storageFile",
userInfo: 'userInfo' userInfo: 'userInfo'
} };
// export const IMG_VERSION = async () => { // export const IMG_VERSION = async () => {
// const accountInfo = await util.getMockData() // const accountInfo = await util.getMockData()
// return accountInfo?.version || Date.now() // return accountInfo?.version || Date.now()
// }
\ No newline at end of file \ 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!