Commit 3e023147 authored by 杨硕's avatar 杨硕

修改个人信息,项目分包

parent 74bbb19c
<template>
</template>
<script>
</script>
<style>
</style>
\ No newline at end of file
......@@ -9,6 +9,15 @@ export function activitylist(query) {
})
}
// 已发布活动列表
export function publishedactivitylist(query) {
return request({
url: '/system/activity/selectActivityInfoByPagination',
method: 'get',
params: query
})
}
// 查看详情
export const activitydetail = (id) => {
return request({
......
import request from '@/utils/request'
export const updateMembeerInfo = (data) => {
return request({
url: '/sysUserManage/updateMember',
method: 'put',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
\ No newline at end of file
import request from '@/utils/request'
// 我的优惠券
export function myCoupon(query) {
return request({
url: '/system/coupon/selectMyCouponByPagination',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ import request from '@/utils/request'
// 我的积分
export function myIntegral(query) {
return request({
url: '/system/order/selectOrderUserByPagination',
url: '/sysUserManage/selectUserIntegralByPagination',
method: 'get',
params: query
})
......
......@@ -50,7 +50,7 @@
</view>
<!-- 悬浮按钮 -->
<view class="suspension-view" v-if="tabvalue === '商家简介'">
<image src="../static/images/business/shangjia_icon_daohang@2x.png" class="suspension">
<image :src="baseURL+'/static/business/shangjia_icon_daohang@2x.png'" class="suspension">
</view>
</view>
</view>
......@@ -65,11 +65,11 @@
<view>
<view class="popbod-title">{{businessActivityDetail.name}}</view>
<view class="pop-time">
<image class="poptime-img" src="../static/images/activity/huodong_icon_riqi@2x.png">
<image class="poptime-img" :src="baseURL+'/static/activity/huodong_icon_riqi@2x.png'">
<view class="poptime-text">{{businessActivityDetail.activityBeginDate}}</view>
</view>
<view class="pop-price">
<image class="popprice-img" src="../static/images/activity/huodong_icon_danjia@2x.png">
<image class="popprice-img" :src="baseURL+'/static/activity/huodong_icon_danjia@2x.png'">
<view class="popprice-text">单价:<text>{{businessActivityDetail.price}}次/人</text></view>
</view>
......@@ -78,9 +78,9 @@
<view class="buy-num">
<view class="buynum-title">购买数量</view>
<view class="buynum-math">
<image class="reduce" src="../static/images/activity/huodong_icon_jian@2x.png" @click="reduce">
<image class="reduce" :src="baseURL+'/static/activity/huodong_icon_jian@2x.png'" @click="reduce">
<view class="num">{{buynum}}</view>
<image class="add" src="../static/images/activity/huodong_icon_jia@2x.png" @click="add">
<image class="add" :src="baseURL+'/static/activity/huodong_icon_jia@2x.png'" @click="add">
</view>
</view>
<view class="usecoupon">
......@@ -250,7 +250,7 @@
} else {
uni.showToast({
title: res.message,
icon: 'error'
icon: 'none'
})
}
})
......@@ -363,7 +363,7 @@
if (!res.data.nonceStr) {
uni.showToast({
title: '下单失败,请稍后重试',
icon: 'error'
icon: 'none'
})
} else {
// 调取微信支付窗口
......@@ -387,7 +387,7 @@
fail(e) {
uni.showToast({
title: '支付已取消',
icon: null
icon: 'none'
})
// const activityId = this.activityId
const orderStatus = {
......@@ -404,7 +404,7 @@
} else {
uni.showToast({
title: '下单失败',
icon: 'error'
icon: 'none'
})
}
})
......@@ -503,7 +503,7 @@
margin-top: 50rpx;
width: 100%;
height: 158rpx;
background-image: url('../static/images/business/shangjia_pic_youhuiquan@2x.png');
background-image: url('../static/business/shangjia_pic_youhuiquan@2x.png');
background-size: 100% 100%;
display: flex;
......
<template>
<view class="container">
<view class="page-body uni-content-info">
<view class='cropper-content'>
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-view-box">
<view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view>
</view>
</view>
</view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view>
</view>
</template>
<script>
import config from '@/config'
import store from "@/store"
import { uploadAvatar } from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // 手按下的x位置
PAGE_Y, // 手按下y的位置
PR = sysInfo.pixelRatio, // dpi
T_PAGE_X, // 手移动的时候x的位置
T_PAGE_Y, // 手移动的时候Y的位置
CUT_L, // 初始化拖拽元素的left值
CUT_T, // 初始化拖拽元素的top值
CUT_R, // 初始化拖拽元素的
CUT_B, // 初始化拖拽元素的
CUT_W, // 初始化拖拽元素的宽度
CUT_H, // 初始化拖拽元素的高度
IMG_RATIO, // 图片比例
IMG_REAL_W, // 图片实际的宽度
IMG_REAL_H, // 图片实际的高度
DRAFG_MOVE_RATIO = 1, //移动时候的比例,
INIT_DRAG_POSITION = 100, // 初始化屏幕宽度和裁剪区域的宽度之差,用于设置初始化裁剪的宽度
DRAW_IMAGE_W = sysInfo.screenWidth // 设置生成的图片宽度
export default {
/**
* 页面的初始数据
*/
data() {
return {
imageSrc: store.getters.avatar,
isShowImg: false,
// 初始化的宽高
cropperInitW: SCREEN_WIDTH,
cropperInitH: SCREEN_WIDTH,
// 动态的宽高
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH,
// 动态的left top值
cropperL: 0,
cropperT: 0,
transL: 0,
transT: 0,
// 图片缩放值
scaleP: 0,
imageW: 0,
imageH: 0,
// 裁剪框 宽高
cutL: 0,
cutT: 0,
cutB: SCREEN_WIDTH,
cutR: '100%',
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: DRAFG_MOVE_RATIO
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.loadImage()
},
methods: {
setData: function (obj) {
let that = this
Object.keys(obj).forEach(function (key) {
that.$set(that.$data, key, obj[key])
})
},
getImage: function () {
var _this = this
uni.chooseImage({
success: function (res) {
_this.setData({
imageSrc: res.tempFilePaths[0],
})
_this.loadImage()
},
})
},
loadImage: function () {
var _this = this
uni.getImageInfo({
src: _this.imageSrc,
success: function success(res) {
IMG_RATIO = 1 / 1
if (IMG_RATIO >= 1) {
IMG_REAL_W = SCREEN_WIDTH
IMG_REAL_H = SCREEN_WIDTH / IMG_RATIO
} else {
IMG_REAL_W = SCREEN_WIDTH * IMG_RATIO
IMG_REAL_H = SCREEN_WIDTH
}
let minRange = IMG_REAL_W > IMG_REAL_H ? IMG_REAL_W : IMG_REAL_H
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
// 根据图片的宽高显示不同的效果 保证图片可以正常显示
if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2)
let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL
_this.setData({
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH / IMG_RATIO,
// 初始化left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
// 图片缩放值
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
} else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2)
let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT
_this.setData({
cropperW: SCREEN_WIDTH * IMG_RATIO,
cropperH: SCREEN_WIDTH,
// 初始化left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
// 图片缩放值
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
}
_this.setData({
isShowImg: true
})
uni.hideLoading()
}
})
},
// 拖动时候触发的touchStart事件
contentStartMove(e) {
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
// 拖动时候触发的touchMove事件
contentMoveing(e) {
var _this = this
var dragLengthX = (PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
// 左移
if (dragLengthX > 0) {
if (this.cutL - dragLengthX < 0) dragLengthX = this.cutL
} else {
if (this.cutR + dragLengthX < 0) dragLengthX = -this.cutR
}
if (dragLengthY > 0) {
if (this.cutT - dragLengthY < 0) dragLengthY = this.cutT
} else {
if (this.cutB + dragLengthY < 0) dragLengthY = -this.cutB
}
this.setData({
cutL: this.cutL - dragLengthX,
cutT: this.cutT - dragLengthY,
cutR: this.cutR + dragLengthX,
cutB: this.cutB + dragLengthY
})
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
contentTouchEnd() {
},
// 获取图片
getImageInfo() {
var _this = this
uni.showLoading({
title: '图片生成中...',
})
// 将图片写入画布
const ctx = uni.createCanvasContext('myCanvas')
ctx.drawImage(_this.imageSrc, 0, 0, IMG_REAL_W, IMG_REAL_H)
ctx.draw(true, () => {
// 获取画布要裁剪的位置和宽度 均为百分比 * 画布中图片的宽度 保证了在微信小程序中裁剪的图片模糊 位置不对的问题 canvasT = (_this.cutT / _this.cropperH) * (_this.imageH / pixelRatio)
var canvasW = ((_this.cropperW - _this.cutL - _this.cutR) / _this.cropperW) * IMG_REAL_W
var canvasH = ((_this.cropperH - _this.cutT - _this.cutB) / _this.cropperH) * IMG_REAL_H
var canvasL = (_this.cutL / _this.cropperW) * IMG_REAL_W
var canvasT = (_this.cutT / _this.cropperH) * IMG_REAL_H
uni.canvasToTempFilePath({
x: canvasL,
y: canvasT,
width: canvasW,
height: canvasH,
destWidth: canvasW,
destHeight: canvasH,
quality: 0.5,
canvasId: 'myCanvas',
success: function (res) {
uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath}
uploadAvatar(data).then(response => {
store.commit('SET_AVATAR', baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' })
uni.navigateBack()
})
}
})
})
},
// 设置大小的时候触发的touchStart事件
dragStart(e) {
T_PAGE_X = e.touches[0].pageX
T_PAGE_Y = e.touches[0].pageY
CUT_L = this.cutL
CUT_R = this.cutR
CUT_B = this.cutB
CUT_T = this.cutT
},
// 设置大小的时候触发的touchMove事件
dragMove(e) {
var _this = this
var dragType = e.target.dataset.drag
switch (dragType) {
case 'right':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_R + dragLength < 0) dragLength = -CUT_R
this.setData({
cutR: CUT_R + dragLength
})
break
case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR)
this.setData({
cutL: CUT_L - dragLength
})
break
case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB)
this.setData({
cutT: CUT_T - dragLength
})
break
case 'bottom':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLength < 0) dragLength = -CUT_B
this.setData({
cutB: CUT_B + dragLength
})
break
case 'rightBottom':
var dragLengthX = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLengthY < 0) dragLengthY = -CUT_B
if (CUT_R + dragLengthX < 0) dragLengthX = -CUT_R
let cutB = CUT_B + dragLengthY
let cutR = CUT_R + dragLengthX
this.setData({
cutB: cutB,
cutR: cutR
})
break
default:
break
}
}
}
}
</script>
<style>
/* pages/uni-cropper/index.wxss */
.uni-content-info {
/* position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
align-items: center;
flex-direction: column; */
}
.cropper-config {
padding: 20rpx 40rpx;
}
.cropper-content {
min-height: 750rpx;
width: 100%;
}
.uni-corpper {
position: relative;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
box-sizing: border-box;
}
.uni-corpper-content {
position: relative;
}
.uni-corpper-content image {
display: block;
width: 100%;
min-width: 0 !important;
max-width: none !important;
height: 100%;
min-height: 0 !important;
max-height: none !important;
image-orientation: 0deg !important;
margin: 0 auto;
}
/* 移动图片效果 */
.uni-cropper-drag-box {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: move;
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
/* 内部的信息 */
.uni-corpper-crop-box {
position: absolute;
background: rgba(255, 255, 255, 0.3);
z-index: 2;
}
.uni-corpper-crop-box .uni-cropper-view-box {
position: relative;
display: block;
width: 100%;
height: 100%;
overflow: visible;
outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75)
}
/* 横向虚线 */
.uni-cropper-dashed-h {
position: absolute;
top: 33.33333333%;
left: 0;
width: 100%;
height: 33.33333333%;
border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 纵向虚线 */
.uni-cropper-dashed-v {
position: absolute;
left: 33.33333333%;
top: 0;
width: 33.33333333%;
height: 100%;
border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
top: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: n-resize;
}
.uni-cropper-line-t::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-r {
position: absolute;
display: block;
background-color: #69f;
top: 0;
right: 0rpx;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: e-resize;
}
.uni-cropper-line-r::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-line-b {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
bottom: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: s-resize;
}
.uni-cropper-line-b::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-l {
position: absolute;
display: block;
background-color: #69f;
top: 0;
left: 0;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: w-resize;
}
.uni-cropper-line-l::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-point {
width: 5rpx;
height: 5rpx;
background-color: #69f;
opacity: .75;
position: absolute;
z-index: 3;
}
.point-t {
top: -3rpx;
left: 50%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-tr {
top: -3rpx;
left: 100%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-r {
top: 50%;
left: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-rb {
left: 100%;
top: 100%;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
cursor: n-resize;
width: 36rpx;
height: 36rpx;
background-color: #69f;
position: absolute;
z-index: 1112;
opacity: 1;
}
.point-b {
left: 50%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-bl {
left: 0%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-l {
left: 0%;
top: 50%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-lt {
left: 0%;
top: 0%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
/* 裁剪框预览内容 */
.uni-cropper-viewer {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.uni-cropper-viewer image {
position: absolute;
z-index: 2;
}
</style>
<template>
<view class="myCoupon-module">
<view class="use">
<view class="price"><text>20</text></view>
<view v-for="item in couponList">
<view class="use" v-if="item.status === 0">
<view class="price" v-if="item.type===0"><text style="margin-top: 20rpx;"></text><text style="font-size: 64rpx;">{{item.amount}}</text></view>
<view class="price" v-else-if="item.type===1"><text style="font-size: 64rpx;">{{item.discount}}</text><text style="margin-top: 20rpx;"></text></view>
<view class="coupon-right">
<view class="message">
<view>
<view class="moduleprice">通用券,满300-20</view>
<view class="time">2023-05-31前可用</view>
<view class="moduleprice">{{item.name}}</view>
<view class="time">{{dateFormat(item.useEndTime)}}前可用</view>
</view>
</view>
<view class="usebutton">去使用</view>
<view class="usebutton" @click="gotoPage">去使用</view>
</view>
</view>
<view class="use">
<view class="price"><text>20</text></view>
<view class="coupon-right">
<view class="message">
<view>
<view class="moduleprice">全场可满199-10</view>
<view class="time">2023-05-31前可用</view>
</view>
</view>
<view class="usebutton">去使用</view>
</view>
</view>
<view class="all-write-off">
<view class="all-write-off" v-if="item.status === 1">
<view class="write-off">
<view class="price"><text>20</text></view>
<view class="price" v-if="item.type===0"><text style="margin-top: 20rpx;"></text><text style="font-size: 64rpx;">{{item.amount}}</text></view>
<view class="price" v-else-if="item.type===1"><text style="font-size: 64rpx;">{{item.discount}}</text><text style="margin-top: 20rpx;"></text></view>
<view class="message">
<view>
<view class="moduleprice">全场可满199-10</view>
<view class="time">2023-05-31前可用</view>
<view class="moduleprice">{{item.name}}</view>
<view class="time">{{dateFormat(item.useEndTime)}}前可用</view>
</view>
</view>
<view class="usebutton">
<image class="write-off-image" src="../../../static/images/my/wode_icon_yixiaohe@2x.png">
<image class="write-off-image" :src="baseURL+'/static/my/wode_icon_yixiaohe@2x.png'">
</view>
</view>
<view class="write-off-detail">
<view class="write-off-time">
核销时间:2023-05-01 14:00:58
核销时间:{{item.cancelTime}}
</view>
<view class="write-off-bus">
核销商家:瑞幸咖啡
核销商家:{{item.cancelName}}
</view>
</view>
</view>
<view class="expire">
<view class="price"><text>20</text></view>
<view class="expire" v-if="item.status === 2">
<view class="price" v-if="item.type===0"><text style="margin-top: 20rpx;"></text><text>{{item.amount}}</text></view>
<view class="price" v-else-if="item.type===1"><text style="font-size: 64rpx;">{{item.discount}}</text><text style="margin-top: 20rpx;"></text></view>
<view class="message">
<view>
<view class="moduleprice">通用券,满300-20</view>
<view class="time">2023-05-31前可用</view>
<view class="moduleprice">{{item.name}}</view>
<view class="time">{{dateFormat(item.useEndTime)}}前可用</view>
</view>
</view>
<view class="usebutton">
<image class="write-off-image" src="../../../static/images/my/wode_icon_yiguoqi@2x.png">
<image class="write-off-image" :src="baseURL+'/static/my/wode_icon_yiguoqi@2x.png'">
</view>
</view>
</view>
</view>
</template>
<script>
import {myCoupon} from "../../api/my/myCoupon/index.js"
export default {
name: "index"
name: "index",
data(){
return{
baseURL: 'http://192.144.239.97:20043/file/',
couponList:[],
pageNum: 1,
pageSize:10,
total: 0
}
},
onLoad() {
this.getmyCoupon()
},
methods:{
// 查询我的优惠券
getmyCoupon(){
const query={
pageNum: this.pageNum,
pageSize:this.pageSize
}
myCoupon(query).then(res=>{
console.log("我的优惠券",res)
this.couponList=res.rows
this.total=res.total
})
},
gotoPage(){
// uni.switchTab({
// url:'/pages/activity/index'
// })
},
// 日期格式化
dateFormat(time) {
let date = new Date(time);
let year = date.getFullYear();
// 在日期格式中,月份是从0开始的,因此要加0,使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
// 拼接
// return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
return year + "-" + month + "-" + day;
}
}
}
</script>
......@@ -82,7 +121,7 @@
width: 100%;
border-radius: 12px;
height: 222rpx;
background: url('../../static/images/my/wode_pic_youhuiquan@2x.png');
background: url('../../static/my/wode_pic_youhuiquan@2x.png');
background-size: 100% 100%;
display: flex;
margin: 42rpx 0;
......@@ -97,9 +136,9 @@
font-size: 32rpx;
color: #FFFFFF;
text {
font-size: 64rpx;
}
// text {
// font-size: 64rpx;
// }
}
.message {
......@@ -149,7 +188,7 @@
.write-off {
border-radius: 12px;
height: 222rpx;
background: url('../../static/images/my/wode_pic_youhuiquan@2x(1).png') no-repeat;
background: url('../../static/my/wode_pic_youhuiquan@2x(1).png') no-repeat;
background-size: 100% 100%;
display: flex;
// margin: 42rpx 0;
......@@ -167,9 +206,9 @@
font-size: 32rpx;
color: #FFFFFF;
text {
font-size: 64rpx;
}
// text {
// font-size: 64rpx;
// }
}
.message {
......@@ -230,7 +269,7 @@
.expire {
border-radius: 12px;
height: 222rpx;
background: url('../../static/images/my/wode_pic_youhuiquan@2x(1).png') no-repeat;
background: url('../../static/my/wode_pic_youhuiquan@2x(1).png') no-repeat;
background-size: 100% 100%;
display: flex;
margin: 42rpx 0;
......@@ -246,9 +285,9 @@
font-size: 32rpx;
color: #FFFFFF;
text {
font-size: 64rpx;
}
// text {
// font-size: 64rpx;
// }
}
.message {
......
......@@ -17,7 +17,7 @@
<view class="noread" v-if="tabshow==0">
<view class="noread-card" v-for="index in 6">
<view class="card-title">
<image class="title-image" src="../../static/images/message/xiaoxi_icon_weidu@2x.png">
<image class="title-image" :src="baseURL+'/static/message/xiaoxi_icon_weidu@2x.png'">
<view class="title-content">这是消息内容标题这是消息内容消息这是消息内容消息</view>
</view>
<view class="message-time">
......@@ -35,7 +35,7 @@
<view class="noread" v-if="tabshow==1">
<view class="noread-card" v-for="index in 6">
<view class="card-title">
<image class="title-image" src="../../static/images/message/xiaoxi_icon_yidu@2x.png">
<image class="title-image" :src="baseURL+'/static/message/xiaoxi_icon_yidu@2x.png'">
<view class="title-content">这是消息内容标题这是消息内容消息这是消息内容消息</view>
</view>
<view class="message-time">
......@@ -62,7 +62,8 @@ export default {
}, {
name: '已读',
}],
tabshow:0
tabshow:0,
baseURL: 'http://192.144.239.97:20043/file/',
}
},
methods: {
......
<template>
<view class="myintegral">
<view class="myintegral-top">
<view class="integral-num">1000</view>
<view class="integral-num">{{allintegral}}</view>
<view class="integral-rule">
<view class="integral-rule-title">积分规则</view>
<u-icon name="arrow-right" color="#666666" size="24"></u-icon>
</view>
</view>
<view>
<view class="myintegral-body" v-for="index in 5">
<view class="myintegral-body" v-for="item in integral">
<view class="body-top">
<view class="myintegral-body-title">首届海岸3V3篮球赛</view>
<view class="myintegral-body-num">+100</view>
<view class="myintegral-body-num">+{{item.change}}</view>
</view>
<view class="body-date">2023-04-01</view>
<view class="body-date">{{dateFormat(item.createTime)}}</view>
</view>
</view>
</view>
</template>
<script>
import {myIntegral} from '../../api/my/myintegral/index.js'
import {dateFormat} from "../../utils/common.js"
export default{
data(){
return{
baseURL: 'http://192.144.239.97:20043/file/',
integral:[],
pageNum: 1,
pageSize: 10,
total: 0,
allintegral:0
}
},
onLoad() {
this.getMyIntegral()
},
methods:{
// 查询我的积分
getMyIntegral(){
const query={
pageNum: this.pageNum,
pageSize: this.pageSize,
}
myIntegral(query).then(res=>{
console.log("我的积分",res)
this.integral = res.rows
this.allintegral = res.rows[0].integral
this.total=res.total
})
},
// 日期格式化
dateFormat(time) {
let date = new Date(time);
let year = date.getFullYear();
// 在日期格式中,月份是从0开始的,因此要加0,使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05
let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
// 拼接
// return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
return year + "-" + month + "-" + day;
}
}
}
</script>
<style lang="scss" scoped>
......
......@@ -12,16 +12,16 @@
<view v-if="item.status === 10" style="height: 100rpx;position: absolute;top: 10rpx;right: 10rpx;">订单关闭</view>
<image v-if="item.status === 9"
style="width: 100rpx;height: 100rpx;position: absolute;top: 0;right: 10rpx;"
src="../../static/images/business/wode_img_yiwancheng@2x.png">
:src="baseURL+'/static/business/wode_img_yiwancheng@2x.png'">
<image v-if="item.status === 0"
style="width: 100rpx;height: 100rpx;position: absolute;top: 0;right: 10rpx;"
src="../../static/images/business/wode_img_daizhifu@2x.png">
:src="baseURL+'/static/business/wode_img_daizhifu@2x.png'">
<image v-if="item.status === 2 || item.status === 3 || item.status === 4 || item.status === 5"
style="width: 100rpx;height: 100rpx;position: absolute;top: 0;right: 10rpx;"
src="../../static/images/business/wode_img_tuikuanzhong@2x.png">
:src="baseURL+'/static/business/wode_img_tuikuanzhong@2x.png'">
<image v-if="item.status === 6 || item.status === 7"
style="width: 100rpx;height: 100rpx;position: absolute;top: 0;right: 10rpx;"
src="../../static/images/business/wode_img_tuikuanwancheng@2x.png">
:src="baseURL+'/static/business/wode_img_tuikuanwancheng@2x.png'">
<view class="list-top">
<view class="list-image">
<image class="order-image" :src="baseURL + item.imgUrl">
......
......@@ -23,6 +23,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/mine/updateInfo",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/announcement/list",
"style": {
......@@ -88,12 +94,6 @@
"navigationBarTitleText": "投诉建议"
}
},
{
"path": "avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{
"path": "myMessage/index",
"style": {
......@@ -118,6 +118,23 @@
}
}
]
},
{
"root": "releaseactivity",
"pages": [
{
"path":"index",
"style": {
"navigationBarTitleText": "我发布的活动"
}
},
{
"path":"addMemberActivity",
"style": {
"navigationBarTitleText": "新增活动"
}
}
]
}
],
"tabBar": {
......
......@@ -24,11 +24,11 @@
<view>
<view class="popbod-title">{{businessActivityDetail.name}}</view>
<view class="pop-time">
<image class="poptime-img" src="../../static/images/activity/huodong_icon_riqi@2x.png">
<image class="poptime-img" :src="baseURL+'/static/activity/huodong_icon_riqi@2x.png'">
<view class="poptime-text">{{businessActivityDetail.activityBeginDate}}</view>
</view>
<view class="pop-price">
<image class="popprice-img" src="../../static/images/activity/huodong_icon_danjia@2x.png">
<image class="popprice-img" :src="baseURL+'/static/activity/huodong_icon_danjia@2x.png'">
<view class="popprice-text">单价:<text>{{businessActivityDetail.price}}次/人</text></view>
</view>
......@@ -37,9 +37,9 @@
<view class="buy-num">
<view class="buynum-title">购买数量</view>
<view class="buynum-math">
<image class="reduce" src="../../static/images/activity/huodong_icon_jian@2x.png" @click="reduce">
<image class="reduce" :src="baseURL+'/static/activity/huodong_icon_jian@2x.png'" @click="reduce">
<view class="num">{{buynum}}</view>
<image class="add" src="../../static/images/activity/huodong_icon_jia@2x.png" @click="add">
<image class="add" :src="baseURL+'/static/activity/huodong_icon_jia@2x.png'" @click="add">
</view>
</view>
<view class="usecoupon">
......@@ -196,7 +196,7 @@
} else {
uni.showToast({
title: res.message,
icon: 'error'
icon: 'none'
})
}
})
......@@ -295,7 +295,7 @@
if (!res.data.nonceStr) {
uni.showToast({
title: '下单失败,请稍后重试',
icon: 'error'
icon: 'none'
})
} else {
uni.requestPayment({
......@@ -318,7 +318,7 @@
fail(e) {
uni.showToast({
title: '支付已取消',
icon: null
icon: 'none'
})
// const activityId = this.activityId
const orderStatus = {
......@@ -335,14 +335,14 @@
} else {
uni.showToast({
title: '下单失败',
icon: 'error'
icon: 'none'
})
}
})
} else {
uni.showToast({
title: res.message,
icon: 'error'
icon: 'none'
})
}
})
......
......@@ -87,6 +87,7 @@
},
// 获取Banner图数据
getBanner() {
this.list3=[]
getDicts('activityBanner').then(res => {
// console.log("res---->>>>>banner",res)
res.data.forEach(item => {
......
......@@ -4,7 +4,7 @@
<view class="body">
<view class="time">{{form.pushTime}}</view>
<view class="body-num">
<image class="image" src="../../static/images/my/yuanqugonggao_icon_liulan1@2x.png">
<image class="image" :src="baseURL+'/static/my/yuanqugonggao_icon_liulan1@2x.png'">
<view class="num" v-if="form.viewNum">{{form.viewNum}}人浏览</view>
<view class="num" v-else>0人浏览</view>
</view>
......@@ -24,6 +24,7 @@
export default {
data() {
return {
baseURL: 'http://192.144.239.97:20043/file/',
form: [],
id: '',
}
......
......@@ -5,7 +5,7 @@
<view class="bottom">
<view class="time">{{item.pushTime}}</view>
<view style="display: flex;align-items: center;">
<image class="image" src="../../static/images/my/yuanqugonggao_icon_liulan1@2x.png">
<image class="image" :src="baseURL+'/static/my/yuanqugonggao_icon_liulan1@2x.png'">
<view class="num" v-if="item.viewNum">{{item.viewNum}}人浏览</view>
<view class="num" v-else>0人浏览</view>
</view>
......@@ -22,6 +22,7 @@
data() {
return {
announcementList: [],
baseURL: 'http://192.144.239.97:20043/file/',
}
},
onShow() {
......
......@@ -59,3 +59,10 @@ export function getPublicActivity(query){
method: 'get'
})
}
// 获取个人信息
export function getInfo(id) {
return request({
url: '/sysUserManage/memberDetail/' + id,
method: 'get'
})
}
......@@ -149,6 +149,7 @@
},
// 获取Banner图数据
getBanner() {
this.list3=[]
getDicts('homeBanner').then(res => {
// console.log("res---->>>>>banner",res)
res.data.forEach(item => {
......@@ -170,7 +171,6 @@
margin: 0 34rpx;
// height: 192px;
}
.notice {
display: flex;
margin: 34rpx 34rpx 0 34rpx;
......
......@@ -6,86 +6,95 @@
>
</u-navbar>
<view>
<image class="image" src="../../static/images/my/wode_pic_bg@2x.png">
<image class="image" :src="baseURL+'/static/my/wode_pic_bg@2x.png'">
</view>
<view class="top">
<view class="top-avatar">
<view class="avatarclass">
<u-avatar size="156"></u-avatar>
<view class="avatarclass" @click="gotopage('/pages/mine/updateInfo')">
<image :src="memberInfo.avatar" v-if="memberInfo.avatar" style="width: 156rpx;height: 156rpx;border-radius: 50px;">
<image :src="baseURL+'/static/my/touxiang.png'" v-else style="width: 156rpx;height: 156rpx;border-radius: 50px;">
</view>
<view class="name">去有风的地方</view>
<view class="name">{{memberInfo.nickName}}</view>
<view class="icon-dengji">
<image class="dengji" src="../../static/images/my/wode_icon_dengji@2x.png">
<image class="dengji" :src="baseURL+'/static/my/wode_icon_dengji@2x.png'">
</view>
<view class="rightdengji">LV1</view>
<view class="rightdengji">LV{{memberInfo.level}}</view>
</view>
<view class="line"></view>
<view class="top-bottom">
<view class="coupon" @click="JumpCoupon">
<view class="coupon-icon">
<image class="couponimage" src="../../static/images/my/wode_icon_youhuiquan@2x.png">
<image class="couponimage" :src="baseURL+'/static/my/wode_icon_youhuiquan@2x.png'">
</view>
<view class="coupon-title">我的优惠券</view>
<view class="coupon-num">(8)</view>
<view class="coupon-num">({{memberInfo.couponNumber}})</view>
</view>
<view class="integral" @click="gotopage('/my/myintegral/index')">
<view class="integral-icon">
<image class="integralimage" src="../../static/images/my/wode_icon_jifen@2x.png">
<image class="integralimage" :src="baseURL+'/static/my/wode_icon_jifen@2x.png'">
</view>
<view class="integral-title">我的积分</view>
<view class="integral-num">(1000)</view>
<view class="integral-num">({{memberInfo.integral}})</view>
</view>
</view>
</view>
<view class="list">
<view class="list-trim" @click="gotopage('/my/myapplication/index')">
<view class="left">
<image class="leftimage" src="../../static/images/my/wode_icon_baoming@2x.png">
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_baoming@2x.png'">
<view class="trim-title">我的报名</view>
</view>
<view style="height: 28rpx;">
<image class="rightimage" src="../../static/images/my/wode_icon_jiantou@2x.png">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
<view class="list-trim" @click="gotopage('/my/myorder/index')">
<view class="left">
<image class="leftimage" src="../../static/images/my/wode_icon_dingdan@2x.png">
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_dingdan@2x.png'">
<view class="trim-title">我的订单</view>
</view>
<view style="height: 28rpx;">
<image class="rightimage" src="../../static/images/my/wode_icon_jiantou@2x.png">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
<view class="list-trim" @click="gotopage('/my/complaint/index')">
<view class="left">
<image class="leftimage" src="../../static/images/my/wode_icon_tousu@2x.png">
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_tousu@2x.png'">
<view class="trim-title">投诉建议</view>
</view>
<view style="height: 28rpx;">
<image class="rightimage" src="../../static/images/my/wode_icon_jiantou@2x.png">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
<view class="list-trim" @click="jumpMyMessage">
<view class="left">
<image class="leftimage" src="../../static/images/my/wode_icon_xiaoxi@2x.png">
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_xiaoxi@2x.png'">
<view class="trim-title">消息</view>
</view>
<view class="right">
<view class="messagenum">8</view>
<view class="messagenum" v-if="memberInfo.messagesNumber>0">{{memberInfo.messagesNumber}}</view>
<view style="height: 28rpx;">
<image class="rightimage" src="../../static/images/my/wode_icon_jiantou@2x.png">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
</view>
<view class="list-trim" @click="gotopage('/my/complaint/index')">
<view class="list-trim" @click="gotopage('/releaseactivity/index')" v-if="memberInfo.memberType > 0">
<view class="left">
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_tousu@2x.png'">
<view class="trim-title">我发布的活动</view>
</view>
<view style="height: 28rpx;">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
<view class="list-trim" @click="gotopage('/releaseactivity/index')" v-if="memberInfo.memberType > 0">
<view class="left">
<image class="leftimage" src="../../static/images/my/wode_icon_tousu@2x.png">
<view class="trim-title">发布活动</view>
<image class="leftimage" :src="baseURL+'/static/my/wode_icon_tousu@2x.png'">
<view class="trim-title">核销</view>
</view>
<view style="height: 28rpx;">
<image class="rightimage" src="../../static/images/my/wode_icon_jiantou@2x.png">
<image class="rightimage" :src="baseURL+'/static/my/wode_icon_jiantou@2x.png'">
</view>
</view>
</view>
......@@ -93,10 +102,15 @@
</template>
<script>
import {myIntegral} from "../../api/my/myintegral/index.js"
import {getInfo}from "../api.js"
export default {
data() {
return {
userInfo:''
userInfo:'',
allintegral: 0,
memberInfo: {}, // 会员信息
baseURL: 'http://192.144.239.97:20043/file/'
}
},
created() {
......@@ -104,6 +118,8 @@ export default {
onLoad(){
this.userInfo=JSON.parse(uni.getStorageSync('userInfo'))
console.log('this.userInfo',this.userInfo)
this.getMyIntegral()
this.getUserInfo()
},
methods: {
/** 跳转我的优惠券*/
......@@ -118,6 +134,24 @@ export default {
url: '/my/myMessage/index'
})
},
// 获取会员信息
getUserInfo(){
getInfo(this.userInfo.businessId).then(res=>{
console.log("会员信息",res)
this.memberInfo=res.data
})
},
// 我的积分总数
getMyIntegral(){
const query={
pageNum: this.pageNum,
pageSize: this.pageSize,
}
myIntegral(query).then(res=>{
console.log("我的积分",res)
this.allintegral = res.rows[0].integral
})
},
// 跳转页面
gotopage(url){
this.$tab.navigateTo(url)
......
<template>
<view class="info">
<view class="update-info">
<u-cell-group>
<u-cell title="头像" :isLink="true" :center="true" rightIconStyle="font-size:28rpx" @click="uploadAvatar">
<view slot="value">
<image :src="infoform.avatar" v-if="infoform.avatar" style="width: 100rpx;height: 100rpx;border-radius: 50px;">
<image :src="baseURL+'/static/my/touxiang.png'" v-else style="width: 100rpx;height: 100rpx;border-radius: 50px;">
</view>
</u-cell>
<u-cell title="昵称" :isLink="true" :center="true" rightIconStyle="font-size:28rpx"
:value="infoform.nickName" @click="nicknameshowpopup">
</u-cell>
<u-cell title="性别" :isLink="true" :center="true" rightIconStyle="font-size:28rpx" @click="show = true">
<view slot="value" style="font-size: 14px;line-height: 24px;color: #606266;">
<span v-if="infoform.sex==1"></span>
<span v-else-if="infoform.sex==0"></span>
<span v-else>请选择性别</span>
</view>
</u-cell>
<u-cell title="邮箱" :isLink="true" :center="true" rightIconStyle="font-size:28rpx"
:value="infoform.email" @click="emileshowpopup">
<view slot="value" style="font-size: 14px;line-height: 24px;color: #606266;">
<span v-if="infoform.email">{{infoform.email}}</span>
<span v-else>添加</span>
</view>
</u-cell>
</u-cell-group>
</view>
<view class="bottom-button" @click="updateInfo">
<view class="button">保存</view>
</view>
<!-- 性别选择器 -->
<u-picker :show="show" :columns="columns" keyName="label" confirmColor="#D84848" @close="sexpopupclose"
@confirm="sexpopupconfirm"></u-picker>
<!-- 昵称弹出层 -->
<u-popup :show="nicknameshow" @close="close" custom-style="height:200rpx">
<view class="popup-top">
<view @click="nicknameshow=false">取消</view>
<view style="color: #d84848;" @click="nicknameSubmit">确定</view>
</view>
<view class="button-input">
<u--input placeholder="请输入昵称" border="surround" v-model="nickname"maxlength="100"></u--input>
</view>
</u-popup>
<!-- 邮箱弹出层 -->
<u-popup :show="emileshow" @close="close" custom-style="height:200rpx">
<view class="popup-top">
<view @click="emileshow=false">取消</view>
<view style="color: #d84848;" @click="emileSubmit">确定</view>
</view>
<view class="button-input">
<u--input placeholder="请输入邮箱" border="surround" v-model="emile" maxlength="100"></u--input>
</view>
</u-popup>
</view>
</template>
<script>
import {
getInfo
} from "../api.js"
import {updateMembeerInfo} from "../../api/my/info/index.js"
export default {
data() {
return {
baseURL: 'http://192.144.239.97:20043/file/',
sex: '男',
show: false,
emileshow: false,
nicknameshow: false,
infoform: {
avatar: '',
nickName: '',
email: '',
sex: ''
},
nickname: '',
emile: '',
userInfo: {},
columns: [
[{
label: '男',
// 其他属性值
id: 1
// ...
}, {
label: '女',
id: 0
}]
],
}
},
onLoad() {
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
console.log('this.userInfo', this.userInfo)
this.getUserInfo()
},
methods: {
// 获取个人信息
getUserInfo() {
getInfo(this.userInfo.businessId).then(res => {
console.log("会员信息", res)
this.infoform = res.data
})
},
// 关闭性别弹出框
sexpopupclose() {
this.show = false
},
// 性别选择器
sexpopupconfirm(value) {
console.log("选择性别", value)
this.infoform.sex = value.value[0].id
console.log("this.infoform.sex", this.infoform.sex)
this.show = false
},
// 上传图片
uploadAvatar() {
uni.chooseImage({
sourceType: ['album'],
success: chooseImageRes => {
console.log("成功", chooseImageRes)
const tempFilePaths = chooseImageRes.tempFilePaths;
uni.uploadFile({
url: 'http://192.144.239.97:20040/ossInfo/fileUpload', //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
name: 'file',
header: {
accessToken: uni.getStorageSync('token'),
platform: 2,
type: 1
},
formData: {
file: tempFilePaths[0],
temp:'info'
},
success:res=>{
let data = JSON.parse(res.data)
console.log("上传成功",data)
this.infoform.avatar=data.data.url
}
})
}
})
},
close() {
this.nicknameshow = false
this.emileshow = false
},
// 昵称弹出框
nicknameshowpopup() {
this.nicknameshow = true
this.nickname = this.infoform.nickName
},
// 确认修改昵称
nicknameSubmit() {
this.nicknameshow = false
this.infoform.nickName = this.nickname
},
// 邮箱弹出框
emileshowpopup() {
this.emileshow = true
this.emile = this.infoform.email
},
//确认修改邮箱
emileSubmit() {
const reg = RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.emile)
if(reg){
this.infoform.email = this.emile
this.emileshow = false
}else{
uni.showToast({
title:"请输入正确的邮箱",
icon:'none'
})
}
},
// 修改个人信息
updateInfo(){
updateMembeerInfo(this.infoform).then(res=>{
console.log("修改个人信息",res)
if(res.code===200){
uni.showToast({
title:"修改成功",
icon:"success"
})
uni.switchTab({
url:"/pages/mine/index"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.info {
background: #F5F5F5;
min-height: 100vh;
padding-top: 34rpx;
.update-info {
margin: 0 34rpx;
background: #FFFFFF;
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.08);
border-radius: 12px 12px 12px 12px;
/deep/.u-cell {
height: 144rpx;
justify-content: center;
}
/deep/.u-cell__body {
height: 100%;
}
/deep/.u-cell__title-text {
font-size: 32rpx !important;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400 !important;
color: #222222 !important;
}
}
}
.bottom-button {
height: 192rpx;
background: #FFFFFF;
box-shadow: 0px -1px 0px 1px #F5F5F5;
border-radius: 0px 0px 0px 0px;
// margin: 0 -36rpx;
width: 100%;
position: absolute;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
.button {
width: 682rpx;
height: 88rpx;
background: #BD1A2D;
border-radius: 22px 22px 22px 22px;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
}
}
.popup-top {
padding: 34rpx;
display: flex;
justify-content: space-between;
}
.button-input {
// height: 200rpx;
margin: 34rpx;
border: 1px solid #eeeeee;
border-radius: 12px;
}
</style>
\ No newline at end of file
<template>
<view class="normal-login-container">
<image class="bgimage" src="../static/images/login/denglu_pic_bg.png">
<image class="bgimage" :src="baseURL+'/static/images/login/denglu_pic_bg.png'">
<view class="login-top">
<image :src="loginLogo" class="loginLogo">
</image>
......@@ -29,7 +29,7 @@
//openId
openId: '',
baseURL: 'http://192.144.239.97:20043/file/',
//用户类型
userType: '',
......
<template>
<view class="work-container">
<!-- 轮播图 -->
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
<swiper-item v-for="(item, index) in data" :key="index">
<view class="swiper-item" @click="clickBannerItem(item)">
<image :src="item.image" mode="aspectFill" :draggable="false" />
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
<!-- 宫格组件 -->
<uni-section title="系统管理" type="line"></uni-section>
<view class="grid-body">
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="person-filled" size="30"></uni-icons>
<text class="text">用户管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="staff-filled" size="30"></uni-icons>
<text class="text">角色管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="color" size="30"></uni-icons>
<text class="text">菜单管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="settings-filled" size="30"></uni-icons>
<text class="text">部门管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="heart-filled" size="30"></uni-icons>
<text class="text">岗位管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="bars" size="30"></uni-icons>
<text class="text">字典管理</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="gear-filled" size="30"></uni-icons>
<text class="text">参数设置</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="chat-filled" size="30"></uni-icons>
<text class="text">通知公告</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box">
<uni-icons type="wallet-filled" size="30"></uni-icons>
<text class="text">日志管理</text>
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
</template>
<script>
export default {
data() {
return {
current: 0,
swiperDotIndex: 0,
data: [{
image: '/static/images/banner/banner01.jpg'
},
{
image: '/static/images/banner/banner02.jpg'
},
{
image: '/static/images/banner/banner03.jpg'
}
]
}
},
methods: {
clickBannerItem(item) {
console.info(item)
},
changeSwiper(e) {
this.current = e.detail.current
},
changeGrid(e) {
this.$modal.showToast('模块建设中~')
}
}
}
</script>
<style lang="scss">
/* #ifndef APP-NVUE */
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #fff;
min-height: 100%;
height: auto;
}
view {
font-size: 14px;
line-height: inherit;
}
/* #endif */
.text {
text-align: center;
font-size: 26rpx;
margin-top: 10rpx;
}
.grid-item-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px 0;
}
.uni-margin-wrap {
width: 690rpx;
width: 100%;
;
}
.swiper {
height: 300rpx;
}
.swiper-box {
height: 150px;
}
.swiper-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
height: 300rpx;
line-height: 300rpx;
}
@media screen and (min-width: 500px) {
.uni-swiper-dot-box {
width: 400px;
/* #ifndef APP-NVUE */
margin: 0 auto;
/* #endif */
margin-top: 8px;
}
.image {
width: 100%;
}
}
</style>
<template>
<view class="complaint">
<view class="complaint-form">
<u--form labelWidth="160" :model="model1" ref="uForm" class="complaint-form">
<u-form-item label="活动名称" prop="userInfo.name" borderBottom ref="item1" required="true" labelWidth="160"
labelPosition="top">
<u--input placeholder="请输入活动名称" v-model="model1.title" border="none"></u--input>
</u-form-item>
<u-form-item label="活动价格" prop="userInfo.sex" borderBottom required="true" labelWidth="160" labelPosition="top">
<u--input v-model="model1.type" placeholder="请输入活动价格" border="none"></u--input>
<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
</u-form-item>
<u-form-item label="联系人" prop="userInfo.name" borderBottom ref="item1" required="true" labelWidth="160"
labelPosition="top">
<u--input placeholder="请输入联系人" v-model="model1.message" border="none"></u--input>
</u-form-item>
<u-form-item label="联系方式" prop="userInfo.name" borderBottom ref="item1" labelWidth="160"
labelPosition="top">
<u--input placeholder="请输入联系方式" v-model="model1.phone" border="none"></u--input>
</u-form-item>
<u-form-item label="活动开始时间" prop="userInfo.name" borderBottom ref="item1" labelWidth="200" labelPosition="top" @click="showDate = true; hideKeyboard()">
<u--input placeholder="请选择活动时间" v-model="model1.phone" border="none" readonly></u--input>
</u-form-item>
<u-form-item label="活动结束时间" prop="userInfo.name" borderBottom ref="item1" labelWidth="200" labelPosition="top" @click="showDate = true; hideKeyboard()">
<u--input placeholder="请选择活动时间" v-model="model1.phone" border="none" readonly></u--input>
</u-form-item>
<u-form-item label="是否强制限制人数" prop="userInfo.name" borderBottom ref="item1" labelWidth="260"
labelPosition="top">
<u-radio-group
v-model="value"
placement="row"
iconSize="64">
<u-radio activeColor="red" label="是" labelSize="32" iconSize="32" style="margin-right: 20px;"></u-radio>
<u-radio activeColor="red" label="否" labelSize="32" iconSize="32"></u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="活动人数" prop="userInfo.name" borderBottom ref="item1" labelWidth="160"
labelPosition="top">
<u--input placeholder="请输入活动人数" v-model="model1.phone" border="none"></u--input>
</u-form-item>
<u-form-item label="活动地点" prop="userInfo.name" borderBottom ref="item1" labelWidth="160"
labelPosition="top">
<u--input placeholder="请输入活动地点" v-model="model1.phone" border="none"></u--input>
</u-form-item>
<u-form-item label="封面图片" prop="userInfo.name" borderBottom ref="item1" labelWidth="160"
labelPosition="top">
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
multiple
width="100"
height="100"
:maxCount="1"
></u-upload>
</u-form-item>
<u-form-item label="活动内容" prop="userInfo.name" borderBottom ref="item1" labelWidth="160"
labelPosition="top">
<editor id="editor" class="ql-container" placeholder="请输入活动内容" @ready="onEditorReady"></editor>
</u-form-item>
</u--form>
</view>
<view class="bottom-button">
<view class="button">提交</view>
</view>
<u-picker :show="show" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
<!--活动时间选择器 -->
<u-datetime-picker
:show="showDate"
v-model="value1"
mode="datetime"
@confirm="confirmDate"
></u-datetime-picker>
</view>
</template>
<script>
export default {
data() {
return {
showSex: false,
model1: {
title: '',
type: '',
message: '',
phone: ''
},
content: '',
fileList1: [],
show: false,
mode: 'range',
showDate: false,
columns: [
['中国', '美国', '日本']
],
rules: {
'userInfo.name': {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
'userInfo.sex': {
type: 'string',
max: 1,
required: true,
message: '请选择男或女',
trigger: ['blur', 'change']
},
},
radio: '',
switchVal: false
};
},
methods: {
hideKeyboard() {
uni.hideKeyboard()
},
cancel() {
this.show = false
},
confirm(res){
console.log("res",res)
this.model1.type=res.value
this.show = false
},
// 日期选择器确认按钮
confirmDate(e){
this.showDate = false
console.log(e);
},
onEditorReady() {
// #ifdef MP-BAIDU
this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor');
// #endif
// #ifdef APP-PLUS || H5 ||MP-WEIXIN
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
// #endif
},
undo() {
this.editorCtx.undo()
},
sexSelect(e) {
this.model1.userInfo.sex = e.name
this.$refs.uForm.validateField('userInfo.sex')
},
},
// 删除图片
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
// 新增图片
async afterRead(event) {
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
setTimeout(() => {
resolve(res.data.data)
}, 1000)
}
});
})
},
onReady() {
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
// this.$refs.uForm.setRules(this.rules)
},
};
</script>
<style scoped lang="scss">
.complaint {
background: #F5F5F5;
min-height: 100vh;
padding: 36rpx 36rpx 192rpx 36rpx;
.complaint-form {
// height: 1188rpx;
background: #FFFFFF;
box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.08);
border-radius: 12px 12px 12px 12px;
padding: 0 34rpx;
margin-bottom: 40rpx;
/deep/.u-form-item__body {
padding: 42rpx 0 !important;
}
/deep/.u-form-item__body__left {
margin-bottom: 40rpx !important;
}
/deep/.u-form-item__body__left__content__required {
left: 62px !important;
color: #C8382A !important;
}
}
.bottom-button {
height: 192rpx;
background: #FFFFFF;
box-shadow: 0px -1px 0px 1px #F5F5F5;
border-radius: 0px 0px 0px 0px;
margin: 0 -36rpx;
width: 100%;
position: fixed;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 9;
.button {
width: 682rpx;
height: 88rpx;
background: #BD1A2D;
border-radius: 22px 22px 22px 22px;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
<template>
<view class="activity">
<view class="activity-list" v-for="item in activityList" @click="gotodetail(item)">
<view class="leftlist">
<image :src="baseURL+item.imgUrl" class="leftlistimage">
</view>
<view class="rightlist">
<view class="rightlist-title">{{item.name}}</view>
<!-- <view class="rightlist-message">活动内容活动内容活动内容活动内容活动内容活动内容</view> -->
<view class="rightlist-time">
<view class="timeicon">
<u-icon name="clock" color="#666666;" size="28"></u-icon>
</view>
<view class="timetext">{{item.activityBeginDate}}</view>
</view>
<view class="rightlist-address">
<view class="addressicon">
<u-icon name="map" color="#D84848;" size="28"></u-icon>
</view>
<view class="addresstext" v-if="item.address">{{item.address}}</view>
<view class="addresstext" v-else>-</view>
</view>
</view>
</view>
<view class="activity-nomore">~ 没有更多啦 ~</view>
<!-- <view class="act-bottom" @click="gotoAdd">
<view class="act-button">新增活动</view>
</view> -->
</view>
</template>
<script>
import {publishedactivitylist} from "../api/activity/index.js"
export default {
data() {
return {
baseURL: 'http://192.144.239.97:20043/file/',
StatusBarHeight: '',
activityList:[], // 活动列表
queryParams: {
// orderBy: 0,
pageNum:1,
pageSize:10,
status: 1
},
buttonstatus: 1
}
},
onShow() {
this.getList()
},
methods: {
// 跳转详情页
gotodetail(val) {
const type = 0
uni.navigateTo({
url: '/pages/activity/activitydetail'+ '?id='+val.businessId + '&type='+type
})
},
// 获取活动列表
getList(){
publishedactivitylist(this.queryParams).then(response=>{
console.log('我发布的活动列表',response)
this.activityList = response.rows
})
},
// // 跳转新增活动页面
// gotoAdd(){
// uni.navigateTo({
// url: '/releaseactivity/addMemberActivity'
// })
// }
}
}
</script>
<style lang="scss" scoped>
.activity {
background: #fff;
min-height: 100vh;
.activity-list {
display: flex;
padding: 30rpx 34rpx 0 42rpx;
align-items: center;
border-bottom: 1px solid #F1F1F1;
.leftlist {
margin-right: 26rpx;
.leftlistimage {
width: 220rpx;
height: 166rpx;
border-radius: 12px 12px 12px 12px;
}
}
.rightlist {
.rightlist-title {
font-size: 16px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #222222;
margin-bottom: 34rpx;
}
.rightlist-message {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #666666;
margin-bottom: 26rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: calc(100vw - 220rpx - 26rpx - 42rpx - 34rpx);
}
.rightlist-time {
display: flex;
margin-bottom: 24rpx;
align-items: center;
.timeicon {
margin-right: 14rpx;
}
.timetext {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #666666;
}
}
.rightlist-address {
display: flex;
margin-bottom: 30rpx;
align-items: center;
.addressicon {
margin-right: 14rpx;
margin-top: 2rpx;
}
.addresstext {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #DF6969;
}
}
}
}
.activity-nomore {
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
}
.act-bottom {
background: #FFFFFF;
width: 100vw;
height: 192rpx;
display: flex;
justify-content: center;
align-items: center;
padding: 0 34rpx;
position: fixed;
bottom: 0;
// margin: 0 -34rpx;
.act-button {
width: 100%;
height: 44px;
background: #BD1A2D;
border-radius: 22px 22px 22px 22px;
color: #FFFFFF;
font-size: 34rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
display: flex;
justify-content: center;
align-items: center;
line-height: 34rpx;
}
}
}
</style>
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