调整登录逻辑退出登录调整拦截器新增路由通配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 = { const config = {
// apiUrl : 'https://oapi.lianshang.vip/api/',
// apiUrls : 'https://oapi.lianshang.vip/',
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', apiUrl : 'http://api.ahxh.shangkelian.cn/api/',
apiUrls : 'http://api.ahxh.shangkelian.cn', apiUrls : 'http://api.ahxh.shangkelian.cn/',
timeout : 60000 timeout : 60000
} }
@@ -142,13 +145,11 @@ const loginHint = () => {
uni.showModal({ uni.showModal({
title: '登录提示', title: '登录提示',
content: '您的登录信息已过期,请重新登录', content: '您的登录信息已过期,请重新登录',
confirmColor: '#009B69', confirmColor: '#8b64fd',
showCancel:false, showCancel:false,
success: res=> { success: res=> {
loginHintState = false loginHintState = false
if (res.confirm) uni.reLaunch({ if (res.confirm) this.$Router.replace({name: 'Index'})
url: '/pages/equity/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" : { "uniStatistics" : {
"enable" : false "enable" : false
}, },
"vueVersion" : "2", "vueVersion" : "2"
"h5" : {
"router" : {
"mode" : "history"
}
}
} }

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, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "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": { "uni-read-pages": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz", "resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -112,7 +112,8 @@
</view> </view>
</template> </template>
<script> <script>
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip'
import { wxConfig } from '@/apis/interfaces/wx' import { wxConfig } from '@/apis/interfaces/wx'
import { uploads } from '@/apis/interfaces/uploading' import { uploads } from '@/apis/interfaces/uploading'
export default { export default {
@@ -138,7 +139,29 @@
} }
}, },
created() { 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: { methods: {
@@ -213,37 +236,37 @@
return return
}, },
// 开通vip提交 // 开通vip提交
vipSubmitr(id) { vipSubmitr(id) {
vipOrder(id,{ // vipOrder(id,{
year: 1 // year: 1
}).then(res => { // }).then(res => {
if(!res.test){ // if(!res.test){
let verifyForm = res // let verifyForm = res
this.wechatPay(res.id) // this.wechatPay(res.id)
}else{ // }else{
// 测试环境 // // 测试环境
uni.showModal({ // uni.showModal({
title : '开通提示', // title : '开通提示',
content : '会员开通成功,是否继续完成企业认证', // content : '会员开通成功,是否继续完成企业认证',
showCancel : true, // showCancel : true,
cancelText : '稍后认证', // cancelText : '稍后认证',
confirmText : '立即认证', // confirmText : '立即认证',
success : modalRes => { // success : modalRes => {
if(modalRes.confirm){ // if(modalRes.confirm){
this.$Router.replace({name: 'Approve'}) // this.$Router.replace({name: 'Approve'})
return // return
} // }
this.$Router.back() // this.$Router.back()
}, // },
fail(err) { // fail(err) {
} // }
}) // })
} // }
}).catch(err =>{ // }).catch(err =>{
uni.showToast({ // uni.showToast({
title: err.message, // title: err.message,
icon : 'none' // icon : 'none'
}) // })
// }) // })
}, },

View File

@@ -18,7 +18,11 @@ const router = createRouter({
paramsToQuery: true paramsToQuery: true
}, },
platform: process.env.VUE_APP_PLATFORM, 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 === ''){ if(to.auth && token === ''){
next({ next({
name: 'Login' name: 'Login',
params: {
toName: to.name
}
}) })
return 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)')) <!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