12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- var httpData = GetRequest();
- console.log('httpData',httpData)
- var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
- function showSuccessMessage(msg) {
- layer.msg(msg, {
- icon: 1
- })
- }
- function showErrorMessage(msg) {
- layer.msg(msg, {
- icon: 5
- })
- }
- new Vue({
- el: "#app",
- data: {
- modelName: '',
- content: '',
- curTemplate: undefined,
- modelCode: httpData['modelCode']||'',
- imagesUrls: []
- },
- mounted: function() {
- this.selectGuidances();
- },
- methods: {
- selectGuidances: function(){
- var vm=this;
- var params={
- type: '',
- id: vm.modelCode,
- title: '',
- page: 1,
- pagesize: 1
- }
- rehaAPI.selectGuidances(params).then(function(res){
- if(res.status==200){
- if(res.data && res.data.length) {
- var data = res.data[0]
- vm.curTemplate = data
- vm.content = data.content
- vm.modelName = data.title
- // vm.imgs = _.map(data.imagesUrls, function(s) {
- // return httpRequest.getImgUrl(s)
- // })
- }
- } else {
- showErrorMessage(res.msg)
- }
- })
- },
- // 关闭窗口
- onClose: function(){
- window.parent.closeGuidancePreview()
- }
- }
- })
|