|
|
@@ -25,7 +25,7 @@
|
|
|
<textarea
|
|
|
v-model="purchaseGuideText"
|
|
|
class="textarea-input"
|
|
|
- placeholder="请输入标题,不超过70个字,标题为空,则显示一张图片"
|
|
|
+ placeholder="请输入标题,不超过70个字,留空会显示一张图片"
|
|
|
:placeholder-style="{ color: '#999999' }"
|
|
|
:maxlength="500"
|
|
|
/>
|
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
init(){
|
|
|
getShopPurchaseGuide().then(res => {
|
|
|
this.purchaseGuideData = res.data.shopExt;
|
|
|
- this.status = this.purchaseGuideData.purchaseGuide > 0 ? true : false;
|
|
|
+ this.status = res.data.shop && res.data.shop.buyNotice == 1 ? true : false;
|
|
|
this.purchaseGuideText = res.data.shopExt && res.data.shopExt.purchaseGuideText ? res.data.shopExt.purchaseGuideText : ''
|
|
|
// 根据 purchaseGuide 和 title 设置选中值
|
|
|
if (this.purchaseGuideData.purchaseGuide !== "0" && this.purchaseGuideData.title) {
|
|
|
@@ -107,11 +107,7 @@ export default {
|
|
|
},
|
|
|
// 提交按钮
|
|
|
onSubmit() {
|
|
|
- const formData = {
|
|
|
- picTextId: this.selectedId,
|
|
|
- switch: this.status ? 1 : 0,
|
|
|
- purchaseGuideText:this.purchaseGuideText
|
|
|
- }
|
|
|
+ const formData = { picTextId: this.selectedId, switch: this.status ? 1 : 0, purchaseGuideText:this.purchaseGuideText }
|
|
|
uni.showLoading()
|
|
|
switchPurchaseGuide(formData).then(res => {
|
|
|
uni.hideLoading();
|
|
|
@@ -125,7 +121,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
updateSelectedItem(data) {
|
|
|
// 更新选中项显示
|
|
|
if (data && data.picTextId && data.title) {
|