|
@@ -54,17 +54,17 @@
|
|
|
<image src="/static/icon/in7.png" @click="nav('/pages/index/vip')"></image>
|
|
|
<view class="cate-font">会员中心</view>
|
|
|
</view>
|
|
|
- <view class="cate-item" @click="showPopup()">
|
|
|
+ <view class="cate-item" @click="nav('/pages/index/jifenShop')">
|
|
|
<image src="/static/icon/in8.png"></image>
|
|
|
<view class="cate-font">分享有礼</view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- <view class="jj-tit">
|
|
|
+ <view class="jj-tit" >
|
|
|
<view class="left">
|
|
|
<image src="../../static/icon/gsjj.png" mode="" class="jj-log"></image>
|
|
|
<view class="jj-title">
|
|
|
- 公司简介
|
|
|
+ 公司文化
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right" @click="nav('/pages/index/artList?cid=1')">
|
|
@@ -74,15 +74,15 @@
|
|
|
<image src="../../static/img/img39.png" mode="" class="jj-more"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="jj-wrap" >
|
|
|
- <view class="jj" v-for="gs in 2" @click="nav('/pages/index/artDetail?id=' + gs.id)">
|
|
|
- <image src="" mode="" class="jj-img"></image>
|
|
|
+ <view class="jj-wrap">
|
|
|
+ <view class="jj" v-for="ls in hostList" @click="nav('/pages/index/artDetail?id=' + ls.id)">
|
|
|
+ <image :src="ls.image_input[0]" mode="" class="jj-img"></image>
|
|
|
<view class="jj-info">
|
|
|
<view class="jj-tit-tit clamp">
|
|
|
- 标题
|
|
|
+ {{ls.title}}
|
|
|
</view>
|
|
|
<view class="jj-val clamp2">
|
|
|
- 更新时间:11111111
|
|
|
+ 更新时间:{{ls.add_time}}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -115,32 +115,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <uni-popup ref="popup" type="center">
|
|
|
- <view class="popup">
|
|
|
- <view class="popup-dox">
|
|
|
- <image class="popup-logo" src="../../static/img/img009.png"></image>
|
|
|
- <view class="pop-title">已为您定制专属客服</view>
|
|
|
- <view>{{ weixin }}</view>
|
|
|
- <image class="popup-text" @longtap="bc_code" :src="erweima"></image>
|
|
|
- <view class="btn" @click="copy(weixin)">复制微信号</view>
|
|
|
- <view class="pop-tip flex">
|
|
|
- <view class="weixin">
|
|
|
- <image src="../../static/img/weixin.png" mode=""></image>
|
|
|
- </view>
|
|
|
- <view>长按保存二维码</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="close_icon" @click="close">
|
|
|
- <image src="../../static/img/Close.png"></image>
|
|
|
- </view>
|
|
|
- </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- loadIndexs
|
|
|
+ loadIndexs,
|
|
|
+ hotList
|
|
|
} from '@/api/index.js';
|
|
|
import {
|
|
|
mapState
|
|
@@ -166,9 +147,8 @@
|
|
|
carouselList: [], //轮播图
|
|
|
swiperCurrent: 0,
|
|
|
dataList: [],
|
|
|
- erweima: '',
|
|
|
- weixin: '', //客服微信
|
|
|
- swiperLength: 1 //图片数量
|
|
|
+ swiperLength: 1 ,//图片数量
|
|
|
+ hostList:[],//热门文章列表
|
|
|
};
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
@@ -197,6 +177,8 @@
|
|
|
weixinObj.hideAllNonBaseMenuItem();
|
|
|
}
|
|
|
//#endif
|
|
|
+ // 获取热门文章页
|
|
|
+ this.hotList();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
|
|
@@ -239,6 +221,15 @@
|
|
|
},
|
|
|
// #endif
|
|
|
methods: {
|
|
|
+ // 获取热门文章
|
|
|
+ hotList(){
|
|
|
+ hotList().then((e) => {
|
|
|
+ this.hostList = e.data;
|
|
|
+ console.log(e);
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log(e);
|
|
|
+ })
|
|
|
+ },
|
|
|
// #ifdef H5
|
|
|
IndexShare() {
|
|
|
let obj = this;
|
|
@@ -275,59 +266,19 @@
|
|
|
nav(url) {
|
|
|
uni.navigateTo({
|
|
|
url,
|
|
|
- fail: () => {
|
|
|
- console.log(1);
|
|
|
+ fail: (e) => {
|
|
|
+ console.log(e);
|
|
|
uni.switchTab({
|
|
|
url
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- showPopup() {
|
|
|
- this.$refs.popup.open();
|
|
|
- },
|
|
|
- close() {
|
|
|
- this.$refs.popup.close();
|
|
|
- },
|
|
|
//轮播图切换修改背景色
|
|
|
swiperChange(e) {
|
|
|
const index = e.detail.current;
|
|
|
this.swiperCurrent = index;
|
|
|
},
|
|
|
- copy(content) {
|
|
|
- /**
|
|
|
- * 小程序端 和 app端的复制逻辑
|
|
|
- */
|
|
|
- //#ifndef H5
|
|
|
- uni.setClipboardData({
|
|
|
- data: content,
|
|
|
- success: function() {
|
|
|
- console.log('success');
|
|
|
- return true;
|
|
|
- }
|
|
|
- });
|
|
|
- //#endif
|
|
|
-
|
|
|
- /**
|
|
|
- * H5端的复制逻辑
|
|
|
- */
|
|
|
- // #ifdef H5
|
|
|
- if (!document.queryCommandSupported('copy')) {
|
|
|
- //为了兼容有些浏览器 queryCommandSupported 的判断
|
|
|
- // 不支持
|
|
|
- return false;
|
|
|
- }
|
|
|
- let textarea = document.createElement('textarea');
|
|
|
- textarea.value = content;
|
|
|
- textarea.readOnly = 'readOnly';
|
|
|
- document.body.appendChild(textarea);
|
|
|
- textarea.select(); // 选择对象
|
|
|
- textarea.setSelectionRange(0, content.length); //核心
|
|
|
- let result = document.execCommand('copy'); // 执行浏览器复制命令
|
|
|
- textarea.remove();
|
|
|
- return result;
|
|
|
- // #endif
|
|
|
- },
|
|
|
comfirm(text) {
|
|
|
console.log(text);
|
|
|
const result = this.uniCopy(text);
|
|
@@ -380,12 +331,12 @@
|
|
|
.catch(e => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
- service({}).then(({
|
|
|
- data
|
|
|
- }) => {
|
|
|
- this.erweima = data.service_qr;
|
|
|
- this.weixin = data.service_wechat;
|
|
|
- });
|
|
|
+ // service({}).then(({
|
|
|
+ // data
|
|
|
+ // }) => {
|
|
|
+ // this.erweima = data.service_qr;
|
|
|
+ // this.weixin = data.service_wechat;
|
|
|
+ // });
|
|
|
},
|
|
|
//详情页
|
|
|
navToDetailPage(item) {
|