|
|
@@ -23,7 +23,10 @@
|
|
|
<view> {{ myInfo.shopName||'' }}
|
|
|
<text v-if="myInfo.shopInfo && myInfo.shopInfo.default && myInfo.shopInfo.default == 1" class="default-shop">总店</text>
|
|
|
</view>
|
|
|
- <view> <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text> </view>
|
|
|
+ <view style="display: flex; align-items: center;">
|
|
|
+ <text>{{ myInfo.sjName||'' }} | ID {{myInfo.shopId||''}}</text>
|
|
|
+ <text class="edit-icon" @click.stop="editShopName">✏️</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="top-info_box" @click="pageTo({url:'/admin/home/login'})" v-else>
|
|
|
<view style="font-size:40upx;"> 登录/注册 </view>
|
|
|
@@ -235,6 +238,25 @@
|
|
|
></htz-image-upload>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <!-- 修改名称弹出框 -->
|
|
|
+ <uni-popup ref="editPopup" type="center" :animation="false">
|
|
|
+ <view class="edit-modal">
|
|
|
+ <view class="modal-title">修改名称</view>
|
|
|
+ <view class="modal-content">
|
|
|
+ <input
|
|
|
+ v-model="editName"
|
|
|
+ placeholder="请输入名称"
|
|
|
+ class="edit-input"
|
|
|
+ maxlength="20"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ <view class="modal-buttons">
|
|
|
+ <button class="cancel-btn" @click="cancelEdit">取消</button>
|
|
|
+ <button class="confirm-btn" @click="confirmEdit">确认</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -242,6 +264,7 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { mainMy, applyCash } from "@/api/home";
|
|
|
import { clearLogin } from "@/api/admin";
|
|
|
+import { modifySjName } from "@/api/shop";
|
|
|
import { inMoney,outMoney } from "@/api/shop-money";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import { list } from "@/mixins";
|
|
|
@@ -278,6 +301,7 @@ export default {
|
|
|
showDeadline:false,
|
|
|
avatarImgData: [],
|
|
|
headers: { token: '' },
|
|
|
+ editName: ''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
@@ -545,6 +569,27 @@ export default {
|
|
|
this.$msg('图片上传失败')
|
|
|
}
|
|
|
},
|
|
|
+ editShopName() {
|
|
|
+ this.editName = this.myInfo.sjName || ''
|
|
|
+ this.$refs.editPopup.open('center')
|
|
|
+ },
|
|
|
+ cancelEdit() {
|
|
|
+ this.$refs.editPopup.close()
|
|
|
+ this.editName = ''
|
|
|
+ },
|
|
|
+ confirmEdit() {
|
|
|
+ if (!this.editName.trim()) {
|
|
|
+ this.$msg('请输入名称')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ modifySjName({name:this.editName}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.myInfo.sjName = this.editName
|
|
|
+ this.$refs.editPopup.close()
|
|
|
+ this.$msg('修改成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -754,5 +799,75 @@ export default {
|
|
|
margin-top: 25upx;
|
|
|
width: 30vw;
|
|
|
}
|
|
|
+
|
|
|
+ /* 修改名称相关样式 */
|
|
|
+ .edit-icon {
|
|
|
+ margin-left: 15upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #666666;
|
|
|
+ padding: 5upx;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .edit-modal {
|
|
|
+ background: white;
|
|
|
+ border-radius: 20upx;
|
|
|
+ padding: 40upx;
|
|
|
+ width: 80vw;
|
|
|
+ max-width: 500upx;
|
|
|
+ box-shadow: 0 10upx 30upx rgba(0,0,0,0.3);
|
|
|
+ }
|
|
|
+
|
|
|
+ .modal-title {
|
|
|
+ font-size: 36upx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 40upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .modal-content {
|
|
|
+ margin-bottom: 40upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .edit-input {
|
|
|
+ width: 100%;
|
|
|
+ height: 80upx;
|
|
|
+ border: 2upx solid #e5e5e5;
|
|
|
+ border-radius: 10upx;
|
|
|
+ padding: 0 20upx;
|
|
|
+ font-size: 32upx;
|
|
|
+ color: #333;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .edit-input:focus {
|
|
|
+ border-color: #3385FF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .modal-buttons {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ gap: 20upx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cancel-btn, .confirm-btn {
|
|
|
+ flex: 1;
|
|
|
+ height: 80upx;
|
|
|
+ border-radius: 40upx;
|
|
|
+ font-size: 32upx;
|
|
|
+ border: none;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .cancel-btn {
|
|
|
+ background: #f5f5f5;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+
|
|
|
+ .confirm-btn {
|
|
|
+ background: #3385FF;
|
|
|
+ color: white;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|