Commit b61a74f0 authored by haitao's avatar haitao

asd

parent 6f07bab5
......@@ -2,8 +2,6 @@
import {newsRemind} from "@/utils/api/api.js";//获取商家消息
export default {
onLaunch: function() {
console.log('App Launch');
// #ifdef APP-PLUS
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
setTimeout(()=>{
......@@ -13,18 +11,35 @@
//获取设备id ios
plus.device.getInfo({
success:(e)=>{
console.log('getDeviceInfo success: '+JSON.stringify(e));
//console.log('getDeviceInfo success: '+JSON.stringify(e));
},
fail:(e)=>{
console.log('getDeviceInfo failed: '+JSON.stringify(e));
//console.log('getDeviceInfo failed: '+JSON.stringify(e));
}
});
uni.getNetworkType({ //查看是否有网络
success: function (res) {
if(res.networkType=='none'){
uni.showModal({
title:'温馨提示',
content:'检测到当前未打开网络,请打开网络',
showCancel:false
})
}else if(res.networkType=='2g'||res.networkType=='3g'){
uni.showModal({
title:'温馨提示',
content:'检测当前为'+res.networkType+'网络,网速较慢可能造成卡顿',
showCancel:false
})
}
}
});
// #endif
//安卓的
// #ifdef APP-PLUS
const clientInfo = plus.push.getClientInfo()
console.log(clientInfo,"clientInfo")
const clientInfo = plus.push.getClientInfo();
// #endif
setTimeout(()=>{
......@@ -32,19 +47,17 @@
},15000)
},
onShow: function() {
console.log('App Show')
//console.log('App Show')
},
onHide: function() {
console.log('App Hide')
//console.log('App Hide')
},
methods:{
//获取 语音消息
async getnewsRemind(){
console.info("66344554");
var date = new Date();
let hours = date.getHours();//当前 时间 小时
let datestime = 5000;//默认15秒
console.info(hours);
// if(hours==11 || hours==12 || hours==13 ){//1级别 高峰时间
// datestime = 5000;//高峰时期 5s一次
// }else if(hours==10 || hours==14){//1级别
......@@ -57,27 +70,17 @@
if(this.$store.state.token!=""){//判断是否 已登录
let res = await newsRemind({
})
console.info(".99999",res);
let res = await newsRemind({})
if(res.code==0){
console.info("0000000000");
if(res.data.length!=0){
//进来了就是有消息
let msglist = res.data;
console.info("循环消息列表");
if(msglist.length==1){
//一条就播放 如果多条 直接告诉商家多少条
// isvoice 开关
if(this.$store.state.isvoice){
this.$store.dispatch('AudioVoice',msglist[0].message).then((e) => {
console.log(e);
console.info("循环消息列表2");
//震动 调用//400ms//长震动
uni.vibrateLong({
success:(re)=> {
......
......@@ -7,13 +7,17 @@
<view class="tipboxs" @tap="cancel">
<view class="heads">
<!-- <image class="headimg" src="/static/news/ishellobg.png " mode=""></image> -->
<image class="headimg" src="/static/news/helloword.png " mode=""></image>
<!-- helloword.png -->
<!-- 顶部背景图 -->
<image class="headimg" src="/static/news/helloword.png " mode="widthFix"></image>
<image class="isusertx" :src="staticurl+userInfo.logo" mode=""></image>
<view class="shopnames">{{userInfo.shop_name}}</view>
<view class="centerBox">
<image class="isusertx" :src="staticurl+userInfo.logo" mode=""></image>
<view class="shopnames">{{userInfo.shop_name}}</view>
<view class="shopnames2">恭喜发财 财源广进</view>
<image src="../../static/news/yanhua.png" mode="widthFix" style="width: 113upx;position: absolute;bottom: 0;left: -60upx;height: 100upx;"></image>
<image src="../../static/news/yanhua.png" style="width: 94upx;position: absolute;right:-60upx;top:110upx;height:84upx;"></image>
</view>
</view>
<image class="Closeicon" src="/static/news/Closeico21.png" mode=""></image>
</view>
......@@ -57,7 +61,6 @@
},
//提示弹窗
change(e) {
console.log('是否打开:' + e.show)
if (!e.show) {
this.showtip = false
}
......@@ -75,8 +78,8 @@
</script>
<style lang="scss">
$wid:750upx;
$hei:863upx;
$wid:600upx;
$hei:584upx;
.prizemodel{
// width: $wid;
// height: $hei;
......@@ -84,6 +87,8 @@
.tipboxs{
width: $wid;
height: $hei;
background: #fff;
border-radius: 10upx;
position: relative;
.Closeicon{
width: 80upx;
......@@ -91,38 +96,49 @@
position: absolute;
left: 50%;
margin-left: -40upx;
bottom: -100upx;
bottom: -130upx;
}
.heads{
position: relative;
height: 100%;
.centerBox{
width: 480upx;height: 334upx;background: #fff;position:absolute;bottom: 0;left: 50%;margin-left: -240upx;border-radius: 10upx;
.isusertx{
position: absolute;
width: 240upx;
height: 240upx;
top: -120upx;
left: 50%;
margin-left: -120upx;
z-index: 99;
border-radius: 50%;
}
.shopnames{
width: 100%;
font-size: 42upx;
font-weight: bold;
color:#FB642F;
position: absolute;
top: 148upx;
text-align: center;
z-index: 99;
}
.shopnames2{
width: 100%;
font-size: 32upx;
color:#FB642F;
position: absolute;
top: 214upx;
text-align: center;
z-index: 99;
}
}
.headimg{
width: $wid;
height: $hei;
}
.isusertx{
position: absolute;
width: 382upx;
height: 382upx;
top: 312upx;
left: 50%;
margin-left: -191upx;
z-index: 99;
border-radius: 50%;
}
.shopnames{
width: 100%;
font-size: 40upx;
font-weight: bold;
color:#000;
position: absolute;
top: 740upx;
text-align: center;
z-index: 99;
border-radius: 50%;
}
}
.tipboxs_body{
border-top-left-radius: 0;
......
......@@ -278,6 +278,7 @@ export default {
},
//保存数据到父组件方法
release(isPublic) {
console.log(isPublic)
this.showSettingLayer = false;
this.editorCtx.getContents({
success: res => {
......
This diff is collapsed.
This diff is collapsed.
import { getColumns } from '../utils'
export const commonMixin = {
data () {
return {
indicatorStyle: `height: 34px`
}
},
created () {
this.init('init')
},
methods: {
init (changeType) {
if (this.list && this.list.length) {
const column = getColumns({
value: this.value,
list: this.list,
mode: this.mode,
props: this.props,
level: this.level
})
const { columns, value, item, index } = column
this.selectValue = value
this.selectItem = item
this.pickerColumns = columns
this.pickerValue = index
this.$emit('change', {
value: this.selectValue,
item: this.selectItem,
index: this.pickerValue,
change: changeType
})
}
}
},
watch: {
value () {
if (!this.isConfirmChange) {
this.init('value')
}
},
list () {
this.init('list')
}
}
}
<template>
<view class="lb-multi-selector lb-picker-item"
:style="{ height: height }">
<picker-view :value="pickerValue"
:indicator-style="indicatorStyle"
:style="{ height: height }"
@change="handleChange">
<picker-view-column v-for="(column, index) in pickerColumns"
:key="index">
<view v-for="(item, i) in column || []"
:class="[
'lb-picker-column',
item[props.value] === selectValue[index]
? 'lb-picker-column-active'
: ''
]"
:key="i">
<text class="lb-picker-column-label">
{{ item[props.label] || item }}
</text>
</view>
</picker-view-column>
</picker-view>
</view>
</template>
<script>
import { commonMixin } from '../mixins'
export default {
props: {
value: Array,
list: Array,
mode: String,
props: Object,
level: Number,
visible: Boolean,
height: String,
isConfirmChange: Boolean
},
mixins: [commonMixin],
data () {
return {
pickerValue: [],
pickerColumns: [],
selectValue: [],
selectItem: []
}
},
methods: {
handleChange (item) {
const pickerValue = item.detail.value
const columnIndex = pickerValue.findIndex((item, i) => item !== this.pickerValue[i])
const valueIndex = pickerValue[columnIndex]
this.setPickerChange(pickerValue, valueIndex, columnIndex)
},
setPickerChange (pickerValue, valueIndex, columnIndex) {
for (let i = 0; i < this.level; i++) {
if (i > columnIndex) {
pickerValue[i] = 0
const column =
this.pickerColumns[i - 1][valueIndex] ||
this.pickerColumns[i - 1][0]
this.$set(this.pickerColumns, i, column[this.props.children] || [])
valueIndex = 0
}
this.$set(this.pickerValue, i, pickerValue[i])
const selectItem = this.pickerColumns[i][pickerValue[i]]
if (selectItem) {
this.selectItem[i] = selectItem
this.selectValue[i] = selectItem[this.props.value]
} else {
const spliceNum = this.level - i
this.pickerValue.splice(i, spliceNum)
this.selectValue.splice(i, spliceNum)
this.selectItem.splice(i, spliceNum)
this.pickerColumns.splice(i, spliceNum)
break
}
}
this.$emit('change', {
value: this.selectValue,
item: this.selectItem,
index: this.pickerValue,
change: 'scroll'
})
}
}
}
</script>
<style lang="scss" scoped>
@import "../style/picker-item.scss";
</style>
<template>
<view class="lb-selector-picker lb-picker-item"
:style="{ height: height }">
<picker-view :value="pickerValue"
:style="{ height: height }"
:indicator-style="indicatorStyle"
@change="handleChange">
<picker-view-column>
<view v-for="(item, i) in list"
:class="[
'lb-picker-column',
(item[props.value] || item) === selectValue
? 'lb-picker-column-active'
: ''
]"
:key="i">
<text class="lb-picker-column-label">
{{ item[props.label] || item }}
</text>
</view>
</picker-view-column>
</picker-view>
</view>
</template>
<script>
import { isObject } from '../utils'
import { commonMixin } from '../mixins'
export default {
props: {
value: [String, Number],
list: Array,
mode: String,
props: Object,
visible: Boolean,
height: String,
isConfirmChange: Boolean
},
mixins: [commonMixin],
data () {
return {
pickerValue: [],
selectValue: '',
selectItem: null
}
},
methods: {
handleChange (item) {
const index = item.detail.value[0] || 0
this.selectItem = this.list[index]
this.selectValue = isObject(this.selectItem)
? this.selectItem[this.props.value]
: this.selectItem
this.pickerValue = item.detail.value
this.$emit('change', {
value: this.selectValue,
item: this.selectItem,
index: index,
change: 'scroll'
})
}
}
}
</script>
<style lang="scss" scoped>
@import "../style/picker-item.scss";
</style>
<template>
<view class="lb-selector-picker lb-picker-item"
:style="{ height: height }">
<picker-view :value="pickerValue"
:indicator-style="indicatorStyle"
:style="{ height: height }"
@change="handleChange">
<picker-view-column v-for="(column, index) in pickerColumns"
:key="index">
<view v-for="(item, i) in column || []"
:class="[
'lb-picker-column',
(item[props.value] || item) === selectValue[index]
? 'lb-picker-column-active'
: ''
]"
:key="i">
<text class="lb-picker-column-label">
{{ item[props.label] || item }}
</text>
</view>
</picker-view-column>
</picker-view>
</view>
</template>
<script>
import { isObject } from '../utils'
import { commonMixin } from '../mixins'
export default {
props: {
value: Array,
list: Array,
mode: String,
props: Object,
visible: Boolean,
height: String,
isConfirmChange: Boolean
},
mixins: [commonMixin],
data () {
return {
pickerValue: [],
pickerColumns: [],
selectValue: [],
selectItem: []
}
},
methods: {
handleChange (item) {
const pickerValue = item.detail.value
const columnIndex = pickerValue.findIndex((item, i) => item !== this.pickerValue[i])
if (columnIndex > -1) {
const valueIndex = pickerValue[columnIndex]
const columnItem = this.list[columnIndex][valueIndex]
const valueItem = isObject(columnItem)
? columnItem[this.props.value]
: columnItem
this.pickerValue = pickerValue
this.$set(this.selectValue, columnIndex, valueItem)
this.$set(this.selectItem, columnIndex, columnItem)
this.$emit('change', {
value: this.selectValue,
item: this.selectItem,
index: this.pickerValue,
change: 'scroll'
})
}
}
}
}
</script>
<style lang="scss" scoped>
@import "../style/picker-item.scss";
</style>
.lb-picker-column {
height: 34px;
/* #ifndef APP-NVUE */
display: flex;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
}
.lb-picker-column-label {
font-size: 16px;
text-align: center;
text-overflow: ellipsis;
transition-property: color;
transition-duration: 0.3s;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file
.lb-picker {
position: relative;
}
.lb-picker-mask {
background-color: rgba(0, 0, 0, 0.0);
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.lb-picker-mask-animation {
transition-property: background-color;
transition-duration: 0.3s;
}
.lb-picker-container {
position: relative;
}
.lb-picker-container-fixed {
position: fixed;
left: 0;
right: 0;
bottom: 0;
transform: translateY(100%);
/* #ifndef APP-PLUS */
overflow: hidden;
/* #endif */
}
.lb-picker-container-animation {
transition-property: transform;
transition-duration: 0.3s;
}
.lb-picker-container-show {
transform: translateY(0);
}
.lb-picker-header {
position: relative;
height: 45px;
background-color: #fff;
/* #ifdef APP-NVUE */
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #e5e5e5;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #e5e5e5;
/* #endif */
/* #ifndef APP-NVUE */
box-sizing: border-box;
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-between;
flex-wrap: nowrap;
}
/* #ifndef APP-PLUS */
.lb-picker-header::before {
content: "";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
clear: both;
border-bottom: 1px solid #e5e5e5;
color: #e5e5e5;
transform-origin: 0 100%;
transform: scaleY(0.5);
}
.lb-picker-header::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
clear: both;
border-bottom: 1px solid #e5e5e5;
color: #e5e5e5;
transform-origin: 0 100%;
transform: scaleY(0.5);
}
/* #endif */
.lb-picker-action {
padding-left: 14px;
padding-right: 14px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
}
.lb-picker-action-item {
text-align: center;
height: 45px;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
align-items: center;
}
.lb-picker-action-cancel-text {
font-size: 16px;
color: #999;
}
.lb-picker-action-confirm-text {
font-size: 16px;
color: #007aff;
}
.lb-picker-content {
position: relative;
background-color: #fff;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
flex-direction: column;
}
.lb-picker-loading,
.lb-picker-empty {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
}
.lb-picker-empty-text {
color: #999;
font-size: 16px;
}
.lb-picker-loading-img {
width: 25px;
height: 25px;
/* #ifndef APP-NVUE */
animation: rotating 2s linear infinite;
/* #endif */
}
/* #ifndef APP-NVUE */
@keyframes rotating {
0% {
transform: rotate(0deg)
}
to {
transform: rotate(1turn)
}
}
/* #endif */
\ No newline at end of file
/**
* 判断是否是对象
*
* @export
* @param {*} val
* @returns true/false
*/
export function isObject (val) {
return Object.prototype.toString.call(val) === '[object Object]'
}
/**
* 根据value获取columns信息
*
* @export
* @param {*} { value, list, mode, props, level }
* @param {number} [type=2] 查询不到value数据返回数据类型 1空值null 2默认第一个选项
* @returns
*/
export function getColumns ({ value, list, mode, props, level }, type = 2) {
let pickerValue = []
let pickerColumns = []
let selectValue = []
let selectItem = []
let columnsInfo = null
switch (mode) {
case 'selector':
let index = list.findIndex(item => {
return isObject(item) ? item[props.value] === value : item === value
})
if (index === -1 && type === 1) {
columnsInfo = null
} else {
index = index > -1 ? index : 0
selectItem = list[index]
selectValue = isObject(selectItem)
? selectItem[props.value]
: selectItem
pickerColumns = list
pickerValue = [index]
columnsInfo = {
index: pickerValue,
value: selectValue,
item: selectItem,
columns: pickerColumns
}
}
break
case 'multiSelector':
const setPickerItems = (data = [], index = 0) => {
if (!data.length) return
const defaultValue = value || []
if (index < level) {
const value = defaultValue[index] || ''
let i = data.findIndex(item => item[props.value] === value)
if (i === -1 && type === 1) return
i = i > -1 ? i : 0
pickerValue[index] = i
pickerColumns[index] = data
if (data[i]) {
selectValue[index] = data[i][props.value]
selectItem[index] = data[i]
setPickerItems(data[i][props.children] || [], index + 1)
}
}
}
setPickerItems(list)
if (!selectValue.length && type === 1) {
columnsInfo = null
} else {
columnsInfo = {
index: pickerValue,
value: selectValue,
item: selectItem,
columns: pickerColumns
}
}
break
case 'unlinkedSelector':
list.forEach((item, i) => {
let index = item.findIndex(item => {
return isObject(item)
? item[props.value] === value[i]
: item === value[i]
})
if (index === -1 && type === 1) return
index = index > -1 ? index : 0
const columnItem = list[i][index]
const valueItem = isObject(columnItem)
? columnItem[props.value]
: columnItem
pickerValue[i] = index
selectValue[i] = valueItem
selectItem[i] = columnItem
})
pickerColumns = list
if (!selectValue.length && type === 1) {
columnsInfo = null
} else {
columnsInfo = {
index: pickerValue,
value: selectValue,
item: selectItem,
columns: pickerColumns
}
}
break
}
return columnsInfo
}
......@@ -355,9 +355,11 @@
.imageItem, .imageUpload{
width: 200upx;
height: 200upx;
margin: 30upx 15upx 30upx;
margin: 0 20upx 30upx 0;
}
.imageItem:nth-child(3n){
margin-right: 0!important;
}
.imageDel{
position: relative;
left: 180upx;
......
......@@ -42,7 +42,6 @@
},
//提示弹窗
change(e) {
console.log('是否打开:' + e.show)
if (!e.show) {
this.showtip = false
}
......
......@@ -159,8 +159,6 @@
},
//监测更新 夫组件调用的方法
checkVersionClick() {
console.info("更新检测");
//直接不直接 苹果不做更新
if(uni.getSystemInfoSync().platform == 'ios'){
return false;
......@@ -215,9 +213,7 @@
let appVersion = parseFloat(str1);//当前版本
let nesVersion = parseFloat(result.data.data.version);//最新版本
console.log(appVersion,nesVersion)
if (nesVersion > appVersion) {
if (result.data.data.pkgurl != '' && result.data.data.downloadurl == '') {
this.type="pkg";
......
......@@ -5,6 +5,8 @@ import http from './common/axios.js'
import store from './store'//状态管理
import LbPicker from '@/components/lb-picker'
Vue.component("lb-picker", LbPicker)
import {
getTimeOut,
timestampToTime,//10位时间戳 转年月日时分秒
......
......@@ -3,8 +3,8 @@
//"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "",
"versionName" : "1.0.73",
"versionCode" : 173,
"versionName" : "1.0.76",
"versionCode" : 176,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
......
......@@ -44,12 +44,18 @@
</view>
<view class="sort flex ali-c ">
<view class="name">分类</view>
<picker @change="bindPickerChange" name="parent_id" :value="index" :range="chindformList" range-key="cate_name">
<view class="inputs">
<input type="text" disabled="disabled" value="" v-model="cate_name" class="inpus" />
<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
<!-- <picker @change="bindPickerChange" name="parent_id" :value="index" :range="chindformList" range-key="cate_name">
<view class="inputs">
<view class="" style="padding-left: 15upx;">{{cate_name}}</view>
</view>
</picker> -->
<view class="inputs" @tap='pickerone'>
<view class="" style="padding-left: 15upx;">{{cate_name}}</view>
</view>
</picker>
<lb-picker ref="picker" :list="chindformList" :value='index' range-key="label" :props="myProps" @confirm='confirm'></lb-picker>
</view>
</view>
......@@ -93,6 +99,10 @@
},
data() {
return {
myProps: {
label: 'cate_name',
value: 'cate_id',
},
name: 'product',
form: {
picker_custom2: {},
......@@ -155,6 +165,17 @@
this.typeManagerfun();
},
methods: {
confirm(e){
console.log(e)
// this.parent_name=e.item.value;
// this.canform.cate_id=;
this.cate_name = e.item.cate_name;
this.form.cate_id =e.item.cate_id;
this.index = e.index;
},
pickerone(){
this.$refs.picker.show() // 显示
},
//分类选中
bindPickerChange(e){
// cate_name
......@@ -247,7 +268,7 @@
can.is_hot = 0;
}
//can.cate_id = this.chindformList[res.data.custom.value].cate_id;//分类id
if(this.c_pics.length!=0){
can.photo = this.c_pics[0].data;//上传的图片
......
......@@ -253,7 +253,6 @@
.sort{
padding: 0 20upx;
height:104upx;
line-height: 104upx;
.name{
font-size:30upx;
color:rgba(0,0,0,1);
......@@ -265,6 +264,7 @@
margin-left: 20upx;
width:296upx;
height:60upx;
line-height: 60upx;
.inpus{
width:296upx;
height:60upx;
......
......@@ -56,23 +56,26 @@
</view>
<view class="sort flex ali-c ">
<view class="name">剩余房间</view>
<view class="inputs ">
<input type="number" value="" v-model="parameter.sku" placeholder="请输入数字" class="inpus" />
<!-- <image class="imgs" src="/static/news/xiamassfd.png" mode=""></image> -->
</view>
</view>
<view class="sort flex ali-c ">
<view class="name">房间类型</view>
<picker @change="bindPickerChange1" name="type" :value="isclassval" :range="typeList" range-key="name">
<view class="inputs">
<input type="text" disabled="disabled" value="" v-model="cate_name" class="inpus" />
<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
<!-- <picker @change="bindPickerChange1" name="type" :value="index" :range="typeList" range-key="name">
<view class="inputs" >
<view class="" style="padding-left: 15upx;">{{cate_name}}</view>
</view>
</picker> -->
<view class="inputs" @tap='pickerone'>
<view class="" style="padding-left: 15upx;">{{cate_name}}</view>
</view>
</picker>
<lb-picker ref="picker" :list="typeList" :value='index' range-key="name" :props="myProps" @confirm='bindPickerChange1'></lb-picker>
</view>
......@@ -99,9 +102,12 @@
},
data() {
return {
isclassval:0,//分类的vlaue
myProps: {
label: 'name',
value: 'cate_id',
},
index:0,//分类的vlaue
title:"",//产品标题
index:0,
imageData : [],
is_data:[],//三个多选的值
specslist:[1],
......@@ -164,13 +170,22 @@
this.roomType();
},
methods:{
pickerone(){
this.$refs.picker.show() // 显示
},
bindPickerChange1(e){ //选择分类
console.log(e)
this.cate_name = e.item.name;
this.parameter.type = e.item.id;
this.index = e.index;
},
//查询修改的信息原有的信息
async getroomInfo(){
let res = await roomInfo({
room_id:this.room_id,
});
if(res.code==0){
console.log(res)
this.parameter = {
action:"edit",// add添加,edit修改
//酒店的信息
......@@ -187,13 +202,9 @@
this.c_pics = [{code:0,data:res.data.photo,msg:"success",time:"1587802940",}];//模拟上传图片的数据
this.c_photos = [res.data.photo];
// listchind:[
// {name:"是否有早餐",value:"1"},
// {name:"是否有款第",value:"2"},
// {name:"是否可取消",value:"3"},
// // {name:"是否推荐",value:"4"},
// ],
if(this.room_id!=''){ //发布新酒店
this.cate_name = res.data.roomType;
}
let isarr = [];
//早餐
......@@ -226,19 +237,22 @@
},
// 获取商城商品分类
async roomType(){
let res = await hotelroomType({
})
let res = await hotelroomType({});
let arr = [];
for(let i in res.data){
arr.push({name:res.data[i],id:i});
}
this.typeList =arr;//分类列表
this.cate_name = this.typeList[0].name;
this.parameter.type = this.typeList[0].id;
if(this.room_id==''){ //发布新酒店
this.parameter.type = this.typeList[0].id;
this.cate_name = this.typeList[0].name;
}else{ //修改信息
console.log(this.room_id)
}
},
initdata(){
this.parameter= {
......@@ -302,13 +316,7 @@
this.is_data = e.detail.value;
},
//分类监听
bindPickerChange1(e){
this.parameter.type = this.typeList[e.detail.value].id;
this.isclassval = e.detail.value;
this.cate_name = this.typeList[e.detail.value].name;
},
//图片上传
c_delImage(e) {
......
......@@ -29,11 +29,19 @@
display: flex;
flex-direction: column;
justify-content: center;
width: 25%;
width: 210upx;
// height: 100%;
height: 256upx;
vertical-align: middle;
}
.pic2 {
position: absolute;
width: 100%;
height: 100%;
background:rgba(0,0,0,0.5);
color: #fff;
font-size:32upx;
}
.pic .img {
width: 100%;
......
......@@ -8,9 +8,11 @@
<view>
<view class="one">
<block v-for="(item,index) in goodsListdata" :key="index">
<!-- v-if="item.state!=current" -->
<view class="container" >
<view class="pic"><image mode="aspectFit" class="img" :src="staticUrl+item.photo" ></image></view>
<view class="pic" style="position: relative;border-radius: 10upx;overflow: hidden;">
<image mode="aspectFit" class="img" :src="staticUrl+item.photo" ></image>
<view class="flex-wrap ali-c jus-c pic2" v-if='item.audit==0'>审核中</view>
</view>
<view class="desc">
<view class="title">
<view class='title_l'>{{item.title}}</view>
......@@ -26,7 +28,7 @@
<view class="btn_01" @tap="pushfun(item,index)" v-if="current==1" >上架</view>
<view class="btn_01" @tap="delfun(item,index)" >删除</view>
<view class="btn_01" @click="setSpecs(item.goods_id)" >规格</view>
<view class="btn_01 " @tap="Selectiondata(item)" v-if="current==0 && isselect==1">加入活动</view>
<view class="btn_01" @tap="Selectiondata(item)" v-if="current==0 && isselect==1">加入活动</view>
</view>
</view>
</view>
......
......@@ -257,7 +257,6 @@
.sort{
padding: 0 20upx;
height:104upx;
line-height: 104upx;
.name{
font-size:30upx;
color:rgba(0,0,0,1);
......@@ -269,6 +268,7 @@
margin-left: 20upx;
width:296upx;
height:60upx;
line-height: 60upx;
.inpus{
width:296upx;
height:60upx;
......
......@@ -29,19 +29,25 @@
</view>
</view>
<view class="sort flex ali-c ">
<view class="name">分类</view>
<picker @change="bindPickerChange" name="parent_id" :value="index" :range="goodsCate" range-key="value">
<view class="inputs">
<input type="text" disabled="disabled" value="" v-model="cate_name" class="inpus" />
<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
</view>
<view class="name" >分类</view>
<!-- <picker @change="bindPickerChange" name="parent_id" :value="index" :range="goodsCate" range-key="value">
<view class="inputs">
<input type="text" disabled="disabled" value="" v-model="cate_name" class="inpus" />
</view>
</picker>
<picker @change="bindPickerss" name="cate_id" :value="index" :range="datachind" range-key="value">
<view class="inputs inputs1">
<view class="inputs inputs1">
<input type="text" disabled="disabled" value="" v-model="parent_name" class="inpus" />
</view>
</picker> -->
<view class="inputs" @tap='pickerone'>
<input type="text" disabled="disabled" v-model="cate_name" class="inpus" />
</view>
<view class="inputs inputs1" @tap='pickertow'>
<input type="text" disabled="disabled" value="" v-model="parent_name" class="inpus" />
<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
</view>
</picker>
<lb-picker ref="picker" :list="goodsCate" :value='cate_name' range-key="label" :props="myProps" @confirm='confirm'></lb-picker>
<lb-picker ref="picker1" :list="datachind" :value='parent_name' range-key="label" :props="myProps1" @confirm='confirm1'></lb-picker>
</view>
</view>
<!-- end -->
......@@ -115,7 +121,7 @@
<textarea class="textarea" v-model="canform.details" placeholder="请输入商品详情"/>
</view> -->
<!-- <jinedit ref="jinedit" placeholder="请输入内容" @editOk="editOk" uploadFileUrl="/#" ></jinedit> -->
<view class="addmigs pt0s" >
<jinedit ref="jinedit" placeholder="请输入商品详情内容" @editOk="editOk" fileKeyName="img" :uploadFileUrl="uploadurl1+'/merchant.php/FileUpload/uploadify'" ></jinedit>
......@@ -173,6 +179,14 @@
},
data() {
return {
myProps: {
label: 'value',
value: 'cate_id',
},
myProps1: {
label: 'value',
value: 'cate_id',
},
title:"",//产品标题
imageData : [],//主图
imageData1:[],//详情图
......@@ -244,8 +258,7 @@
return obj;
}
},
onLoad(opdata) {
onLoad(opdata) {
if(opdata.id!="" && opdata.id!=undefined){
this.canform.goods_id = opdata.id;//修改的商品id
this.canform.action = "edit";
......@@ -260,6 +273,22 @@
this.goods_type();
},
methods:{
confirm(e){
console.log(e)
this.cate_name=e.item.value;
this.datachind=e.item.children; //二级分类
},
confirm1(e){
console.log(e)
this.parent_name=e.item.value;
this.canform.cate_id=e.item.cate_id;
},
pickerone(){
this.$refs.picker.show() // 显示
},
pickertow(){
this.$refs.picker1.show() // 显示
},
//获取原来的商品详情信息
async goodsDetailsfun(){
let res = await goodsDetails({
......@@ -462,20 +491,20 @@
this.selchildList = e.detail.value;
},
// 改变下拉选项 一级的
bindPickerChange (event) {
// console.info(event.detail.value);
this.parent_name = "";
this.canform.cate_id = "";
this.cate_name = this.goodsCate[event.detail.value].value;
this.datachind = this.goodsCate[event.detail.value].children;//二级的数据据
// bindPickerChange (event) {
// console.info(event.detail.value);
// this.parent_name = "";
// this.canform.cate_id = "";
// this.cate_name = this.goodsCate[event.detail.value].value;
// this.datachind = this.goodsCate[event.detail.value].children;//二级的数据据
},
//二级分类选中后处理
bindPickerss (event) {
// console.log(event.detail.value);
this.parent_name = this.datachind[event.detail.value].value;
this.canform.cate_id = this.datachind[event.detail.value].cate_id;//分类id
},
// },
// //二级分类选中后处理
// bindPickerss (event) {
// // console.log(event.detail.value);
// this.parent_name = this.datachind[event.detail.value].value;
// this.canform.cate_id = this.datachind[event.detail.value].cate_id;//分类id
// },
//图片上传
c_delImage(e) {
let arr = []
......
......@@ -10,7 +10,7 @@
<view class="biao">
<view class="cu-form-group ">
<view class="title">联系人:</view>
<view class="title" style="letter-spacing:10upx;">联系人:</view>
<input class="title" style="flex-grow: 1;" placeholder="请输入联系人" disabled="disabled" v-model="fromdata.contact"></input>
</view>
<view class="cu-form-group ">
......
......@@ -40,7 +40,6 @@
<view class="btns btnboxdel" @tap="tochanges(item,index)">修 改</view>
</view>
</view>
<!-- <video src="" controls></video> -->
</checkbox-group>
</view>
......
......@@ -122,8 +122,6 @@
};
},
onShow() {
//获取之前记录的密码
let username = uni.getStorageSync("username");
let password = uni.getStorageSync("password");
......@@ -142,9 +140,11 @@
}
},
onLoad() {
//处理 协议 按钮
let istongyi = uni.getStorageSync('istongyi');
console.info(istongyi);
if(istongyi){
if(istongyi==true || istongyi=="true"){
this.isAgree = true;//获取之前同意过的状态
......@@ -234,8 +234,6 @@
this.$api.msg(res);
if(res.code==0){
console.info(res.data.store.length);
//记住密码
if(this.ischecked==true){
......
......@@ -88,14 +88,14 @@
<!-- 升级组件 -->
<moduPopup ref="moduPopup" title="确认要关闭店铺吗?" infotext="你确认要关闭店铺吗?关闭后余额将会自动转到佣金" @confirm="todeleteStore" @cancel="gdcancel"></moduPopup>
<moduPopup ref="moduPopup" title="关闭店铺" infotext="你确认要关闭店铺吗?关闭后余额将会自动转到佣金" @confirm="todeleteStore" @cancel="gdcancel"></moduPopup>
<!-- 提示信息组件 关店的-->
<moduPopup ref="moduPopupTwo" title="确认要退出登录吗?" infotext="确认要退出登录吗~" @confirm="toLogout" @cancel="gdcancel"></moduPopup>
<moduPopup ref="moduPopupTwo" title="退出登录" infotext="确认要退出登录吗~" @confirm="toLogout" @cancel="gdcancel"></moduPopup>
<!-- 提示信息组件 退出登录-->
<moduPopup ref="cleanstoreone" title="确认要清除缓存吗?" infotext="清除缓存后你的账号将会退出~" @confirm="cleanstore" @cancel="gdcancel"></moduPopup>
<moduPopup ref="cleanstoreone" title="清除缓存" infotext="清除缓存后你的账号将会退出~" @confirm="cleanstore" @cancel="gdcancel"></moduPopup>
<!-- 提示信息组件 清除缓存-->
</view>
......@@ -121,8 +121,6 @@
},
onLoad() {
this.getv();
console.info(this.version);
this.storeEleInfofun();//查询外卖店铺详情信息
},
computed:{
......@@ -157,9 +155,7 @@
//查询外卖店铺详情信息
async storeEleInfofun(){
let res = await storeEleInfo({
});
let res = await storeEleInfo({});
if(res.data==null){
this.isshowdy = false;
return false;
......@@ -252,8 +248,6 @@
this.$store.dispatch('AudioVoice',`已${statusTip}语音提示`).then((e) => {
console.log(e);
console.info("循环消息列表2");
//震动 调用//400ms//长震动
uni.vibrateLong({
success:(re)=> {
......@@ -263,17 +257,12 @@
})
})
//console.info(e.detail.value,"e.detail.value ");
this.$store.commit("changeisvoice",e.detail.value);//直接修改 双向绑定的
},
//店铺打烊
switchChangetwo(e){
console.info(e.detail.value,"打烊修改");
//is_open 是否打烊(0默认打烊,1营业)
let is_open = e.detail.value?0:1;
storeOpenEle({
is_open:is_open,
}).then((res)=>{
......
static/news/helloword.png

144 KB | W: | H:

static/news/helloword.png

511 KB | W: | H:

static/news/helloword.png
static/news/helloword.png
static/news/helloword.png
static/news/helloword.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,11 +2,11 @@
//环境变量 这个是 鹿马商家助手的 商家助手的~~~~
module.exports = {
//是否为开发调试环境 true为本地环境 false 为正式环境
//isdebug:true,//测试
// isdebug:true,//测试
isdebug:false,//正式
xqdebug:false,//正式权限
// xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
xqdebug:false,//正式权限
//xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
// #ifdef APP-PLUS
// isdebug:false,//正式 APP里面绝对是正式
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment