AlertDialog获取网上天气并显示各城市天气

最近帮同学做android百度地图,其中涉及到定位城市天气功能.才知道自己技术非常的一般,还有很多东西需要学习,同时需要回归到我研究生的方向——数据挖掘.同时又见识到了一位叫柳峰的大神,推荐大家去看看他的文章,好像他还是贵州的老乡.博文地址:http://blog.csdn.net/lyq8479/
    言归正传,我主要通过两种方法实现:
    1.第一种方法是通过调用中国天气网信息实现的,它的思想是通过查询静态数据库中个城市对应的WeatherCode,在通过访问中国天气网获取JSON格式数据显示,天气对应的图片也从网上获取.
    2.第二种方法是通过新浪天气API接口实现的,它只需要输入查询的具体城市或县城即可获取JSON格式天气,而且天气对应图片采用res中静态的对应.

    参考资料:
    中国天气网网上资料较多,主要参考郭神《Android第一行代码》
    http://smart.weather.com.cn/wzfw/smart/weatherapi.shtml
    http://blog.csdn.net/eyu8874521/article/details/11574485
    http://blog.csdn.net/lzqwebsoft/article/details/7054045
    http://blog.csdn.net/pi9nc/article/details/9297085 
 

一. 中国天气网获取天气信息介绍

    中国天气网提供了获取天气及各个城市的代号信息.通过下面两种接口方法获取北京天气,而获取详细信息的接口可能已更改.
    1.简单信息
 http://www.weather.com.cn/data/cityinfo/101010100.html

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. {"weatherinfo": {"city":"北京","cityid":"101010100","temp1":"-4℃","temp2":"5℃","weather":" 阴转晴","img1":"n2.gif","img2":"d0.gif","ptime":"18:00"}}  

    2.简单信息 http://www.weather.com.cn/data/sk/101010100.html

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. {"weatherinfo": {"city":"北京","cityid":"101010100","temp":"1","WD":"东南风","WS":"2 级","SD":"58%","WSE":"2","time":"18:15","isRadar":"1","Radar":"JC_RADAR_AZ9010_JB","njd":" 暂无实况","qy":"1024"}}  

    程序主要通过该URL获取城市的天气,其中101010100表示的就是北京的天气代号,它是如何获取的呢?同样中国天气网提供了网址获取不同城市/县城的天气代号.
    http://www.weather.com.cn/data/list3/city.xml
    服务器会返回省份名称+省级代号(一级列表,包括省/直辖市/自治区).如下:

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. 01| 北京,02|上海,03|天津,04|重庆,05|黑龙江,06|吉林,07|辽宁,08|内蒙古,09|河北,10|山西,11|陕西,12|山 东,13|新疆,14|西藏,15|青海,16|甘肃,17|宁夏,18|河南,19|江苏,20|湖北,21|浙江,22|安徽,23|福建,24|江 西,25|湖南,26|贵州,27|四川,28|广东,29|云南,30|广西,31|海南,32|香港,33|澳门,34|台湾  

   在输入省级代号获取二级码,如北京city01,贵州city26
    http://www.weather.com.cn/data/list3/city26.xml

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. 2601|贵阳,2602|遵义,2603|安顺,2604|黔南,2605|黔东南,2606|铜仁,2607|毕节,2608|六盘水,2609|黔西南  

    此时你如果你对地理熟悉,你可以发现它们分别是每个省的地区,同样道理可以获取每个地区的县份或区的编码.如输入city2605
    http://www.weather.com.cn/data/list3/city2605.xml

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. 260501| 凯里,260502|岑巩,260503|施秉,260504|镇远,260505|黄平,260506|从江,260507|麻江,260508|丹 寨,260509|三穗,260510|台江,260511|剑河,260512|雷山,260513|黎平,260514|天柱,260515|锦 屏,260516|榕江  

    通过这种方法就可以把全国所有省、市、县地区的天气都实时获取.如下是凯里市对应的天气代号
    http://www.weather.com.cn/data/list3/city260501.xml

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. 260501|101260501  

    到了此处,想必你也知道如果获取凯里市的天气了吧.就是输入网址
    http://www.weather.com.cn/data/cityinfo/101260501.html


   由于在使用google浏览器获取城市代号时总是报错"This page contains the following errors",你只需要使用IE查看源码就可获取成功.但是我没有通过网上动态获取城市代号,方法知道即可.
    其中天气图标可通过网站查看,而获取具体图标网址忘记记录了.

    http://www.weather.com.cn/static/html/legend.shtml


二. 源码显示城市天气

   这里就看着郭神的书实现吧,那个界面挺好看的.同时我自定义的AlertDialog对话框也挺好看的.
    1.布局文件 activity_main.xml

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. <?xml version="1.0" encoding="utf-8"?>  

  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  

  3.     android:layout_width="match_parent"  

  4.     android:layout_height="match_parent"  

  5.     android:orientation="vertical" >  

  6.   

  7.     <RelativeLayout  

  8.         android:layout_width="match_parent"  

  9.         android:layout_height="50dp"  

  10.         android:background="#484E61" >  

  11.         <Button  

  12.             android:id="@+id/close_weather"  

  13.             android:layout_width="30dp"  

  14.             android:layout_height="30dp"  

  15.             android:layout_centerVertical="true"  

  16.             android:layout_marginLeft="10dp"  

  17.             android:background="@drawable/home" />  

  18.         <TextView  

  19.             android:id="@+id/city_name"  

  20.             android:layout_width="wrap_content"  

  21.             android:layout_height="wrap_content"  

  22.             android:layout_centerInParent="true"  

  23.             android:textColor="#fff"  

  24.             android:textSize="24sp" />  

  25.         <Button  

  26.             android:id="@+id/refresh_weather"  

  27.             android:layout_width="30dp"  

  28.             android:layout_height="30dp"  

  29.             android:layout_alignParentRight="true"  

  30.             android:layout_centerVertical="true"  

  31.             android:layout_marginRight="10dp"  

  32.             android:background="@drawable/refresh" />  

  33.     </RelativeLayout>  

  34.   

  35.     <RelativeLayout  

  36.         android:layout_width="match_parent"  

  37.         android:layout_height="0dp"  

  38.         android:layout_weight="1"  

  39.         android:background="#27A5F9" >  

  40.         <TextView  

  41.             android:id="@+id/publish_text"  

  42.             android:layout_width="wrap_content"  

  43.             android:layout_height="wrap_content"  

  44.             android:layout_alignParentRight="true"  

  45.             android:layout_marginRight="10dp"  

  46.             android:layout_marginTop="10dp"  

  47.             android:textColor="#FFF"  

  48.             android:textSize="18sp" />  

  49.         <LinearLayout  

  50.             android:id="@+id/weather_info_layout"  

  51.             android:layout_width="wrap_content"  

  52.             android:layout_height="wrap_content"  

  53.             android:layout_centerInParent="true"  

  54.             android:orientation="vertical" >  

  55.             <TextView  

  56.                 android:id="@+id/current_date"  

  57.                 android:layout_width="wrap_content"  

  58.                 android:layout_height="40dp"  

  59.                 android:gravity="center"  

  60.                 android:textColor="#FFF"  

  61.                 android:textSize="18sp" />  

  62.             <TextView  

  63.                 android:id="@+id/weather_desp"  

  64.                 android:layout_width="wrap_content"  

  65.                 android:layout_height="60dp"  

  66.                 android:layout_gravity="center_horizontal"  

  67.                 android:gravity="center"  

  68.                 android:textColor="#FFF"  

  69.                 android:textSize="40sp" />  

  70.             <LinearLayout  

  71.                 android:layout_width="wrap_content"  

  72.                 android:layout_height="60dp"  

  73.                 android:layout_gravity="center_horizontal"  

  74.                 android:orientation="horizontal" >  

  75.                 <TextView  

  76.                     android:id="@+id/temp1"  

  77.                     android:layout_width="wrap_content"  

  78.                     android:layout_height="wrap_content"  

  79.                     android:layout_gravity="center_vertical"  

  80.                     android:textColor="#FFF"  

  81.                     android:textSize="40sp" />  

  82.                 <TextView  

  83.                     android:layout_width="wrap_content"  

  84.                     android:layout_height="wrap_content"  

  85.                     android:layout_gravity="center_vertical"  

  86.                     android:layout_marginLeft="10dp"  

  87.                     android:layout_marginRight="10dp"  

  88.                     android:text="~"  

  89.                     android:textColor="#FFF"  

  90.                     android:textSize="40sp" />  

  91.                 <TextView  

  92.                     android:id="@+id/temp2"  

  93.                     android:layout_width="wrap_content"  

  94.                     android:layout_height="wrap_content"  

  95.                     android:layout_gravity="center_vertical"  

  96.                     android:textColor="#FFF"  

  97.                     android:textSize="40sp" />  

  98.             </LinearLayout>  

  99.         </LinearLayout>  

  100.     </RelativeLayout>  

  101.   

  102. </LinearLayout>  

   2.在res/drawable-hdpi文件夹中添加两张按钮图片home.png和refresh.png
   3.MainActivity.java

[java] view plaincopy在CODE上查看代码片派生到我的代码片

  1. public class MainActivity extends Activity implements OnClickListener {  

  2.   

  3.     //自定义变量  

  4.     private TextView cityNameText;       //用于显示城市名  

  5.     private TextView publishText;        //用于显示发布时间  

  6.     private TextView weatherDespText;    //用于显示天气描述信息  

  7.     private TextView temp1Text;          //用于显示最低气温  

  8.     private TextView temp2Text;          //用于显示最高气温  

  9.     private TextView currentDateText;    //用于显示当前日期  

  10.     private Button closeWeather;         //退出程序  

  11.     private Button refreshWeather;       //更新天气按钮  

  12.     private String weatherCode;          //天气代码  

  13.     private String weatherJson;          //获取JSON格式  

  14.       

  15.     @Override  

  16.     protected void onCreate(Bundle savedInstanceState) {  

  17.         super.onCreate(savedInstanceState);  

  18.         requestWindowFeature(Window.FEATURE_NO_TITLE);  

  19.         setContentView(R.layout.activity_main);  

  20.           

  21.         //获取对象  

  22.         cityNameText = (TextView) findViewById(R.id.city_name);  

  23.         publishText = (TextView) findViewById(R.id.publish_text);  

  24.         weatherDespText = (TextView) findViewById(R.id.weather_desp);  

  25.         temp1Text = (TextView) findViewById(R.id.temp1);  

  26.         temp2Text = (TextView) findViewById(R.id.temp2);  

  27.         currentDateText = (TextView) findViewById(R.id.current_date);  

  28.         closeWeather = (Button) findViewById(R.id.close_weather);  

  29.         refreshWeather = (Button) findViewById(R.id.refresh_weather);  

  30.           

  31.         //主活动 implements OnClickListener  

  32.         closeWeather.setOnClickListener(this);  

  33.         refreshWeather.setOnClickListener(this);  

  34.     }  

  35.       

  36.     @Override  

  37.     public void onClick(View v) {  

  38.         switch (v.getId()) {  

  39.         case R.id.close_weather:  

  40.             finish();  

  41.             break;  

  42.         case R.id.refresh_weather:  

  43.             DialogChooseCity();  

  44.             break;  

  45.         default:  

  46.             break;  

  47.         }  

  48.     }  

  49.       

  50.     /** 

  51.      * 自定义对话框 获取城市 

  52.      * 中国天气网  

  53.      * http://www.weather.com.cn/data/cityinfo/101010100.html 

  54.      */  

  55.     private void DialogChooseCity() {  

  56.         //创建对话框  

  57.         AlertDialog.Builder  builder = new AlertDialog.Builder(MainActivity.this);  

  58.         builder.setTitle("请选择一个城市");  

  59.         builder.setIcon(android.R.drawable.ic_dialog_info);  

  60.         //指定下拉列表的显示数据  

  61.         final String[] cities = {"北京", "上海", "天津", "广州", "贵阳", "台北", "香港"};  

  62.         final String[] codes = {"101010100", "101020100", "101030100","101280101",  

  63.                 "101260101", "101340101", "101320101"};  

  64.         builder.setItems(cities, new DialogInterface.OnClickListener()  

  65.         {  

  66.             @Override  

  67.             public void onClick(DialogInterface dialog, int which)  

  68.             {  

  69.                 weatherCode = codes[which];  

  70.                 //执行线程访问http  

  71.                 //否则 NetworkOnMainThreadException  

  72.                 new Thread(new Runnable() {  

  73.                     @Override  

  74.                     public void run() {  

  75.                           

  76.                         //访问中国天气网  

  77.                         String weatherUrl = "http://www.weather.com.cn/data/cityinfo/"  

  78.                                 + weatherCode + ".html";  

  79.                         weatherJson = queryStringForGet(weatherUrl);  

  80.                         //JSON格式解析  

  81.                         try {  

  82.                             JSONObject jsonObject = new JSONObject(weatherJson);  

  83.                             JSONObject weatherObject = jsonObject  

  84.                                     .getJSONObject("weatherinfo");  

  85.                             Message message = new Message();  

  86.                             message.obj = weatherObject;  

  87.                             handler.sendMessage(message);  

  88.                         } catch (JSONException e) {  

  89.                             // TODO Auto-generated catch block  

  90.                             e.printStackTrace();  

  91.                         }  

  92.                     }  

  93.                 }).start();  

  94.             }  

  95.         });  

  96.         builder.show();  

  97.     }  

  98.       

  99.     /** 

  100.      * 解析Json格式数据并显示 

  101.      */  

  102.     @SuppressLint("HandlerLeak")  

  103.     Handler handler = new Handler()   

  104.     {  

  105.         @Override  

  106.         public void handleMessage(Message msg) {  

  107.             // TODO Auto-generated method stub  

  108.             super.handleMessage(msg);  

  109.             JSONObject object = (JSONObject) msg.obj;  

  110.             try {  

  111.                 cityNameText.setText(object.getString("city"));  

  112.                 temp1Text.setText(object.getString("temp1"));  

  113.                 temp2Text.setText(object.getString("temp2"));  

  114.                 weatherDespText.setText(object.getString("weather"));  

  115.                 publishText.setText("今天"+object.getString("ptime")+"发布");  

  116.                 //获取当前日期  

  117.                 SimpleDateFormat sdf = new SimpleDateFormat("yyyy年M月d日", Locale.CHINA);  

  118.                 currentDateText.setText(sdf.format(new Date()));  

  119.             } catch (Exception e) {  

  120.                 // TODO Auto-generated catch block  

  121.                 e.printStackTrace();  

  122.             }  

  123.         }  

  124.     };  

  125.       

  126.     /** 

  127.      * 网络查询 

  128.      */  

  129.     private String queryStringForGet(String url) {  

  130.         HttpGet request = new HttpGet(url);  

  131.         String result = null;  

  132.         try {  

  133.             HttpResponse response = new DefaultHttpClient().execute(request);  

  134.             if (response.getStatusLine().getStatusCode() == 200) {  

  135.                 result = EntityUtils.toString(response.getEntity(), HTTP.UTF_8);  

  136.                 return result;  

  137.             }  

  138.         } catch (ClientProtocolException e) {  

  139.             // TODO Auto-generated catch block  

  140.             e.printStackTrace();  

  141.         } catch (ParseException e) {  

  142.             // TODO Auto-generated catch block  

  143.             e.printStackTrace();  

  144.         } catch (IOException e) {  

  145.             // TODO Auto-generated catch block  

  146.             e.printStackTrace();  

  147.         }  

  148.         return result;  

  149.     }  

  150.   

  151. }  

    4.最后在AndroidManifest.xml中声明网络权限

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. <!-- 申请权限 -->  

  2. <uses-permission android:name="android.permission.INTERNET" />  

   5.运行效果如下图所示
       
   6.需要注意几点
    (1)在访问http或获取上传网络数据时,你可能会遇到错误导致程序崩溃,即错误NetworkOnMainThreadException.你需要自定义线程实现,通过:

[java] view plaincopy在CODE上查看代码片派生到我的代码片

  1. new Thread(new Runnable() {  

  2.        @Override  

  3.        public void run() {  

  4.            //具体操作  

  5.            ....  

  6.        }  

  7.    }).start();  

   (2)当从网上获取JSON格式数据后,你需要学会JSONObject将数据解析出来.同时如果可能与数据库进行操作,存入db数据库中.
    (3)如果可能通过自定义DBHelper(继承自 SQLiteOpenHelper)和DBManager获取静态数据库中数据,查看对应城市或县份的天气代码.但是重新移植数据库总是报错"no such table:city_table".但是明明存在,可能是数据库路径"/data/data/包名/databases/mydata.db"定义或引 用错误,仍未解决.
    通过SQLiteSpy软件打开db文件,很明显存在city_table表和数据.如下图所示:


   (4)学会自定义AlertDialog并调用它,同时获取网络图片那个URL当时查看到没记录,可惜了.
    PS:最后推荐看看郭神《Android第一行代码》第十四章关于天气的讲解,但基本原理和方法该文章我都已经讲述了.


三. 新浪天气API实现

    新浪天气API方法同上,但唯一不同点是输入城市名称.这样就不需要再次获取WeatherCode,访问网址如下:
    http://php.weather.sina.com.cn/iframe/index/w_cl.php?code=js&day=2&city=北京&dfc=3
    如获取北京的新浪天气,返回的JSON格式如下:

[html] view plaincopy在CODE上查看代码片派生到我的代码片

  1. (function(){var w= [];w['北京']=[{s1:'霾',s2:'阴',f1:'mai',f2:'yin',t1:'5',t2:'- 4',p1:'≤3',p2:'3-4',d1:'无持续风向',d2:'北风'},{s1:'晴',s2:'晴 ',f1:'qing',f2:'qing',t1:'5',t2:'-5',p1:'4-5',p2:'4-5',d1:'北风',d2:'北风'}, {s1:'晴',s2:'晴',f1:'qing',f2:'qing',t1:'2',t2:'-5',p1:'3-4',p2:'3-4',d1:' 北风',d2:'北风'}];var add={now:'2014-12-18 20:55:04',time:'1418907304',update:'北京时间12月18日17:05更新',error:'0',total:'1'};window.SWther={w:w,add:add};})();//0   

    程序中显示效果如下图所示,显示的时候是参考了huanghsh的模板,但是不知道它源地址.所以见谅!否则推荐大家去下载看看~

    

   其中原理与上面相同,通过调用HttpService.getWeather(cityName)函数获取天气.其中自定义类HttpService代码中getWeather如下,而DefaultHttpClient是自定义设置代理.

[java] view plaincopy在CODE上查看代码片派生到我的代码片

  1. public static String getWeather(String city){     

  2.     String result=null;  

  3.     String url="http://php.weather.sina.com.cn/iframe/index/w_cl.php?code=js&day=2&city="+city+"&dfc=3";  

  4.     try{     

  5.         DefaultHttpClient client = getDefaultHttpClient2();     

  6.         HttpGet mothod = new HttpGet(url);     

  7.         HttpResponse httpResponse = client.execute(mothod);  

  8.         if (httpResponse.getStatusLine().getStatusCode() == 200)    

  9.          {    

  10.               result = EntityUtils.toString(httpResponse.getEntity(),"gb2312");    

  11.          }    

  12.     }catch(Exception ex){     

  13.         ex.printStackTrace();     

  14.     }     

  15.     return result;     

  16. }    

   而天气图片是通过res/drawable文件夹下静态图片显示,该方法也介绍下!

[java] view plaincopy在CODE上查看代码片派生到我的代码片

  1. private int imageResoId(String weather){  

  2.     int resoid=R.drawable.s_2;  

  3.     if(weather.indexOf("多云")!=-1||weather.indexOf("晴")!=-1){//多云转晴,以下类同 indexOf:包含字串  

  4.         resoid=R.drawable.s_1;}  

  5.     else if(weather.indexOf("多云")!=-1&&weather.indexOf("阴")!=-1){  

  6.         resoid=R.drawable.s_2;}  

  7.     else if(weather.indexOf("阴")!=-1&&weather.indexOf("雨")!=-1){  

  8.         resoid=R.drawable.s_3;}  

  9.     else if(weather.indexOf("晴")!=-1&&weather.indexOf("雨")!=-1){  

  10.         resoid=R.drawable.s_12;}  

  11.     else if(weather.indexOf("晴")!=-1&&weather.indexOf("雾")!=-1){  

  12.         resoid=R.drawable.s_12;}  

  13.     else if(weather.indexOf("晴")!=-1){resoid=R.drawable.s_13;}  

  14.     else if(weather.indexOf("多云")!=-1){resoid=R.drawable.s_2;}  

  15.     else if(weather.indexOf("阵雨")!=-1){resoid=R.drawable.s_3;}  

  16.     else if(weather.indexOf("小雨")!=-1){resoid=R.drawable.s_3;}  

  17.     else if(weather.indexOf("中雨")!=-1){resoid=R.drawable.s_4;}  

  18.     else if(weather.indexOf("大雨")!=-1){resoid=R.drawable.s_5;}  

  19.     else if(weather.indexOf("暴雨")!=-1){resoid=R.drawable.s_5;}  

  20.     else if(weather.indexOf("冰雹")!=-1){resoid=R.drawable.s_6;}  

  21.     else if(weather.indexOf("雷阵雨")!=-1){resoid=R.drawable.s_7;}  

  22.     else if(weather.indexOf("小雪")!=-1){resoid=R.drawable.s_8;}  

  23.     else if(weather.indexOf("中雪")!=-1){resoid=R.drawable.s_9;}  

  24.     else if(weather.indexOf("大雪")!=-1){resoid=R.drawable.s_10;}  

  25.     else if(weather.indexOf("暴雪")!=-1){resoid=R.drawable.s_10;}  

  26.     else if(weather.indexOf("扬沙")!=-1){resoid=R.drawable.s_11;}  

  27.     else if(weather.indexOf("沙尘")!=-1){resoid=R.drawable.s_11;}  

  28.     else if(weather.indexOf("雾")!=-1){resoid=R.drawable.s_12;}  

  29.     return resoid;  

  30. }  

   其中自定义对话框输入AlertDialog,载入weather_other_city.xml布局仅有一个输入框ExitText控件.通过Intent传参至显示天气的界面.具体代码如下.

[java] view plaincopy在CODE上查看代码片派生到我的代码片

  1. //输入城市名  

  2. private void showOtherCity() {  

  3.     LayoutInflater inflater = getLayoutInflater();  

  4.     View layout = inflater.inflate(R.layout.weather_other_city,(ViewGroup) findViewById(R.id.ws_dialog));  

  5.     dialogCity = (EditText)layout.findViewById(R.id.ws_city_name);  

  6.     //创建对话框  

  7.     new AlertDialog.Builder(this).setTitle("请输入城市名称").setView(layout)  

  8.         .setPositiveButton("确定",new DialogInterface.OnClickListener() {  

  9.              public void onClick(DialogInterface dialog, int id) {  

  10.                  cityName = dialogCity.getText().toString();  

  11.                  Intent intent = new Intent(MainActivity.this, WeatherScreen.class);  

  12.                  intent.putExtra("extra_data", cityName);  

  13.                  startActivity(intent);  

  14.                }  

  15.         })  

  16.      .setNegativeButton("取消", new DialogInterface.OnClickListener() {  

  17.          public void onClick(DialogInterface dialog, int id) {  

  18.                dialog.cancel();  

  19.            }  

  20.        }).show();  

  21. }  

   由于新浪方法类似,所以就简述了些其他如显示静态图片和AlertDialog的知识.
   最后简单总结下吧!第一种方法主要通过中国天气网显示信息,其核心是获取 天气代码WeatherCode,然后访问URL获取JSON格式数据并显示.第二种方法仅仅是传入城市名称(不要传错),然后获取JSON数据显示天气 即可.最后希望文章对大家有所帮助,如果有错误或不足之处,还请海涵~


转载于:https://my.oschina.net/tslin/blog/475626

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值