商品错误情况下新增返回按钮
parent
83d340b897
commit
449b90af2d
|
|
@ -4,9 +4,9 @@
|
||||||
<view class="content bg-white">
|
<view class="content bg-white">
|
||||||
<view class="msg cr-gray">开启相应的权限服务</view>
|
<view class="msg cr-gray">开启相应的权限服务</view>
|
||||||
<view class="value cr-base">获取[ <text>位置信息</text> ]权限</view>
|
<view class="value cr-base">获取[ <text>位置信息</text> ]权限</view>
|
||||||
<button type="primary" open-type="openSetting" size="mini" @opensetting="setting_callback_event">打开设置页</button>
|
<button type="primary" open-type="openSetting" size="mini" @opensetting="setting_callback_event">打开设置页</button>
|
||||||
<view class="tc margin-top-sm">
|
<view class="tc margin-top-sm">
|
||||||
<navigator open-type="navigateBack" class="cp cr-gray dis-inline-block" hover-class="none">返回</navigator>
|
<navigator open-type="navigateBack" class="cp cr-gray dis-inline-block" hover-class="none">返回</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
|
|
||||||
var common_static_url = app.globalData.get_static_url('common');
|
var common_static_url = app.globalData.get_static_url('common');
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
common_static_url: common_static_url,
|
common_static_url: common_static_url,
|
||||||
params: null,
|
params: null,
|
||||||
is_show_open_setting: false,
|
is_show_open_setting: false,
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取权限
|
// 获取权限
|
||||||
init() {
|
init() {
|
||||||
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
||||||
var self = this;
|
var self = this;
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
|
|
@ -64,14 +64,14 @@
|
||||||
fail: res => {
|
fail: res => {
|
||||||
app.globalData.showToast("请先获取授权");
|
app.globalData.showToast("请先获取授权");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5 || APP
|
// #ifdef H5 || APP
|
||||||
this.choose_location();
|
this.choose_location();
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-KUAISHOU
|
// #ifdef MP-KUAISHOU
|
||||||
app.globalData.showToast('不支持地理位置选择!');
|
app.globalData.showToast('不支持地理位置选择!');
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -89,9 +89,6 @@
|
||||||
choose_location() {
|
choose_location() {
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: res => {
|
success: res => {
|
||||||
var position = app.globalData.map_gcj_to_bd(res.longitude, res.latitude);
|
|
||||||
res.longitude = position.lng;
|
|
||||||
res.latitude = position.lat;
|
|
||||||
uni.setStorageSync(this.cache_key, res);
|
uni.setStorageSync(this.cache_key, res);
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
} else {
|
} else {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: app.globalData.data.tabbar_pages[0]
|
url: app.globalData.data.tabbar_pages[0]
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -557,6 +557,11 @@
|
||||||
<!-- 提示信息 -->
|
<!-- 提示信息 -->
|
||||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||||
|
|
||||||
|
<!-- 无商品信息展示返回按钮 -->
|
||||||
|
<view v-if="goods == null && data_list_loding_status != 1" class="tc margin-top-xxxl">
|
||||||
|
<button type="default" class="bg-main br-main cr-white round" size="mini" @tap="goods_error_event">返回</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 快捷导航 -->
|
<!-- 快捷导航 -->
|
||||||
<component-quick-nav :propIsNav="true"></component-quick-nav>
|
<component-quick-nav :propIsNav="true"></component-quick-nav>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -1900,6 +1905,18 @@
|
||||||
}
|
}
|
||||||
app.globalData.url_open(url);
|
app.globalData.url_open(url);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 商品错误返回、无上一个则返回首页
|
||||||
|
goods_error_event(e) {
|
||||||
|
var prev_url = app.globalData.prev_page();
|
||||||
|
if(prev_url == null) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: app.globalData.data.tabbar_pages[0]
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<view v-if="item.operate_data.is_collect == 1 || ((item.express_data || null) != null && item.express_data.length > 0)" class="item-operation tr br-t padding-vertical-main">
|
<view v-if="item.operate_data.is_collect == 1 || ((item.express_data || null) != null && item.express_data.length > 0)" class="item-operation tr br-t padding-vertical-main">
|
||||||
<button v-if="item.operate_data.is_collect == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="collect_event" :data-value="item.id" :data-index="index" hover-class="none">收货</button>
|
<button v-if="item.operate_data.is_collect == 1" class="round bg-white cr-green br-green" type="default" size="mini" @tap="collect_event" :data-value="item.id" :data-index="index" hover-class="none">收货</button>
|
||||||
<block v-if="(item.express_data || null) != null && item.express_data.length > 0">
|
<block v-if="(item.express_data || null) != null && item.express_data.length > 0">
|
||||||
<block v-for="(ev, ei) in item.express_data" :key="item.id+ei">
|
<block v-for="(ev, ei) in item.express_data" :key="ei">
|
||||||
<button class="round bg-white cr-main br-main" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/express/detail/detail?oid='+item.id+'&eid='+ev.id+'&action_type=realstore'" hover-class="none">物流{{ei+1}}</button>
|
<button class="round bg-white cr-main br-main" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/express/detail/detail?oid='+item.id+'&eid='+ev.id+'&action_type=realstore'" hover-class="none">物流{{ei+1}}</button>
|
||||||
</block>
|
</block>
|
||||||
</block>
|
</block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue