diff --git a/apis/index.js b/apis/index.js index ec79c85..dd9661c 100644 --- a/apis/index.js +++ b/apis/index.js @@ -10,6 +10,7 @@ import store from '@/store' // 基础配置 const config = { apiUrl : 'http://api.ahxh.shangkelian.cn/api/', + apiUrls : 'http://api.ahxh.shangkelian.cn', timeout : 60000 } @@ -154,5 +155,6 @@ const loginHint = () => { export { request, - uploading + uploading, + config } diff --git a/apis/interfaces/news.js b/apis/interfaces/news.js new file mode 100644 index 0000000..644d82f --- /dev/null +++ b/apis/interfaces/news.js @@ -0,0 +1,53 @@ +/** + * Web-zdx + * moduleName: 通知消息列表 + */ + +import {request} from '../index.js' + +// 消息列表 +const notificationsType = () => { + return request({ + url: 'notifications', + method: 'GET' + }) +} +// 根据type 获取具体消息列表 +const notificationsList = (type,data) => { + return request({ + url: 'notifications/'+type+'/list', + method: 'GET', + data:data + }) +} +// 根据type 全部已读 +const notificationsReaded = (type) => { + return request({ + url: 'notifications/'+type, + method: 'PUT' + }) +} +// 根据type 全部已读 +const notificationsDelete= () => { + return request({ + url: 'notifications', + method: 'DELETE' + }) +} +// 根据消息id获取消息详情 +const notificationsDetail= (id) => { + return request({ + url: 'notifications/'+id, + method: 'get' + }) +} + + + +export { + notificationsType, + notificationsList, + notificationsDetail, + notificationsReaded, + notificationsDelete +} diff --git a/apis/interfaces/setting.js b/apis/interfaces/setting.js index 956163f..6f59950 100644 --- a/apis/interfaces/setting.js +++ b/apis/interfaces/setting.js @@ -71,6 +71,13 @@ const aboutUs = () => { url: 'articles/about' }) } +// 获取企业认证状态 -1.未认证,0.审核中,1.审核通过,2.驳回 +const companyStatus = () => { + return request({ + url: 'companies/applies/query' + }) +} + export { login, @@ -80,5 +87,6 @@ export { agreementLogin, resetUserInfo, getUserSettingInfo, - aboutUs + aboutUs, + companyStatus } diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js new file mode 100644 index 0000000..37fe4d5 --- /dev/null +++ b/apis/interfaces/user.js @@ -0,0 +1,60 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * moduleName: 区块链 + */ + +import { request } from '../index' + +// 节点中心-用户信息 +const userIndex = () => { + return request({ + url: 'user/web' + }) +} + +// 节点中心-公告 +const userNotice = () => { + return request({ + url: 'articles/notice' + }) +} + +// 专属客服 +const userCustomer = () => { + return request({ + url: 'user/services' + }) +} + +// 帮助中心 +const userHelp = () => { + return request({ + url: 'articles/helps' + }) +} + +// 服务条款 +const userClause = () => { + return request({ + url: 'articles/service' + }) +} + +// 邀请好友 +const userInvite = () => { + return request({ + url: 'articles/invite' + }) +} + +export { + userIndex, + userNotice, + userCustomer, + userHelp, + userClause, + userInvite +} diff --git a/apis/interfaces/wallet.js b/apis/interfaces/wallet.js new file mode 100644 index 0000000..b383342 --- /dev/null +++ b/apis/interfaces/wallet.js @@ -0,0 +1,159 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * moduleName: 钱包 + */ + +import {request} from '../index.js' + +// 导出助记词 +const seed = () => { + return request({ + url: 'chain/safe/seed' + }) +} + +const hash = (data) => { + return request({ + url: 'chain/wallet/hash', + method: 'POST', + data: data + }) +} + +// 收款码 +const code = () => { + return request({ + url: 'chain/account/code' + }) +} + +// 原石余额 +const sum = () => { + return request({ + url: 'chain/account/balance' + }) +} + +// 原石价格 +const price = () => { + return request({ + url: 'nodes/price' + }) +} + +// 账户记录 +const logs = (data) => { + return request({ + url: 'chain/account/logs', + data: data + }) +} + +// 设置安全密码 +const security = (data) => { + return request({ + url: 'chain/safe/security', + method: 'POST', + data + }) +} + +// 转账 +const transfer = (data) => { + return request({ + url: 'chain/account/transfer', + method: 'POST', + data + }) +} + +// 钱包私钥 +const privatekey = (code) => { + return request({ + url : "chain/safe/private_key", + data: { + code + } + }) +} + +// 获取可提现信息 +const withdraw = () => { + return request({ + url : "withdraw" + }) +} + +// 提现记录 +const withdrawLogs = (data) => { + return request({ + url : "withdraw/logs", + data:data + }) +} + +// 提现 +const withdrawDo = (data) => { + return request({ + url : "withdraw", + method: 'POST', + data:data + }) +} + +// 验证支付密码是否正确 +const securityCheck = (password) => { + return request({ + url : "chain/safe/security/check", + method: 'POST', + data:{ + code : password, + } + }) +} + +// 修改密码 +const securityReset = (data) => { + return request({ + url : "chain/safe/security", + method: 'PUT', + data:data + }) +} + +// 提现服务条款 +const cmsWithdraw = () => { + return request({ + url : "cms/withdraw" + }) +} + +// 私钥规则 +const keyrules = () => { + return request({ + url: 'cms/keyrules' + }) +} + +export { + seed, + hash, + code, + sum, + price, + logs, + security, + transfer, + privatekey, + withdraw, + withdrawLogs, + withdrawDo, + securityCheck, + securityReset, + cmsWithdraw, + keyrules +} + diff --git a/components/no-list-components/index.vue b/components/no-list-components/index.vue new file mode 100644 index 0000000..85d597f --- /dev/null +++ b/components/no-list-components/index.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/components/numberJpan/numberJpan.vue b/components/numberJpan/numberJpan.vue new file mode 100644 index 0000000..c8017b1 --- /dev/null +++ b/components/numberJpan/numberJpan.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/components/property/record.vue b/components/property/record.vue new file mode 100644 index 0000000..a5a5ccd --- /dev/null +++ b/components/property/record.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/main.js b/main.js index 11f608a..6c51a8d 100644 --- a/main.js +++ b/main.js @@ -4,7 +4,8 @@ import App from './App' import Vue from 'vue' import { router, RouterMount } from './router' import store from './store' -import uView from 'uview-ui' +import uView from 'uview-ui' +import noList from './components/no-list-components/index.vue' Vue.use(router) Vue.use(uView); Vue.config.productionTip = false @@ -12,7 +13,8 @@ Vue.prototype.$store = store App.mpType = 'app' const app = new Vue({ ...App -}) +}) +Vue.component('no-list',noList) // #ifdef H5 RouterMount(app,router,'#app') // #endif diff --git a/pages.json b/pages.json index 2b876d1..4c6acb9 100644 --- a/pages.json +++ b/pages.json @@ -20,6 +20,27 @@ "style": { "navigationBarTitleText": "节点中心" } + }, { + "path": "pages/user/code", + "name": "userCode", + "auth": true, + "style": { + "navigationBarTitleText": "邀请好友" + } + }, { + "path": "pages/user/help", + "name": "userHelp", + "auth": true, + "style": { + "navigationBarTitleText": "帮助中心" + } + }, { + "path": "pages/user/clause", + "name": "userClause", + "auth": true, + "style": { + "navigationBarTitleText": "服务条款" + } }, { "path": "pages/instrument/basics", "name": "instrumentBasics", @@ -108,7 +129,62 @@ "style": { "navigationBarTitleText": "企业认证" } - }], + }, { + "path": "pages/news/index", + "name": "news", + "auth": true, + "style": { + "navigationBarTitleText": "消息中心" + } + }, { + "path": "pages/news/detail", + "name": "newsDetail", + "auth": true, + "style": { + "navigationBarTitleText": "消息列表" + } + }, { + "path": "pages/wallet/property", + "name": "walletProperty", + "style": { + "navigationBarTitleText": "能量钱包", + "enablePullDownRefresh": false, + "navigationBarTextStyle": "white", + "app-plus": { + "titleNView": { + "backgroundColor": "#b11eff", + "type": "transparent", + "buttons": [{ + "float": "right", + "fontSize": "14", + "text": "管理", + "background": "rgba(255,255,255,0)" + }], + "backButton": { + "background": "rgba(255,255,255,0)" + } + } + } + } + }, { + "path": "pages/wallet/extract", + "style": { + "navigationBarTitleText": "提现能量", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#774ffd", + "navigationBarTextStyle": "white" + }, + "name": "Extract" + }, { + "path": "pages/wallet/resetPassword", + "style": { + "navigationBarTitleText": "重置密码", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#774ffd", + "navigationBarTextStyle": "white" + }, + "name": "ResetPassword" + } ], "globalStyle": { "navigationStyle": "custom", "backgroundColor": "#F5F5F5" diff --git a/pages/index/index.vue b/pages/index/index.vue index deed1c9..3521461 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -42,7 +42,7 @@ data() { return { crystalArr : [], - categoryArr : [] + categoryArr : [], }; } } diff --git a/pages/news/detail.vue b/pages/news/detail.vue new file mode 100644 index 0000000..8ffa1ac --- /dev/null +++ b/pages/news/detail.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/pages/news/index.vue b/pages/news/index.vue new file mode 100644 index 0000000..452e1fb --- /dev/null +++ b/pages/news/index.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue index 82949ad..3bfdf4d 100644 --- a/pages/setting/setting.vue +++ b/pages/setting/setting.vue @@ -33,20 +33,28 @@ - + 个人认证 - + + + + - + 企业认证 - + + + + @@ -80,7 +88,8 @@ import { wechatbind, resetUserInfo, - getUserSettingInfo + getUserSettingInfo, + companyStatus } from '@/apis/interfaces/setting' import { uploads @@ -96,8 +105,8 @@ showPath: '' }, is_bind: true, // 微信绑定 - is_certification: true, // 个人认证 - is_company: true, // 企业认证 + certification: {}, // 个人认证 + companyCode: {}, // 企业认证 -1.未认证,0.审核中,1.审核通过,2.驳回 } }, onShow() { @@ -107,38 +116,59 @@ } }) this.getUserInfo() + }, onPullDownRefresh() { this.getUserInfo() }, methods: { // 是否个人认证 - certification(is_certfication) { - console.log(is_certfication) - if (is_certfication) { + certificationClick(certfication) { + console.log(certfication) + if (certfication.is_true) { // 跳转到个人认证信息完成展示页面 - this.$router.push({ - name: '' + // this.$refs.uToast.show({ + // title: '认证通过!', + // type: 'primary', + // duration: 3000 + // }) + uni.showModal({ + title: '认证信息', + content: '真实姓名:<' + certfication.message.name + '>,身份证号:' + certfication.message.idcard, + showCancel:false }) } else { // 跳转到个人认证信息页面 - this.$router.push({ - name: '' + uni.navigateTo({ + url: '/pages/certification/personal' }) } }, - // 是否展示企业信息 - company(is_company) { - console.log(is_company) - if (is_company) { - // 跳转到企业认证完成信息展示页面 - this.$router.push({ - name: '' - }) - } else { + // 是否展示企业信息 企业认证 -1.未认证,0.审核中,1.审核通过,2.驳回 + company(code) { + console.log(code, '是否企业认证') + if (code === -1) { // 跳转到企业认证页面 - this.$router.push({ - name: '' + uni.navigateTo({ + url: '/pages/company/approve' + }) + } else if (code === 2) { + // 跳转到企业认证页面 + uni.navigateTo({ + url: '/pages/company/approve?form_type=put' + }) + } else if (code === 0) { + this.$refs.uToast.show({ + title: '审核中', + type: 'primary', + duration: 3000 + }) + } else if (code === 1) { + // 跳转到企业认证页面 + this.$refs.uToast.show({ + title: '认证通过!', + type: 'primary', + duration: 3000 }) } }, @@ -148,8 +178,7 @@ this.avatar.showPath = res.avatar this.nickname = res.nickname this.is_bind = res.is_bind - this.is_certification = res.is_certification - this.is_company = res.is_company + this.certification = res.certification uni.stopPullDownRefresh() }).catch(err => { this.$refs.uToast.show({ @@ -158,6 +187,17 @@ duration: 3000 }) }) + // -1.未认证,0.审核中,1.审核通过,2.驳回 + companyStatus().then(res => { + console.log(res) + this.companyCode = res + }).catch(err => { + this.$refs.uToast.show({ + title: err.message, + type: 'primary', + duration: 3000 + }) + }) }, // 点击绑定用户得授权信息,且绑定带修改 getUser() { @@ -385,8 +425,9 @@ flex: 1; input { - padding-right: 30rpx; + padding-right: 20rpx; width: 100%; + font-size: 30rpx; } } diff --git a/pages/user/clause.vue b/pages/user/clause.vue new file mode 100644 index 0000000..4b787d1 --- /dev/null +++ b/pages/user/clause.vue @@ -0,0 +1,46 @@ + + + + + \ No newline at end of file diff --git a/pages/user/code.vue b/pages/user/code.vue new file mode 100644 index 0000000..db51af6 --- /dev/null +++ b/pages/user/code.vue @@ -0,0 +1,281 @@ + + + + + + + diff --git a/pages/user/help.vue b/pages/user/help.vue new file mode 100644 index 0000000..4006a29 --- /dev/null +++ b/pages/user/help.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index 36b7ce3..c996934 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -1,30 +1,438 @@ diff --git a/pages/wallet/add.vue b/pages/wallet/add.vue new file mode 100644 index 0000000..d0522c7 --- /dev/null +++ b/pages/wallet/add.vue @@ -0,0 +1,65 @@ + + + + + + + diff --git a/pages/wallet/cmsWithDraw.vue b/pages/wallet/cmsWithDraw.vue new file mode 100644 index 0000000..5476ab1 --- /dev/null +++ b/pages/wallet/cmsWithDraw.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/pages/wallet/code.vue b/pages/wallet/code.vue new file mode 100644 index 0000000..3adee0c --- /dev/null +++ b/pages/wallet/code.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/pages/wallet/create.vue b/pages/wallet/create.vue new file mode 100644 index 0000000..2d7a1ad --- /dev/null +++ b/pages/wallet/create.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/pages/wallet/extract.vue b/pages/wallet/extract.vue new file mode 100644 index 0000000..1823bf8 --- /dev/null +++ b/pages/wallet/extract.vue @@ -0,0 +1,389 @@ + + + + + diff --git a/pages/wallet/guide.vue b/pages/wallet/guide.vue new file mode 100644 index 0000000..04170d9 --- /dev/null +++ b/pages/wallet/guide.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/pages/wallet/index.vue b/pages/wallet/index.vue new file mode 100644 index 0000000..dee4676 --- /dev/null +++ b/pages/wallet/index.vue @@ -0,0 +1,144 @@ + + + + + + + diff --git a/pages/wallet/mnemonic.vue b/pages/wallet/mnemonic.vue new file mode 100644 index 0000000..41e18a9 --- /dev/null +++ b/pages/wallet/mnemonic.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/pages/wallet/privatekey.vue b/pages/wallet/privatekey.vue new file mode 100644 index 0000000..0cd040c --- /dev/null +++ b/pages/wallet/privatekey.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/pages/wallet/property.vue b/pages/wallet/property.vue new file mode 100644 index 0000000..5583158 --- /dev/null +++ b/pages/wallet/property.vue @@ -0,0 +1,343 @@ + + + + + diff --git a/pages/wallet/resetPassword.vue b/pages/wallet/resetPassword.vue new file mode 100644 index 0000000..c054f91 --- /dev/null +++ b/pages/wallet/resetPassword.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/pages/wallet/results.vue b/pages/wallet/results.vue new file mode 100644 index 0000000..2e2718c --- /dev/null +++ b/pages/wallet/results.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/wallet/transfer.vue b/pages/wallet/transfer.vue new file mode 100644 index 0000000..e66843c --- /dev/null +++ b/pages/wallet/transfer.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/pages/wallet/validation.vue b/pages/wallet/validation.vue new file mode 100644 index 0000000..e28cb42 --- /dev/null +++ b/pages/wallet/validation.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/scss/globa.scss b/scss/globa.scss index 6d482fd..2a0eab5 100644 --- a/scss/globa.scss +++ b/scss/globa.scss @@ -26,6 +26,8 @@ $title-size-sm: 26rpx; // 模块圆角 $radius: 20rpx; $radius-sm: 10rpx; +$radius-lg: 12rpx; +$radius-m: 10rpx; // 模块边距 $margin: 30rpx; diff --git a/static/icons/logs-null.png b/static/icons/logs-null.png new file mode 100644 index 0000000..eda2c10 Binary files /dev/null and b/static/icons/logs-null.png differ diff --git a/static/imgs/cart_empty.png b/static/imgs/cart_empty.png new file mode 100644 index 0000000..64d64c8 Binary files /dev/null and b/static/imgs/cart_empty.png differ diff --git a/static/imgs/news_1.png b/static/imgs/news_1.png new file mode 100644 index 0000000..4838c92 Binary files /dev/null and b/static/imgs/news_1.png differ diff --git a/static/imgs/news_2.png b/static/imgs/news_2.png new file mode 100644 index 0000000..dd19454 Binary files /dev/null and b/static/imgs/news_2.png differ diff --git a/static/imgs/news_2_1.png b/static/imgs/news_2_1.png new file mode 100644 index 0000000..1d12137 Binary files /dev/null and b/static/imgs/news_2_1.png differ diff --git a/static/imgs/news_3.png b/static/imgs/news_3.png new file mode 100644 index 0000000..87ab761 Binary files /dev/null and b/static/imgs/news_3.png differ diff --git a/static/imgs/news_3_1.png b/static/imgs/news_3_1.png new file mode 100644 index 0000000..a4065ce Binary files /dev/null and b/static/imgs/news_3_1.png differ diff --git a/static/user/order-cancelPay.png b/static/user/order-cancelPay.png new file mode 100644 index 0000000..18372e3 Binary files /dev/null and b/static/user/order-cancelPay.png differ diff --git a/static/user/user-customer-close.png b/static/user/user-customer-close.png new file mode 100644 index 0000000..3167284 Binary files /dev/null and b/static/user/user-customer-close.png differ diff --git a/static/user/user-portrait.png b/static/user/user-portrait.png new file mode 100644 index 0000000..c485c35 Binary files /dev/null and b/static/user/user-portrait.png differ diff --git a/static/user/user-top-00.png b/static/user/user-top-00.png new file mode 100644 index 0000000..4cecca3 Binary files /dev/null and b/static/user/user-top-00.png differ diff --git a/static/user/user-top-01.png b/static/user/user-top-01.png new file mode 100644 index 0000000..5691fee Binary files /dev/null and b/static/user/user-top-01.png differ diff --git a/static/user/userAssets_tips.png b/static/user/userAssets_tips.png new file mode 100644 index 0000000..ba8c481 Binary files /dev/null and b/static/user/userAssets_tips.png differ diff --git a/static/user/userNew_icon.png b/static/user/userNew_icon.png new file mode 100644 index 0000000..efbb8dd Binary files /dev/null and b/static/user/userNew_icon.png differ diff --git a/static/user/userRightst_icon_00.png b/static/user/userRightst_icon_00.png new file mode 100644 index 0000000..c302991 Binary files /dev/null and b/static/user/userRightst_icon_00.png differ diff --git a/static/user/userRightst_icon_01.png b/static/user/userRightst_icon_01.png new file mode 100644 index 0000000..4963f44 Binary files /dev/null and b/static/user/userRightst_icon_01.png differ diff --git a/static/user/userRightst_icon_02.png b/static/user/userRightst_icon_02.png new file mode 100644 index 0000000..78ab392 Binary files /dev/null and b/static/user/userRightst_icon_02.png differ diff --git a/static/user/userRightst_icon_03.png b/static/user/userRightst_icon_03.png new file mode 100644 index 0000000..4737641 Binary files /dev/null and b/static/user/userRightst_icon_03.png differ diff --git a/static/user/userServe-00.png b/static/user/userServe-00.png new file mode 100644 index 0000000..91fab5f Binary files /dev/null and b/static/user/userServe-00.png differ diff --git a/static/user/userServe-01.png b/static/user/userServe-01.png new file mode 100644 index 0000000..dc0855b Binary files /dev/null and b/static/user/userServe-01.png differ diff --git a/static/user/userServe-02.png b/static/user/userServe-02.png new file mode 100644 index 0000000..a104a9c Binary files /dev/null and b/static/user/userServe-02.png differ diff --git a/static/user/userServe-03.png b/static/user/userServe-03.png new file mode 100644 index 0000000..9fa2179 Binary files /dev/null and b/static/user/userServe-03.png differ diff --git a/static/user/userTool-00.png b/static/user/userTool-00.png new file mode 100644 index 0000000..4633801 Binary files /dev/null and b/static/user/userTool-00.png differ diff --git a/static/user/userTool-01.png b/static/user/userTool-01.png new file mode 100644 index 0000000..bca7018 Binary files /dev/null and b/static/user/userTool-01.png differ diff --git a/static/user/userTool-02.png b/static/user/userTool-02.png new file mode 100644 index 0000000..7d192df Binary files /dev/null and b/static/user/userTool-02.png differ diff --git a/static/user/userTool-03.png b/static/user/userTool-03.png new file mode 100644 index 0000000..96dd3c9 Binary files /dev/null and b/static/user/userTool-03.png differ diff --git a/static/user/userTool-04.png b/static/user/userTool-04.png new file mode 100644 index 0000000..a9839db Binary files /dev/null and b/static/user/userTool-04.png differ diff --git a/static/user/userTool-05.png b/static/user/userTool-05.png new file mode 100644 index 0000000..f7214c3 Binary files /dev/null and b/static/user/userTool-05.png differ diff --git a/static/user/userVip_arrow.png b/static/user/userVip_arrow.png new file mode 100644 index 0000000..2cc9001 Binary files /dev/null and b/static/user/userVip_arrow.png differ diff --git a/static/user/userVip_more_arrow.png b/static/user/userVip_more_arrow.png new file mode 100644 index 0000000..a6e0033 Binary files /dev/null and b/static/user/userVip_more_arrow.png differ