基于微信小程序的美容院管理系統(tǒng)設計與實現(xiàn)-設計與實現(xiàn)-計算機畢業(yè)設計源碼+LW文檔
小程序開發(fā)說明
開發(fā)語言:Java
框架:ssm
JDK版本:JDK1.8
服務器:tomcat7
數(shù)據(jù)庫:mysql 5.7(一定要5.7版本)
數(shù)據(jù)庫工具:Navicat11
開發(fā)軟件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
瀏覽器:谷歌瀏覽器
小程序框架:uniapp
小程序開發(fā)軟件:HBuilder X
小程序運行軟件:微信開發(fā)者
數(shù)據(jù)庫:
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client? ? ?= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `address` (
? `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
? `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創(chuàng)建時間',
? `userid` bigint(20) NOT NULL COMMENT '用戶id',
? `address` varchar(200) NOT NULL COMMENT '地址',
? `name` varchar(200) NOT NULL COMMENT '收貨人',
? `phone` varchar(200) NOT NULL COMMENT '電話',
? `isdefault` varchar(200) NOT NULL COMMENT '是否默認地址[是/否]',
? PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1647526986518 DEFAULT CHARSET=utf8 COMMENT='地址';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `address`
--
LOCK TABLES `address` WRITE;
/*!40000 ALTER TABLE `address` DISABLE KEYS */;
INSERT INTO `address` VALUES (1,'2022-03-17 14:18:36',11,'宇宙銀河系金星1號','金某','13823888881','是'),(2,'2022-03-17 14:18:36',12,'宇宙銀河系木星1號','木某','13823888882','是'),(3,'2022-03-17 14:18:36',13,'宇宙銀河系水星1號','水某','13823888883','是'),(4,'2022-03-17 14:18:36',14,'宇宙銀河系火星1號','火某','13823888884','是'),(5,'2022-03-17 14:18:36',15,'宇宙銀河系土星1號','土某','13823888885','是'),(6,'2022-03-17 14:18:36',16,'宇宙銀河系月球1號','月某','13823888886','是'),(1647526986517,'2022-03-17 14:23:05',1647526949400,'廣東省','小小','13613613666','否');
/*!40000 ALTER TABLE `address` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cart`
--
DROP TABLE IF EXISTS `cart`;
/*!40101 SET @saved_cs_client? ? ?= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cart` (
? `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
? `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創(chuàng)建時間',
? `tablename` varchar(200) DEFAULT 'chanpinxinxi' COMMENT '商品表名',
? `userid` bigint(20) NOT NULL COMMENT '用戶id',
? `goodid` bigint(20) NOT NULL COMMENT '商品id',
? `goodname` varchar(200) DEFAULT NULL COMMENT '商品名稱',
? `picture` varchar(200) DEFAULT NULL COMMENT '圖片',
? `buynumber` int(11) NOT NULL COMMENT '購買數(shù)量',
? `price` float DEFAULT NULL COMMENT '單價',
? `discountprice` float DEFAULT NULL COMMENT '會員價',
? PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1647526971517 DEFAULT CHARSET=utf8 COMMENT='購物車表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cart`
--
LOCK TABLES `cart` WRITE;
/*!40000 ALTER TABLE `cart` DISABLE KEYS */;
/*!40000 ALTER TABLE `cart` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chanpinfenlei`
--
DROP TABLE IF EXISTS `chanpinfenlei`;
/*!40101 SET @saved_cs_client? ? ?= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chanpinfenlei` (
? `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
? `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創(chuàng)建時間',
? `chanpinfenlei` varchar(200) NOT NULL COMMENT '產(chǎn)品分類',
? PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1647526872417 DEFAULT CHARSET=utf8 COMMENT='產(chǎn)品分類';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chanpinfenlei`
--
LOCK TABLES `chanpinfenlei` WRITE;
/*!40000 ALTER TABLE `chanpinfenlei` DISABLE KEYS */;
INSERT INTO `chanpinfenlei` VALUES (51,'2022-03-17 14:18:36','產(chǎn)品分類1'),(52,'2022-03-17 14:18:36','產(chǎn)品分類2'),(53,'2022-03-17 14:18:36','產(chǎn)品分類3'),(54,'2022-03-17 14:18:36','產(chǎn)品分類4'),(55,'2022-03-17 14:18:36','產(chǎn)品分類5'),(56,'2022-03-17 14:18:36','產(chǎn)品分類6'),(1647526872416,'2022-03-17 14:21:12','111');
/*!40000 ALTER TABLE `chanpinfenlei` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `chanpinfuwu`
--
DROP TABLE IF EXISTS `chanpinfuwu`;
/*!40101 SET @saved_cs_client? ? ?= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chanpinfuwu` (
? `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主鍵',
? `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創(chuàng)建時間',
? `fuwubianhao` varchar(200) DEFAULT NULL COMMENT '服務編號',
? `fuwumingcheng` varchar(200) DEFAULT NULL COMMENT '服務名稱',
? `fuwuleixing` varchar(200) DEFAULT NULL COMMENT '服務類型',
? `tupian` varchar(200) DEFAULT NULL COMMENT '圖片',
? `fuwuneirong` longtext COMMENT '服務內容',
? `fuwujieshao` longtext COMMENT '服務介紹',
? PRIMARY KEY (`id`),
? UNIQUE KEY `fuwubianhao` (`fuwubianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=1647526859650 DEFAULT CHARSET=utf8 COMMENT='產(chǎn)品服務';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `chanpinfuwu`
--
LOCK TABLES `chanpinfuwu` WRITE;
/*!40000 ALTER TABLE `chanpinfuwu` DISABLE KEYS */;
INSERT INTO `chanpinfuwu` VALUES (31,'2022-03-17 14:18:36','1111111111','服務名稱1','服務類型1','upload/chanpinfuwu_tupian1.jpg','服務內容1','服務介紹1'),(32,'2022-03-17 14:18:36','2222222222','服務名稱2','服務類型2','upload/chanpinfuwu_tupian2.jpg','服務內容2','服務介紹2'),(33,'2022-03-17 14:18:36','3333333333','服務名稱3','服務類型3','upload/chanpinfuwu_tupian3.jpg','服務內容3','服務介紹3'),(34,'2022-03-17 14:18:36','4444444444','服務名稱4','服務類型4','upload/chanpinfuwu_tupian4.jpg','服務內容4','服務介紹4'),(35,'2022-03-17 14:18:36','5555555555','服務名稱5','服務類型5','upload/chanpinfuwu_tupian5.jpg','服務內容5','服務介紹5'),(36,'2022-03-17 14:18:36','6666666666','服務名稱6','服務類型6','upload/chanpinfuwu_tupian6.jpg','服務內容6','服務介紹6'),(1647526859649,'2022-03-17 14:20:59','1647526796396','護膚','洗臉','upload/1647526847319.jpg','健美容產(chǎn)品所取代乃是化妝品的大勢所趨。二十世紀的化妝品市場將會是生物技術和基因技術的天下。美容化妝品市場在經(jīng)歷了礦物質,羊脂油,純植物,化工合成品這四代的演化發(fā)展...','<p><span style=\"background-color: rgb(255, 255, 255); color: rgb(51, 51, 51);\">健</span><span style=\"background-color: rgb(255, 255, 255); color: rgb(247, 49, 49);\">美容產(chǎn)品</span><span style=\"background-color: rgb(255, 255, 255); color: rgb(51, 51, 51);\">所取代乃是化妝品的大勢所趨。二十世紀的化妝品市場將會是生物技術和基因技術的天下。美容化妝品市場在經(jīng)歷了礦物質,羊脂油,純植物,化工合成品這四代的演化發(fā)展...</span></p>');
/*!40000 ALTER TABLE `chanpinfuwu` ENABLE KEYS */;
UNLOCK TABLES;
代碼:
export default {
data() {
return {
btnColor: ['#409eff','#67c23a','#909399','#e6a23c','#f56c6c','#356c6c','#351c6c','#f093a9','#a7c23a','#104eff','#10441f','#a21233','#503319'],
queryList:[
{
queryName:"服務名稱",
},
],
sactiveItem: {"padding":"0 28rpx","boxShadow":"0 0 0px rgba(0,0,0,.3)","margin":"0","borderColor":"rgba(255, 255, 255, 1)","backgroundColor":"rgba(124, 194, 247, 1)","color":"#fff","borderRadius":"0","borderWidth":"2rpx 0","width":"160rpx","lineHeight":"80rpx","fontSize":"28rpx","borderStyle":"solid"},
sitem: {"padding":"0 20rpx","boxShadow":"0 0 0px rgba(0,0,0,.3)","margin":"0","borderColor":"rgba(255, 255, 255, 1)","backgroundColor":"rgba(82, 142, 187, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"0","borderWidth":"2rpx 0","width":"160rpx","lineHeight":"80rpx","fontSize":"28rpx","borderStyle":"solid"},
queryIndex: 0,
list: [],
? ? ? ? ? ? ? ? userid: '',
mescroll: null, //mescroll實例對象
downOption: {
auto: false //是否在初始化后,自動執(zhí)行下拉回調callback; 默認true
},
upOption: {
noMoreSize: 5, //如果列表已無數(shù)據(jù),可設置列表的總數(shù)量要大于半頁才顯示無更多數(shù)據(jù);避免列表數(shù)據(jù)過少(比如只有一條數(shù)據(jù)),顯示無更多數(shù)據(jù)會不好看; 默認5
textNoMore: '~ 沒有更多了 ~',
},
hasNext: true,
searchForm:{},
CustomBar: '0'
};
},
computed: {
baseUrl() {
return this.$base.url;
}
},
async onShow() {
this.btnColor = this.btnColor.sort(()=> {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (0.5-Math.random());
? ? ? ? ? ? ? ? ? ? ? ? });
this.hasNext = true
// 重新加載數(shù)據(jù)
if (this.mescroll) this.mescroll.resetUpScroll()
},
onLoad(options) {
? ? ? ? ? ? if(options.userid) {
? ? ? ? ? ? ? ? this.userid=options.userid;
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? this.userid = "";
? ? ? ? ? ? }
this.hasNext = true
// 重新加載數(shù)據(jù)
if (this.mescroll) this.mescroll.resetUpScroll()
},
methods: {
//查詢條件切換
queryChange(e) {
this.queryIndex=e.detail.value;
this.searchForm.fuwumingcheng="";
},
//類別搜索
// mescroll組件初始化的回調,可獲取到mescroll對象
mescrollInit(mescroll) {
this.mescroll = mescroll;
},
/*下拉刷新的回調 */
downCallback(mescroll) {
this.hasNext = true
// 重置分頁參數(shù)頁數(shù)為1
mescroll.resetUpScroll()
},
/*上拉加載的回調: mescroll攜帶page的參數(shù), 其中num:當前頁 從1開始, size:每頁數(shù)據(jù)條數(shù),默認10 */
async upCallback(mescroll) {
let params = {
page: mescroll.num,
limit: mescroll.size
}
if(this.searchForm.fuwumingcheng){
params['fuwumingcheng'] = '%' + this.searchForm.fuwumingcheng + '%'
}
? ? ? ? ? ? ? ? let res = {}
? ? ? ? ? ? ? ? if(this.userid) {
? ? ? ? ? ? ? ? ? ? res = await this.$api.page(`yuyuexinxi`, params);
? ? ? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? ? ? res = await this.$api.list(`yuyuexinxi`, params);
? ? ? ? ? ? ? ? }
// 如果是第一頁數(shù)據(jù)置空
if (mescroll.num == 1) this.list = [];
this.list = this.list.concat(res.data.list);
if (res.data.list.length == 0) this.hasNext = false;
mescroll.endSuccess(mescroll.size, this.hasNext);
},
// 詳情
onDetailTap(item) {
? ? ? ? ? ? ? ? uni.setStorageSync("useridTag",this.userid);
this.$utils.jump(`./detail?id=${item.id}&userid=`+this.userid)
},
// 修改
onUpdateTap(id){
? ? ? ? ? ? ? ? uni.setStorageSync("useridTag",this.userid);
this.$utils.jump(`./add-or-update?id=${id}`)
},
// 添加
onAddTap(){
? ? ? ? ? ? ? ? uni.setStorageSync("useridTag",this.userid);
this.$utils.jump(`./add-or-update`)
},
onDeleteTap(id){
var _this = this;
uni.showModal({
title: '提示',
content: '是否確認刪除',
success: async function(res) {
if (res.confirm) {
await _this.$api.del('yuyuexinxi', JSON.stringify([id]));
_this.hasNext = true
// 重置分頁參數(shù)頁數(shù)為1
_this.mescroll.resetUpScroll()
}
}
});
},
// 搜索
async search(){
this.mescroll.num = 1
let searchForm = {
page: this.mescroll.num,
limit: this.mescroll.size
}
if(this.searchForm.fuwumingcheng){
searchForm['fuwumingcheng'] = '%' + this.searchForm.fuwumingcheng + '%'
}
? ? ? ? ? ? ? ? let res = {};
? ? ? ? ? ? ? ? if(this.userid) {
? ? ? ? ? ? ? ? ? ? res = await this.$api.page(`yuyuexinxi`, searchForm);
? ? ? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? ? ? res = await this.$api.list(`yuyuexinxi`, searchForm);
? ? ? ? ? ? ? ? }
// 如果是第一頁數(shù)據(jù)置空
if (this.mescroll.num == 1) this.list = [];
this.list = this.list.concat(res.data.list);
if (res.data.list.length == 0) this.hasNext = false;
this.mescroll.endSuccess(this.mescroll.size, this.hasNext);
}
}
};


