当前位置:首页 » 网页前端 » 鞋子购物网站前端源码
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

鞋子购物网站前端源码

发布时间: 2023-07-24 22:13:35

① 求一个完整的javaweb项目的购物网站源代码

JAVA WEB项目的网络购物网站源代码的话,很复杂的话,肯定是没有的,你可以去eoe或者安卓巴士网站看看有没有源码

② 求一套完整的JAVA WEB项目的网络购物网站源代码

/**
*@description:
*@authorchenshiqiangE-mail:[email protected]
*@date2014年9月7日下午2:51:50
*@version1.0
*/
packagecom.example.map;

importjava.util.ArrayList;
importjava.util.Collections;
importjava.util.HashSet;
importjava.util.List;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.support.v4.view.PagerAdapter;
importandroid.support.v4.view.PagerTabStrip;
importandroid.support.v4.view.ViewPager;
importandroid.text.Editable;
importandroid.util.Log;
importandroid.view.LayoutInflater;
importandroid.view.View;
importandroid.view.ViewGroup;
importandroid.widget.ExpandableListView;
importandroid.widget.ListView;
importcom..mapapi.map.offline.MKOLSearchRecord;
importcom..mapapi.map.offline.MKOLUpdateElement;
importcom..mapapi.map.offline.MKOfflineMap;
importcom..mapapi.map.offline.MKOfflineMapListener;
importcom.example.map.adapters.OfflineExpandableListAdapter;
importcom.example.map.adapters.OfflineMapAdapter;
importcom.example.map.adapters.OfflineMapManagerAdapter;
importcom.example.map.interfaces.;
importcom.example.map.models.OfflineMapItem;
importcom.example.map.utils.CsqBackgroundTask;
importcom.example.map.utils.ToastUtil;
importcom.example.system.R;

istener,
{

//------------------------Constants------------------------

//-------------------------Fields--------------------------

privateViewPagerviewpager;
privatePagerTabStrippagertab;

privateMySearchViewsvDown;
privateListViewlvDown;

privateMySearchViewsvAll;
;
privateListViewlvSearchResult;

privateList<View>views=newArrayList<View>(2);
privateList<String>titles=newArrayList<String>(2);

privateMKOfflineMapmOffline=null;

;
;
;

privateList<OfflineMapItem>itemsDown;//下载或下载中城市
privateList<OfflineMapItem>itemsAll;//所有城市,与热门城市及下载管理对象相同

privateList<OfflineMapItem>itemsProvince;
privateList<List<OfflineMapItem>>itemsProvinceCity;

//-----------------------Constructors----------------------

//--------Methodsfor/fromSuperClass/Interfaces-----------

@Override
protectedvoidonCreate(BundlesavedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_offline_map);

// finalStringpackname=this.getPackageName();
// PackageInfopackageInfo;
// try
// {
// packageInfo=this.getPackageManager().getPackageInfo(packname,PackageManager.GET_SIGNATURES);
//
//
// if(code==-00)
// {
//初始化离线地图管理
mOffline=newMKOfflineMap();
mOffline.init(this);

initViews();

viewpager.setCurrentItem(1);
// }
// }
// catch(NameNotFoundExceptione)
// {
// e.printStackTrace();
// }
}

privatebooleanisResumed=false;

@Override
protectedvoidonResume()
{
super.onResume();

if(!isResumed)
{
isResumed=true;
loadData();
}
}

@Override
protectedvoidonDestroy()
{
super.onDestroy();

mOffline.destroy();
}

/**
*
*@authorchenshiqiangE-mail:[email protected]
*@paramtype
*事件类型:MKOfflineMap.TYPE_NEW_OFFLINE,MKOfflineMap.TYPE_DOWNLOAD_UPDATE,MKOfflineMap.TYPE_VER_UPDATE.
*@paramstate
*事件状态:当type为TYPE_NEW_OFFLINE时,表示新安装的离线地图数目.当type为TYPE_DOWNLOAD_UPDATE时,表示更新的城市ID.
*/
@Override
(inttype,intstate)
{
switch(type)
{
caseMKOfflineMap.TYPE_DOWNLOAD_UPDATE:
MKOLUpdateElementupdate=mOffline.getUpdateInfo(state);

if(setElement(update,true)!=null)
{
if(itemsDown!=null&&itemsDown.size()>1)
{
Collections.sort(itemsDown);
}

refreshDownList();

}
else
{
downAdapter.notifyDataSetChanged();
}

allSearchAdapter.notifyDataSetChanged();
allCountryAdapter.notifyDataSetChanged();
break;

caseMKOfflineMap.TYPE_NEW_OFFLINE:
//有新离线地图安装
Log.d("OfflineDemo",String.format("addofflinemapnum:%d",state));
break;

caseMKOfflineMap.TYPE_VER_UPDATE:
//版本更新提示
break;
}
}

/**
*网络下载状态改变(暂停--》恢复)居然不回调,所以改变状态时自己得增加接口监听状态改变刷新界面
*
*@authorchenshiqiangE-mail:[email protected]
*@paramitem
*有状态改变的item
*@paramremoved
*item是否被删除
*/
@Override
publicvoidstatusChanged(OfflineMapItemitem,booleanremoved)
{
if(removed)
{
for(inti=itemsDown.size()-1;i>=0;i--)
{
OfflineMapItemtemp=itemsDown.get(i);
if(temp.getCityId()==item.getCityId())
{
itemsDown.remove(i);
}
}
refreshDownList();

}
else
{
loadData();
downAdapter.notifyDataSetChanged();
}

allSearchAdapter.notifyDataSetChanged();
allCountryAdapter.notifyDataSetChanged();
}

//---------------------Methodspublic----------------------

publicvoidtoDownloadPage()
{
viewpager.setCurrentItem(0);
}

//---------------------Methodsprivate---------------------

privatevoidinitViews()
{
//TODO
viewpager=(ViewPager)findViewById(R.id.viewpager);
pagertab=(PagerTabStrip)findViewById(R.id.pagertab);

LayoutInflaterinf=LayoutInflater.from(this);
Viewv1=inf.inflate(R.layout.view_offline_download,null,false);
svDown=(MySearchView)v1.findViewById(R.id.svDown);
lvDown=(ListView)v1.findViewById(R.id.lvDown);
views.add(v1);

Viewv2=inf.inflate(R.layout.view_offline_countrys,null,false);
svAll=(MySearchView)v2.findViewById(R.id.svAll);
lvWholeCountry=(ExpandableListView)v2.findViewById(R.id.lvWholeCountry);
lvSearchResult=(ListView)v2.findViewById(R.id.lvSearchResult);
views.add(v2);

titles.add("下载管理");
titles.add("城市列表");

pagertab.setTabIndicatorColor(0xff00cccc);
pagertab.setDrawFullUnderline(false);
pagertab.setBackgroundColor(0xFF38B0DE);
pagertab.setTextSpacing(50);

viewpager.setOffscreenPageLimit(2);
viewpager.setAdapter(newMyPagerAdapter());

svDown.setSearchListener(newMySearchView.SearchListener()
{
@Override
publicvoidafterTextChanged(Editabletext)
{
refreshDownList();
}

@Override
publicvoidsearch(Stringtext)
{
}
});

svAll.setSearchListener(newMySearchView.SearchListener()
{
@Override
publicvoidafterTextChanged(Editabletext)
{
refreshAllSearchList();
}

@Override
publicvoidsearch(Stringtext)
{
}
});

downAdapter=newOfflineMapManagerAdapter(this,mOffline,this);
lvDown.setAdapter(downAdapter);

allSearchAdapter=newOfflineMapAdapter(this,mOffline,this);
lvSearchResult.setAdapter(allSearchAdapter);

allCountryAdapter=(this,mOffline,this);
lvWholeCountry.setAdapter(allCountryAdapter);
lvWholeCountry.setGroupIndicator(null);
}

/**
*刷新下载列表,根据搜索关键字及itemsDown下载管理数量变动时调用
*/
privatevoidrefreshDownList()
{
Stringkey=svDown.getInputText();
if(key==null||key.length()<1)
{
downAdapter.setDatas(itemsDown);

}
else
{
List<OfflineMapItem>filterList=newArrayList<OfflineMapItem>();
if(itemsDown!=null&&!itemsDown.isEmpty())
{
for(OfflineMapItemi:itemsDown)
{
if(i.getCityName().contains(key))
{
filterList.add(i);
}
}
}

downAdapter.setDatas(filterList);
}
}

/**
*刷新所有城市搜索结果
*/
()
{
Stringkey=svAll.getInputText();
if(key==null||key.length()<1)
{
lvSearchResult.setVisibility(View.GONE);
lvWholeCountry.setVisibility(View.VISIBLE);

allSearchAdapter.setDatas(null);

}
else
{
lvSearchResult.setVisibility(View.VISIBLE);
lvWholeCountry.setVisibility(View.GONE);

List<OfflineMapItem>filterList=newArrayList<OfflineMapItem>();
if(itemsAll!=null&&!itemsAll.isEmpty())
{
for(OfflineMapItemi:itemsAll)
{
if(i.getCityName().contains(key))
{
filterList.add(i);
}
}
}

allSearchAdapter.setDatas(filterList);
}
}

privatevoidloadData()
{

newCsqBackgroundTask<Void>(this)
{
@Override
protectedVoidonRun()
{
//TODOAuto-generatedmethodstub
//导入离线地图包
//将从官网下载的离线包解压,把vmp文件夹拷入SD卡根目录下的BaiMapSdk文件夹内。
//把网站上下载的文件解压,将BaiMapvmpl里面的.dat_svc文件,拷贝到手机BaiMapSDK/vmp/h目录下
intnum=mOffline.importOfflineData();
if(num>0)
{
ToastUtil.showToastInfo(BaiOfflineMapActivity.this,"成功导入"+num+"个离线包",false);
}

List<MKOLSearchRecord>all=null;
try
{
all=mOffline.getOfflineCityList();
}
catch(Exceptione)
{
e.printStackTrace();
}
if(all==null||all.isEmpty())
{
ToastUtil.showToastInfo(BaiOfflineMapActivity.this,"未获取到离线地图城市数据,可能有其他应用正在使用网络离线地图功能!",false);
returnnull;
}

List<MKOLSearchRecord>hotCity=mOffline.getHotCityList();
HashSet<Integer>hotCityIds=newHashSet<Integer>();
if(!hotCity.isEmpty())
{
for(MKOLSearchRecordr:hotCity)
{
hotCityIds.add(r.cityID);
}
}

itemsAll=newArrayList<OfflineMapItem>();
itemsDown=newArrayList<OfflineMapItem>();
itemsProvince=newArrayList<OfflineMapItem>();
itemsProvinceCity=newArrayList<List<OfflineMapItem>>();

//cityType0:全国;1:省份;2:城市,如果是省份,可以通过childCities得到子城市列表

//全国概略图、直辖市、港澳子城市列表
ArrayList<MKOLSearchRecord>childMunicipalities=newArrayList<MKOLSearchRecord>();

proHot.cityName="热门城市";
proHot.childCities=cs;
List<MKOLUpdateElement>updates=mOffline.getAllUpdateInfo();
if(updates!=null&&updates.size()>0)
{
}

@Override
protectedvoidonResult(Voidresult)
{
//TODOAuto-generatedmethodstub
refreshDownList();
refreshAllSearchList();

allCountryAdapter.setDatas(itemsProvince,itemsProvinceCity);
}
}.execute();
}