|
@@ -58,7 +58,7 @@
|
|
|
width:100%;
|
|
|
height: 4.03rem;
|
|
|
background: url('../../image/881649.jpg') ;
|
|
|
- background-repeat:no-repeat;
|
|
|
+ background-repeat:no-repeat;
|
|
|
background-size:100% 100%;
|
|
|
}
|
|
|
.hotel-top-line{
|
|
@@ -498,6 +498,7 @@ var _title = '';
|
|
|
var _shareurl = '';
|
|
|
var _page = '1';
|
|
|
var _data_toggle = "#tab1";
|
|
|
+var imgUrl="";
|
|
|
apiready = function() {
|
|
|
_storeid = api.pageParam.keyid;
|
|
|
$(".goods-list").attr("page", "1");
|
|
@@ -550,7 +551,7 @@ $(function() {
|
|
|
$("#div_top section").addClass("fixed_top");
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
$('img').error(function(){
|
|
|
$(this).attr('src', '/image/logo2.png');
|
|
|
})
|
|
@@ -567,15 +568,14 @@ function getRouteData(_storeid) {
|
|
|
dataType: 'json',
|
|
|
type: 'post',
|
|
|
success: function(datas) {
|
|
|
- // toast_loding_hide();
|
|
|
if (datas.result) {
|
|
|
+ var img=siteurl + "uploads/home/store/" + datas.data.store_id + "/" + datas.data.store_banner;
|
|
|
+
|
|
|
$("#store_name").html(datas.data.store_name);
|
|
|
$("#store_description").html(datas.data.store_summary);
|
|
|
$(".hotel-top").css("background-image", "url(" + siteurl + "uploads/home/store/" + datas.data.store_id + "/" + datas.data.store_banner + ")");
|
|
|
_shareimg = siteurl + "uploads/home/store/" + datas.data.store_id + "/" + datas.data.store_logo;
|
|
|
- // _description = limitNumber(datas.data.store_description, 30);
|
|
|
_title = datas.data.store_name;
|
|
|
- // $(".business-time").html("营业时间:" + datas.store_keywords);
|
|
|
_shareurl = siteurl + 'v1/view/market.html';
|
|
|
// api.hideProgress();
|
|
|
datas.data.has_collected ? $("#favorite").attr("src", "../../image/favorite_hl.png") : $("#favorite").attr("src", "../../image/goods_buy_favorite.png");
|
|
@@ -590,11 +590,14 @@ function getRouteData(_storeid) {
|
|
|
$("#store_phone").html('<a style="color: rgba(0,0,0,.5);">暂无</a>');
|
|
|
}
|
|
|
//
|
|
|
+ if(datas.data.store_slide.length > 1){
|
|
|
+ imgUrl=datas.data.store_slide[0];
|
|
|
+ }else{
|
|
|
+ imgUrl=siteurl + "uploads/home/store/" + datas.data.store_id + "/" + datas.data.store_banner;
|
|
|
+ }
|
|
|
if (datas.data.store_slide.length > 0) {
|
|
|
$.each(datas.data.store_slide, function(index, item) {
|
|
|
- // $(".swiper-wrapper").append('<div class="swiper-slide"><img src="'+ item + '"/></div>');
|
|
|
$(".swiper-wrapper").append('<div class="swiper-slide bg-full" style="background: url('+ item + ');">');
|
|
|
- // _images.push(siteurl + "uploads/home/store/goods/" + datas.data.store_id + "/" + item.goodsimage_url);
|
|
|
})
|
|
|
}
|
|
|
var swiper = new Swiper('.swiper-container', {
|
|
@@ -664,7 +667,6 @@ function getstoreCategory() {
|
|
|
_html += '</div><div class="weui-flex">';
|
|
|
$(".weui-tab").css("height", "4.7rem");
|
|
|
}
|
|
|
- // console.log(xx[i])
|
|
|
if (xx[i]) {
|
|
|
_html += '<div class="weui-flex__item"><div class="placeholder" gcid="' + xx[i].gc_id + '"><img style="height: 1rem;" src="' + xx[i].pic + '" /><p>' + xx[i].gc_name + '</p></div></div>';
|
|
|
} else {
|
|
@@ -706,7 +708,6 @@ $(".hotel-itemx").on("tap", function() {
|
|
|
$("#tab1").on("tap", ".placeholder", function() {
|
|
|
var _gcid = $(this).attr("gcid");
|
|
|
var _categoryname = $(this).children("p").html();
|
|
|
- // console.log(_categoryname, _gcid);return false;
|
|
|
if (!_gcid) {
|
|
|
return false;
|
|
|
}
|
|
@@ -724,7 +725,6 @@ $("#tab1").on("tap", ".placeholder", function() {
|
|
|
})
|
|
|
|
|
|
$("#tab2").on("tap", "img", function() {
|
|
|
- // console.log($(this).attr("src"));
|
|
|
gallery_qz($(this).attr("src"));
|
|
|
});
|
|
|
|
|
@@ -1020,40 +1020,48 @@ $(".share-item-cancel").on("tap", function() {
|
|
|
_show = false;
|
|
|
return false;
|
|
|
})
|
|
|
-///
|
|
|
$(".share-item-friend").on("tap", function() {
|
|
|
-
|
|
|
- var wx = api.require('wx');
|
|
|
- wx.shareWebpage({
|
|
|
- scene: 'session',
|
|
|
- title: _title,
|
|
|
- description: _description,
|
|
|
- thumb: 'widget://image/logo2.png',
|
|
|
- contentUrl: _shareurl
|
|
|
- }, function(ret, err) {
|
|
|
- // $("#store_description").html(JSON.stringify(err) + JSON.stringify(ret));
|
|
|
- if (ret.status) {
|
|
|
- api.toast({ msg: '分享成功!' });
|
|
|
- setPoint();
|
|
|
- } else {
|
|
|
- if (err.code == 2) {
|
|
|
- api.toast({ msg: '用户取消' });
|
|
|
- } else if (err.code == 3) {
|
|
|
- api.toast({ msg: '发送失败' });
|
|
|
- } else if (err.code == 4) {
|
|
|
- api.toast({ msg: '授权拒绝' });
|
|
|
- } else {
|
|
|
- api.toast({ msg: '发送失败!' });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- $(".share-item").slideUp(500, function() {});
|
|
|
+ var wx = api.require('wx');
|
|
|
+ api.download({
|
|
|
+ url: imgUrl,
|
|
|
+ // savePath: 'fs://test.rar',
|
|
|
+ report: false,
|
|
|
+ cache: true,
|
|
|
+ allowResume: true
|
|
|
+ }, function(ret, err) {
|
|
|
+ if (ret.state == 1) {
|
|
|
+ wx.shareProgram({
|
|
|
+ scene: 'session',
|
|
|
+ description: _description,
|
|
|
+ title: _title,
|
|
|
+ thumb: ret.savePath,
|
|
|
+ webpageUrl: _shareurl,
|
|
|
+ userName: 'gh_344fb21bce0f',
|
|
|
+ path: 'pages/index/hotel?id='+_storeid,
|
|
|
+ }, function(ret, err) {
|
|
|
+ if (ret.status) {
|
|
|
+ api.toast({ msg: '分享成功!' });
|
|
|
+ setPoint();
|
|
|
+ } else {
|
|
|
+ if (err.code == 2) {
|
|
|
+ api.toast({ msg: '用户取消' });
|
|
|
+ } else if (err.code == 3) {
|
|
|
+ api.toast({ msg: '发送失败' });
|
|
|
+ } else if (err.code == 4) {
|
|
|
+ api.toast({ msg: '授权拒绝' });
|
|
|
+ } else {
|
|
|
+ api.toast({ msg: '发送失败!' });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $(".share-item").slideUp(500, function() {});
|
|
|
$(".weui-mask").remove();
|
|
|
_show = false;
|
|
|
return false;
|
|
|
})
|
|
|
$(".share-item-cale").on("tap", function() {
|
|
|
-
|
|
|
var wx = api.require('wx');
|
|
|
wx.shareWebpage({
|
|
|
scene: 'timeline',
|
|
@@ -1171,4 +1179,4 @@ $.fn.fixedDiv = function(actCls) {
|
|
|
$('#fix1').fixedDiv('mask-hidden')
|
|
|
</script>
|
|
|
|
|
|
-</html>
|
|
|
+</html>
|