|
@@ -16,99 +16,22 @@
|
|
|
<!--通知公告-->
|
|
|
<view class="notice">
|
|
|
<u-notice-bar color="#848484" :text="noticeList" :step="true" direction="column" mode="link"
|
|
|
- bgColor="white" speed="300" url="/pages/notice/index"></u-notice-bar>
|
|
|
+ bgColor="white" speed="300" url="/pages/news/list"></u-notice-bar>
|
|
|
</view>
|
|
|
<!--菜单-->
|
|
|
<view class="menu">
|
|
|
<view class="msn" v-for="(item, index) in menuList" :key="index" @click="navTo(item.path)">
|
|
|
<view class="out">
|
|
|
<view class="int">
|
|
|
- <image :src="item.icon" mode="widthFix" style="max-width: 54px; max-height: 52px; object-fit: contain;"></image>
|
|
|
+ <image :src="item.icon" mode="widthFix"
|
|
|
+ style="max-width: 54px; max-height: 52px; object-fit: contain;"></image>
|
|
|
<view class="tit">{{ item.menuName }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="clear"></view>
|
|
|
</view>
|
|
|
- <view class="menu">
|
|
|
- <!--边民菜单与组长菜单-->
|
|
|
- <view class="menu" v-if="user.userType == 1 || user.userType == 2">
|
|
|
- <view class="msn" @click="go('/pages/market/one/leader/order')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #00aaff; color: #ffffff"></view>
|
|
|
- <view class="tit">一级市场交易</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="msn" @click="go('/pages/market/two/leader/order')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #00aaff; color: #ffffff"></view>
|
|
|
- <view class="tit">二级市场交易</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="msn" @click="go('/pages/market/order/order')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #00aaff; color: #aaffff"></view>
|
|
|
- <view class="tit">商品上架</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!--收购商-->
|
|
|
- <view class="menu" v-if="user.userType == 3">
|
|
|
- <view class="msn" @click="go('/pages/market/two/purchaser/order/cart')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #fff6e0; color: #f1ba41"></view>
|
|
|
- <view class="tit">购物车</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="msn" @click="go('/pages/market/two/purchaser/address/list')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #fff6e0; color: #f1ba41"></view>
|
|
|
- <view class="tit">地址管理</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="msn" @click="go('/pages/market/two/purchaser/order/list')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #f0dcfc; color: #b064d8"></view>
|
|
|
- <view class="tit">我的订单</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="msn" @click="go('/pages/authentication/purchaser/info')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #e0ffff; color: #00bfff"></view>
|
|
|
- <view class="tit">我的认证</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!--合作社-->
|
|
|
- <view class="menu" v-if="user.userType == 6">
|
|
|
- <view class="msn" @click="go('/pages/market/one/cooperative/order')">
|
|
|
- <view class="out">
|
|
|
- <view class="int">
|
|
|
- <view class="icon ioc" style="background-color: #e1f6e9; color: #47cf74"></view>
|
|
|
- <view class="tit">结算单</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
+
|
|
|
<!--最新资讯-->
|
|
|
<view class="news">
|
|
|
<view class="vlabel">
|
|
@@ -135,7 +58,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-popup :show="show" @close="close()" round="15" mode="center" :closeable="true" :closeOnClickOverlay="false"
|
|
|
+ <u-popup :show="show" @close="close()" round="15" mode="center" :closeable="false" :closeOnClickOverlay="false"
|
|
|
:customStyle="{ width: '90%' }">
|
|
|
<view class="ppopup">
|
|
|
<u-divider text="交易订单提醒" textSize="16"></u-divider>
|
|
@@ -156,8 +79,8 @@
|
|
|
<button class="btn" @click="confirm()">去处理</button>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
- <u-popup :show="faceRegister" @close="close()" round="15" mode="center" :closeOnClickOverlay="false"
|
|
|
- :customStyle="{ width: '90%' }">
|
|
|
+ <u-popup :show="faceRegister" @close="close()" round="15" mode="center" :closeable="false"
|
|
|
+ :closeOnClickOverlay="false" :customStyle="{ width: '90%' }">
|
|
|
<view class="reflush" @click="checkFace">刷新</view>
|
|
|
<view class="ppopup">
|
|
|
<u-divider text="人脸录入" textSize="16"></u-divider>
|
|
@@ -173,6 +96,36 @@
|
|
|
<button class="btn" @click="go('/pages/face/faceRegister')">马上录入</button>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-popup :show="purchaser" round="15" mode="center" :closeable="false" :closeOnClickOverlay="false"
|
|
|
+ :customStyle="{ width: '90%' }">
|
|
|
+ <view class="reflush" @click="getTbPurchaserAuth()">刷新</view>
|
|
|
+ <view class="ppopup">
|
|
|
+ <u-divider text="提醒" textSize="16"></u-divider>
|
|
|
+ <view class="contents">
|
|
|
+ <view style="text-indent: 2rem;line-height: 60rpx;">
|
|
|
+ 您的资料不完善或正在审核中,请前往补充或者等待管理员审核!</view>
|
|
|
+ </view>
|
|
|
+ <button class="btn" @click="go('/pages/authentication/index')">前往查看</button>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <u-popup :show="update.visible" round="15" mode="center" :closeable="false" :closeOnClickOverlay="false"
|
|
|
+ :customStyle="{ width: '90%' }">
|
|
|
+ <view class="ppopup">
|
|
|
+ <u-divider text="有新版本更新!" textSize="16"></u-divider>
|
|
|
+ <view class="contents">
|
|
|
+ <view style="text-indent: 2rem;line-height: 60rpx;">
|
|
|
+ 更新内容:{{update.content}}
|
|
|
+ </view>
|
|
|
+ <view style="text-indent: 2rem;line-height: 60rpx;">
|
|
|
+ 当前版本号:{{update.currentVersion}}
|
|
|
+ </view>
|
|
|
+ <view style="text-indent: 2rem;line-height: 60rpx;">
|
|
|
+ 新版本号:{{update.version}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <button class="btn" @click="updateApk">立即更新</button>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -183,7 +136,7 @@
|
|
|
keyword: '',
|
|
|
bannerList: [],
|
|
|
newsList: [],
|
|
|
- noticeList: ['天保物流APP上线了', '关于天保物流边民互市贸易开通注意事项'],
|
|
|
+ noticeList: [],
|
|
|
roleMenu: [],
|
|
|
menuList: [],
|
|
|
count: 0,
|
|
@@ -191,7 +144,15 @@
|
|
|
order: {},
|
|
|
user: {},
|
|
|
faceRegister: false,
|
|
|
- cooper_entrust: 2
|
|
|
+ cooper_entrust: 2,
|
|
|
+ purchaser: false,
|
|
|
+ update: {
|
|
|
+ visible: false,
|
|
|
+ currentVersion: '',
|
|
|
+ version: '',
|
|
|
+ content: '',
|
|
|
+ url: ''
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -209,25 +170,76 @@
|
|
|
this.checkFace()
|
|
|
this.keyword = '';
|
|
|
this.getRead();
|
|
|
+ this.getUpdateInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getUpdateInfo() {
|
|
|
+ let currentVersion = uni.getAppBaseInfo().appVersion;
|
|
|
+ this.http.request({
|
|
|
+ url: '/sp-admin/app/updateInfo',
|
|
|
+ loading: 'false',
|
|
|
+ success: resp => {
|
|
|
+ let version = resp.data.data.version;
|
|
|
+ this.update = {
|
|
|
+ visible: currentVersion != version,
|
|
|
+ currentVersion: currentVersion,
|
|
|
+ content: resp.data.data.content,
|
|
|
+ version: version,
|
|
|
+ url: resp.data.data.url
|
|
|
+ };
|
|
|
+ console.log(this.update)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updateApk() {
|
|
|
+ plus.runtime.openURL(this.update.url)
|
|
|
+ return;
|
|
|
+ var dtask = plus.downloader.createDownload(
|
|
|
+ this.update.url, {
|
|
|
+ force: true
|
|
|
+ }, (d, status) => {
|
|
|
+ if (status == 200) {
|
|
|
+ console.log("下载成功安装: " + d.filename);
|
|
|
+ plus.runtime.install(d.filename)
|
|
|
+ } else {
|
|
|
+ plus.nativeUI.alert("安装失败,请稍候重试: " + status)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ dtask.start();
|
|
|
+
|
|
|
+ },
|
|
|
close() {
|
|
|
this.show = false;
|
|
|
},
|
|
|
checkFace() {
|
|
|
- let user = this.getUser();
|
|
|
+ let user = this.getUser();
|
|
|
+ this.faceRegister = false;
|
|
|
if ((user.userType == 1 || user.userType == 2) && user.face == 0) {
|
|
|
this.faceRegister = true;
|
|
|
return;
|
|
|
+ } else if (user.userType == 3) {
|
|
|
+ this.getTbPurchaserAuth()
|
|
|
}
|
|
|
- this.faceRegister=false;
|
|
|
- this.getOrderConfirm();
|
|
|
},
|
|
|
go(url) {
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
});
|
|
|
},
|
|
|
+ getTbPurchaserAuth() {
|
|
|
+ this.http.request({
|
|
|
+ url: '/level-two-server/app/TbPurchaser/info',
|
|
|
+ loading: 'false',
|
|
|
+ success: res => {
|
|
|
+ let resp = res.data;
|
|
|
+ if (!resp.data || resp.data.judgeStatus == 2) {
|
|
|
+ this.purchaser = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log(resp);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取待处理的订单弹出
|
|
|
getOrderConfirm() {
|
|
|
let user = this.getUser();
|
|
@@ -238,13 +250,17 @@
|
|
|
this.http.request({
|
|
|
url: '/sp-admin/SpCfg/cooper',
|
|
|
method: 'POST',
|
|
|
- data: { cfgName: 'cooper_entrust_cfg' },
|
|
|
+ data: {
|
|
|
+ cfgName: 'cooper_entrust_cfg'
|
|
|
+ },
|
|
|
success: res => {
|
|
|
this.cooper_entrust = JSON.parse(res.data.data).cooper_entrust
|
|
|
-
|
|
|
+
|
|
|
this.http.request({
|
|
|
url: '/level-one-server/app/TbOrder/getNoConfirmOrder',
|
|
|
- data: {cooper_entrust: this.cooper_entrust},
|
|
|
+ data: {
|
|
|
+ cooper_entrust: this.cooper_entrust
|
|
|
+ },
|
|
|
loading: 'false',
|
|
|
success: res => {
|
|
|
if (res.data.data) {
|
|
@@ -259,7 +275,8 @@
|
|
|
confirm() {
|
|
|
if (this.order.declareType == '1') {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/market/one/leader/handle?orderId=' + this.order.id+'&peopleConfirmStatus=' + this.order.peopleConfirmStatus +'&applyConfirmStatus=' + this.order.applyConfirmStatus
|
|
|
+ url: '/pages/market/one/leader/handle?orderId=' + this.order.id + '&peopleConfirmStatus=' +
|
|
|
+ this.order.peopleConfirmStatus + '&applyConfirmStatus=' + this.order.applyConfirmStatus
|
|
|
});
|
|
|
} else {
|
|
|
uni.navigateTo({
|
|
@@ -300,14 +317,16 @@
|
|
|
let menu = uni.getStorageSync('menu');
|
|
|
this.http.request({
|
|
|
url: '/sp-admin/app/AppMenu/getList',
|
|
|
- data:{pageNo:1,pageSize:50},
|
|
|
+ data: {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 50
|
|
|
+ },
|
|
|
success: res => {
|
|
|
let data = res.data.data;
|
|
|
- console.log(data);
|
|
|
menu.map((item2, index1) => {
|
|
|
data.map((item1, index) => {
|
|
|
if (parseInt(item1.id) == parseInt(item2)) {
|
|
|
- item1.icon =item1.icon
|
|
|
+ item1.icon = item1.icon
|
|
|
this.menuList.push(item1);
|
|
|
}
|
|
|
});
|
|
@@ -323,13 +342,24 @@
|
|
|
limit: 3
|
|
|
},
|
|
|
success: res => {
|
|
|
+ let list = res.data.data;
|
|
|
this.newsList = res.data.data;
|
|
|
+ this.noticeList = list.map(obj => obj.title);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//点击轮播图
|
|
|
click(index) {
|
|
|
-
|
|
|
+ let item = this.bannerList[index];
|
|
|
+ let url = item.url;
|
|
|
+ if (url) {
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ plus.runtime.openURL(url) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
|
|
+ // #endif
|
|
|
+ // #ifdef H5
|
|
|
+ window.open(url)
|
|
|
+ // #endif
|
|
|
+ }
|
|
|
},
|
|
|
message() {
|
|
|
uni.switchTab({
|
|
@@ -352,7 +382,6 @@
|
|
|
uni.navigateTo({
|
|
|
url: url,
|
|
|
fail: res => {
|
|
|
- console.log('zx:' + JSON.stringify(res));
|
|
|
uni.showModal({
|
|
|
content: '功能还在开发中',
|
|
|
showCancel: false
|
|
@@ -445,6 +474,7 @@
|
|
|
|
|
|
.ppopup {
|
|
|
padding: 50rpx 30rpx;
|
|
|
+
|
|
|
.item {
|
|
|
padding: 5px 0px 5px 0px;
|
|
|
color: $font-c;
|