Commit 9a1c9cc6 by 冷斌

fix bug

parent d919b232
...@@ -323,6 +323,17 @@ ...@@ -323,6 +323,17 @@
</body> </body>
<script type="text/javascript"> <script type="text/javascript">
var MID = parseInt('<php> echo $mid;</php>'); var MID = parseInt('<php> echo $mid;</php>');
/*处理返回json,转为object*/
function getResponseData(response){
if(typeof(response) != 'object'){
try{
var response = JSON.parse(response);
}catch(e){
var response = {status:0,data:'操作失败,请重新尝试'};
}
}
return response;
}
new Vue({ new Vue({
el: '#app', el: '#app',
data: function () { data: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment