新增证书
|
|
@ -7,7 +7,8 @@
|
|||
<view class="box">
|
||||
<view class="info" v-if="!isExchange">
|
||||
<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 class="btn" :class="{'noValue':code==''}" @click="getExchange">
|
||||
兑换
|
||||
|
|
@ -37,36 +38,38 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { postJson } from "@/utils/requests.js"
|
||||
import {
|
||||
postJson
|
||||
} from "@/utils/requests.js"
|
||||
export default {
|
||||
name: "exchange",
|
||||
data() {
|
||||
return {
|
||||
code:"",
|
||||
isMaskExchange:false,
|
||||
isExchange:false,
|
||||
couponVip:{
|
||||
|
||||
code: "",
|
||||
isMaskExchange: false,
|
||||
isExchange: false,
|
||||
couponVip: {
|
||||
|
||||
},
|
||||
styles:{
|
||||
styles: {
|
||||
backgroundColor: '#FFFCEC',
|
||||
padding:'10px ',
|
||||
'border-radius':'10px'
|
||||
padding: '10px ',
|
||||
'border-radius': '10px'
|
||||
}
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
open(){
|
||||
this.isMaskExchange=true
|
||||
this.isExchange=false
|
||||
this.code=''
|
||||
methods: {
|
||||
open() {
|
||||
this.isMaskExchange = true
|
||||
this.isExchange = false
|
||||
this.code = ''
|
||||
},
|
||||
close(){
|
||||
this.isMaskExchange=false
|
||||
this.code=''
|
||||
close() {
|
||||
this.isMaskExchange = false
|
||||
this.code = ''
|
||||
},
|
||||
async getExchange(){
|
||||
if(this.code==''){
|
||||
async getExchange() {
|
||||
if (this.code == '') {
|
||||
return
|
||||
}
|
||||
let couponVip = await this.$requestPromise({
|
||||
|
|
@ -77,30 +80,30 @@
|
|||
}
|
||||
})
|
||||
console.log(couponVip)
|
||||
if(couponVip.code!=0){
|
||||
if (couponVip.code != 0) {
|
||||
uni.showToast({
|
||||
icon:"none",
|
||||
title:"兑换码有误"
|
||||
icon: "none",
|
||||
title: "兑换码有误"
|
||||
})
|
||||
return
|
||||
}
|
||||
this.isExchange=true
|
||||
this.couponVip=couponVip.data
|
||||
this.isExchange = true
|
||||
this.couponVip = couponVip.data
|
||||
},
|
||||
async submit(){
|
||||
async submit() {
|
||||
let exchangeRes = await postJson('q', 'api/activity/exchange', {
|
||||
code: this.code
|
||||
})
|
||||
if(exchangeRes.code!=0){
|
||||
// uni.showToast({
|
||||
// icon:"none",
|
||||
// title:exchangeRes.message
|
||||
// })
|
||||
return
|
||||
}else{
|
||||
if (exchangeRes.code != 0) {
|
||||
uni.showToast({
|
||||
icon:"none",
|
||||
title:"兑换成功"
|
||||
icon: "none",
|
||||
title: "券已使用过了"
|
||||
})
|
||||
return
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: "兑换成功"
|
||||
})
|
||||
//获取app用户信息
|
||||
let user = await proxy.$requestPromise({
|
||||
|
|
@ -112,8 +115,8 @@
|
|||
data.appUser = user.data
|
||||
console.log("app用户信息", data.appUser);
|
||||
}
|
||||
this.isMaskExchange=false
|
||||
this.isExchange=false
|
||||
this.isMaskExchange = false
|
||||
this.isExchange = false
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
|
|
@ -157,13 +160,15 @@
|
|||
padding: 18px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.title{
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.time{
|
||||
|
||||
.time {
|
||||
font-size: 16px;
|
||||
color: #AAAAAA;
|
||||
text-align: center;
|
||||
|
|
@ -180,10 +185,12 @@
|
|||
border-radius: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.btn2{
|
||||
|
||||
.btn2 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.noValue{
|
||||
|
||||
.noValue {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
|
@ -207,6 +214,7 @@
|
|||
z-index: 1;
|
||||
width: 54px;
|
||||
height: 26px;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
|||
121
manifest.json
|
|
@ -1,37 +1,46 @@
|
|||
{
|
||||
"name": "alipay-emulator",
|
||||
"appid": "__UNI__D535736",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": 100,
|
||||
"transformPx": false,
|
||||
"name" : "alipay-emulator",
|
||||
"appid" : "__UNI__D535736",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 100,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"darkmode": false,
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": false,
|
||||
"delay": 0
|
||||
"app-harmony" : {
|
||||
"distribute" : {
|
||||
"splashScreens" : {
|
||||
"startWindowIcon" : "resource/icon.png", // 启动页图标路径
|
||||
"startWindowBackground" : "#123456" // 启动页背景颜色
|
||||
}
|
||||
}
|
||||
},
|
||||
"app-plus" : {
|
||||
"darkmode" : false,
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : false,
|
||||
"delay" : 0
|
||||
},
|
||||
"optimization": {
|
||||
"subPackages": true
|
||||
"optimization" : {
|
||||
"subPackages" : true
|
||||
},
|
||||
"runmode": "liberate", // 开启分包优化后,必须配置资源释放模式
|
||||
"runmode" : "liberate", // 开启分包优化后,必须配置资源释放模式
|
||||
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Camera": {},
|
||||
"Payment": {},
|
||||
"LivePusher": {}
|
||||
"modules" : {
|
||||
"Camera" : {},
|
||||
"Payment" : {},
|
||||
"LivePusher" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
|
|
@ -50,52 +59,46 @@
|
|||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"__platform__": [
|
||||
"ios",
|
||||
"android"
|
||||
],
|
||||
"appid": "123456",
|
||||
"UniversalLinks": "https://hhhhh.com/apple-app-site-association/"
|
||||
"sdkConfigs" : {
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "123456",
|
||||
"UniversalLinks" : "https://hhhhh.com/apple-app-site-association/"
|
||||
},
|
||||
"alipay": {
|
||||
"__platform__": [
|
||||
"ios",
|
||||
"android"
|
||||
]
|
||||
"alipay" : {
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nvueLaunchMode": ""
|
||||
"nvueLaunchMode" : ""
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents": true
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion": "3"
|
||||
}
|
||||
"vueVersion" : "3"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,6 +273,14 @@
|
|||
"navigationBarTitleText": "从夯倒拉排名",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "certificate/graduate",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "证书",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ onLoad(async () => {
|
|||
})
|
||||
|
||||
onShow(() => {
|
||||
// #ifdef APP-PLUS
|
||||
// #ifdef APP-PLUS&&!APP-HARMONY
|
||||
util.setAndroidSystemBarColor('#F0F3F8')
|
||||
setTimeout(() => {
|
||||
plus.navigator.setStatusBarStyle("light");
|
||||
|
|
|
|||
|
|
@ -285,6 +285,11 @@ const otherList = [{
|
|||
name: "购物",
|
||||
path: "/pages/shopping/index"
|
||||
},
|
||||
{
|
||||
icon: "/static/image/other/certificate/certificate.png",
|
||||
name: "证书",
|
||||
path: "/pages/other/certificate/graduate"
|
||||
},
|
||||
]
|
||||
|
||||
const data = reactive({
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
<ZdyNavbar @right-click="edit" isRightButton rightButtonText="编辑" :title="data.navbar.title"
|
||||
: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>
|
||||
<view class="button-container">
|
||||
<button class="btn-save-image" @click="saveImage">保存图片</button>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -25,42 +25,60 @@
|
|||
proxy
|
||||
} = getCurrentInstance();
|
||||
const data = reactive({
|
||||
src: ""
|
||||
src: "",
|
||||
width:196,
|
||||
height:230,
|
||||
isCard:true
|
||||
})
|
||||
onLoad((option) => {
|
||||
console.log(option)
|
||||
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) {
|
||||
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: "图片不是人像或者过大"
|
||||
})
|
||||
if(data.isCard){
|
||||
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: "图片不是人像或者过大"
|
||||
})
|
||||
})
|
||||
|
||||
}).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 对象
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 225 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -222,13 +222,13 @@ const request = (method = 'GET', serverUrl, domainUrl, params, dataType = "json"
|
|||
res: res
|
||||
}
|
||||
})
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
})
|
||||
}
|
||||
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
})
|
||||
return reject(res);
|
||||
}
|
||||
|
||||
|
|
|
|||