@@ -143,7 +143,7 @@ Page({ | |||||
getsubMallList() { | getsubMallList() { | ||||
Http.get({ | Http.get({ | ||||
url: '/mall/subMall?isAll=0', | |||||
url: '/mall/subMall?isAll=1', | |||||
}).then(res => { | }).then(res => { | ||||
tt.setStorageSync('shopList', JSON.stringify(res.data)); | tt.setStorageSync('shopList', JSON.stringify(res.data)); | ||||
this.setData({ | this.setData({ | ||||
@@ -665,10 +665,16 @@ Page({ | |||||
// 切换至最近的广场 | // 切换至最近的广场 | ||||
const locationFlag = tt.getStorageSync('locationFlag'); | const locationFlag = tt.getStorageSync('locationFlag'); | ||||
if ((item.distance == nearestDistance)) { | if ((item.distance == nearestDistance)) { | ||||
that.bindPickerChange('', index, item.tenantId) | |||||
tt.setStorageSync('locationFlag', false); | |||||
if (locationFlag) { | |||||
that.bindPickerChange('', index, item.tenantId) | |||||
tt.setStorageSync('locationFlag', false); | |||||
} else { | |||||
that.bindPickerChange('', ttt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) | |||||
} | |||||
return true | return true | ||||
} else { | } else { | ||||
return false | return false | ||||
} | } | ||||
}) | }) | ||||
@@ -677,6 +683,7 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
// 拒绝提供定位权限 | |||||
fail: error => { | fail: error => { | ||||
console.log(error); | console.log(error); | ||||
const shopList = JSON.parse(tt.getStorageSync('shopList')); | const shopList = JSON.parse(tt.getStorageSync('shopList')); | ||||
@@ -692,7 +699,13 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
console.log(obj, 'obj'); | console.log(obj, 'obj'); | ||||
that.bindPickerChange('', obj.index, obj.tenantId) | |||||
const locationFlag = tt.getStorageSync('locationFlag'); | |||||
if (locationFlag) { | |||||
that.bindPickerChange('', obj.index, obj.tenantId) | |||||
tt.setStorageSync('locationFlag', false); | |||||
} else { | |||||
that.bindPickerChange('', ttt.getStorageSync('mallIndex'), tt.getStorageSync('mallTenantId')) | |||||
} | |||||
}, | }, | ||||
complete: finish => { | complete: finish => { | ||||
@@ -19,14 +19,14 @@ | |||||
<!-- 距离信息的广场列表 --> | <!-- 距离信息的广场列表 --> | ||||
<view class="pickerMall" tt:if="{{shopList.length>1 && shopList[0].distanceName}}"> | <view class="pickerMall" tt:if="{{shopList.length>1 && shopList[0].distanceName}}"> | ||||
<picker mode="selector" bindchange="bindPickerChange" value="{{index}}" range="{{shopList}}" | |||||
range-key="distanceName" disabled="{{false}}"> | |||||
<picker mode="selector" bindchange="bindPickerChange" value="{{index}}" range="{{shopList}}" range-key="name" | |||||
disabled="{{false}}"> | |||||
<view> | <view> | ||||
<view> | <view> | ||||
<image src="../assets/images/location.png" class="location"></image> | <image src="../assets/images/location.png" class="location"></image> | ||||
<text class="mallName">{{ shopList[index].name }}</text> | <text class="mallName">{{ shopList[index].name }}</text> | ||||
<text tt:if="{{shopList[index].distance_str}}" class="distance_str">距您{{ | |||||
shopList[index].distance_str}}</text> | |||||
<!-- <text tt:if="{{shopList[index].distance_str}}" class="distance_str">距您{{ | |||||
shopList[index].distance_str}}</text> --> | |||||
<image src="../assets/itemImg/arrow-right-l.png" class="right"></image> | <image src="../assets/itemImg/arrow-right-l.png" class="right"></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -63,12 +63,12 @@ | |||||
<view class="orderNum">{{data.orderId}}</view> | <view class="orderNum">{{data.orderId}}</view> | ||||
</view> | </view> | ||||
<view class="notes"> | |||||
<!-- <view class="notes"> | |||||
<view class="notesText">购买须知</view> | <view class="notesText">购买须知</view> | ||||
<text class="introduce" tt:if="{{data.remark}}"> {{data.remark}}</text> | <text class="introduce" tt:if="{{data.remark}}"> {{data.remark}}</text> | ||||
<!-- <text class="notesText" tt:if="{{curHtml==""}}">{{detailObj.remark}}</text> --> | |||||
<text class="notesText" tt:if="{{curHtml==""}}">{{detailObj.remark}}</text> | |||||
<rich-text class="rich_text" tt:if="{{curHtml!='' && !data.remark}}" nodes="{{curHtml}}"></rich-text> | <rich-text class="rich_text" tt:if="{{curHtml!='' && !data.remark}}" nodes="{{curHtml}}"></rich-text> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
@@ -141,7 +141,7 @@ Page({ | |||||
onLoad: function (options) { | onLoad: function (options) { | ||||
this.mallSync() | this.mallSync() | ||||
Http.get({ | Http.get({ | ||||
url: '/mall/subMall?isAll=0', | |||||
url: '/mall/subMall?isAll=1', | |||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | this.setData({ | ||||
shopList: res.data, | shopList: res.data, | ||||
@@ -106,7 +106,7 @@ Page({ | |||||
onLoad(e) { | onLoad(e) { | ||||
Http.get({ | Http.get({ | ||||
url: '/mall/subMall?isAll=0', | |||||
url: '/mall/subMall?isAll=1', | |||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | this.setData({ | ||||
shopList: res.data, | shopList: res.data, | ||||