完成了商品的发布以及审核界面

This commit is contained in:
unknown 2019-05-30 23:07:00 +08:00
parent 95c2a4ba09
commit f19d69b8d5
18 changed files with 894 additions and 18 deletions

View File

@ -204,7 +204,7 @@ var fail = async(event) => {
sendId: event.userInfos._openid,
sendName: event.userInfos.userName,
result: "审核失败",
remarks: event.remarks + "注:您的商品信息已被删除,请重新发布。",
remarks: event.remarks + "\n注:您的商品信息已被删除,请重新发布。",
formId: event.formId,
}
}).then(res => {

View File

@ -84,6 +84,7 @@ var startExamine = async (event) => {
},
templateId: 'AhGvD5GBiM16D1dLnOxdUjTx0-NyID0HlbH904Lh8XM',
formId: event.formId2,
page:'components/examine/examine?'+'id='+event.examineId,
}).then(res => {
return {
errCode: 200,

View File

@ -96,7 +96,7 @@ var removeProduct = async(event) => {
}
}).catch(err => {
return {
errCode: 506,
errCode: 406,
errMsg: '商品信息取消收藏失败',
err: err,
};

10
databases/sM_examine.json Normal file
View File

@ -0,0 +1,10 @@
{
"userInfo":{"_id":"1669ff94-8f22-420e-8a88-28cceaaee0fa","userName":"英树君","userAvatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTI6MHJogb2JUAgbJtnTpPB6WAs0e0sVcfAGx3DJE7B9krHLLwpMQSgoOLMhdbYkIlZznAnNXffELA/132","userId":"ee3099285cc0247005d90def39a28f1b","viewNum":83.0,"price":35.0,"isfree":false,"isSall":false,"adds":"长理南区","title":"小台灯","details":"毕业了,用不到了故转出","tag":"生活","photos":["cloud://cloud-83621f.636c-cloud-83621f/cherryStore/宣传.PNG","cloud://cloud-83621f.636c-cloud-83621f/styleDay/question3.jpg"],"sorttime":1.557808392e+09,"time":"20180102 11:32","comment":[{"name":"英树","avatar":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTI6MHJogb2JUAgbJtnTpPB6WAs0e0sVcfAGx3DJE7B9krHLLwpMQSgoOLMhdbYkIlZznAnNXffELA/132","userid":"ee3099285cc0247005d90def39a28f1b","time":"2019-05-17 18:23:25","msg":"好厉害啊"}],"wantUser":[]},
"title":"小台灯",
"details":"毕业了,用不到了故转出",
"adds":"长理南区",
"tag":"生活",
"price":35.0,
"isfree":false,
"photos":["cloud://cloud-83621f.636c-cloud-83621f/cherryStore/宣传.PNG"]
}

View File

@ -0,0 +1 @@
{"_id":"1669ff94-8f22-420e-8a88-28cceaaee0fa","userName":"英树君","userAvatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTI6MHJogb2JUAgbJtnTpPB6WAs0e0sVcfAGx3DJE7B9krHLLwpMQSgoOLMhdbYkIlZznAnNXffELA/132","userId":"ee3099285cc0247005d90def39a28f1b","viewNum":83.0,"price":35.0,"isfree":false,"isSall":false,"adds":"长理南区","title":"小台灯","details":"毕业了,用不到了故转出","tag":"生活","photos":["cloud://cloud-83621f.636c-cloud-83621f/cherryStore/宣传.PNG","cloud://cloud-83621f.636c-cloud-83621f/styleDay/question3.jpg"],"sorttime":1.557808392e+09,"time":"20180102 11:32","comment":[{"name":"英树","avatar":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTI6MHJogb2JUAgbJtnTpPB6WAs0e0sVcfAGx3DJE7B9krHLLwpMQSgoOLMhdbYkIlZznAnNXffELA/132","userid":"ee3099285cc0247005d90def39a28f1b","time":"2019-05-17 18:23:25","msg":"好厉害啊"}],"wantUser":[]}

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,16 @@
//app.js
App({
onLaunch: function () {
wx.cloud.init({
traceUser: true,
})
wx.cloud.callFunction({
name: "sM_login"
}).then(res => {
wx.setStorageSync('userInfoDetail', res.result.userInfo[0])
}).catch(err => {
console.log(err)
})
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;

View File

@ -1,10 +1,10 @@
{
"pages": [
"components/createProj/createProj",
"components/homePage/homePage",
"components/examine/examine",
"components/sellerInfo/sellerInfo",
"components/details/details"
],
"window": {
"navigationBarBackgroundColor": "#39b54a",
@ -16,4 +16,4 @@
"usingComponents": {
"cu-custom": "/colorui/components/cu-custom"
}
}
}

View File

@ -0,0 +1,283 @@
// components/createProj/createProj.js
var App = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
title:null,
details:null,
adds:null,
tag:null,
price:null,
isfree:false,
imgList: [],
formId1:null,
formId2:null,
customBar:null,
showSubmit:false,
showError:false,
photos:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
customBar:App.globalData.CustomBar
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
ChooseImage() {
wx.chooseImage({
count: 1, //默认9
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
//上传图片
var that = this;
var userInfo = wx.getStorageSync('userInfoDetail')
let path = 'cherryStore/userImg/'+userInfo._id+'/'+(new Date()).getTime() + this.data.photos.length ;
wx.cloud.uploadFile({
cloudPath: path, // 上传至云端的路径
filePath: res.tempFilePaths[0], // 小程序临时文件路径
success: res => {
// 返回文件 ID
// console.log(res.fileID)
that.data.photos.push(res.fileID)
console.log(this.data.photos)
},
fail: console.error
})
if (this.data.imgList.length != 0) {
this.setData({
imgList: this.data.imgList.concat(res.tempFilePaths)
})
} else {
this.setData({
imgList: res.tempFilePaths
})
}
console.log(this.data.imgList)
}
});
},
ViewImage(e) {
wx.previewImage({
urls: this.data.imgList,
current: e.currentTarget.dataset.url
});
},
DelImg(e) {
var that = this;
wx.showModal({
title: '亲!',
content: '确定要删除这张照片吗?',
cancelText: '放弃',
confirmText: '删掉',
success: res => {
if (res.confirm) {
this.data.imgList.splice(e.currentTarget.dataset.index, 1);
this.setData({
imgList: this.data.imgList
})
var argument = this.data.photos[e.currentTarget.dataset.index]
var list = [];
list.push(argument)
this.data.photos.splice(e.currentTarget.dataset.index, 1);
wx.cloud.deleteFile({
fileList: list
}).then(res => {
// handle success
console.log(res.fileList)
}).catch(error => {
// handle error
})
}
}
})
},
input(e) {
// console.log(e.detail.value)
switch(e.target.dataset.inputtype){
case 1: //title
if(e.detail.value) this.data.title = e.detail.value;
else this.data.title = null;
break;
case 2: //detail
if(e.detail.value)
this.setData({
details:e.detail.value
})
else
this.setData({
details:null
})
break;
case 3: //price
if(e.detail.value) {
let judgePrice = isNaN(e.detail.value)
if(parseInt(e.detail.value)===0){
this.data.isfree = true;
this.data.price = 0;
} else if(judgePrice){
this.data.isfree = false;
this.data.price = null;
} else {
this.data.isfree = false;
this.data.price = parseInt(e.detail.value);
}
} else {
this.data.isfree = false;
this.data.price = null;
}
break;
case 4: //adds
if(e.detail.value) this.data.adds = e.detail.value;
else this.data.adds = null;
break;
case 5: //tag
if(e.target.dataset.tagtype === this.data.tag )
this.setData({
tag:null
})
else
this.setData({
tag: e.target.dataset.tagtype
})
break;
}
console.log(this.data)
},
submit (e) {
this.hideModal()
wx.showLoading({
title: '上传中',
})
this.data.formId2 = e.detail.formId;
var userInfo = wx.getStorageSync('userInfoDetail')
if(this.data.photos.length!== this.data.imgList.length) {
wx.showToast({
title: '请等待图片上传完成',
icon: 'none',
duration: 2000
})
return;
}
var d = this.data;
var data = {
stats:1,
userInfos:userInfo,
title:d.title,
details:d.details,
adds:d.adds,
tag:d.tag,
price:d.price,
isfree:d.isfree,
photos:d.photos,
formId1:d.formId1,
formId2:d.formId2,
}
console.log(data);
wx.cloud.callFunction({
name: 'sM_examine',
data: data
}).then(res => {
wx.hideLoading({})
if(res.result.errCode!==200) {
wx.showToast({
title: '错误码'+res.result.errCode,
icon: 'none',
duration: 2000
})
} else {
wx.showToast({
title: '成功',
icon: 'success',
duration: 2000
})
wx.redirectTo({
url: '../homePage/homePage'
})
}
}).catch(err => {
wx.hideLoading({})
console.log(err)
wx.showToast({
title: '错误请重试',
icon: 'none',
duration: 2000
})
})
},
judge(e) {
this.data.formId1 = e.detail.formId
let d = this.data
if(d.title&&d.details&&d.adds&&d.tag&&d.price!==null) {
this.setData({
showSubmit:true
})
} else {
this.setData({
showError:true
})
}
},
hideModal(e) {
this.setData({
showSubmit:false,
showError:false
})
},
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,114 @@
<!-- 导航栏 -->
<cu-custom isBack="{{true}}"style="color:#fff;z-index:20;" ><view slot="content" style="color:#fff;">发布宝贝</view></cu-custom>
<!-- background -->
<view class="bg" style="margin-top:{{customBar}}px;"></view>
<!-- titleBg -->
<view class="titleBg" style="height:{{customBar}}px; width:100%;"></view>
<!-- card -->
<view class="card">
<view class="icon-shop card-icon-1" style="font-size:80rpx;"></view>
<view class="card-title">主体信息</view>
<form >
<input type="text" placeholder="宝贝名" placeholder-style="color:#eda7a4;" bindinput="input" data-inputtype="{{1}}"></input>
<textarea show-confirm-bar="{{false}}" bindinput="input" data-inputtype="{{2}}">
<view wx:if="{{!details}}" class="placeholder">宝贝描述</view>
</textarea>
</form>
</view>
<!-- link -->
<view class="link-box">
<view class="link-item">
<view class="link-dote-top"></view>
<view class="link-line"></view>
<view class="link-dote-bottom"></view>
</view>
<view class="link-item">
<view class="link-dote-top"></view>
<view class="link-line"></view>
<view class="link-dote-bottom"></view>
</view>
</view>
<view class="card" style="padding-bottom:16rpx;">
<view class="icon-same card-icon-1" style="font-size:80rpx;"></view>
<view class="card-title">详细信息</view>
<form >
<input type="number" placeholder="定价可以填0赠与有缘人呦~" placeholder-style="color:#eda7a4;" bindinput="input" data-inputtype="{{3}}"></input>
<input type="text" placeholder="地址,例:南区二舍" placeholder-style="color:#eda7a4;" bindinput="input" data-inputtype="{{4}}"></input>
<view class="labal">类型(单选)</view>
<view class="tag-box">
<view class="tag {{tag=='图书'?'cur':''}}" bindtap="input" data-inputtype="{{5}}" data-tagtype="图书">图书</view>
<view class="tag {{tag=='电子'?'cur':''}}" bindtap="input" data-inputtype="{{5}}" data-tagtype="电子">电子</view>
<view class="tag {{tag=='体育'?'cur':''}}" bindtap="input" data-inputtype="{{5}}" data-tagtype="体育">体育</view>
<view class="tag {{tag=='乐器'?'cur':''}}" bindtap="input" data-inputtype="{{5}}" data-tagtype="乐器">乐器</view>
<view class="tag {{tag=='生活'?'cur':''}}" bindtap="input" data-inputtype="{{5}}" data-tagtype="生活">生活</view>
</view>
<view class="cu-bar bg-white margin-top">
<view class="action" style="color:#fa4639;">
图片上传
</view>
<view class="action" style="color:#fa4639;">
{{imgList.length}}/4
</view>
</view>
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view class="padding-xs bg-img" style="background-image:url({{imgList[index]}})" wx:for="{{imgList}}" wx:key="{{index}}" bindtap="ViewImage" data-url="{{imgList[index]}}">
<view class="cu-tag bg-red" catchtap="DelImg" data-index="{{index}}">
<text class="icon-close" style="color:#fff;"></text>
</view>
</view>
<!-- <view class="padding-xs" style="border:1px #e1effd solid;" bindtap="ChooseImage" wx:if="{{imgList.length<4}}"> -->
<view class="padding-xs" style="border:1px #fce2e1 solid;" bindtap="ChooseImage" wx:if="{{imgList.length<4}}">
<text class="icon-cameraadd" style="color:#fa4639;"></text>
</view>
</view>
</view>
</form>
</view>
<form bindsubmit='judge' report-submit='true'>         
<button class='submit' form-type='submit'>我填完了</button>       
</form>
<view class="cu-modal {{showSubmit?'show':''}}" style="z-index:10000;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">确认</view>
<view class="action" bindtap="hideModal">
<text class="icon-close text-red"></text>
</view>
</view>
<view class="padding-xl">
下一步将进入审核,是否确认提交
</view>
<view class="cu-bar bg-white justify-end">
<form class="action" report-submit='true' bindsubmit='submit'>
<button class="cu-btn cancel-button" bindtap="hideModal" >取消</button>
<button class="cu-btn confirm-button margin-left" form-type="submit">确定</button>
</form>
</view>
</view>
</view>
<view class="cu-modal {{showError?'show':''}}" style="z-index:10000;">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">错误</view>
<view class="action" bindtap="hideModal">
<text class="icon-close text-red"></text>
</view>
</view>
<view class="padding-xl">
除了图片每一项都是必填项,请检查。
</view>
<view class="cu-bar bg-white justify-end">
<form class="action" report-submit="{{true}}">
<button class="cu-btn confirm-button margin-left" bindtap="hideModal" form-type="submit">确定</button>
</form>
</view>
</view>
</view>

View File

@ -0,0 +1,222 @@
/* components/createProj/createProj.wxss */
.bg {
position: fixed;
top:0;
left:0;
z-index: -100;
/* background: linear-gradient(#449ffc, #72cfff); 标准的语法 */
background: linear-gradient(#fa4639, #ff7a70); /* 标准的语法 */
height:100%;
width:100%;
}
.titleBg {
/* background: #449ffc; */
background: #fa4639;
position: fixed;
top:0;
left:0;
z-index:19;
}
.card {
height: auto;
padding-bottom:70rpx;
width:90%;
margin: 0 auto;
margin-top:30rpx;
box-shadow: #fff 0 0 20rpx;
background:#fff;
border-radius: 15rpx;
}
.card-icon-1 {
/* color:#449ffc; */
color:#fc4d44;
text-align:center;
padding-top:30rpx;
}
.card-title {
/* color:#449ffc; */
color:#fc4d44;
font-size: 35rpx;
letter-spacing: 3rpx;
margin-top:15rpx;
text-align: center;
}
.card form {
}
.card form input, .card form textarea {
/* background: #f4f9ff; */
background: #fff5f5;
/* border: 1px #e1effd solid; */
border: 1px #fae2e1 solid;
width:90%;
margin: 0 auto;
border-radius: 5rpx;
height:80rpx;
margin-top: 30rpx;
padding: 0 15rpx;
/* color: #449ffc; */
color: #fc4d44;
font-size:30rpx;
position: relative;
}
.placeholder {
/* color:#a4c5ed; */
color:#eda7a4;
height: 30rpx;
font-size: 30rpx;
position: absolute;
top:10rpx;
left:15rpx;
}
.card form textarea {
height: 150rpx;
padding: 15rpx !important;
}
.link-box {
height:120rpx;
width:75%;
margin: 0 auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top:-40rpx;
margin-bottom:-70rpx;
}
.link-item {
height:120rpx;
width:40rpx;
position: relative;
}
.link-dote-top {
height:20rpx;
width:20rpx;
/* background: #b9d4f7; */
background: #f7bdba;
border-radius: 50%;
position: absolute;
top:0;
left:10rpx;
z-index:10;
}
.link-dote-bottom {
height:20rpx;
width:20rpx;
/* background: #b9d4f7; */
background: #f7bdba;
border-radius: 50%;
position: absolute;
bottom:0;
left:10rpx;
z-index:10;
}
.link-line {
height:100rpx;
width:10rpx;
position: absolute;
top:10rpx;
left:15rpx;
/* background: #e5eef9; */
background: #fae7e6;
z-index:11;
border-radius: 5rpx;
}
.labal {
color: #fc4d44;
/* color: #449ffc; */
width: 90%;
margin: 0 auto;
padding-top: 40rpx;
font-size: 30rpx;
}
.tag-box {
width:90%;
margin: 0 auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding-top:20rpx;
}
.tag-box .tag {
height: 50rpx;
width: 100rpx;
/* border: 1px #e1effd solid;
color:#a4c5ed;
background: #f4f9ff; */
border: 1px #fae5e3 solid;
color:#eba8a4;
background: #fff5f5;
line-height: 50rpx;
text-align: center;
}
.tag-box .cur {
/* background: #cce6ff !important; */
/* color: #0081ff; */
background: #ffcfcc !important;
color: #ff0f03;
border: none;
}
.submit {
width:90%;
height: 90rpx;
box-shadow: #fff 0 0 20rpx;
background:#fff;
border-radius: 15rpx;
/* color: #449ffc; */
color: #fa4639;
margin-top:30rpx;
margin-bottom:50rpx;
}
.cancel-button {
/* border: 1px #449ffc solid;
color: #449ffc; */
border: 1px #fa4639 solid;
color: #fa4639;
background-color: transparent !important;
}
.confirm-button {
/* background: #449ffc !important; */
background: #fa4639 !important;
color:#fff;
}
.card .cu-bar {
width: 90%;
margin: 0 auto;
}
.card .cu-bar .action:first-child {
margin-left:0;
}
.card .cu-bar .action:last-child {
margin-right:0;
}
.card .cu-form-group {
width:90%;
margin:0 auto;
padding:0;
}

View File

@ -218,6 +218,7 @@ Page({
} else { //添加
var isWant = true;
}
console.log(isWant)
wx.cloud.callFunction({
name: 'sM_want',
data: {

View File

@ -0,0 +1,146 @@
// components/examine/examine.js
Page({
/**
* 页面的初始数据
*/
data: {
list:null,
inputValue:null,
isShowModal:false,
submitType:null,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var examine_id = options.id
console.log(options)
console.log(examine_id);
console.log(typeof examine_id);
wx.cloud.init({
traceUser: true,
})
const db = wx.cloud.database();
db.collection('sM_examine').doc(examine_id).get().then(res => {
this.setData({
list: res.data
})
console.log(this.data.list)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
//点击查看图片详情
showPic(e) {
wx.previewImage({
current: e.currentTarget.dataset.url, // 当前显示图片的http链接
urls: [e.currentTarget.dataset.url] // 需要预览的图片http链接列表
})
},
//显示模态框
showModal(e) {
// console.log( e.currentTarget.dataset)
this.setData({
isShowModal:true,
inputValue:null,
submitType: e.currentTarget.dataset.submittype
})
},
//关闭模态框
hideModal(e) {
this.setData({
isShowModal:false
})
},
//输入触发事件
inputChange(e) {
this.data.inputValue = e.detail.value;
},
submit(e) {
console.log(e.detail.formId)
//审核结果
var proj = this.data.list;
if(this.data.submitType) {
var data = {
stats:2,
userInfos: proj.userInfo,
adds: proj.adds,
title: proj.title,
details: proj.details,
tag: proj.tag,
price: proj.price,
isfree:proj.isfree,
photos: proj.photos,
oldId: proj._id,
remarks: this.data.inputValue,
formId:e.detail.formId
}
} else {
var data = {
stats:3,
userInfos: proj.userInfo,
oldId:proj._id,
remarks: this.data.inputValue,
formId: e.detail.formId
}
}
wx.cloud.callFunction({
name: 'sM_examine',
data: data
}).then(res => {
wx.redirectTo({
url: '../homePage/homePage'
})
}).catch(err => {
console.log(err)
})
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,58 @@
<!--components/examine/examine.wxml-->
<!-- 导航栏 -->
<cu-custom bgColor='bg-gradual-red'><view slot="content">上线审核</view></cu-custom>
<!-- 详情 -->
<view class="main-page">
<view class="title-box">
<view class="title-box-left">
<image class="user-avatar" src="{{list.userInfo.avatarUrl}}"></image>
<view class="right-box">
<view class="user-name">{{list.userInfo.userName}}</view>
<view class="pro-create-time">{{list.time}}</view>
</view>
</view>
<view class="pro-price">¥{{list.price}}</view>
</view>
<view class="details-box">
<view class="pro-name">{{list.title}}</view>
<view class="pro-details">{{list.details}}</view>
</view>
<view class="pro-images-box" wx:for="{{list.photos}}" wx:key>
<image bindtap="showPic" data-url="{{item}}" show-menu-by-longpress="true" mode="widthFix" src="{{item}}" />
</view>
<view class="pro-tag">
<view class="padding-xs">
<view class="cu-tag bg-purple light">{{list.tag}}</view>
<view class="cu-tag bg-blue light">{{list.adds}}</view>
</view>
</view>
</view>
<view style="height:200rpx;"></view>
<!-- 评价栏 -->
<view class="examine-box">
<view class="pass" data-submitType="{{true}}" bindtap="showModal">审核通过</view>
<view class="fail" data-submitType="{{false}}" bindtap="showModal">不予通过</view>
</view>
<view class="cu-modal {{isShowModal?'show':''}} " catchtouchmove='stopPageScroll'>
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">回复内容</view>
<view class="action" bindtap="hideModal">
<text class="icon-close text-red"></text>
</view>
</view>
<view style="padding:0 20rpx;background:#fff;">
<textarea wx:if="{{isShowModal}}" class="input-box radius" show-confirm-bar="false" bindinput="inputChange" value="{{inputValue}}" focus="{{true}}"></textarea>
</view>
<view class="cu-bar bg-white justify-end">
<form bindsubmit="submit" report-submit='{{true}}' class="action">
<button class="cu-btn line-green text-green" bindtap="hideModal">取消</button>
<button form-type="submit" class="cu-btn bg-green margin-left" bindtap="hideModal">提交</button>
</form>
</view>
</view>
</view>

View File

@ -0,0 +1,35 @@
/* components/examine/examine.wxss */
@import "../details/details.wxss";
.examine-box {
position: fixed;
bottom:0;
width:100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 30rpx 20rpx;
height: 140rpx;
}
.examine-box .pass , .examine-box .fail{
color:#fff;
width: 45%;
height:100%;
border-radius: 50rpx;
line-height:80rpx;
text-align: center;
font-size: 35rpx;
letter-spacing: 4rpx;
}
.examine-box .pass {
background:#f37b1d;
box-shadow: #f37b1d 0 0 15rpx;
}
.examine-box .fail {
background:#e54d42;
box-shadow: #e54d42 0 0 15rpx;
}

View File

@ -50,19 +50,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
wx.cloud.init({
traceUser: true,
})
wx.cloud.callFunction({
name: "sM_login"
}).then(res => {
// console.log(res.result.userInfo[0])
this.data.userInfo = res.result.userInfo[0];
console.log(this.data.userInfo)
}).catch(err => {
console.log(err)
})
this.data.userInfo = wx.getStorageSync('userInfoDetail')
const db = wx.cloud.database();
db.collection('sM_productInfo').orderBy('time', 'asc').get().then(res => {
this.setData({