Commit 0b2dd4d9 by honghong

对接用户需求列表,详情,意见反馈,动态列表和详情,用户评论列表和添加用户评论接口

parent 40d1a790
import {
ApiHttp
} from '@/utils/request.js'
// 新增用户反馈
const addUserFeedback = (params) => {
return ApiHttp('/xinrenli/userFeedback', params, 'POST')
}
// 查询优惠卷列表
const couponListGet = (params) =>{
return ApiHttp('/xinrenli/coupon/list',params,'GET')
}
export {
addUserFeedback,
couponListGet
}
\ No newline at end of file
import {
ApiHttp
} from '@/utils/request.js'
//查询文章列表
const userArticleGet = (params) => {
return ApiHttp('/xinrenli/article/list',params,'GET')
}
// 获取文章详细信息
const articleDetail = (params) => {
return ApiHttp(`/xinrenli/article/${params}`,'GET')
}
// 查询用户评论列表
const userEvaluateGet = (params) => {
return ApiHttp('/xinrenli/userComment/list',params,'GET')
}
// 新增用户评论
const addUserEvaluate = (params) => {
return ApiHttp('/xinrenli/userComment',params,'POST')
}
export {
userArticleGet,
articleDetail,
userEvaluateGet,
addUserEvaluate
}
\ No newline at end of file
import {
ApiHttp
} from '@/utils/request.js'
//用户需求广场
const userNeedSquare = (params) => {
return ApiHttp('/xinrenli/order/userDemandSquare',params,'GET')
}
// 获取订单详细信息
const orderDetailMsg = (params) => {
return ApiHttp('/xinrenli/article',params,'GET')
}
export {
userNeedSquare,
orderDetailMsg
}
\ No newline at end of file
<template> <template>
<view> <view>
<view class="d-flex margin-top-two" v-for="(item,index) in personEvalList"> <view class="d-flex margin-top-two" v-for="(item,index) in personEvalList">
<img class="avatar-img" :src="item.avatar" alt=""> <img class="avatar-img" :src="item.userHead" alt="">
<view class="flex-1 margin-left-one"> <view class="flex-1 margin-left-one">
<view class="d-flex a-center j-sb"> <view class="d-flex a-center j-sb">
<view class="nickname">{{item.nickname}}</view> <view class="nickname">{{item.createUser ? item.createUser : ''}}</view>
<view class="font">{{item.date}}</view> <view class="font">{{item.createTime | formatDate}}</view>
</view> </view>
<view class="evaluateText">{{item.content}}</view> <view class="evaluateText">{{item.content}}</view>
</view> </view>
......
...@@ -3,27 +3,29 @@ ...@@ -3,27 +3,29 @@
<!-- 评价 --> <!-- 评价 -->
<view class="evaluate"> <view class="evaluate">
<view class="evaluateCenter"> <view class="evaluateCenter">
<view class="evaluateItem" v-for="(item, index) in list" :key="index"> <view class="evaluateItem" v-for="(item, index) in list" :key="index" @click="handleLookId(item)">
<view class="evaluateTip d-flex a-center j-sb"> <view class="evaluateTip d-flex j-sb a-center">
<view class="d-flex a-center"> <view class="d-flex a-center">
<image class="img" :src="item.image" mode="widthFix"></image> <image class="img" src="../static/logoLogin.png" mode="widthFix"></image>
<view class="evaluate-name">{{ item.name}}</view> <view class="evaluate-name">{{ item.createUser}}</view>
</view> </view>
<view class="font">{{item.createTime | formatDate}}</view>
<view class="font">{{item.time}}</view>
</view> </view>
<view class="evaluate-title">这是文章标题!</view> <view class="evaluate-title">{{item.title}}</view>
<view class="evaluateText" :class="{lineclamp2:item.contentAll}"> {{item.content}} </view> <view class="evaluateText" :class="{lineclamp2:item.contentAll}"> {{item.content}} </view>
<!-- <view class="" v-if="item.isMore"> <!-- <view class="" v-if="item.isMore">
<view class="rightText" v-if="item.contentAll" @click="changeAllFun(item, index)">全部</view> <view class="rightText" v-if="item.contentAll" @click="changeAllFun(item, index)">全部</view>
<view class="rightText" v-else @click="changeAllFun(item, index)">收起</view> <view class="rightText" v-else @click="changeAllFun(item, index)">收起</view>
</view> --> </view> -->
<view class="evaluateListImg"> <view class="evaluateListImg">
<view class="evaluateListImgItem" v-for="(itm, ind) in item.imageList" :key="ind" <view class="evaluateListImgItem" v-for="(itm, ind) in item.fileVos" :key="ind"
@click.stop="handlePreview(index,ind)"> @click.stop="handlePreview(index,ind)">
<image :src="itm.url" mode="scaleToFill"></image> <image :src="itm.url" mode="scaleToFill"></image>
</view> </view>
</view> </view>
<view class="margin-top-two">
<comment-list :personEvalList="item.commentVos"></comment-list>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -72,17 +74,23 @@ ...@@ -72,17 +74,23 @@
}) })
this.list = list this.list = list
}, },
//点击获取id
handleLookId(data) {
this.$emit('getId', data.id)
},
//图片预览 //图片预览
handlePreview(index, inx) { handlePreview(index, inx) {
console.log(index, inx)
let that = this let that = this
var photoList = that.list[index].imageList.map(item => { // item 获取到的图片地址 var photoList = that.list[index].fileVos.map(item => { // item 获取到的图片地址
return item.url; return item.url;
}); });
uni.previewImage({ console.log(photoList, '第三')
current: inx, // uni.previewImage({
urls: photoList, // current: inx,
loop: true // urls: photoList,
}) // loop: true
// })
} }
} }
...@@ -91,7 +99,7 @@ ...@@ -91,7 +99,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.evaluate .evaluateCenter .evaluateItem { .evaluate .evaluateCenter .evaluateItem {
display: inline-block; // display: inline-block;
} }
// 展开收起 // 展开收起
......
// let hostUrl = 'https://baiyingroup.nyinhong.com', // 测试 let hostUrl = 'http://xinrenli.nyinhong.com', // 测试
// // let hostUrl = 'https://baiyin-uat.nyinhong.com', // UAT // let hostUrl = 'http://192.168.0.109:7001', // UAT
// // let hostUrl = 'https://pepsibdp.masterkong.com.cn', // prd // // let hostUrl = 'https://pepsibdp.masterkong.com.cn', // prd
// api = '/api', api = '/api',
// imgApi = '/admimage/';
let hostUrl = '',
api = '',
imgApi = '/admimage/'; imgApi = '/admimage/';
// let hostUrl = '',
// api = '',
// imgApi = '/admimage/';
switch (process.env.UNI_BASE_ENV) { switch (process.env.UNI_BASE_ENV) {
case 'development': case 'development':
hostUrl = process.env.UNI_BASE_URL; hostUrl = process.env.UNI_BASE_URL;
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
</template> </template>
<script> <script>
import {
orderDetailMsg
} from '../../api/system/index.js'
import apiBaseConfig from '@/config/index.js'; import apiBaseConfig from '@/config/index.js';
export default { export default {
data() { data() {
...@@ -64,7 +67,9 @@ ...@@ -64,7 +67,9 @@
scrollTopHeader: 0 scrollTopHeader: 0
}; };
}, },
onLoad() { onLoad(option) {
console.log(option.id,'结束')
this.getDetailData(option.id)
this.timer = null; this.timer = null;
this.innerAudioContext = uni.createInnerAudioContext(); this.innerAudioContext = uni.createInnerAudioContext();
// 监听音频进入可以播放状态的事件 // 监听音频进入可以播放状态的事件
...@@ -86,6 +91,11 @@ ...@@ -86,6 +91,11 @@
}) })
}, },
methods: { methods: {
getDetailData(id){
orderDetailMsg({id:id}).then(res=>{
console.log(res,'详情')
})
},
// 播放 // 播放
doPlay() { doPlay() {
if (!this.innerAudioContext.src) { if (!this.innerAudioContext.src) {
......
...@@ -24,7 +24,16 @@ Vue.component('com-navbar', comNavBar) ...@@ -24,7 +24,16 @@ Vue.component('com-navbar', comNavBar)
//人员评论列表 //人员评论列表
import commentList from '@/components/comment/comment.vue' import commentList from '@/components/comment/comment.vue'
Vue.component('comment-list',commentList) Vue.component('comment-list', commentList)
// 时间过滤器
Vue.filter('formatDate', date => {
let newDate = new Date(date);
let year = newDate.getFullYear();
let month = newDate.getMonth().toString().padStart(2, 0);
let day = newDate.getDay().toString().padStart(2, 0);
return year + '-' + month + '-' + day;
})
uni.$u.setConfig({ uni.$u.setConfig({
config: { config: {
unit: 'rpx' unit: 'rpx'
......
...@@ -70,12 +70,10 @@ ...@@ -70,12 +70,10 @@
</template> </template>
<script> <script>
import apiBaseConfig from '@/config/index.js'; import {couponListGet} from '../../api/my/index.js'
export default { export default {
data() { data() {
return { return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
scrollTopHeader: 0, scrollTopHeader: 0,
optionData: {}, optionData: {},
title: '' title: ''
...@@ -86,8 +84,14 @@ ...@@ -86,8 +84,14 @@
self.optionData = option; self.optionData = option;
console.log(option) console.log(option)
self.initial(); self.initial();
self.getCoupon()
}, },
methods: { methods: {
getCoupon(){
couponListGet().then(res=>{
console.log('优惠券',res)
})
},
initial() { initial() {
let self = this; let self = this;
switch (self.optionData.type) { switch (self.optionData.type) {
......
...@@ -2,35 +2,22 @@ ...@@ -2,35 +2,22 @@
<view class="content"> <view class="content">
<view class="content-form"> <view class="content-form">
<u--form label-position="top" labelWidth="100" :model="model" :rules="rules" ref="form"> <u--form label-position="top" labelWidth="100" :model="model" :rules="rules" ref="form">
<u-form-item <u-form-item required label="标题" prop="title" borderBottom :customStyle="{
required
label="标题"
prop="title"
borderBottom
:customStyle="{
'flex-direction': 'row !important' 'flex-direction': 'row !important'
}" }">
> <u--input inputAlign="right" maxlength="-1" border="none" v-model="model.title" placeholder="请填写标题">
<u--input inputAlign="right" maxlength="-1" border="none" v-model="model.title" placeholder="请填写标题"></u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item required label="备注" prop="remarks" borderBottom> <u-form-item required label="备注" prop="content" borderBottom>
<u--textarea <u--textarea :customStyle="{
:customStyle="{
marginTop: '20rpx', marginTop: '20rpx',
background: '#F5F5F5', background: '#F5F5F5',
border: 'none' border: 'none'
}" }" v-model="model.content" placeholder="备注说明" height="128rpx"></u--textarea>
v-model="model.remarks"
placeholder="备注说明"
height="128rpx"
></u--textarea>
</u-form-item> </u-form-item>
</u--form> </u--form>
</view> </view>
<u-button <u-button @click="handleSubmit" text="提交反馈" color="#2C66FF" :customStyle="{
text="提交反馈"
color="#2C66FF"
:customStyle="{
width: '710rpx', width: '710rpx',
height: '80rpx', height: '80rpx',
borderRadius: '10rpx', borderRadius: '10rpx',
...@@ -38,22 +25,29 @@ ...@@ -38,22 +25,29 @@
position: 'absolute', position: 'absolute',
bottom: '142rpx', bottom: '142rpx',
left: '20rpx' left: '20rpx'
}" }"></u-button>
></u-button>
</view> </view>
</template> </template>
<script> <script>
import apiBaseConfig from '@/config/index.js'; // import apiBaseConfig from '@/config/index.js';
export default { import {
addUserFeedback
} from '@/api/my/index.js'
export default {
data() { data() {
return { return {
imgBgUrl: apiBaseConfig.imgBgUrl, // imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData, globalData: getApp().globalData,
scrollTopHeader: 0, scrollTopHeader: 0,
model: { model: {
title: '', title: '',
remarks: '' content: '',
userId:'111',
modifyTime:'2021-12-03 09:30:11',
deleteStatus:0,
createUser:'李哈哈',
modifyUser:'杜小渣'
}, },
rules: { rules: {
title: { title: {
...@@ -62,7 +56,7 @@ export default { ...@@ -62,7 +56,7 @@ export default {
message: '请填写标题', message: '请填写标题',
trigger: ['blur', 'change'] trigger: ['blur', 'change']
}, },
remarks: { content: {
type: 'string', type: 'string',
required: true, required: true,
message: '请填写备注说明', message: '请填写备注说明',
...@@ -76,19 +70,62 @@ export default { ...@@ -76,19 +70,62 @@ export default {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。 //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
this.$refs.form.setRules(this.rules); this.$refs.form.setRules(this.rules);
}, },
methods: {} methods: {
}; handleSubmit() {
let that = this
that.model = {
...that.model,
content:that.model.content.trim()
}
that.$refs.form.validate().then(res => {
addUserFeedback(that.model).then(res=>{
if(res.code == 200){
uni.showToast({
title:'提交成功!',
icon:'none',
duration:2000,
success() {
setTimeout(()=>{
that.$uniGo.navigateBack({
delta: 1
});
that.resetForm()
},1000)
}
})
}
})
// uni.$u.toast('校验通过')
}).catch(errors => {
uni.$u.toast('请完善信息')
})
},
resetForm(){
this.model = {
title: '',
content: '',
userId:'111',
modifyTime:'2021-12-03 09:30:11',
deleteStatus:0,
createUser:'李哈哈',
modifyUser:'杜小渣'
}
}
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
&-form { &-form {
margin: 30rpx 20rpx; margin: 30rpx 20rpx;
width: calc(100% - 20rpx * 2); width: calc(100% - 20rpx * 2);
/deep/ .u-form { /deep/ .u-form {
width: calc(100% - 20rpx * 2); width: calc(100% - 20rpx * 2);
margin: 0rpx 20rpx; margin: 0rpx 20rpx;
} }
} }
} }
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
<view class="paddding-x-two"> <view class="paddding-x-two">
<view class="eval-box"> <view class="eval-box">
<view class="evaluate-title">文章标题文章标题文章标题文章标题文章标题</view> <view class="evaluate-title">{{articleData.title}}</view>
<view class="d-flex a-center j-sb margin-top-two"> <view class="d-flex a-center j-sb margin-top-two">
<view class="d-flex a-center"> <view class="d-flex a-center">
<image class="img" <image class="img"
...@@ -19,23 +19,23 @@ ...@@ -19,23 +19,23 @@
<view class="evaluate-name">张三</view> <view class="evaluate-name">张三</view>
</view> </view>
<view class="eval-time">发布于2022-11-16</view> <view class="eval-time">发布于{{ articleData.createTime | formatDate}}</view>
</view> </view>
<view class="evaluateText text-indent"> <view class="evaluateText text-indent">
评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容 {{articleData.content}}
</view> </view>
</view> </view>
</view> </view>
<view class="bgWhite"> <view class="bgWhite">
<view class="padding-aval"> <view class="padding-aval">
<comment-list :personEvalList="personEvalList"></comment-list> <comment-list :personEvalList="userEvalList"></comment-list>
</view> </view>
</view> </view>
</view> </view>
<view class="comment-box"> <view class="comment-box">
<view class="paddding-x-two comment-box-height d-flex a-center j-sb"> <view class="paddding-x-two comment-box-height d-flex a-center j-sb">
<input class="send-input" type="text" placeholder="评论一下吧"> <input v-model="content" class="send-input" type="text" placeholder="评论一下吧">
<view class="send-btn-box">发送</view> <view class="send-btn-box" @click="handleSend">发送</view>
</view> </view>
</view> </view>
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
</template> </template>
<script> <script>
import {articleDetail,userEvaluateGet,addUserEvaluate} from '../../api/order/index.js'
export default { export default {
data() { data() {
return { return {
...@@ -76,13 +77,61 @@ ...@@ -76,13 +77,61 @@
date: '2022-05-11', date: '2022-05-11',
content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容' content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
}, },
] ],
articleData:{},
userQuery:{
pageNum:1,
pageSize:10,
articleId:null
},
userEvalList:[],
content:'',//评论的内容
} }
}, },
onLoad(option) {
console.log(option.id,'接受的')
this.getDetail(option.id)
this.getUserEvalList(option.id)
},
methods: { methods: {
getDetail(id){
let that = this
articleDetail(id).then(res=>{
console.log(res,'文章详情')
if(res.code == 200){
that.articleData = res.data
}
})
},
getUserEvalList(id){
let that = this
that.userQuery.articleId = id
userEvaluateGet(that.userQuery).then(res=>{
console.log(res,'用户评论列表')
if(res.code == 200){
if(res.total > 0){
this.userEvalList = res.rows
}
}
})
},
handleSend(){
let that = this
that.content = that.content.trim()
if(that.content){
addUserEvaluate({content:this.content.trim()}).then(res=>{
console.log('发送',res)
})
}else{
return uni.showToast({
title:'不可发布空白内容',
icon:'none'
})
}
} }
} }
}
</script> </script>
<style> <style>
......
...@@ -16,19 +16,19 @@ ...@@ -16,19 +16,19 @@
<view></view> <view></view>
<view>用户需求广场</view> <view>用户需求广场</view>
</view> </view>
<view class="" v-if="arr && arr.length"> <view class="" v-if="userNeedList && userNeedList.length">
<view class="content-matter-marketplace" v-for="(v , index) in 10" @click="clickJump" :key="index"> <view class="content-matter-marketplace" v-for="(v , index) in userNeedList" @click="clickJump(v)" :key="index">
<image src="/static//icon/sytb.png" mode=""></image> <image :src="v.fileVos[0].url" mode=""></image>
<view class="content-matter-marketplace-bazaar"> <view class="content-matter-marketplace-bazaar d-flex flex-column j-center">
<view class=""> <view class="">
灯泡灯芯坏了 {{v.title}}
</view> </view>
<view class=""> <view class="">
说明:有一个字不是特别亮,希望换一盏灯希望换一盏灯希望换一盏灯 说明:{{v.remark}}
</view> </view>
<view class=""> <view class="">
<text>维修时间:</text> <text>维修时间:</text>
<text>2023-02-23</text> <text>{{v.repairTime}}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -47,15 +47,13 @@ ...@@ -47,15 +47,13 @@
</template> </template>
<script> <script>
import apiBaseConfig from '@/config/index.js'; import { userNeedSquare } from '@/api/system/index.js'
export default { export default {
data() { data() {
return { return {
title: 'Hello', title: 'Hello',
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData, globalData: getApp().globalData,
scrollTopHeader: 0, scrollTopHeader: 0,
arr: [],
tabBarList: [{ tabBarList: [{
name: "首页", // name name: "首页", // name
icon: "/static/tabbar/tb1.png", // 图标 icon: "/static/tabbar/tb1.png", // 图标
...@@ -87,17 +85,30 @@ ...@@ -87,17 +85,30 @@
url: "/pages/my/index", url: "/pages/my/index",
type: 'type' type: 'type'
}], }],
userNeedList:[],//需求广场列表
} }
}, },
onLoad() {}, onLoad() {
this.getSquare()
},
onPageScroll(res) { onPageScroll(res) {
// console.log('页面滚动了onPageScroll-app', res.scrollTop); // console.log('页面滚动了onPageScroll-app', res.scrollTop);
this.scrollTopHeader = res.scrollTop; this.scrollTopHeader = res.scrollTop;
}, },
methods: { methods: {
clickJump() { getSquare(){
userNeedSquare().then(res=>{
console.log(res,'需求广场')
if(res.code == 200){
if(res.total > 0){
this.userNeedList = res.rows
}
}
})
},
clickJump(info) {
this.$uniGo.navigateTo({ this.$uniGo.navigateTo({
url: `/home/index/index` url: `/home/index/index?id=${info.id}`
}); });
}, },
} }
......
...@@ -2,11 +2,8 @@ ...@@ -2,11 +2,8 @@
<view class="content"> <view class="content">
<view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view> <view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view>
<view class="friends-list-box" @click="handleDetail"> <view class="friends-list-box">
<evaluateList :list="evaluateList"></evaluateList> <evaluateList :list="articleList" @getId="handleDetail"></evaluateList>
<view class="margin-top-two">
<comment-list :personEvalList="personEvalList"></comment-list>
</view>
</view> </view>
<com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="动态" <com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="动态"
:titleStyle="{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" /> :titleStyle="{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
...@@ -45,6 +42,7 @@ ...@@ -45,6 +42,7 @@
</template> </template>
<script> <script>
import {userArticleGet} from '../../api/order/index.js'
import evaluateList from '../../components/evaluate.vue' import evaluateList from '../../components/evaluate.vue'
export default { export default {
components: { components: {
...@@ -53,6 +51,13 @@ ...@@ -53,6 +51,13 @@
data() { data() {
return { return {
globalData: getApp().globalData, globalData: getApp().globalData,
queryParams:{
pageNum:1,//当前页数
pageSize:10,//分页大小
},
articleList:[],//文章列表
total:0,//总数
evaluateList: [{ evaluateList: [{
name: '马保国', name: '马保国',
image: 'https://slzh-oss.oss-cn-beijing.aliyuncs.com/usercenter/template/2c94809a787cec070179e01ec0ba02a9.jpg', image: 'https://slzh-oss.oss-cn-beijing.aliyuncs.com/usercenter/template/2c94809a787cec070179e01ec0ba02a9.jpg',
...@@ -97,35 +102,31 @@ ...@@ -97,35 +102,31 @@
date: '2022-01-31', date: '2022-01-31',
content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容' content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
}, },
{
avatar: 'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
nickname: '李小乖',
date: '2022-05-11',
content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar: 'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
nickname: '李哈哈',
date: '2022-01-31',
content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar: 'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
nickname: '李小乖',
date: '2022-05-11',
content: '评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
] ]
} }
}, },
onLoad() { onLoad() {
this.getArticleList()
}, },
methods: { methods: {
handleDetail() { getArticleList(){
let that = this
userArticleGet(that.queryParams).then(res=>{
console.log('文章列表',res.rows)
if(res.code == 200){
if(res.total > 0){
that.articleList = res.rows
that.total = res.total
}
}
})
},
handleDetail(id) {
let that = this let that = this
that.$uniGo.navigateTo({ that.$uniGo.navigateTo({
url: '/order/detail/detail' url: '/order/detail/detail?id='+id
}) })
} }
......
...@@ -53,6 +53,7 @@ const ApiHttp = (url, params, method, isToken = true) => { ...@@ -53,6 +53,7 @@ const ApiHttp = (url, params, method, isToken = true) => {
data: params, data: params,
header, header,
success: (res) => { success: (res) => {
console.log(res,'封装接口成功')
const { const {
data data
} = res; } = res;
......
const isEmojiCharacter = (substring) => {
for (var i = 0; i < substring.length; i++) {
var hs = substring.charCodeAt(i);
if (0xd800 <= hs && hs <= 0xdbff) {
if (substring.length > 1) {
var ls = substring.charCodeAt(i + 1);
var uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
if (0x1d000 <= uc && uc <= 0x1f77f) {
return true;
}
}
} else if (substring.length > 1) {
var ls = substring.charCodeAt(i + 1);
if (ls == 0x20e3) {
return true;
}
} else {
if (0x2100 <= hs && hs <= 0x27ff) {
return true;
} else if (0x2B05 <= hs && hs <= 0x2b07) {
return true;
} else if (0x2934 <= hs && hs <= 0x2935) {
return true;
} else if (0x3297 <= hs && hs <= 0x3299) {
return true;
} else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 ||
hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
hs == 0x2b50) {
return true;
}
}
}
}
export {
isEmojiCharacter
}
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