Commit 7f610e40 by 杨明

mock

2 parents b497d9b6 703b5139
......@@ -176,8 +176,8 @@ export default {
}
if (n.selectCarNumberFlag && n.selectCarNumberFlag == 2) formList.push({
key: 'plateNo',
maxlength: 10,
name: '车牌号'
name: '车牌号',
type: 'plate'
})
if (n.selectVehicleTypeFlag && n.selectVehicleTypeFlag == 2) {
formList.push(...[{
......@@ -247,7 +247,7 @@ export default {
isExclusive: linkParams.isExclusive || ''//专属链接参数
}
shopmallApi.createOrder(params).then(({ data, code, message }) => {
if(detail.liveBroadcastRoomId) data.liveBroadcastRoomId = detail.liveBroadcastRoomId
if (detail.liveBroadcastRoomId) data.liveBroadcastRoomId = detail.liveBroadcastRoomId
if (code == '0') that.pay(data)
else {
that.payStatus = Date.now()
......@@ -258,6 +258,7 @@ export default {
pay (orderInfo) {
this.showLoading('结算中')
this.payStatus = Date.now()
console.log(orderInfo)
shopmallApi.payOrder({
orderCode: orderInfo.orderCode,
paymentSource: 2 //1128版本 支付来源(1:小程序,2:公众号)
......@@ -269,6 +270,7 @@ export default {
this.showModal = false
let { needPay, payParams, order } = data,
{ videoFullscreen } = this
if(order.orderGoodsDTOS && order.orderGoodsDTOS.length) orderInfo.orderNumber = order.orderGoodsDTOS[0].orderCode
if (needPay) {
let params = {
nonceStr: payParams.nonceStr,
......@@ -296,7 +298,7 @@ export default {
else this.to('crowdfunding.success', { orderInfo })
}
if (videoFullscreen) {
console.log('直播间下单',orderInfo)
console.log('直播间下单', orderInfo)
const res = await shopmallApi.liveRoomReport({
bizDataCode: orderInfo.orderCode,
liveBroadcastRoomId: orderInfo.liveBroadcastRoomId,
......
<template>
<van-action-sheet v-model="showBox" @click-overlay="onCancel" :lock-scroll="false">
<div class="box">
<template v-for="(i, index) in items">
<template v-if="i.name">
<div class="item flex" :key="index">
<div class="label text-hide">
<span v-if="i.key != 'plateNo'">*</span>
{{ i.name }}
<div>
<van-action-sheet
v-model="showBox"
@click-overlay="onCancel"
:lock-scroll="false"
>
<div class="box">
<template v-for="(i, index) in items">
<template v-if="i.name">
<div
class="item flex"
:key="index"
>
<div class="label text-hide">
<span v-if="i.key != 'plateNo'">*</span>
{{ i.name }}
</div>
<div class="value">
<template v-if="i.route">
<van-field
readonly
:placeholder="`请选择您的${i.name}`"
@click="jumpCarBrands(i.route)"
v-model="params[i.key]"
class="readonly"
right-icon="arrow"
></van-field>
</template>
<template v-else-if="i.type == 'plate'">
<van-field
readonly
:placeholder="`请填写您的${i.name}`"
@click="showPlate"
v-model="params[i.key]"
class="readonly"
></van-field>
</template>
<template v-else>
<van-field
v-model="params[i.key]"
:placeholder="`请填写您的${i.name}`"
:maxlength="i.maxlength"
:type="i.type"
clearable
/>
</template>
</div>
</div>
<div class="value">
<template v-if="i.route">
<van-field readonly :placeholder="`请选择您的${i.name}`" @click="jumpCarBrands(i.route)" v-model="params[i.key]" class="readonly" right-icon="arrow"></van-field>
</template>
<template v-else>
<van-field v-model="params[i.key]" :placeholder="`请填写您的${i.name}`" :maxlength="i.maxlength" :type="i.type" clearable />
</template>
</div>
</div>
</template>
</template>
</template>
<!-- <div class="tips">
<!-- <div class="tips">
本人已阅读且同意<span @click="jump('agreement')">《隐私协议》</span>
</div> -->
<template v-if="ISWXWORK">
<van-button color="#b1b1b1" class="btn disabled">企微暂不支持支付</van-button>
</template>
<template v-else>
<van-button color="#f13c3d" class="btn" @click="pay" loading-text="支付中..." :loading="payLoading">立即支付</van-button>
</template>
</div>
</van-action-sheet>
<template v-if="ISWXWORK">
<van-button
color="#b1b1b1"
class="btn disabled"
>企微暂不支持支付</van-button>
</template>
<template v-else>
<van-button
color="#f13c3d"
class="btn"
@click="pay"
loading-text="支付中..."
:loading="payLoading"
>立即支付</van-button>
</template>
</div>
</van-action-sheet>
<license-plate
ref="plate"
@done="plateDone"
></license-plate>
</div>
</template>
<script type="text/ecmascript-6">
......@@ -109,11 +153,9 @@ export default {
let { params, items, hasCarBrand, carInfo, hasPhoneSelect } = this,
obj = {},
phoneRex = /^[1]([3-9])[0-9]{9}$/,
userInfo = this.getUserInfo(),
platNumberRex = /^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([A-Z]([A-HJ-NP-Z0-9]){5})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
userInfo = this.getUserInfo()
console.log(params)
const onInput = ["plateNo"];
const onInput = ["plateNo"]
try {
items.map(e => {
Object.keys(params).map(key => {
......@@ -128,13 +170,6 @@ export default {
this.showToast('请填写正确的手机号')
return
}
if (params.plateNo) {
params.plateNo = params.plateNo.toUpperCase()
if (!platNumberRex.test(params.plateNo)) {
this.showToast('请填写正确的车牌号')
return
}
}
Object.keys(params).map(key => {
if (params[key]) obj[key] = params[key]
})
......@@ -191,6 +226,12 @@ export default {
}
}
this.to('crowdfunding.carBrands')
},
showPlate () {
this.$refs.plate.toggle()
},
plateDone ({ value }) {
this.params.plateNo = value
}
}
}
......
<template>
<canvas :id="canvasId" class="create"></canvas>
<canvas
:id="canvasId"
class="create"
></canvas>
</template>
<script type="text/ecmascript-6">
......@@ -37,6 +40,7 @@ export default {
userName,
goodsName,
orderCode,
orderNumber,
orderStatus,
createdDate,
vehicleBrandName,
......@@ -80,9 +84,9 @@ export default {
}
labelList = [...labelList, '商品名称:', '支付时间:']
valueList = [...valueList, goodsName, new Date(createdDate).format('yyyy年M月d日 hh:mm:ss')]
if (orderStatus != 10 && orderCode) {
if (orderStatus != 10 && (orderNumber || orderCode)) {
labelList.push('订单号:')
valueList.push(orderCode)
valueList.push(orderNumber || orderCode)
}
if (formContentFirst) {
labelList.push(formDescribeFirst)
......@@ -122,7 +126,7 @@ export default {
textBaseline
})
draw.drawText({
text: orderCode || '',
text: orderNumber || orderCode || '',
x: labelX - 1,
y: 54,
color: '#282829',
......
......@@ -10,7 +10,7 @@
module.exports = {
title: '加载中...',
request: {
baseURL: 'http://scrm.test.glsx.com.cn', // 本地测试项目地址,
baseURL: 'http://scrm.dev.glsx.com.cn', // 本地测试项目地址,
// 设置超时时间
timeout: 180000,
// 携带凭证
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2022-10-25 18:38:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-14 17:31:13
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let config = require('./conf.js')
......@@ -15,9 +15,9 @@ export const fetchConfig = function (isEnv = true) {
Object.assign(request, { timeout })
return Promise.resolve(config)
}
return window.fetch('https://oss-config.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //生产
// return window.fetch('https://oss-config.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //生产
// return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //测试
return window.fetch('https://oss-config.dev.glsx.com.cn/mock/618cb9331072f92988f05a23/wx/config', {}).then(res => res.json()) //测试
}
export const cfg = {
install(vue, config) {
......
......@@ -33,7 +33,8 @@ export default {
activityJoin,
payPrice,
orderGoods: [orderGoods],
orderCode
orderCode,
orderNumber
} = orderInfo
this.orderInfo = {
userName: activityJoin.userName,
......@@ -50,7 +51,8 @@ export default {
formContentSecond: activityJoin.formContentSecond,
formDescribeFirst: activityJoin.formDescribeFirst,
formDescribeSecond: activityJoin.formDescribeSecond,
orderCode
orderCode,
orderNumber
}
},
methods: {
......
......@@ -41,7 +41,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}`
}
module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-lwk/', // 本地调试时需登录时使用
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-yy/', // 本地调试时需登录时使用
// publicPath: './',
// publicPath: '/dj-scrm-wx-work-attachment-activity/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir: 'dist', // 生产环境构建文件的目录
......@@ -51,9 +51,9 @@ module.exports = {
devServer: {
disableHostCheck: true,
// host: `192.168.2.222`,
port: 9528, // 端口
port: 9527, // 端口
open: false, // 启动后打开浏览器
public: 'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-main/#/',
public: 'http://scrm.dev.glsx.com.cn/dj-scrm-wx-work-yy/#/',
overlay: {
// 当出现编译器错误或警告时,在浏览器中显示全屏覆盖层
warnings: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!