作者 卢胜

比特

@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 // else { 15 // else {
16 // uni.showModal({ 16 // uni.showModal({
17 // content: 'open:'+openId + 'code:'+e.query.code, 17 // content: 'open:'+openId + 'code:'+e.query.code,
18 - // showCancel: false 18 + // showCancel: false
19 // }); 19 // });
20 // } 20 // }
21 console.log(e.query.code); 21 console.log(e.query.code);
@@ -45,5 +45,9 @@ export const delProduct = (product_id) => request({url: 'user/product_del',meth @@ -45,5 +45,9 @@ export const delProduct = (product_id) => request({url: 'user/product_del',meth
45 export const getCenterList = () => request({url: 'user/arc_list',method: 'post',data:{}}) 45 export const getCenterList = () => request({url: 'user/arc_list',method: 'post',data:{}})
46 46
47 // 个人中心资讯详情 /api/user/arc_detail 47 // 个人中心资讯详情 /api/user/arc_detail
48 -export const arcDetail = (arc_id) => request({url: 'user/arc_detail',method: 'post',data:{arc_id}}) 48 +export const arcDetail = (user_article_id) => request({url: 'user/arc_detail',method: 'post',data:{user_article_id}})
49 49
  50 +// 个人中心四个资讯 分类列表
  51 +export const arc_sort_list = (data) => request({url: 'user/arc_sort_list',method: 'post',data})
  52 +// 个人中心四个资讯列表
  53 +export const article_list = (data) => request({url: 'user/article_list',method: 'post',data})
@@ -216,6 +216,24 @@ @@ -216,6 +216,24 @@
216 } 216 }
217 217
218 } 218 }
  219 + ,{
  220 + "path" : "pages/mine/mineinfo",
  221 + "style" :
  222 + {
  223 + "navigationBarTitleText": "",
  224 + "enablePullDownRefresh": false
  225 + }
  226 +
  227 + }
  228 + ,{
  229 + "path" : "pages/mine/mineinfodetail",
  230 + "style" :
  231 + {
  232 + "navigationBarTitleText": "",
  233 + "enablePullDownRefresh": false
  234 + }
  235 +
  236 + }
219 ], 237 ],
220 "globalStyle": { 238 "globalStyle": {
221 "navigationBarTextStyle": "black", 239 "navigationBarTextStyle": "black",
@@ -56,10 +56,10 @@ @@ -56,10 +56,10 @@
56 <image :src="`/static/bot${idx+1}.png`" mode=""></image> 56 <image :src="`/static/bot${idx+1}.png`" mode=""></image>
57 {{item.name}} 57 {{item.name}}
58 </view> 58 </view>
59 - <!-- <view class="item" v-for="(item,idx) in botList" :key="item.id" @click="toBotDetail(item.id)"> 59 + <view class="item" v-for="(item,idx) in botList" :key="item.id" @click="toBotDetail(item.id,item.title)">
60 <image :src="item.image_preview" mode=""></image> 60 <image :src="item.image_preview" mode=""></image>
61 {{item.title}} 61 {{item.title}}
62 - </view> --> 62 + </view>
63 </view> 63 </view>
64 </view> 64 </view>
65 65
@@ -147,9 +147,9 @@ @@ -147,9 +147,9 @@
147 }) 147 })
148 } 148 }
149 }, 149 },
150 - toBotDetail(id){ 150 + toBotDetail(id,title){
151 uni.navigateTo({ 151 uni.navigateTo({
152 - url:'/pages/mine/InformationDetails?id='+id 152 + url:'/pages/mine/mineinfo?id='+id+"&title="+title
153 }) 153 })
154 }, 154 },
155 async confirmCancel(){ 155 async confirmCancel(){
  1 +<template>
  2 + <view class="timeInfo">
  3 + <view class="nevtop">
  4 + <view class="top">
  5 + <u-search placeholder="请输入文章名称搜索" v-model="keyword" :clearabled="true" :show-action="false"
  6 + @search="onsouch()"></u-search>
  7 + </view>
  8 + <view class="banner">
  9 + <scroll-view scroll-x="true" style="white-space:nowrap ">
  10 + <view class="nav" :class="{newnav:chooseindex==index}" v-for="(item,index) in typelist" :key="index"
  11 + @click="choose(index,item.id,item.name)">{{item.name}}
  12 + <view class="tip" v-if="chooseindex==index">
  13 + </view>
  14 + </view>
  15 + </scroll-view>
  16 + </view>
  17 + </view>
  18 + <view class="group">
  19 + <scroll-view scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh">
  20 + <view class="item" v-for="(item,idx) in sortlist" :key="idx" @click="ondetail(item.id,item.title)">
  21 + <view class="bot flexA">
  22 + <view class="left flexA">
  23 + <image :src="item.image_preview" mode=""></image>
  24 + <view class="lefte">
  25 + <view class="title">{{item.title}}</view>
  26 + <view class="time">发布时间:{{item.publishtime}}</view>
  27 + </view>
  28 + </view>
  29 + </view>
  30 + </view>
  31 + </scroll-view>
  32 + </view>
  33 + </view>
  34 +</template>
  35 +
  36 +<script>
  37 + import {
  38 + arc_sort_list,
  39 + article_list
  40 + } from '@/api/mine.js'
  41 + export default {
  42 + data() {
  43 + return {
  44 + type: "",
  45 + chooseindex: 0,
  46 + typelist: [],
  47 + keyword: "",
  48 + sortlist: [],
  49 + currentpage: 1,
  50 + }
  51 + },
  52 + onLoad(options) {
  53 + this.type = options.id
  54 + let title=options.title
  55 + uni.setNavigationBarTitle({
  56 + title: title //这是修改后的导航栏文字
  57 + })
  58 + let URL=window.location.href
  59 + this.$wxH5Share.get_jssdk(title,URL)
  60 + this.arc_sort_list(true)
  61 +
  62 + },
  63 + methods: {
  64 + ondetail(e,title) {
  65 + uni.setStorageSync("deltitle",title)
  66 + uni.navigateTo({
  67 + url: "/pages/mine/mineinfodetail?id=" + e
  68 + })
  69 + },
  70 + // 加载
  71 + scrolltolower() {
  72 + console.log(2)
  73 + this.currentpage++
  74 + this.article_list()
  75 + },
  76 + //搜索
  77 + onsouch() {
  78 + this.currentpage = 1
  79 + this.article_list(true)
  80 + },
  81 + //类型选择
  82 + choose(e, id, name) {
  83 + let that =this
  84 + that.chooseindex = e
  85 + that.currentpage = 1
  86 + that.sortlist = []
  87 + that.sort_id = id
  88 + that.article_list(true)
  89 + },
  90 + // 分类
  91 + async arc_sort_list() {
  92 + let obj = {
  93 + arc_id: this.type,
  94 + }
  95 + try {
  96 + const res = await arc_sort_list(obj)
  97 + this.typelist = res.list
  98 + if (this.typelist[0].id) {
  99 + this.sort_id = this.typelist[0].id
  100 + }
  101 + this.article_list(true)
  102 + // 保存数据
  103 + } catch (err) {
  104 + uni.showToast({
  105 + title: err,
  106 + icon: 'none'
  107 + })
  108 + console.log('sort_list', err)
  109 + }
  110 + },
  111 + // 资讯
  112 + async article_list(x) {
  113 + let obj = {
  114 + user_arc_id: this.type,
  115 + user_article_sort_id: this.sort_id,
  116 + page:this.currentpage,
  117 + pagenum:15,
  118 + keyword:this.keyword,
  119 + }
  120 + try {
  121 + const res = await article_list(obj)
  122 + this.sortlist = x ? res.list.data : this.sortlist.concat(res.list.data )
  123 + console.log('article_list', res)
  124 + if (res.list.data.length == 0) {
  125 + return
  126 + }
  127 + // 保存数据
  128 + } catch (err) {
  129 + uni.showToast({
  130 + title: err,
  131 + icon: 'none'
  132 + })
  133 + console.log('article_list', err)
  134 + }
  135 + },
  136 + }
  137 + }
  138 +</script>
  139 +
  140 +<style lang="scss">
  141 + page {
  142 + background-color: #f6f6f6;
  143 + }
  144 +
  145 + .timeInfo {
  146 + .nevtop {
  147 + position: fixed;
  148 + width: 100%;
  149 + box-sizing: border-box;
  150 + top: 0;
  151 + left: 0;
  152 + z-index: 99;
  153 + padding: 16rpx 32rpx;
  154 + background-color: #ffffff;
  155 +
  156 + .top {}
  157 +
  158 + .banner {
  159 + width: 660rpx;
  160 + margin-top: 24rpx;
  161 +
  162 + .nav {
  163 + position: relative;
  164 +
  165 + &.activetop {
  166 + background: #FFF3F2;
  167 + }
  168 +
  169 + &:first-child {
  170 + margin-left: 0;
  171 + }
  172 +
  173 + display: inline-block;
  174 + color: rgba(0, 0, 0, 0.9);
  175 + font-size: 28rpx;
  176 + font-weight: 500;
  177 + font-family: "PingFang SC";
  178 + margin-left: 16rpx;
  179 + margin-bottom:32rpx;
  180 + box-sizing: border-box;
  181 +
  182 + .tip {
  183 + position: absolute;
  184 + bottom: -20rpx;
  185 + left: 50%;
  186 + transform: translate(-50%);
  187 + width: 36rpx;
  188 + height: 8rpx;
  189 + border-radius: 32rpx;
  190 + opacity: 1;
  191 + border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
  192 + background: rgba(254, 208, 0, 1);
  193 + }
  194 + }
  195 +
  196 + .newnav {
  197 + color: rgba(0, 0, 0, 0.9);
  198 + font-size: 28rpx;
  199 + font-weight: 600;
  200 + font-family: "PingFang SC";
  201 + }
  202 + }
  203 + }
  204 +
  205 + .group {
  206 + margin-top: 208rpx;
  207 + padding: 16rpx 24rpx;
  208 +
  209 + .item {
  210 + padding: 32rpx;
  211 + margin-bottom: 24rpx;
  212 + border-radius: 24rpx;
  213 + opacity: 1;
  214 + background: rgba(255, 255, 255, 1);
  215 +
  216 + .bot {
  217 + justify-content: space-between;
  218 +
  219 + image {
  220 + margin-right: 20rpx;
  221 + width: 144rpx;
  222 + height: 144rpx;
  223 + border-radius: 16rpx;
  224 + }
  225 +
  226 + .left {
  227 + .lefte{
  228 + flex: 1;
  229 + .title {
  230 + font-size: 28rpx;
  231 + font-weight: 700;
  232 + }
  233 +
  234 + .time {
  235 + margin-top: 32rpx;
  236 + color: rgba(0, 0, 0, 0.6);
  237 + font-size: 26rpx;
  238 + }
  239 +
  240 + }
  241 +
  242 + }
  243 +
  244 + }
  245 +
  246 + }
  247 + }
  248 + }
  249 +</style>
  1 +<template>
  2 + <view class="">
  3 + <view class="mainBox">
  4 + <view class="title">{{detail.title}}</view>
  5 + <view class="timenev flexD">
  6 + <view class="time">
  7 + 发布时间{{detail.publishtime}}
  8 + </view>
  9 + <image src="../../static/ic_fenxiang.png" mode="" @click="shareModel=true"></image>
  10 + </view>
  11 + <mp-html :content="detail.content" />
  12 + </view>
  13 + <view class="share" v-if="shareModel" @click="shareModel=false">
  14 + <image src="/static/detailShare.png" mode=""></image>
  15 + <view class="">
  16 + 点击这里进行分享
  17 + </view>
  18 + </view>
  19 + </view>
  20 +</template>
  21 +
  22 +<script>
  23 + import {
  24 + arcDetail
  25 + } from '@/api/mine.js'
  26 +
  27 + export default {
  28 + data() {
  29 + return {
  30 + id: "",
  31 + detail: {
  32 + title: "",
  33 + publishtime: "",
  34 + content: "",
  35 + },
  36 + shareModel: false,
  37 + Images: "http://yuanjie.n.broing.cn/assets/img/share_logo.jpg",
  38 + jssdk: {},
  39 + }
  40 + },
  41 +
  42 + onLoad(options) {
  43 + this.id = options.id
  44 + let title = uni.getStorageSync("deltitle")
  45 + if(uni.getStorageSync("deltitle")){
  46 + uni.setNavigationBarTitle({
  47 + title: title //这是修改后的导航栏文字
  48 + })
  49 + }
  50 + let URL=window.location.href
  51 + this.$wxH5Share.get_jssdk(title,URL)
  52 + this.arc_detail()
  53 + },
  54 + onUnload() {
  55 + uni.removeStorageSync("deltitle")
  56 + },
  57 + methods: {
  58 + //详情
  59 + async arc_detail() {
  60 + try {
  61 + const res = await arcDetail(this.id)
  62 + this.detail = res.detail
  63 + console.log('arc_detail', res)
  64 + // 保存数据
  65 + } catch (err) {
  66 + uni.showToast({
  67 + title: err,
  68 + icon: 'none'
  69 + })
  70 + console.log('arc_detail', err)
  71 + }
  72 + },
  73 + }
  74 + }
  75 +</script>
  76 +
  77 +<style lang="less">
  78 + .mainBox {
  79 + padding: 24rpx 31rpx;
  80 +
  81 + .timenev {
  82 + margin-top: 20rpx;
  83 + color: rgba(179, 179, 179, 1);
  84 + font-size: 24rpx;
  85 + font-weight: 400;
  86 + font-family: "PingFang SC";
  87 +
  88 + image {
  89 + width: 40rpx;
  90 + height: 40rpx;
  91 + }
  92 + }
  93 + }
  94 +
  95 + .share {
  96 + position: fixed;
  97 + left: 0;
  98 + top: 0;
  99 + width: 100%;
  100 + height: 100%;
  101 + background: rgba(0, 0, 0, .6);
  102 +
  103 + image {
  104 + position: fixed;
  105 + right: 80rpx;
  106 + top: 4rpx;
  107 + width: 188rpx;
  108 + height: 262rpx;
  109 + }
  110 +
  111 + view {
  112 + position: fixed;
  113 + right: 80rpx;
  114 + top: 300rpx;
  115 + color: rgba(255, 255, 255, 1);
  116 + font-size: 36rpx;
  117 + font-weight: 700;
  118 + }
  119 + }
  120 +</style>
1 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>琉璃藏宝阁</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) 1 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>琉璃藏宝阁</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
2 - document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.25d822ea.js></script><script src=/static/js/index.2bf41c23.js></script></body></html>  
  2 + document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2772579d.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.25d822ea.js></script><script src=/static/js/index.33938750.js></script></body></html>
@@ -3,6 +3,7 @@ import { @@ -3,6 +3,7 @@ import {
3 get_jssdk 3 get_jssdk
4 } from '@/api/index.js' // 分享接口后台提供,用于获取appid,timestamp,nonceStr,signature 4 } from '@/api/index.js' // 分享接口后台提供,用于获取appid,timestamp,nonceStr,signature
5 5
  6 +
6 var Shares = { 7 var Shares = {
7 async get_jssdk(title, href) { 8 async get_jssdk(title, href) {
8 console.log(title,href, 'YE面数据') 9 console.log(title,href, 'YE面数据')