HolyKnightIX 2 anni fa
parent
commit
4dd77cc89d
5 ha cambiato i file con 26 aggiunte e 13 eliminazioni
  1. +17
    -4
      index/index.js
  2. +4
    -4
      index/index.ttml
  3. +3
    -3
      pages/couponorder/detail/index.ttml
  4. +1
    -1
      pages/couponorder/index/index.js
  5. +1
    -1
      pages/order/index/index.js

+ 17
- 4
index/index.js Vedi File

@@ -143,7 +143,7 @@ Page({

getsubMallList() {
Http.get({
url: '/mall/subMall?isAll=0',
url: '/mall/subMall?isAll=1',
}).then(res => {
tt.setStorageSync('shopList', JSON.stringify(res.data));
this.setData({
@@ -665,10 +665,16 @@ Page({
// 切换至最近的广场
const locationFlag = tt.getStorageSync('locationFlag');
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
} else {

return false
}
})
@@ -677,6 +683,7 @@ Page({
})
}
},
// 拒绝提供定位权限
fail: error => {
console.log(error);
const shopList = JSON.parse(tt.getStorageSync('shopList'));
@@ -692,7 +699,13 @@ Page({
}
})
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 => {



+ 4
- 4
index/index.ttml Vedi File

@@ -19,14 +19,14 @@

<!-- 距离信息的广场列表 -->
<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>
<image src="../assets/images/location.png" class="location"></image>
<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>
</view>
</view>


+ 3
- 3
pages/couponorder/detail/index.ttml Vedi File

@@ -63,12 +63,12 @@

<view class="orderNum">{{data.orderId}}</view>
</view>
<view class="notes">
<!-- <view class="notes">
<view class="notesText">购买须知</view>
<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>
</view>
</view> -->
</view>
</view>
</view>

+ 1
- 1
pages/couponorder/index/index.js Vedi File

@@ -141,7 +141,7 @@ Page({
onLoad: function (options) {
this.mallSync()
Http.get({
url: '/mall/subMall?isAll=0',
url: '/mall/subMall?isAll=1',
}).then(res => {
this.setData({
shopList: res.data,


+ 1
- 1
pages/order/index/index.js Vedi File

@@ -106,7 +106,7 @@ Page({

onLoad(e) {
Http.get({
url: '/mall/subMall?isAll=0',
url: '/mall/subMall?isAll=1',
}).then(res => {
this.setData({
shopList: res.data,


Caricamento…
Annulla
Salva