提交 199d2c9a 作者: 毛细亚

绑定账号调试完成

上级 9fd91592
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="favicon.ico">
<title>company_app</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
<script defer src="static/js/chunk-vendors.js"></script><script defer src="static/js/app.js"></script></head>
<body>
......
......@@ -36,6 +36,7 @@
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"element-theme-chalk": "^2.15.14",
"vue-template-compiler": "^2.6.14"
}
}
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
</head>
<body>
......
......@@ -13,7 +13,7 @@
</el-menu-item>
</el-menu>
<!-- 绑定的 w 账号 -->
<!-- <bindUserList /> -->
<bindUserList v-if="token" />
</div>
<div class="mobile-content">
<router-view></router-view>
......@@ -22,6 +22,7 @@
</template>
<script>
import bindUserList from '@/views/components/bindGameAccount/bindUserList.vue'
import { getToken } from '@/utils/auth'
export default {
name: 'App',
components: {
......@@ -56,6 +57,7 @@ export default {
},
],
selectedPath: '/userInfo',
token:getToken()
}
},
watch: {
......
......@@ -57,9 +57,6 @@ export function zyouBind(data) {
return request({
url: returnApi('/external_user/zyouBind'),
method: 'post',
headers: {
'Corp-Id': data.bindUserCorpID || store.state.user.corpId
},
data
})
}
......@@ -204,9 +201,6 @@ export function passwardEncryption(data) {
return request({
url: '/game/session/zyouAutoResetPassword',
method: 'post',
headers: {
'Corp-Id': store.state.user.corpId
},
data
})
}
......
......@@ -27,9 +27,6 @@ export function zyouBind(data) {
return request({
url: returnApi('/external_user/zyouBind'),
method: 'post',
headers: {
'Corp-Id': data.bindUserCorpID || store.state.user.corpId
},
data
})
}
......
......@@ -3,13 +3,12 @@ import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Cookies from 'js-cookie';
import _ from 'lodash';
import '@/styles/index.scss' // global css
import 'lib-flexible/flexible.js'
Vue.use(ElementUI);
// import '@/styles/index.scss' // global css
import '@/styles/element-theme-colors.css';
import '@/styles/index.scss';
Vue.config.productionTip = false
import VConsole from 'vconsole';
new VConsole();
......
/**
* I think element-ui's default theme color is too light for long-term use.
* So I modified the default color and you can modify it to your liking.
**/
/* theme color */
$--color-primary: #00BF8A;
// $--color-success: #13ce66;
// $--color-warning: #ffba00;
// $--color-danger: #ff4949;
// $--color-info: #1E1E1E;
$--button-font-weight: 400;
// $--color-text-regular: #1f2d3d;
$--border-color-light: #dfe4ed;
$--border-color-lighter: #e6ebf5;
$--table-border: 1px solid #dfe6ec;
/* icon font path, required */
$--font-path: '~bi-eleme/lib/theme-chalk/fonts';
@import '~bi-eleme/packages/theme-chalk/src/index';
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
theme: $--color-primary;
}
\ No newline at end of file
@import "./variables.scss";
// @tailwind base; // 重设的 css 代码
// @tailwind components;
// @import "./variables.scss";
// @import "./element-variables.scss";
// @import "./index.css";
// @import "./element-theme-colors.css";
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
......@@ -406,6 +408,7 @@ li {
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
margin-bottom: 20px;
padding: 15px;
}
.el-table__cell {
......@@ -576,6 +579,13 @@ li {
margin-bottom: 5px;
}
}
.el-form-item{
margin-bottom: 10px;
.el-input__inner{
height: 32px;
line-height: 32px;
}
}
......@@ -38,9 +38,13 @@ service.interceptors.request.use(
config.headers['Authtoken'] = authToken
}
const corp_id = store.state.user.corp_id || Cookies.get('corp_id')
const userid = Cookies.get('userid')
if (corp_id) {
config.headers['Corp-Id'] = corp_id
}
if (userid) {
config.headers['User-Id'] = userid
}
return config
},
(error) => {
......@@ -65,20 +69,20 @@ service.interceptors.response.use(
(response) => {
const res = response.data
// cancelPending(response.config)
// 如果状态码不是成功,则判断为错误
if (res.status_code !== STATUS_CODE_SUCCESS) {
Message({
message: res.msg || 'Error',
type: 'error',
duration: 2 * 1000
})
if (res.status_code === -1) {
// 登录 过期 重新去登录
removeToken()
window.location.href = window.location.origin +'/company_app/index.html?corp_id='+Cookies.get('corp_id')
return res
}
Message({
message: res.msg || 'Error',
type: 'error',
duration: 5 * 1000
})
}
return res
},
......
......@@ -6,11 +6,10 @@
:append-to-body="true"
@close="close"
>
<div class="content ">
<div class="content">
<el-form
ref="form"
:model="form"
:inline="true"
:rules="rules"
label-width="120px"
>
......@@ -37,6 +36,7 @@
clearable
reserve-keyword
placeholder="请输入主游戏名"
style="width: 100%;"
:remote-method="remoteMethod"
:loading="loading"
@focus="gameNameList=optionsList"
......@@ -60,6 +60,7 @@
remote
:disabled="form.main_game_id==''"
clearable
style="width: 100%;"
reserve-keyword
placeholder="请先选择主游戏"
:remote-method="remoteMethodServer"
......@@ -88,23 +89,29 @@
<el-form-item>
<el-button
type="primary"
size="small"
@click="onSubmit"
>搜索</el-button>
</el-form-item>
</div>
</el-form>
<div class="info rowFlex">
<div class="table">
<div class="bind-account-title">
账号列表
</div>
<userTable
:list="tableList"
@checkedTag="checkedTag"
/>
</div>
<!-- <div class="line"></div> -->
<!-- <div class="line"></div> w92865226508-->
<div
v-if="userDetails.username"
class="userInfo"
class="account_select_userInfo"
>
<div class="bind-account-title" style="margin-top: 20px;">
账号详情
</div>
<div class="item rowFlex columnCenter"><span class="label">账号</span>
<p class="text">{{ userDetails.username }}</p> <span
v-if="userDetails.account_type==2"
......@@ -149,7 +156,6 @@
</div>
</div>
</div>
</div>
<page
class="pageInfo"
:page-info="pageInfo"
......@@ -159,11 +165,13 @@
<el-button
class="btn"
type="primary"
size="small"
:disabled="!userDetails.id"
@click="confirmSubmit"
>确 定</el-button>
<el-button
class="btn"
size="small"
@click="$emit('update:show', false)"
>取 消</el-button>
</span>
......@@ -211,7 +219,7 @@
}
},
computed: {
...mapState('common', ['chatUserInfo','corp_id'])
...mapState('game', ['chatUserInfo']),
},
watch: {
show(newVal, oldVal) {
......@@ -348,7 +356,8 @@
.then(() => {
this.submit()
})
.catch(() => {
.catch((err) => {
console.log(err)
this.$message({
type: 'info',
message: '已取消删除'
......@@ -359,14 +368,13 @@
},
submit() {
const data = {
userid: this.userid,
external_userid: this.external_userid,
userid: this.chatUserInfo.userid,
external_userid: this.chatUserInfo.external_userid,
member_id: this.userDetails.id && this.userDetails.id != '' ? this.userDetails.id : this.checkoutUser.member_id,
username: this.userDetails.username,
reg_game_id: this.userDetails.reg_game_id,
main_game_id: this.userDetails.main_game_id,
recharge_total: this.userDetails.recharge_total,
bindUserCorpID: this.corp_id
}
// 绑定掌游账号
zyouBind(data).then(res => {
......@@ -413,26 +421,30 @@
height: 100%;
overflow: auto;
}
.bind-account-title{
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 600;
color: #333333;
text-align: left;
margin-bottom: 10px;
}
.content {
width: 100%;
padding: 20px;
height: 100%;
overflow: auto;
padding-bottom: 200px;
padding: 0 10px;
.inputContent {
width: 100%;
// ::v-deep .el-input,
// .el-input__inner {
// width: vw(250);
// margin-right: 40px;
// }
}
.info {
width: 100%;
margin-top: 30px;
overflow: auto;
.table {
width: calc(55% - 20px);
width: 100%;
min-width: 500px;
}
}
......@@ -445,8 +457,8 @@
height: 70%;
border-right: 1px dashed #e0e0e0;
}
.userInfo {
width: 45%;
.account_select_userInfo {
width: 100%;
height: auto;
padding-left: 20px;
margin-top: -20px;
......
......@@ -79,8 +79,10 @@ export default {
}
const res = await detailsInfoRequest(data)
if (res.data && res.data.userid) {
console.log(res.data,'1231')
this.chatUserDetails = res.data
this.set_chatUserInfo(this.chatUserDetails) // 设置云端信息
console.log(this.chatUserDetails,'1231')
if (this.chatUserDetails.self_defined_columns && this.chatUserDetails.self_defined_columns.length > 0) {
this.memberCheckList =
this.chatUserDetails.self_defined_columns.map(
......
......@@ -28,7 +28,6 @@
<el-table-column
label="w账号"
prop="username"
width="140"
>
</el-table-column>
<el-table-column
......
......@@ -146,7 +146,7 @@ export default {
// 用code
const res = await getAuthUser({ code: this.urlParams.code, url: window.location.href,corp_id:corp_id });
if (res.status_code === 1) {
this.cacheWx_userinfo(res.data)
// this.cacheWx_userinfo(res.data)
this.cacheuserid(res.data.userid)
} else {
console.log('获取useid失败',res)
......
{
"global": {
"$--color-primary": "#1B95F8",
"$--color-info": "#7B88A9",
"$--background-color-base": "#01305F",
"$--color-white": "#1B3651",
"$--color-black": "#012447",
"$--color-text-primary": "#FFFFFF",
"$--color-text-regular": "#F9F9F9",
"$--color-text-placeholder": "#E4E2E2",
"$--color-text-secondary": "#EEEEEE",
"$--border-color-base": "#2590F9",
"$--border-color-light": "#388DE0",
"$--border-color-lighter": "#58A9F5",
"$--border-color-extra-light": "#86B3F9"
},
"local": {}
}
\ No newline at end of file
......@@ -50,9 +50,9 @@ module.exports = defineConfig({
sassOptions: {
outputStyle: 'expanded'
},
// additionalData: `
// @use "@/styles/global.scss";
// `
additionalData: `
@use "@/styles/variables.scss";
`
},
postcss: {
// postcssOptions: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论