Browse Source

fix issue

tags/v1.22.2.2^2
zhoupzh 4 years ago
parent
commit
ba68e79970
7 changed files with 92 additions and 8 deletions
  1. +5
    -0
      package-lock.json
  2. +1
    -0
      package.json
  3. +1
    -4
      templates/repo/modelarts/trainjob/show.tmpl
  4. +7
    -4
      templates/repo/wx_autorize.tmpl
  5. +74
    -0
      templates/user/settings/profile.tmpl
  6. +2
    -0
      web_src/js/components/WxAutorize.vue
  7. +2
    -0
      web_src/js/index.js

+ 5
- 0
package-lock.json View File

@@ -7787,6 +7787,11 @@
}
}
},
"js-cookie": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz",
"integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw=="
},
"js-file-download": {
"version": "0.4.12",
"resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz",


+ 1
- 0
package.json View File

@@ -33,6 +33,7 @@
"jquery": "3.5.1",
"jquery-datetimepicker": "2.5.21",
"jquery.are-you-sure": "1.9.0",
"js-cookie": "3.0.1",
"less-loader": "6.1.0",
"mini-css-extract-plugin": "0.9.0",
"monaco-editor": "0.20.0",


+ 1
- 4
templates/repo/modelarts/trainjob/show.tmpl View File

@@ -560,16 +560,13 @@ td, th {
$('input[name="JobId"]').val(obj.JobID)
$('input[name="VersionName"]').val(obj.VersionName).addClass('model_disabled')
$('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"})
createModelName()
createModelName()
},
onHide:function(){
document.getElementById("formId").reset();
$('.ui.dimmer').css({"background-color":""})
$('.ui.error.message').text()
$('.ui.error.message').css('display','none')
}
})
.modal('show')


+ 7
- 4
templates/repo/wx_autorize.tmpl View File

@@ -4,12 +4,15 @@
<div class="repository release dataset-list view">
{{template "repo/header" .}}
{{template "base/alert" .}}
<div id="WxAutorize"></div>
<input id="WxAutorize-qrcode" type="hidden" value="{{.qrcode.Ticket}}">
<div id="WxAutorize">
</div>
</div>
</div>
</div>



</div>
{{template "base/footer" .}}
<script>
console.log(document.cookie)
</script>

+ 74
- 0
templates/user/settings/profile.tmpl View File

@@ -102,6 +102,80 @@
</div>
</form>
</div>
<h4 class="ui top attached header">
微信绑定<!-- {{.i18n.Tr "settings.avatar"}} -->
</h4>
{{if not .SignedUser.IsBindWechat}}
<div class="ui attached segment">
<a href="/authentication/wechat/bind" class="ui green button">绑定微信</a>
</div>
{{else}}
<div>
<table class="ui celled striped table provider titleless">
<thead>
<th class="center aligned">
绑定账号信息
</th>
<th class="center aligned">
详情
</th>
<th class="center aligned">
绑定时间
</th>
<th class="center aligned">
操作
</th>
</thead>
<tbody>
<td class="center aligned">
微信
</td>
<td class="center aligned">
<img class="ui avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">{{.SignedUser.Name}}
</td>
<td class="center aligned">
2022-02-23 14:48
</td>
<td class="center aligned">
<div>
<a class="ui inverted orange button " onclick="showcreate(this)" href="javascript: void(0)">解除绑定</a>
</div>
</td>
</tbody>
</table>
</div>
{{end}}
</div>


<div class="ui mini modal second">
<div class="header">确定要解绑微信?</div>
<div class="content">
<p>解绑后将无法使用云脑计算资源</p>
</div>
<div class="actions">
<div class="ui blank cancel button">取消</div>
<div class="ui green approve button">确定</div>
</div>
</div>
</div>
{{template "base/footer" .}}
<script>
function showcreate(obj){
const {csrf} = window.config
$('.ui.modal.second')
.modal({
onShow:function(){
},
onHide:function(){
},
onApprove:function($element){
console.log($element)
$.post('/authentication/wechat/unbind',{_csrf:csrf},(data)=>{
window.location.href = '/user/settings'
})
}
})
.modal('show')
}
</script>

+ 2
- 0
web_src/js/components/WxAutorize.vue View File

@@ -75,6 +75,8 @@ export default {
},
mounted() {
this.getWxQrcode(false)
// let QrcodeData = $("#WxAutorize-qrcode").val()
// this.wx_qrcodeImg = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket='+QrcodeData
},
created() {
}


+ 2
- 0
web_src/js/index.js View File

@@ -10,6 +10,7 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios';
import qs from 'qs';
import Cookies from 'js-cookie'
import 'jquery.are-you-sure';
import './vendor/semanticdropdown.js';
import {svg} from './utils.js';
@@ -45,6 +46,7 @@ import WxAutorize from './components/WxAutorize.vue'

Vue.use(ElementUI);
Vue.prototype.$axios = axios;
Vue.prototype.$Cookies = Cookies;
Vue.prototype.qs = qs;
const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;



Loading…
Cancel
Save