登入
continuous-integration/drone/push Build is passing Details

This commit is contained in:
余同学 2024-11-15 16:34:50 +08:00
parent 3d5fd892a5
commit f905b98c35
3 changed files with 74 additions and 16 deletions

View File

@ -15,7 +15,7 @@ export const mer_admin = {
* @returns * @returns
*/ */
loginByAccount: (params) => { loginByAccount: (params) => {
return $http.post(`/admin-api/auth/login`, { return $http.post(`/merchant-api/auth/login`, {
...params, ...params,
}); });
}, },
@ -154,4 +154,12 @@ export const mer_admin = {
params: { id }, params: { id },
}); });
}, },
//获取品牌信息
getBrandInfo: () => {
return $http.request({
method: "get",
url: `/merchant-api/brand/info`,
params: {},
});
},
}; };

View File

@ -315,7 +315,7 @@ export default {
this.$api.mer_admin this.$api.mer_admin
.loginByAccount({ .loginByAccount({
// role: _loginTypeMapper[this.loginType], // role: _loginTypeMapper[this.loginType],
userName: this.dataForm.userName, mobile: this.dataForm.userName,
password: this.dataForm.password, password: this.dataForm.password,
}) })
.then(({ data }) => { .then(({ data }) => {

View File

@ -10,13 +10,51 @@
<span @click="infoUpdate" class="brandInfo-update">编辑</span> <span @click="infoUpdate" class="brandInfo-update">编辑</span>
</div> </div>
<div class="info-content"> <div class="info-content">
<div class="info-item">品牌名称</div> <div class="info-item">品牌名称{{ list.name }}</div>
<div class="info-item">品牌ID:</div> <div class="info-item">品牌ID: {{ list.id }}</div>
<div class="info-item">品牌LOGO:</div> <div class="info-item" style="display: flex">
<div class="info-item">品牌背景:</div> <div>品牌LOGO:</div>
<div class="info-item">品牌首页:</div> <div v-if="list.logo" style="margin-left: 20px">
<div class="info-item">宣传语:</div> <el-image
<div class="info-item">宣传视频:</div> style="width: 100px; height: 100px"
:src="list.logo"
:preview-src-list="[list.logo]"
>
</el-image>
</div>
</div>
<div class="info-item" style="display: flex">
<div>品牌背景:</div>
<div v-if="list.background" style="margin-left: 20px">
<el-image
style="width: 100px; height: 100px"
:src="list.background"
:preview-src-list="[list.background]"
>
</el-image>
</div>
</div>
<div class="info-item">
品牌首页: {{ list.homepageStatus == 0 ? "禁用" : "启用" }}
</div>
<div class="info-item">宣传语: {{ list.tagline }}</div>
<div class="info-item" style="display: flex">
<div>宣传视频:</div>
<div v-if="list.video" style="margin-left: 20px">
<video
id="videoPlayer"
width="200px"
height="100px"
object-fit="fill"
autoplay="true"
muted="muted"
loop
controls
>
<source :src="list.video" type="video/mp4" />
</video>
</div>
</div>
</div> </div>
<div class="brandInfo"> <div class="brandInfo">
<span class="pattern"></span> <span class="pattern"></span>
@ -24,11 +62,13 @@
</div> </div>
<div class="info-content"> <div class="info-content">
<div class="info-item"> <div class="info-item">
管理员账号 管理员账号{{ list.administrator.substr(0, 3) }}****{{
list.administrator.substr(7)
}}
<span @click="passwordUpdate(true)" class="brandInfo-update">修改</span> <span @click="passwordUpdate(true)" class="brandInfo-update">修改</span>
</div> </div>
<div class="info-item"> <div class="info-item">
管理员密码: 管理员密码: ******
<span @click="passwordUpdate(false)" class="brandInfo-update" <span @click="passwordUpdate(false)" class="brandInfo-update"
>修改</span >修改</span
> >
@ -39,8 +79,8 @@
其他信息 其他信息
</div> </div>
<div class="info-content"> <div class="info-content">
<div class="info-item">品牌联系人</div> <div class="info-item">品牌联系人{{ list.contact }}</div>
<div class="info-item">联系方式:</div> <div class="info-item">联系方式: {{ list.contactPhone }}</div>
</div> </div>
<div class="brandInfo"> <div class="brandInfo">
<span class="pattern"></span> <span class="pattern"></span>
@ -58,19 +98,29 @@
<changePassword ref="changePassword"></changePassword> <changePassword ref="changePassword"></changePassword>
</div> </div>
</template> </template>
<script> <script>
import changePassword from "./popup/change-password.vue"; import changePassword from "./popup/change-password.vue";
import addOrUpdate from "./popup/add-or-update.vue"; import addOrUpdate from "./popup/add-or-update.vue";
export default { export default {
components: { addOrUpdate, changePassword }, components: { addOrUpdate, changePassword },
data() { data() {
return {}; return {
list: [],
};
},
created() {
this.getList();
}, },
methods: { methods: {
getList() {
this.$api.mer_admin.getBrandInfo().then((res) => {
console.log(res);
this.list = res.data.data;
});
},
infoUpdate() { infoUpdate() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.toggle().update(); this.$refs.addOrUpdate.toggle().update(this.list);
}); });
console.log("123"); console.log("123");
}, },