+ if(strstr(json_data,"set_vol")){
+
+
+ char *str_tmp = NULL;
+
+ char action_str[500]={0};
+
+ str_tmp = strstr(json_data,"\"data\":\"");
+
+ if(str_tmp)//解析password
+ {
+
+ str_tmp += strlen("\"data\":\"");
+ int count = str_count(str_tmp,'\"');
+ bk_printf("count:%d",count);
+ if(count < sizeof(action_str))
+ {
+
+
+ memcpy(action_str,str_tmp,count);
+ action_str[count] = 0;
+ bk_printf("set_vol:%s",action_str);
+
+ if(strstr(action_str,"+10")){
+
+ if(vc_cfg.VC_TTS_volume<=90){
+ vc_cfg.VC_TTS_volume+=10;
+
+ app_audio_set_master_volume(15*vc_cfg.VC_TTS_volume/100);
+ }
+
+ }else if(strstr(action_str,"-10")){
+
+ if(vc_cfg.VC_TTS_volume>10){
+ vc_cfg.VC_TTS_volume-=10;
+ app_audio_set_master_volume(15*vc_cfg.VC_TTS_volume/100);
+ }
+
+ }else{
+
+ int temp_vol=atoi(action_str);
+
+ if(temp_vol>0&&temp_vol<=100){
+
+ bk_printf("temp_vol:%d",temp_vol);
+ vc_cfg.VC_TTS_volume=temp_vol;
+
+ app_audio_set_master_volume(15*vc_cfg.VC_TTS_volume/100);
+
+
+ }
+
+ }
+ // if(is_guanji==0)
+ // send_express_str(action_str);
+ }
+
+ }
+
+ }
+