|
@@ -13,8 +13,8 @@ const instance = getCurrentInstance();
|
|
const context = ref("");
|
|
const context = ref("");
|
|
const permissions = ref(false);
|
|
const permissions = ref(false);
|
|
const formData = ref({
|
|
const formData = ref({
|
|
- contact_name: "",
|
|
|
|
- contact_information: "",
|
|
|
|
|
|
+ contact_name: "ces",
|
|
|
|
+ contact_information: "13526483571",
|
|
pharmacist_type: 0,
|
|
pharmacist_type: 0,
|
|
});
|
|
});
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
@@ -87,6 +87,8 @@ const onSubmit = async () => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ console.log(permissions.value);
|
|
|
|
+
|
|
if (!permissions.value) {
|
|
if (!permissions.value) {
|
|
show.value = true;
|
|
show.value = true;
|
|
return;
|
|
return;
|
|
@@ -95,6 +97,10 @@ const onSubmit = async () => {
|
|
uni.login({
|
|
uni.login({
|
|
provider: instance.proxy.$mpPlatform.substring(3),
|
|
provider: instance.proxy.$mpPlatform.substring(3),
|
|
success: async ({ code }) => {
|
|
success: async ({ code }) => {
|
|
|
|
+ if (!code) {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const order = await request(
|
|
const order = await request(
|
|
"api/question_bank/question_reception/challenge_registration_log/add",
|
|
"api/question_bank/question_reception/challenge_registration_log/add",
|
|
{
|
|
{
|
|
@@ -102,6 +108,10 @@ const onSubmit = async () => {
|
|
...formData.value,
|
|
...formData.value,
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
+ if (order.code !== "success") {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const e = await request(
|
|
const e = await request(
|
|
"api/question_bank/question_reception/orders/wechat_pay",
|
|
"api/question_bank/question_reception/orders/wechat_pay",
|
|
{
|
|
{
|
|
@@ -110,7 +120,10 @@ const onSubmit = async () => {
|
|
app_id: ext.extAppid,
|
|
app_id: ext.extAppid,
|
|
}
|
|
}
|
|
);
|
|
);
|
|
-
|
|
|
|
|
|
+ if (e.code !== "success") {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
uni.requestPayment({
|
|
uni.requestPayment({
|
|
provider: "wxpay",
|
|
provider: "wxpay",
|
|
timeStamp: e.data.timeStamp, //时间戳
|
|
timeStamp: e.data.timeStamp, //时间戳
|
|
@@ -134,8 +147,15 @@ const onSubmit = async () => {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ fail() {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ },
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const onChange = (e) => {
|
|
|
|
+ permissions.value = !!e.detail.value[0];
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<template>
|
|
<template>
|
|
<Container
|
|
<Container
|
|
@@ -190,10 +210,12 @@ const onSubmit = async () => {
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<div class="permissions">
|
|
<div class="permissions">
|
|
- <label>
|
|
|
|
- <checkbox class="checkbox" :value="permissions" />
|
|
|
|
- 阅读并确认
|
|
|
|
- </label>
|
|
|
|
|
|
+ <checkbox-group @change="onChange">
|
|
|
|
+ <label>
|
|
|
|
+ <checkbox class="checkbox" :value="1" />
|
|
|
|
+ 阅读并确认
|
|
|
|
+ </label>
|
|
|
|
+ </checkbox-group>
|
|
<span
|
|
<span
|
|
class="text-primary"
|
|
class="text-primary"
|
|
@click="
|
|
@click="
|