This commit is contained in:
2024-12-24 19:50:36 +08:00
parent 08b8825abd
commit 22fe77f26a
31 changed files with 382 additions and 207 deletions

View File

@@ -1,40 +0,0 @@
{
"prompt": "template",
"title": "用户协议和隐私政策",
"message": "感谢您使用全能查APP! 我们非常重视您的隐私保护和个人信息保护在您使用全能查APP前请您仔细阅读、充分理解<a href=\"/pages/userAgreement\">《用户协议》</a>和<a href=\"/pages/privacyPolicy\">《隐私政策》</a>的各项条款。如果您同意,请点击下方按钮开始接受我们的服务。",
"buttonAccept": "同意并继续",
"buttonRefuse": "退出应用",
"hrefLoader": "default",
"second": {
"title": "确认提示",
"message": "您点击同意并继续视为您已同意上诉协议的全部内容",
"buttonAccept": "同意并继续",
"buttonRefuse": "退出"
},
"styles": {
"backgroundColor": "#FFFFFF",
"borderRadius": "10px",
"title": {
"color": "#333333",
"fontSize": "18px",
"fontWeight": "bold"
},
"message": {
"color": "#666666",
"fontSize": "14px",
"lineHeight": "1.5"
},
"buttonAccept": {
"color": "#333333",
"backgroundColor": "#007AFF",
"borderRadius": "5px",
"padding": "10px 20px"
},
"buttonRefuse": {
"color": "#333333",
"backgroundColor": "#FF3B30",
"borderRadius": "5px",
"padding": "10px 20px"
}
}
}

View File

@@ -112,3 +112,10 @@ export function payment(data) {
data,
})
}
export function iapPaymentCallback(data) {
return request({
url: `/pay/iap_callback`,
method: 'POST',
data,
})
}

8
src/components.d.ts vendored
View File

@@ -18,19 +18,16 @@ declare module 'vue' {
LTitle: typeof import('./components/LTitle.vue')['default']
PrivacyModel: typeof import('./components/PrivacyModel.vue')['default']
QiunDataChartsQiunDataCharts: typeof import('./components/qiun-data-charts/qiun-data-charts.vue')['default']
QiunErrorQiunError: typeof import('./components/qiun-error/qiun-error.vue')['default']
QiunLoadingLoading1: typeof import('./components/qiun-loading/loading1.vue')['default']
QiunLoadingLoading2: typeof import('./components/qiun-loading/loading2.vue')['default']
QiunLoadingLoading3: typeof import('./components/qiun-loading/loading3.vue')['default']
QiunLoadingLoading4: typeof import('./components/qiun-loading/loading4.vue')['default']
QiunLoadingLoading5: typeof import('./components/qiun-loading/loading5.vue')['default']
QiunLoadingQiunLoading: typeof import('./components/qiun-loading/qiun-loading.vue')['default']
}
}
Button: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default']
WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default']
WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default']
WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default']
WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default']
WdImg: typeof import('wot-design-uni/components/wd-img/wd-img.vue')['default']
@@ -38,7 +35,6 @@ Button: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['defa
WdLoadmore: typeof import('wot-design-uni/components/wd-loadmore/wd-loadmore.vue')['default']
WdNavbar: typeof import('wot-design-uni/components/wd-navbar/wd-navbar.vue')['default']
WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default']

View File

@@ -21,7 +21,13 @@ function refusePrivacy() {
acceptPrivacy()
}
else {
uni.exitApp()
const platform = uni.getSystemInfoSync().platform
if (platform === 'android') {
plus.runtime.quit()
}
else if (platform === 'ios') {
plus.runtime.launchApplication({ action: 'QUIT' })
}
}
},
})

View File

@@ -23,6 +23,7 @@ onMounted(() => {
const pageName = currentPage.split('/').pop()
tabbar.value = pageName
})
function toComplaint() {
uni.navigateTo({
url: '/pages/complaint',

View File

@@ -1,109 +1,115 @@
{
"name" : "全能查",
"appid" : "__UNI__CC3DA09",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "101",
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"name": "全能查",
"appid": "__UNI__CC3DA09",
"description": "",
"versionName": "1.0.0",
"versionCode": "104",
"transformPx": false,
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {
"Payment": {}
},
"distribute": {
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>"
],
"package": "com.quannengcha.app"
},
"ios": {
"privacyDescription": {
"NSLocalNetworkUsageDescription": "需要访问您的网络来提供更好的服务"
},
"modules" : {
"Payment" : {}
},
"distribute" : {
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>"
]
},
"ios" : {
"privacyDescription" : {
"NSLocalNetworkUsageDescription" : "需要访问您的网络来提供更好的服务"
},
"idfa" : false,
"dSYMs" : false
},
"sdkConfigs" : {
"payment" : {
"alipay" : {
"__platform__" : [ "ios", "android" ]
}
},
"ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "src/static/icons/72x72.png",
"xhdpi" : "src/static/icons/96x96.png",
"xxhdpi" : "src/static/icons/144x144.png",
"xxxhdpi" : "src/static/icons/192x192.png"
},
"ios" : {
"appstore" : "src/static/icons/1024x1024.png",
"ipad" : {
"app" : "src/static/icons/76x76.png",
"app@2x" : "src/static/icons/152x152.png",
"notification" : "src/static/icons/20x20.png",
"notification@2x" : "src/static/icons/40x40.png",
"proapp@2x" : "src/static/icons/167x167.png",
"settings" : "src/static/icons/29x29.png",
"settings@2x" : "src/static/icons/58x58.png",
"spotlight" : "src/static/icons/40x40.png",
"spotlight@2x" : "src/static/icons/80x80.png"
},
"iphone" : {
"app@2x" : "src/static/icons/120x120.png",
"app@3x" : "src/static/icons/180x180.png",
"notification@2x" : "src/static/icons/40x40.png",
"notification@3x" : "src/static/icons/60x60.png",
"settings@2x" : "src/static/icons/58x58.png",
"settings@3x" : "src/static/icons/87x87.png",
"spotlight@2x" : "src/static/icons/80x80.png",
"spotlight@3x" : "src/static/icons/120x120.png"
}
}
}
},
"background" : "#000000",
"compatible" : {
"ignoreVersion" : true
"idfa": false,
"bundleIdentifier": "com.allinone.check"
},
"sdkConfigs": {
"payment": {
"appleiap": {
"inAppPurchase": true
},
"alipay": {
"__platform__": [
"ios",
"android"
]
}
}
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"icons": {
"android": {
"hdpi": "src/static/icons/72x72.png",
"xhdpi": "src/static/icons/96x96.png",
"xxhdpi": "src/static/icons/144x144.png",
"xxxhdpi": "src/static/icons/192x192.png"
},
"usingComponents" : true,
"darkmode" : false,
"themeLocation" : "theme.json"
"ios": {
"appstore": "src/static/icons/1024x1024.png",
"ipad": {
"app": "src/static/icons/76x76.png",
"app@2x": "src/static/icons/152x152.png",
"notification": "src/static/icons/20x20.png",
"notification@2x": "src/static/icons/40x40.png",
"proapp@2x": "src/static/icons/167x167.png",
"settings": "src/static/icons/29x29.png",
"settings@2x": "src/static/icons/58x58.png",
"spotlight": "src/static/icons/40x40.png",
"spotlight@2x": "src/static/icons/80x80.png"
},
"iphone": {
"app@2x": "src/static/icons/120x120.png",
"app@3x": "src/static/icons/180x180.png",
"notification@2x": "src/static/icons/40x40.png",
"notification@3x": "src/static/icons/60x60.png",
"settings@2x": "src/static/icons/58x58.png",
"settings@3x": "src/static/icons/87x87.png",
"spotlight@2x": "src/static/icons/80x80.png",
"spotlight@3x": "src/static/icons/120x120.png"
}
}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"darkmode" : false,
"themeLocation" : "theme.json"
"background": "#000000",
"compatible": {
"ignoreVersion": true
}
}
},
"quickapp": {},
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"darkmode": false,
"themeLocation": "theme.json"
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "3",
"h5": {
"darkmode": false,
"themeLocation": "theme.json"
}
}

View File

@@ -57,6 +57,12 @@
"layout": "page",
"title": "全能查收款"
},
{
"path": "pages/payb",
"type": "page",
"layout": "page",
"title": "全能查收款"
},
{
"path": "pages/privacyPolicy",
"type": "page",

View File

@@ -6,13 +6,12 @@ function toInquire(name) {
}
const services = ref([
{ title: '个人风险', name: 'riskassessment', subtitle: '一查全知', bg: '/static/image/index_icon_2.png', bgColor: 'bg-indigo-400', position: 'left' },
{ title: '婚恋风险', name: 'marriage', subtitle: '查婚姻状态让爱无忧', bg: '/static/image/index_icon_1.png', bgColor: ' bg-pink-400 ', position: 'right' },
{ title: '家政服务', name: 'homeservice', subtitle: '用人有保障', bg: '/static/image/index_icon_3.png', bgColor: ' bg-teal-500 ', position: 'left' },
{ title: '租赁风险', name: 'rentalinfo', subtitle: '一查明了', bg: '/static/image/index_icon_4.png', bgColor: ' bg-sky-500 ', position: 'left' },
{ title: '企业报告', name: 'companyinfo', subtitle: '合作更安心', bg: '/static/image/index_icon_5.png', bgColor: ' bg-blue-400 ', position: 'right' },
{ title: '人事背调', name: 'backgroundcheck', subtitle: '选人更放心', bg: '/static/image/index_icon_6.png', bgColor: ' bg-orange-400 ', position: 'left' },
{ title: '贷前调查', name: 'preloanbackgroundcheck', subtitle: '放心借贷', bg: '/static/image/index_icon_7.png', bgColor: ' bg-red-400 ', position: 'right' },
{ title: '个人风险', name: 'riskassessment', subtitle: '一查全知', bg: '/static/image/index_icon_2.png', bgColor: 'bg-indigo-400', position: 'rounded-tl-[35px] rounded-bl-[35px] rounded-tr-lg rounded-br-lg' },
{ title: '婚恋风险', name: 'marriage', subtitle: '查婚姻状态让爱无忧', bg: '/static/image/index_icon_1.png', bgColor: ' bg-pink-400 ', position: 'rounded-tr-[35px] rounded-br-[35px] rounded-tl-lg rounded-bl-lg' },
{ title: '家政服务', name: 'homeservice', subtitle: '用人有保障', bg: '/static/image/index_icon_3.png', bgColor: ' bg-teal-500 ', position: 'rounded-tl-[35px] rounded-bl-[35px] rounded-tr-lg rounded-br-lg' },
{ title: '租赁风险', name: 'rentalinfo', subtitle: '一查明了', bg: '/static/image/index_icon_4.png', bgColor: ' bg-sky-500 ', position: 'rounded-tl-[35px] rounded-bl-[35px] rounded-tr-lg rounded-br-lg' },
{ title: '企业报告', name: 'companyinfo', subtitle: '合作更安心', bg: '/static/image/index_icon_5.png', bgColor: ' bg-blue-400 ', position: 'rounded-tr-[35px] rounded-br-[35px] rounded-tl-lg rounded-bl-lg' },
{ title: '人事背调', name: 'backgroundcheck', subtitle: '招聘有保障,选人更放心', bg: '/static/image/index_icon_6.png', bgColor: ' bg-orange-400 ', position: 'rounded-[35px] col-span-2' },
])
const noticeText = ref([])
@@ -48,9 +47,7 @@ function toHistory() {
<template v-for="(service, index) in services" :key="index">
<view
class="relative flex flex-col px-4 py-2 shadow-lg" :class="[
service.position === 'left'
? 'rounded-tl-[35px] rounded-bl-[35px] rounded-tr-lg rounded-br-lg'
: 'rounded-tr-[35px] rounded-br-[35px] rounded-tl-lg rounded-bl-lg',
service.position,
service.bgColor,
service.title === '婚恋风险' ? 'row-span-2' : '',
]" :style="`background: url(${service.bg}) no-repeat; background-size: cover; background-position: center;`"

View File

@@ -177,7 +177,7 @@ onUnmounted(() => {
class="flex-1 border-b border-gray-200 border-b-solid"
/>
<view
class="ml-2 rounded-lg border-none px-2 py-2 text-sm font-bold outline-none ring-none transition duration-300"
class="ml-2 flex-shrink-0 rounded-lg border-none px-2 py-2 text-sm font-bold outline-none ring-none transition duration-300"
:class="isCountingDown || !isPhoneNumberValid ? 'cursor-not-allowed bg-gray-300 text-gray-500' : 'bg-blue-500 text-white hover:bg-blue-600'"
@click="sendVerificationCode"
>

View File

@@ -135,7 +135,7 @@ onUnmounted(() => {
>
</view>
<view
class="ml-2 rounded-lg px-4 py-2 text-sm font-bold transition duration-300 focus:outline-none"
class="ml-2 flex-shrink-0 rounded-lg px-4 py-2 text-sm font-bold transition duration-300 focus:outline-none"
:class="isCountingDown || !isPhoneNumberValid ? 'cursor-not-allowed bg-gray-300 text-gray-500' : 'bg-blue-500 text-white hover:bg-blue-600'"
@click="sendVerificationCode"
>

164
src/pages/payb.vue Normal file
View File

@@ -0,0 +1,164 @@
<script setup>
import { iapPaymentCallback, payment, queryProvisionalOrder } from '@/api/apis'
const selectedPaymentMethod = ref('appleiap')
const id = ref(null)
const order = ref({
productName: '',
price: null,
})
async function handlePayment() {
try {
if (selectedPaymentMethod.value === 'appleiap') {
const paymentResponse = await payment({ id: id.value, pay_method: selectedPaymentMethod.value })
if (paymentResponse.code === 200) {
uni.showLoading({ title: '加载中' })
const productID = paymentResponse.data.prepay_id
const orderID = paymentResponse.data.order_id
const iapChannel = await getIapChannel()
const products = await requestProduct(iapChannel, [productID])
if (products.length > 0) {
const product = products[0]
uni.requestPayment({
provider: 'appleiap',
orderInfo: { productid: product.productid },
success: async (iapRes) => {
const callbackResponse = await iapPaymentCallback({
order_id: orderID,
transaction_receipt: iapRes.transactionReceipt,
})
if (callbackResponse.code === 200) {
handlePaySuccess(orderID)
}
else {
console.error('支付回调处理失败:', callbackResponse)
}
},
fail: (err) => {
console.error('支付失败:', err)
},
})
}
else {
console.error('未找到对应的产品信息')
}
}
else {
console.error('支付请求失败:', paymentResponse)
}
}
else {
console.error('未选择 Apple IAP 支付方式')
}
}
catch (error) {
console.error('支付流程中发生错误:', error)
}
finally {
uni.hideLoading()
}
}
async function getIapChannel() {
return new Promise((resolve, reject) => {
uni.showLoading({ title: '加载中' })
plus.payment.getChannels((channels) => {
const iapChannel = channels.find(channel => channel.id === 'appleiap')
if (iapChannel) {
resolve(iapChannel)
}
else {
reject(new Error('未找到 Apple IAP 支付通道'))
}
}, (error) => {
reject(new Error(`获取支付通道失败:${error.message}`))
})
})
}
async function requestProduct(iapChannel, productIds) {
return new Promise((resolve, reject) => {
uni.showLoading({ title: '加载中' })
console.log('请求的产品 ID 列表:', productIds)
iapChannel.requestOrder(productIds, (products) => {
resolve(products)
}, (error) => {
reject(new Error(`请求产品信息失败:${error.message}`))
})
})
}
function handlePaySuccess(orderID) {
uni.redirectTo({
url: `/pages/result?id=${orderID}`,
})
}
onLoad((option) => {
if (option.id) {
id.value = option.id
queryProvisionalOrder(option.id).then((res) => {
console.log('res', res)
if (res.code === 200) {
order.value.productName = res.data.product.product_name
order.value.price = res.data.product.sell_price
}
})
}
})
</script>
<template>
<view class="min-h-screen from-blue-200 via-sky-200 to-sky-100 bg-gradient-to-b p-6">
<view class="card">
<h1 class="mb-4 text-xl font-bold">
订单支付
</h1>
<view class="my-10 text-center">
<view class="text-2xl font-bold">
¥{{ order.price }}
</view>
<view class="text-gray-600">
{{ order.productName }}
</view>
</view>
<view class="mb-4">
<label class="mb-2 block text-sm text-gray-600">支付方式</label>
<wd-radio-group v-model="selectedPaymentMethod" shape="dot" size="large">
<view class="border-3 border-blue-500 rounded-lg border-solid px-4 py-2">
<wd-radio value="appleiap">
<view class="flex items-center">
<image
src="/static/image/apple.svg"
mode="aspectFit"
class="mr-1 h-5 w-5"
/> Apple Pay
</view>
</wd-radio>
</view>
</wd-radio-group>
</view>
<button
class="w-full rounded-xl from-blue-500 via-blue-500 to-blue-400 bg-gradient-to-b px-4 py-2 text-white"
@click="handlePayment"
>
立即支付
</button>
</view>
</view>
</template>
<style scoped>
:deep(.wd-radio) {
margin-top: 0;
}
</style>
<route lang="json">
{
"layout": "page",
"title": "全能查收款"
}
</route>

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1732615487801" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3146" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><path d="M905.714286 694.285714q-22.285714 71.428571-70.285714 142.857143-73.714286 112-146.857143 112-28 0-80-18.285714-49.142857-18.285714-86.285714-18.285714-34.857143 0-81.142857 18.857143-46.285714 19.428571-75.428571 19.428571-86.857143 0-172-148-84-149.142857-84-287.428571 0-130.285714 64.571429-213.714286 64-82.285714 162.285714-82.285714 41.142857 0 101.142857 17.142857 59.428571 17.142857 78.857143 17.142857 25.714286 0 81.714286-19.428571 58.285714-19.428571 98.857143-19.428571 68 0 121.714286 37.142857 29.714286 20.571429 59.428571 57.142857-45.142857 38.285714-65.142857 67.428571-37.142857 53.714286-37.142857 118.285714 0 70.857143 39.428571 127.428571t90.285714 72zm-214.857143-670.285714q0 34.857143-16.571429 77.714286-17.142857 42.857143-53.142857 78.857143-30.857143 30.857143-61.714286 41.142857-21.142857 6.285714-59.428571 9.714286 1.714286-85.142857 44.571429-146.857143 42.285714-61.142857 142.857143-84.571429 0.571429 1.714286 1.428571 6.285714t1.428571 6.285714q0 2.285714 2.857143 5.714286t2.857143 5.714286z" p-id="3147"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 31 KiB

1
src/uni-pages.d.ts vendored
View File

@@ -14,6 +14,7 @@ interface NavigateToOptions {
"/pages/login" |
"/pages/me" |
"/pages/pay" |
"/pages/payb" |
"/pages/privacyPolicy" |
"/pages/queryHistory" |
"/pages/result copy" |