|
@@ -1,32 +1,33 @@
|
|
|
<template>
|
|
|
<view class="index tn-safe-area-inset-bottom">
|
|
|
-
|
|
|
+
|
|
|
<tn-nav-bar customBack>
|
|
|
<view slot="back" class='tn-custom-nav-bar__back' @click="reFetchData()">
|
|
|
<text v-if="!loading" class="tn-icon-circle-arrow" style="font-size: 50rpx;"></text>
|
|
|
- <tn-loading v-if="loading" :size="46"></tn-loading>
|
|
|
+ <view style="margin-top:6px" v-if="loading"><tn-loading :size="46"></tn-loading></view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view slot="default" style="display: flex;">
|
|
|
- <view style="flex:1;margin-left:25px">
|
|
|
+
|
|
|
+ <view slot="default" style="display: flex;">
|
|
|
+ <view style="flex:1;margin-left:25px;">
|
|
|
<text>我要什么</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text class="tn-icon-add-fill" style="font-size: 30px;margin-right: 4px;" @click="addButton()"></text>
|
|
|
+ <text class="tn-icon-add-fill" style="font-size: 30px;margin-right: 4px;"
|
|
|
+ @click="addButton()"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</tn-nav-bar>
|
|
|
-
|
|
|
+
|
|
|
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
|
|
- <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" bgColor="#ffffff">
|
|
|
+ <uv-sticky :offsetTop="vuex_custom_bar_height + 'px'" bgColor="#ffffff">
|
|
|
<uni-search-bar radius="15" placeholder="搜索" @confirm="search" v-model="searchValue" @blur="search"
|
|
|
- @cancel="cancel" @clear="clear" cancelButton="auto"
|
|
|
- clearButton="auto" style="border-bottom: 1rpx solid #f1f1f1cc;">
|
|
|
+ @cancel="cancel" @clear="clear" cancelButton="auto" clearButton="auto"
|
|
|
+ style="border-bottom: 1rpx solid #f1f1f1cc;">
|
|
|
</uni-search-bar></uv-sticky>
|
|
|
|
|
|
|
|
|
<!-- 图文信息 -->
|
|
|
- <block v-for="(item,index) in content" :key="index">
|
|
|
+ <block v-for="(item,index) in content" :key="item.id" >
|
|
|
<view class="blogger__item">
|
|
|
<view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
|
|
|
<view class="justify__author__info" @click="tn('')">
|
|
@@ -45,12 +46,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="item.validDate" class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
|
|
|
+ <view v-if="item.validDate"
|
|
|
+ class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
|
|
|
<text class="" style="background: #3F51B542;font-size: 12px;
|
|
|
padding: 8px;
|
|
|
color: #0000FF;
|
|
|
border-radius: 24px;
|
|
|
- border-top-right-radius: 0;">{{item.validDate}}</text>
|
|
|
+ border-top-right-radius: 0;" @click="showValid(item.validDate)">{{item.validDate}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -63,11 +65,11 @@
|
|
|
<text class="tn-text-df">{{ label_item }}</text>
|
|
|
</view> -->
|
|
|
<!-- 不用限制长度了,因为发布的时候限制长度了-->
|
|
|
- <text
|
|
|
+ <text
|
|
|
class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.content }}</text>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<block v-if="item.imgList">
|
|
|
<view v-if="[1,2,4].indexOf(item.imgList.length) != -1" class="tn-padding-top-xs"
|
|
@@ -83,28 +85,31 @@
|
|
|
<block v-for="(image_item,image_index) in item.imgList" :key="image_index">
|
|
|
<!-- #ifndef MP-WEIXIN -->
|
|
|
<tn-grid-item style="width: 30%;margin: 10rpx;">
|
|
|
- <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
|
|
|
- mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
|
|
|
+ <image class="blogger__main-image blogger__main-image--3"
|
|
|
+ :src="image_item.ftpUrl" mode="aspectFill"
|
|
|
+ @click="showImg(item.imgList,image_index)"></image>
|
|
|
</tn-grid-item>
|
|
|
<!-- #endif-->
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<tn-grid-item style="width: 30%;margin: 10rpx;">
|
|
|
- <image class="blogger__main-image blogger__main-image--3" :src="image_item.ftpUrl"
|
|
|
- mode="aspectFill" @click="showImg(item.imgList,image_index)"></image>
|
|
|
+ <image class="blogger__main-image blogger__main-image--3"
|
|
|
+ :src="image_item.ftpUrl" mode="aspectFill"
|
|
|
+ @click="showImg(item.imgList,image_index)"></image>
|
|
|
</tn-grid-item>
|
|
|
<!-- #endif-->
|
|
|
</block>
|
|
|
</tn-grid>
|
|
|
</view>
|
|
|
</block>
|
|
|
- <view v-for="file in item.fileDetailList" v-if="!isImage(file.fileName)">
|
|
|
+ <view v-for="file in item.fileDetailList" :key="item.id" v-if="!isImage(file.fileName)">
|
|
|
<view>
|
|
|
<text class="tn-icon-link"></text>
|
|
|
- <view style="display: inline-block;margin-left:8px" @click="clickLink(file.ftpUrl)">{{file.fileName}}</view>
|
|
|
-
|
|
|
+ <view style="display: inline-block;margin-left:8px" @click="clickLink(file.ftpUrl,file.fileName)">
|
|
|
+ {{file.fileName}}</view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
|
|
|
<view class="justify-content-item tn-color-gray tn-text-center">
|
|
@@ -126,28 +131,47 @@
|
|
|
<view v-if="showEmpty&&content.length==0" style="margin-top: 32vh;">
|
|
|
<tn-empty mode="data"></tn-empty>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+ <!-- 结尾 -->
|
|
|
+ <view v-if="content.length==totalSize&&totalSize!=0" style="background-color: #f1f1f1cc;padding: 16px 0;">
|
|
|
+ <tn-load-more status="nomore" :loadText="loadText"></tn-load-more>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<view class='tn-tabbar-height'></view>
|
|
|
+
|
|
|
<tn-popup v-model="showSheet" mode="center" closeBtn="true" borderRadius="16">
|
|
|
- <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="!showContact">
|
|
|
- <button @click="linkTel()" style="border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-service" style="margin-right: 12px;"></text> 联系需方</button>
|
|
|
+ <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 320px;"
|
|
|
+ v-if="!showContact">
|
|
|
+ <button @click="linkTel()" style="border-radius:30px;color:#fff;background-color: #1d60b1;"><text
|
|
|
+ class="tn-icon-service" style="margin-right: 12px;"></text> 联系需方</button>
|
|
|
<!-- <view>联系我们帮助对接</view> -->
|
|
|
- <button v-if="!collStatus" @click="addColl" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-star" style="margin-right: 12px;"></text> 收 藏</button>
|
|
|
- <button v-if="collStatus" @click="delColl" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-star-fill" style="margin-right: 12px;"></text> 取消收藏</button>
|
|
|
- <button open-type="share" style="margin-top:10px;border-radius:30px;color:#3a96d7;background-color: #d3e3fd;"><text class="tn-icon-send" style="margin-right: 12px;"></text> 转 发</button>
|
|
|
+ <button v-if="!collStatus" @click="addColl"
|
|
|
+ style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
|
|
|
+ class="tn-icon-star" style="margin-right: 12px;"></text>
|
|
|
+ 收 藏</button>
|
|
|
+ <button v-if="collStatus" @click="delColl"
|
|
|
+ style="margin-top:10px;border-radius:30px;" type="default" plain="true"><text
|
|
|
+ class="tn-icon-star-fill" style="margin-right: 12px;"></text> 取消收藏</button>
|
|
|
+ <button open-type="share"
|
|
|
+ style="margin-top:10px;border-radius:30px;" type="default" plain="true" :data-coupon="curItem"><text
|
|
|
+ class="tn-icon-send" style="margin-right: 12px;"></text>
|
|
|
+ 转 发</button>
|
|
|
</view>
|
|
|
- <view class="content" style="padding: 24px 36px;font-size: 16px;line-height: 24px; width: 300px;" v-if="showContact">
|
|
|
- <view><text v-if="curContact.company">公司名称:{{curContact.company}}</text></view>
|
|
|
- <view><text>联系人姓名:{{curContact.contactPerson}}</text> </view>
|
|
|
- <view><text>联系方式:{{curContact.contactMethod}}</text> </view>
|
|
|
+ <view class="content bg-content" style="padding: 50px 36px;padding-bottom: 32px;font-size: 16px;width:320px;line-height: 24px;"
|
|
|
+ v-if="showContact">
|
|
|
+ <view><text style="font-size: 20px;font-weight: bold;" v-if="curContact.company">{{curContact.company}}</text></view>
|
|
|
+ <view style="margin-top:20px;
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 20px;"><text class="tn-icon-my-formal"></text><text style="margin-left: 6px;">{{curContact.contactPerson}}</text> </view>
|
|
|
+ <view style="margin-top:20px;font-size: 20px;font-weight: bold;" @click="showTel(curContact.contactMethod)"><text class="tn-icon-tel"></text>
|
|
|
+ <text style="margin-left: 4px;">{{curContact.contactMethod}}</text> </view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</tn-popup>
|
|
|
- <tn-toast ref="toast"></tn-toast>
|
|
|
+ <tn-toast ref="toast"></tn-toast>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -155,24 +179,29 @@
|
|
|
import request from '../../utils/request'
|
|
|
export default {
|
|
|
name: 'Index',
|
|
|
-
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
- loading:false,
|
|
|
- showContact:false,
|
|
|
- curContact:{},
|
|
|
- totalSize:0,
|
|
|
- curIndex:1,
|
|
|
+ loading: false,
|
|
|
+ loadText: {
|
|
|
+ loadmore: '下拉加载',
|
|
|
+ loading: '快速加载中...',
|
|
|
+ nomore: '恭喜你,已阅读完所有需求信息哦!'
|
|
|
+ },
|
|
|
+ showContact: false,
|
|
|
+ curContact: {},
|
|
|
+ totalSize: 0,
|
|
|
+ curIndex: 1,
|
|
|
showSheet: false,
|
|
|
- curItem:{},
|
|
|
- userNo:'',
|
|
|
+ curItem: {},
|
|
|
+ userNo: '',
|
|
|
searchValue: '',
|
|
|
- collStatus:'',
|
|
|
+ collStatus: '',
|
|
|
cardCur: 0,
|
|
|
- collId:'',
|
|
|
+ collId: '',
|
|
|
isAndroid: true,
|
|
|
- content:[],
|
|
|
-
|
|
|
+ content: [],
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -181,21 +210,23 @@
|
|
|
const date = new Date(value);
|
|
|
const today = new Date();
|
|
|
const yesterday = new Date(today); // 昨天的日期
|
|
|
- yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
|
|
|
-
|
|
|
- if(date.getFullYear()==today.getFullYear()&&date.getMonth()==today.getMonth()&&date.getDate()==today.getDate()){
|
|
|
- return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
|
|
|
+ yesterday.setDate(yesterday.getDate() - 1); // 将昨天的日期设置为前一天
|
|
|
+
|
|
|
+ if (date.getFullYear() == today.getFullYear() && date.getMonth() == today.getMonth() && date.getDate() ==
|
|
|
+ today.getDate()) {
|
|
|
+ return '今天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
|
|
|
.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
|
|
|
}
|
|
|
- if(date.getFullYear()==yesterday.getFullYear()&&date.getMonth()==yesterday.getMonth()&&date.getDate()==yesterday.getDate()){
|
|
|
- return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
|
|
|
+ if (date.getFullYear() == yesterday.getFullYear() && date.getMonth() == yesterday.getMonth() && date
|
|
|
+ .getDate() == yesterday.getDate()) {
|
|
|
+ return '昨天 ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
|
|
|
.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
|
|
|
}
|
|
|
return date.toLocaleDateString() + ' ' + (date.getHours() > 9 ? '' : '0') + date.getHours() + ':' + (date
|
|
|
.getMinutes() > 9 ? '' : '0') + date.getMinutes(); // 根据需要格式化日期
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
const systemInfo = uni.getSystemInfoSync()
|
|
@@ -209,60 +240,57 @@
|
|
|
onReachBottom() {
|
|
|
console.warn(12345);
|
|
|
},
|
|
|
- onShareAppMessage: function() {
|
|
|
- return {
|
|
|
- title: '速立保•生物制药产业一站式产品资源供需平台',
|
|
|
- path: '/pages/index/index',
|
|
|
- // imageUrl: 'https://example.com/image.jpg'
|
|
|
- };
|
|
|
- },
|
|
|
+
|
|
|
methods: {
|
|
|
// cardSwiper
|
|
|
cardSwiper(e) {
|
|
|
this.cardCur = e.detail.current
|
|
|
},
|
|
|
- clickLink(url){
|
|
|
+ clickLink(url,fileName) {
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/webview/web-view?url='+url,
|
|
|
+ url:'/pages/webview/web-view?url='+encodeURIComponent('http://slb-m.dev.ml1993.com/webview?title='+fileName+'&url='+ url),
|
|
|
})
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/webview/web-view?url=' + url,
|
|
|
+ // })
|
|
|
},
|
|
|
isImage(fileName) {
|
|
|
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'ico']
|
|
|
const extension = fileName.split('.').pop().toLowerCase();
|
|
|
return imageExtensions.includes(extension);
|
|
|
},
|
|
|
- reFetchData(){
|
|
|
+ reFetchData() {
|
|
|
this.loading = true;
|
|
|
uni.showToast({
|
|
|
- title:'正在刷新...',
|
|
|
- icon:'none'
|
|
|
+ title: '正在刷新...',
|
|
|
+ icon: 'none'
|
|
|
});
|
|
|
this.fetchData();
|
|
|
},
|
|
|
- fetchData(curIndex=1) {
|
|
|
+ fetchData(curIndex = 1) {
|
|
|
let that = this;
|
|
|
that.showEmpty = false;
|
|
|
request.post('/slbResourceDemand/query', {
|
|
|
- index:curIndex,
|
|
|
- limit:10,
|
|
|
- content: that.searchValue,
|
|
|
+ index: curIndex,
|
|
|
+ limit: 10,
|
|
|
+ content: that.searchValue,
|
|
|
}).then(res => {
|
|
|
that.loading = false;
|
|
|
- if(res.success){
|
|
|
- that.totalSize = res.total||0;
|
|
|
- let newList = res.list||[];
|
|
|
- for(let i=0;i<newList.length;i++){
|
|
|
+ if (res.success) {
|
|
|
+ that.totalSize = res.total || 0;
|
|
|
+ let newList = res.list || [];
|
|
|
+ for (let i = 0; i < newList.length; i++) {
|
|
|
newList[i].imgList = [];
|
|
|
- for(let j=0;j<newList[i].fileDetailList.length;j++){
|
|
|
- if(that.isImage(newList[i].fileDetailList[j].fileName)){
|
|
|
+ for (let j = 0; j < newList[i].fileDetailList.length; j++) {
|
|
|
+ if (that.isImage(newList[i].fileDetailList[j].fileName)) {
|
|
|
newList[i].imgList.push(newList[i].fileDetailList[j]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(curIndex==1){
|
|
|
- that.content=newList||[];
|
|
|
- }else{
|
|
|
- that.content= that.content.concat(newList||[]);
|
|
|
+ if (curIndex == 1) {
|
|
|
+ that.content = newList || [];
|
|
|
+ } else {
|
|
|
+ that.content = that.content.concat(newList || []);
|
|
|
}
|
|
|
that.showEmpty = true;
|
|
|
}
|
|
@@ -276,161 +304,182 @@
|
|
|
url: e,
|
|
|
});
|
|
|
},
|
|
|
+ hideSheet(){
|
|
|
+ this.showSheet = false;
|
|
|
+ },
|
|
|
showActionSheet(item) {
|
|
|
let that = this;
|
|
|
console.warn(item);
|
|
|
this.curItem = item;
|
|
|
+ this.curItem.isNeed = 1;
|
|
|
this.collStatus = false;
|
|
|
this.showSheet = true;
|
|
|
that.showContact = false;
|
|
|
- if(uni.getStorageSync('userNo')){
|
|
|
- let params = {};
|
|
|
-
|
|
|
- params = {
|
|
|
- fkBisNo:that.curItem.bisNo,
|
|
|
- userNo: uni.getStorageSync('userNo'),
|
|
|
- };
|
|
|
- request.post('/slbCollect/query', params).then(res => {
|
|
|
- if(res.success){
|
|
|
- if(res.list&&res.list.length>0){
|
|
|
- that.collStatus = true;
|
|
|
- that.collId = res.list[0].id;
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ if (uni.getStorageSync('userNo')) {
|
|
|
+ let params = {};
|
|
|
+
|
|
|
+ params = {
|
|
|
+ fkBisNo: that.curItem.bisNo,
|
|
|
+ userNo: uni.getStorageSync('userNo'),
|
|
|
+ };
|
|
|
+ request.post('/slbCollect/query', params).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ if (res.list && res.list.length > 0) {
|
|
|
+ that.collStatus = true;
|
|
|
+ that.collId = res.list[0].id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- linkTel(){
|
|
|
-
|
|
|
- if(!uni.getStorageSync('userNo')){
|
|
|
+ linkTel() {
|
|
|
+
|
|
|
+ if (!uni.getStorageSync('userNo')) {
|
|
|
uni.showToast({
|
|
|
- title:'请登录'
|
|
|
+ title: '请登录'
|
|
|
})
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/login/login'
|
|
|
+ url: '/pages/login/login'
|
|
|
})
|
|
|
return false;
|
|
|
}
|
|
|
let that = this;
|
|
|
let params = {};
|
|
|
params.slbBisContact = JSON.stringify({
|
|
|
- fkBisNo:that.curItem.bisNo,
|
|
|
- bisType:'1',
|
|
|
- type:'1',
|
|
|
- userNo: uni.getStorageSync('userNo'),
|
|
|
- });
|
|
|
+ fkBisNo: that.curItem.bisNo,
|
|
|
+ bisType: '1',
|
|
|
+ type: '1',
|
|
|
+ userNo: uni.getStorageSync('userNo'),
|
|
|
+ });
|
|
|
request.post('/slbBisContact/add', params).then(res => {
|
|
|
- if(res.success){
|
|
|
- that.showContact = true;
|
|
|
- that.curContact.company = that.curItem.company;
|
|
|
- that.curContact.contactMethod = res.resultMap.contactMethod;
|
|
|
- that.curContact.contactPerson = res.resultMap.contactPerson;
|
|
|
- }else{
|
|
|
+ if (res.success) {
|
|
|
+ that.showContact = true;
|
|
|
+ that.curContact.company = that.curItem.company;
|
|
|
+ that.curContact.contactMethod = res.resultMap.contactMethod;
|
|
|
+ that.curContact.contactPerson = res.resultMap.contactPerson;
|
|
|
+ } else {
|
|
|
that.showContact = false;
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon:'none'
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- addColl(){
|
|
|
- if(!uni.getStorageSync('userNo')){
|
|
|
+
|
|
|
+ addColl() {
|
|
|
+ if (!uni.getStorageSync('userNo')) {
|
|
|
uni.showToast({
|
|
|
- title:'请登录'
|
|
|
+ title: '请登录'
|
|
|
})
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/login/login'
|
|
|
+ url: '/pages/login/login'
|
|
|
})
|
|
|
return false;
|
|
|
}
|
|
|
let that = this;
|
|
|
let params = {};
|
|
|
params.slbCollect = JSON.stringify({
|
|
|
- fkBisNo:that.curItem.bisNo,
|
|
|
- bisType:'1',
|
|
|
- userNo: uni.getStorageSync('userNo'),
|
|
|
- });
|
|
|
+ fkBisNo: that.curItem.bisNo,
|
|
|
+ bisType: '1',
|
|
|
+ userNo: uni.getStorageSync('userNo'),
|
|
|
+ });
|
|
|
request.post('/slbCollect/add', params).then(res => {
|
|
|
- if(res.success){
|
|
|
+ if (res.success) {
|
|
|
uni.showToast({
|
|
|
title: '信息已收藏,请在我的收藏里查看阅读',
|
|
|
duration: 2000,
|
|
|
- icon:'none'
|
|
|
+ icon: 'none'
|
|
|
});
|
|
|
that.showSheet = false;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: res.msg
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
- delColl(){
|
|
|
+ delColl() {
|
|
|
let that = this;
|
|
|
request.post('/slbCollect/del', {
|
|
|
id: that.collId
|
|
|
}).then(res => {
|
|
|
- if(res.success){
|
|
|
- uni.showToast({
|
|
|
- title:'取消成功'
|
|
|
- })
|
|
|
- that.showSheet = false;
|
|
|
- }else{
|
|
|
+ if (res.success) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '取消成功'
|
|
|
+ })
|
|
|
+ that.showSheet = false;
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: res.msg
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- showImg(items, index){
|
|
|
+ showImg(items, index) {
|
|
|
let urls = [];
|
|
|
- for(let i=0;i<items.length;i++){
|
|
|
+ for (let i = 0; i < items.length; i++) {
|
|
|
urls.push(items[i].ftpUrl);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 预览图片
|
|
|
uni.previewImage({
|
|
|
urls: urls,
|
|
|
- current:index,
|
|
|
-
|
|
|
+ current: index,
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
- addButton(){
|
|
|
- if(!uni.getStorageSync('userNo')){
|
|
|
+ showValid(text){
|
|
|
+ uni.showToast({
|
|
|
+ title: '有效期:'+text,
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addButton() {
|
|
|
+ if (!uni.getStorageSync('userNo')) {
|
|
|
uni.showToast({
|
|
|
- title:'请登录'
|
|
|
+ title: '请登录',
|
|
|
+ icon:'none'
|
|
|
})
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/login/login'
|
|
|
+ url: '/pages/login/login'
|
|
|
})
|
|
|
return false;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.navigateTo({
|
|
|
- url:'/circlePages/circle'
|
|
|
+ url: '/circlePages/circle'
|
|
|
})
|
|
|
}
|
|
|
- //未登录,去登录
|
|
|
- //已登录,去新增第一步
|
|
|
- },
|
|
|
- loadMore(){
|
|
|
- if(this.totalSize>this.content.length){
|
|
|
- this.fetchData(this.curIndex+1);
|
|
|
+ //未登录,去登录
|
|
|
+ //已登录,去新增第一步
|
|
|
+ },
|
|
|
+ loadMore() {
|
|
|
+ if (this.totalSize > this.content.length) {
|
|
|
+ this.fetchData(this.curIndex + 1);
|
|
|
}
|
|
|
console.error('正在加载更多');
|
|
|
},
|
|
|
- search(){
|
|
|
+ search() {
|
|
|
this.fetchData();
|
|
|
},
|
|
|
- cancel(){
|
|
|
- this.searchValue='';
|
|
|
+ cancel() {
|
|
|
+ this.searchValue = '';
|
|
|
this.fetchData();
|
|
|
},
|
|
|
- clear(){
|
|
|
- this.searchValue='';
|
|
|
+ clear() {
|
|
|
+ this.searchValue = '';
|
|
|
this.fetchData();
|
|
|
+ },
|
|
|
+ showTel(tel){
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: tel,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ showDetail(item){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/index/detail/detail?id='+item.bisNo+'&isNeed=1'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1335,8 +1384,14 @@
|
|
|
.hx-k6 {
|
|
|
transform: rotateX(90deg) rotateZ(90deg)
|
|
|
}
|
|
|
- /deep/ .tn-toast{
|
|
|
+
|
|
|
+ /deep/ .tn-toast {
|
|
|
background-color: #000c !important;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ .bg-content{
|
|
|
+ color: #fff;
|
|
|
+ background-image: url(./../../static/bg.png);
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
</style>
|