提交 199d2c9a 作者: 毛细亚

绑定账号调试完成

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