Merge branch 'Branch_1' of https://git.u8t.cn/tangxinyue/alipay-emulator into Branch_1

This commit is contained in:
tangxinyue 2026-04-17 11:16:11 +08:00
commit 009422675d
33 changed files with 1502 additions and 133 deletions

View File

@ -7,7 +7,8 @@
<view class="box"> <view class="box">
<view class="info" v-if="!isExchange"> <view class="info" v-if="!isExchange">
<view :style="styles"> <view :style="styles">
<uni-easyinput :styles="styles" v-model="code" placeholder="请输入兑换码" :inputBorder="false" placeholderStyle="text-align: center;"></uni-easyinput> <uni-easyinput :styles="styles" v-model="code" placeholder="请输入兑换码" :inputBorder="false"
placeholderStyle="text-align: center;"></uni-easyinput>
</view> </view>
<view class="btn" :class="{'noValue':code==''}" @click="getExchange"> <view class="btn" :class="{'noValue':code==''}" @click="getExchange">
兑换 兑换
@ -37,36 +38,38 @@
</template> </template>
<script> <script>
import { postJson } from "@/utils/requests.js" import {
postJson
} from "@/utils/requests.js"
export default { export default {
name: "exchange", name: "exchange",
data() { data() {
return { return {
code:"", code: "",
isMaskExchange:false, isMaskExchange: false,
isExchange:false, isExchange: false,
couponVip:{ couponVip: {
}, },
styles:{ styles: {
backgroundColor: '#FFFCEC', backgroundColor: '#FFFCEC',
padding:'10px ', padding: '10px ',
'border-radius':'10px' 'border-radius': '10px'
} }
}; };
}, },
methods:{ methods: {
open(){ open() {
this.isMaskExchange=true this.isMaskExchange = true
this.isExchange=false this.isExchange = false
this.code='' this.code = ''
}, },
close(){ close() {
this.isMaskExchange=false this.isMaskExchange = false
this.code='' this.code = ''
}, },
async getExchange(){ async getExchange() {
if(this.code==''){ if (this.code == '') {
return return
} }
let couponVip = await this.$requestPromise({ let couponVip = await this.$requestPromise({
@ -77,30 +80,30 @@
} }
}) })
console.log(couponVip) console.log(couponVip)
if(couponVip.code!=0){ if (couponVip.code != 0) {
uni.showToast({ uni.showToast({
icon:"none", icon: "none",
title:"兑换码有误" title: "兑换码有误"
}) })
return return
} }
this.isExchange=true this.isExchange = true
this.couponVip=couponVip.data this.couponVip = couponVip.data
}, },
async submit(){ async submit() {
let exchangeRes = await postJson('q', 'api/activity/exchange', { let exchangeRes = await postJson('q', 'api/activity/exchange', {
code: this.code code: this.code
}) })
if(exchangeRes.code!=0){ if (exchangeRes.code != 0) {
// uni.showToast({
// icon:"none",
// title:exchangeRes.message
// })
return
}else{
uni.showToast({ uni.showToast({
icon:"none", icon: "none",
title:"兑换成功" title: "券已使用过了"
})
return
} else {
uni.showToast({
icon: "none",
title: "兑换成功"
}) })
//app //app
let user = await proxy.$requestPromise({ let user = await proxy.$requestPromise({
@ -112,8 +115,8 @@
data.appUser = user.data data.appUser = user.data
console.log("app用户信息", data.appUser); console.log("app用户信息", data.appUser);
} }
this.isMaskExchange=false this.isMaskExchange = false
this.isExchange=false this.isExchange = false
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
@ -157,13 +160,15 @@
padding: 18px 0; padding: 18px 0;
text-align: center; text-align: center;
} }
.title{
.title {
font-size: 20px; font-size: 20px;
color: #1a1a1a; color: #1a1a1a;
text-align: center; text-align: center;
margin-bottom: 24px; margin-bottom: 24px;
} }
.time{
.time {
font-size: 16px; font-size: 16px;
color: #AAAAAA; color: #AAAAAA;
text-align: center; text-align: center;
@ -180,10 +185,12 @@
border-radius: 60px; border-radius: 60px;
text-align: center; text-align: center;
} }
.btn2{
.btn2 {
margin-top: 12px; margin-top: 12px;
} }
.noValue{
.noValue {
opacity: 0.5; opacity: 0.5;
} }
} }
@ -207,6 +214,7 @@
z-index: 1; z-index: 1;
width: 54px; width: 54px;
height: 26px; height: 26px;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -1,37 +1,46 @@
{ {
"name": "alipay-emulator", "name" : "alipay-emulator",
"appid": "__UNI__D535736", "appid" : "__UNI__D535736",
"description": "", "description" : "",
"versionName": "1.0.0", "versionName" : "1.0.0",
"versionCode": 100, "versionCode" : 100,
"transformPx": false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus": { "app-harmony" : {
"darkmode": false, "distribute" : {
"usingComponents": true, "splashScreens" : {
"nvueStyleCompiler": "uni-app", "startWindowIcon" : "resource/icon.png", //
"compilerVersion": 3, "startWindowBackground" : "#123456" //
"splashscreen": { }
"alwaysShowBeforeRender": true, }
"waiting": true, },
"autoclose": false, "app-plus" : {
"delay": 0 "darkmode" : false,
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : false,
"delay" : 0
}, },
"optimization": { "optimization" : {
"subPackages": true "subPackages" : true
}, },
"runmode": "liberate", // "runmode" : "liberate", //
/* */ /* */
"modules": { "modules" : {
"Camera": {}, "Camera" : {},
"Payment": {}, "Payment" : {},
"LivePusher": {} "LivePusher" : {}
}, },
/* */ /* */
"distribute": { "distribute" : {
/* android */ /* android */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -50,52 +59,46 @@
] ]
}, },
/* ios */ /* ios */
"ios": { "ios" : {
"dSYMs": false "dSYMs" : false
}, },
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs" : {
"payment": { "payment" : {
"weixin": { "weixin" : {
"__platform__": [ "__platform__" : [ "ios", "android" ],
"ios", "appid" : "123456",
"android" "UniversalLinks" : "https://hhhhh.com/apple-app-site-association/"
],
"appid": "123456",
"UniversalLinks": "https://hhhhh.com/apple-app-site-association/"
}, },
"alipay": { "alipay" : {
"__platform__": [ "__platform__" : [ "ios", "android" ]
"ios",
"android"
]
} }
} }
} }
}, },
"nvueLaunchMode": "" "nvueLaunchMode" : ""
}, },
/* */ /* */
"quickapp": {}, "quickapp" : {},
/* */ /* */
"mp-weixin": { "mp-weixin" : {
"appid": "", "appid" : "",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"vueVersion": "3" "vueVersion" : "3"
} }

View File

@ -287,6 +287,14 @@
"navigationBarTitleText": "从夯倒拉排名", "navigationBarTitleText": "从夯倒拉排名",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path" : "certificate/graduate",
"style" :
{
"navigationBarTitleText" : "证书",
"navigationStyle": "custom"
}
} }
] ]
}, },

View File

@ -211,7 +211,7 @@ onLoad(async () => {
}) })
onShow(() => { onShow(() => {
// #ifdef APP-PLUS // #ifdef APP-PLUS&&!APP-HARMONY
util.setAndroidSystemBarColor('#F0F3F8') util.setAndroidSystemBarColor('#F0F3F8')
setTimeout(() => { setTimeout(() => {
plus.navigator.setStatusBarStyle("light"); plus.navigator.setStatusBarStyle("light");

View File

@ -285,6 +285,11 @@ const otherList = [{
name: "购物", name: "购物",
path: "/pages/shopping/index" path: "/pages/shopping/index"
}, },
{
icon: "/static/image/other/certificate/certificate.png",
name: "证书",
path: "/pages/other/certificate/graduate"
},
] ]
const data = reactive({ const data = reactive({

View File

@ -4,6 +4,10 @@
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title" <ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
:bgColor="data.navbar.bgColor" :isBack="true" /> :bgColor="data.navbar.bgColor" :isBack="true" />
<view style="display: flex;align-items: center;background: #fff;border-radius: 10px;margin: 10px;padding: 2px 5px;">
<image src="/static/image/other/notice.png" style="width: 16px;height: 16px;margin-right: 10rpx;"></image>
此功能不具备真实性仅供娱乐
</view>
<image :src="data.code" mode="widthFix" style="width: 100vw;" @click="previewImage"></image> <image :src="data.code" mode="widthFix" style="width: 100vw;" @click="previewImage"></image>
<view class="button-container"> <view class="button-container">
<button class="btn-save-image" @click="saveImage">保存图片</button> <button class="btn-save-image" @click="saveImage">保存图片</button>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<qf-image-cropper :src="data.src" :width="196" :height="230" :radius="0" @crop="handleCrop" <qf-image-cropper :src="data.src" :width="data.width" :height="data.height" :radius="0" @crop="handleCrop"
:reverseRotatable="true"></qf-image-cropper> :reverseRotatable="true"></qf-image-cropper>
</view> </view>
</template> </template>
@ -25,42 +25,60 @@
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
const data = reactive({ const data = reactive({
src: "" src: "",
width:196,
height:230,
isCard:true
}) })
onLoad((option) => { onLoad((option) => {
console.log(option) console.log(option)
data.src = option.src data.src = option.src
if(option.width){
data.width=option.width*2
data.isCard=false
}
if(option.height){
data.height=option.height*2
data.isCard=false
}
}) })
function handleCrop(e) { function handleCrop(e) {
uni.showLoading({ if(data.isCard){
title:"抠图中" uni.showLoading({
}) title:"抠图中"
convertLocalImageToFile(e.tempFilePath).then(file => {
proxy.$imageUpload(file.split(',', 2)[1]).then(resimage => {
uni.hideLoading()
// editForm.value.photo = decodeURI(resimage.data);
uni.$emit("editFormPhoto", decodeURI(resimage.data))
uni.navigateBack()
}).catch(err => {
uni.hideLoading()
console.log(err.data.message)
uni.showToast({
icon: "none",
title: "图片不是人像或者过大"
})
}) })
convertLocalImageToFile(e.tempFilePath).then(file => {
proxy.$imageUpload(file.split(',', 2)[1]).then(resimage => {
uni.hideLoading()
// editForm.value.photo = decodeURI(resimage.data);
uni.$emit("editFormPhoto", decodeURI(resimage.data))
uni.navigateBack()
}).catch(err => {
uni.hideLoading()
console.log(err.data.message)
uni.showToast({
icon: "none",
title: "图片不是人像或者过大"
})
})
}).catch(err => {
uni.hideLoading()
})
}else{
uni.saveFile({
tempFilePath: e.tempFilePath,
success: function(res) {
console.log(res)
uni.$emit("editFormPhoto", decodeURI(res.savedFilePath))
uni.navigateBack()
// res.avatar = res.savedFilePath
}
});
}
}).catch(err => {
uni.hideLoading()
})
// uni.saveFile({
// tempFilePath: e.tempFilePath,
// success: function(res) {
// console.log(res)
// // res.avatar = res.savedFilePath
// }
// });
} }
/** /**
* 将本地图片路径通过 Canvas 转换为 File 对象 * 将本地图片路径通过 Canvas 转换为 File 对象

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -222,13 +222,13 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
res: res res: res
} }
}) })
uni.showToast({
icon: 'none',
title: res.data.message
})
} }
uni.hideLoading(); uni.hideLoading();
uni.showToast({
icon: 'none',
title: res.data.message
})
return reject(res); return reject(res);
} }