厨房秤修改
This commit is contained in:
parent
f6854d8db6
commit
d038254e82
|
|
@ -205,10 +205,21 @@ page {
|
|||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
height: calc(100vh - 70px);
|
||||
|
||||
.name {
|
||||
padding-left: 15px;
|
||||
white-space: nowrap;
|
||||
overflow-x: auto;
|
||||
width: 160rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.name::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
|
@ -250,7 +261,6 @@ page {
|
|||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
image {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,563 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="table" v-if="isConnection == 0">称重中,请将食物放到秤上</view>
|
||||
<view class="table" v-if="isConnection == 1" @click="openBluetoothAdapter">连接失败,点击重新连接</view>
|
||||
<view class="image" v-if="isConnection != 3">
|
||||
<image src="../static/cheng.png"></image>
|
||||
</view>
|
||||
<view v-if="isConnection == 3">
|
||||
<view class="weight">
|
||||
<view>重量<text>{{weight}}</text>{{dw}}</view>
|
||||
<view>热量<text>{{kcal}}</text>千卡</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
注:重新称重可更新当前数据
|
||||
</view>
|
||||
<view class="groupbtn" v-if="weightType!=2">
|
||||
<view class="btn" @click="handleDetailSub">完成</view>
|
||||
<view class="btn" @click="handleDetailNext" v-if="!stopblue">下一位</view>
|
||||
</view>
|
||||
<view class="btn" @click="handlesub" v-if="weightType==2">确认添加</view>
|
||||
</view>
|
||||
<view class="tips" v-if="isConnection == 1">
|
||||
<uni-icons type="info-filled" color="#dd524d" size="20"></uni-icons>
|
||||
请确定设备是开机状态、手机蓝牙权限已打开!
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
let myTime
|
||||
let nextCnt = 0
|
||||
const plugin = requirePlugin("sdkPlugin").AiLink;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dw: "g",
|
||||
kcal: "",
|
||||
weight: "",
|
||||
weightALL: "",
|
||||
unit: '',
|
||||
weight0: 0,
|
||||
stopblue: false,
|
||||
isConnection: 0, //是否连接成功
|
||||
units: ['kg', '斤', 'st:lb', 'lb', 'g', 'ml', 'Waterml',
|
||||
'milkml', 'oz', 'floz', 'lboz'
|
||||
]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
weightKcal: {
|
||||
type: Number,
|
||||
default: 0 //当前称重食物每100g含的kcal
|
||||
},
|
||||
weightType: {
|
||||
type: Number,
|
||||
default: -1 //0分类称重,1累计称重,2购物车称重
|
||||
},
|
||||
isLast: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", 'isConnected', "isBluetoothTyle"]),
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
console.log("mounted_new", that.weightType)
|
||||
that.openBluetoothAdapter()
|
||||
that.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
this.isConnection = 1
|
||||
this.closeBLEConnection()
|
||||
this.closeBluetoothAdapter()
|
||||
},
|
||||
watch: {
|
||||
// weightType: function() {
|
||||
// let that = this
|
||||
// that.openBluetoothAdapter()
|
||||
// },
|
||||
isBluetoothTyle: function() {
|
||||
let that = this
|
||||
if (!that.isBluetoothTyle) {
|
||||
that.handleBack()
|
||||
}
|
||||
},
|
||||
isLast: function() {
|
||||
let that = this
|
||||
that.stopblue = that.isLast
|
||||
console.log("最后", this.isLast)
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化蓝牙
|
||||
openBluetoothAdapter() {
|
||||
let that = this
|
||||
that.weight = ""
|
||||
that.kcal = ""
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.isConnection = 0
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {
|
||||
that.isConnection = 1
|
||||
console.log('openBluetoothAdapter', e)
|
||||
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
|
||||
}
|
||||
});
|
||||
},
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
startBluetoothDeviceDiscovery() {
|
||||
let that = this
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: true,
|
||||
services: [
|
||||
// "F0A0",
|
||||
// "A5FE"
|
||||
],
|
||||
success: res => {
|
||||
that.isConnection = 0
|
||||
that.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
that.isConnection = 1
|
||||
console.log('startBluetoothDeviceDiscovery', res)
|
||||
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
|
||||
}
|
||||
});
|
||||
},
|
||||
// 监听蓝牙连接状态
|
||||
onBLEConnectionStateChange() {
|
||||
let that = this
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("监听蓝牙连接状态", res.connected)
|
||||
if (!res.connected) {
|
||||
that.isConnection = 1
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
}
|
||||
that.$store.commit("changeConnected", res.connected);
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
stopBluetoothDevicesDiscovery() {
|
||||
uni.stopBluetoothDevicesDiscovery({
|
||||
success: e => {
|
||||
console.log("停止搜索蓝牙设备", e)
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 发现外围设备
|
||||
*/
|
||||
onBluetoothDeviceFound() {
|
||||
var that = this;
|
||||
that.isConnection = 0
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
res.devices.forEach(device => {
|
||||
device.advertisData = device.advertisData ? device.advertisData : ''
|
||||
device.advertisServiceUUIDs = device.advertisServiceUUIDs ? device.advertisServiceUUIDs : ""
|
||||
let value = that.$tools.ab2hex(device.advertisData, "")
|
||||
let id = value.substring(0, 4)
|
||||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf("EL") !== -1 && device.advertisServiceUUIDs != '') {
|
||||
that.isConnection = 3
|
||||
let value = that.$tools.ab2hex(device.advertisData)
|
||||
let parseDataRes = plugin.parseBroadcastData(device.advertisData)
|
||||
let analyzeData = plugin.analyzeBroadcastScaleData(parseDataRes)
|
||||
let analyzeDataText = analyzeData.text
|
||||
let data = analyzeData.data
|
||||
if (parseDataRes.status == 1) {
|
||||
let data0 = parseDataRes.payload
|
||||
let data = parseInt(data0[3]).toString(16)
|
||||
console.log('data:' + data)
|
||||
let data1 = parseInt(data0[4]).toString(16)
|
||||
let data2 = parseInt((data + data1), 16) //重量
|
||||
//
|
||||
let unit0 = parseInt(data0[5]).toString(16) //单位小数点
|
||||
let unit = unit0.length > 1 ? unit0.substring(1, 2) : unit0 //单位
|
||||
let num = parseInt(unit0.substring(0, 1), 16).toString(8)
|
||||
let dot = num.toString().substring(0, 1) //小数点
|
||||
let zfz = 0 //正负值
|
||||
if (num.toString().length > 1) {
|
||||
dot = num.toString().substring(1, 2)
|
||||
zfz = num.toString().substring(0, 1)
|
||||
}
|
||||
if(unit == '0') {
|
||||
that.dw = 'g'
|
||||
}
|
||||
if (unit == "7") {
|
||||
that.dw = "ml"
|
||||
}
|
||||
if (unit == "3") {
|
||||
that.dw = "oz"
|
||||
}
|
||||
if (unit == "2") {
|
||||
that.dw = "lb'oz"
|
||||
}
|
||||
|
||||
if (dot == "1") {
|
||||
data2 = data2 / 10
|
||||
}
|
||||
if (dot == "2") {
|
||||
data2 = data2 / 100
|
||||
}
|
||||
if (zfz == "0") {
|
||||
data2 = data2
|
||||
}
|
||||
if (zfz == "1") {
|
||||
data2 = "-" + data2
|
||||
}
|
||||
that.weight = data2
|
||||
that.kcal = (Number(that.weightKcal) / 100 * data2).toFixed(2)
|
||||
console.log("analyzeData", data.weight, data2)
|
||||
}
|
||||
}else if(device.name.indexOf('Chipsea-BLE') != -1 || device.localName.indexOf('Chipsea-BLE') != -1 || id == 'a5fe') {
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.connectDevice(device.deviceId)
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//连接设备
|
||||
async connectDevice(device_id) {
|
||||
let that = this;
|
||||
uni.createBLEConnection({
|
||||
deviceId: device_id,
|
||||
success: res => {
|
||||
setTimeout(function() {
|
||||
that.getBLEDeviceServices(device_id)
|
||||
}, 200)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("设备连接失败,请重新连接", res);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取设备的UUID
|
||||
*/
|
||||
getBLEDeviceServices(device_id) {
|
||||
let serviceList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceServices({
|
||||
deviceId: device_id,
|
||||
success: res => {
|
||||
console.log("获取设备的UUID成功", res)
|
||||
serviceList = res.services;
|
||||
for (let i = 0; i < serviceList.length; i++) {
|
||||
let service = serviceList[i];
|
||||
if (service.uuid.indexOf("FFF0") != -1) {
|
||||
that.getBLEDeviceCharacteristics(device_id, service.uuid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取设备的UUID失败:', res)
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取指定服务的特征值
|
||||
*/
|
||||
getBLEDeviceCharacteristics(deviceId, serviceId) {
|
||||
let characteristicsList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceCharacteristics({
|
||||
deviceId: deviceId,
|
||||
serviceId: serviceId,
|
||||
success: res => {
|
||||
console.log("服务的特征值成功", res)
|
||||
let write, notify
|
||||
for (let i = 0; i < res.characteristics.length; i++) {
|
||||
let item = res.characteristics[i];
|
||||
if (item.uuid.indexOf('0000FFF2') != -1) {
|
||||
write = item.uuid
|
||||
} else if (item.uuid.indexOf('0000FFF1') != -1) {
|
||||
notify = item.uuid
|
||||
}
|
||||
}
|
||||
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: deviceId,
|
||||
serviceId: serviceId,
|
||||
characteristicId: notify,
|
||||
state: true,
|
||||
success: () => {
|
||||
that.isConnection = 3
|
||||
that.$emit('connect_success')
|
||||
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
const value = res.value
|
||||
const dataView = new DataView(value)
|
||||
const header = dataView.getUint8(0)
|
||||
|
||||
// MCU主动上报数据
|
||||
if (header === 0xC7) {
|
||||
const cmd = dataView.getUint8(2)
|
||||
|
||||
switch (cmd) {
|
||||
case 0x02:
|
||||
that.parseWeightData(dataView)
|
||||
break
|
||||
|
||||
case 0x03:
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
})
|
||||
},
|
||||
parseWeightData(dataView) {
|
||||
const statusByte = dataView.getUint8(4)
|
||||
const isNegative = !!(statusByte & 0x80) // 最高位表示正负
|
||||
const statusType = statusByte & 0x0F // 状态类型
|
||||
|
||||
// 组合24位重量值 (大端序)
|
||||
const weightValue =
|
||||
(dataView.getUint8(5) << 16) |
|
||||
(dataView.getUint8(6) << 8) |
|
||||
dataView.getUint8(7)
|
||||
|
||||
// 精度和单位
|
||||
const unitByte = dataView.getUint8(8)
|
||||
const precision = (unitByte & 0xF0) >> 4 // 高4位精度
|
||||
const unitIndex = unitByte & 0x0F // 低4位单位
|
||||
|
||||
// 计算实际重量
|
||||
let finalWeight = weightValue / Math.pow(10, precision)
|
||||
if (isNegative) finalWeight = -finalWeight
|
||||
|
||||
// 更新状态
|
||||
this.weight = finalWeight
|
||||
this.dw = this.units[unitIndex] || 'g'
|
||||
this.kcal = (Number(this.weightKcal) / 100 * finalWeight).toFixed(2)
|
||||
// console.log('重量:' + finalWeight)
|
||||
// console.log('单位:' + this.unit)
|
||||
|
||||
// 状态处理
|
||||
// if (statusType === 0x02) {
|
||||
// this.$emit('handleBle', finalWeight,this.unit,0)
|
||||
// }
|
||||
},
|
||||
// 保存测量结果
|
||||
handlesub() {
|
||||
let that = this
|
||||
console.log("weight", that.weight)
|
||||
if (Number(that.weight) > 0) {
|
||||
that.$emit("handleBle", that.weight, that.dw, that.kcal)
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新称重!")
|
||||
}
|
||||
|
||||
},
|
||||
// 备料完成
|
||||
handleDetailSub() {
|
||||
let that = this
|
||||
if (that.weightType == 1) { //累计称重
|
||||
that.weight0 = Number(that.weight) - Number(that.weightALL)
|
||||
that.weightALL = that.weight
|
||||
} else {
|
||||
that.weight0 = that.weight
|
||||
}
|
||||
if (Number(that.weight0) > 0) {
|
||||
that.$emit("handleDetailSub", that.weight0, that.dw, that.kcal)
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
that.weight = 0
|
||||
that.weight0 = 0
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新称重!")
|
||||
}
|
||||
},
|
||||
//备料下一个
|
||||
handleDetailNext() {
|
||||
let that = this
|
||||
if (that.weightType == 1) {
|
||||
console.log('weight:' + that.weight)
|
||||
console.log('weight0:' + that.weight0)
|
||||
console.log('weightALL:' + that.weightALL)
|
||||
that.weight0 = Number(that.weight) - Number(that.weightALL)
|
||||
that.weightALL = that.weight
|
||||
} else {
|
||||
that.weight0 = that.weight
|
||||
}
|
||||
if (Number(that.weight0) > 0) {
|
||||
that.$emit("handleDetailNext", that.weight0, that.dw, that.kcal)
|
||||
that.weight = 0
|
||||
that.weight0 = 0
|
||||
} else {
|
||||
that.$tools.msg("数据异常,请清零后重新称重!")
|
||||
}
|
||||
},
|
||||
|
||||
handleBack() {
|
||||
let that = this
|
||||
that.isConnection = 1
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
closeBluetoothAdapter() {
|
||||
let that = this;
|
||||
uni.closeBluetoothAdapter({
|
||||
success: res => {
|
||||
console.log('蓝牙模块关闭成功');
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙连接
|
||||
*/
|
||||
closeBLEConnection() {
|
||||
var that = this;
|
||||
uni.closeBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log('断开蓝牙连接成功');
|
||||
}
|
||||
});
|
||||
},
|
||||
// isNutritionScale(advertisData) {
|
||||
// const buffer = this.base64ToArrayBuffer(advertisData)
|
||||
// const dataView = new DataView(buffer)
|
||||
|
||||
// // 检查厂商自定义数据头
|
||||
// if (dataView.getUint16(0) !== 0xA5FE) return false
|
||||
|
||||
// // 检查产品类型 (营养秤:0x0001)
|
||||
// const typeId = dataView.getUint16(2)
|
||||
// if (typeId !== 0x0001) return false
|
||||
|
||||
// // 检查厂商ID (通用方案:0x0001)
|
||||
// const vendorId = dataView.getUint16(4)
|
||||
// return vendorId === 0x0001
|
||||
// },
|
||||
// base64ToArrayBuffer(base64) {
|
||||
// const str = atob(base64)
|
||||
// const buffer = new ArrayBuffer(str.length)
|
||||
// const view = new Uint8Array(buffer)
|
||||
// for (let i = 0; i < str.length; i++) {
|
||||
// view[i] = str.charCodeAt(i)
|
||||
// }
|
||||
// return buffer
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.weightPages {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
justify-content: space-around;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 20px;
|
||||
top: 60px;
|
||||
margin-top: 20px;
|
||||
|
||||
.weight {
|
||||
background: #fff;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
flex-wrap: wrap;
|
||||
text-align: center;
|
||||
|
||||
view {
|
||||
width: 60%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
margin-left: 25%;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 15px;
|
||||
|
||||
text {
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
margin: 0 10px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #f0ae43;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #fff;
|
||||
width: 80%;
|
||||
margin-left: 10%
|
||||
}
|
||||
|
||||
.groupbtn {
|
||||
.btn {
|
||||
color: #000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
margin: auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-bottom: 15px;
|
||||
margin-left: 15px;
|
||||
display: flex;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<template>
|
||||
<!-- 搜索 -->
|
||||
<view class="FoodWrap">
|
||||
<scroll-view class="food-list" scroll-y="true" @scrolltolower="onScrollToLower">
|
||||
<view class="food-item" v-for="(item,index) in foodList" :key="index" @click="onSelect(item)">
|
||||
<image :src="item.pic_url" mode="aspectFill"></image>
|
||||
<view class="food-info">
|
||||
<text class="name">{{item.name}}</text>
|
||||
<text class="kcal">{{item.kcal}}Kcal/100g</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "FoodItem",
|
||||
props: ['foodList'],
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onScrollToLower() {
|
||||
this.$emit('scroll')
|
||||
},
|
||||
onSelect(item) {
|
||||
this.$emit('select',item)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.FoodWrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.food-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
.food-item {
|
||||
display: flex;
|
||||
width: 96%;
|
||||
padding: 10rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 2%;
|
||||
box-sizing: border-box;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0 0 20rpx #e1e1e1;
|
||||
image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.food-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 20rpx;
|
||||
padding: 10rpx 0;
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.kcal {
|
||||
font-size: 24rpx;
|
||||
color: #555;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -5,6 +5,10 @@
|
|||
<view class="searchInput">
|
||||
<input placeholder="请输入..." class="city-serach-input" v-model="name" />
|
||||
<icon v-if="name" class="iconfont icon-error" @click="handlecolse"></icon>
|
||||
<view class="voice" v-if="voice && !name">
|
||||
<uni-icons class="mic" type="mic-filled" size="26" @click="onMic"></uni-icons>
|
||||
<uni-icons class="camera" type="camera-filled" size="26" @click="onCamera"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="searchBtn">
|
||||
<view @click="handleSerach">搜索</view>
|
||||
|
|
@ -16,12 +20,22 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "search",
|
||||
props: {
|
||||
voice: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
name: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
searchByName(name) {
|
||||
this.name = name
|
||||
this.$emit("handleSearch", this.name)
|
||||
},
|
||||
// 搜索
|
||||
handleSerach() {
|
||||
this.$emit("handleSearch", this.name)
|
||||
|
|
@ -30,6 +44,18 @@
|
|||
handlecolse() {
|
||||
this.name = ""
|
||||
this.$emit("handleSearch", "")
|
||||
},
|
||||
//跳转搜索页面
|
||||
onFocus() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/search/search'
|
||||
})
|
||||
},
|
||||
onMic() {
|
||||
this.$emit("mic")
|
||||
},
|
||||
onCamera() {
|
||||
this.$emit("camera")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,6 +92,21 @@
|
|||
display: flex;
|
||||
z-index: 99999;
|
||||
}
|
||||
.voice {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 150rpx;
|
||||
display: flex;
|
||||
z-index: 99999;
|
||||
.mic {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
<template>
|
||||
<!-- 搜索 -->
|
||||
<view class="serachBox">
|
||||
<view class="serach-box">
|
||||
<view class="searchInput">
|
||||
<div class="search-wrap" @click="handleSearch">
|
||||
<text>搜索食材...</text>
|
||||
</div>
|
||||
</view>
|
||||
<view class="searchBtn">
|
||||
<view @click="handleSearch">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "search",
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/search/search'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.serachBox {
|
||||
height: 40px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0 15px 10px;
|
||||
z-index: 99;
|
||||
background-color: #efefef;
|
||||
|
||||
.serach-box {
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
|
||||
.search-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
font-size: 30rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.searchInput {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 60px;
|
||||
height: 40px;
|
||||
|
||||
icon {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
display: flex;
|
||||
z-index: 99999;
|
||||
}
|
||||
}
|
||||
|
||||
.searchBtn {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
right: 0px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: $maincolor;
|
||||
border-radius: 0 10px 10px 0;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
"name" : "kitchendDevice",
|
||||
"appid" : "__UNI__2494015",
|
||||
"appid" : "__UNI__9A0614A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
"sassImplementationName" : "node-sass",
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
|
@ -65,8 +66,12 @@
|
|||
"plugins" : {
|
||||
"sdkPlugin" : {
|
||||
//这里是引用的插件名称 地图路线规划
|
||||
"version" : "2.3.4", //插件版本
|
||||
"version" : "2.4.0", //插件版本
|
||||
"provider" : "wx17e93aad47cdae1a" //插件appid
|
||||
},
|
||||
"WechatSI" : {
|
||||
"version" : "0.3.6",
|
||||
"provider" : "wx069ba97219f66d99"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<!-- 搜索 -->
|
||||
<search @handleSearch="handleSearch"></search>
|
||||
<search ref="search" :voice="true" @handleSearch="handleSearch" @mic="onShowSearchType(1)" @camera="onShowSearchType(2)"></search>
|
||||
|
||||
<view class="box menu">
|
||||
<!-- 头部1级菜单栏 -->
|
||||
|
|
@ -22,12 +22,17 @@
|
|||
|
||||
<!-- 右侧商品 -->
|
||||
<view class="right">
|
||||
<view class="right_list">
|
||||
<!-- <view class="right_list">
|
||||
<view class="list mt-20">
|
||||
<view class="item" v-for="(it,id) in menu3" :key="id" @click="handleDetail(it)">
|
||||
<text>{{it.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<food-item :foodList="menu3" @scroll="onScrollBottom" @select="handleDetail"></food-item>
|
||||
<view v-if="!menu3.length" class="nolist">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有数据哦!</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -61,6 +66,15 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 语音拍照 -->
|
||||
<!-- <view class="voice-photo-wrap">
|
||||
<view class="voice" @click="onShowSearchType(1)">
|
||||
<div class="voice-icon"></div>
|
||||
</view>
|
||||
<view class="photo" @click="onShowSearchType(2)">
|
||||
<div class="photo-icon"></div>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 称重区 -->
|
||||
<view class="wrapper" v-if="IsWeight">
|
||||
<view class="bg" @click='IsWeight=false'>
|
||||
|
|
@ -116,10 +130,14 @@
|
|||
</view>
|
||||
</view>
|
||||
<!--蓝牙连接区 -->
|
||||
<view class="wrapper" v-if="isBle">
|
||||
<view class="wrapper" v-show="isBle">
|
||||
<view class="bg" @click='isBle=false'>
|
||||
<view class="box" @click.stop>
|
||||
<view class="title">
|
||||
<view class="weight" style="width: 242rpx;" @click="handleMannulWeight()">
|
||||
<icon class="iconfont icon-lianjie"></icon>
|
||||
手动称重
|
||||
</view>
|
||||
<view class="name">{{activeType.name}}</view>
|
||||
<icon class="iconfont icon-error" @click='isBle=false'></icon>
|
||||
</view>
|
||||
|
|
@ -127,6 +145,21 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="auto-search-dialog" v-if="showAutoSearchDlg">
|
||||
<view class="auto-search-inner">
|
||||
<text>{{autoSearchContent != '' ? `识别到你描述的食材为“${autoSearchContent}”,是否查找食材“${autoSearchContent}”` : "长安麦克风图标开始说话,松开后结束"}}</text>
|
||||
<view class="mic-icon" :style="{'border-color':mic_touch ? '#18bc37' : '#777777'}"
|
||||
@touchstart="onVoiceTouchStart" @touchend="onVoiceTouchEnd"
|
||||
v-if=" autoSearchType == 1 && autoSearchContent == ''">
|
||||
<uni-icons type="mic-filled" size="80" :color="mic_touch ? '#18bc37' : '#777777'"></uni-icons>
|
||||
</view>
|
||||
<view class="btn-wrap" v-else>
|
||||
<view class="retry" @click="retrySearch">重试</view>
|
||||
<view class="confirm" @click="handleVoiceSearch(autoSearchContent)">确定</view>
|
||||
</view>
|
||||
<uni-icons class="close" type="close" color="#ffffff" size="45" @click="showAutoSearchDlg=false"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -135,13 +168,16 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let myTime
|
||||
const plugin = requirePlugin("sdkPlugin").AiLink;
|
||||
// const plugin = requirePlugin("sdkPlugin").AiLink;
|
||||
import search from "../../components/search.vue"
|
||||
import blueTooth from "../../components/bluetooth.vue"
|
||||
import blueTooth from "../../components/bluetooth_new.vue"
|
||||
import FoodItem from "../../components/food_item.vue"
|
||||
const plugin = requirePlugin("WechatSI")
|
||||
export default {
|
||||
components: {
|
||||
search,
|
||||
blueTooth
|
||||
blueTooth,
|
||||
FoodItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -163,14 +199,25 @@
|
|||
kcal: "",
|
||||
weight: "",
|
||||
stopblue: true,
|
||||
page: 1,
|
||||
loading: false,
|
||||
autoSearchType: 1, //搜索类型,1:语音识别 2:图像识别
|
||||
voiceManager: null,
|
||||
autoSearchContent: '',
|
||||
isConnection: 0, //是否连接成功
|
||||
showAutoSearchDlg: false,
|
||||
mic_touch: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", 'isConnected', "isBluetoothTyle", 'foodList']),
|
||||
menuTop() {
|
||||
this.menu2 = this.foodList.length ? this.foodList[0].list : []
|
||||
return this.foodList
|
||||
return [...this.foodList, {
|
||||
id: 4,
|
||||
list: [],
|
||||
name: '搜索'
|
||||
}]
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -179,23 +226,21 @@
|
|||
that.typeind = options.ind
|
||||
that.handleHomeInfo()
|
||||
},
|
||||
onReachBottom() {
|
||||
mounted() {
|
||||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
that.voiceManager = plugin.getRecordRecognitionManager()
|
||||
that.voiceManager.onStop = function(res) {
|
||||
that.autoSearchContent = res.result.replace('。', '')
|
||||
}
|
||||
this.page++
|
||||
if (that.menu2.length) {
|
||||
that.handleHomeInfo()
|
||||
that.voiceManager.onError = function(res) {
|
||||
console.error("error msg", res.retcode)
|
||||
}
|
||||
that.voiceManager.stop()
|
||||
},
|
||||
methods: {
|
||||
handleHomeInfo() {
|
||||
let that = this
|
||||
that.loading = true
|
||||
that.$model.getCookFoodList({
|
||||
food_level2_id: that.menu2[that.leftInd].id,
|
||||
page: that.page,
|
||||
|
|
@ -203,6 +248,7 @@
|
|||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.lastPage = res.data.page_total
|
||||
that.loading = false
|
||||
that.menu3 = that.menu3.concat(res.data.content_list)
|
||||
})
|
||||
},
|
||||
|
|
@ -226,27 +272,45 @@
|
|||
that.page = 1
|
||||
that.handleHomeInfo()
|
||||
},
|
||||
onScrollBottom() {
|
||||
let that = this
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.page++
|
||||
if (that.menu2.length) {
|
||||
that.handleHomeInfo()
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
handleSearch(name) {
|
||||
let that = this
|
||||
let list = []
|
||||
if (name != "") {
|
||||
that.searchResults = []
|
||||
that.menu.forEach((item, index) => {
|
||||
item.list.forEach((ite, ind) => {
|
||||
ite.list.forEach((it, id) => {
|
||||
if (it.name.indexOf(name) !== -1) {
|
||||
that.searchResults.push(it)
|
||||
that.$model.getFoodSearch({
|
||||
food_name: name
|
||||
}).then(res => {
|
||||
if (res.code != 0) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
that.index = 3
|
||||
that.menu2 = []
|
||||
that.menu3 = res.data
|
||||
})
|
||||
})
|
||||
})
|
||||
that.index = that.menu.findIndex(ite => ite.id == that.searchResults[0].one_id)
|
||||
console.log("arr", that.searchResults, )
|
||||
} else {
|
||||
that.index = 0
|
||||
that.searchResults = []
|
||||
},
|
||||
handleVoiceSearch() {
|
||||
let that = this
|
||||
if (that.autoSearchContent != '') {
|
||||
that.$refs.search.searchByName(that.autoSearchContent)
|
||||
that.showAutoSearchDlg = false
|
||||
that.autoSearchContent = ''
|
||||
}
|
||||
},
|
||||
// 商品选择
|
||||
|
|
@ -255,13 +319,18 @@
|
|||
that.myvalue = []
|
||||
that.activeType = ite
|
||||
that.activeType.weight = 100
|
||||
that.IsWeight = true
|
||||
// that.IsWeight = true
|
||||
that.weightKcal = that.activeType.kcal
|
||||
that.isShop = false
|
||||
that.isBle = true
|
||||
console.log("选中的商品", ite)
|
||||
},
|
||||
// 购物车提交
|
||||
handlesubbtn() {
|
||||
let that = this
|
||||
|
||||
if (that.ActiveList.length <= 0) return
|
||||
|
||||
that.$model.getAddIntakeFood({
|
||||
aud_id: that.user.aud_id,
|
||||
meals_type: that.typename,
|
||||
|
|
@ -339,14 +408,92 @@
|
|||
that.isBle = true
|
||||
that.IsWeight = false
|
||||
},
|
||||
// 手动称重
|
||||
handleMannulWeight() {
|
||||
let that = this
|
||||
that.isBle = false
|
||||
that.IsWeight = true
|
||||
},
|
||||
//称重返回
|
||||
handleBle(weight, unit, kcal) {
|
||||
let that = this
|
||||
that.isBle = false
|
||||
that.activeType.weight = weight
|
||||
that.activeType.unit = unit
|
||||
that.activeType.kcal = kcal
|
||||
that.Next()
|
||||
console.log("返回", that.activeType, weight, unit, kcal)
|
||||
},
|
||||
onShowSearchType(type) {
|
||||
let that = this
|
||||
this.autoSearchType = type
|
||||
|
||||
if (type == 1) {
|
||||
that.showAutoSearchDlg = true
|
||||
} else if (type == 2) {
|
||||
that.selectPhoto()
|
||||
}
|
||||
},
|
||||
retrySearch() {
|
||||
let that = this
|
||||
that.autoSearchContent = ''
|
||||
if(that.autoSearchType == 2) {
|
||||
that.showAutoSearchDlg = false
|
||||
that.selectPhoto()
|
||||
}
|
||||
},
|
||||
selectPhoto() {
|
||||
let that = this
|
||||
uni.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
sizeType: ['compressed'],
|
||||
camera: 'back',
|
||||
success(res) {
|
||||
const tempFilePath = res.tempFiles[0].tempFilePath
|
||||
uni.getFileSystemManager().readFile({
|
||||
filePath: tempFilePath,
|
||||
encoding: 'base64',
|
||||
success: (res) => {
|
||||
const base64 = 'data:image/jpeg;base64,' + res.data
|
||||
|
||||
uni.showLoading({
|
||||
title: '图片识别中...',
|
||||
mask: true
|
||||
})
|
||||
|
||||
that.$model.getPhotoSearch({
|
||||
img_str: base64,
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code != 0) return
|
||||
that.autoSearchContent = res.data.name
|
||||
that.showAutoSearchDlg = true
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('读取文件失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.error('拍照失败:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
onVoiceTouchStart() {
|
||||
let that = this
|
||||
that.mic_touch = true
|
||||
that.voiceManager.start({
|
||||
duration: 60000,
|
||||
lang: "zh_CN"
|
||||
})
|
||||
},
|
||||
onVoiceTouchEnd() {
|
||||
let that = this
|
||||
that.mic_touch = false
|
||||
that.voiceManager.stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -386,19 +533,27 @@
|
|||
.right {
|
||||
top: 90px !important;
|
||||
|
||||
.list {
|
||||
display: block !important;
|
||||
column-count: 3; /* 分成两列 */
|
||||
column-gap: 10px; /* 列间距 */
|
||||
}
|
||||
.item {
|
||||
width: 29%;
|
||||
break-inside: avoid;
|
||||
/* 防止元素被分割到不同列 */
|
||||
border: 1px solid #f7f7f7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-around;
|
||||
height: 30px;
|
||||
// height: 30px;
|
||||
border-radius: 5px;
|
||||
margin: 0 2% 10px;
|
||||
box-shadow: 0 0 10rpx #e1e1e1;
|
||||
|
||||
text {
|
||||
margin-bottom: 0 !important;
|
||||
padding: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -545,12 +700,12 @@
|
|||
.menu {
|
||||
.left {
|
||||
bottom: 55px;
|
||||
height: calc(100vh - 120px);
|
||||
height: calc(100vh - 150px);
|
||||
}
|
||||
|
||||
.right {
|
||||
bottom: 55px;
|
||||
height: calc(100vh - 120px);
|
||||
height: calc(100vh - 150px);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -576,6 +731,108 @@
|
|||
}
|
||||
}
|
||||
|
||||
.voice-photo-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
bottom: 200rpx;
|
||||
right: 0;
|
||||
width: 70rpx;
|
||||
height: 160rpx;
|
||||
|
||||
.voice {
|
||||
border-radius: 35rpx;
|
||||
background-color: #70a1ff;
|
||||
|
||||
.voice-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAY1BMVEUAAAD+/v7+/v7////////+/v7////////+/v7////+/v7////+/v7////+/v7+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7+/v7////+/v7+/v7+/v7///////8gTHxJAAAAIHRSTlMAkL8QIPcwoLAI32DXUO9IKMd4p5iIaOcYt1hAOM9wgPxxuZIAAAMsSURBVGje7djpcqQgEADg9kDF0fF2PMd+/6dcYRajwTERsTab8vsTClPVabqJCFwuP0TVpIaXGWlTwUms0iQomCmFEzzvuHB/ag/j+CgJHNCqEWn0tevWAfmbTAQa3ZBLykqUJ0EuBW0iZPxmPhe+1k9bLvGdp2EtZ62azZIY9OBL48rzLi8S1VeQBGSU51KCBtRn9bBghf1gj3SkEvI/dyPJEI7L2LaDNwJercMoa60B3ijYljy+Xh2OnM2nnZaSEHiL5dnAUU+pJFJRnqBAWnVze6MacJSxHcTUFiQIRw6FpZbN9pqCCJm0fxjNQdCez9t4ShBizectckaQxw0Wygef/r+66wryI4JYqfsSsMYaf+aRdFAyxmnWYr37ktLdJxTJ7fM7QFLvTARlOSzkKLOOBZEzafQEMb2Rz2rCBqV0VMnGWfZm9NljUzGIs6e7nCvI7wtC/FEfwUKUsFlyOMjWm5ES5DQHwRhmYtQfRP4OqjUH6W+jEJZoyGYDbUG8s7ur+LqFCzbo9gcBHIV7TvURjmAfIj4Um+3vEyK+T0r+e/v4YhlaqXmlRm7FsvqwjylehRbZukIZpr8/57XbQXTutB96ulGSbBoZKtcQ9jQqYVWJoiSxGO1RTatkvb92oP70KN3dwSJ98yOpbC1K/XG+MHmn73WbuooGbDjQ9a+KQHQZT1xlvTw+bMlaLtRls8QBxmNDG3bLxWWDuB1MWphpg9lhrEPFO5aYfPx7L5CrQ5FNVCNXzA61NijIZ+tcivvTOi+GzCTLQ+XzdYpVYZPZTWZ7R8kjEvegoiIKbvObTKsguEAGa34P+gRFHo78WPRb4c+yMCqRcCBuEtRYwd9VEZw0z5LEM0obhI7nEVigzPbxi6V4vvohhgPiBzLem6ra3iuGA4fYJnL5SpjKQK634SCaIUfckC7mo5wgl1lw3CB69+6lTVdRGndhapKpk0ELOyO4QlRLlzbBVWYLOjliJ873owPadYPXi3ULvKKD07T8oEXhVPbKm+MKcgW5gvyKIHZqfOby16Q0PcSgqLrjt/kVqIlwh1A1E4LfRpTrFHnmN7kRXC7/xB8ZerD103/W/wAAAABJRU5ErkJggg==);
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.photo {
|
||||
border-radius: 35rpx;
|
||||
background-color: #ffbe76;
|
||||
|
||||
.photo-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAXVBMVEUAAAD////////////+/v7////////+/v7+/v7////////////////+/v7+/v7+/v7////+/v7+/v7+/v7+/v7////+/v7+/v7+/v7+/v7+/v7+/v7////+/v7///9dayJ/AAAAHnRSTlMAoDBf71BA3/eACCWI18+/eDjHso8Q56dYl2hHGG/EjhawAAABlUlEQVRo3u2W23KDIBBAEUERvF8ac+P/P7MVWiYDmk7o8tDMnrddlxydNe4SBEEQBEGQpFTZIfV2nbvwEi8R+hCxbDfhwizaUegnFECS/pmkApJ0zyQTgMS1RJQBbMt/fBXcXaqOdQx6wz/uHoCSl1mKgNo12INbexEgf5FQfcDOQakPoJGSca+4BZbMe8VnYAnfK+bAErVXfPuT5Mx99quv3GN+QZKTSHKUvKvkNtBbWsl6YuazP63JJNdSOxqeRjIHcxdekmmPE7yk1wE1tGT46UW1rlWrDWIAlnT2Z+0FmQsTdrCSwTrc6cJaKJzEdaQnjrvtCqikMyuWJA7JzOQHlZTBOzsZLahEBMvEbJoEKvkIFt0zvKTZsu1jZjQZUMnp+w12KLvEg0q4/+ebTOICKlmYvXNpQ5mZkC2gElI9jBHJR/e1B5XIUltYOzJtKRdgCVFMezAKP7SupecYUoxf1Tw6WpVmkZAX9zBNnm4lkqrPpi7r6TtskChByX+QsFjEC5J4UAIvURkAiiAIgiAIggDxCa/TqV5BIswVAAAAAElFTkSuQmCC);
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.auto-search-dialog {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
|
||||
.auto-search-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
height: 350rpx;
|
||||
padding: 80rpx 0;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 0 20rpx #ccc;
|
||||
.close {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -140rpx;
|
||||
width: 90rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 32rpx;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.mic-icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
border: 8rpx solid #777777;
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 90%;
|
||||
|
||||
.retry,
|
||||
.confirm {
|
||||
width: 190rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
border: 2rpx solid #777;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-error {
|
||||
font-size: 45px;
|
||||
margin-top: -30px;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
<text class="overflow">{{ite.name}}</text>
|
||||
<icon class="iconfont" :class="[ActiveList.indexOf(ite)!=-1?'icon-xuanzhong':'icon-add']" />
|
||||
</view>
|
||||
<!-- <div class="slot" style="width: 100%;height: 340rpx;" v-if="ActiveList.length>0"></div> -->
|
||||
</view>
|
||||
<view v-if="!menu3.length" class="nolist">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
|
|
@ -70,7 +71,6 @@
|
|||
menu3: [],
|
||||
menulist: [],
|
||||
ActiveList: [],
|
||||
searchResults: [],
|
||||
page: 1,
|
||||
type: "",
|
||||
name: "",
|
||||
|
|
@ -80,8 +80,17 @@
|
|||
computed: {
|
||||
...mapState(["foodList"]),
|
||||
menuTop() {
|
||||
this.menu2 = this.foodList.length ? this.foodList[0].list : []
|
||||
return this.foodList
|
||||
this.menu2 = this.foodList.length ? this.foodList[0].list : [],
|
||||
console.log([...this.foodList, {
|
||||
id: 4,
|
||||
list: [],
|
||||
name: '搜索'
|
||||
}])
|
||||
return [...this.foodList, {
|
||||
id: 4,
|
||||
list: [],
|
||||
name: '搜索'
|
||||
}]
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -176,22 +185,20 @@
|
|||
let that = this
|
||||
let list = []
|
||||
if (name != "") {
|
||||
that.searchResults = []
|
||||
that.menu.forEach((item, index) => {
|
||||
item.list.forEach((ite, ind) => {
|
||||
ite.list.forEach((it, id) => {
|
||||
if (it.name.indexOf(name) !== -1) {
|
||||
that.searchResults.push(it)
|
||||
that.$model.getFoodSearch({
|
||||
food_name: name
|
||||
}).then(res => {
|
||||
if (res.code != 0) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
that.index = 3
|
||||
that.menu2 = []
|
||||
that.menu3 = res.data
|
||||
})
|
||||
})
|
||||
})
|
||||
that.index = that.menu.findIndex(ite => ite.id == that.searchResults[0].one_id)
|
||||
console.log("arr", that.searchResults, )
|
||||
} else {
|
||||
that.index = 0
|
||||
that.searchResults = []
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -236,16 +243,17 @@
|
|||
position: relative;
|
||||
margin-top: 101px;
|
||||
height: calc(100vh - 101px) !important;
|
||||
}
|
||||
|
||||
.left {
|
||||
top: 101px !important;
|
||||
position: fixed;
|
||||
background-color: #f7f7f7;
|
||||
height: calc(100vh - 100px);
|
||||
}
|
||||
|
||||
.right {
|
||||
top: 0px !important;
|
||||
height: calc(100vh - 100px);
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
|
|
@ -277,6 +285,7 @@
|
|||
.active0 {
|
||||
border: 1px solid $maincolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.activeList {
|
||||
|
|
@ -298,7 +307,6 @@
|
|||
// flex-wrap: wrap;
|
||||
|
||||
.item {
|
||||
width: 29%;
|
||||
border: 1px solid $maincolor;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -308,11 +316,12 @@
|
|||
align-items: center;
|
||||
margin: 0 2% 10px;
|
||||
float: left;
|
||||
padding: 0 5px;
|
||||
padding: 0 10px;
|
||||
|
||||
icon {
|
||||
color: $maincolor;
|
||||
font-size: 16px;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -346,10 +355,11 @@
|
|||
}
|
||||
|
||||
.maxheight {
|
||||
padding-bottom: 265rpx;
|
||||
|
||||
.left {
|
||||
height: calc(100vh - 500rpx);
|
||||
height: calc(100vh - 680rpx);
|
||||
}
|
||||
.right {
|
||||
height: calc(100vh - 680rpx);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -30,16 +30,17 @@
|
|||
{{info.description}}
|
||||
</view>
|
||||
<view class="h4">
|
||||
所需食材
|
||||
<view class="tags">
|
||||
<view class="tags-item" :class="[index ==ind?'active':'']" v-for="(item,ind) in info.tags" :key="ind" @click="handleToggle(ind)">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="close" @click="handleWeight">
|
||||
<image src="../../static/lianjie.png"></image>
|
||||
连接称重
|
||||
</view>
|
||||
</view>
|
||||
<view class="foodlist">
|
||||
<view class="item" v-for="(ite,ind) in info.food_list" :key="ind"
|
||||
v-if="info.food_list&&info.food_list.length">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="item" v-for="(ite,ind) in info.tags[index].list" :key="ind" v-if="info.tags&&info.tags[index].list.length">
|
||||
<view class="name" style="flex: 1;">{{ite.name}}</view>
|
||||
<view class="weight">
|
||||
{{ite.weight}}{{ite.unit}}
|
||||
</view>
|
||||
|
|
@ -83,7 +84,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!--蓝牙连接区 -->
|
||||
<view class="wrapper" v-if="isBle">
|
||||
<view class="wrapper" v-show="isBle">
|
||||
<view class="bg" @click="isBle = false">
|
||||
<view class="box weightBox" @click.stop>
|
||||
<view class="table">
|
||||
|
|
@ -98,8 +99,8 @@
|
|||
<text>热量</text>
|
||||
<text>重秤</text>
|
||||
</view>
|
||||
<view class="item" v-for="(ite,ind) in info.food_list" :key="ind"
|
||||
v-if="info.food_list&&info.food_list.length">
|
||||
<view class="item" v-for="(ite,ind) in info.tags[0].list" :key="ind"
|
||||
v-if="info.tags&&info.tags[0].list.length">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="num">
|
||||
{{ite.weight}}{{ite.unit}}
|
||||
|
|
@ -118,14 +119,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="groupbtn" v-if="isWeightType&&iSWeightSub">
|
||||
<view class="groupbtn" :style="{display: (isWeightType&&iSWeightSub) ? '' : 'none'}">
|
||||
<view @click="handleWeightType(1)">累计称重</view>
|
||||
<view @click="handleWeightType(0)">分类称重</view>
|
||||
</view>
|
||||
<view class="title" v-if="!isWeightType&&iSWeightSub">
|
||||
<view class="title" :style="{display: (!isWeightType&&iSWeightSub) ? '' : 'none'}">
|
||||
<view class="name">{{activeType.name}}</view>
|
||||
<blue-tooth @handleDetailNext="handleDetailNext" @handleDetailSub="handleDetailSub"
|
||||
:weightType="weightType" :isLast="isLast" :weightKcal="weightKcal" />
|
||||
<blue-tooth @handleDetailNext="handleDetailNext" @handleDetailSub="handleDetailSub" @connect_success="handleWeight" :weightType="weightType"
|
||||
:isLast="isLast" :weightKcal="weightKcal" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -137,13 +138,14 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import blueTooth from "../../components/bluetooth.vue"
|
||||
import blueTooth from "../../components/bluetooth_new.vue"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: "",
|
||||
info: {},
|
||||
id: null,
|
||||
index: 0,
|
||||
weightKcal: null,
|
||||
weightType: 2,
|
||||
activeType: {},
|
||||
|
|
@ -176,9 +178,11 @@
|
|||
}
|
||||
that.id = options.id
|
||||
that.handleHomeInfo(options.id)
|
||||
console.log("type", options, that.type)
|
||||
},
|
||||
methods: {
|
||||
handleToggle(ind) {
|
||||
this.index = ind
|
||||
},
|
||||
handleHomeInfo(id) {
|
||||
let that = this
|
||||
that.$model.getCookListDetails({
|
||||
|
|
@ -192,6 +196,10 @@
|
|||
//连接称重
|
||||
handleWeight() {
|
||||
let that = this
|
||||
if(that.isBle) {
|
||||
return
|
||||
}
|
||||
|
||||
that.isBle = true
|
||||
that.isLast = false
|
||||
that.activeType = {}
|
||||
|
|
@ -202,14 +210,14 @@
|
|||
handleDetailNext(weight, dw, kcal) {
|
||||
let that = this
|
||||
console.log("下一位id", weight, dw, kcal, that.activeType)
|
||||
let ind = that.info.food_list.findIndex(ite => ite.id == that.activeType.id)
|
||||
that.info.food_list[ind].newweight = weight
|
||||
that.info.food_list[ind].newunit = dw
|
||||
that.info.food_list[ind].newkcal = kcal
|
||||
let ind = that.info.tags[0].list.findIndex(ite => ite.id == that.activeType.id)
|
||||
that.info.tags[0].list[ind].newweight = weight
|
||||
that.info.tags[0].list[ind].newunit = dw
|
||||
that.info.tags[0].list[ind].newkcal = kcal
|
||||
that.listInd = that.listInd + 1
|
||||
that.activeType = that.info.food_list[ind + 1]
|
||||
that.activeType = that.info.tags[0].list[ind + 1]
|
||||
that.weightKcal = that.activeType.kcal
|
||||
if (that.listInd == that.info.food_list.length - 1 || that.listInd == that.info.list.length) {
|
||||
if (that.listInd == that.info.tags[0].list.length - 1 || that.listInd == that.info.list.length) {
|
||||
that.isLast = true
|
||||
}
|
||||
console.log("下一位序号", that.listInd)
|
||||
|
|
@ -217,10 +225,10 @@
|
|||
// 结束称重
|
||||
handleDetailSub(weight, dw, kcal) {
|
||||
let that = this
|
||||
let ind = that.info.food_list.findIndex(ite => ite.id == that.activeType.id)
|
||||
that.info.food_list[ind].newweight = weight
|
||||
that.info.food_list[ind].newunit = dw
|
||||
that.info.food_list[ind].newkcal = kcal
|
||||
let ind = that.info.tags[0].list.findIndex(ite => ite.id == that.activeType.id)
|
||||
that.info.tags[0].list[ind].newweight = weight
|
||||
that.info.tags[0].list[ind].newunit = dw
|
||||
that.info.tags[0].list[ind].newkcal = kcal
|
||||
that.iSWeightSub = false
|
||||
console.log("称重完成", weight, dw, kcal)
|
||||
},
|
||||
|
|
@ -233,22 +241,21 @@
|
|||
that.iSWeightSub = true
|
||||
that.isWeightType = false
|
||||
that.weightKcal = that.activeType.kcal
|
||||
that.info.food_list[ind].newweight = ""
|
||||
that.info.food_list[ind].newunit = ""
|
||||
that.info.food_list[ind].newkcal = ""
|
||||
if (that.listInd == that.info.food_list.length - 1 || that.listInd == that.info.food_list.length) {
|
||||
that.info.tags[0].list[ind].newweight = ""
|
||||
that.info.tags[0].list[ind].newunit = ""
|
||||
that.info.tags[0].list[ind].newkcal = ""
|
||||
if (that.listInd == that.info.tags[0].list.length - 1 || that.listInd == that.info.tags[0].list.length) {
|
||||
that.isLast = true
|
||||
}
|
||||
console.log("重置", ind, that.info.food_list.length)
|
||||
console.log("重置", ind, that.info.tags[0].list.length)
|
||||
},
|
||||
//称重类型选择
|
||||
handleWeightType(ind) {
|
||||
this.weightType = ind
|
||||
this.isLast = false
|
||||
this.isWeightType = false
|
||||
this.activeType = this.info.food_list[0]
|
||||
this.activeType = this.info.tags[0].list[0]
|
||||
this.weightKcal = this.activeType.kcal
|
||||
console.log("111111111", this.activeType)
|
||||
},
|
||||
handleCang() {
|
||||
let that = this
|
||||
|
|
@ -329,7 +336,6 @@
|
|||
display: inline-block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
|
|
@ -415,6 +421,18 @@
|
|||
padding-top: 10px;
|
||||
border-top: 1px solid #f7f7f7;
|
||||
|
||||
.tags {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.tags-item {
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
.active {
|
||||
border-bottom: 2px solid #ff4c4f;
|
||||
}
|
||||
|
||||
}
|
||||
.close {
|
||||
color: #fff;
|
||||
width: 100px;
|
||||
|
|
@ -521,16 +539,18 @@
|
|||
line-height: 40px;
|
||||
|
||||
text {
|
||||
width: 20%;
|
||||
width: 18%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:nth-child(1) {
|
||||
width: 25%;
|
||||
width: 28%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
:nth-child(5) {
|
||||
width: 15%;
|
||||
text-align: right !important;
|
||||
// text-align: right !important;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -545,8 +565,9 @@
|
|||
font-size: 16px;
|
||||
|
||||
view {
|
||||
width: 20%;
|
||||
text-align: left;
|
||||
width: 18%;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
:nth-child(5) {
|
||||
|
|
@ -565,9 +586,12 @@
|
|||
.name {
|
||||
width: auto;
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
width: 25% !important;
|
||||
width: 28% !important;
|
||||
text-align: left !important;
|
||||
white-space: nowrap;
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,13 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/search/search",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "搜索"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
|
|
|||
|
|
@ -27,30 +27,32 @@
|
|||
<view class="center">
|
||||
还能吃
|
||||
<text>{{remaining_kcal}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text>建议摄入</text>
|
||||
<text class="num">{{suggestion.kcal}}</text>
|
||||
<view class="unit">Kcal</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weight">
|
||||
<view class="item">
|
||||
<text>碳水化合物</text>
|
||||
<text>碳水化合物(克)</text>
|
||||
<view class="bold">
|
||||
<view class="val" :style="{ width: carbohydratepercent + '%'}"></view>
|
||||
<text>{{today_intake.carbohydrate}}/{{suggestion.carbohydrate}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>蛋白质</text>
|
||||
<text>蛋白质(克)</text>
|
||||
<view class="bold">
|
||||
<view class="val" :style="{ width: proteinpercent + '%'}"></view>
|
||||
<text>{{today_intake.protein}}/{{suggestion.protein}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>脂肪</text>
|
||||
<text>脂肪(克)</text>
|
||||
<view class="bold">
|
||||
<view class="val" :style="{ width: fatpercent + '%'}"></view>
|
||||
<text>{{today_intake.fat}}/{{suggestion.fat}}</text>
|
||||
|
|
@ -411,6 +413,13 @@
|
|||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.unit {
|
||||
position: absolute;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
bottom: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -431,6 +440,14 @@
|
|||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
position: absolute;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
bottom: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<!-- 搜索 -->
|
||||
<search @handleSearch="handleSearch"></search>
|
||||
<search></search>
|
||||
<!-- 轮播 -->
|
||||
<view class="f_banner footbox" v-if="fimages.length">
|
||||
<swiper class="swiper" circular="true" previous-margin="15px" next-margin="15px">
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
<text>{{ite.create_user_nickname}}</text>
|
||||
</view>
|
||||
<view class="zan" @click="handleZan(ite)">
|
||||
<icon class="iconfont"
|
||||
:class="[ite.is_me_like_it=='yes'?'icon-icon3':'icon-icon_collect']">
|
||||
<icon class="iconfont" :class="[ite.is_me_like_it=='yes'?'icon-icon3':'icon-icon_collect']">
|
||||
</icon>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -51,7 +50,7 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import search from "../../components/search.vue"
|
||||
import search from "../../components/search2.vue"
|
||||
import foodList from "../../components/list.vue"
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -143,22 +142,25 @@
|
|||
|
||||
// 搜索
|
||||
handleSearch(ite) {
|
||||
let that = this
|
||||
console.log("搜索", ite)
|
||||
that.page = 1
|
||||
that.footlist = []
|
||||
if (ite == '') {
|
||||
that.index = 0
|
||||
that.handleCookListLabel()
|
||||
} else {
|
||||
that.$model.getHomeSearch({
|
||||
search_data: ite
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.index = null
|
||||
that.footlist = res.data
|
||||
uni.navigateTo({
|
||||
url: '/pages/search/search'
|
||||
})
|
||||
}
|
||||
// let that = this
|
||||
// console.log("搜索", ite)
|
||||
// that.page = 1
|
||||
// that.footlist = []
|
||||
// if (ite == '') {
|
||||
// that.index = 0
|
||||
// that.handleCookListLabel()
|
||||
// } else {
|
||||
// that.$model.getHomeSearch({
|
||||
// search_data: ite
|
||||
// }).then(res => {
|
||||
// if (res.code != 0) return
|
||||
// that.index = null
|
||||
// that.footlist = res.data
|
||||
// })
|
||||
// }
|
||||
},
|
||||
// 功能页面跳转
|
||||
navTo(url) {
|
||||
|
|
@ -197,7 +199,7 @@
|
|||
background: #fff;
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
margin-top: 35px !important;
|
||||
margin-top: 40px !important;
|
||||
justify-content: space-between;
|
||||
|
||||
.list {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<!-- 搜索 -->
|
||||
<search @handleSearch="handleSearch"></search>
|
||||
<search></search>
|
||||
|
||||
<view class="box menu">
|
||||
<!-- 左侧菜单栏 -->
|
||||
|
|
@ -14,13 +14,15 @@
|
|||
|
||||
<!-- 右侧商品 -->
|
||||
<view class="right">
|
||||
<view class="right_list">
|
||||
<scroll-view class="right_list" scroll-y="true" @scrolltolower="onPullDown">
|
||||
<div class="right_inner_list">
|
||||
<view class="list" v-for="(ite,ind) in menulist" :key="ind" @click="handleDetail(ite.id)"
|
||||
v-if="menulist.length">
|
||||
<image :src="ite.cover" mode="aspectFill"></image>
|
||||
<text class="overflow">{{ite.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
</scroll-view>
|
||||
<view v-if="!menulist.length" class="nolist">
|
||||
<icon class="iconfont icon-wancan"></icon>
|
||||
<text>还没有记录哦</text>
|
||||
|
|
@ -35,15 +37,15 @@
|
|||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
import search from "../../components/search.vue"
|
||||
import search from "../../components/search2.vue"
|
||||
export default {
|
||||
components: {
|
||||
search
|
||||
},
|
||||
computed: {
|
||||
...mapState(["menuList"]),
|
||||
...mapState(["menuList","menu_search_value"]),
|
||||
menu() {
|
||||
return this.menuList
|
||||
return [...this.menuList,{id:999,name:'搜索'}]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
|
@ -52,16 +54,28 @@
|
|||
text: "",
|
||||
index: 0,
|
||||
lastPage: "",
|
||||
loading: false,
|
||||
menulist: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(op) {
|
||||
let that = this
|
||||
that.page = 1
|
||||
that.handleCookListLabel()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
onShow() {
|
||||
let that = this
|
||||
if(that.$store.state.menu_search_value != '') {
|
||||
that.handleSearch(that.$store.state.menu_search_value)
|
||||
that.$store.state.menu_search_value = ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onPullDown() {
|
||||
let that = this
|
||||
if(that.loading) {
|
||||
return
|
||||
}
|
||||
if (!this.lastPage || this.page >= this.lastPage) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据!',
|
||||
|
|
@ -71,20 +85,20 @@
|
|||
}
|
||||
this.page++
|
||||
this.handleCookListLabel()
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
},
|
||||
methods: {
|
||||
// 食材列表
|
||||
handleCookListLabel() {
|
||||
let that = this
|
||||
that.loading = true
|
||||
that.$model.getCookListLabel({
|
||||
cook_label: that.menu[that.index].id,
|
||||
page: that.page,
|
||||
}).then(res => {
|
||||
that.loading = false
|
||||
if (res.code != 0) return
|
||||
that.menulist = that.menulist.concat(res.data.content_list)
|
||||
that.lastPage = res.data.page_total
|
||||
that.page = res.data.page_now
|
||||
})
|
||||
},
|
||||
// 左侧切换
|
||||
|
|
@ -115,12 +129,16 @@
|
|||
that.index = 0
|
||||
that.handleCookListLabel()
|
||||
} else {
|
||||
that.$model.getHomeSearch({
|
||||
search_data: ite
|
||||
uni.showLoading({
|
||||
title: '搜索中...'
|
||||
})
|
||||
that.$model.getMenuSearch({
|
||||
food_name: ite
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code != 0) return
|
||||
that.index = null
|
||||
that.menulist = res.data
|
||||
that.index = that.menu.length - 1
|
||||
that.menulist = res.data.content_list
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
@ -131,6 +149,9 @@
|
|||
<style lang="scss" scoped>
|
||||
.right_list {
|
||||
padding: 0 !important;
|
||||
height: 100%;
|
||||
}
|
||||
.right_inner_list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,334 @@
|
|||
<template>
|
||||
<view class="content" :class="{'noscroll':show_food_search}">
|
||||
<input type="text" class="search" v-model="search_value" :placeholder="placeholder" @focus="placeholder='输入自定义食材'"
|
||||
@blur="placeholder='点击添加自定义食材'" />
|
||||
<view class="picked-container">
|
||||
<view class="empty" v-if="picked_food.length <= 0">
|
||||
<view>看起来你还没添加任何食材!</view>
|
||||
<view>你可以通过上方的<span style="color: red;">输入框</span>自定义输入食材或者通过下方的<span style="color: red;">流行食材</span>点击添加</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="top">
|
||||
<view class="title">已选食材</view>
|
||||
<view @click="picked_food=[]">清空</view>
|
||||
</view>
|
||||
<view class="picked-food">
|
||||
<view class="picked-food-item" v-for="(item,index) in picked_food" :key="index">
|
||||
<view class="inner">{{item.name}}</view>
|
||||
<view class="close" @click="removePicked(item.id)">x</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips">* 点击移除食材</view>
|
||||
<view class="food-match" @click="onSearchFood">匹配菜谱</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popular-container">
|
||||
<view class="title">{{popular_food.title}}</view>
|
||||
<view class="popular-food-item" v-for="(item,index) in popular_food.list" :key="index">
|
||||
<view class="food-title">{{item.title}}</view>
|
||||
<view class="popular-food-inner">
|
||||
<view class="popular-food-subitem" v-for="(sub_item,sub_index) in item.list"
|
||||
@click="addIngredients(sub_item,item.list)" :key="sub_index">{{sub_item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="food-search-wrap" v-if="show_food_search">
|
||||
<view class="food-search-item" v-for="(item,index) in food_search_list" :key="index">
|
||||
<view>{{item.name}}</view>
|
||||
<view @click="addIngredients(item)">+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var timerHandle = null
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
placeholder: '点击添加自定义食材',
|
||||
search_value: '',
|
||||
show_food_search: false,
|
||||
food_search_list: [],
|
||||
picked_food: [],
|
||||
popular_food: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["menu_search_value"]),
|
||||
},
|
||||
watch: {
|
||||
search_value(new_val, old, val) {
|
||||
clearTimeout(timerHandle)
|
||||
if (new_val != '') {
|
||||
timerHandle = setTimeout(() => {
|
||||
this.$model.getFoodSearch({
|
||||
food_name: new_val
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
this.food_search_list = res.data
|
||||
this.show_food_search = true
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
this.show_food_search = false
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$model.getSearchPopularFood({}).then(res => {
|
||||
if (res.code != 0) return
|
||||
this.popular_food = res.data.food
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
preventTouchMove() {},
|
||||
removePicked(id) {
|
||||
let index = this.picked_food.findIndex(item => item.id == id)
|
||||
if (index != -1) {
|
||||
if (this.picked_food[index].parent) {
|
||||
this.picked_food[index].parent.push(this.picked_food[index])
|
||||
this.picked_food[index].parent = null
|
||||
}
|
||||
this.picked_food.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//添加食材
|
||||
addIngredients(food,parent) {
|
||||
this.picked_food.push(food)
|
||||
this.show_food_search = false
|
||||
|
||||
if(parent) {
|
||||
food.parent = parent
|
||||
let index = parent.findIndex(item => item.id == food.id)
|
||||
if (index != -1) {
|
||||
parent.splice(index, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
//搜索菜谱
|
||||
onSearchFood() {
|
||||
let that = this
|
||||
if (that.picked_food.length <= 0) return
|
||||
|
||||
let search = that.picked_food.map(item => item.id)
|
||||
that.$store.state.menu_search_value = search.join(',')
|
||||
|
||||
uni.switchTab({
|
||||
url: '/pages/menu/menu'
|
||||
})
|
||||
|
||||
// that.$model.getMenuSearch({
|
||||
// search_data:
|
||||
// }).then(res => {
|
||||
// if (res.code != 0) return
|
||||
// that.index = null
|
||||
// that.footlist = res.data
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 25rpx;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
.search {
|
||||
width: 94%;
|
||||
padding: 20rpx;
|
||||
border: 1rpx solid #e1e1e1;
|
||||
border-radius: 18rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.search:hover {
|
||||
box-shadow: 0 1rpx 20rpx #ccc;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 40rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.picked-container {
|
||||
margin-top: 80rpx;
|
||||
width: 100%;
|
||||
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
view:first-child {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #909090;
|
||||
}
|
||||
|
||||
view:last-child {
|
||||
margin-top: 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #909090;
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
view:last-child {
|
||||
color: #999;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.picked-food {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 30rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
background-color: #F6F6F6;
|
||||
|
||||
.picked-food-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 15rpx 20rpx;
|
||||
background-color: #fff;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.close {
|
||||
margin-left: 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 30rpx;
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.food-match {
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-top: 30rpx;
|
||||
line-height: 86rpx;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #F96679;
|
||||
border-radius: 25rpx;
|
||||
background-color: #FEF0EE;
|
||||
}
|
||||
}
|
||||
|
||||
.popular-container {
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
|
||||
.popular-food-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 20rpx;
|
||||
background-color: #F6F6F6;
|
||||
|
||||
.food-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.popular-food-inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.popular-food-subitem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 15rpx 20rpx;
|
||||
background-color: #fff;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.food-search-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 130rpx;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 0 30rpx 50rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
|
||||
.food-search-inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 120rpx;
|
||||
bottom: 0;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.food-search-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
margin-bottom: 15rpx;
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #F6F6F6;
|
||||
|
||||
view:first-child {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
view:last-child {
|
||||
font-size: 38rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.noscroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -19,6 +19,7 @@ export default new Vuex.Store({
|
|||
token: "",
|
||||
weight: ""
|
||||
},
|
||||
menu_search_value: '',
|
||||
foodList: [],
|
||||
menuList: [],
|
||||
isConnected: false,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,26 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getSearchPopularFood(param) { //获取搜索页面常用食材
|
||||
return http.post("/kitchenscale/get_search_food_page_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getFoodSearch(param) { //搜索食材
|
||||
return http.post("/kitchenscale/find_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getMenuSearch(param) { //搜索菜谱
|
||||
return http.post("/kitchenscale/find_by_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getPhotoSearch(param) { //图像识别
|
||||
return http.post("/kitchenscale/baidu_identify_food", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
// 通用
|
||||
getUploadImg(param) { // 上传素材
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
require('./common/runtime.js')
|
||||
require('./common/vendor.js')
|
||||
require('./common/main.js')
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/menu/menu",
|
||||
"pages/add/add",
|
||||
"pages/count/count",
|
||||
"pages/me/me",
|
||||
"pages/add/Preview",
|
||||
"pages/search/search"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pageTwo",
|
||||
"pages": [
|
||||
"login/forgetPassword",
|
||||
"login/login",
|
||||
"me/feedBack",
|
||||
"me/userEdit",
|
||||
"me/record",
|
||||
"me/mymenu",
|
||||
"me/menudetail",
|
||||
"me/foodlist",
|
||||
"count/setting",
|
||||
"count/KcalEdit",
|
||||
"count/food",
|
||||
"webview/webview",
|
||||
"setting/setting",
|
||||
"setting/password",
|
||||
"setting/email",
|
||||
"setting/phone",
|
||||
"me/menuEdit"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#efefef",
|
||||
"backgroundColor": "#efefef"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#333",
|
||||
"selectedColor": "#ff4c4f",
|
||||
"backgroundColor": "#fff",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/home.png",
|
||||
"selectedIconPath": "static/home01.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/menu/menu",
|
||||
"iconPath": "static/cai.png",
|
||||
"selectedIconPath": "static/cai01.png",
|
||||
"text": "菜谱"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/add/add",
|
||||
"iconPath": "static/add.png",
|
||||
"selectedIconPath": "static/add.png",
|
||||
"text": ""
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/count/count",
|
||||
"iconPath": "static/ji.png",
|
||||
"selectedIconPath": "static/ji01.png",
|
||||
"text": "计食器"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/me/me",
|
||||
"iconPath": "static/me.png",
|
||||
"selectedIconPath": "static/me01.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"plugins": {
|
||||
"sdkPlugin": {
|
||||
"version": "2.4.0",
|
||||
"provider": "wx17e93aad47cdae1a"
|
||||
},
|
||||
"WechatSI": {
|
||||
"version": "0.3.6",
|
||||
"provider": "wx069ba97219f66d99"
|
||||
}
|
||||
},
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
@import './common/main.wxss';
|
||||
|
||||
[data-custom-hidden="true"],[bind-data-custom-hidden="true"]{display: none !important;}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/main"],{4149:function(t,e,o){},"63b1":function(t,e,o){"use strict";var n=o("4149"),r=o.n(n);r.a},"6b1b":function(t,e,o){"use strict";o.r(e);var n=o("be13"),r=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},"834a":function(t,e,o){"use strict";(function(t,e){var n=o("47a9"),r=n(o("7ca3"));o("6caf");var a=n(o("9998"));o("60a4"),o("17f2"),o("38a5"),o("a5bf");var c=n(o("b3c9")),u=n(o("069d")),f=n(o("749e")),i=n(o("d3d2")),l=n(o("229b")),d=n(o("3240"));function p(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}t.__webpack_require_UNI_MP_PLUGIN__=o,d.default.prototype.$store=c.default,d.default.prototype.$tools=u.default,d.default.prototype.$http=f.default,d.default.prototype.$model=i.default,d.default.prototype.$json=l.default,d.default.config.productionTip=!1,a.default.mpType="app";var s=new d.default(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?p(Object(o),!0).forEach((function(e){(0,r.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},a.default));e(s).$mount()}).call(this,o("3223")["default"],o("df3c")["createApp"])},9998:function(t,e,o){"use strict";o.r(e);var n=o("6b1b");for(var r in n)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(r);o("63b1");var a=o("828b"),c=Object(a["a"])(n["default"],void 0,void 0,!1,null,null,null,!1,void 0,void 0);e["default"]=c.exports},be13:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={onTabItemClick:function(t){console.log("itemPath",t)},onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},methods:{handleHomeConfig:function(){var t=this;t.$model.getHomeConfig({}).then((function(e){0==e.code&&(t.$store.commit("changeMenuList",e.data.cook_label),t.$store.commit("changeFoodList",e.data.food_list))}))}}};e.default=n}},[["834a","common/runtime","common/vendor"]]]);
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
!function(){try{var a=Function("return this")();a&&!a.Math&&(Object.assign(a,{isFinite:isFinite,Array:Array,Date:Date,Error:Error,Function:Function,Math:Math,Object:Object,RegExp:RegExp,String:String,TypeError:TypeError,setTimeout:setTimeout,clearTimeout:clearTimeout,setInterval:setInterval,clearInterval:clearInterval}),"undefined"!=typeof Reflect&&(a.Reflect=Reflect))}catch(a){}}();
|
||||
(function(e){function r(r){for(var n,a,i=r[0],l=r[1],c=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);f&&f(r);while(s.length)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var l=t[i];0!==o[l]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={"common/runtime":0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+e+".js"}(e);var l=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",l.name="ChunkLoadError",l.type=n,l.request=u,t[1](l)}o[e]=void 0}};var c=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/",a.oe=function(e){throw console.error(e),e};var i=global["webpackJsonp"]=global["webpackJsonp"]||[],l=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var f=l;t()})([]);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
<view class="weightPages data-v-6a7c2eb2"><block wx:if="{{isConnection==0}}"><view class="table data-v-6a7c2eb2">称重中,请将食物放到秤上</view></block><block wx:if="{{isConnection==1}}"><view data-event-opts="{{[['tap',[['openBluetoothAdapter',['$event']]]]]}}" class="table data-v-6a7c2eb2" bindtap="__e">连接失败,点击重新连接</view></block><block wx:if="{{isConnection!=3}}"><view class="image data-v-6a7c2eb2"><image src="../static/cheng.png" class="data-v-6a7c2eb2"></image></view></block><block wx:if="{{isConnection==3}}"><view class="data-v-6a7c2eb2"><view class="weight data-v-6a7c2eb2"><view class="data-v-6a7c2eb2">重量<text class="data-v-6a7c2eb2">{{weight}}</text>{{dw}}</view><view class="data-v-6a7c2eb2">热量<text class="data-v-6a7c2eb2">{{kcal}}</text>千卡</view></view><view class="tips data-v-6a7c2eb2">注:重新称重可更新当前数据</view><block wx:if="{{weightType!=2}}"><view class="groupbtn data-v-6a7c2eb2"><view data-event-opts="{{[['tap',[['handleDetailSub',['$event']]]]]}}" class="btn data-v-6a7c2eb2" bindtap="__e">完成</view><block wx:if="{{!stopblue}}"><view data-event-opts="{{[['tap',[['handleDetailNext',['$event']]]]]}}" class="btn data-v-6a7c2eb2" bindtap="__e">下一位</view></block></view></block><block wx:if="{{weightType==2}}"><view data-event-opts="{{[['tap',[['handlesub',['$event']]]]]}}" class="btn data-v-6a7c2eb2" bindtap="__e">确认添加</view></block></view></block><block wx:if="{{isConnection==1}}"><view class="tips data-v-6a7c2eb2"><uni-icons vue-id="cec76cbc-1" type="info-filled" color="#dd524d" size="20" class="data-v-6a7c2eb2" bind:__l="__l"></uni-icons>请确定设备是开机状态、手机蓝牙权限已打开!</view></block></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.weightPages.data-v-6a7c2eb2{display:flex;flex-wrap:wrap;flex-direction:column;position:absolute;justify-content:space-around;left:0;right:0;bottom:20px;top:60px;margin-top:20px}.weightPages .weight.data-v-6a7c2eb2{background:#fff;color:#666;font-size:16px;flex-wrap:wrap;text-align:center}.weightPages .weight view.data-v-6a7c2eb2{width:60%;height:50px;display:flex;margin-left:25%;align-items:flex-end;margin-bottom:15px}.weightPages .weight view text.data-v-6a7c2eb2{width:80px;display:inline-block;border-bottom:1px solid #dfdfdf;margin:0 10px;font-size:18px;font-weight:700;color:#f0ae43}.weightPages .tips.data-v-6a7c2eb2{font-size:12px;text-align:center}.weightPages .btn.data-v-6a7c2eb2{color:#fff;width:80%;margin-left:10%}.weightPages .groupbtn .btn.data-v-6a7c2eb2{color:#000!important}.weightPages .table.data-v-6a7c2eb2{width:100%;font-size:16px;font-weight:700;text-align:center;margin:15px 0}.weightPages .image.data-v-6a7c2eb2{width:160px;height:160px;margin:auto}.weightPages .image image.data-v-6a7c2eb2{width:100%;height:100%}.weightPages .tips.data-v-6a7c2eb2{margin-bottom:15px;margin-left:15px;display:flex;color:#999}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/food_item"],{2653:function(t,n,e){},"4d1f":function(t,n,e){"use strict";e.r(n);var o=e("b7ca"),c=e.n(o);for(var u in o)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(u);n["default"]=c.a},"5e5a":function(t,n,e){"use strict";e.r(n);var o=e("ff7c"),c=e("4d1f");for(var u in c)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return c[t]}))}(u);e("e523");var f=e("828b"),i=Object(f["a"])(c["default"],o["b"],o["c"],!1,null,"33e6d913",null,!1,o["a"],void 0);n["default"]=i.exports},b7ca:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default={name:"FoodItem",props:["foodList"],data:function(){return{}},methods:{onScrollToLower:function(){this.$emit("scroll")},onSelect:function(t){this.$emit("select",t)}}}},e523:function(t,n,e){"use strict";var o=e("2653"),c=e.n(o);c.a},ff7c:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){}));var o=function(){var t=this.$createElement;this._self._c},c=[]}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/food_item-create-component',
|
||||
{
|
||||
'components/food_item-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("5e5a"))
|
||||
})
|
||||
},
|
||||
[['components/food_item-create-component']]
|
||||
]);
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="FoodWrap data-v-33e6d913"><scroll-view class="food-list data-v-33e6d913" scroll-y="true" data-event-opts="{{[['scrolltolower',[['onScrollToLower',['$event']]]]]}}" bindscrolltolower="__e"><block wx:for="{{foodList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['onSelect',['$0'],[[['foodList','',index]]]]]]]}}" class="food-item data-v-33e6d913" bindtap="__e"><image src="{{item.pic_url}}" mode="aspectFill" class="data-v-33e6d913"></image><view class="food-info data-v-33e6d913"><text class="name data-v-33e6d913">{{item.name}}</text><text class="kcal data-v-33e6d913">{{item.kcal+"Kcal/100g"}}</text></view></view></block></scroll-view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.FoodWrap.data-v-33e6d913{position:absolute;left:0;top:0;width:100%;height:100%}.FoodWrap .food-list.data-v-33e6d913{width:100%;height:100%;padding:10rpx;box-sizing:border-box}.FoodWrap .food-list .food-item.data-v-33e6d913{display:flex;width:96%;padding:10rpx 20rpx;margin-top:20rpx;margin-left:2%;box-sizing:border-box;border-radius:12rpx;box-shadow:0 0 20rpx #e1e1e1}.FoodWrap .food-list .food-item image.data-v-33e6d913{width:120rpx;height:120rpx;border-radius:12rpx}.FoodWrap .food-list .food-item .food-info.data-v-33e6d913{display:flex;flex-direction:column;justify-content:space-between;margin-left:20rpx;padding:10rpx 0}.FoodWrap .food-list .food-item .food-info .name.data-v-33e6d913{font-size:26rpx;font-weight:700}.FoodWrap .food-list .food-item .food-info .kcal.data-v-33e6d913{font-size:24rpx;color:#555;margin-bottom:10rpx}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/list"],{"0a40":function(t,n,e){"use strict";e.r(n);var a=e("80a2"),i=e.n(a);for(var u in a)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(u);n["default"]=i.a},5818:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var a=function(){var t=this.$createElement,n=(this._self._c,this.list.length);this.$mp.data=Object.assign({},{$root:{g0:n}})},i=[]},"80a2":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={name:"list",data:function(){return{}},props:{title:{type:String,default:""},list:{type:Array,default:[]}},mounted:function(){},methods:{handleDetail:function(n){t.getStorageSync("token")?t.navigateTo({url:"/pageTwo/me/menudetail?id="+n}):this.$tools.msg("登录后查看等多!")}}};n.default=e}).call(this,e("df3c")["default"])},cebd:function(t,n,e){"use strict";e.r(n);var a=e("5818"),i=e("0a40");for(var u in i)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(u);var o=e("828b"),r=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"67887168",null,!1,a["a"],void 0);n["default"]=r.exports}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/list-create-component',
|
||||
{
|
||||
'components/list-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("cebd"))
|
||||
})
|
||||
},
|
||||
[['components/list-create-component']]
|
||||
]);
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="data-v-67887168"><view class="footlist data-v-67887168"><block wx:for="{{list}}" wx:for-item="it" wx:for-index="id" wx:key="*this"><view data-event-opts="{{[['tap',[['handleDetail',['$0'],[[['list','',id,'id']]]]]]]}}" class="list data-v-67887168" bindtap="__e"><view class="topimg data-v-67887168"><image class="img data-v-67887168" src="{{it.cover}}" mode="aspectFill"></image></view><view class="item data-v-67887168"><view class="title data-v-67887168">{{it.title}}</view><view class="name data-v-67887168"><image src="{{it.create_user_head_pic}}" class="data-v-67887168"></image><text class="overflow data-v-67887168">{{it.create_user_nickname}}</text></view><view class="zan data-v-67887168"><icon class="{{['iconfont','data-v-67887168',it.is_me_like_it=='yes'?'icon-icon3':'icon-icon_collect']}}"></icon><text class="data-v-67887168">{{it.likes_num}}</text></view></view></view></block></view><block wx:if="{{!$root.g0}}"><view class="nolist data-v-67887168"><icon class="iconfont icon-wancan data-v-67887168"></icon><text class="data-v-67887168">还没有记录哦</text></view></block></view>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/search"],{1916:function(n,e,t){},5378:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={name:"search",props:{voice:{type:Boolean,default:!1}},data:function(){return{name:""}},methods:{searchByName:function(n){this.name=n,this.$emit("handleSearch",this.name)},handleSerach:function(){this.$emit("handleSearch",this.name)},handlecolse:function(){this.name="",this.$emit("handleSearch","")},onFocus:function(){n.navigateTo({url:"/pages/search/search"})},onMic:function(){this.$emit("mic")},onCamera:function(){this.$emit("camera")}}};e.default=t}).call(this,t("df3c")["default"])},"6b07":function(n,e,t){"use strict";var a=t("1916"),i=t.n(a);i.a},e39e:function(n,e,t){"use strict";t.r(e);var a=t("5378"),i=t.n(a);for(var c in a)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return a[n]}))}(c);e["default"]=i.a},eea8:function(n,e,t){"use strict";t.d(e,"b",(function(){return i})),t.d(e,"c",(function(){return c})),t.d(e,"a",(function(){return a}));var a={uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(t.bind(null,"6c3a"))}},i=function(){var n=this.$createElement;this._self._c},c=[]},f7da:function(n,e,t){"use strict";t.r(e);var a=t("eea8"),i=t("e39e");for(var c in i)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return i[n]}))}(c);t("6b07");var o=t("828b"),u=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"817943f2",null,!1,a["a"],void 0);e["default"]=u.exports}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/search-create-component',
|
||||
{
|
||||
'components/search-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("f7da"))
|
||||
})
|
||||
},
|
||||
[['components/search-create-component']]
|
||||
]);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="serachBox data-v-817943f2"><view class="serach-box data-v-817943f2"><view class="searchInput data-v-817943f2"><input class="city-serach-input data-v-817943f2" placeholder="请输入..." data-event-opts="{{[['input',[['__set_model',['','name','$event',[]]]]]]}}" value="{{name}}" bindinput="__e"/><block wx:if="{{name}}"><icon data-event-opts="{{[['tap',[['handlecolse',['$event']]]]]}}" class="iconfont icon-error data-v-817943f2" bindtap="__e"></icon></block><block wx:if="{{voice&&!name}}"><view class="voice data-v-817943f2"><uni-icons class="mic data-v-817943f2" vue-id="6eb882c3-1" type="mic-filled" size="26" data-event-opts="{{[['^click',[['onMic']]]]}}" bind:click="__e" bind:__l="__l"></uni-icons><uni-icons class="camera data-v-817943f2" vue-id="6eb882c3-2" type="camera-filled" size="26" data-event-opts="{{[['^click',[['onCamera']]]]}}" bind:click="__e" bind:__l="__l"></uni-icons></view></block></view><view class="searchBtn data-v-817943f2"><view data-event-opts="{{[['tap',[['handleSerach',['$event']]]]]}}" bindtap="__e" class="data-v-817943f2">搜索</view></view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.serachBox.data-v-817943f2{height:40px;position:fixed;top:0;left:0;right:0;padding:0 15px 10px;z-index:99;background-color:#efefef}.serachBox .serach-box.data-v-817943f2{height:40px;border-radius:10px;position:relative;background-color:#fff}.serachBox .searchInput.data-v-817943f2{position:absolute;left:0;right:60px;height:40px}.serachBox .searchInput icon.data-v-817943f2{position:absolute;right:10px;top:10px;display:flex;z-index:99999}.serachBox .searchInput .voice.data-v-817943f2{display:flex;justify-content:flex-end;align-items:center;position:absolute;right:10px;top:0;bottom:0;width:150rpx;display:flex;z-index:99999}.serachBox .searchInput .voice .mic.data-v-817943f2{margin-right:10rpx}.serachBox .searchBtn.data-v-817943f2{position:absolute;width:60px;right:0;height:40px;line-height:40px;background:#ff4c4f;border-radius:0 10px 10px 0;text-align:center;color:#fff}.serachBox input.data-v-817943f2{height:40px;padding:0 5px;text-align:center;position:absolute;left:0;right:0;border-radius:10px}.serachBox .icon.data-v-817943f2{width:50px;height:40px;position:absolute;right:15px;display:flex;align-items:center;justify-content:center}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/search2"],{"10bb":function(n,t,e){"use strict";var a=e("9f69"),u=e.n(a);u.a},"2d23":function(n,t,e){"use strict";e.d(t,"b",(function(){return a})),e.d(t,"c",(function(){return u})),e.d(t,"a",(function(){}));var a=function(){var n=this.$createElement;this._self._c},u=[]},"4d80":function(n,t,e){"use strict";e.r(t);var a=e("2d23"),u=e("93b4");for(var c in u)["default"].indexOf(c)<0&&function(n){e.d(t,n,(function(){return u[n]}))}(c);e("10bb");var r=e("828b"),f=Object(r["a"])(u["default"],a["b"],a["c"],!1,null,"5e260652",null,!1,a["a"],void 0);t["default"]=f.exports},"93b4":function(n,t,e){"use strict";e.r(t);var a=e("ad65"),u=e.n(a);for(var c in a)["default"].indexOf(c)<0&&function(n){e.d(t,n,(function(){return a[n]}))}(c);t["default"]=u.a},"9f69":function(n,t,e){},ad65:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={name:"search",data:function(){return{}},methods:{handleSearch:function(){n.navigateTo({url:"/pages/search/search"})}}};t.default=e}).call(this,e("df3c")["default"])}}]);
|
||||
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
||||
'components/search2-create-component',
|
||||
{
|
||||
'components/search2-create-component':(function(module, exports, __webpack_require__){
|
||||
__webpack_require__('df3c')['createComponent'](__webpack_require__("4d80"))
|
||||
})
|
||||
},
|
||||
[['components/search2-create-component']]
|
||||
]);
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="serachBox data-v-5e260652"><view class="serach-box data-v-5e260652"><view class="searchInput data-v-5e260652"><view data-event-opts="{{[['tap',[['handleSearch',['$event']]]]]}}" class="search-wrap _div data-v-5e260652" bindtap="__e"><text class="data-v-5e260652">搜索食材...</text></view></view><view class="searchBtn data-v-5e260652"><view data-event-opts="{{[['tap',[['handleSearch',['$event']]]]]}}" bindtap="__e" class="data-v-5e260652">搜索</view></view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.serachBox.data-v-5e260652{height:40px;position:fixed;top:0;left:0;right:0;padding:0 15px 10px;z-index:99;background-color:#efefef}.serachBox .serach-box.data-v-5e260652{height:40px;border-radius:10px;position:relative;background-color:#fff}.serachBox .serach-box .search-wrap.data-v-5e260652{display:flex;justify-content:center;align-items:center;height:100%}.serachBox .serach-box .search-wrap text.data-v-5e260652{font-size:30rpx;color:#aaa}.serachBox .searchInput.data-v-5e260652{position:absolute;left:0;right:60px;height:40px}.serachBox .searchInput icon.data-v-5e260652{position:absolute;right:10px;top:10px;display:flex;z-index:99999}.serachBox .searchBtn.data-v-5e260652{position:absolute;width:60px;right:0;height:40px;line-height:40px;background:#ff4c4f;border-radius:0 10px 10px 0;text-align:center;color:#fff}.serachBox .icon.data-v-5e260652{width:50px;height:40px;position:absolute;right:15px;display:flex;align-items:center;justify-content:center}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/count/KcalEdit"],{"10bc":function(t,e,n){"use strict";var c=n("647e"),r=n.n(c);r.a},"584e":function(t,e,n){"use strict";(function(t){var c=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=c(n("7ca3")),a=n("8f59");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,c)}return n}var u={data:function(){return{kcal:"",suggestion_kcal_range_val:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,a.mapState)(["user"])),onLoad:function(t){this.suggestion_kcal_range_val=t.suggestion_kcal_range_val},methods:{handlesub:function(){var e=this;""==e.kcal||Number(e.kcal)<=0?e.$tools.msg("请输入卡路里"):e.$model.getCountSetUserKcal({aud_id:e.user.aud_id,set_kcal:e.kcal}).then((function(n){0==n.code&&(e.$tools.msg("设置成功"),setTimeout((function(){t.switchTab({url:"/pages/count/count"})}),1e3))}))}}};e.default=u}).call(this,n("df3c")["default"])},"5cc4":function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var c=function(){var t=this.$createElement;this._self._c},r=[]},"647e":function(t,e,n){},b1ae:function(t,e,n){"use strict";(function(t,e){var c=n("47a9");n("6caf");c(n("3240"));var r=c(n("f21b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},f21b:function(t,e,n){"use strict";n.r(e);var c=n("5cc4"),r=n("fac2");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);n("10bc");var o=n("828b"),u=Object(o["a"])(r["default"],c["b"],c["c"],!1,null,"ed017870",null,!1,c["a"],void 0);e["default"]=u.exports},fac2:function(t,e,n){"use strict";n.r(e);var c=n("584e"),r=n.n(c);for(var a in c)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return c[t]}))}(a);e["default"]=r.a}},[["b1ae","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "自定义卡路里",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-ed017870"><view class="title data-v-ed017870">自定义卡路里量<text class="desc data-v-ed017870">{{suggestion_kcal_range_val}}</text></view><view class="input data-v-ed017870"><input type="digit" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['','kcal','$event',[]]]]]]}}" value="{{kcal}}" bindinput="__e" class="data-v-ed017870"/><text class="data-v-ed017870">千卡</text></view><view data-event-opts="{{[['tap',[['handlesub',['$event']]]]]}}" class="btn data-v-ed017870" bindtap="__e">确认修改</view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-ed017870{padding:0 15px;flex-wrap:wrap;background-color:#fff}.title.data-v-ed017870{width:100%;font-size:16px;margin:15px 0;font-weight:700}.title text.data-v-ed017870{font-size:14px;color:#999;font-weight:500;width:100%;display:inline-block;margin-top:10px}.input.data-v-ed017870{display:flex;margin:20px;height:35px;line-height:35px;border-bottom:1px solid #dfdfdf;width:calc(100% - 40px);position:relative}.input.data-v-ed017870 input{width:100%;height:35px;font-size:18px;line-height:35px;text-align:center;font-weight:700;position:absolute}.input text.data-v-ed017870{position:absolute;right:0}.btn.data-v-ed017870{margin-top:40px;width:calc(100% - 30px);color:#fff}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"navigationBarTitleText": "食材库",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||
"search": "/components/search",
|
||||
"blue-tooth": "/components/bluetooth_new",
|
||||
"food-item": "/components/food_item"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,3 @@
|
|||
.tab_list.data-v-415f9e0f{display:flex;margin:45px -10px 0;justify-content:space-between}.tab_list .scroll-menu.data-v-415f9e0f{width:100%}.tab_list .scroll-menu .tabbar.data-v-415f9e0f{padding:10px;display:inline-block}.tab_list .scroll-menu .tabbar view.data-v-415f9e0f{display:inline-block}.tab_list .active.data-v-415f9e0f{color:#fff;padding:5px 8px;border-radius:5px;background-color:#ff4c4f}.left.data-v-415f9e0f{top:90px!important}.right.data-v-415f9e0f{top:90px!important}.right .list.data-v-415f9e0f{display:block!important;-webkit-column-count:3;column-count:3;-webkit-column-gap:10px;column-gap:10px}.right .item.data-v-415f9e0f{-webkit-column-break-inside:avoid;break-inside:avoid;border:1px solid #f7f7f7;display:flex;align-items:center;box-sizing:border-box;justify-content:space-around;border-radius:5px;margin:0 2% 10px;box-shadow:0 0 10rpx #e1e1e1}.right .item text.data-v-415f9e0f{margin-bottom:0!important;padding:10rpx}.right .icon-xuanzhong.data-v-415f9e0f{color:#ff4c4f}.right .active0.data-v-415f9e0f{border:1px solid #ff4c4f}.weightPages.data-v-415f9e0f{display:flex;flex-wrap:wrap;flex-direction:column;position:absolute;left:0;right:0;bottom:20px;top:60px;justify-content:space-around}.weightPages .weight.data-v-415f9e0f{background:#fff;color:#666;font-size:16px;flex-wrap:wrap;text-align:center}.weightPages .weight view.data-v-415f9e0f{width:60%;height:50px;display:flex;margin-left:25%;align-items:flex-end;margin-bottom:15px}.weightPages .weight view text.data-v-415f9e0f{width:80px;display:inline-block;border-bottom:1px solid #dfdfdf;margin:0 10px;font-size:18px;font-weight:700;color:#f0ae43}.weightPages .tips.data-v-415f9e0f{font-size:12px;text-align:center}.weightPages .btn.data-v-415f9e0f{color:#fff;width:80%;margin-left:10%}.weightPages .table.data-v-415f9e0f{width:100%;font-size:16px;font-weight:700;text-align:center;margin:15px 0}.weightPages .image.data-v-415f9e0f{width:160px;height:160px;margin:auto}.weightPages .image image.data-v-415f9e0f{width:100%;height:100%}.weightPages .tips.data-v-415f9e0f{margin-bottom:15px;margin-left:15px;display:flex;color:#999}.groupbtn.data-v-415f9e0f{display:flex;align-items:center;justify-content:space-between;padding:0 10px;position:absolute;bottom:0;left:0;right:0;height:55px;z-index:15;background-color:#fff;overflow:hidden;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.groupbtn .subbtn.data-v-415f9e0f{color:#fff;width:40%;text-align:center;border-radius:10px;height:31px;line-height:31px;background-color:#ff4c4f}.groupbtn .che.data-v-415f9e0f{width:50px;height:40px;position:relative}.groupbtn .che text.data-v-415f9e0f{position:absolute;height:15px;background:red;width:15px;border-radius:50%;display:inline-block;color:#fff;line-height:15px;text-align:center;font-size:12px;right:0;top:5px}.groupbtn .che image.data-v-415f9e0f,
|
||||
.groupbtn .che .t-icon.data-v-415f9e0f{width:50px;height:50px;margin-top:-3px;border-radius:50%}.menu .left.data-v-415f9e0f{bottom:55px;height:calc(100vh - 150px)}.menu .right.data-v-415f9e0f{bottom:55px;height:calc(100vh - 150px)}.activeList.data-v-415f9e0f{z-index:12;bottom:50px}.activeList .title.data-v-415f9e0f{font-weight:700;margin:5px 0}.activeList .list.data-v-415f9e0f{padding-bottom:55px}.activeList .list .name.data-v-415f9e0f{margin-right:5px}.voice-photo-wrap.data-v-415f9e0f{display:flex;flex-direction:column;justify-content:space-between;position:fixed;bottom:200rpx;right:0;width:70rpx;height:160rpx}.voice-photo-wrap .voice.data-v-415f9e0f{border-radius:35rpx;background-color:#70a1ff}.voice-photo-wrap .voice .voice-icon.data-v-415f9e0f{width:70rpx;height:70rpx;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAY1BMVEUAAAD+/v7+/v7////////+/v7////////+/v7////+/v7////+/v7////+/v7+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7+/v7////+/v7+/v7+/v7///////8gTHxJAAAAIHRSTlMAkL8QIPcwoLAI32DXUO9IKMd4p5iIaOcYt1hAOM9wgPxxuZIAAAMsSURBVGje7djpcqQgEADg9kDF0fF2PMd+/6dcYRajwTERsTab8vsTClPVabqJCFwuP0TVpIaXGWlTwUms0iQomCmFEzzvuHB/ag/j+CgJHNCqEWn0tevWAfmbTAQa3ZBLykqUJ0EuBW0iZPxmPhe+1k9bLvGdp2EtZ62azZIY9OBL48rzLi8S1VeQBGSU51KCBtRn9bBghf1gj3SkEvI/dyPJEI7L2LaDNwJercMoa60B3ijYljy+Xh2OnM2nnZaSEHiL5dnAUU+pJFJRnqBAWnVze6MacJSxHcTUFiQIRw6FpZbN9pqCCJm0fxjNQdCez9t4ShBizectckaQxw0Wygef/r+66wryI4JYqfsSsMYaf+aRdFAyxmnWYr37ktLdJxTJ7fM7QFLvTARlOSzkKLOOBZEzafQEMb2Rz2rCBqV0VMnGWfZm9NljUzGIs6e7nCvI7wtC/FEfwUKUsFlyOMjWm5ES5DQHwRhmYtQfRP4OqjUH6W+jEJZoyGYDbUG8s7ur+LqFCzbo9gcBHIV7TvURjmAfIj4Um+3vEyK+T0r+e/v4YhlaqXmlRm7FsvqwjylehRbZukIZpr8/57XbQXTutB96ulGSbBoZKtcQ9jQqYVWJoiSxGO1RTatkvb92oP70KN3dwSJ98yOpbC1K/XG+MHmn73WbuooGbDjQ9a+KQHQZT1xlvTw+bMlaLtRls8QBxmNDG3bLxWWDuB1MWphpg9lhrEPFO5aYfPx7L5CrQ5FNVCNXzA61NijIZ+tcivvTOi+GzCTLQ+XzdYpVYZPZTWZ7R8kjEvegoiIKbvObTKsguEAGa34P+gRFHo78WPRb4c+yMCqRcCBuEtRYwd9VEZw0z5LEM0obhI7nEVigzPbxi6V4vvohhgPiBzLem6ra3iuGA4fYJnL5SpjKQK634SCaIUfckC7mo5wgl1lw3CB69+6lTVdRGndhapKpk0ELOyO4QlRLlzbBVWYLOjliJ873owPadYPXi3ULvKKD07T8oEXhVPbKm+MKcgW5gvyKIHZqfOby16Q0PcSgqLrjt/kVqIlwh1A1E4LfRpTrFHnmN7kRXC7/xB8ZerD103/W/wAAAABJRU5ErkJggg==);background-size:cover}.voice-photo-wrap .photo.data-v-415f9e0f{border-radius:35rpx;background-color:#ffbe76}.voice-photo-wrap .photo .photo-icon.data-v-415f9e0f{width:70rpx;height:70rpx;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAXVBMVEUAAAD////////////+/v7////////+/v7+/v7////////////////+/v7+/v7+/v7////+/v7+/v7+/v7+/v7////+/v7+/v7+/v7+/v7+/v7+/v7////+/v7///9dayJ/AAAAHnRSTlMAoDBf71BA3/eACCWI18+/eDjHso8Q56dYl2hHGG/EjhawAAABlUlEQVRo3u2W23KDIBBAEUERvF8ac+P/P7MVWiYDmk7o8tDMnrddlxydNe4SBEEQBEGQpFTZIfV2nbvwEi8R+hCxbDfhwizaUegnFECS/pmkApJ0zyQTgMS1RJQBbMt/fBXcXaqOdQx6wz/uHoCSl1mKgNo12INbexEgf5FQfcDOQakPoJGSca+4BZbMe8VnYAnfK+bAErVXfPuT5Mx99quv3GN+QZKTSHKUvKvkNtBbWsl6YuazP63JJNdSOxqeRjIHcxdekmmPE7yk1wE1tGT46UW1rlWrDWIAlnT2Z+0FmQsTdrCSwTrc6cJaKJzEdaQnjrvtCqikMyuWJA7JzOQHlZTBOzsZLahEBMvEbJoEKvkIFt0zvKTZsu1jZjQZUMnp+w12KLvEg0q4/+ebTOICKlmYvXNpQ5mZkC2gElI9jBHJR/e1B5XIUltYOzJtKRdgCVFMezAKP7SupecYUoxf1Tw6WpVmkZAX9zBNnm4lkqrPpi7r6TtskChByX+QsFjEC5J4UAIvURkAiiAIgiAIggDxCa/TqV5BIswVAAAAAElFTkSuQmCC);background-size:cover}.auto-search-dialog.data-v-415f9e0f{display:flex;justify-content:center;align-items:center;position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);z-index:999}.auto-search-dialog .auto-search-inner.data-v-415f9e0f{display:flex;flex-direction:column;justify-content:space-between;align-items:center;position:relative;width:70%;height:350rpx;padding:80rpx 0;background-color:#fff;border-radius:20rpx;box-shadow:0 0 20rpx #ccc}.auto-search-dialog .auto-search-inner .close.data-v-415f9e0f{position:absolute;left:0;right:0;bottom:-140rpx;width:90rpx;margin:0 auto}.auto-search-dialog text.data-v-415f9e0f{font-size:32rpx;width:80%}.auto-search-dialog .mic-icon.data-v-415f9e0f{display:flex;justify-content:center;align-items:center;width:150rpx;height:150rpx;border-radius:50%;border:8rpx solid #777}.auto-search-dialog .btn-wrap.data-v-415f9e0f{display:flex;justify-content:space-around;width:90%}.auto-search-dialog .btn-wrap .retry.data-v-415f9e0f,
|
||||
.auto-search-dialog .btn-wrap .confirm.data-v-415f9e0f{width:190rpx;height:60rpx;line-height:60rpx;text-align:center;font-size:28rpx;border:2rpx solid #777;border-radius:15rpx}.icon-error.data-v-415f9e0f{font-size:45px;margin-top:-30px;background:#fff;border-radius:50%;width:45px;height:45px}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/count/setting"],{"0f74":function(t,e,n){"use strict";var a=n("b83a"),r=n.n(a);r.a},"19de":function(t,e,n){"use strict";n.r(e);var a=n("395c"),r=n.n(a);for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);e["default"]=r.a},"2efa":function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("6caf");a(n("3240"));var r=a(n("508a"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"395c":function(t,e,n){"use strict";(function(t){var a=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n("7ca3")),c=n("8f59");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u={data:function(){return{kcal:{},nutrition:{},describe:[]}},computed:o(o({},(0,c.mapState)(["user"])),{},{userInfo:function(){return this.user}}),onLoad:function(){this.handleList()},methods:{handleList:function(){var t=this;t.$model.getCountSetKcal({aud_id:t.userInfo.aud_id}).then((function(e){0==e.code&&(t.kcal=e.data.kcal,t.nutrition=e.data.nutrition,t.describe=e.data.describe?e.data.describe:[])}))},handleEditUser:function(){t.navigateTo({url:"/pageTwo/me/userEdit?familayData="+JSON.stringify(this.userInfo)})},handleEditKcal:function(){t.navigateTo({url:"/pageTwo/count/KcalEdit?suggestion_kcal_range_val="+this.kcal.suggestion_kcal_range_val})}}};e.default=u}).call(this,n("df3c")["default"])},"508a":function(t,e,n){"use strict";n.r(e);var a=n("e638"),r=n("19de");for(var c in r)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(c);n("0f74");var i=n("828b"),o=Object(i["a"])(r["default"],a["b"],a["c"],!1,null,"b971e84c",null,!1,a["a"],void 0);e["default"]=o.exports},b83a:function(t,e,n){},e638:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=(this._self._c,this.describe.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},r=[]}},[["2efa","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "设置",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-b971e84c"><view data-event-opts="{{[['tap',[['handleEditUser',['$event']]]]]}}" class="info data-v-b971e84c" bindtap="__e"><view class="left data-v-b971e84c"><image src="{{userInfo.head_pic}}" class="data-v-b971e84c"></image><view class="name overflow data-v-b971e84c">{{userInfo.nickname}}</view><view class="data-v-b971e84c">{{userInfo.gender==1?'男':userInfo.gender==2?'女':'未知'}}</view><view class="data-v-b971e84c">{{userInfo.age+"岁"}}</view></view><icon class="iconfont icon-bianji data-v-b971e84c"></icon></view><view data-event-opts="{{[['tap',[['handleEditKcal']]]]}}" class="kcal data-v-b971e84c" bindtap="__e"><view class="text data-v-b971e84c">{{''+kcal.title+''}}<text class="data-v-b971e84c">修改></text></view><view class="num data-v-b971e84c"><text class="data-v-b971e84c">{{kcal.suggestion_kcal_val}}</text>{{kcal.suggestion_kcal_unit+''}}</view><block wx:for="{{kcal.describe}}" wx:for-item="ite" wx:for-index="ind"><view class="desc data-v-b971e84c">{{''+ite+''}}</view></block></view><view class="kcal data-v-b971e84c"><view class="text data-v-b971e84c">{{''+nutrition.title+''}}</view><view class="num data-v-b971e84c"><block wx:for="{{nutrition.list}}" wx:for-item="ite" wx:for-index="ind"><view class="item data-v-b971e84c"><icon class="{{['iconfont','data-v-b971e84c',ite.icon]}}"></icon><text class="data-v-b971e84c">{{ite.name}}</text><text class="data-v-b971e84c">{{ite.proportion}}</text><view class="val data-v-b971e84c">{{ite.val+ite.unit}}</view></view></block></view><block wx:for="{{describe}}" wx:for-item="ite" wx:for-index="ind"><block wx:if="{{$root.g0}}"><view class="desc data-v-b971e84c">{{''+ite+''}}</view></block></block></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-b971e84c{padding:0 10px}.info.data-v-b971e84c{width:calc(100% - 20px);background:#fff;border-radius:10px;padding:10px;display:flex;align-items:center;margin-bottom:15px;justify-content:space-between}.info .left.data-v-b971e84c{display:flex;align-items:center}.info .left .name.data-v-b971e84c{max-width:50%;font-weight:700}.info .left view.data-v-b971e84c{margin-right:15px}.info .left image.data-v-b971e84c{width:50px;height:50px;border-radius:50%;margin-right:10px;border:1px solid #dfdfdf}.info icon.data-v-b971e84c{font-size:20px}.kcal.data-v-b971e84c{width:100%;background:#fff;border-radius:10px;padding:10px 0;margin-bottom:15px}.kcal .text.data-v-b971e84c{padding:5px 10px;display:flex;justify-content:space-between}.kcal .num.data-v-b971e84c{width:100%;text-align:center;margin:15px 0;display:flex;justify-content:center;align-items:baseline}.kcal .num text.data-v-b971e84c{font-size:25px;font-weight:700;margin-right:5px;color:#ff4c4f;border-bottom:1px solid}.kcal .num .item.data-v-b971e84c{display:flex;flex-wrap:wrap;width:33.3%;justify-content:center}.kcal .num .item icon.data-v-b971e84c{font-size:40px;color:#f0ad4e;border-radius:30%;padding:5px;margin-bottom:8px}.kcal .num .item text.data-v-b971e84c{font-size:14px;font-weight:500;color:#666;display:inline-block;width:100%;text-align:center;line-height:20px;border-bottom:none}.kcal .num .item .val.data-v-b971e84c{width:100px;background:#f7f7f7;border-radius:10px;margin:auto;margin-top:8px;font-weight:700;padding:2px 0}.kcal .desc.data-v-b971e84c{margin:0 10px;font-size:12px;color:#999;line-height:20px}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/login/forgetPassword"],{2597:function(e,t,o){"use strict";o.r(t);var n=o("890d"),s=o("38d2");for(var a in s)["default"].indexOf(a)<0&&function(e){o.d(t,e,(function(){return s[e]}))}(a);o("94bc");var d=o("828b"),i=Object(d["a"])(s["default"],n["b"],n["c"],!1,null,"f4bdba46",null,!1,n["a"],void 0);t["default"]=i.exports},"38d2":function(e,t,o){"use strict";o.r(t);var n=o("97d2"),s=o.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(a);t["default"]=s.a},"51b8":function(e,t,o){"use strict";(function(e,t){var n=o("47a9");o("6caf");n(o("3240"));var s=n(o("2597"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(s.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"890d":function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return s})),o.d(t,"a",(function(){}));var n=function(){var e=this.$createElement;this._self._c},s=[]},"94bc":function(e,t,o){"use strict";var n=o("aff0"),s=o.n(n);s.a},"97d2":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{phone:"",code:"",password:"",password2:"",disabled:!1,second:60,value:1,type:""}},onLoad:function(e){this.type=e.type},methods:{checkboxChange:function(e){this.value=e.detail.value.length?e.detail.value[0]:"0"},handleTelLogin:function(){var t=this,o=-1!==t.phone.indexOf("@");if(0!=t.value)if(o||/^1[3456789]\d{9}$/.test(t.phone))if(!o||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(t.phone))if(t.code)if(t.password)if(t.password2){if(t.password2==t.password){var n={data:t.phone,password:t.password,c_password:t.password2,code:t.code},s="register"==t.type?t.$model.getregister(n):t.$model.getResetPassword(n);return s.then((function(o){console.log("注册",o),0==o.code?(e.setStorageSync("token",o.data.token),e.setStorageSync("aan_id",o.data.aan_id),t.$tools.msg("设置成功,进入程序中"),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),1e3)):t.$tools.msg(o.msg)})).catch((function(e){}))}t.$tools.msg("请确认两次密码填写一致")}else t.$tools.msg("请确认密码");else t.$tools.msg("请填写密码");else t.$tools.msg("请填写验证码");else t.$tools.msg("请输入正确的邮箱");else t.$tools.msg("请输入正确的手机号");else t.$tools.msg("请先确认勾选协议")},handleCode:function(){var e=this,t=-1!==e.phone.indexOf("@");t||/^1[3456789]\d{9}$/.test(e.phone)?!t||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e.phone)?e.$model.getSendCode({data:e.phone,type:e.type}).then((function(t){if(console.log(t),0==t.code){e.disabled=!0;var o=setInterval((function(){--e.second}),1e3);setTimeout((function(){clearInterval(o),e.disabled=!1,e.second=60}),6e4)}else e.$tools.msg(t.msg)})).catch((function(e){})):e.$tools.msg("请输入正确的邮箱"):e.$tools.msg("请输入正确的手机号")},handlexieyi:function(){}}};t.default=o}).call(this,o("df3c")["default"])},aff0:function(e,t,o){}},[["51b8","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "密码",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-f4bdba46"><view class="login data-v-f4bdba46"><view class="editem data-v-f4bdba46"><view class="item data-v-f4bdba46"><view class="text data-v-f4bdba46">手机号/邮箱</view><view class="input data-v-f4bdba46"><input type="text" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-f4bdba46"/></view></view><view class="item data-v-f4bdba46"><view class="text data-v-f4bdba46">验证码</view><view class="input yanzhengma data-v-f4bdba46"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-f4bdba46" value="{{code}}" bindinput="__e"/><button class="code data-v-f4bdba46" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+'S后重发':'获取验证码')+''}}</button></view></view><view class="item data-v-f4bdba46"><view class="text data-v-f4bdba46">密码</view><view class="input data-v-f4bdba46"><input data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" class="uni-input data-v-f4bdba46" value="{{password}}" bindinput="__e"/></view></view><view class="item data-v-f4bdba46"><view class="text data-v-f4bdba46">确认密码</view><view class="input data-v-f4bdba46"><input data-event-opts="{{[['input',[['__set_model',['','password2','$event',[]]]]]]}}" class="uni-input data-v-f4bdba46" value="{{password2}}" bindinput="__e"/></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-f4bdba46" bindtap="__e">确认</view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-f4bdba46{width:100%;height:100vh;background:#fff}.bg.data-v-f4bdba46{position:absolute;top:0;width:100%;height:50vh;z-index:9}.login.data-v-f4bdba46{width:calc(100% - 30px);height:auto;background:#fff;border-radius:10px;padding:15px;background-color:#fff;z-index:99}.login .title.data-v-f4bdba46{text-align:left;color:#333;font-size:40rpx;font-weight:700;margin-bottom:15px}.login .editem.data-v-f4bdba46{position:relative;display:flex;align-items:center;font-size:32rpx;justify-content:space-between;flex-wrap:wrap}.login .editem .item.data-v-f4bdba46{width:100%;display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.login .editem .item .text.data-v-f4bdba46{width:240rpx;height:40px;line-height:40px;font-size:32rpx}.login .editem .item .input.data-v-f4bdba46{width:calc(100% - 240rpx);height:35px;line-height:35px;display:flex;position:relative;border:#dfdfdf 1px solid;border-radius:5px;padding:0 10px;background-color:#f7f7f7}.login .editem .item input.data-v-f4bdba46{height:40px;line-height:40px;position:absolute;left:10px;right:0;z-index:88;font-size:28rpx}.login .editem .item .yanzhengma input.data-v-f4bdba46{right:220rpx;font-size:28rpx}.login .editem .code.data-v-f4bdba46{width:220rpx;background:#dfdfdf;font-size:28rpx;margin:0;line-height:40px;border-radius:5px;text-align:center;position:absolute;right:0;top:0;bottom:0;z-index:99}.login .editem .forget.data-v-f4bdba46{width:80px;background:#fff;color:#333}.login .btngroup.data-v-f4bdba46{width:100%;height:35px;line-height:35px;display:flex;justify-content:center}.login .btngroup text.data-v-f4bdba46{display:block;color:#333}.login .btnlogin.data-v-f4bdba46{width:100%;margin:15px 0;height:42px;line-height:42px;background:#f0ae43;font-weight:700;border-radius:15px;text-align:center;color:#fff!important}.xieyi.data-v-f4bdba46{font-size:32rpx;color:#333}.xieyi text.data-v-f4bdba46{border-bottom:1px solid #333}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/login/login"],{"17aa":function(e,t,n){"use strict";n.r(t);var o=n("38c1"),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=a.a},"20b2":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6caf");o(n("3240"));var a=o(n("4025"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"38c1":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{phone:"",code:"",password:"",disabled:!1,second:60,value:0,isCode:!0,loginCode:""}},onLoad:function(){this.login()},methods:{checkboxChange:function(e){this.value=e.detail.value.length?e.detail.value[0]:"0"},handleTelLogin:function(){var t=this,n=-1!==t.phone.indexOf("@");0!=t.value?n||/^1[3456789]\d{9}$/.test(t.phone)?!n||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(t.phone)?!t.isCode||t.code?t.isCode||t.password?this.$model.getonlogin({data:t.phone,validate_data:t.isCode?t.code:t.password,validate_type:t.isCode?"code":"password"}).then((function(n){console.log("data",n.data),t.$tools.msg(n.msg),0==n.code&&(t.$tools.msg("登录成功"),e.setStorageSync("token",n.data.token),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),2e3))})).catch((function(e){})):t.$tools.msg("请输入正确密码"):t.$tools.msg("请输入验证码"):t.$tools.msg("请输入正确的邮箱"):t.$tools.msg("请输入正确的手机号"):t.$tools.msg("请先确认勾选协议")},handleCode:function(){var e=this,t=-1!==e.phone.indexOf("@");t||/^1[3456789]\d{9}$/.test(e.phone)?!t||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e.phone)?e.$model.getSendCode({data:e.phone,type:"login"}).then((function(t){if(console.log(t),0==t.code){e.disabled=!0;var n=setInterval((function(){--e.second}),1e3);setTimeout((function(){clearInterval(n),e.disabled=!1,e.second=60}),6e4)}else e.$tools.msg(t.msg)})).catch((function(e){})):e.$tools.msg("请输入正确的邮箱"):e.$tools.msg("请输入正确的手机号")},login:function(){var t=this;e.login({success:function(e){e.code&&(e.errMsg="login:ok")&&(t.loginCode=e.code)}})},getPhoneNumber:function(t){var n=this;"getPhoneNumber:ok"==t.detail.errMsg&&this.$model.getRegisterPhone({code:n.loginCode,encryptedData:t.detail.encryptedData,iv:t.detail.iv}).then((function(t){0==t.code&&(n.value=1,e.setStorageSync("token",t.data.token),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),1e3))}))},handleIsTel:function(){0!=this.value||this.$tools.msg("请先确认勾选协议")},handleToggle:function(){this.phone="",this.isCode=!this.isCode},handlePassword:function(t){e.navigateTo({url:"/pageTwo/login/forgetPassword?type="+t})},handlexieyi:function(){e.navigateTo({url:"/pageTwo/webview/webview?url=https://tc.pcxbc.com/kitchenscale_all/privacy_index.html"})},handleUserXieyi:function(){}}};t.default=n}).call(this,n("df3c")["default"])},4025:function(e,t,n){"use strict";n.r(t);var o=n("ce08"),a=n("17aa");for(var i in a)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(i);n("eb98");var s=n("828b"),c=Object(s["a"])(a["default"],o["b"],o["c"],!1,null,"aeec535c",null,!1,o["a"],void 0);t["default"]=c.exports},a503:function(e,t,n){},ce08:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},a=[]},eb98:function(e,t,n){"use strict";var o=n("a503"),a=n.n(o);a.a}},[["20b2","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"navigationBarTitleText": "登录",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-aeec535c"><view class="bg data-v-aeec535c"></view><view class="top data-v-aeec535c"><image class="data-v-aeec535c"></image><text class="data-v-aeec535c">轻厨记</text></view><view class="login box_shadow data-v-aeec535c"><view class="title data-v-aeec535c">登录</view><view data-event-opts="{{[['tap',[['handleToggle',['$event']]]]]}}" class="toggle cblue data-v-aeec535c" bindtap="__e">切换登录</view><view class="editem data-v-aeec535c"><view class="item data-v-aeec535c"><view class="text data-v-aeec535c">手机号/邮箱</view><view class="input data-v-aeec535c"><input data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-aeec535c"/></view></view><block wx:if="{{isCode}}"><view class="item data-v-aeec535c"><view class="text data-v-aeec535c">验证码</view><view class="input yanzhengma data-v-aeec535c"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-aeec535c" value="{{code}}" bindinput="__e"/><button class="code data-v-aeec535c" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+'S后重发':'获取验证码')+''}}</button></view></view></block><block wx:else><view class="item data-v-aeec535c"><view class="text data-v-aeec535c">密码</view><view class="input data-v-aeec535c"><input data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" class="uni-input data-v-aeec535c" value="{{password}}" bindinput="__e"/></view></view></block><block wx:if="{{!isCode}}"><view class="forget data-v-aeec535c"><text data-event-opts="{{[['tap',[['handlePassword',['forgetPassword']]]]]}}" bindtap="__e" class="data-v-aeec535c">忘记密码?</text></view></block></view><view class="xieyi data-v-aeec535c"><checkbox-group data-event-opts="{{[['change',[['checkboxChange',['$event']]]]]}}" class="group data-v-aeec535c" bindchange="__e"><label class="data-v-aeec535c"><checkbox style="transform:scale(0.7);" value="{{1}}" class="data-v-aeec535c"></checkbox>阅读并同意<text data-event-opts="{{[['tap',[['',['$event']],['handlexieyi',['$event']]]]]}}" class="blue data-v-aeec535c" catchtap="__e">《隐私协议》</text></label></checkbox-group></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-aeec535c" bindtap="__e">登录</view><view data-event-opts="{{[['tap',[['handlePassword',['register']]]]]}}" class="btngroup data-v-aeec535c" bindtap="__e"><text class="data-v-aeec535c">注册</text></view></view><view class="wxbtn data-v-aeec535c"><block wx:if="{{value==1}}"><button open-type="getPhoneNumber" data-event-opts="{{[['getphonenumber',[['getPhoneNumber',['$event']]]]]}}" bindgetphonenumber="__e" class="data-v-aeec535c"><view class="data-v-aeec535c"><image src="../../static/phone.png" class="data-v-aeec535c"></image></view><text class="data-v-aeec535c">手机号快捷登录</text></button></block><block wx:else><button data-event-opts="{{[['tap',[['handleIsTel',['$event']]]]]}}" bindtap="__e" class="data-v-aeec535c"><view class="data-v-aeec535c"><image src="../../static/phone.png" class="data-v-aeec535c"></image></view><text class="data-v-aeec535c">手机号快捷登录</text></button></block></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.bg.data-v-aeec535c{position:absolute;top:0;width:100%;height:50vh;z-index:9;background:#ff4c4f}.top.data-v-aeec535c{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;position:relative;top:70px;z-index:99;margin-bottom:15px}.top image.data-v-aeec535c{width:70px;height:70px;margin:auto;margin-bottom:10px;border-radius:50%}.top text.data-v-aeec535c{color:#fff;display:block;width:100%;font-size:18px;text-align:center;font-weight:700}.login.data-v-aeec535c{width:86%;height:auto;background:#fff;border-radius:10px;padding:10px 0;background-color:#fff;z-index:99;position:absolute;left:7%;top:28%;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.login .title.data-v-aeec535c{text-align:left;color:#333;font-size:40rpx;font-weight:700;margin-bottom:15px;margin-left:15px}.login .toggle.data-v-aeec535c{position:absolute;right:15px;top:20px}.login .editem.data-v-aeec535c{position:relative;display:flex;align-items:center;font-size:32rpx;margin:0 15px;justify-content:space-between;flex-wrap:wrap}.login .editem .item.data-v-aeec535c{width:100%;margin-bottom:15px}.login .editem .item .text.data-v-aeec535c{font-size:32rpx;margin-bottom:10px}.login .editem .item .input.data-v-aeec535c{height:35px;line-height:35px;display:flex;position:relative;border:#dfdfdf 1px solid;padding:0 10px;border-radius:5px}.login .editem .item input.data-v-aeec535c{height:40px;line-height:40px;position:absolute;left:10px;right:0;z-index:88;font-size:32rpx}.login .editem .item .yanzhengma input.data-v-aeec535c{right:240rpx;font-size:32rpx}.login .editem .code.data-v-aeec535c{width:220rpx;background:#dfdfdf;font-size:28rpx;margin:0;line-height:40px;border-radius:5px;text-align:center;position:absolute;right:0;top:0;bottom:0;z-index:99}.login .editem .forget.data-v-aeec535c{width:100%;font-size:28rpx!important;background:#fff;color:#333;text-align:right}.login .editem .forget text.data-v-aeec535c{width:100px;text-align:right}.login .btngroup.data-v-aeec535c{height:35px;line-height:35px;display:flex;margin:0 15px;justify-content:center}.login .btngroup text.data-v-aeec535c{display:block;color:#333}.login .btnlogin.data-v-aeec535c{width:calc(100% - 30px);margin:15px;height:42px;line-height:42px;background:#f0ae43;font-weight:700;border-radius:15px;text-align:center;color:#fff!important}.xieyi.data-v-aeec535c{font-size:32rpx;color:#333;margin-left:10px}.xieyi text.data-v-aeec535c{border-bottom:1px solid #333}.content.data-v-aeec535c{width:100%;height:100vh}.xieyi.data-v-aeec535c{font-size:28rpx;color:#999;margin-left:10px}.xieyi text.data-v-aeec535c{color:#ff4c4f}.href.data-v-aeec535c{width:auto}.wxbtn.data-v-aeec535c{width:100%;position:absolute;margin-top:30px;top:80%}.wxbtn icon.data-v-aeec535c{font-size:25px;color:#28c445}.wxbtn text.data-v-aeec535c{display:block;margin-top:5px;font-size:12px;text-align:center;border-bottom:1px solid #00f;color:#00f}.wxbtn button.data-v-aeec535c{line-height:normal;background:#efefef;display:flex;flex-wrap:wrap;padding:0;justify-content:center}.wxbtn button.data-v-aeec535c::after{display:none}.wxbtn view.data-v-aeec535c{width:100%}.wxbtn image.data-v-aeec535c{width:30px;height:30px;border-radius:50%}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/feedBack"],{"15c1":function(t,e,n){"use strict";var r=n("5407"),o=n.n(r);o.a},"38ec":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n("7ca3")),c=n("8f59");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var i={data:function(){return{formdata:{phone:"",content:""}}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,c.mapState)([])),onLoad:function(){},methods:{submit:function(){var e=this;this.formdata.phone.trim()?/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.formdata.phone)?this.formdata.content.trim()?this.$model.submitadvice(this.formdata).then((function(n){e.$tools.msg(n.message),setTimeout((function(){t.switchTab({url:"/pages/me/me"})}),500)})).catch((function(t){e.$tools.msg("提交失败,请稍后重试!")})):this.$tools.msg("请输入建议"):this.$tools.msg("请输入正确的联系方式"):this.$tools.msg("请输入联系方式")}}};e.default=i}).call(this,n("df3c")["default"])},5407:function(t,e,n){},5695:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var r=function(){var t=this.$createElement;this._self._c},o=[]},"792f":function(t,e,n){"use strict";n.r(e);var r=n("5695"),o=n("a16e");for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);n("15c1");var a=n("828b"),i=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,"5f6de9ec",null,!1,r["a"],void 0);e["default"]=i.exports},a16e:function(t,e,n){"use strict";n.r(e);var r=n("38ec"),o=n.n(r);for(var c in r)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(c);e["default"]=o.a},c51a:function(t,e,n){"use strict";(function(t,e){var r=n("47a9");n("6caf");r(n("3240"));var o=r(n("792f"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["c51a","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "意见反馈",
|
||||
"navigationBarBackgroundColor": "#F9FAFC",
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-5f6de9ec"><view class="formbox data-v-5f6de9ec"><view class="input data-v-5f6de9ec"><input type="text" placeholder="在此输入您的联系方式" data-event-opts="{{[['input',[['__set_model',['$0','phone','$event',[]],['formdata']]]]]}}" value="{{formdata.phone}}" bindinput="__e" class="data-v-5f6de9ec"/></view><view class="input textarea data-v-5f6de9ec"><textarea name="content" placeholder="有什么想说的,尽管来吧..." data-event-opts="{{[['input',[['__set_model',['$0','content','$event',[]],['formdata']]]]]}}" value="{{formdata.content}}" bindinput="__e" class="data-v-5f6de9ec"></textarea></view><view class="btn data-v-5f6de9ec" type="button" data-event-opts="{{[['tap',[['submit',['$event']]]]]}}" bindtap="__e">提交</view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.formbox.data-v-5f6de9ec{padding:15px;width:calc(100% - 30px)}.input.data-v-5f6de9ec{margin:0;display:flex;border-radius:10px;padding:10px;margin-bottom:1rem;background:#fff}.input input.data-v-5f6de9ec{width:100%;height:1.5rem;line-height:1.5rem;background:none;border:none;font-size:14px}.input.data-v-5f6de9ec textarea{width:100%;height:6rem;line-height:20px;background:none;border:none;font-size:14px}.btn.data-v-5f6de9ec{color:#fff;margin:15px 0}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/foodlist"],{"2ed0":function(t,e,n){"use strict";n.r(e);var i=n("accc"),o=n("8f55");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("79e7");var c=n("828b"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"6252f0d2",null,!1,i["a"],void 0);e["default"]=s.exports},3731:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("af34")),a=i(n("7ca3")),c=n("8f59");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u={components:{search:function(){n.e("components/search").then(function(){return resolve(n("f7da"))}.bind(null,n)).catch(n.oe)}},data:function(){return{text:"",index:0,leftInd:0,menu:[],menu2:[],menu3:[],menulist:[],ActiveList:[],page:1,type:"",name:"",lastPage:""}},computed:r(r({},(0,c.mapState)(["foodList"])),{},{menuTop:function(){return this.menu2=this.foodList.length?this.foodList[0].list:[],console.log([].concat((0,o.default)(this.foodList),[{id:4,list:[],name:"搜索"}])),[].concat((0,o.default)(this.foodList),[{id:4,list:[],name:"搜索"}])}}),onLoad:function(t){if(t&&t.list){var e=JSON.parse(t.list);console.log("11111111",e)}this.handleHomeInfo()},onPullDownRefresh:function(){!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据!",icon:"none"}):(this.page++,this.menu2.length&&this.handleHomeInfo(),setTimeout((function(){t.stopPullDownRefresh()}),500))},methods:{handleHomeInfo:function(){var t=this;t.$model.getCookFoodList({food_level2_id:t.menu2[t.leftInd].id,page:t.page,search_data:t.name}).then((function(e){0==e.code&&(t.lastPage=e.data.page_total,t.menu3=t.menu3.concat(e.data.content_list))}))},handleToggle:function(t){this.index=t,this.leftInd=0,this.menu2=this.menuTop[t].list,this.menu3=[],this.page=1,this.menu2.length&&this.handleHomeInfo()},handleToggleLeft:function(t){this.leftInd=t,this.menu3=[],this.page=1,this.handleHomeInfo()},handleDetail:function(t,e){var n=[];if(1==e)n.push(t),this.ActiveList=this.$tools.mergeAndDeduplicate(this.ActiveList,n,"name");else for(var i=0;i<this.ActiveList.length;i++)t.name==this.ActiveList[i].name&&this.ActiveList.splice(i,1)},handledelete:function(){this.ActiveList=[]},handlesubbtn:function(){var e=getCurrentPages(),n=e[e.length-2];n.$vm.getAddFood(this.ActiveList),t.navigateBack({delta:1})},handleSearch:function(e){var n=this;""!=e&&n.$model.getFoodSearch({food_name:e}).then((function(e){0==e.code?(n.index=3,n.menu2=[],n.menu3=e.data):t.showToast({title:e.msg,icon:"error"})}))}}};e.default=u}).call(this,n("df3c")["default"])},"543d":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("6caf");i(n("3240"));var o=i(n("2ed0"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"79e7":function(t,e,n){"use strict";var i=n("91fe"),o=n.n(i);o.a},"8f55":function(t,e,n){"use strict";n.r(e);var i=n("3731"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"91fe":function(t,e,n){},accc:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.ActiveList.length),i=t.__map(t.menu3,(function(e,n){var i=t.__get_orig(e),o=t.ActiveList.indexOf(e),a=t.ActiveList.indexOf(e);return{$orig:i,g1:o,g2:a}})),o=t.menu3.length,a=t.ActiveList.length;t.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g3:o,g4:a}})},o=[]}},[["543d","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"navigationBarTitleText": "食材库",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"search": "/components/search"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-6252f0d2"><search bind:handleSearch="__e" vue-id="0a112d43-1" data-event-opts="{{[['^handleSearch',[['handleSearch']]]]}}" class="data-v-6252f0d2" bind:__l="__l"></search><view class="tab_list data-v-6252f0d2"><scroll-view class="scroll-menu data-v-6252f0d2" style="white-space:nowrap;" scroll-x="true"><block wx:for="{{menuTop}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggle',[ind]]]]]}}" class="tabbar data-v-6252f0d2" bindtap="__e"><view class="{{['data-v-6252f0d2',index==ind?'active':'']}}">{{ite.name}}</view></view></block></scroll-view></view><view class="{{['box','menu','data-v-6252f0d2',$root.g0?'maxheight':'']}}"><view class="left data-v-6252f0d2"><block wx:for="{{menu2}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggleLeft',[ind]]]]]}}" class="{{['name','data-v-6252f0d2',leftInd==ind?'active':'']}}" bindtap="__e">{{''+ite.name+''}}</view></block></view><view class="right data-v-6252f0d2"><view class="list mt-15 data-v-6252f0d2"><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleDetail',['$0',1],[[['menu3','',ind]]]]]]]}}" class="{{['item','data-v-6252f0d2',ite.g1!=-1?'active0':'']}}" bindtap="__e"><text class="overflow data-v-6252f0d2">{{ite.$orig.name}}</text><icon class="{{['iconfont','data-v-6252f0d2',ite.g2!=-1?'icon-xuanzhong':'icon-add']}}"></icon></view></block></view><block wx:if="{{!$root.g3}}"><view class="nolist data-v-6252f0d2"><icon class="iconfont icon-wancan data-v-6252f0d2"></icon><text class="data-v-6252f0d2">还没有数据哦!</text></view></block></view></view><block wx:if="{{$root.g4}}"><view class="activeList data-v-6252f0d2"><view class="list data-v-6252f0d2"><block wx:for="{{ActiveList}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view class="item data-v-6252f0d2"><text class="data-v-6252f0d2">{{ite.name}}</text><icon data-event-opts="{{[['tap',[['handleDetail',['$0',2],[[['ActiveList','',ind]]]]]]]}}" class="iconfont icon-quxiao data-v-6252f0d2" bindtap="__e"></icon></view></block></view><view class="groupbtn data-v-6252f0d2"><view data-event-opts="{{[['tap',[['handledelete',['$event']]]]]}}" bindtap="__e" class="data-v-6252f0d2">清空</view><view data-event-opts="{{[['tap',[['handlesubbtn',['$event']]]]]}}" class="subbtn data-v-6252f0d2" bindtap="__e">确定</view></view></view></block></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.tab_list.data-v-6252f0d2{display:flex;top:50px;width:100%;position:fixed;z-index:99;height:45px;background:#fff;justify-content:space-between}.tab_list .scroll-menu.data-v-6252f0d2{width:100%}.tab_list .scroll-menu .tabbar.data-v-6252f0d2{padding:10px;display:inline-block}.tab_list .scroll-menu .tabbar view.data-v-6252f0d2{display:inline-block}.tab_list .active.data-v-6252f0d2{color:#fff;padding:5px 8px;border-radius:5px;background-color:#ff4c4f}.menu.data-v-6252f0d2{width:100%;position:relative;margin-top:101px;height:calc(100vh - 101px)!important}.menu .left.data-v-6252f0d2{top:101px!important;position:fixed;background-color:#f7f7f7;height:calc(100vh - 100px)}.menu .right.data-v-6252f0d2{top:0!important;height:calc(100vh - 100px)}.menu .right .list.data-v-6252f0d2{display:flex;flex-wrap:wrap}.menu .right .item.data-v-6252f0d2{width:29%;border:1px solid #dfdfdf;display:flex;align-items:center;box-sizing:border-box;justify-content:space-between;height:30px;border-radius:5px;margin:0 2% 10px;padding:0 5px}.menu .right .item text.data-v-6252f0d2{margin-bottom:0!important}.menu .right .icon-xuanzhong.data-v-6252f0d2{color:#ff4c4f}.menu .right .active0.data-v-6252f0d2{border:1px solid #ff4c4f}.activeList.data-v-6252f0d2{position:fixed;bottom:0;left:0;right:0;z-index:999;background:#fff;padding:10px 0;border-radius:10px 10px 0 0;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.activeList .list.data-v-6252f0d2{height:340rpx;overflow:scroll;padding-bottom:55px}.activeList .list .item.data-v-6252f0d2{border:1px solid #ff4c4f;display:flex;justify-content:space-between;height:28px;box-sizing:border-box;border-radius:5px;align-items:center;margin:0 2% 10px;float:left;padding:0 10px}.activeList .list .item icon.data-v-6252f0d2{color:#ff4c4f;font-size:16px;margin-left:10rpx}.activeList .groupbtn.data-v-6252f0d2{display:flex;justify-content:space-between;position:absolute;left:0;right:0;bottom:0;padding:10px;background:#fff;border-top:1px solid #f7f7f7}.activeList .groupbtn view.data-v-6252f0d2{width:40%;text-align:center;border:1px solid #dfdfdf;border-radius:10px;height:31px;line-height:31px}.activeList .groupbtn .subbtn.data-v-6252f0d2{color:#fff;border-color:#ff4c4f;background-color:#ff4c4f}.maxheight .left.data-v-6252f0d2{height:calc(100vh - 680rpx)}.maxheight .right.data-v-6252f0d2{height:calc(100vh - 680rpx)}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content addFood data-v-0d206e3c"><view data-event-opts="{{[['tap',[['handleFMimg',[0]]]]]}}" class="topimg data-v-0d206e3c" bindtap="__e"><block wx:if="{{FMimg}}"><image src="{{FMimg}}" mode="aspectFill" class="data-v-0d206e3c"></image></block><icon class="iconfont icon-add data-v-0d206e3c"></icon><text class="text data-v-0d206e3c">上传封面</text><text class="data-v-0d206e3c">(单张图片)</text></view><view class="title data-v-0d206e3c"><input type="text" placeholder="输入菜谱标题" data-event-opts="{{[['input',[['__set_model',['$0','title','$event',[]],['info']]]]]}}" value="{{info.title}}" bindinput="__e" class="data-v-0d206e3c"/></view><view class="title title2 data-v-0d206e3c"><view class="data-v-0d206e3c">菜谱类型:</view><picker mode="selector" range="{{menu}}" range-key="name" value="{{cookIndex}}" data-event-opts="{{[['change',[['changeMenuList',['$event']]]]]}}" bindchange="__e" class="data-v-0d206e3c"><view class="uni-input data-v-0d206e3c">{{''+(cookIndex!=null?menu[cookIndex].name:"请选择")+''}}<uni-icons vue-id="37e09b56-1" type="forward" size="20" color="#999" class="data-v-0d206e3c" bind:__l="__l"></uni-icons></view></picker></view><view class="textarea data-v-0d206e3c"><textarea name="content" placeholder="输入菜谱简介" maxlength="100" data-event-opts="{{[['input',[['__set_model',['$0','description','$event',[]],['info']]]]]}}" value="{{info.description}}" bindinput="__e" class="data-v-0d206e3c"></textarea></view><block wx:if="{{isFood}}"><view class="food data-v-0d206e3c"><view class="h4 data-v-0d206e3c">添加食材<block wx:if="{{$root.g0}}"><text data-event-opts="{{[['tap',[['handleClose',['$event']]]]]}}" class="close data-v-0d206e3c" bindtap="__e">清空</text></block></view><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><block wx:if="{{ite.g1}}"><view class="foodlist data-v-0d206e3c"><view class="item data-v-0d206e3c"><view class="name data-v-0d206e3c">{{ite.$orig.name}}</view><view class="input data-v-0d206e3c"><input class="text data-v-0d206e3c" placeholder="请输入用量" type="digit" data-event-opts="{{[['input',[['__set_model',['$0','weight','$event',[]],[[['info.food_list','',ind]]]]]]]}}" value="{{ite.$orig.weight}}" bindinput="__e"/>{{ite.$orig.unit+''}}</view><view class="edit data-v-0d206e3c"><icon data-event-opts="{{[['tap',[['handledel',[ind,'food']]]]]}}" class="iconfont icon-ashbin data-v-0d206e3c" bindtap="__e"></icon><image class="xia data-v-0d206e3c" src="../../static/xia.png" data-event-opts="{{[['tap',[['handleMove',[ind,0,'food']]]]]}}" bindtap="__e"></image><image class="shang xia data-v-0d206e3c" src="../../static/xia.png" data-event-opts="{{[['tap',[['handleMove',[ind,1,'food']]]]]}}" bindtap="__e"></image></view></view></view></block></block><view data-event-opts="{{[['tap',[['handleAddfood']]]]}}" class="add data-v-0d206e3c" bindtap="__e">+添加食材</view></view></block><view class="step data-v-0d206e3c"><view class="h4 data-v-0d206e3c">添加步骤</view><block wx:for="{{$root.l2}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><block wx:if="{{$root.g2}}"><view class="step_list data-v-0d206e3c"><view class="top data-v-0d206e3c"><text class="data-v-0d206e3c">{{"步骤"+(ind+1)}}</text><view class="edit data-v-0d206e3c"><icon data-event-opts="{{[['tap',[['handledel',[ind,'step']]]]]}}" class="iconfont icon-ashbin data-v-0d206e3c" bindtap="__e"></icon><image class="xia data-v-0d206e3c" src="../../static/xia.png" data-event-opts="{{[['tap',[['handleMove',[ind,0,'step']]]]]}}" bindtap="__e"></image><image class="shang xia data-v-0d206e3c" src="../../static/xia.png" data-event-opts="{{[['tap',[['handleMove',[ind,1,'step']]]]]}}" bindtap="__e"></image></view></view><view class="right data-v-0d206e3c"><view data-event-opts="{{[['tap',[['handleBZimage',['$0',ind],[[['info.step_list','',ind]]]]]]]}}" class="image data-v-0d206e3c" bindtap="__e"><block wx:for="{{ite.l1}}" wx:for-item="img" wx:for-index="id"><block wx:if="{{img.g3}}"><image src="{{img.$orig}}" mode="aspectFill" class="data-v-0d206e3c"></image></block></block><icon class="iconfont icon-add data-v-0d206e3c"></icon><text class="text data-v-0d206e3c">上传封面</text></view><view class="textarea data-v-0d206e3c"><textarea name="content" placeholder="输入步骤说明" maxlength="100" data-event-opts="{{[['input',[['__set_model',['$0','description','$event',[]],[[['info.step_list','',ind]]]]]]]}}" value="{{ite.$orig.description}}" bindinput="__e" class="data-v-0d206e3c"></textarea></view></view></view></block></block><view data-event-opts="{{[['tap',[['handleAddstep',['$event']]]]]}}" class="add data-v-0d206e3c" bindtap="__e">+添加步骤</view></view><view class="groupbtn data-v-0d206e3c"><view data-event-opts="{{[['tap',[['handleLook',[1]]]]]}}" bindtap="__e" class="data-v-0d206e3c">预览</view><view data-event-opts="{{[['tap',[['handleLook',[2]]]]]}}" class="subbtn data-v-0d206e3c" bindtap="__e">保存</view></view></view>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
.content.data-v-0d206e3c{padding:0 15px}.topimg.data-v-0d206e3c{width:100%;height:320px;background:#fff;border-radius:10px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;flex-direction:column;margin-bottom:10px;overflow:hidden;position:relative}.topimg .iconfont.data-v-0d206e3c{font-size:30px;color:#ff4c4f}.topimg text.data-v-0d206e3c{display:inline-block;width:100%;text-align:center;font-size:12px;color:#999}.topimg .text.data-v-0d206e3c{font-size:16px;color:#666;margin-bottom:3px}.topimg image.data-v-0d206e3c{width:100%;height:inherit}.step .image.data-v-0d206e3c{height:320px;margin:auto;background:#f7f7f7;border-radius:10px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;flex-direction:column;overflow:hidden}.step .image image.data-v-0d206e3c{width:100%;height:inherit;display:inline-table}.step .image icon.data-v-0d206e3c{font-size:30px;color:#ff4c4f;margin-bottom:5px}.data-v-0d206e3c .is-add{flex-wrap:wrap;flex-direction:column}.title.data-v-0d206e3c input,
|
||||
.textarea.data-v-0d206e3c input{height:40px;line-height:40px}.title.data-v-0d206e3c textarea,
|
||||
.textarea.data-v-0d206e3c textarea{width:100%;height:6rem;line-height:20px;background:none;border:none;font-size:14px;padding-top:10px}.title2.data-v-0d206e3c{display:flex;align-items:center;justify-content:space-between}.data-v-0d206e3c picker{height:45px;line-height:45px}.data-v-0d206e3c picker .uni-input{display:flex;justify-content:space-between;align-items:center}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"navigationBarTitleText": "详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"blue-tooth": "/components/bluetooth_new"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-0adde86e{padding:0 15px}.maxheight.data-v-0adde86e{max-height:90vh!important;overflow:hidden}.topimg.data-v-0adde86e{width:100%;height:320px;background:#fff;border-radius:10px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;flex-direction:column;margin-bottom:10px;overflow:hidden;position:relative}.topimg .iconfont.data-v-0adde86e{font-size:30px;color:#ff4c4f}.topimg text.data-v-0adde86e{display:inline-block;width:100%;text-align:center;color:#999}.topimg .text.data-v-0adde86e{font-size:16px;color:#666;margin-bottom:3px}.topimg image.data-v-0adde86e{width:100%;height:inherit}.step .image.data-v-0adde86e{height:320px;margin:auto;background:#f7f7f7;border-radius:10px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;flex-direction:column;overflow:hidden}.step .image image.data-v-0adde86e{width:100%;height:inherit;display:inline-table}.step .image icon.data-v-0adde86e{font-size:30px;color:#ff4c4f;margin-bottom:5px}.title.data-v-0adde86e{padding:10px}.title .table.data-v-0adde86e{font-size:16px;font-weight:700}.title .user.data-v-0adde86e{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.title .user .left.data-v-0adde86e{display:flex;align-items:center}.title .user .left image.data-v-0adde86e{width:25px;height:25px;margin-right:5px;border-radius:50%}.title .user .right.data-v-0adde86e{display:flex}.desc.data-v-0adde86e{width:100%;line-height:25px;margin-bottom:10px}.h4.data-v-0adde86e{margin:10px 0;padding-top:10px;border-top:1px solid #f7f7f7}.h4 .tags.data-v-0adde86e{flex:1;display:flex;justify-content:space-around}.h4 .tags .tags-item.data-v-0adde86e{border-bottom:2px solid transparent}.h4 .tags .active.data-v-0adde86e{border-bottom:2px solid #ff4c4f}.h4 .close.data-v-0adde86e{color:#fff;width:100px;display:flex;align-items:center;justify-content:center;border-radius:10px;background-color:#ff4c4f}.h4 .close image.data-v-0adde86e{width:25px;height:25px}.step.data-v-0adde86e{margin-bottom:85px}.foodlist.data-v-0adde86e{border-radius:10px;background:#fff}.foodlist .item.data-v-0adde86e{margin-top:0!important;border-radius:0!important;border-bottom:1px solid #f7f7f7}.foodlist .name.data-v-0adde86e{border-right:none!important}.foot.data-v-0adde86e{position:fixed;bottom:0;left:0;right:0;background:#fff;display:flex;justify-content:space-between;padding:5px 0 20px;border-radius:10px 10px 0 0;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.foot .item.data-v-0adde86e{width:25%;display:flex;flex-wrap:wrap;justify-content:center}.foot .item icon.data-v-0adde86e{font-size:21px}.foot .item text.data-v-0adde86e{display:inline-block;text-align:center;width:100%}.weightBox.data-v-0adde86e{top:32px;height:auto;border-radius:0}.weightBox .table.data-v-0adde86e{width:100%;display:flex;justify-content:center;font-size:18px;font-weight:700;border-bottom:1px solid #fff}.weightBox .table icon.data-v-0adde86e{font-size:45px;margin-top:-30px;background:#fff;border-radius:50%;width:45px;height:45px;position:absolute;right:16px}.weightBox .foodlist.data-v-0adde86e{border-radius:0;height:40%;overflow:scroll;margin-top:15px}.weightBox .foodlist .text.data-v-0adde86e{width:100%;font-weight:700;font-size:14px;display:flex;height:40px;line-height:40px}.weightBox .foodlist .text text.data-v-0adde86e{width:18%;text-align:center}.weightBox .foodlist .text.data-v-0adde86e :nth-child(1){width:28%;text-align:left}.weightBox .foodlist .text.data-v-0adde86e :nth-child(5){width:15%}.weightBox .foodlist .item.data-v-0adde86e{display:flex;align-items:center;height:40px;line-height:40px;font-size:16px}.weightBox .foodlist .item view.data-v-0adde86e{width:18%;text-align:center;font-size:12px}.weightBox .foodlist .item.data-v-0adde86e :nth-child(5){width:15%;text-align:right!important;display:flex;justify-content:flex-end}.weightBox .foodlist .kcal.data-v-0adde86e{width:60%!important;text-align:center!important}.weightBox .foodlist .name.data-v-0adde86e{width:auto;float:left;font-size:12px;font-weight:500;width:28%!important;text-align:left!important;white-space:nowrap;overflow-x:auto}.weightBox .title.data-v-0adde86e{width:100%;padding:0;margin-top:10px;overflow:hidden;position:absolute;bottom:10px;top:50%;left:0;right:0}.weightBox .title.data-v-0adde86e .weightPages{top:15px;display:block}.weightBox .groupbtn.data-v-0adde86e{position:absolute;left:15px;right:15px;width:auto;bottom:50px}.title2.data-v-0adde86e{display:flex;align-items:center;justify-content:space-between}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/mymenu"],{"1f99":function(t,e,n){"use strict";n.r(e);var a=n("4bc2"),i=n("7be5");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s=n("828b"),c=Object(s["a"])(i["default"],a["b"],a["c"],!1,null,"d75f0fe2",null,!1,a["a"],void 0);e["default"]=c.exports},"4bc2":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this.$createElement,e=(this._self._c,this.menuList.length),n=this.menuList.length;this.$mp.data=Object.assign({},{$root:{g0:e,g1:n}})},i=[]},"7be5":function(t,e,n){"use strict";n.r(e);var a=n("9364"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},9364:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n("8f59");var a={data:function(){return{type:"",name:"",page:1,menuList:[],lastPage:""}},components:{search:function(){n.e("components/search").then(function(){return resolve(n("f7da"))}.bind(null,n)).catch(n.oe)}},onLoad:function(e){this.type=e.pageName,t.setNavigationBarTitle({title:e.pageName})},onShow:function(){this.name="",this.page=1,this.menuList=[],this.handleCooklist()},onReachBottom:function(){!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据!",icon:"none"}):(this.page++,this.handleCooklist(this.page))},methods:{handleCooklist:function(){var t=this,e="我的菜谱"==t.type?t.$model.getMyCookbook:t.$model.getUserCollectList;e({page:t.page,search_data:t.name}).then((function(e){0==e.code&&(t.menuList=e.data.content_list,t.lastPage=e.data.page_total)}))},handleDetail:function(e){t.navigateTo({url:"/pageTwo/me/menudetail?id="+e+"&title="+this.type})},handleSearch:function(t){this.name=t,this.page=1,this.menuList=[],this.lastPage="",this.handleCooklist()}}};e.default=a}).call(this,n("df3c")["default"])},c5e4:function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("6caf");a(n("3240"));var i=a(n("1f99"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["c5e4","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"search": "/components/search"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-d75f0fe2"><search bind:handleSearch="__e" vue-id="f55de058-1" data-event-opts="{{[['^handleSearch',[['handleSearch']]]]}}" class="data-v-d75f0fe2" bind:__l="__l"></search><block wx:if="{{$root.g0}}"><view class="footbox data-v-d75f0fe2"><view class="footlist data-v-d75f0fe2"><block wx:for="{{menuList}}" wx:for-item="it" wx:for-index="id" wx:key="*this"><view data-event-opts="{{[['tap',[['handleDetail',['$0'],[[['menuList','',id,'id']]]]]]]}}" class="list data-v-d75f0fe2" bindtap="__e"><view class="topimg data-v-d75f0fe2"><image class="img data-v-d75f0fe2" src="{{it.cover_url}}" mode="aspectFill"></image></view><view class="item data-v-d75f0fe2"><view class="title data-v-d75f0fe2">{{it.title}}</view><view class="name data-v-d75f0fe2"><image src="{{it.create_user_head_pic}}" class="data-v-d75f0fe2"></image><text class="overflow data-v-d75f0fe2">{{it.create_user_nickname}}</text></view><view data-event-opts="{{[['tap',[['handleZan',['$0'],[[['menuList','',id]]]]]]]}}" class="zan data-v-d75f0fe2" bindtap="__e"><icon class="{{['iconfont','data-v-d75f0fe2',it.is_me_like_it=='yes'?'icon-icon3':'icon-icon_collect']}}"></icon><text class="data-v-d75f0fe2">{{it.likes_num}}</text></view></view></view></block></view><block wx:if="{{!lastPage||page>=lastPage}}"><view class="endtext data-v-d75f0fe2">—— 到底了,看看别的吧 ——</view></block></view></block><block wx:if="{{!$root.g1}}"><view class="nolist data-v-d75f0fe2"><icon class="iconfont icon-wancan data-v-d75f0fe2"></icon><text class="data-v-d75f0fe2">还没有记录哦</text></view></block></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/record"],{"1f60":function(t,e,n){"use strict";n.r(e);var i=n("fb39"),s=n("9afd");for(var o in s)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(o);n("4425");var r=n("828b"),a=Object(r["a"])(s["default"],i["b"],i["c"],!1,null,"6e71ddee",null,!1,i["a"],void 0);e["default"]=a.exports},4425:function(t,e,n){"use strict";var i=n("b8a5"),s=n.n(i);s.a},"67f6":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("6caf");i(n("3240"));var s=i(n("1f60"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(s.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},9618:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i(n("7ca3")),o=n("8f59");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){(0,s.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={data:function(){return{list:[],page:1,lastPage:"",markDays:{warning:[],success:[],error:[]},infoList:[]}},components:{RenCalendar:function(){n.e("uni_modules/ren-calendar/ren-calendar").then(function(){return resolve(n("ffa9"))}.bind(null,n)).catch(n.oe)}},computed:a(a({},(0,o.mapState)(["user"])),{},{end:function(){return this.$tools.getTime()},endDate:function(){return this.$tools.getDate("start")}}),onLoad:function(){this.page=1,this.list=[],this.startM=this.$tools.getMonth(this.$tools.getTime(),0).substring(0,10),this.endM=this.$tools.getMonth(this.$tools.getTime(),0).substring(11,21),this.handleList()},onReachBottom:function(){!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据!",icon:"none"}):(this.page++,this.handleList(this.page))},methods:{handleList:function(){var t=this;t.$model.getMyLogList({aud_id:t.user.aud_id,page:t.page,s_time:t.startM,e_time:t.endM}).then((function(e){if(e){console.log("11111",e),t.list=e.content_list;for(var n=0;n<e.pkList.list.length;n++)Date.parse(t.endDate)==Date.parse(e.pkList.list[n].time)&&t.infoList.push(e.pkList.list[n]),"超标"==e.pkList.list[n].describe&&t.markDays.error.push(e.pkList.list[n].time),"达标"==e.pkList.list[n].describe&&t.markDays.success.push(e.pkList.list[n].time),"不达标"==e.pkList.list[n].describe&&t.markDays.warning.push(e.pkList.list[n].time)}}))},maskClick:function(t){console.log("maskClick事件:",t),this.infoList=[];for(var e=0;e<this.list.length;e++)Date.parse(t.date)==Date.parse(this.list[e].time)&&this.infoList.push(this.list[e])},onMonthClickPre:function(t){console.log("上月",t),this.list=[],this.infoList=[],this.markDays={warning:[],success:[],error:[]},this.startM=t.substring(0,10),this.endM=t.substring(11,21),this.handleList()},onMonthClickNext:function(t){console.log("下月",t)},handleDetail:function(e){t.setStorageSync("startDay",e.time),t.switchTab({url:"/pages/count/count"})}}};e.default=c}).call(this,n("df3c")["default"])},"9afd":function(t,e,n){"use strict";n.r(e);var i=n("9618"),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},b8a5:function(t,e,n){},fb39:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"6c3a"))}},s=function(){var t=this.$createElement,e=(this._self._c,this.infoList.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]}},[["67f6","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"navigationBarTitleText": "饮食记录",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||
"ren-calendar": "/uni_modules/ren-calendar/ren-calendar"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-6e71ddee"><view class="calendar data-v-6e71ddee"><ren-calendar vue-id="52c1ac4e-1" markDays="{{markDays}}" data-ref="ren" data-event-opts="{{[['^maskClick',[['maskClick']]],['^onMonthClickPre',[['onMonthClickPre']]],['^onMonthClickNext',[['onMonthClickNext']]]]}}" bind:maskClick="__e" bind:onMonthClickPre="__e" bind:onMonthClickNext="__e" class="data-v-6e71ddee vue-ref" bind:__l="__l"></ren-calendar></view><view class="box data-v-6e71ddee"><block wx:for="{{infoList}}" wx:for-item="item" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleDetail',['$0'],[[['infoList','',ind]]]]]]]}}" class="list data-v-6e71ddee" bindtap="__e"><view class="time data-v-6e71ddee">{{item.time}}</view><view class="kcal data-v-6e71ddee"><view class="data-v-6e71ddee">摄入卡路里<text class="data-v-6e71ddee">{{item.val}}</text>{{item.unit}}</view><view class="status data-v-6e71ddee"><text class="quan data-v-6e71ddee" style="{{('background:'+item.color)}}"></text>{{''+item.describe+''}}</view><uni-icons vue-id="{{'52c1ac4e-2-'+ind}}" type="forward" size="20" color="#666" class="data-v-6e71ddee" bind:__l="__l"></uni-icons></view></view></block><block wx:if="{{!$root.g0}}"><view class="nolist data-v-6e71ddee"><icon class="iconfont icon-wancan data-v-6e71ddee"></icon><text class="data-v-6e71ddee">还没有记录哦</text></view></block></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-6e71ddee{padding:0 15px}.calendar.data-v-6e71ddee{text-align:center;background:#fff;position:fixed;top:0;left:0;right:0;z-index:20;height:40px;line-height:40px;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.box.data-v-6e71ddee{margin-top:55px;width:100%}.list.data-v-6e71ddee{color:#999;width:calc(100% - 30px);background:#fff;margin-bottom:15px;border-radius:15px;padding:10px 15px}.list .time.data-v-6e71ddee{width:100%;height:30px;line-height:30px}.list .kcal.data-v-6e71ddee{display:flex;justify-content:space-between;align-items:center}.list .kcal text.data-v-6e71ddee{font-size:16px;font-weight:700;margin:0 3px;color:#000}.list .kcal .status.data-v-6e71ddee{width:85px}.list .kcal .quan.data-v-6e71ddee{width:12px;height:12px;background:#f0ad4e;display:inline-block;border-radius:50%;margin-right:5px}.list .kcal .quan1.data-v-6e71ddee{background:#4cd964}.list .kcal .quan2.data-v-6e71ddee{background:#ff4c4f}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/userEdit"],{"0a2c":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6caf");o(n("3240"));var r=o(n("6685"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},4346:function(e,t,n){"use strict";n.r(t);var o=n("ba9c"),r=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=r.a},4368:function(e,t,n){},6685:function(e,t,n){"use strict";n.r(t);var o=n("ad45"),r=n("4346");for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("ba78");var i=n("828b"),s=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,"5043e6ae",null,!1,o["a"],void 0);t["default"]=s.exports},ad45:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){}));var o=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.memInfo.nickname=""})},r=[]},ba78:function(e,t,n){"use strict";var o=n("4368"),r=n.n(o);r.a},ba9c:function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("7ca3")),a=n("8f59");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var s={data:function(){return{ageArr:[],sexItem:["男","女"],isEdit:!1,memInfo:{age:"",height:"",weight:"",gender:"",nickname:""}}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,a.mapState)(["user","appTheme"])),onLoad:function(e){for(var t=[],n=5;n<=80;n++)t.push(n);if(this.ageArr=t,e.familayData){var o=e.familayData;this.memInfo=JSON.parse(o),this.isEdit=!0,console.log("编辑",this.memInfo)}else this.memInfo=this.user},methods:{confirmInfo:function(){this.memInfo.nickname?this.memInfo.gender?this.memInfo.age?this.memInfo.height?this.memInfo.weight?this.subInfo(this.memInfo):this.$tools.msg("请输入体重"):this.$tools.msg("请输入身高"):this.$tools.msg("请选择年龄"):this.$tools.msg("请选择性别"):this.$tools.msg("请输入昵称")},subInfo:function(t){var n=this;n.$model.getUserInfoEdit(t).then((function(t){0==t.code?(n.$tools.msg("提交成功"),n.handleHomeUserInfo(),e.navigateBack({delta:1})):n.$tools.msg(t.message)}))},handleHomeUserInfo:function(){var e=this;e.$model.getHomeUserInfo({}).then((function(t){0==t.code&&e.$store.commit("changeUserInfo",t.data)}))},onsexArr:function(e){this.memInfo.gender="男"==this.sexItem[e.target.value]?1:2},onageArr:function(e){this.memInfo.age=this.ageArr[e.target.value]}}};t.default=s}).call(this,n("df3c")["default"])}},[["0a2c","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "个人资料",
|
||||
"navigationBarBackgroundColor": "#F9FAFC",
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-5043e6ae"><view class="lanBox data-v-5043e6ae"><view class="headbox data-v-5043e6ae"><view class="touxiang data-v-5043e6ae"><image class="headimage data-v-5043e6ae" src="{{user.head_pic}}"></image></view></view><view class="lan border-bottom data-v-5043e6ae"><view class="left data-v-5043e6ae">昵称</view><view class="right data-v-5043e6ae"><input class="name data-v-5043e6ae" name="name" type="text" placeholder="请输入昵称" data-event-opts="{{[['input',[['__set_model',['$0','nickname','$event',[]],['memInfo']]]]]}}" value="{{memInfo.nickname}}" bindinput="__e"/><block wx:if="{{!memInfo.nickname}}"><icon class="iconfont icon-bianji data-v-5043e6ae"></icon></block><block wx:else><icon data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="iconfont icon-error data-v-5043e6ae" bindtap="__e"></icon></block></view></view><view class="lan border-bottom data-v-5043e6ae"><view class="left data-v-5043e6ae">性别</view><view class="right data-v-5043e6ae"><picker mode="selector" range="{{sexItem}}" data-event-opts="{{[['change',[['onsexArr',['$event']]]]]}}" bindchange="__e" class="data-v-5043e6ae"><view class="uni-input data-v-5043e6ae">{{!memInfo.gender?'请选择性别':memInfo.gender==1?'男':'女'}}</view><icon class="iconfont icon-arrow-down data-v-5043e6ae"></icon></picker></view></view><view class="lan border-bottom data-v-5043e6ae"><view class="left data-v-5043e6ae">年龄</view><view class="right data-v-5043e6ae"><picker mode="selector" range="{{ageArr}}" data-event-opts="{{[['change',[['onageArr',['$event']]]]]}}" bindchange="__e" class="data-v-5043e6ae"><view class="uni-input data-v-5043e6ae">{{!memInfo.age?'请选择年龄':memInfo.age+'岁'}}</view><icon class="iconfont icon-arrow-down data-v-5043e6ae"></icon></picker></view></view><view class="lan border-bottom data-v-5043e6ae"><view class="left data-v-5043e6ae">身高</view><view class="right data-v-5043e6ae"><input type="digit" placeholder="请输入身高" data-event-opts="{{[['input',[['__set_model',['$0','height','$event',[]],['memInfo']]]]]}}" value="{{memInfo.height}}" bindinput="__e" class="data-v-5043e6ae"/><text class="data-v-5043e6ae">cm</text></view></view><view class="lan border-bottom data-v-5043e6ae"><view class="left data-v-5043e6ae">体重</view><view class="right data-v-5043e6ae"><input type="digit" placeholder="请输入体重" data-event-opts="{{[['input',[['__set_model',['$0','weight','$event',[]],['memInfo']]]]]}}" value="{{memInfo.weight}}" bindinput="__e" class="data-v-5043e6ae"/><text class="data-v-5043e6ae">kg</text></view></view></view><view data-event-opts="{{[['tap',[['confirmInfo',['$event']]]]]}}" class="btn data-v-5043e6ae" bindtap="__e">提交</view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-5043e6ae{padding:0 15px}.lanBox.data-v-5043e6ae{margin-top:15px;padding:15px 15px 0;width:calc(100% - 30px);background:#fff;border-radius:10px}.lanBox .headbox.data-v-5043e6ae{text-align:center;position:relative;display:flex;justify-content:center;height:65px;margin-bottom:15px}.lanBox .headbox .headimage.data-v-5043e6ae{display:block;width:65px;height:65px;font-size:65px;border-radius:50%}.lan.data-v-5043e6ae{display:flex;align-items:center;font-size:14px;height:50px;line-height:50px;border-bottom:1px solid #f7f7f7}.lan .left.data-v-5043e6ae{width:24%;text-align:left}.lan .right.data-v-5043e6ae{display:flex;align-items:center;justify-content:flex-end;width:76%;height:50px;position:relative;text-align:right}.lan .right.data-v-5043e6ae input{height:50px;line-height:50px;border:none;background:inherit;width:100%}.lan .right .name.data-v-5043e6ae{padding-right:25px}.lan .right picker.data-v-5043e6ae{width:100%;text-align:right;border:none;margin-right:8px}.lan .right picker view.data-v-5043e6ae{padding-right:18px;color:#828282;font-size:14px}.lan .right text.data-v-5043e6ae{display:inline-block;width:30px;text-align:right;color:#828282}.lan .right .iconfont.data-v-5043e6ae{color:#828282;position:absolute;right:0;top:0;width:30px;justify-content:flex-end}.btn.data-v-5043e6ae{color:#fff;width:100%}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/setting/email"],{"31c2":function(e,t,n){"use strict";n.r(t);var o=n("6330"),c=n("3b04");for(var a in c)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(a);n("6a1c");var i=n("828b"),u=Object(i["a"])(c["default"],o["b"],o["c"],!1,null,"7f813baf",null,!1,o["a"],void 0);t["default"]=u.exports},"3af7":function(e,t,n){},"3b04":function(e,t,n){"use strict";n.r(t);var o=n("58e1"),c=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=c.a},"4af5":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6caf");o(n("3240"));var c=o(n("31c2"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(c.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"58e1":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{phone:"",code:"",disabled:!1,second:60}},methods:{handleTelLogin:function(){var t=this;/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(t.phone)?t.code?t.$model.getAccountMsg({data:t.phone,code:t.code}).then((function(n){0==n.code?(t.$tools.msg("设置成功!"),t.$store.commit("changeAccountNumber",{my_email:t.phone}),setTimeout((function(){e.redirectTo({url:"/pageTwo/setting/setting"})}),1e3)):t.$tools.msg(n.msg)})).catch((function(e){})):t.$tools.msg("请填写验证码"):t.$tools.msg("请输入正确的邮箱")},handleCode:function(){var e=this;e.phone?/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e.phone)?e.$model.getSendCode({data:e.phone}).then((function(t){if(console.log(t),0==t.code){e.disabled=!0;var n=setInterval((function(){--e.second}),1e3);setTimeout((function(){clearInterval(n),e.disabled=!1,e.second=60}),6e4)}else e.$tools.msg(t.msg)})).catch((function(e){})):e.$tools.msg("请输入正确的邮箱"):e.$tools.msg("请输入邮箱")}}};t.default=n}).call(this,n("df3c")["default"])},6330:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},c=[]},"6a1c":function(e,t,n){"use strict";var o=n("3af7"),c=n.n(o);c.a}},[["4af5","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "绑定邮箱",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-7f813baf"><view class="login data-v-7f813baf"><view class="editem data-v-7f813baf"><view class="item data-v-7f813baf"><view class="text data-v-7f813baf">邮箱</view><view class="input data-v-7f813baf"><input placeholder="请输入邮箱" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" value="{{phone}}" bindinput="__e" class="data-v-7f813baf"/></view></view><view class="item data-v-7f813baf"><view class="text data-v-7f813baf">验证码</view><view class="input yanzhengma data-v-7f813baf"><input data-event-opts="{{[['input',[['__set_model',['','code','$event',[]]]]]]}}" class="uni-input data-v-7f813baf" value="{{code}}" bindinput="__e"/><button class="code data-v-7f813baf" type="none" disabled="{{disabled}}" value="{{code}}" data-event-opts="{{[['tap',[['handleCode',['$event']]]],['input',[['__set_model',['','code','$event',[]]]]]]}}" bindtap="__e" bindinput="__e">{{(second<60?second+'S后重发':'获取验证码')+''}}</button></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-7f813baf" bindtap="__e">确认</view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-7f813baf{width:100%;height:100vh;background-color:#fff}.login.data-v-7f813baf{width:calc(100% - 30px);height:auto;background:#fff;border-radius:10px;padding:15px;z-index:99}.login .title.data-v-7f813baf{text-align:left;color:#333;font-size:40rpx;font-weight:700;margin-bottom:15px}.login .editem.data-v-7f813baf{position:relative;display:flex;align-items:center;font-size:32rpx;justify-content:space-between;flex-wrap:wrap}.login .editem .item.data-v-7f813baf{width:100%;display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.login .editem .item .text.data-v-7f813baf{width:80px;height:40px;line-height:40px;font-size:32rpx}.login .editem .item .input.data-v-7f813baf{width:calc(100% - 100px);height:35px;line-height:35px;display:flex;position:relative;border:#dfdfdf 1px solid;border-radius:5px;padding:0 10px;background-color:#f7f7f7}.login .editem .item input.data-v-7f813baf{height:40px;line-height:40px;position:absolute;left:10px;right:0;z-index:88;font-size:32rpx}.login .editem .item .yanzhengma input.data-v-7f813baf{right:120px;font-size:32rpx}.login .editem .code.data-v-7f813baf{width:110px;background:#dfdfdf;font-size:14px;margin:0;line-height:40px;border-radius:5px;text-align:center;position:absolute;right:0;top:0;bottom:0;z-index:99}.login .btnlogin.data-v-7f813baf{width:100%;margin:15px 0;height:42px;line-height:42px;background:#f0ae43;font-weight:700;border-radius:15px;text-align:center;color:#fff!important}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/setting/password"],{"079e":function(t,n,o){"use strict";o.r(n);var e=o("ddc6"),a=o("7f2d");for(var s in a)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return a[t]}))}(s);o("3fed");var c=o("828b"),d=Object(c["a"])(a["default"],e["b"],e["c"],!1,null,"575c08bd",null,!1,e["a"],void 0);n["default"]=d.exports},"3fed":function(t,n,o){"use strict";var e=o("9f93"),a=o.n(e);a.a},"6abe":function(t,n,o){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={data:function(){return{password:"",password2:""}},onLoad:function(){},methods:{handleTelLogin:function(){var n=this;n.password?n.password2?n.password2==n.password?n.$model.getAccountPassword({password:n.password,c_password:n.password2}).then((function(o){console.log("注册",o),0!=o.code?n.$tools.msg(o.msg):(n.$tools.msg("密码设置成功"),setTimeout((function(){t.navigateBack()}),1e3))})).catch((function(t){})):n.$tools.msg("请确认两次密码填写一致"):n.$tools.msg("请确认密码"):n.$tools.msg("请填写密码")}}};n.default=o}).call(this,o("df3c")["default"])},"7f2d":function(t,n,o){"use strict";o.r(n);var e=o("6abe"),a=o.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(s);n["default"]=a.a},"9f93":function(t,n,o){},ddc6:function(t,n,o){"use strict";o.d(n,"b",(function(){return e})),o.d(n,"c",(function(){return a})),o.d(n,"a",(function(){}));var e=function(){var t=this.$createElement;this._self._c},a=[]},fd3e:function(t,n,o){"use strict";(function(t,n){var e=o("47a9");o("6caf");e(o("3240"));var a=e(o("079e"));t.__webpack_require_UNI_MP_PLUGIN__=o,n(a.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])}},[["fd3e","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<view class="content data-v-575c08bd"><view class="login data-v-575c08bd"><view class="editem data-v-575c08bd"><view class="item data-v-575c08bd"><view class="text data-v-575c08bd">密码</view><view class="input data-v-575c08bd"><input class="uni-input data-v-575c08bd" placeholder="请输入密码" data-event-opts="{{[['input',[['__set_model',['','password','$event',[]]]]]]}}" value="{{password}}" bindinput="__e"/></view></view><view class="item data-v-575c08bd"><view class="text data-v-575c08bd">确认密码</view><view class="input data-v-575c08bd"><input class="uni-input data-v-575c08bd" placeholder="请输入确认密码" data-event-opts="{{[['input',[['__set_model',['','password2','$event',[]]]]]]}}" value="{{password2}}" bindinput="__e"/></view></view></view><view data-event-opts="{{[['tap',[['handleTelLogin',['$event']]]]]}}" class="btnlogin data-v-575c08bd" bindtap="__e">确认</view></view></view>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.content.data-v-575c08bd{width:100%;height:100vh;background-color:#fff}.login.data-v-575c08bd{width:calc(100% - 30px);height:auto;background:#fff;border-radius:10px;padding:15px;z-index:99}.login .editem.data-v-575c08bd{position:relative;display:flex;align-items:center;font-size:28rpx;justify-content:space-between;flex-wrap:wrap}.login .editem .item.data-v-575c08bd{width:100%;display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.login .editem .item .text.data-v-575c08bd{width:80px;height:40px;line-height:40px;font-size:32rpx}.login .editem .item .input.data-v-575c08bd{width:calc(100% - 100px);height:35px;line-height:35px;display:flex;position:relative;border:#dfdfdf 1px solid;border-radius:5px;padding:0 10px;background-color:#f7f7f7}.login .editem .item input.data-v-575c08bd{height:40px;line-height:40px;position:absolute;left:10px;right:0;z-index:88;font-size:28rpx}.login .btnlogin.data-v-575c08bd{width:100%;margin:15px 0;height:42px;line-height:42px;background:#f0ae43;font-weight:700;border-radius:15px;text-align:center;color:#fff!important}
|
||||
|
|
@ -0,0 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/setting/phone"],{"10c7":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{phone:"",code:"",disabled:!1,second:60}},methods:{handleTelLogin:function(){var t=this;phoneType||/^1[3456789]\d{9}$/.test(t.phone)?t.code?t.$model.getAccountMsg({data:t.phone,code:t.code}).then((function(n){0==n.code?(t.$tools.msg("设置成功!"),t.$store.commit("changeAccountNumber",{my_tel:t.phone}),setTimeout((function(){e.redirectTo({url:"/pageTwo/setting/setting"})}),1e3)):t.$tools.msg(n.msg)})).catch((function(e){})):t.$tools.msg("请填写验证码"):t.$tools.msg("请输入正确的手机号")},handleCode:function(){var e=this;e.phone?phoneType||/^1[3456789]\d{9}$/.test(e.phone)?e.$model.getSendCode({data:e.phone}).then((function(t){if(console.log(t),0==t.code){e.disabled=!0;var n=setInterval((function(){--e.second}),1e3);setTimeout((function(){clearInterval(n),e.disabled=!1,e.second=60}),6e4)}else e.$tools.msg(t.msg)})).catch((function(e){})):e.$tools.msg("请输入正确的手机号"):e.$tools.msg("请输入手机号")}}};t.default=n}).call(this,n("df3c")["default"])},"6ae8":function(e,t,n){"use strict";var o=n("809e"),c=n.n(o);c.a},"809e":function(e,t,n){},a5c0:function(e,t,n){"use strict";n.r(t);var o=n("cfc4"),c=n("e246");for(var a in c)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return c[e]}))}(a);n("6ae8");var u=n("828b"),i=Object(u["a"])(c["default"],o["b"],o["c"],!1,null,"dd594054",null,!1,o["a"],void 0);t["default"]=i.exports},cfc4:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},c=[]},cfe3:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6caf");o(n("3240"));var c=o(n("a5c0"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(c.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},e246:function(e,t,n){"use strict";n.r(t);var o=n("10c7"),c=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=c.a}},[["cfe3","common/runtime","common/vendor"]]]);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue