<?php
namespace app\mainapp\controller;
use think\facade\Session;

class Update
{
	
	public function index()
	{
		header("Content-type:text/json");  
		$appid = input('appid/s', "");
		$version = input('version/s', "");
		$rsp = array("status" => 0);
		
		if (isset($appid) && isset($version)) {  
		    if ($appid === "__UNI__6840E85") {
				$rsp = array(
					"status"			=> 1,
					"updatecon" 		=> "功能升级",
					"downurl"			=> "https://sc.laowushangcheng.com/app/index.html",
					"statusAndroid"		=> 0,
					"statusIos"			=> 0
				);
				// Android
				if ($version !== "3.1.0") { 
					$rsp["statusAndroid"] = 1;
					$rsp["downAndroidUrl"] = "https://sc.laowushangcheng.com/app/index.html";
				} 
				// Ios 
				if ($version !== "1.3.2") {  
					$rsp["statusIos"] = 0;
					$rsp["downIosUrl"] = "https://sc.laowushangcheng.com/app/index.html";
				}   
		    }  
		} 
		page_result(1, "", $rsp); 
	} 
	
}