调整登录逻辑退出登录调整拦截器新增路由通配404也买呢

This commit is contained in:
唐明明
2021-09-28 17:14:21 +08:00
parent e9343f9085
commit 730187e1d2
45 changed files with 598 additions and 426 deletions

View File

@@ -9,8 +9,11 @@ import store from '@/store'
// 基础配置
const config = {
// apiUrl : 'https://oapi.lianshang.vip/api/',
// apiUrls : 'https://oapi.lianshang.vip/',
apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
apiUrls : 'http://api.ahxh.shangkelian.cn',
apiUrls : 'http://api.ahxh.shangkelian.cn/',
timeout : 60000
}
@@ -142,13 +145,11 @@ const loginHint = () => {
uni.showModal({
title: '登录提示',
content: '您的登录信息已过期,请重新登录',
confirmColor: '#009B69',
confirmColor: '#8b64fd',
showCancel:false,
success: res=> {
loginHintState = false
if (res.confirm) uni.reLaunch({
url: '/pages/equity/index'
})
if (res.confirm) this.$Router.replace({name: 'Index'})
}
})
}

21
apis/interfaces/wx.js Normal file
View File

@@ -0,0 +1,21 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 微信相关
*/
import { request } from '../index'
const wxConfig = data => {
return request({
url : 'user/auth/get_jssdk',
data : data
})
}
export {
wxConfig
}

View File

@@ -74,10 +74,5 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2",
"h5" : {
"router" : {
"mode" : "history"
}
}
"vueVersion" : "2"
}

30
node_modules/jweixin-module/README.md generated vendored Normal file
View File

@@ -0,0 +1,30 @@
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/out/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)

1
node_modules/jweixin-module/lib/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

54
node_modules/jweixin-module/package.json generated vendored Normal file
View File

@@ -0,0 +1,54 @@
{
"_from": "jweixin-module",
"_id": "jweixin-module@1.6.0",
"_inBundle": false,
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd",
"_spec": "jweixin-module",
"_where": "/Users/WebTmm/Desktop/BlockChainH5",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
}

5
package-lock.json generated
View File

@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"uni-read-pages": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",

View File

@@ -13,6 +13,7 @@
"author": "web唐明明",
"license": "ISC",
"dependencies": {
"jweixin-module": "^1.6.0",
"uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4",

View File

@@ -1,338 +1,339 @@
{
"pages": [{
"path": "pages/index/index",
"name": "Index",
"aliasPath": "/",
"style": {
"navigationBarTitleText": "发现能量"
}
}, {
"path": "pages/found/index",
"name": "Found",
"aliasPath": "/found",
"auth": true,
"style": {
"navigationBarTitleText": "发现更多"
}
}, {
"path": "pages/user/index",
"name": "User",
"aliasPath": "/user",
"auth": true,
"style": {
"navigationBarTitleText": "节点中心"
}
}, {
"path": "pages/user/code",
"name": "userCode",
"aliasPath": "/user/code",
"auth": true,
"style": {
"navigationBarTitleText": "邀请好友"
}
}, {
"path": "pages/user/help",
"name": "userHelp",
"aliasPath": "/user/help",
"auth": true,
"style": {
"navigationBarTitleText": "帮助中心"
}
}, {
"path": "pages/user/partner",
"name": "userPartner",
"aliasPath": "/user/partner",
"auth": true,
"style": {
"navigationBarTitleText": "我的伙伴"
}
}, {
"path": "pages/user/clause",
"name": "userClause",
"aliasPath": "/user/clause",
"auth": true,
"style": {
"navigationBarTitleText": "服务条款"
}
}, {
"path": "pages/user/followOfficial",
"name": "Official",
"aliasPath": "/user/followOfficial",
"auth": true,
"style": {
"navigationBarTitleText": "关注公众号"
}
}, {
"path": "pages/vip/vip",
"name": "vipIndex",
"aliasPath": "/vip",
"style": {
"navigationBarTitleText": "开通节点"
}
}, {
"path": "pages/vip/agree",
"name": "vipAgree",
"aliasPath": "/vip/agree",
"style": {
"navigationBarTitleText": "用户协议"
}
}, {
"path": "pages/vip/examine",
"name": "Examine",
"aliasPath": "/vip/examine",
"style": {
"navigationBarTitleText": "提交成功"
}
}, {
"path": "pages/setting/setting",
"name": "setting",
"aliasPath": "/setting",
"auth": true,
"style": {
"navigationBarTitleText": "设置中心"
}
}, {
"path": "pages/goods/management",
"name": "goodsManagement",
"aliasPath": "/goods/management",
"style": {
"navigationBarTitleText": "商品权证管理"
}
}, {
"path": "pages/goods/addClassify",
"name": "goodsaddClassify",
"aliasPath": "/goods/add-classify",
"style": {
"navigationBarTitleText": "发布商品类目"
}
}, {
"path": "pages/goods/add",
"name": "goodsAdd",
"aliasPath": "/goods/add",
"style": {
"navigationBarTitleText": "商品权证创建"
}
}, {
"path": "pages/goods/goodsAuth",
"name": "goodsAddAuth",
"aliasPath": "/goods/goods-auth",
"style": {
"navigationBarTitleText": "商品权证认证"
}
}, {
"path": "pages/coupons/management",
"name": "couponsManagement",
"aliasPath": "/coupons/management",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/add",
"name": "couponsAdd",
"aliasPath": "/coupons/add",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/magDetails",
"name": "couponsDetails",
"aliasPath": "/coupons/mag-details",
"style": {
"navigationBarTitleText": "优惠券详情"
}
}, {
"path": "pages/coupons/selectGoods",
"name": "couponsSelectGoods",
"aliasPath": "/coupons/select-goods",
"style": {
"navigationBarTitleText": "关联产品"
}
}, {
"path": "pages/login/login",
"name": "Login",
"aliasPath": "/login",
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/login/guide",
"name": "loginGuide",
"aliasPath": "/login/guide",
"style": {
"navigationBarTitleText": "引导页"
}
}, {
"path": "pages/login/agreement",
"name": "agreement",
"aliasPath": "/login/agreement",
"style": {
"navigationBarTitleText": "用户隐藏协议"
}
}, {
"path": "pages/certification/personal",
"name": "Personal",
"aliasPath": "/personal",
"auth": true,
"style": {
"navigationBarTitleText": "个人认证"
}
}, {
"path": "pages/setting/aboutUs",
"name": "aboutUs",
"aliasPath": "/setting/about-us",
"auth": true,
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/company/approve",
"name": "companyApprove",
"aliasPath": "/company/approve",
"auth": true,
"style": {
"navigationBarTitleText": "企业认证"
}
}, {
"path": "pages/news/index",
"name": "news",
"aliasPath": "/news/index",
"auth": true,
"style": {
"navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/news/detail",
"name": "newsDetail",
"aliasPath": "/news/detail",
"auth": true,
"style": {
"navigationBarTitleText": "消息列表"
}
}, {
"path": "pages/wallet/property",
"name": "walletProperty",
"aliasPath": "/wallet/property",
"style": {
"navigationBarTitleText": "能量钱包",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/wallet/extract",
"name": "Extract",
"aliasPath": "/wallet/extract",
"style": {
"navigationBarTitleText": "提现能量",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/verification/index",
"name": "verificationIndex",
"aliasPath": "/verification/index",
"auth": true,
"style": {
"navigationBarTitleText": "扫码核销"
}
},{
"path": "pages/verification/history",
"name": "verificationHistory",
"aliasPath": "/verification/history",
"auth": true,
"style": {
"navigationBarTitleText": "核销记录"
}
},{
"path": "pages/shop/lists",
"name": "shopLists",
"aliasPath": "/shop/lists",
"auth": true,
"style": {
"navigationBarTitleText": "部门/门店"
}
},{
"path": "pages/shop/create",
"name": "shopCreate",
"aliasPath": "/shop/create",
"auth": true,
"style": {
"navigationBarTitleText": "创建部门/门店"
}
},{
"path": "pages/employees/list",
"name": "employeesList",
"aliasPath": "/employees/list",
"auth": true,
"style": {
"navigationBarTitleText": "员工管理"
}
},{
"path": "pages/employees/add",
"name": "employeesAdd",
"aliasPath": "/employees/add",
"auth": true,
"style": {
"navigationBarTitleText": "添加员工"
}
},{
"path": "pages/instrument/Spread",
"name": "instrumentSpread",
"aliasPath": "/instrument/spread",
"auth": true,
"style": {
"navigationBarTitleText": "营销推广码"
}
},{
"path": "pages/instrument/basics",
"name": "instrumentBasics",
"aliasPath": "/instrument/basics",
"auth": true,
"style": {
"navigationBarTitleText": "基础信息"
}
}, {
"path": "pages/wallet/fragment",
"name": "Fragment",
"aliasPath": "/wallet/fragment",
"style": {
"navigationBarTitleText": "能量碎片记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wallet/addBank",
"style": {
"navigationBarTitleText": "添加银行卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
"path": "pages/index/index",
"name": "Index",
"aliasPath": "/",
"style": {
"navigationBarTitleText": "发现能量"
}
}, {
"path": "pages/found/index",
"name": "Found",
"aliasPath": "/found",
"auth": true,
"style": {
"navigationBarTitleText": "发现更多"
}
}, {
"path": "pages/user/index",
"name": "User",
"aliasPath": "/user",
"auth": true,
"style": {
"navigationBarTitleText": "节点中心"
}
}, {
"path": "pages/user/code",
"name": "userCode",
"aliasPath": "/user/code",
"auth": true,
"style": {
"navigationBarTitleText": "邀请好友"
}
}, {
"path": "pages/user/help",
"name": "userHelp",
"aliasPath": "/user/help",
"auth": true,
"style": {
"navigationBarTitleText": "帮助中心"
}
}, {
"path": "pages/user/partner",
"name": "userPartner",
"aliasPath": "/user/partner",
"auth": true,
"style": {
"navigationBarTitleText": "我的伙伴"
}
}, {
"path": "pages/user/clause",
"name": "userClause",
"aliasPath": "/user/clause",
"auth": true,
"style": {
"navigationBarTitleText": "服务条款"
}
}, {
"path": "pages/user/followOfficial",
"name": "Official",
"aliasPath": "/user/followOfficial",
"auth": true,
"style": {
"navigationBarTitleText": "关注公众号"
}
}, {
"path": "pages/vip/vip",
"name": "vipIndex",
"aliasPath": "/vip",
"style": {
"navigationBarTitleText": "开通节点"
}
}, {
"path": "pages/vip/agree",
"name": "vipAgree",
"aliasPath": "/vip/agree",
"style": {
"navigationBarTitleText": "用户协议"
}
}, {
"path": "pages/vip/examine",
"name": "Examine",
"aliasPath": "/vip/examine",
"style": {
"navigationBarTitleText": "提交成功"
}
}, {
"path": "pages/setting/setting",
"name": "setting",
"aliasPath": "/setting",
"auth": true,
"style": {
"navigationBarTitleText": "设置中心"
}
}, {
"path": "pages/goods/management",
"name": "goodsManagement",
"aliasPath": "/goods/management",
"style": {
"navigationBarTitleText": "商品权证管理"
}
}, {
"path": "pages/goods/addClassify",
"name": "goodsaddClassify",
"aliasPath": "/goods/add-classify",
"style": {
"navigationBarTitleText": "发布商品类目"
}
}, {
"path": "pages/goods/add",
"name": "goodsAdd",
"aliasPath": "/goods/add",
"style": {
"navigationBarTitleText": "商品权证创建"
}
}, {
"path": "pages/goods/goodsAuth",
"name": "goodsAddAuth",
"aliasPath": "/goods/goods-auth",
"style": {
"navigationBarTitleText": "商品权证认证"
}
}, {
"path": "pages/coupons/management",
"name": "couponsManagement",
"aliasPath": "/coupons/management",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/add",
"name": "couponsAdd",
"aliasPath": "/coupons/add",
"style": {
"navigationBarTitleText": "创建优惠券"
}
}, {
"path": "pages/coupons/magDetails",
"name": "couponsDetails",
"aliasPath": "/coupons/mag-details",
"style": {
"navigationBarTitleText": "优惠券详情"
}
}, {
"path": "pages/coupons/selectGoods",
"name": "couponsSelectGoods",
"aliasPath": "/coupons/select-goods",
"style": {
"navigationBarTitleText": "关联产品"
}
}, {
"path": "pages/login/login",
"name": "Login",
"aliasPath": "/login",
"style": {
"navigationBarTitleText": "登录"
}
}, {
"path": "pages/login/guide",
"name": "loginGuide",
"aliasPath": "/login/guide",
"style": {
"navigationBarTitleText": "引导页"
}
}, {
"path": "pages/login/agreement",
"name": "agreement",
"aliasPath": "/login/agreement",
"style": {
"navigationBarTitleText": "用户隐藏协议"
}
}, {
"path": "pages/certification/personal",
"name": "Personal",
"aliasPath": "/personal",
"auth": true,
"style": {
"navigationBarTitleText": "个人认证"
}
}, {
"path": "pages/setting/aboutUs",
"name": "aboutUs",
"aliasPath": "/setting/about-us",
"auth": true,
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/company/approve",
"name": "companyApprove",
"aliasPath": "/company/approve",
"auth": true,
"style": {
"navigationBarTitleText": "企业认证"
}
}, {
"path": "pages/news/index",
"name": "news",
"aliasPath": "/news/index",
"auth": true,
"style": {
"navigationBarTitleText": "消息中心"
}
}, {
"path": "pages/news/detail",
"name": "newsDetail",
"aliasPath": "/news/detail",
"auth": true,
"style": {
"navigationBarTitleText": "消息列表"
}
}, {
"path": "pages/wallet/property",
"name": "walletProperty",
"aliasPath": "/wallet/property",
"style": {
"navigationBarTitleText": "能量钱包",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/wallet/extract",
"name": "Extract",
"aliasPath": "/wallet/extract",
"style": {
"navigationBarTitleText": "提现能量",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/verification/index",
"name": "verificationIndex",
"aliasPath": "/verification/index",
"auth": true,
"style": {
"navigationBarTitleText": "扫码核销"
}
}, {
"path": "pages/verification/history",
"name": "verificationHistory",
"aliasPath": "/verification/history",
"auth": true,
"style": {
"navigationBarTitleText": "核销记录"
}
}, {
"path": "pages/shop/lists",
"name": "shopLists",
"aliasPath": "/shop/lists",
"auth": true,
"style": {
"navigationBarTitleText": "部门/门店"
}
}, {
"path": "pages/shop/create",
"name": "shopCreate",
"aliasPath": "/shop/create",
"auth": true,
"style": {
"navigationBarTitleText": "创建部门/门店"
}
}, {
"path": "pages/employees/list",
"name": "employeesList",
"aliasPath": "/employees/list",
"auth": true,
"style": {
"navigationBarTitleText": "员工管理"
}
}, {
"path": "pages/employees/add",
"name": "employeesAdd",
"aliasPath": "/employees/add",
"auth": true,
"style": {
"navigationBarTitleText": "添加员工"
}
}, {
"path": "pages/instrument/Spread",
"name": "instrumentSpread",
"aliasPath": "/instrument/spread",
"auth": true,
"style": {
"navigationBarTitleText": "营销推广码"
}
}, {
"path": "pages/instrument/basics",
"name": "instrumentBasics",
"aliasPath": "/instrument/basics",
"auth": true,
"style": {
"navigationBarTitleText": "基础信息"
}
}, {
"path": "pages/wallet/fragment",
"name": "Fragment",
"aliasPath": "/wallet/fragment",
"style": {
"navigationBarTitleText": "能量碎片记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
}
},
"name": "addBank",
"aliasPath": "/wallet/add-bank"
},{
"path": "pages/wallet/bankList",
"style": {
"navigationBarTitleText": "银行卡列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "bankList",
"aliasPath": "/wallet/bank/list"
},{
"path": "pages/wallet/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "withdrawList",
"aliasPath": "/wallet/withdraw/list"
}],
{
"path": "pages/wallet/addBank",
"style": {
"navigationBarTitleText": "添加银行卡",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "addBank",
"aliasPath": "/wallet/add-bank"
}, {
"path": "pages/wallet/bankList",
"style": {
"navigationBarTitleText": "银行卡列表",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "bankList",
"aliasPath": "/wallet/bank/list"
}, {
"path": "pages/wallet/withdrawList",
"style": {
"navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle": "white"
},
"name": "withdrawList",
"aliasPath": "/wallet/withdraw/list"
}
],
"globalStyle": {
"navigationStyle": "custom",
"backgroundColor": "#F5F5F5"

19
pages/404/404.vue Normal file
View File

@@ -0,0 +1,19 @@
<template>
<view>
404
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

View File

@@ -122,7 +122,7 @@
};
},
onShow() {
if(this.$store.state.token != '') this.isAuth = true
this.isAuth = this.$store.state.token != ''
this.getIndex()
},
methods:{
@@ -510,7 +510,7 @@
width: 58rpx;
height: 58rpx;
line-height: 58rpx;
background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .0) 40%, #ca66e0);
background: radial-gradient(circle at 50% 50%, rgba(202, 102, 224, .0) 40%, #ca66e0);
border-radius: 50%;
box-shadow: 0 0 5rpx 5rpx rgba($color: #ca66e0, $alpha: .5);
.icon {

View File

@@ -17,14 +17,17 @@
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
</view>
<view class="inputs">
<input placeholder="邀请码" maxlength="10" v-model="parentId" />
</view>
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
<!-- 快捷登录 -->
<view class="quick">
<!-- <view class="quick">
<view class="quick-title">快捷登录</view>
<view class="quick-box">
<image class="quick-icon" src="@/static/icons/wechat.png" mode="widthFix" @click="onShowToast"></image>
</view>
</view>
</view> -->
<!-- 用户登录注册协议 -->
<view class="agreement">
未注册的手机号验证后将自动创建账号登录即表示同意接收
@@ -32,6 +35,9 @@
<view @click="$Router.push({name: 'agreement', params: {name : 'service'}})">用户服务协议</view>
</view>
<view class="beianNo">皖ICP备2021013714号-1</view>
<!-- https://beian.miit.gov.cn/ -->
</view>
</template>
@@ -43,21 +49,34 @@
export default {
data() {
return {
phone: "18245180131",
code: "",
smsTime: 60,
getSms: false
phone : "18245180131",
code : "",
parentId: "",
smsTime : 60,
getSms : false
}
},
onShow(){
console.log(this.$Route)
this.parentId = this.$Route.query.invite || ''
},
methods: {
// 用户登录
login() {
smsAuth({
mobileNo: this.phone,
code: this.code
mobileNo : this.phone,
code : this.code,
parent_id : this.parentId
}).then(res => {
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
this.$Router.back()
if(this.$Route.toName){
this.$Router.back()
}else{
this.$Router.replace({name: 'Index'})
}
}).catch(err => {
uni.showToast({
title: err.message,
@@ -111,7 +130,7 @@
background: white;
.login-top {
height: 36vh;
height: 26vh;
width: 100%;
display: flex;
flex-direction: row;
@@ -120,15 +139,12 @@
box-sizing: border-box;
position: relative;
padding-bottom: 160rpx;
.top-bg {
position: absolute;
bottom: 30rpx;
z-index: 2;
width: 740rpx;
margin-left: 40rpx;
}
.top-logo-content {
display: flex;
flex-direction: column;
@@ -185,8 +201,8 @@
height: 77rpx;
line-height: 77rpx;
position: absolute;
top: 0;
right: 0;
top: 1rpx;
right: 1rpx;
padding: 0;
margin: 0;
border-radius: 0;
@@ -253,7 +269,7 @@
}
.agreement {
padding-top: $padding * 2;
padding-top: 12vh;
font-size: $title-size-sm;
color: $text-gray;
view {
@@ -262,5 +278,11 @@
padding: 0 10rpx;
}
}
.beianNo{
font-size: $title-size-sm;
color: $text-gray-m;
text-align: center;
padding-top: $padding*2;
}
}
</style>

View File

@@ -68,7 +68,7 @@
<view @click="loginOut" class="list-item">
<view class="list-item-left">
<image src="/static/imgs/reset-info.png" mode="widthFix" />
<span>切换账户</span>
<span>退出登录</span>
</view>
<u-icon name="arrow-right" color="#f1f1f1" size="28" />
</view>
@@ -110,13 +110,7 @@
}
},
onShow() {
wx.login({
success: res => {
this.loginCode = res.code
}
})
this.getUserInfo()
},
onPullDownRefresh() {
this.getUserInfo()
@@ -124,7 +118,6 @@
methods: {
// 是否个人认证
certificationClick(certfication) {
console.log(certfication)
if (certfication.is_true) {
// 跳转到个人认证信息完成展示页面
// this.$refs.uToast.show({
@@ -146,7 +139,6 @@
},
// 是否展示企业信息 企业认证 -1.未认证0.审核中1.审核通过2.驳回
company(code) {
console.log(code, '是否企业认证')
if (code === -1) {
// 跳转到企业认证页面
this.$Router.push({
@@ -192,7 +184,6 @@
})
// -1.未认证0.审核中1.审核通过2.驳回
companyStatus().then(res => {
console.log(res)
this.companyCode = res
}).catch(err => {
this.$refs.uToast.show({
@@ -281,7 +272,7 @@
},
loginOut() {
this.$store.commit('setToken', '')
this.$Router.push({name: 'Login'})
this.$Router.push({name: 'Index'})
},
// 上传头像
updImgs(type) {
@@ -320,7 +311,6 @@
value: value
}
resetUserInfo(data).then(res => {
console.log(res, 'res...')
uni.showToast({
title: res,
icon: 'none'

View File

@@ -1,5 +1,5 @@
<template>
<view>
<view v-if="!loding">
<!-- 专属客服弹出 start -->
<view class="customerBack" v-if="customer.customerShow"></view>
<view class="customerCont" v-if="customer.customerShow">
@@ -255,6 +255,7 @@
export default {
data() {
return {
loding : true, // 加载
scroll : 0, // 回弹效果
userData : '', // 用户信息
userIdentity : '', // 用户身份
@@ -299,11 +300,10 @@
stone_value: res.stone_value,
...res.account
}
this.userData = res
this.helpDoc = res.help_doc
this.userIdentity = res.identityShow
this.loding = false
}).catch(err =>{
uni.showToast({
title: err.message,

View File

@@ -112,7 +112,8 @@
</view>
</template>
<script>
<script>
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip'
import { wxConfig } from '@/apis/interfaces/wx'
import { uploads } from '@/apis/interfaces/uploading'
export default {
@@ -138,7 +139,29 @@
}
},
created() {
// 获取当前用户信息
// 获取当前用户信息
this.idenInfo();
// 微信鉴权
wxConfig({
url : window.location.href,
jsApiList : ['chooseWXPay']
}).then(res => {
let payConfig = JSON.parse(res)
let jweixin = require('jweixin-module')
jweixin.ready(res=>{
// res
})
jweixin.error(err => {
console.log(err)
uni.showToast({
title: err,
icon : 'none'
})
})
jweixin.config({...payConfig})
}).catch(err => {
console.log(err)
})
},
methods: {
@@ -213,37 +236,37 @@
return
},
// 开通vip提交
vipSubmitr(id) {
vipOrder(id,{
year: 1
}).then(res => {
if(!res.test){
let verifyForm = res
this.wechatPay(res.id)
}else{
// 测试环境
uni.showModal({
title : '开通提示',
content : '会员开通成功,是否继续完成企业认证',
showCancel : true,
cancelText : '稍后认证',
confirmText : '立即认证',
success : modalRes => {
if(modalRes.confirm){
this.$Router.replace({name: 'Approve'})
return
}
this.$Router.back()
},
fail(err) {
}
})
}
}).catch(err =>{
uni.showToast({
title: err.message,
icon : 'none'
})
vipSubmitr(id) {
// vipOrder(id,{
// year: 1
// }).then(res => {
// if(!res.test){
// let verifyForm = res
// this.wechatPay(res.id)
// }else{
// // 测试环境
// uni.showModal({
// title : '开通提示',
// content : '会员开通成功,是否继续完成企业认证',
// showCancel : true,
// cancelText : '稍后认证',
// confirmText : '立即认证',
// success : modalRes => {
// if(modalRes.confirm){
// this.$Router.replace({name: 'Approve'})
// return
// }
// this.$Router.back()
// },
// fail(err) {
// }
// })
// }
// }).catch(err =>{
// uni.showToast({
// title: err.message,
// icon : 'none'
// })
// })
},

View File

@@ -18,7 +18,11 @@ const router = createRouter({
paramsToQuery: true
},
platform: process.env.VUE_APP_PLATFORM,
routes: [...ROUTES]
routes: [...ROUTES, {
path: '*',
name:'404',
component: ()=> import('@/pages/404/404')
}]
})
// 全局路由前置守卫
@@ -27,7 +31,10 @@ router.beforeEach((to, from, next) => {
// 检查是否需要登录
if(to.auth && token === ''){
next({
name: 'Login'
name: 'Login',
params: {
toName: to.name
}
})
return
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>BlockChainH5</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.f4fc78fe.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fa7b169e.js></script><script src=/static/js/index.90de528e.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.f4fc78fe.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.fa7b169e.js></script><script src=/static/js/index.4ff06646.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-vip-agree"],{"16da":function(e,t,n){var i=n("321d");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("7f5caa6b",i,!0,{sourceMap:!1,shadowMode:!1})},"321d":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-6223ccc6]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-6223ccc6]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-6223ccc6]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-6223ccc6]{padding-top:0}.vertical[data-v-6223ccc6]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-6223ccc6]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-6223ccc6]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-6223ccc6]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-6223ccc6]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-6223ccc6]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.contentTitle[data-v-6223ccc6]{padding:%?30?%;box-sizing:border-box}',""]),e.exports=t},ac4d:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("ad98"),a={data:function(){return{content:""}},created:function(){var e=this;(0,i.userAgree)().then((function(t){e.content=t.content})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))},methods:{}};t.default=a},ad2b:function(e,t,n){"use strict";var i=n("16da"),a=n.n(i);a.a},ad98:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vipVoucher=t.userAgree=t.vipCont=t.vipWechatPay=t.vipOrder=t.identities=void 0;var i=n("89d9"),a=function(){return(0,i.request)({url:"user/identities"})};t.identities=a;var r=function(e,t){return(0,i.request)({url:"user/identities/create/"+e,method:"POST",data:t})};t.vipOrder=r;var o=function(e){return(0,i.request)({url:"user/identities/pay/"+e+"/wechat"})};t.vipWechatPay=o;var c=function(e,t){return(0,i.request)({url:"user/identities/create/"+e,data:t})};t.vipCont=c;var s=function(){return(0,i.request)({url:"articles/agreement/openvip"})};t.userAgree=s;var d=function(e){return(0,i.request)({url:"user/voucher/store",method:"POST",data:e})};t.vipVoucher=d},b0f3:function(e,t,n){"use strict";n.r(t);var i=n("ac4d"),a=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},da57:function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"contentTitle"},[n("v-uni-rich-text",{attrs:{nodes:e.content}})],1)],1)},r=[]},e3df:function(e,t,n){"use strict";n.r(t);var i=n("da57"),a=n("b0f3");for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("ad2b");var o,c=n("f0c5"),s=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"6223ccc6",null,!1,i["a"],o);t["default"]=s.exports}}]);

View File

@@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-vip-agree"],{"11a3":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/**\n * Web唐明明\n * 匆匆数载恍如梦,岁月迢迢华发增。\n * 碌碌无为枉半生,一朝惊醒万事空。\n */.ios-bottom[data-v-043753a7]{padding-bottom:env(safe-area-inset-bottom);padding-bottom:constant(safe-area-inset-bottom)}.ios-left[data-v-043753a7]{padding-left:env(safe-area-inset-left);padding-left:constant(safe-area-inset-left)}.ios-right[data-v-043753a7]{padding-right:env(safe-area-inset-right);padding-right:constant(safe-area-inset-right)}.ios-top[data-v-043753a7]{padding-top:0}.vertical[data-v-043753a7]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center}.nowrap[data-v-043753a7]{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis[data-v-043753a7]{max-width:100%;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ellipsis-3[data-v-043753a7]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}.ellipsis-4[data-v-043753a7]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:4}.ellipsis-5[data-v-043753a7]{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.contentTitle[data-v-043753a7]{padding:%?30?%;box-sizing:border-box}',""]),e.exports=t},"40e7":function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"contentTitle"},[n("v-uni-rich-text",{attrs:{nodes:e.content}})],1)],1)},r=[]},"6d78":function(e,t,n){"use strict";var i=n("8258"),a=n.n(i);a.a},8258:function(e,t,n){var i=n("11a3");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("11ecefd7",i,!0,{sourceMap:!1,shadowMode:!1})},ac4d:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("ad98"),a={data:function(){return{content:""}},created:function(){var e=this,t="";"vipAgree"==this.$Route.query.type&&(t="articles/agreement/openvip"),"loginPrivacy"==this.$Route.query.type&&(t="articles/agreement/secret"),"loginService"==this.$Route.query.type&&(t="articles/agreement/service"),(0,i.userAgree)(t).then((function(t){e.content=t.content})).catch((function(e){uni.showToast({title:e.message,icon:"none"})}))},methods:{}};t.default=a},ad98:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userAgree=t.vipVoucher=t.vipCont=t.vipWechatPay=t.vipOrder=t.identities=void 0;var i=n("89d9"),a=function(){return(0,i.request)({url:"user/identities"})};t.identities=a;var r=function(e,t){return(0,i.request)({url:"user/identities/create/"+e,method:"POST",data:t})};t.vipOrder=r;var o=function(e){return(0,i.request)({url:"user/identities/pay/"+e+"/wechat"})};t.vipWechatPay=o;var s=function(e,t){return(0,i.request)({url:"user/identities/create/"+e,data:t})};t.vipCont=s;var u=function(e){return(0,i.request)({url:"user/voucher/store",method:"POST",data:e})};t.vipVoucher=u;var d=function(e){return(0,i.request)({url:e})};t.userAgree=d},b0f3:function(e,t,n){"use strict";n.r(t);var i=n("ac4d"),a=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},e3df:function(e,t,n){"use strict";n.r(t);var i=n("40e7"),a=n("b0f3");for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("6d78");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"043753a7",null,!1,i["a"],o);t["default"]=u.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long