Commit a8fcc8d6 authored by 罗超's avatar 罗超

新增心愿

parent a66b596f
......@@ -9,7 +9,6 @@
<template>
<view class="richtext">
<jinEdit placeholder="开始输入..." @editOk="editOk" :uploadFileUrl="action" :html="Content"></jinEdit>
</view>
</template>
......@@ -48,7 +47,6 @@ export default {
if(option && option.Content){
this.Content = option.Content
}
},
methods: {
editOk(res){
......
This diff is collapsed.
......@@ -150,8 +150,6 @@
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
uni.setNavigationBarTitle({
......
<template>
<view class="container" :style="{
paddingBottom: showMoreTool ? '220rpx' : '120rpx'
}">
<editor
class="ql-container"
:placeholder="placeholder"
:show-img-size="true"
:show-img-toolbar="true"
:show-img-resize="true"
@ready="onEditorReady"
id="editor"
@statuschange="statuschange"
@focus="editFocus"
@blur="editBlur"
ref="editot"
></editor>
<!-- 操作工具 -->
<view class="tool-view" >
<view class="tool">
<jinIcon class="single" type="&#xe6f3;" font-size="44rpx" title="插入图片" @click="insertImage"></jinIcon>
<jinIcon class="single" type="&#xe6f9;" font-size="44rpx" title="修改文字样式" @click="showMore" :color="showMoreTool ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6eb;" font-size="44rpx" title="分割线" @click="insertDivider"></jinIcon>
<jinIcon class="single" type="&#xe6e8;" font-size="44rpx" title="撤销" @click="undo"></jinIcon>
<jinIcon class="single" type="&#xe705;" font-size="44rpx" title="重做" @click="redo"></jinIcon>
<jinIcon class="single" type="&#xeb8a;" font-size="44rpx" title="设置" @click="release"></jinIcon>
</view>
<!-- 文字相关操作 -->
<view class="font-more" :style="{ height: showMoreTool ? '100rpx' : 0 }">
<jinIcon class="single" type="&#xe6e7;" font-size="44rpx" title="加粗" @click="setBold" :color="showBold ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6fe;" font-size="44rpx" title="斜体" @click="setItalic" :color="showItalic ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6f8;" font-size="44rpx" title="分割线" @click="setIns" :color="showIns ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6e3;" font-size="44rpx" title="标题" @click="setHeader" :color="showHeader ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6f1;" font-size="44rpx" title="居中" @click="setCenter" :color="showCenter ? activeColor : '#666666'"></jinIcon>
<jinIcon class="single" type="&#xe6ed;" font-size="44rpx" title="居右" @click="setRight" :color="showRight ? activeColor : '#666666'"></jinIcon>
</view>
<view class="setting-layer-mask" v-if="showSettingLayer" @click="showSetting"></view>
<view class="setting-layer" v-if="showSettingLayer">
<view class="single" @click="release(true)">
<jinIcon class="icon" type="&#xe639;" ></jinIcon>
<view>公开发布</view>
</view>
<view class="single" @click="release(false)">
<jinIcon class="icon" type="&#xe655;" ></jinIcon>
<view>私密保存</view>
</view>
</view>
</view>
</view>
</template>
<script>
import jinIcon from './jin-icons.vue';
export default {
props: {
// 点击图片时显示图片大小控件
showImgSize: {
type: Boolean,
default: false
},
// 点击图片时显示工具栏控件
showImgToolbar: {
type: Boolean,
default: false
},
// 点击图片时显示修改尺寸控件
showImgResize: {
type: Boolean,
default: false
},
// 占位符
placeholder: {
type: String,
default: '开始输入...'
},
// 图片上传的地址
uploadFileUrl: {
type: String,
default: '#'
},
// 上传文件时的name
fileKeyName: {
type: String,
default: 'file'
},
// 上传图片时,http请求的header
header: {
type: Object
},
// 初始化html
html: {
type: String
},
},
computed:{
},
data() {
return {
showMoreTool: true,
showBold: false,
showItalic: false,
showIns: false,
showHeader: false,
showCenter: false,
showRight: false,
showSettingLayer: false,
activeColor: '#F56C6C'
};
},
components: {
jinIcon
},
created() {
},
methods: {
onEditorReady(e) {
this.html = decodeURIComponent(this.html)//解密
uni.createSelectorQuery()
.in(this)
.select('.ql-container')
.fields({
size: true,
context: true
},res => {
this.editorCtx = res.context;
this.editorCtx.setContents({
html: this.html
})
})
.exec();
},
undo() {
this.editorCtx.undo();
},
// 插入图片
insertImage() {
uni.chooseImage({
count: 9, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
success: async(res) => {
var tempFilePaths = res.tempFilePaths;
uni.showLoading({
title: '正在上传中...'
})
for (let temp of tempFilePaths) {
// 图片上传服务器
await uni.uploadFile({
url: this.uploadFileUrl,
filePath: temp,
name: this.fileKeyName,
header: this.header,
success: res => {
let data = JSON.parse(res.data)
// 上传完成后处理
this.editorCtx.insertImage({
src: data.data, // 此处需要将图片地址切换成服务器返回的真实图片地址
success: function(e) {
}
});
uni.hideLoading()
},
});
}
}
});
},
insertDivider() {
this.editorCtx.insertDivider();
},
redo() {
this.editorCtx.redo();
},
showMore() {
this.showMoreTool = !this.showMoreTool;
this.editorCtx.setContents()
},
setBold() {
this.showBold = !this.showBold;
this.editorCtx.format('bold');
},
setItalic() {
this.showItalic = !this.showItalic;
this.editorCtx.format('italic');
},
checkStatus(name, detail, obj) {
if (detail.hasOwnProperty(name)) {
this[obj] = true;
} else {
this[obj] = false;
}
},
statuschange(e) {
var detail = e.detail;
this.checkStatus('bold', detail, 'showBold');
this.checkStatus('italic', detail, 'showItalic');
this.checkStatus('ins', detail, 'showIns');
this.checkStatus('header', detail, 'showHeader');
if (detail.hasOwnProperty('align')) {
if (detail.align == 'center') {
this.showCenter = true;
this.showRight = false;
} else if (detail.align == 'right') {
this.showCenter = false;
this.showRight = true;
} else {
this.showCenter = false;
this.showRight = false;
}
} else {
this.showCenter = false;
this.showRight = false;
}
},
setIns() {
this.showIns = !this.showIns;
this.editorCtx.format('ins');
},
setHeader() {
this.showHeader = !this.showHeader;
this.editorCtx.format('header', this.showHeader ? 'H2' : false);
},
setCenter() {
this.showCenter = !this.showCenter;
this.editorCtx.format('align', this.showCenter ? 'center' : false);
},
setRight() {
this.showRight = !this.showRight;
this.editorCtx.format('align', this.showRight ? 'right' : false);
},
showSetting() {
this.showSettingLayer = !this.showSettingLayer;
},
async editFocus() {
},
editBlur() {
},
release(isPublic) {
this.showSettingLayer = false;
this.editorCtx.getContents({
success: res => {
Object.assign(res, {
isPublic: isPublic
})
this.$emit('editOk', res);
}
})
},
}
};
</script>
<style scoped>
.container {
padding: 30rpx 0;
box-sizing: border-box;
padding-bottom: 120rpx;
}
.ql-container {
line-height: 160%;
font-size: 34rpx;
width: calc(100% - 60rpx);
height: auto;
margin: 0 auto;
}
.tool-view{
width: 100vw;
position: fixed;
bottom: 0;
left: 0;
}
.tool {
height: 100rpx;
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
background: #eee;
}
.font-more {
position: absolute;
left: 0;
bottom: 100rpx;
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
background: rgb(235, 235, 235);
overflow: hidden;
transition: all 0.15s;
}
.setting-layer {
position: absolute;
bottom: 100rpx;
background: #fff;
width: 250rpx;
right: 20rpx;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
border-radius: 8rpx;
}
.setting-layer .single {
height: 80rpx;
font-size: 32rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
line-height: 80rpx;
flex-direction: row;
color: #666;
}
.setting-layer .single .icon {
margin-right: 20rpx;
}
.setting-layer-mask{
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background: transparent;
}
</style>
<template>
<view class="content">
<view class="icon" :style="{color: color, fontSize: fontSize}" v-html="type" @click="toclick"></view>
</view>
</template>
<script>
export default {
props: {
type: {
type: String,
default: '&#xe644;'
},
color: {
type: String,
default: '#666666'
},
fontSize: {
type: String,
default: '34rpx'
}
},
methods: {
toclick() {
this.$emit('click');
}
}
}
</script>
<style scoped>
.content{
display: flex;
align-items: center;
justify-content: center;
}
@font-face {
font-family: 'jin';
/** 阿里巴巴矢量图标库的字体库地址,可以替换自己的字体库地址 **/
src: url('https://at.alicdn.com/t/font_1491431_6m7ltjo8wi.ttf') format('truetype');
}
.icon {
font-family: jin !important;
font-size: 34rpx;
}
</style>
<template>
<view class="detail">
<scroll-view scroll-y="true" style="height: 100vh;">
<view class="top">
<view class="submit-date">
提交日期:2021.07.02
</view>
<view class="modify-btn">
修改
</view>
</view>
<view class="detail-con">
<view class="title">
兰蔻小黑瓶肌底液最强一代
</view>
<view class="con1">
<text class="">
对标载体:万达广场
</text>
<text class="">
发展区域:锦江区
</text>
</view>
<view class="title2">
清单详情
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default{
data(){
return{
}
},
created() {
uni.setNavigationBarTitle({
title: "心愿清单详情"
})
},
methods:{
}
}
</script>
<style lang="scss" scoped>
.detail{
font-family: PingFang SC;
.top{
height: 240rpx;
padding-top: 50rpx;
.submit-date{
width: 100%;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #B3B3BA;
}
.modify-btn{
width: 300rpx;
height: 78rpx;
background-color: #1F1F1F;
border: 1rpx solid #1F1F1F;
border-radius: 20rpx;
margin: 30rpx auto 0;
font-size: 30rpx;
text-align: center;
line-height: 75rpx;
font-weight: bold;
color: #FFFFFF;
}
}
.detail-con{
width: 690rpx;
margin: 0 auto;
background-color: #FFFFFF;
box-shadow: 0px 10rpx 50rpx 0px rgba(218, 220, 230, 0.85);
border-radius: 20rpx;
padding: 55rpx 55rpx 75rpx 55rpx;
.title{
font-size: 38rpx;
font-weight: 800;
color: #1F1F1F;
text-align: center;
margin-bottom: 40rpx;
}
.con1{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
font-weight: 500;
color: #80808A;
margin-bottom: 60rpx;
}
.title2{
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #0B0B0B;
margin-bottom: 50rpx;
}
}
}
</style>
<template>
<view>
<u-empty v-if="dataList.length == 0" text="暂无数据" mode="list" class="noBox"></u-empty>
<view class="list-box" v-if="dataList.length > 0">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
style="height: 100%;">
<view v-for="(item,index) in dataList" :key="index" class="wish-item">
<view class="name">
{{item.name}}
</view>
<view class="flex">
<view class="addr">
{{item.addr}}
</view>
<view class="addr">
{{item.location}}
</view>
</view>
<view class="con" @click="goDetail">
{{item.con}}
</view>
<view class="flex between-center">
<view class="date">
{{item.date}}
</view>
<view class="">
编辑
</view>
</view>
</view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
bg-color="#F6F6F6" />
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #f6f6f6; margin-top: 10rpx;">加载中...</Text>
</view>
</view>
</template>
<script>
import tabbars from '@/components/tabbar/index';
export default {
components:{
tabbars
},
data() {
return {
mainColor: '',
active: 0,
searchKey:"",
typeList: [],
dataList:[
{
name:"兰蔻小黑瓶肌底液最强一代",
addr:"武侯区",
location:"万达广场",
con:"这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情",
date:"2021-07-02",
},
{
name:"兰蔻小黑瓶肌底液最强一代",
addr:"武侯区",
location:"万达广场",
con:"这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情",
date:"2021-07-02",
},
{
name:"兰蔻小黑瓶肌底液最强一代",
addr:"武侯区",
location:"万达广场",
con:"这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情",
date:"2021-07-02",
},
{
name:"兰蔻小黑瓶肌底液最强一代",
addr:"武侯区",
location:"万达广场",
con:"这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情",
date:"2021-07-02",
},
{
name:"兰蔻小黑瓶肌底液最强一代",
addr:"武侯区",
location:"万达广场",
con:"这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情介绍,这里显示详情",
date:"2021-07-02",
},
],
msg:{
pageIndex:1,
pageSize:10,
MetroName:"",
CarrierName:"",
MetroNum:"",
Developers:"",
StartOpenTime:"",
EndOpenTime:"",
ProjectType:0,
OrderBy:0
},
loading: false,
pageCount:0,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
contentHeight:0
};
},
onShareTimeline() {//朋友圈
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
0;
if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
}
let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").SmallShopId :
0;
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserSmallShopId :
0;
}
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
return {
title: '载体列表',
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up,
imageUrl: "",
};
},
onShareAppMessage(res) {//朋友
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
0;
if (uid == 0) {
uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
}
let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").SmallShopId :
0;
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserSmallShopId :
0;
}
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
return {
title: '载体列表',
path: "/pages/kotra/carrier/list?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up,
imageUrl: "",
};
},
onLoad(options) {
if(options && options.id){
this.msg.ProjectType = options.id
}
let c = this.$uiConfig.is_bang ? 78 : 50;
this.contentHeight = this.$utils.calcContentHeight(c)+40;
// this.getTypeList()
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
uni.setNavigationBarTitle({
title: '心愿清单列表',
});
},
methods: {
// 获取载体列表
getTypeList(){
let parms = {
url: "/api/AppletTrade/GetProjectTypeEnumList",
}
this.request2(parms, (res) => {
if (res.resultCode == 1) {
// this.pageCount = res.data.pageCount
this.typeList.push({
Id:0,
Name:"全部"
})
this.typeList = this.typeList.concat(res.data)
if(this.msg.ProjectType ==0){
}else{//指定跳入分类
this.typeList.map((x,i)=>{
if(x.Id== this.msg.ProjectType){
this.active = i;
}
})
}
}
})
this.getCarrierPageList()
},
// 获取载体分页列表
getCarrierPageList(){
let parms = {
url: "/api/AppletTrade/GetCarrierPageList",
data:this.msg
}
this.request2(parms, (res) => {
this.loading = false;
if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData);
this.pageCount = res.data.pageCount
if (this.pageCount == 1) {
this.status = "nomore";
}
}
})
},
changeHandler(i) {
this.active = i;
this.msg.ProjectType = this.typeList[i].Id;
this.msg.pageIndex = 1;
this.dataList= [];
this.getCarrierPageList()
},
openGood(id,type) {
uni.navigateTo({
url: '/pages/kotra/carrier/detail?id=' + id+"&&type="+type,
});
},
searchHandler(val){
this.msg.CarrierName=val
this.msg.pageIndex = 1;
this.dataList= [];
this.getCarrierPageList()
},
//触底事件
lower(e) {
if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++;
this.status = "loading";
// this.getCarrierPageList();
} else {
this.status = "nomore";
}
},
goDetail(){
uni.navigateTo({
url: '/pages/kotra/wish/richText'
})
}
}
};
</script>
<style lang="scss" scoped>
.flex{
display: flex;
}
.between-center{
justify-content: space-between;
align-items: center;
}
.list-box{
height: 100vh;
margin: 0rpx;
padding-bottom: 90rpx;
box-sizing: border-box;
font-family: PingFang SC;
}
.wish-item{
width: 690rpx;
height: 297rpx;
margin: 0 auto 34rpx;
padding: 40rpx 30rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(218, 220, 230, 0.85);
border-radius: 30rpx;
.name{
font-size: 28rpx;
font-weight: 800;
color: #111111;
margin-bottom: 20rpx;
}
.addr{
font-size: 24rpx;
font-weight: 500;
color: #999999;
margin-bottom: 20rpx;
}
.con{
font-size: 24rpx;
color: #999999;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 20rpx;
}
.date{
font-size: 22rpx;
color: #BCBCBC;
}
}
</style>
<template>
</template>
<script>
</script>
<style>
</style>
<style>
.richtext {
width: 100%;
height: 100vh;
background-color: #FFF;
}
</style>
<template>
<view class="richtext">
<jinEdit placeholder="开始输入..." @editOk="editOk" :uploadFileUrl="action" :html="Content"></jinEdit>
</view>
</template>
<script>
import jinEdit from '../components/jin-edit.vue';
export default {
components: {
jinEdit
},
data() {
return {
pageTitle: "详情描述",
mainColor: "",
action: this.host2 + "/api/File/UploadTencent",
Content:'',
showedit:false,
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
let MallBaseId = uni.getStorageSync("mall_UserInfo").MallBaseId ? uni.getStorageSync("mall_UserInfo").MallBaseId : 1;
this.action = this.host2 + '/api/File/UploadTencent?MallBaseId=' + MallBaseId
},
onLoad: function (option) {
if(option && option.Content){
this.Content = option.Content
}
},
methods: {
editOk(res){
let html = res.html
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
console.log(53,beforePage)
setTimeout(()=>{
uni.navigateBack({
success: function() {
beforePage.$vm.Children(html); // 执行前一个页面的方法
}
});
},100)
}
},
};
</script>
......@@ -395,7 +395,7 @@
<text style="margin-right: 10rpx;" v-if="item2.ActivityDuration">{{item2.ActivityDuration}}分钟</text>
<text style="margin-right: 10rpx;">{{item2.TripTitle}}</text>
</view>
<view class="con">
<view class="con" v-if="item2.TripContent">
<rich-text :nodes="item2.TripContent"></rich-text>
</view>
<view class="active-img-box" v-if="item2.TripPicList.length>0">
......
......@@ -137,7 +137,7 @@
<text>密码</text>
</view>
<view class="box-item-b" >
<input type="number" password v-model="addMsg.password" placeholder="请输入你的密码">
<input password v-model="addMsg.password" placeholder="请输入你的密码">
<!-- <view class="yanbtn" @click="getCode">{{show == true?btntext:daojis}}</view> -->
</view>
</view>
......@@ -292,8 +292,8 @@
data: {}
},
res => {
console.log(295,res)
if (res.resultCode == 1) {
console.log(res)
if(res.data.Id>0){
this.sellInfo=res.data
this.isBindSell=1
......@@ -342,7 +342,6 @@
data: this.addMsg
},
res => {
console.log(res)
uni.hideLoading()
if (res.resultCode == 1) {
uni.showToast({
......
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