@ -1,10 +1,6 @@ |
||||
import request from '@/apis/request.js' |
||||
const { get, post } = request |
||||
|
||||
export const curriculumList = (data) => { |
||||
return post('nakadai/nakadai/curriculum/curriculumList', data) |
||||
} |
||||
|
||||
export const AppletsDataProductList = (data) => { |
||||
return post('nakadai/nakadai/dataProduct/AppletsDataProductList', data) |
||||
} |
@ -0,0 +1,6 @@ |
||||
import request from '@/apis/request.js' |
||||
const { get, post } = request |
||||
|
||||
export const login = (data) => { |
||||
return get('users/users/user/weChatAppletCallback', data) |
||||
} |
@ -0,0 +1,35 @@ |
||||
var crypto = require('crypto') |
||||
|
||||
function WXBizDataCrypt(appId, sessionKey) { |
||||
this.appId = appId |
||||
this.sessionKey = sessionKey |
||||
} |
||||
|
||||
WXBizDataCrypt.prototype.decryptData = function (encryptedData, iv) { |
||||
// base64 decode
|
||||
var sessionKey = new Buffer(this.sessionKey, 'base64') |
||||
encryptedData = new Buffer(encryptedData, 'base64') |
||||
iv = new Buffer(iv, 'base64') |
||||
|
||||
try { |
||||
// 解密
|
||||
var decipher = crypto.createDecipheriv('aes-128-cbc', sessionKey, iv) |
||||
// 设置自动 padding 为 true,删除填充补位
|
||||
decipher.setAutoPadding(true) |
||||
var decoded = decipher.update(encryptedData, 'binary', 'utf8') |
||||
decoded += decipher.final('utf8') |
||||
|
||||
decoded = JSON.parse(decoded) |
||||
|
||||
} catch (err) { |
||||
throw new Error('Illegal Buffer') |
||||
} |
||||
|
||||
if (decoded.watermark.appid !== this.appId) { |
||||
throw new Error('Illegal Buffer') |
||||
} |
||||
|
||||
return decoded |
||||
} |
||||
|
||||
module.exports = WXBizDataCrypt |
@ -1,62 +0,0 @@ |
||||
<template> |
||||
<view class="container"> |
||||
<uni-section title="基本信息" type="line"> |
||||
<view class="form"> |
||||
<uni-forms ref="baseForm" :modelValue="form"> |
||||
<uni-forms-item label="姓名" name="contact" required> |
||||
<uni-easyinput v-model="form.contact" placeholder="请输入姓名" /> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="手机号" name="contact" required> |
||||
<uni-easyinput v-model="form.contact" placeholder="请输入手机号" /> |
||||
</uni-forms-item> |
||||
</uni-forms> |
||||
<button type="primary" @click="submit('valiForm')">提交</button> |
||||
</view> |
||||
</uni-section> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
form: { |
||||
name: '', |
||||
provience: '', |
||||
city: '', |
||||
industryId: '', |
||||
age: '', |
||||
introduction: '', |
||||
sex: 2, |
||||
hobby: [5], |
||||
datetimesingle: 1627529992399 |
||||
} |
||||
} |
||||
}, |
||||
onLoad() { |
||||
console.log(getApp()) |
||||
}, |
||||
methods: { |
||||
onchange(e) { |
||||
console.log('---------onchange:', e); |
||||
}, |
||||
submit(ref) { |
||||
this.$refs[ref].validate().then(res => { |
||||
console.log('success', res); |
||||
uni.showToast({ |
||||
title: `校验通过` |
||||
}) |
||||
}).catch(err => { |
||||
console.log('err', err); |
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped> |
||||
.form { |
||||
padding: 15px; |
||||
background-color: #fff; |
||||
} |
||||
</style> |
@ -0,0 +1,45 @@ |
||||
<template> |
||||
<view class="page"> |
||||
<web-view :webview-styles="webviewStyles" :src="src"></web-view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
src: '', |
||||
webviewStyles: { |
||||
progress: { |
||||
color: '#FF3333' |
||||
} |
||||
}, |
||||
} |
||||
}, |
||||
onShow() { |
||||
const pages = getCurrentPages() |
||||
const { options } = |
||||
this.src = `http://view.xdocin.com/xdoc?_xdoc=${pages[pages.length - 1].options.id == 1 ? 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531155187057057792.docx' : 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531156166884220928.docx'}` |
||||
}, |
||||
methods: { |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.page { |
||||
padding: 60rpx 40rpx; |
||||
background-color: #fff; |
||||
} |
||||
.title { |
||||
margin-bottom: 30rpx; |
||||
font-size: 38rpx; |
||||
text-align: center; |
||||
color: #333; |
||||
} |
||||
.content { |
||||
white-space: pre-wrap; |
||||
font-size: 28rpx; |
||||
} |
||||
</style> |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 975 B |
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 335 B |