Commit 7ada8ee0 authored by 吴春's avatar 吴春

11

parent f6954d5f
<style> <style>
.koraNews { .koraNews {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #f6f6f6; background: #f6f6f6;
overflow: hidden; overflow: hidden;
} }
.koraNewsList {
.koraNewsList {
width: 100%; width: 100%;
padding: 0 15px; padding: 0 15px;
margin-top: 20px; margin-top: 20px;
} }
.koraNews-time {
.koraNews-time {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -18,32 +20,37 @@ ...@@ -18,32 +20,37 @@
font-size: 12px; font-size: 12px;
color: #b9bcca; color: #b9bcca;
font-family: aa; font-family: aa;
} }
.koraNews-box {
.koraNews-box {
width: 100%; width: 100%;
border-radius: 6px; border-radius: 6px;
background: #fff; background: #fff;
overflow: hidden; overflow: hidden;
margin-top: 10px; margin-top: 10px;
} }
.newsimgs {
.newsimgs {
width: 100%; width: 100%;
border-top-left-radius: 6px; border-top-left-radius: 6px;
border-top-right-radius: 6px; border-top-right-radius: 6px;
height: 145px; height: 145px;
} }
.n-img {
.n-img {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-top-left-radius: 6px; border-top-left-radius: 6px;
border-top-right-radius: 6px; border-top-right-radius: 6px;
} }
.box-conet {
.box-conet {
width: 100%; width: 100%;
padding: 10px 15px; padding: 10px 15px;
} }
.koraRName {
.koraRName {
color: #111111; color: #111111;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
...@@ -52,93 +59,43 @@ ...@@ -52,93 +59,43 @@
font-size: 28rpx; font-size: 28rpx;
line-height: 30rpx; line-height: 30rpx;
font-weight: 600; font-weight: 600;
} }
.koraRName-f {
.koraRName-f {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
margin-top: 5px; margin-top: 5px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.koraNewsSearch {
.koraNewsSearch {
padding: 0px 10px 10px; padding: 0px 10px 10px;
} }
</style> </style>
<template> <template>
<view class="koraNews"> <view class="koraNews">
<view class="koraNewsSearch" v-if="isauth"> <view class="koraNewsSearch" v-if="isauth">
<u-search <u-search action-text="搜索" :clearabled="true" style="width: 95%" :show-action="false" radius="40"
action-text="搜索" v-model="msg.Title" @search="getList(1)" @custom="getList(1)"></u-search>
:clearabled="true"
style="width: 95%"
:show-action="false"
radius="40"
v-model="msg.Title"
@search="getList(1)"
@custom="getList(1)"
></u-search>
</view> </view>
<!-- <view
style="
display: flex;
align-items: center;
margin-bottom: 30rpx;
padding: 0px 15px;
"
v-if="tenantId==18"
>
<image
@click="goNewFirstShop"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_36.png"
style="flex: 1; width: 1px; margin-right: 15rpx"
mode="widthFix"
></image>
<image
@click="goMyFirstShop"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616490607000_108.png"
style="flex: 1; width: 1px; margin-left: 15rpx"
mode="widthFix"
></image>
</view> -->
<u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="dataList.length == 0" text="暂无数据" mode="data"></u-empty>
<scroll-view <scroll-view v-else :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
v-else style="height: calc(100vh - 139px)">
:scroll-y="true" <view v-if="tenantId==18" style="font-size: 30rpx; font-weight: 700; color: #111; padding: 0 15px">资讯信息
:enable-back-to-top="true" </view>
:enable-flex="true"
@scrolltolower="lower"
style="height: calc(100vh - 189px)"
>
<view
v-if="tenantId==18"
style="font-size: 30rpx; font-weight: 700; color: #111; padding: 0 15px"
>资讯信息</view
>
<view> <view>
<view <view class="koraNewsList" v-for="(item, index) in dataList" :key="index" @click="goNewsDetail(item)">
class="koraNewsList" <view class="koraNews-time">{{ item.CreateDate ? item.CreateDate.replace("T", " ") : ""}}
v-for="(item, index) in dataList" </view>
:key="index"
@click="goNewsDetail(item)"
>
<view class="koraNews-time">{{
item.CreateDate ? item.CreateDate.replace("T", " ") : ""
}}</view>
<view class="koraNews-box"> <view class="koraNews-box">
<view class="newsimgs" style="position: relative"> <view class="newsimgs" style="position: relative">
<image :src="item.CoverImg" mode="aspectFill" class="n-img" /> <image :src="item.CoverImg" mode="aspectFill" class="n-img" />
<view <view style="top: 10px; left: 10px; position: absolute"
style="top: 10px; left: 10px; position: absolute" v-if="item.Industry && item.Industry.length > 0">
v-if="item.Industry && item.Industry.length > 0" <u-tag :text="item.Industry" mode="dark" bg-color="rgba(0,0,0,.4)" color="#FFF"
> size="mini"></u-tag>
<u-tag
:text="item.Industry"
mode="dark"
bg-color="rgba(0,0,0,.4)"
color="#FFF"
size="mini"
></u-tag>
</view> </view>
</view> </view>
<view class="box-conet"> <view class="box-conet">
...@@ -148,29 +105,22 @@ ...@@ -148,29 +105,22 @@
</view> </view>
</view> </view>
</view> </view>
<view style="height: 30px;"></view> <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
<u-loadmore bg-color="#F6F6F6" />
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#F6F6F6"
/>
</scroll-view> </scroll-view>
<tabbars></tabbars> <tabbars></tabbars>
<template v-show="setting&&setting.is_show_auth==1"> <template v-show="setting&&setting.is_show_auth==1">
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth" ></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</template> </template>
</view> </view>
</template> </template>
<script> <script>
import tabbars from "@/components/tabbar/index"; import tabbars from "@/components/tabbar/index";
import auth from "@/components/auth/index.vue"; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
tabbars, tabbars,
auth auth
...@@ -184,9 +134,9 @@ export default { ...@@ -184,9 +134,9 @@ export default {
Title: "", Title: "",
// Type:1 // Type:1
}, },
showAuth:false, showAuth: false,
u:{}, u: {},
isauth:false, isauth: false,
pageCount: 1, pageCount: 1,
dataList: [], dataList: [],
loadText: { loadText: {
...@@ -197,30 +147,30 @@ export default { ...@@ -197,30 +147,30 @@ export default {
status: "", status: "",
CommpanyStatus: 0, //公司认证状态 CommpanyStatus: 0, //公司认证状态
FirstShopType: 0, //1:品牌,2:载体 FirstShopType: 0, //1:品牌,2:载体
tenantId:0, tenantId: 0,
setting:{}, setting: {},
}; };
}, },
onShareTimeline() { onShareTimeline() {
//朋友圈 //朋友圈
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserId uni.getStorageSync("mall_UserInfo").UserId :
: 0; 0;
if (uid == 0) { if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
} }
let SmallShopId = uni.getStorageSync("mall_UserInfo") let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").SmallShopId uni.getStorageSync("mall_UserInfo").SmallShopId :
: 0; 0;
if (SmallShopId == 0) { if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id //如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserSmallShopId uni.getStorageSync("mall_UserInfo").UserSmallShopId :
: 0; 0;
} }
let Up = uni.getStorageSync("mall_UserInfo") let Up = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserPageType uni.getStorageSync("mall_UserInfo").UserPageType :
: 0; 0;
return { return {
title: "首店经济", title: "首店经济",
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up, query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up,
...@@ -229,28 +179,27 @@ export default { ...@@ -229,28 +179,27 @@ export default {
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
//朋友 //朋友
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserId uni.getStorageSync("mall_UserInfo").UserId :
: 0; 0;
if (uid == 0) { if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0; uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
} }
let SmallShopId = uni.getStorageSync("mall_UserInfo") let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").SmallShopId uni.getStorageSync("mall_UserInfo").SmallShopId :
: 0; 0;
if (SmallShopId == 0) { if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id //如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserSmallShopId uni.getStorageSync("mall_UserInfo").UserSmallShopId :
: 0; 0;
} }
let Up = uni.getStorageSync("mall_UserInfo") let Up = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserPageType uni.getStorageSync("mall_UserInfo").UserPageType :
: 0; 0;
return { return {
title: "首店经济", title: "首店经济",
path: path: "/pages/kotra/news?user_id=" +
"/pages/kotra/news?user_id=" +
uid + uid +
"&SmallShopId=" + "&SmallShopId=" +
SmallShopId + SmallShopId +
...@@ -263,7 +212,7 @@ export default { ...@@ -263,7 +212,7 @@ export default {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
let set = uni.getStorageSync("basedata") ? let set = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata").mall.setting : {}; uni.getStorageSync("basedata").mall.setting : {};
this.setting=set; this.setting = set;
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: "未登录", nickName: "未登录",
...@@ -275,7 +224,7 @@ export default { ...@@ -275,7 +224,7 @@ export default {
this.getList(1); this.getList(1);
this.getCommpanyStatus(); this.getCommpanyStatus();
this.isauth = true this.isauth = true
this.pageTitle = this.tenantId==18?this.pageTitle:'商业资讯' this.pageTitle = this.tenantId == 18 ? this.pageTitle : '商业资讯'
} }
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
...@@ -300,8 +249,7 @@ export default { ...@@ -300,8 +249,7 @@ export default {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
this.request2( this.request2({
{
url: "/api/AppletTrade/GetNewsPage", url: "/api/AppletTrade/GetNewsPage",
data: this.msg, data: this.msg,
}, },
...@@ -351,13 +299,12 @@ export default { ...@@ -351,13 +299,12 @@ export default {
content: "请您先完成实名认证", content: "请您先完成实名认证",
// showCancel: false, // showCancel: false,
confirmText: "立即认证", confirmText: "立即认证",
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/kotra/identification", url: "/pages/kotra/identification",
}); });
} else if (res.cancel) { } else if (res.cancel) {}
}
}, },
}); });
} else if (this.CommpanyStatus === 3) { } else if (this.CommpanyStatus === 3) {
...@@ -366,9 +313,8 @@ export default { ...@@ -366,9 +313,8 @@ export default {
content: "感谢您的厚爱,请等待认证通过以后再来尝试吧", content: "感谢您的厚爱,请等待认证通过以后再来尝试吧",
showCancel: false, showCancel: false,
confirmText: "我知道了", confirmText: "我知道了",
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {}
}
}, },
}); });
} else if (this.CommpanyStatus === 2) { } else if (this.CommpanyStatus === 2) {
...@@ -377,13 +323,12 @@ export default { ...@@ -377,13 +323,12 @@ export default {
content: "认证待完善", content: "认证待完善",
// showCancel: false, // showCancel: false,
confirmText: "立即完善", confirmText: "立即完善",
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/kotra/identification", url: "/pages/kotra/identification",
}); });
} else if (res.cancel) { } else if (res.cancel) {}
}
}, },
}); });
} else if (this.CommpanyStatus === 5 && this.FirstShopType === 1) { } else if (this.CommpanyStatus === 5 && this.FirstShopType === 1) {
...@@ -393,8 +338,7 @@ export default { ...@@ -393,8 +338,7 @@ export default {
} }
}, },
getCommpanyStatus() { getCommpanyStatus() {
this.request2( this.request2({
{
url: "/api/AppletTrade/GetCommpanyStatus", url: "/api/AppletTrade/GetCommpanyStatus",
data: {}, data: {},
}, },
...@@ -407,5 +351,5 @@ export default { ...@@ -407,5 +351,5 @@ export default {
); );
}, },
}, },
}; };
</script> </script>
\ No newline at end of file
...@@ -53,11 +53,19 @@ ...@@ -53,11 +53,19 @@
<template> <template>
<view class="newsInDetail" style="height:100vh;"> <view class="newsInDetail" style="height:100vh;">
<view class="acdetailTop"> <view class="acdetailTop">
<view class="acdetaiTitle">{{dataList.Title}}</view> <view class="acdetaiTitle">
<template v-if="dataList&&dataList.Title">
{{dataList.Title}}
</template>
</view>
<view class="acdetaiWriter"> <view class="acdetaiWriter">
<view> <view>
<u-tag :text="dataList.Industry" type="primary" style="margin-right: 12px;"></u-tag> <u-tag v-if="dataList&&dataList.Industry" :text="dataList.Industry" type="primary" style="margin-right: 12px;"></u-tag>
<text>{{dataList.PublishTimeStr}}</text> <text>
<template v-if="dataList&&dataList.PublishTimeStr">
{{dataList.PublishTimeStr}}
</template>
</text>
</view> </view>
</view> </view>
</view> </view>
......
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