Commit 2ccaa28c authored by 万成波's avatar 万成波

Merge remote-tracking branch 'origin/master'

parents 14715a26 3595d0db
import request from '@/utils/request'
// 动态列表
export function listData(params) {
return request({
url: '/bbs/moment/list',
method: 'get',
params
})
}
// 动态详情
export function detailData(id) {
return request({
url: `/bbs/moment/${id}`,
method: 'get'
})
}
// 删除动态
export function delData(id) {
return request({
url: `/bbs/moment/${id}`,
method: 'delete'
})
}
\ No newline at end of file
import request from '@/utils/request'
// 积分兑换商品
export function pointsExchange(params) {
return request({
url: '/bbs/points/exchange/select/goods',
method: 'get',
params
})
}
// 兑换人选择
export function exchangeUser(params) {
return request({
url: '/bbs/points/exchange/select/users',
method: 'get',
params
})
}
// 兑换列表
export function listData(params) {
return request({
url: '/bbs/points/exchange/list',
method: 'get',
params
})
}
// 兑换商品
export function exchange(data){
return request({
url:'/bbs/points/exchange/exchange',
method:'post',
data
})
}
\ No newline at end of file
...@@ -45,11 +45,3 @@ export function editData(data) { ...@@ -45,11 +45,3 @@ export function editData(data) {
}) })
} }
// 删除积分管理
export function delData(id) {
return request({
url: `/bbs/points/goods/${id}`,
method: 'delete'
})
}
\ No newline at end of file
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 用户等级列表 // 用户等级列表
export function listData(params) { export function listData(params) {
return request({ return request({
url: '/bbs/moment/grade/list', url: '/bbs/points/grade/list',
method: 'get', method: 'get',
params params
}) })
...@@ -12,7 +12,7 @@ export function listData(params) { ...@@ -12,7 +12,7 @@ export function listData(params) {
// 用户等级详情 // 用户等级详情
export function detailData(id) { export function detailData(id) {
return request({ return request({
url: `/bbs/moment/grade/${id}`, url: `/bbs/points/grade/${id}`,
method: 'get' method: 'get'
}) })
} }
...@@ -20,7 +20,7 @@ export function detailData(id) { ...@@ -20,7 +20,7 @@ export function detailData(id) {
// 新增用户等级 // 新增用户等级
export function addData(data) { export function addData(data) {
return request({ return request({
url: '/bbs/moment/grade', url: '/bbs/points/grade',
method: 'post', method: 'post',
data data
}) })
...@@ -29,7 +29,7 @@ export function addData(data) { ...@@ -29,7 +29,7 @@ export function addData(data) {
// 修改用户等级 // 修改用户等级
export function editData(data) { export function editData(data) {
return request({ return request({
url: '/bbs/moment/grade', url: '/bbs/points/grade',
method: 'put', method: 'put',
data data
}) })
...@@ -39,7 +39,7 @@ export function editData(data) { ...@@ -39,7 +39,7 @@ export function editData(data) {
// 删除用户等级 // 删除用户等级
export function delData(id) { export function delData(id) {
return request({ return request({
url: `/bbs/moment/grade/${id}`, url: `/bbs/points/grade/${id}`,
method: 'delete' method: 'delete'
}) })
} }
\ No newline at end of file
...@@ -17,7 +17,7 @@ const service = axios.create({ ...@@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分 // axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 超时 // 超时
timeout: 10000 timeout: 30000
}) })
// request拦截器 // request拦截器
......
<template>
<div class="app-container">
<div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="80px">
<el-form-item label="动态内容">
<el-input placeholder="请输入" v-model="queryParams.content" style="width: 220px;"></el-input>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker placeholder="请选择" value-format="YYYY-MM-DD"
v-model="queryParams.createTime"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-row class="mb10">
</el-row>
<el-table :data="tableList">
<el-table-column label="序号" width="55" type="index" align="center"></el-table-column>
<el-table-column label="动态内容" prop="nikeName" align="center"></el-table-column>
<el-table-column label="话题" align="center" prop="goodsName"></el-table-column>
<el-table-column label="帐号" prop="goodsExchangePoints" align="center"></el-table-column>
<el-table-column label="姓名" prop="createTime" align="center"></el-table-column>
<el-table-column label="表情数" prop="userGradeName" align="center"></el-table-column>
<el-table-column label="评论数" prop="userRemainingPoints" align="center"></el-table-column>
<el-table-column label="创建时间" prop="userRemainingPoints" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template #default="{ row }">
<el-button type="text" @click="handleUpdate(row)">详情</el-button>
<el-button type="text" @click="handleDelete(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</div>
</template>
<script>
import { listData } from '@/api/moments';
export default {
name: 'Moments',
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10
},
tableList: [],
total: 0,
dateRange: [],
optionList: []
}
},
created() {
},
mounted() {
this.getList()
},
methods: {
// 列表数据
getList() {
listData(this.queryParams).then(res => {
console.log(res)
this.tableList = res.rows;
this.total = res.total
})
},
// 兑换商品列表
getOptions() {
pointsExchange().then(res => {
console.log(res)
this.optionList = res.data
})
},
// 新增
handleAdd() {
this.$refs.exchangeDialogRef.openModal()
},
// 删除
handleDelete(row) {
this.$modal.confirm('确认要删除商品名称为:' + row.name + '的数据吗?').then(function () {
return delData(row.id);
}).then(() => {
this.$modal.msgSuccess("删除成功");
this.getList()
})
},
// 导出积分明细
handleExport() {
this.download('/bbs/points/exchange/export', {
...this.queryParams
}, `积分明细_${new Date().getTime()}.xlsx`)
},
// 时间段选择
dateChange(val) {
if (val) {
this.queryParams.startTime = val[0]
this.queryParams.endTime = val[1]
}
},
// 查询
handleQuery() {
this.queryParams.pageNum = 1;
this.getList()
},
// 重置
handleReset() {
this.queryParams = {
pageNum: 1,
pageSize: 10
}
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
background-color: rgba(241, 242, 247, 1);
height: calc(100vh - 50px);
.page-container {
background-color: white;
height: 100%;
border-radius: 6px;
padding: 20px 30px;
box-sizing: border-box;
overflow: auto;
}
}
</style>
\ No newline at end of file
<template>
<div class="app-container">
<div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="80px">
<el-form-item label="兑换时间">
<el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
style="width: 220px;" value-format="YYYY-MM-DD" @change="dateChange"></el-date-picker>
</el-form-item>
<el-form-item label="兑换人">
<el-input placeholder="请输入" v-model="queryParams.userName" style="width: 220px;"></el-input>
</el-form-item>
<el-form-item label="兑换商品">
<el-select v-model="queryParams.goodsCode" placeholder="请选择" style="width: 220px;">
<el-option v-for="(item, index) in optionList" :label="item.name" :value="item.code"
:key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-row class="mb10">
<el-col :span="2">
<el-button type="primary" @click="handleAdd">积分兑换</el-button>
</el-col>
<el-col :span="2">
<el-button type="primary" plain @click="handleExport">导出积分明细</el-button>
</el-col>
</el-row>
<el-table :data="tableList">
<el-table-column label="序号" width="55" type="index" align="center"></el-table-column>
<el-table-column label="兑换人" prop="nikeName" align="center"></el-table-column>
<el-table-column label="兑换商品" align="center" prop="goodsName"></el-table-column>
<el-table-column label="兑换积分" prop="goodsExchangePoints" align="center"></el-table-column>
<el-table-column label="兑换时间" prop="createTime" align="center"></el-table-column>
<el-table-column label="会员等级" prop="userGradeName" align="center"></el-table-column>
<el-table-column label="剩余积分" prop="userRemainingPoints" align="center"></el-table-column>
<el-table-column label="操作人" prop="createBy" align="center"></el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 积分兑换 -->
<exchange-dialog ref="exchangeDialogRef" @handleOk="handleReset"></exchange-dialog>
</div>
</template>
<script>
import { listData, pointsExchange } from '@/api/pointsExchange';
import ExchangeDialog from '../pointsManage/ExchangeDialog.vue';
export default {
name: 'PointsExchange',
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10
},
tableList: [],
total: 0,
dateRange: [],
optionList: []
}
},
components: {
ExchangeDialog
},
created() {
},
mounted() {
this.getList()
},
methods: {
// 列表数据
getList() {
listData(this.queryParams).then(res => {
console.log(res)
this.tableList = res.rows;
this.total = res.total
})
},
// 兑换商品列表
getOptions() {
pointsExchange().then(res => {
console.log(res)
this.optionList = res.data
})
},
// 新增
handleAdd() {
this.$refs.exchangeDialogRef.openModal()
},
// 删除
handleDelete(row) {
this.$modal.confirm('确认要删除商品名称为:' + row.name + '的数据吗?').then(function () {
return delData(row.id);
}).then(() => {
this.$modal.msgSuccess("删除成功");
this.getList()
})
},
// 导出积分明细
handleExport() {
this.download('/bbs/points/exchange/export', {
...this.queryParams
}, `积分明细_${new Date().getTime()}.xlsx`)
},
// 时间段选择
dateChange(val){
if(val){
this.queryParams.startTime = val[0]
this.queryParams.endTime = val[1]
}
},
// 查询
handleQuery() {
this.queryParams.pageNum = 1;
this.getList()
},
// 重置
handleReset() {
this.queryParams = {
pageNum: 1,
pageSize: 10
}
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
background-color: rgba(241, 242, 247, 1);
height: calc(100vh - 50px);
.page-container {
background-color: white;
height: 100%;
border-radius: 6px;
padding: 20px 30px;
box-sizing: border-box;
overflow: auto;
}
}
</style>
\ No newline at end of file
<template>
<el-dialog :visible.sync="visible" title="兑换明细" width="70%">
<el-table :data="tableList" v-loading="loading">
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column>
<el-table-column label="明细描述" prop="description" align="center"></el-table-column>
<el-table-column label="操作之前积分" prop="beforePoints" align="center" width="130"></el-table-column>
<el-table-column label="操作之后积分" prop="afterPoints" align="center" width="130"></el-table-column>
<el-table-column label="时间" prop="createTime" align="center" width="150"></el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getDetailList" />
<template #footer>
<el-button @click="visible = false">取消</el-button>
</template>
</el-dialog>
</template>
<script>
import { detailData } from '@/api/pointsManage'
export default {
data() {
return {
visible: false,
tableList: [],
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10
},
loading: false
}
},
methods: {
openModal(row) {
this.visible = true;
this.queryParams.userName = row.userName
this.getDetailList()
},
getDetailList() {
this.loading = true;
detailData(this.queryParams).then(res => {
this.tableList = res.rows;
this.total = res.total
}).finally(() => {
this.loading = false;
})
}
}
}
</script>
\ No newline at end of file
<template>
<el-dialog :visible.sync="visible" v-if="visible" title="积分兑换" width="36%" class="dialog" @close="handleClose">
<el-form :model="form" ref="formRef" label-position="top" :rules="rules">
<el-form-item label="兑换人">
<el-select placeholder="请选择" style="width: 100%;" v-model="form.userName" @change="handleUserChange">
<el-option v-for="(item, index) in userList" :key="index" :value="item.userName"
:label="item.nikeName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="会员等级">
<el-input v-model="form.gradeName" :disabled="true" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="当前积分">
<el-input v-model="form.currentPoints" :disabled="true" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="兑换商品" prop="goodsCode">
<el-select placeholder="请选择" style="width: 100%;" v-model="form.goodsCode">
<el-option v-for="(item, index) in optionList" :label="item.name" :value="item.code"
:key="index"></el-option>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</template>
</el-dialog>
</template>
<script>
import { pointsExchange, exchangeUser, exchange } from '@/api/pointsExchange'
export default {
data() {
return {
visible: false,
form: {},
userList: [],
optionList: [],
rules: {
goodsCode: [{ required: true, message: '请选择兑换商品', trigger: 'change' }]
},
disabled: false
}
},
methods: {
// 打开兑换窗口
openModal(row) {
this.visible = true;
this.getUsers(row)
this.getOptions()
this.disabled = row ? true : false
this.$nextTick(() => {
this.form = { ...this.form, ...row }
})
},
// 兑换人
getUsers(row) {
exchangeUser().then(res => {
console.log(res)
this.userList = res.data;
if (row && row.userName) {
res.data.forEach((item) => {
if (item.userName == row.userName) {
this.form.nikeName = item.nikeName;
this.form.gradeName = item.gradeName
}
})
}
})
},
handleUserChange(val) {
this.userList.forEach((item) => {
if (item.userName == val) {
this.form.nikeName = item.nikeName;
this.form.gradeName = item.gradeName
this.form.currentPoints = item.currentPoints
}
})
},
// 兑换商品列表
getOptions() {
pointsExchange().then(res => {
console.log(res)
this.optionList = res.data
})
},
handleConfirm() {
let { nikeName, userName, userGradeName, goodsCode } = this.form
let data = { nikeName, userName, userGradeName, goodsCode }
this.$refs.formRef.validate((valid) => {
if (valid) {
exchange(data).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess("兑换成功");
this.handleClose()
this.$emit('handleOk');
} else {
this.$modal.msgSuccess(res.msg || "兑换失败");
}
})
}
})
},
handleClose() {
this.form = {}
this.visible = false
}
}
}
</script>
<style lang="scss">
.dialog {
.el-dialog__body {
padding: 0 20px !important;
}
}
</style>
\ No newline at end of file
...@@ -2,14 +2,8 @@ ...@@ -2,14 +2,8 @@
<div class="app-container"> <div class="app-container">
<div class="page-container"> <div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="80px"> <el-form :model="queryParams" :inline="true" label-width="80px">
<el-form-item label="商品名称"> <el-form-item label="姓名">
<el-input v-model="queryParams.name" placeholder="请输入" style="width: 220px;"></el-input> <el-input v-model="queryParams.nikeName" placeholder="请输入" style="width: 220px;"></el-input>
</el-form-item>
<el-form-item label="商品状态">
<el-select v-model="queryParams.showStatus" placeholder="请选择" style="width: 220px;">
<el-option label="已上架" value="1"></el-option>
<el-option label="已下架" value="0"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" @click="handleQuery">查询</el-button>
...@@ -18,48 +12,39 @@ ...@@ -18,48 +12,39 @@
</el-form> </el-form>
<el-row class="mb10"> <el-row class="mb10">
<el-col :span="2"> <el-col :span="2">
<el-button type="primary" @click="handleAdd">新增商品</el-button> <el-button type="primary" @click="handleAdd">积分规则设置</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="tableList"> <el-table :data="tableList">
<el-table-column label="序号" width="55" type="index" align="center"></el-table-column> <el-table-column label="序号" width="55" type="index" align="center"></el-table-column>
<!-- <el-table-column label="商品ID" prop="name" align="center"></el-table-column> --> <el-table-column label="姓名" prop="nikeName" align="center"></el-table-column>
<el-table-column label="商品名称" prop="name" align="center"></el-table-column> <el-table-column label="帐号" prop="userName" align="center"></el-table-column>
<el-table-column label="商品图片" align="center"> <el-table-column label="部门" prop="deptName" align="center"></el-table-column>
<template #default="{ row }"> <el-table-column label="总积分" prop="accumulatedPoints" align="center"></el-table-column>
<el-image :src="row.imgsUrl" style="width: 40px;height: 40px;"></el-image> <el-table-column label="可用积分" prop="currentPoints" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column label="商品状态" prop="showStatus" align="center">
<template #default="{ row }">
<span v-if="row.showStatus == 0" style="color:#FF645F ;">已下架</span>
<span v-if="row.showStatus == 1" style="color:#007BFF ;">已上架</span>
</template>
</el-table-column>
<el-table-column label="兑换所需积分" prop="exchangePoints" align="center"></el-table-column>
<el-table-column label="商品参考价" prop="salesPrice" align="center"></el-table-column>
<el-table-column label="商品总数量" prop="stockNum" align="center"></el-table-column>
<el-table-column label="已兑换数量" prop="salesNum" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="text" @click="handleUpdate(row)">修改</el-button> <el-button type="text" @click="handleAddPoints(row)">增加</el-button>
<el-button type="text" @click="handleDelete(row)">删除</el-button> <el-button type="text" @click="handleDecreasePoints(row)">扣减</el-button>
<el-button type="text" @click="handleExchange(row)">兑换</el-button>
<el-button type="text" @click="handleDetail(row)">查看明细</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" /> :limit.sync="queryParams.pageSize" @pagination="getList" />
</div> </div>
<!-- 积分兑换 -->
<exchange-dialog ref="exchangeDialogRef" @handleOk="handleReset"></exchange-dialog>
<!-- 积分明细 -->
<detail-dialog ref="detailDialogRef"></detail-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listData, delData } from '@/api/pointsManage'; import { listData, delData, addData, editData } from '@/api/pointsManage';
import ExchangeDialog from './ExchangeDialog.vue';
import DetailDialog from './DetailDialog.vue';
export default { export default {
name: 'PointsMall', name: 'PointsMall',
data() { data() {
...@@ -72,7 +57,10 @@ export default { ...@@ -72,7 +57,10 @@ export default {
total: 0 total: 0
} }
}, },
components: {
ExchangeDialog,
DetailDialog
},
created() { created() {
}, },
...@@ -88,15 +76,66 @@ export default { ...@@ -88,15 +76,66 @@ export default {
this.total = res.total this.total = res.total
}) })
}, },
// 新增 //积分规则设置
handleAdd() { handleAdd() {
this.$refs.formDialogRef.openModal() this.$refs.formDialogRef.openModal()
}, },
// 修改 // 增加积分
handleUpdate(row) { handleAddPoints(row) {
this.$refs.formDialogRef.openModal(row) this.$prompt('增加积分', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '增加积分需大于0'
}).then(({ value }) => {
let data = {
userName: row.userName,
incrOrDecrPoints: value
}
addData(data).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess("增加积分成功");
this.getList()
} else {
this.$modal.msgError(res.msg || "增加积分失败");
}
})
}).catch(() => {
});
}, },
// 扣减积分
handleDecreasePoints(row) {
this.$prompt('扣减积分', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^[1-9]\d*$/,
inputErrorMessage: '扣减积分需大于0'
}).then(({ value }) => {
let data = {
userName: row.userName,
incrOrDecrPoints: value
}
editData(data).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess("扣减积分成功");
this.getList()
} else {
this.$modal.msgError(res.msg || "扣减积分失败");
}
})
}).catch(() => {
});
},
// 兑换
handleExchange(row) {
this.$refs.exchangeDialogRef.openModal(row)
},
// 积分明细
handleDetail(row) {
this.$refs.detailDialogRef.openModal(row)
},
// 删除 // 删除
handleDelete(row) { handleDelete(row) {
this.$modal.confirm('确认要删除商品名称为:' + row.name + '的数据吗?').then(function () { this.$modal.confirm('确认要删除商品名称为:' + row.name + '的数据吗?').then(function () {
......
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>
const CONFIG = {
//开发环境配置
development: {
debug: true,
platformName: '一站式轻享',
requestUrl: 'http://localhost:8080',
},
//生产环境配置
production: {
debug: false,
platformName: '一站式轻享',
requestUrl: 'http://dorm.tangguo.ren'
}
}
export default CONFIG[process.env.NODE_ENV];
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<script>
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></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
\ No newline at end of file
{
"name" : "一站式轻享",
"appid" : "__UNI__E3457E1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
}
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "轻享"
}
},
{
"path" : "pages/topics/topics",
"style" :
{
"navigationBarTitleText" : "话题"
}
},
{
"path" : "pages/mine/mine",
"style" :
{
"navigationBarTitleText" : "我的"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "一站式轻享",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom"
},
"uniIdRouter": {},
"tabBar": {
"color": "#999999",
"selectedColor": "#007BFF",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"height": "60px",
"fontSize": "14px",
"iconWidth": "24px",
"spacing": "3px",
"position": "bottom",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-active.png",
"text": "首页"
}, {
"pagePath": "pages/topics/topics",
"iconPath": "/static/images/tabbar/topic.png",
"selectedIconPath": "/static/images/tabbar/topic-active.png",
"text": "消息"
}, {
"pagePath": "pages/mine/mine",
"iconPath": "static/images/tabbar/mine.png",
"selectedIconPath": "static/images/tabbar/mine-active.png",
"text": "我的"
}]
}
}
<template>
<view class="page-container">
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
@import '@/static/styles/index.scss'
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
$color-main-blue: #007BFF;
$common-width:94vw;
@mixin scroll-view-container($height) {
height: $height;
}
// 页面通用样式
.page-container {
background-color: rgba(244, 244, 244, 1);
height: 100vh;
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
font-family: Arial;
}
// 话题容器样式
.topic-box-common {
height: 52rpx;
padding: 0 16rpx;
background-color: rgba(0, 123, 255, 0.1);
color: $color-main-blue;
}
.search-box-common{
height: 76rpx;
width: $common-width;
background-color: white;
margin: 20rpx auto;
border-radius: 12rpx;
display: flex;
align-items: center;
padding: 0 30rpx;
box-sizing: border-box;
.search-icon{
width: 36rpx;
height: 36rpx;
margin-right: 20rpx;
}
}
@import 'common.scss';
\ No newline at end of file
uni.addInterceptor({
returnValue (res) {
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (!res) return resolve(res)
return res[0] ? reject(res[0]) : resolve(res[1])
});
});
},
});
\ No newline at end of file
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16px;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
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