@@ -8,8 +8,9 @@ | |||
</u-checkbox-group> | |||
<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> | |||
@@ -29,6 +30,7 @@ | |||
import Protocol from './Protocol.vue' | |||
interface PropsType { | |||
modelValue: any | |||
link: any | |||
} | |||
const props = defineProps < PropsType > () | |||
const emit = defineEmits(['update:modelValue']) | |||
@@ -44,6 +46,26 @@ | |||
//获取页面配置 | |||
const isShow = ref(false) | |||
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) { | |||
isShow.value = true |
@@ -28,14 +28,16 @@ import uView from "@/uni_modules/vk-uview-ui"; | |||
import { | |||
useCounterStore | |||
} from "@/stores/counter"; | |||
import Vconsole from 'vconsole' | |||
const vConsole1 = new Vconsole() | |||
// import Vconsole from 'vconsole' | |||
// const vConsole1 = new Vconsole() | |||
export function createApp() { | |||
const app = createSSRApp(App); | |||
app.use(store); | |||
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(); | |||
app.config.globalProperties.$systemInfo = counter.systemInfo |
@@ -30,8 +30,8 @@ | |||
<text>待付款</text> | |||
<text class="amount">¥{{handleAmount(amountData.actualPayment)}}</text> | |||
</view> | |||
<Hetong v-model="checked" /> | |||
<Hetong v-model="checked" :link='link'/> | |||
<button type="success" class="btn-txt btn" @click="submit">确认办理</button> | |||
</view> | |||
<u-toast ref="uToastRef" /> | |||
@@ -110,12 +110,29 @@ | |||
// 初始化数据 | |||
initData(opin, 4).then(async data => { | |||
await login(data) | |||
getLink(data.order.orderId) | |||
getOrderInfo(data.qdOrder.qtOrderNo) | |||
delete data.config.tableConfig | |||
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) { | |||
@@ -205,7 +222,6 @@ | |||
type: 'warning', | |||
}) | |||
} | |||
} | |||
</script> | |||
<style lang='scss' scoped> |