Commit e621837e authored by 王建威's avatar 王建威

新增地区页

parent 7038bfd5
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
"disableHostCheck": true, "disableHostCheck": true,
"proxy": { "proxy": {
"/uni/api": { "/uni/api": {
"target": "http://192.168.50.133:6564/", "target": "http://192.168.124.33:6564/",
"changeOrigin": true, "changeOrigin": true,
"secure": false, "secure": false,
"pathRewrite":{"^/uni/api":"api"} "pathRewrite":{"^/uni/api":"api"}
......
{ {
"name": "shop_mobile_uni", "name": "shop_mobile_uni",
"version": "1.0.0", "version": "1.0.1",
"description": "商城多端统一系统", "description": "商城多端统一系统",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
......
<template> <template>
<view> <view v-if="isLogin && !is_city">
<Fail />
</view>
<view v-else>
<view class="search_box"> <view class="search_box">
<uni-icons type="back" size="30" :style="{'position':'relative','top': '-2px'}" @click.native="goBack()"></uni-icons> <uni-icons type="back" size="30" :style="{'position':'relative','top': '-2px'}" @click.native="goBack()"></uni-icons>
<i @click="search"></i> <i @click="search"></i>
...@@ -38,6 +41,7 @@ ...@@ -38,6 +41,7 @@
import uniIcons from "@/components/uni-icons/uni-icons.vue"; import uniIcons from "@/components/uni-icons/uni-icons.vue";
import uniPagination from '@/components/uni-pagination/uni-pagination.vue'; import uniPagination from '@/components/uni-pagination/uni-pagination.vue';
import BottomBar from "@/components/BottomBar/BottomBar.vue"; import BottomBar from "@/components/BottomBar/BottomBar.vue";
import Fail from '../fail.vue';
import { php, go } from '../../common/host.js'; import { php, go } from '../../common/host.js';
export default { export default {
data() { data() {
...@@ -53,7 +57,8 @@ ...@@ -53,7 +57,8 @@
tabIndex: -1, tabIndex: -1,
params: {}, params: {},
keyword: '', keyword: '',
isLogin: 0 isLogin: 0,
is_city: 0
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -76,7 +81,8 @@ ...@@ -76,7 +81,8 @@
components: { components: {
uniIcons, uniIcons,
uniPagination, uniPagination,
BottomBar BottomBar,
Fail
}, },
methods: { methods: {
goBack() { goBack() {
...@@ -95,6 +101,7 @@ ...@@ -95,6 +101,7 @@
this.cate_list = credit_cates_list; this.cate_list = credit_cates_list;
this.page = page; this.page = page;
this.isLogin = res.data.login_flg; this.isLogin = res.data.login_flg;
this.is_city = res.data.city_flg;
} }
}); });
}, },
......
<template> <template>
<view> <view>
<view v-if="isLogin && !is_city">
<Fail />
</view>
<view v-else>
<view class="search_box"> <view class="search_box">
<uni-icons type="back" size="30" :style="{'position':'relative','top': '-2px'}" @click.native="goBack()"></uni-icons> <uni-icons type="back" size="30" :style="{'position':'relative','top': '-2px'}" @click.native="goBack()"></uni-icons>
<i @click="search"></i> <i @click="search"></i>
...@@ -32,12 +36,14 @@ ...@@ -32,12 +36,14 @@
<view class="nodata" v-else>暂无此类商品</view> <view class="nodata" v-else>暂无此类商品</view>
<BottomBar /> <BottomBar />
</view> </view>
</view>
</template> </template>
<script> <script>
import uniIcons from "@/components/uni-icons/uni-icons.vue"; import uniIcons from "@/components/uni-icons/uni-icons.vue";
import uniPagination from '@/components/uni-pagination/uni-pagination.vue'; import uniPagination from '@/components/uni-pagination/uni-pagination.vue';
import BottomBar from "@/components/BottomBar/BottomBar.vue"; import BottomBar from "@/components/BottomBar/BottomBar.vue";
import Fail from '../fail.vue';
import { php, go } from '../../common/host.js'; import { php, go } from '../../common/host.js';
export default { export default {
data() { data() {
...@@ -52,7 +58,8 @@ ...@@ -52,7 +58,8 @@
cate_id_1: '', cate_id_1: '',
tabIndex: -1, tabIndex: -1,
keyword: '', keyword: '',
isLogin: 0 isLogin: 0,
is_city: 0
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -74,7 +81,8 @@ ...@@ -74,7 +81,8 @@
components: { components: {
uniIcons, uniIcons,
uniPagination, uniPagination,
BottomBar BottomBar,
Fail
}, },
methods: { methods: {
goBack() { goBack() {
...@@ -93,6 +101,7 @@ ...@@ -93,6 +101,7 @@
this.cate_list = credit_cates_list; this.cate_list = credit_cates_list;
this.page = page; this.page = page;
this.isLogin = res.data.login_flg; this.isLogin = res.data.login_flg;
this.is_city = res.data.city_flg;
} }
}); });
}, },
......
<template>
<view class="fail_content">
<view class="main">
<image src="../static/common/chahua_jieshu@2x.png"></image>
<text class="fail_text">非常抱歉, 该地区暂未支持白条服务</text>
<text class="return_btn" @click="Return">({{seconds}})返回首页</text>
</view>
</view>
</template>
<script>
import { php } from '../common/host.js';
export default {
data() {
return {
seconds: 3
}
},
mounted() {
let timer = setInterval(() => {
this.seconds -= 1;
if(this.seconds == 0) {
clearInterval(timer);
window.location.href = php;
}
}, 1000);
},
methods: {
Return() {
window.location.href = php;
}
}
}
</script>
<style lang="less" scoped>
.fail_content {
width: 100%;
height: 100vh;
background: #FFF8CA;
padding-top: 0.5px;
.main {
width: 93.6%;
height: 83.2%;
margin: 24rpx auto 0;
background:linear-gradient(180deg,rgba(255,249,213,1) 0%,rgba(255,253,240,1) 100%);
box-shadow:0px 2px 10px 0px rgba(255,205,0,0.5);
image {
display: block;
margin: 160rpx auto 0;
width: 280rpx;
height: 192rpx;
}
.fail_text {
display: block;
text-align: center;
font-size: 32rpx;
line-height: 44rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
margin-top: 48rpx;
color: #212121;
}
.return_btn {
display: block;
width: 280rpx;
height: 80rpx;
border-radius: 40rpx;
background-color: #FFDB00;
color: #000;
text-align: center;
line-height: 80rpx;
margin: 48rpx auto 0;
}
}
}
</style>
<template> <template>
<view> <view v-if="isLogin && !is_city">
<Fail />
</view>
<view v-else>
<view class="content"> <view class="content">
<view class="flex"> <view class="flex">
<i class="logo"></i> <i class="logo"></i>
...@@ -86,12 +89,14 @@ ...@@ -86,12 +89,14 @@
<BottomBar /> <BottomBar />
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { php, go } from '../../common/host.js'; import { php, go } from '../../common/host.js';
import uniIcons from "@/components/uni-icons/uni-icons.vue"; import uniIcons from "@/components/uni-icons/uni-icons.vue";
import BottomBar from "@/components/BottomBar/BottomBar.vue"; import BottomBar from "@/components/BottomBar/BottomBar.vue";
import Fail from '../fail.vue';
export default { export default {
data() { data() {
return { return {
...@@ -103,7 +108,8 @@ ...@@ -103,7 +108,8 @@
current: 0, current: 0,
keyword: '', keyword: '',
isLogin: 0, isLogin: 0,
credit_flg: 0 credit_flg: 0,
is_city: 0
} }
}, },
onLoad() { onLoad() {
...@@ -111,7 +117,8 @@ ...@@ -111,7 +117,8 @@
}, },
components: { components: {
uniIcons, uniIcons,
BottomBar BottomBar,
Fail
}, },
methods: { methods: {
// changeTab(index) { // changeTab(index) {
...@@ -143,6 +150,7 @@ ...@@ -143,6 +150,7 @@
this.credit_goods_list = res.data.data.credit_goods_list; this.credit_goods_list = res.data.data.credit_goods_list;
this.isLogin = res.data.login_flg; this.isLogin = res.data.login_flg;
this.credit_flg = res.data.credit_flg; this.credit_flg = res.data.credit_flg;
this.is_city = res.data.city_flag;
if(res.data.data.customer_name) { if(res.data.data.customer_name) {
this.customer_name = res.data.data.customer_name; this.customer_name = res.data.data.customer_name;
} }
......
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