7.5(优化

This commit is contained in:
Hong
2024-07-05 21:12:48 +08:00
parent c2c729d038
commit d4caf76f7f
3 changed files with 41 additions and 35 deletions

View File

@@ -4,11 +4,11 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
# 线上
VUE_APP_BASE_API = 'https://cms.diyouzhijia.com/car_admin_api'
# VUE_APP_BASE_API = 'https://cms.diyouzhijia.com/car_admin_api'
# 花花
# VUE_APP_BASE_API = 'http://192.168.31.16:8080/car_admin_api'
# 薛磊
# VUE_APP_BASE_API = 'http://192.168.31.226:8080/car_admin_api'
VUE_APP_BASE_API = 'http://192.168.31.226:8080/car_admin_api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().

View File

@@ -73,12 +73,18 @@
</el-radio-group>
</el-form-item>
<el-form-item label="助力商品">
<el-select v-model="form.shopId" placeholder="请选择" style="width: 200px;">
<el-select v-model="form.shopId" style="width: 200px;" filterable remote reserve-keyword
placeholder="请输入分佣平台" :remote-method="remoteMethod" clearable>
<el-option v-for="item in carList" :key="item.id" :label="helpType == 0 ? item.name : item.title" :value="item.id">
{{ helpType == 0 ? item.name : item.title }}
</el-option>
</el-select>
<!-- <el-select v-model="form.shopId" placeholder="请选择" style="width: 200px;">
<el-option v-for="item in carList" :key="item.id" :label="helpType == 0 ? item.name : item.title"
:value="item.id">
{{ helpType == 0 ? item.name : item.title }}
</el-option>
</el-select>
</el-select> -->
</el-form-item>
<el-row>
<el-form-item label="封面" prop="cover">
@@ -118,36 +124,6 @@
<el-form-item label="详情" prop="content">
<Tinymce v-model="form.content" ref="Tinymce"></Tinymce>
</el-form-item>
<div>
<!-- <el-row>
<el-col :span="11" v-if="cardItemList.length == 0">
<el-row>
<span style="font-size: 16px; margin-right: 8px">助力类型:</span>
<span style="font-size: 16px">
<el-radio-group v-model="helpType">
<el-radio :label="0">卡券助力</el-radio>
<el-radio :label="1">租车助力</el-radio>
<el-radio :label="2">租卖灵活助力</el-radio>
</el-radio-group>
</span>
</el-row>
<el-row>
<span style="color: red; font-size: 12px">请先选择助力类型</span>
</el-row>
</el-col>
<el-col :span="3">
<el-button type="primary" :disabled="helpTypeDisabled"
@click="selectStore(helpType)">编辑选中助力商品</el-button>
</el-col>
</el-row> -->
</div>
<!-- <el-table :data="cardItemList">
<el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="name" label="助力商品名称" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column label="助力商品名称" v-if="helpType == 0" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="助力商品名称" v-else prop="title" show-overflow-tooltip></el-table-column> -->
<!-- <el-table-column label="库存" v-if="helpType == 0" prop="stock"></el-table-column>
</el-table>-->
</el-form>
</el-dialog>
@@ -368,7 +344,7 @@ export default {
stock: [{ required: true, message: '请输入库存', trigger: 'blur' }],
},
form: {
shopId: 0
shopId: null
},
cover: [],
image: [],
@@ -429,8 +405,34 @@ export default {
},
dialogOpen() {
this.getCarList(this.helpType)
},
//平台远程搜索
remoteMethod(query) {
if (query !== '') {
if (this.helpType == 1) {
this.carForm.title=query
rentHelpListAPI(this.carForm).then((res) => {
this.carList = res.list;
this.total1 = res.total;
});
} else if (this.helpType == 2) {
this.carForm.title=query
sellHelpListAPI(this.carForm).then((res) => {
this.carList = res.list;
this.total1 = res.total;
});
} else {
this.carForm.name=query
cardProductList(this.carForm).then((res) => {
this.carList = res.list;
this.total1 = res.total;
});
}
}
},
getCarList(helpType) {
this.carForm.name=''
this.carForm.title=''
if (helpType == 1) {
rentHelpListAPI(this.carForm).then((res) => {
this.carList = res.list;

View File

@@ -531,6 +531,10 @@ export default {
this.dialogStore = false;
},
selectStore() {
console.log(this.form.city);
if(this.form.city){
this.carForm.city=this.form.city
}
this.getCarList();
this.dialogStore = true;
},