</u-checkbox-group> | </u-checkbox-group> | ||||
<view class="content"> | <view class="content"> | ||||
我已阅读并同意 <text class="item-line" @click="handleDialog('etc')">《ETC用户协议》</text>和<text class="item-line" | |||||
@click="handleDialog('risk')">《风险提示告知书》</text> | |||||
我已阅读并同意 <text class="item-line" @click="isShow = true">{{`《${linkName}》`}}</text> | |||||
<!-- 和<text class="item-line" | |||||
@click="handleDialog('risk')">《风险提示告知书》</text> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
import Protocol from './Protocol.vue' | import Protocol from './Protocol.vue' | ||||
interface PropsType { | interface PropsType { | ||||
modelValue: any | modelValue: any | ||||
link: any | |||||
} | } | ||||
const props = defineProps < PropsType > () | const props = defineProps < PropsType > () | ||||
const emit = defineEmits(['update:modelValue']) | const emit = defineEmits(['update:modelValue']) | ||||
//获取页面配置 | //获取页面配置 | ||||
const isShow = ref(false) | const isShow = ref(false) | ||||
const typeUrl = ref('') | const typeUrl = ref('') | ||||
const linkName = computed(() => { | |||||
let name = '' | |||||
if (props.link) { | |||||
console.log(props.link); | |||||
typeUrl.value = '/' + props.link | |||||
let arr = props.link.split('/') | |||||
arr = arr[arr.length - 1].split('_') | |||||
if(arr.length <= 1){ | |||||
name = arr[0] | |||||
}else{ | |||||
arr.splice(0, 1) | |||||
arr = arr.join('_') | |||||
arr = arr.split('.') | |||||
arr.pop() | |||||
name = arr.join('.') | |||||
} | |||||
} | |||||
return name | |||||
}) | |||||
function handleDialog(types) { | function handleDialog(types) { | ||||
isShow.value = true | isShow.value = true |
import { | import { | ||||
useCounterStore | useCounterStore | ||||
} from "@/stores/counter"; | } from "@/stores/counter"; | ||||
import Vconsole from 'vconsole' | |||||
const vConsole1 = new Vconsole() | |||||
// import Vconsole from 'vconsole' | |||||
// const vConsole1 = new Vconsole() | |||||
export function createApp() { | export function createApp() { | ||||
const app = createSSRApp(App); | const app = createSSRApp(App); | ||||
app.use(store); | app.use(store); | ||||
app.use(uView); | app.use(uView); | ||||
app.use(vConsole1) | |||||
console.log(import.meta.env.VITE_APP_TYPE); | |||||
// if(import.meta.env.VITE_APP_TYPE !== 'dev'){ | |||||
// app.use(vConsole1) | |||||
// } | |||||
console.log(import.meta.env.VITE_APP_TYPE,'main'); | |||||
//系统属性全局注册 | //系统属性全局注册 | ||||
const counter = useCounterStore(); | const counter = useCounterStore(); | ||||
app.config.globalProperties.$systemInfo = counter.systemInfo | app.config.globalProperties.$systemInfo = counter.systemInfo |
<text>待付款</text> | <text>待付款</text> | ||||
<text class="amount">¥{{handleAmount(amountData.actualPayment)}}</text> | <text class="amount">¥{{handleAmount(amountData.actualPayment)}}</text> | ||||
</view> | </view> | ||||
<Hetong v-model="checked" /> | |||||
<Hetong v-model="checked" :link='link'/> | |||||
<button type="success" class="btn-txt btn" @click="submit">确认办理</button> | <button type="success" class="btn-txt btn" @click="submit">确认办理</button> | ||||
</view> | </view> | ||||
<u-toast ref="uToastRef" /> | <u-toast ref="uToastRef" /> | ||||
// 初始化数据 | // 初始化数据 | ||||
initData(opin, 4).then(async data => { | initData(opin, 4).then(async data => { | ||||
await login(data) | await login(data) | ||||
getLink(data.order.orderId) | |||||
getOrderInfo(data.qdOrder.qtOrderNo) | getOrderInfo(data.qdOrder.qtOrderNo) | ||||
delete data.config.tableConfig | delete data.config.tableConfig | ||||
config.value = Object.assign(data.config, config.value) | config.value = Object.assign(data.config, config.value) | ||||
}) | }) | ||||
}) | }) | ||||
const link = ref('') | |||||
// 获取协议链接 | |||||
async function getLink(orderId) { | |||||
await request('32a9d99a781a4bf2af29a46d903702bd', { | |||||
data: { | |||||
orderId | |||||
} | |||||
}).then((res) => { | |||||
if (res.statusCode === 0) { | |||||
let bizContent = JSON.parse(res.bizContent) | |||||
console.log(bizContent); | |||||
link.value = bizContent.supAgree | |||||
} | |||||
// contractTesting(qdOrderVal.value.qdOrderNo, jumpPage) | |||||
}) | |||||
} | |||||
// 无感登录,如果没有登录调用登录 | // 无感登录,如果没有登录调用登录 | ||||
async function login(orderData) { | async function login(orderData) { | ||||
type: 'warning', | type: 'warning', | ||||
}) | }) | ||||
} | } | ||||
} | } | ||||
</script> | </script> | ||||
<style lang='scss' scoped> | <style lang='scss' scoped> |