Commit 6ca1a617 by 谢中龙

优化功能

parent f71194d8
......@@ -109,7 +109,8 @@
"authorization-modal": "/component/authorization-modal/authorization-modal",
"go-guid": "/component/goGuid/goGuid",
"loading": "/component/loading/loading",
"floatNav": "/component/floatNav/floatNav"
"floatNav": "/component/floatNav/floatNav",
"exception": "/component/exception/exception"
},
"window": {
"backgroundTextStyle": "dark",
......
// component/exception/exception.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
//重试
onTapReCall(){
this.triggerEvent('reCall', true);
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/exception/exception.wxml-->
<view class='exception-con'>
<image src='https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/net_exption.png' mode='aspectFit'></image>
<view class='exception-tip'>哎呦!网络似乎开小差了~</view>
<view class='exception-reconnet'>
<button bindtap='onTapReCall'>点我重试</button>
</view>
</view>
\ No newline at end of file
/* component/exception/exception.wxss */
.exception-con{
width: 100%;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.exception-con image{
width: 128rpx;
height: 128rpx;
}
.exception-tip{
font-size: 24rpx;
color: #999999;
margin-top: 10rpx;
}
.exception-reconnet button{
appearance: none;
background: #ffffff;
color: #333333;
border: solid 1rpx #eeeeee;
font-size: 24rpx;
padding: 0 50rpx;
letter-spacing: 2rpx;
margin-top: 50rpx;
}
\ No newline at end of file
<!--component/productListStyleTwo/productListStyleTwo.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<block wx:for="{{imageData}}" wx:key="*this">
<navigator hover-class="none" url="/pages/productDetail/productDetail?id={{menuSec.productId}}">
<block wx:for="{{imageData}}" wx:key="*this" wx:for-item="item">
<navigator hover-class="none" url="/pages/productDetail/productDetail?id={{item.productId}}">
<view class="hot-item border_box" >
<view class="hot-img-box">
<image class="hot-img" src="{{item.indexUrl}}" mode="widthFix" lazy-load />
......
......@@ -60,7 +60,6 @@ Component({
},
onTapShare(e) {
if (e.currentTarget.dataset.currentType != 2) return;
console.log(e)
let params = {
url: e.currentTarget.dataset.url,
title: e.currentTarget.dataset.title,
......
......@@ -29,7 +29,6 @@
data-id="{{id}}"
mode="widthFix"
bindload="imageLoad"
bindtap="gotoDetail"
/>
<view class="item-title-box">
<view class="item-title">{{headline}}</view>
......
......@@ -21,6 +21,8 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//2015 花在花园
//2016 阿吉豆
//2017 ACTREE wx2aae34874e88cdf5
//2992 山东盛联微商城 wx53dedc202ae0d0c2
const BRANCH_ID = 3001
const isMall = true
......@@ -317,7 +319,22 @@ const prod_brand_config = {
shareTitle: '【ACTREE】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/actree_logo.png',
},
//山东盛联微商城
2992 : {
appId: 'wx53dedc202ae0d0c2',
tunnelToken: 'f6c5031d172d94b6574293ef954a6f2d4e16657',
brandId: 2992,
plusIsOpen: true,
contactUsIsOpen: true,
contactUsPluginId: '50934d036dc2051758f4d934d7100b78',
hasTrial: false,
isMall: isMall,
orderingMustOpenCard: true,
isOpenSelfMention: true, // 是否开启门店自提
isNeedGetLocation: true,//是否开启小程序获取位置(提交订单时获取门店信息)
shareTitle: '【山东盛联微商城】',
logo: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/shandongshenglian_logo.jpg',
}
}
//默认分享logo
......
......@@ -256,6 +256,10 @@ wxService.page({
// 分享
_onTapShare(e){
const { memberId, member } = wx.getStorageSync('_baseUserInfo');
if (!memberId) {
return;
}
e.detail.title = e.detail.title ? e.detail.title : e.detail.headline;
let tentacleInfo = {
content: JSON.stringify(e.detail),
......
......@@ -14,7 +14,7 @@
<swiper autoplay="true" style="height: 750rpx;line-height: 100rpx;" bindchange="swiperChange">
<block wx:for="{{productInfo.listUrls}}" wx:key="index">
<swiper-item>
<image class="swiper-image" mode="widthFix" src="{{item}}" />
<image class="swiper-image" mode="widthFix" src="{{item}}" lazy-load/>
</swiper-item>
</block>
</swiper>
......
......@@ -38,7 +38,8 @@ wxService.page({
isQiye: false,
x : 0,
y : 0,
contactUsModal : false
contactUsModal : false,
apiIsOk : true,
},
/**
* 生命周期函数--监听页面加载
......@@ -333,9 +334,15 @@ wxService.page({
this.setData({
paddingBottom: this.data.paddingBottom,
loading : false
loading : false,
apiIsOk: true
});
}
else{
this.setData({
apiIsOk : false
})
}
}).finally(() => {
wx.hideLoading();
this.setData({
......
......@@ -75,4 +75,7 @@
<go-guid />
<!-- loading -->
<loading wx:if="{{loading}}"/>
\ No newline at end of file
<loading wx:if="{{loading}}"/>
<!-- 异常 -->
<exception wx:if="{{!apiIsOk}}" bind:reCall="onTapReCall"/>
......@@ -730,6 +730,12 @@ class WXService extends Http {
const { pageId } = ev.detail
wxService.router(`/subPackage/page/pages/subPage/subPage`).search({ pageId })
},
//监听异常事件点击
onTapReCall(){
this.onLoad(this.options);
this.onShow(this.options);
},
onShow: function (...args) {
const isExperiencer = wx.getStorageSync('isExperiencer')
const page = this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment