merge
@@ -40,13 +40,13 @@ const shopsDetail = (shopId) => {
|
||||
}
|
||||
|
||||
// 店铺商品
|
||||
const shopsGoods = (shop_id, category_id,page) => {
|
||||
const shopsGoods = (shopId, categoryId,page) => {
|
||||
return request({
|
||||
url: 'mall/goods',
|
||||
data: {
|
||||
shop_id,
|
||||
category_id,
|
||||
page,
|
||||
shop_id:shopId,
|
||||
category_id:categoryId,
|
||||
page:page,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
72
common/image.js
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* 使用plus.zip.compressImage压缩,目前仅支持App端
|
||||
*/
|
||||
|
||||
|
||||
let images = [];//压缩后的图片集合
|
||||
let max_width = 500;//若宽度大于此尺寸,触发压缩,否则使用原图,可自行修改
|
||||
|
||||
/**
|
||||
* 接收图片集合
|
||||
*/
|
||||
async function compress(_images, _fun) {
|
||||
for (let i = 0; i < _images.length; i++) {//循环单张压缩
|
||||
var compressd_image = await _compress(_images[i])
|
||||
images.push(compressd_image);
|
||||
}
|
||||
_fun && _fun(images);
|
||||
images = [];//压缩结束重置images,准备下次压缩
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜鸟请大神教我如何优化QAQ~
|
||||
*/
|
||||
async function _compress(_image) {
|
||||
|
||||
var last4chars = _image.slice(-4);
|
||||
if (plus.os.name == 'Android') { //安卓下plus.zip.compressImage只支持jpeg/jpg/png
|
||||
if (!~last4chars.indexOf('jpg') && !~last4chars.indexOf('png') && !~last4chars.indexOf('jpeg')) {
|
||||
return _image;
|
||||
}
|
||||
}
|
||||
|
||||
var image_info = await get_image_info(_image);
|
||||
if (image_info.width < max_width) { //小于800不压缩
|
||||
return _image;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
plus.zip.compressImage({
|
||||
src: _image,//原始图片的路径
|
||||
dst: _image,//压缩转换目标图片的路径(为了省事这里使用原路径)
|
||||
overwrite: true,//使用原文件名并覆盖,如果想将原文件保留,并和压缩后图片同时上传,需要改为false,并修改dst
|
||||
quality: 100,//1-100,压缩后质量,越低图片占用空间越小,越模糊
|
||||
width: max_width+'px',//这里先写死800;height默认为auto,即根据width与源图宽的缩放比例计算
|
||||
},
|
||||
(res) => {
|
||||
resolve(res.target)
|
||||
},
|
||||
(e) => {
|
||||
reject(e);
|
||||
}
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
function get_image_info(_image) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getImageInfo({
|
||||
src: _image,
|
||||
success: res => {
|
||||
resolve(res);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
compress
|
||||
}
|
||||
247
common/index/index.css
Normal file
118
common/index/index.post.data.js
Normal file
@@ -0,0 +1,118 @@
|
||||
export default [{
|
||||
"post_id": '1',
|
||||
"uid": 1,
|
||||
"username": "龙葵",
|
||||
"header_image": "/static/chat/index/test/header03.jpg",
|
||||
"content": {
|
||||
"text": "内裤上百条,晒不干一条;衣服晾不干,亲人泪两行",
|
||||
"images": ["/static/chat/index/test/test2.jpg"]
|
||||
},
|
||||
"islike": 0,
|
||||
"like": [{
|
||||
"uid": 2,
|
||||
"username": "小李子,"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": "小张子"
|
||||
}
|
||||
],
|
||||
"comments": {
|
||||
"total": 2,
|
||||
"comment": [{
|
||||
"uid": 2,
|
||||
"username": '小爱',
|
||||
"content": "加个微信吧!基金基金基金基金基金基金基金基金基金基金基金基金基金基金基金基金基金基金"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": '小虎',
|
||||
"content": "一起出去好吗?"
|
||||
}
|
||||
]
|
||||
},
|
||||
"timestamp": "5分钟前"
|
||||
},
|
||||
{
|
||||
"post_id": 2,
|
||||
"uid": 1,
|
||||
"username": "菁英公寓-打造属于你的私密空间 小吴",
|
||||
"header_image": "/static/chat/index/test/header04.jpg",
|
||||
"content": {
|
||||
"text": "租房:东环朝南\n\r2室大衣柜\n\r燃气热水器\n\r5楼采光充足\n\r随时入住",
|
||||
"images": [
|
||||
"/static/chat/index/test/pig-01.jpg",
|
||||
"/static/chat/index/test/pig-02.jpg",
|
||||
"/static/chat/index/test/pig-03.jpg",
|
||||
"/static/chat/index/test/pig-04.jpg",
|
||||
"/static/chat/index/test/pig-05.jpg",
|
||||
"/static/chat/index/test/pig-06.jpg",
|
||||
"/static/chat/index/test/pig-07.jpg",
|
||||
"/static/chat/index/test/pig-08.jpg",
|
||||
"/static/chat/index/test/pig-09.jpg"
|
||||
]
|
||||
},
|
||||
"islike": 0,
|
||||
"like": [{
|
||||
"uid": 2,
|
||||
"username": "小王子,"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": "张大大"
|
||||
}
|
||||
],
|
||||
"comments": {
|
||||
"total": 2,
|
||||
"comment": [{
|
||||
"uid": 2,
|
||||
"username": '小虎',
|
||||
"content": "吃错药了!"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": '小狼',
|
||||
"content": "霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"timestamp": "1小时前"
|
||||
},
|
||||
{
|
||||
"post_id": 2,
|
||||
"uid": 1,
|
||||
"username": "BSK 必胜客新苏 小乐",
|
||||
"header_image": "/static/chat/index/test/header05.jpg",
|
||||
"content": {
|
||||
"text": "美食花样多,诱人如北北;迎来小宇宙,幸福两行泪[喵喵]这可是小必的心声啊~",
|
||||
"images": ["/static/chat/index/test/header01.jpg", "/static/chat/index/test/header01.jpg",
|
||||
"/static/chat/index/test/header01.jpg", "/static/chat/index/test/header01.jpg"
|
||||
]
|
||||
},
|
||||
"islike": 0,
|
||||
"like": [{
|
||||
"uid": 2,
|
||||
"username": "小王子,"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": "张大大"
|
||||
}
|
||||
],
|
||||
"comments": {
|
||||
"total": 2,
|
||||
"comment": [{
|
||||
"uid": 2,
|
||||
"username": '小虎',
|
||||
"content": "吃错药了!"
|
||||
},
|
||||
{
|
||||
"uid": 3,
|
||||
"username": '小狼',
|
||||
"content": "霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍霍!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"timestamp": "7小时前"
|
||||
}
|
||||
]
|
||||
1433
common/uni.css
Normal file
127
components/im-chat/chatinput.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<view class="footer">
|
||||
<!-- <view class="footer-left">
|
||||
<view class="uni-icon uni-icon-mic" @tap="startRecognize"> </view>
|
||||
</view> -->
|
||||
<view class="footer-center">
|
||||
<input class="input-text" type="text" @confirm="sendMessge" v-model="inputValue" :focus="focus" @blur="blur" :placeholder="placeholder"></input>
|
||||
</view>
|
||||
<view class="footer-right">
|
||||
<view id='msg-type' class="send-comment" @tap="sendMessge">发送</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "chat-input",
|
||||
data() {
|
||||
return {
|
||||
inputValue: ''
|
||||
}
|
||||
},
|
||||
props:{
|
||||
placeholder: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
focus: {
|
||||
type:Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
blur: function() {//失焦触发通知父组件
|
||||
var that = this;
|
||||
this.$emit('blur')
|
||||
},
|
||||
startRecognize: function () {
|
||||
var options = {};
|
||||
var that = this;
|
||||
options.engine = 'iFly';
|
||||
that.inputValue = "";
|
||||
plus.speech.startRecognize(options, function (s) {
|
||||
console.log(s);
|
||||
that.inputValue += s;
|
||||
}, function (e) {
|
||||
console.log("语音识别失败:" + e.message);
|
||||
});
|
||||
},
|
||||
sendMessge: function () {
|
||||
if (!this.inputValue) {
|
||||
uni.showModal({
|
||||
content:"还没有输入内容哦!",
|
||||
showCancel:false
|
||||
})
|
||||
return;
|
||||
}
|
||||
var that = this;
|
||||
//点击发送按钮时,通知父组件用户输入的内容
|
||||
this.$emit('send-message', {
|
||||
type: 'text',
|
||||
content: that.inputValue
|
||||
});
|
||||
that.inputValue = '';//清空上次输入的内容
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 80upx;
|
||||
min-height: 80upx;
|
||||
border-top: solid 1px #bbb;
|
||||
overflow: hidden;
|
||||
padding: 5upx;
|
||||
background-color: #F4F5F6;
|
||||
}
|
||||
.footer-left {
|
||||
|
||||
width: 80upx;
|
||||
height: 80upx;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.footer-right {
|
||||
width: 120upx;
|
||||
height: 80upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #1482D1;
|
||||
}
|
||||
.footer-center {
|
||||
flex: 1;
|
||||
padding-left: 20upx;
|
||||
height: 80upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.footer-center .input-text {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
/* border: solid 1upx #ddd; */
|
||||
padding: 10upx !important;
|
||||
font-family: verdana !important;
|
||||
overflow: hidden;
|
||||
border-radius: 15upx;
|
||||
}
|
||||
.footer-right .send-comment{
|
||||
background-color: #007AFF;
|
||||
text-align: center;
|
||||
line-height: 60upx;
|
||||
color: #FFFFFF;
|
||||
width: 80upx;
|
||||
height: 60upx;
|
||||
border-radius: 5px;
|
||||
font-size: 10px;
|
||||
/* height: 60upx; */
|
||||
}
|
||||
</style>
|
||||
92
components/im-chat/messageshow.vue
Normal file
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<view class="m-item" :id="'message'+id">
|
||||
<view class="m-left">
|
||||
<image class="head_icon" src="https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/homeHL.png" v-if="message.user=='home'"></image>
|
||||
</view>
|
||||
<view class="m-content">
|
||||
<view class="m-content-head" :class="{'m-content-head-right':message.user=='customer'}">
|
||||
<view :class="'m-content-head-'+message.user">{{message.content}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-right">
|
||||
<image class="head_icon" src="https://img-cdn-qiniu.dcloud.net.cn/uniapp/app/customerHL.png" v-if="message.user=='customer'"></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['message', 'id']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.m-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-top: 40upx;
|
||||
}
|
||||
.m-left {
|
||||
display: flex;
|
||||
width: 120upx;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.m-content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
.m-right {
|
||||
display: flex;
|
||||
width: 120upx;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.head_icon {
|
||||
width: 80upx;
|
||||
height: 80upx;
|
||||
}
|
||||
.m-content-head {
|
||||
position: relative;
|
||||
}
|
||||
.m-content-head-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.m-content-head-home {
|
||||
text-align: left;
|
||||
background: #1482d1;
|
||||
border: 1px #1482d1 solid;
|
||||
border-radius: 20upx;
|
||||
padding: 20upx;
|
||||
color: white;
|
||||
}
|
||||
.m-content-head-home:before {
|
||||
border: 15upx solid transparent;
|
||||
border-right: 15upx solid #1482d1;
|
||||
left: -26upx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
content: ' '
|
||||
}
|
||||
.m-content-head-customer {
|
||||
border: 1upx white solid;
|
||||
background: white;
|
||||
border-radius: 20upx;
|
||||
padding: 20upx;
|
||||
}
|
||||
.m-content-head-customer:after {
|
||||
border: 15upx solid transparent;
|
||||
border-left: 15upx solid white;
|
||||
top: 20upx;
|
||||
right: -26upx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
content: ' '
|
||||
}
|
||||
</style>
|
||||
1
gl-agent
Submodule
22
node_modules/.yarn-integrity
generated
vendored
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"systemParams": "darwin-x64-93",
|
||||
"modulesFolders": [
|
||||
"node_modules"
|
||||
],
|
||||
"flags": [],
|
||||
"linkedModules": [],
|
||||
"topLevelPatterns": [
|
||||
"moment@^2.29.1",
|
||||
"uni-read-pages@^1.0.5",
|
||||
"uni-simple-router@^2.0.7",
|
||||
"uview-ui@^2.0.27"
|
||||
],
|
||||
"lockfileEntries": {
|
||||
"moment@^2.29.1": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"uni-read-pages@^1.0.5": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
|
||||
"uni-simple-router@^2.0.7": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz",
|
||||
"uview-ui@^2.0.27": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.29.tgz"
|
||||
},
|
||||
"files": [],
|
||||
"artifacts": {}
|
||||
}
|
||||
37
pages.json
@@ -414,6 +414,34 @@
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/chat/index",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "我的圈子",
|
||||
"enablePullDownRefresh" : true,
|
||||
"app-plus" : {
|
||||
"bounce" : "none",
|
||||
"titleNView" : {
|
||||
"type" : "transparent",
|
||||
"buttons" : [
|
||||
{
|
||||
"background" : "rgba(255,255,255,0.2)",
|
||||
"color" : "#696969",
|
||||
"type" : "none",
|
||||
"fontSrc" : "/static/fonts/iconfont1.ttf",
|
||||
"text" : "\ue608" //小相机
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/chat/publish",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "发布"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
@@ -429,7 +457,14 @@
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_02.png",
|
||||
"pagePath": "pages/store/index",
|
||||
"text": "DT商城"
|
||||
}, {
|
||||
},
|
||||
// {
|
||||
// "iconPath": "static/tabBar/tabBar_02.png",
|
||||
// "selectedIconPath": "static/tabBar/tabBar_show_02.png",
|
||||
// "pagePath": "pages/chat/index",
|
||||
// "text": "DT圈子"
|
||||
// },
|
||||
{
|
||||
"iconPath": "static/tabBar/tabBar_03.png",
|
||||
"selectedIconPath": "static/tabBar/tabBar_show_03.png",
|
||||
"pagePath": "pages/user/index",
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
<button @click="login('code')">登录</button>
|
||||
</view>
|
||||
<view class="auth-agreement">
|
||||
登录即表示同意<navigator hover-class="none" url="/pages/vip/agreement?id=3">用户协议</navigator>和<navigator hover-class="none" url="/pages/vip/agreement?id=4">隐私政策</navigator>
|
||||
登录即表示同意<navigator hover-class="none" url="/pages/vip/agreement?id=3">用户协议</navigator>和<navigator
|
||||
hover-class="none" url="/pages/vip/agreement?id=4">隐私政策</navigator>
|
||||
</view>
|
||||
<view class="auth-other" v-if="isKeyAuth">
|
||||
<button @click="login('Akey')">使用本机号码一键登录</button>
|
||||
@@ -239,9 +240,11 @@
|
||||
border-radius: 0;
|
||||
color: $main-color;
|
||||
background: white;
|
||||
&[disabled]{
|
||||
|
||||
&[disabled] {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
@@ -283,6 +286,7 @@
|
||||
|
||||
.auth-other {
|
||||
padding: 0 10vw;
|
||||
|
||||
button {
|
||||
height: 100rpx;
|
||||
line-height: 98rpx;
|
||||
|
||||
277
pages/chat/index.vue
Normal file
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<view id="moments">
|
||||
|
||||
<view class="home-pic">
|
||||
<view class="home-pic-base">
|
||||
<view class="top-pic">
|
||||
<image class="header" src="../../static/chat/index/test/header06.jpg" @tap="test"></image>
|
||||
</view>
|
||||
<view class="top-name">Liuxy</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="moments__post" v-for="(post,index) in posts" :key="index" :id="'post-'+index">
|
||||
<view class="post-left">
|
||||
<image class="post_header" :src="post.header_image"></image>
|
||||
</view>
|
||||
|
||||
<view class="post_right">
|
||||
<text class="post-username">{{post.username}}</text>
|
||||
<view id="paragraph" class="paragraph">{{post.content.text}}</view>
|
||||
<!-- 相册 -->
|
||||
<view class="thumbnails">
|
||||
<view :class="post.content.images.length === 1?'my-gallery':'thumbnail'"
|
||||
v-for="(image, index_images) in post.content.images" :key="index_images">
|
||||
<image class="gallery_img" lazy-load mode="aspectFill" :src="image" :data-src="image"
|
||||
@tap="previewImage(post.content.images,index_images)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 资料条 -->
|
||||
<view class="toolbar">
|
||||
<view class="timestamp">{{post.timestamp}}</view>
|
||||
<view class="like" @tap="like(index)">
|
||||
<image
|
||||
:src="post.islike===0?'../../static/chat/index/islike.png':'../../static/chat/index/like.png'">
|
||||
</image>
|
||||
</view>
|
||||
<view class="comment" @tap="comment(index)">
|
||||
<image src="../../static/chat/index/comment.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 赞/评论区 -->
|
||||
<view class="post-footer">
|
||||
<view class="footer_content">
|
||||
<image class="liked" src="../../static/chat/index/liked.png"></image>
|
||||
<text class="nickname" v-for="(user,index_like) in post.like"
|
||||
:key="index_like">{{user.username}}</text>
|
||||
</view>
|
||||
<view class="footer_content" v-for="(comment,comment_index) in post.comments.comment"
|
||||
:key="comment_index" @tap="reply(index,comment_index)">
|
||||
<text class="comment-nickname">{{comment.username}}: <text
|
||||
class="comment-content">{{comment.content}}</text></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结束 post -->
|
||||
</view>
|
||||
|
||||
<view class="foot" v-show="showInput">
|
||||
<chat-input @send-message="send_comment" @blur="blur" :focus="focus" :placeholder="input_placeholder">
|
||||
</chat-input>
|
||||
<!-- <chat-input @send-message="send_comment" @blur="blur" :placeholder="input_placeholder"></chat-input> -->
|
||||
</view>
|
||||
<view class="uni-loadmore" v-if="showLoadMore">{{loadMoreText}}</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import chatInput from '../../components/im-chat/chatinput.vue'; //input框
|
||||
import postData from '../../common/index/index.post.data.js'; //朋友圈数据
|
||||
|
||||
export default {
|
||||
components: {
|
||||
chatInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
posts: postData, //模拟数据
|
||||
user_id: 4,
|
||||
username: 'Liuxy',
|
||||
|
||||
index: '',
|
||||
comment_index: '',
|
||||
|
||||
input_placeholder: '评论', //占位内容
|
||||
focus: false, //是否自动聚焦输入框
|
||||
is_reply: false, //回复还是评论
|
||||
showInput: false, //评论输入框
|
||||
|
||||
screenHeight: '', //屏幕高度(系统)
|
||||
platform: '',
|
||||
windowHeight: '', //可用窗口高度(不计入软键盘)
|
||||
|
||||
loadMoreText: "加载中...",
|
||||
showLoadMore: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
uni.getStorage({
|
||||
key: 'posts',
|
||||
success: function(res) {
|
||||
console.log(res.data);
|
||||
this.posts = res.data;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
uni.getSystemInfo({ //获取设备信息
|
||||
success: (res) => {
|
||||
this.screenHeight = res.screenHeight;
|
||||
this.platform = res.platform;
|
||||
}
|
||||
});
|
||||
uni.startPullDownRefresh();
|
||||
},
|
||||
onShow() {
|
||||
uni.onWindowResize((res) => { //监听窗口尺寸变化,窗口尺寸不包括底部导航栏
|
||||
if (this.platform === 'ios') {
|
||||
this.windowHeight = res.size.windowHeight;
|
||||
this.adjust();
|
||||
} else {
|
||||
if (this.screenHeight - res.size.windowHeight > 60 && this.windowHeight <= res.size
|
||||
.windowHeight) {
|
||||
this.windowHeight = res.size.windowHeight;
|
||||
this.adjust();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onHide() {
|
||||
// uni.offWindowResize(); //取消监听窗口尺寸变化
|
||||
},
|
||||
onUnload() {
|
||||
this.max = 0,
|
||||
this.data = [],
|
||||
this.loadMoreText = "加载更多",
|
||||
this.showLoadMore = false;
|
||||
},
|
||||
onReachBottom() { //监听上拉触底事件
|
||||
console.log('onReachBottom');
|
||||
this.showLoadMore = true;
|
||||
setTimeout(() => {
|
||||
//获取数据
|
||||
if (this.posts.length < 20) { //测试数据
|
||||
this.posts = this.posts.concat(this.posts);
|
||||
} else {
|
||||
this.loadMoreText = "暂无更多";
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
onPullDownRefresh() { //监听下拉刷新动作
|
||||
console.log('onPullDownRefresh');
|
||||
// 这里获取数据
|
||||
setTimeout(function() {
|
||||
//初始化数据
|
||||
uni.stopPullDownRefresh(); //停止下拉刷新
|
||||
}, 1000);
|
||||
},
|
||||
onNavigationBarButtonTap(e) { //监听标题栏点击事件
|
||||
if (e.index == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/chat/publish'
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
this.navigateTo('../test/test');
|
||||
},
|
||||
navigateTo(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
},
|
||||
like(index) {
|
||||
if (this.posts[index].islike === 0) {
|
||||
this.posts[index].islike = 1;
|
||||
this.posts[index].like.push({
|
||||
"uid": this.user_id,
|
||||
"username": "," + this.username
|
||||
});
|
||||
} else {
|
||||
this.posts[index].islike = 0;
|
||||
this.posts[index].like.splice(this.posts[index].like.indexOf({
|
||||
"uid": this.user_id,
|
||||
"username": "," + this.username
|
||||
}), 1);
|
||||
}
|
||||
},
|
||||
comment(index) {
|
||||
this.showInput = true; //调起input框
|
||||
this.focus = true;
|
||||
this.index = index;
|
||||
},
|
||||
adjust() { //当弹出软键盘发生评论动作时,调整页面位置pageScrollTo
|
||||
return;
|
||||
uni.createSelectorQuery().selectViewport().scrollOffset(res => {
|
||||
var scrollTop = res.scrollTop;
|
||||
let view = uni.createSelectorQuery().select("#post-" + this.index);
|
||||
view.boundingClientRect(data => {
|
||||
console.log("data:" + JSON.stringify(data));
|
||||
console.log("手机屏幕高度:" + this.screenHeight);
|
||||
console.log("竖直滚动位置" + scrollTop);
|
||||
console.log("节点离页面顶部的距离为" + data.top);
|
||||
console.log("节点高度为" + data.height);
|
||||
console.log("窗口高度为" + this.windowHeight);
|
||||
|
||||
uni.pageScrollTo({
|
||||
scrollTop: scrollTop - (this.windowHeight - (data.height + data
|
||||
.top + 45)), //一顿乱算
|
||||
// scrollTop: 50,
|
||||
duration: 300
|
||||
});
|
||||
}).exec();
|
||||
}).exec();
|
||||
},
|
||||
reply(index, comment_index) {
|
||||
this.is_reply = true; //回复中
|
||||
this.showInput = true; //调起input框
|
||||
let replyTo = this.posts[index].comments.comment[comment_index].username;
|
||||
this.input_placeholder = '回复' + replyTo;
|
||||
this.index = index; //post索引
|
||||
this.comment_index = comment_index; //评论索引
|
||||
this.focus = true;
|
||||
},
|
||||
blur: function() {
|
||||
this.init_input();
|
||||
},
|
||||
send_comment: function(message) {
|
||||
|
||||
if (this.is_reply) {
|
||||
var reply_username = this.posts[this.index].comments.comment[this.comment_index].username;
|
||||
var comment_content = '回复' + reply_username + ':' + message.content;
|
||||
} else {
|
||||
var comment_content = message.content;
|
||||
}
|
||||
this.posts[this.index].comments.total += 1;
|
||||
this.posts[this.index].comments.comment.push({
|
||||
"uid": this.user_id,
|
||||
"username": this.username,
|
||||
"content": comment_content //直接获取input中的值
|
||||
});
|
||||
this.init_input();
|
||||
},
|
||||
init_input() {
|
||||
this.showInput = false;
|
||||
this.focus = false;
|
||||
this.input_placeholder = '评论';
|
||||
this.is_reply = false;
|
||||
},
|
||||
previewImage(imageList, image_index) {
|
||||
var current = imageList[image_index];
|
||||
uni.previewImage({
|
||||
current: current,
|
||||
urls: imageList
|
||||
});
|
||||
},
|
||||
goPublish() {
|
||||
uni.navigateTo({
|
||||
url: './publish/publish',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import url("../../common/index/index.css");
|
||||
</style>
|
||||
273
pages/chat/publish.vue
Normal file
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<view class="page" @touchstart="touchStart" @touchend="touchEnd">
|
||||
<form>
|
||||
<view class="uni-textarea">
|
||||
<textarea placeholder="这一刻的想法..." v-model="input_content" />
|
||||
</view>
|
||||
<view class="uni-list list-pd">
|
||||
<view class="uni-list-cell cell-pd">
|
||||
<view class="uni-uploader">
|
||||
<view class="uni-uploader-head">
|
||||
<view class="uni-uploader-title"></view>
|
||||
<view class="uni-uploader-info">{{imageList.length}}/9</view>
|
||||
</view>
|
||||
<view class="uni-uploader-body">
|
||||
<view class="uni-uploader__files">
|
||||
<block v-for="(image,index) in imageList" :key="index">
|
||||
<view class="uni-uploader__file" style="position: relative;">
|
||||
<image class="uni-uploader__img" mode="aspectFill" :src="image"
|
||||
:data-src="image" @tap="previewImage"></image>
|
||||
<view class="close-view" @click="close(index)">×</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="uni-uploader__input-box" v-show="imageList.length < 9">
|
||||
<view class="uni-uploader__input" @tap="chooseImage"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer">
|
||||
<button type="default" class="feedback-submit" @click="publish">提交</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import image from '@/common/image.js';
|
||||
|
||||
var sourceType = [
|
||||
['camera'],
|
||||
['album'],
|
||||
['camera', 'album']
|
||||
]
|
||||
var sizeType = [
|
||||
['compressed'],
|
||||
['original'],
|
||||
['compressed', 'original']
|
||||
]
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// title: 'choose/previewImage',
|
||||
input_content: '',
|
||||
imageList: [],
|
||||
|
||||
|
||||
|
||||
sourceTypeIndex: 2,
|
||||
sourceType: ['拍照', '相册', '拍照或相册'],
|
||||
sizeTypeIndex: 2,
|
||||
sizeType: ['压缩', '原图', '压缩或原图'],
|
||||
countIndex: 8,
|
||||
count: [1, 2, 3, 4, 5, 6, 7, 8, 9],
|
||||
|
||||
//侧滑返回start
|
||||
startX: 0, //点击屏幕起始位置
|
||||
movedX: 0, //横向移动的距离
|
||||
endX: 0, //接触屏幕后移开时的位置
|
||||
//end
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
this.imageList = [],
|
||||
this.sourceTypeIndex = 2,
|
||||
this.sourceType = ['拍照', '相册', '拍照或相册'],
|
||||
this.sizeTypeIndex = 2,
|
||||
this.sizeType = ['压缩', '原图', '压缩或原图'],
|
||||
this.countIndex = 8;
|
||||
},
|
||||
|
||||
methods: {
|
||||
async publish() {
|
||||
if (!this.input_content) {
|
||||
uni.showModal({
|
||||
content: '内容不能为空',
|
||||
showCancel: false,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: '发布中'
|
||||
});
|
||||
|
||||
var location = await this.getLocation(); //位置信息,可删除,主要想记录一下异步转同步处理
|
||||
var images = [];
|
||||
for (var i = 0, len = this.imageList.length; i < len; i++) {
|
||||
var image_obj = {
|
||||
name: 'image-' + i,
|
||||
uri: this.imageList[i]
|
||||
};
|
||||
images.push(image_obj);
|
||||
}
|
||||
|
||||
uni.uploadFile({ //该上传仅为示例,可根据自己业务修改或封装,注意:统一上传可能会导致服务器压力过大
|
||||
url: 'moment/moments', //仅为示例,非真实的接口地址
|
||||
files: images, //有files时,会忽略filePath和name
|
||||
filePath: '',
|
||||
name: '',
|
||||
formData: { //后台以post方式接收
|
||||
'user_id': '1', //自己系统中的用户id
|
||||
'text': this.input_content, //moment文字部分
|
||||
'longitude': location.longitude, //经度
|
||||
'latitude': location.latitude //纬度
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: "发布成功"
|
||||
})
|
||||
uni.navigateBack({ //可根据实际情况使用其他路由方式
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log("e: " + JSON.stringify(e));
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "发布失败,请检查网络"
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getLocation() { //h5中可能不支持,自己选择
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (e) => {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
close(e) {
|
||||
this.imageList.splice(e, 1);
|
||||
},
|
||||
chooseImage: async function() {
|
||||
if (this.imageList.length === 9) {
|
||||
let isContinue = await this.isFullImg();
|
||||
console.log("是否继续?", isContinue);
|
||||
if (!isContinue) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
uni.chooseImage({
|
||||
sourceType: sourceType[this.sourceTypeIndex],
|
||||
sizeType: sizeType[this.sizeTypeIndex],
|
||||
count: this.imageList.length + this.count[this.countIndex] > 9 ? 9 - this.imageList
|
||||
.length : this.count[this.countIndex],
|
||||
success: (res) => {
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
//提交压缩,因为使用了H5+ Api,所以自定义压缩目前仅支持APP平台
|
||||
var compressd = cp_images => {
|
||||
this.imageList = this.imageList.concat(cp_images) //压缩后的图片路径
|
||||
}
|
||||
image.compress(res.tempFilePaths, compressd);
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
this.imageList = this.imageList.concat(res
|
||||
.tempFilePaths) //非APP平台不支持自定义压缩,暂时没有处理,可通过uni-app上传组件的sizeType属性压缩
|
||||
// #endif
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
isFullImg: function() {
|
||||
return new Promise((res) => {
|
||||
uni.showModal({
|
||||
content: "已经有9张图片了,是否清空现有图片?",
|
||||
success: (e) => {
|
||||
if (e.confirm) {
|
||||
this.imageList = [];
|
||||
res(true);
|
||||
} else {
|
||||
res(false)
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
res(false)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
previewImage: function(e) {
|
||||
var current = e.target.dataset.src
|
||||
uni.previewImage({
|
||||
current: current,
|
||||
urls: this.imageList
|
||||
})
|
||||
},
|
||||
touchStart: function(e) {
|
||||
this.startX = e.mp.changedTouches[0].pageX;
|
||||
},
|
||||
|
||||
touchEnd: function(e) {
|
||||
this.endX = e.mp.changedTouches[0].pageX;
|
||||
if (this.endX - this.startX > 200) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.footer {
|
||||
margin-top: 80upx;
|
||||
}
|
||||
|
||||
.cell-pd {
|
||||
padding: 20upx 30upx;
|
||||
}
|
||||
|
||||
.uni-textarea {
|
||||
width: auto;
|
||||
padding: 20upx 25upx;
|
||||
line-height: 1.6;
|
||||
height: 150upx;
|
||||
}
|
||||
|
||||
.uni-list::before {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.uni-list:after {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.list-pd {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.close-view {
|
||||
text-align: center;
|
||||
line-height: 30upx;
|
||||
height: 35upx;
|
||||
width: 35upx;
|
||||
background: #ef5350;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
top: 1upx;
|
||||
right: 1upx;
|
||||
font-size: 35upx;
|
||||
border-radius: 8upx;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750upx;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
<template>
|
||||
<view class="invitation">
|
||||
<view class="invitation-refund">
|
||||
<view class="invitation-refund" v-if="!canSave">
|
||||
<view class="invitation-refund-btn" @click="onBack">
|
||||
<uni-icons type="back" color="white" size="24"></uni-icons>
|
||||
</view>
|
||||
@@ -16,7 +15,7 @@
|
||||
<view class="invitation-text-sub">邀请好友增加共力分增长</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="invitation-btn" @click="onShare">分享邀请</button>
|
||||
<button class="invitation-btn" @click="onShare" v-if="!canSave">分享邀请</button>
|
||||
</view>
|
||||
<!-- 分享 -->
|
||||
<uni-popup ref="popupShare" type="share" background-color="#fff">
|
||||
@@ -26,12 +25,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { invitationCode } from '@/apis/interfaces/user.js'
|
||||
import {
|
||||
invitationCode
|
||||
} from '@/apis/interfaces/user.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
invite: '',
|
||||
code : '',
|
||||
code: '',
|
||||
canSave: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -42,41 +44,41 @@
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
onBack(){
|
||||
onBack() {
|
||||
this.$Router.back()
|
||||
},
|
||||
// 复制邀请码
|
||||
copyInvite(){
|
||||
copyInvite() {
|
||||
uni.setClipboardData({
|
||||
data: this.invite,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '邀请码已复制',
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分享
|
||||
onShare(){
|
||||
onShare() {
|
||||
this.$refs.popupShare.open();
|
||||
},
|
||||
// 分享选项
|
||||
select(e){
|
||||
switch(e.item.name){
|
||||
select(e) {
|
||||
switch (e.item.name) {
|
||||
case 'wxchum':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene : 'WXSceneSession',
|
||||
type : 0,
|
||||
href : 'https://invite.gongli.vip?invitation_code=' + this.invite,
|
||||
title : '共力生态',
|
||||
summary : '共商 共建 共享 共赢 带您进入Web 3.0!推动全体成员共同富裕',
|
||||
scene: 'WXSceneSession',
|
||||
type: 0,
|
||||
href: 'https://invite.gongli.vip?invitation_code=' + this.invite,
|
||||
title: '共力生态',
|
||||
summary: '共商 共建 共享 共赢 带您进入Web 3.0!推动全体成员共同富裕',
|
||||
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -84,43 +86,125 @@
|
||||
case 'wxcircle':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene : 'WXSceneTimeline',
|
||||
type : 0,
|
||||
href : 'https://invite.gongli.vip?invitation_code=' + this.invite,
|
||||
summary : '共商 共建 共享 共赢 带您进入Web 3.0!推动全体成员共同富裕',
|
||||
scene: 'WXSceneTimeline',
|
||||
type: 0,
|
||||
href: 'https://invite.gongli.vip?invitation_code=' + this.invite,
|
||||
summary: '共商 共建 共享 共赢 带您进入Web 3.0!推动全体成员共同富裕',
|
||||
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'qq':
|
||||
uni.showToast({
|
||||
title: 'qq好友分享近期开放,敬请期待',
|
||||
icon : 'none'
|
||||
case 'download':
|
||||
this.canSave = true
|
||||
uni.showLoading({
|
||||
title: '保存中'
|
||||
})
|
||||
this.down()
|
||||
break;
|
||||
}
|
||||
},
|
||||
down() {
|
||||
setTimeout(() => {
|
||||
let pages = getCurrentPages();
|
||||
let page = pages[pages.length - 1];
|
||||
let ws = page.$getAppWebview();
|
||||
let bitmap = new plus.nativeObj.Bitmap('drawScreen');
|
||||
// 将webview内容绘制到Bitmap对象中
|
||||
ws.draw(bitmap, () => {
|
||||
// 保存图片到本地
|
||||
bitmap.save("_doc/drawScreen.jpg", {
|
||||
overwrite: true
|
||||
}, res => {
|
||||
console.log(res.target); // 图片地址
|
||||
|
||||
uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
|
||||
filePath: res.target, //图片文件路径
|
||||
success: () => {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '保存图片成功,赶紧去转发给好友吧~',
|
||||
showCancel: false,
|
||||
confirmColor: "#34CE98",
|
||||
confirmText: '知道了',
|
||||
success: () => {
|
||||
this.canSave = false;
|
||||
}
|
||||
})
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: function(e) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '保存图片失败,重新再试试~',
|
||||
showCancel: false,
|
||||
confirmColor: "#34CE98",
|
||||
confirmText: '知道了',
|
||||
success: () => {
|
||||
this.canSave = false;
|
||||
}
|
||||
})
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
|
||||
bitmap.clear(); // 清除Bitmap对象
|
||||
}, error => {
|
||||
console.log(JSON.stringify(error)); // 保存失败信息
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '保存图片失败,重新再试试~',
|
||||
showCancel: false,
|
||||
confirmColor: "#34CE98",
|
||||
confirmText: '知道了',
|
||||
success: () => {
|
||||
this.canSave = false;
|
||||
}
|
||||
})
|
||||
uni.hideLoading()
|
||||
bitmap.clear(); // 清除Bitmap对象
|
||||
});
|
||||
// bitmap.clear(); // 清除Bitmap对象
|
||||
}, error => {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '保存图片失败,重新再试试~',
|
||||
showCancel: false,
|
||||
confirmColor: "#34CE98",
|
||||
confirmText: '知道了',
|
||||
success: () => {
|
||||
this.canSave = false;
|
||||
}
|
||||
})
|
||||
uni.hideLoading()
|
||||
console.log(JSON.stringify(error)); // 绘制失败
|
||||
}, {
|
||||
check: true, // 设置为检测白屏
|
||||
});
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.invitation{
|
||||
.invitation {
|
||||
position: relative;
|
||||
background: #1c2472;
|
||||
min-height: 100vh;
|
||||
.invitation-refund{
|
||||
|
||||
.invitation-refund {
|
||||
@extend .ios-top;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: $margin*2;
|
||||
z-index: 9;
|
||||
.invitation-refund-btn{
|
||||
|
||||
.invitation-refund-btn {
|
||||
border-radius: 50%;
|
||||
line-height: 58rpx;
|
||||
width: 58rpx;
|
||||
@@ -130,7 +214,8 @@
|
||||
background: rgba(0, 0, 0, .5);
|
||||
}
|
||||
}
|
||||
.invitation-back{
|
||||
|
||||
.invitation-back {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -138,13 +223,15 @@
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.invitation-content{
|
||||
|
||||
.invitation-content {
|
||||
padding: $padding*2;
|
||||
position: absolute;
|
||||
bottom: 5vh;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
.invitation-lay{
|
||||
|
||||
.invitation-lay {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
@@ -154,30 +241,36 @@
|
||||
padding: $padding;
|
||||
margin-bottom: $margin;
|
||||
color: white;
|
||||
.invitation-code{
|
||||
|
||||
.invitation-code {
|
||||
width: 168rpx;
|
||||
height: 168rpx;
|
||||
background: white;
|
||||
}
|
||||
.invitation-text{
|
||||
|
||||
.invitation-text {
|
||||
width: calc(100% - 198rpx);
|
||||
.invitation-text-code{
|
||||
|
||||
.invitation-text-code {
|
||||
font-size: 26rpx;
|
||||
line-height: 50rpx;
|
||||
text{
|
||||
|
||||
text {
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
margin-right: 10rpx;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
.invitation-text-sub{
|
||||
|
||||
.invitation-text-sub {
|
||||
font-size: 26rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.invitation-btn{
|
||||
|
||||
.invitation-btn {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 45rpx;
|
||||
@@ -185,7 +278,8 @@
|
||||
font-weight: bold;
|
||||
background: #5a0399;
|
||||
color: white;
|
||||
&::after{
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
goods : [],
|
||||
has_more:true,
|
||||
page:1,
|
||||
ShopId:'',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -94,20 +95,19 @@
|
||||
onPullDownRefresh() {
|
||||
this.has_more = true;
|
||||
this.page = 1;
|
||||
this.goods = [];
|
||||
this.getGoods()
|
||||
},
|
||||
methods: {
|
||||
getGoods() {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
title:'请求中~',
|
||||
mask:true,
|
||||
})
|
||||
shopsGoods(this.ShopId, this.category_id,this.page).then(res => {
|
||||
if(this.page = 1){
|
||||
this.goods = [];
|
||||
}
|
||||
this.goods = this.goods.concat(res.data);
|
||||
this.has_more = res.page.has_more;
|
||||
uni.hideLoading()
|
||||
uni.hideLoading();
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -117,9 +117,14 @@
|
||||
},
|
||||
lower(){
|
||||
if(this.has_more){
|
||||
this.page = this.page + 1;
|
||||
this.has_more = true;
|
||||
this.getGoods()
|
||||
this.page = this.page + 1
|
||||
this.getGoods();
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'没有更多~',
|
||||
icon:"none",
|
||||
mask:true,
|
||||
})
|
||||
}
|
||||
},
|
||||
selectClassify(id) {
|
||||
|
||||
BIN
static/chat/194566519415950980.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
static/chat/223427836980650199.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
static/chat/274292070323481760.jpg
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
static/chat/286155930458879544.jpg
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
static/chat/29795045527088873.jpg
Normal file
|
After Width: | Height: | Size: 179 KiB |
BIN
static/chat/367274203196161533.jpg
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
static/chat/808967468752110033.jpg
Normal file
|
After Width: | Height: | Size: 228 KiB |
BIN
static/chat/fonts/HYQiHeiX1-45W.ttf
Normal file
BIN
static/chat/fonts/HYQiHeiX1-55W.ttf
Normal file
BIN
static/chat/fonts/fontawesome-webfont.eot
Normal file
BIN
static/chat/fonts/fontawesome-webfont.ttf
Normal file
BIN
static/chat/fonts/fontawesome-webfont.woff
Normal file
BIN
static/chat/fonts/fontawesome-webfont.woff2
Normal file
BIN
static/chat/fonts/taobao_global.ttf
Normal file
BIN
static/chat/index/60x60.png
Normal file
|
After Width: | Height: | Size: 774 B |
BIN
static/chat/index/camera.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
static/chat/index/comment.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/chat/index/find-album-reflash-icon.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/chat/index/islike.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
static/chat/index/like.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
static/chat/index/liked.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
static/chat/index/test/bear.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
static/chat/index/test/bgi.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
static/chat/index/test/bgi02.jpg
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
static/chat/index/test/header01.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
static/chat/index/test/header02.jpg
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
static/chat/index/test/header03.jpg
Normal file
|
After Width: | Height: | Size: 210 KiB |
BIN
static/chat/index/test/header04.jpg
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
static/chat/index/test/header05.jpg
Normal file
|
After Width: | Height: | Size: 834 KiB |
BIN
static/chat/index/test/header06.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
static/chat/index/test/pig-01.jpg
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
static/chat/index/test/pig-02.jpg
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
static/chat/index/test/pig-03.jpg
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
static/chat/index/test/pig-04.jpg
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
static/chat/index/test/pig-05.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
static/chat/index/test/pig-06.jpg
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
static/chat/index/test/pig-07.jpg
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
static/chat/index/test/pig-08.jpg
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
static/chat/index/test/pig-09.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
static/chat/index/test/test1.jpg
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
static/chat/index/test/test2.jpg
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
static/chat/logo.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
static/iconfont1.ttf
Normal file
@@ -11,7 +11,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-share-button-box">
|
||||
<button class="uni-share-button" @click="close">{{cancelText}}</button>
|
||||
<!-- <button class="uni-share-button" @click="close">{{cancelText}}</button> -->
|
||||
<button class="uni-share-button" @click="close">再想想</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -50,9 +51,9 @@
|
||||
name: 'wxcircle'
|
||||
},
|
||||
{
|
||||
text: 'QQ',
|
||||
text: '下载图片',
|
||||
icon: require('@/static/icon/share_icon_02.png'),
|
||||
name: 'qq'
|
||||
name: 'download'
|
||||
},
|
||||
// {
|
||||
// text: '新浪',
|
||||
|
||||
BIN
unpackage/dist/dev/app-plus/__uniapperror.png
vendored
|
Before Width: | Height: | Size: 5.7 KiB |
1
unpackage/dist/dev/app-plus/__uniappes6.js
vendored
8
unpackage/dist/dev/app-plus/__uniappquill.js
vendored
1
unpackage/dist/dev/app-plus/__uniappscan.js
vendored
BIN
unpackage/dist/dev/app-plus/__uniappsuccess.png
vendored
|
Before Width: | Height: | Size: 2.0 KiB |
25
unpackage/dist/dev/app-plus/__uniappview.html
vendored
@@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var __UniViewStartTime__ = Date.now();
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
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>
|
||||
<title>View</title>
|
||||
<link rel="stylesheet" href="view.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="__uniappes6.js"></script>
|
||||
<script src="view.umd.min.js"></script>
|
||||
<script src="app-view.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
154
unpackage/dist/dev/app-plus/app-config.js
vendored
@@ -1,154 +0,0 @@
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ function webpackJsonpCallback(data) {
|
||||
/******/ var chunkIds = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var executeModules = data[2];
|
||||
/******/
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0, resolves = [];
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ resolves.push(installedChunks[chunkId][0]);
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||||
/******/ modules[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
|
||||
/******/
|
||||
/******/ while(resolves.length) {
|
||||
/******/ resolves.shift()();
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // add entry modules from loaded chunk to deferred list
|
||||
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
|
||||
/******/
|
||||
/******/ // run deferred modules when all chunks ready
|
||||
/******/ return checkDeferredModules();
|
||||
/******/ };
|
||||
/******/ function checkDeferredModules() {
|
||||
/******/ var result;
|
||||
/******/ for(var i = 0; i < deferredModules.length; i++) {
|
||||
/******/ var deferredModule = deferredModules[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for(var j = 1; j < deferredModule.length; j++) {
|
||||
/******/ var depId = deferredModule[j];
|
||||
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferredModules.splice(i--, 1);
|
||||
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ return result;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // Promise = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "app-config": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ var deferredModules = [];
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "/";
|
||||
/******/
|
||||
/******/ var jsonpArray = this["webpackJsonp"] = this["webpackJsonp"] || [];
|
||||
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
||||
/******/ jsonpArray.push = webpackJsonpCallback;
|
||||
/******/ jsonpArray = jsonpArray.slice();
|
||||
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
|
||||
/******/ var parentJsonpFunction = oldJsonpFunction;
|
||||
/******/
|
||||
/******/
|
||||
/******/ // run deferred modules from other chunks
|
||||
/******/ checkDeferredModules();
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([]);
|
||||
36207
unpackage/dist/dev/app-plus/app-service.js
vendored
25545
unpackage/dist/dev/app-plus/app-view.js
vendored
1
unpackage/dist/dev/app-plus/manifest.json
vendored
|
Before Width: | Height: | Size: 581 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
BIN
unpackage/dist/dev/app-plus/static/icon/back.png
vendored
|
Before Width: | Height: | Size: 413 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 686 B |
BIN
unpackage/dist/dev/app-plus/static/icon/helper.png
vendored
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 866 B |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
BIN
unpackage/dist/dev/app-plus/static/icon/sign_btn.png
vendored
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
unpackage/dist/dev/app-plus/static/icon/vip.png
vendored
|
Before Width: | Height: | Size: 1.1 KiB |
51
unpackage/dist/dev/app-plus/static/iconfont.css
vendored
@@ -1,51 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2869797 */
|
||||
src: url('@/static/iconfont.ttf');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-jia:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-dui:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-gengduo2:before {
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.icon-gengduo:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-saoma:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-tuandui:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-sousuo:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-pinglun:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-shezhi:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
unpackage/dist/dev/app-plus/static/iconfont.ttf
vendored
BIN
unpackage/dist/dev/app-plus/static/img/code_back.png
vendored
|
Before Width: | Height: | Size: 361 KiB |
|
Before Width: | Height: | Size: 234 KiB |
BIN
unpackage/dist/dev/app-plus/static/img/team_00.png
vendored
|
Before Width: | Height: | Size: 78 KiB |