|
|
@@ -20,7 +20,7 @@
|
|
|
</t-td>
|
|
|
<t-td align="center" color="info">
|
|
|
<view>
|
|
|
- <input v-model="item.discount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="() => clearDiscount(inIndex)" placeholder="9折写0.9,85折写0.85" />
|
|
|
+ <input v-model="item.amount" type="digit" style="border:1upx solid #cccccc;color:black;font-size:30upx;" @focus="() => clearDiscount(inIndex)" placeholder="请填写" />
|
|
|
</view>
|
|
|
</t-td>
|
|
|
</t-tr>
|
|
|
@@ -44,7 +44,7 @@
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import list from '@/mixins/list'
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
-import { getInitData,modifyMember } from '@/api/member'
|
|
|
+import { getLevelInitData,modifyLevel } from '@/api/member'
|
|
|
export default {
|
|
|
name: "addPrice",
|
|
|
components: {
|
|
|
@@ -58,11 +58,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- setRechargeDiscount(){
|
|
|
- this.$util.pageTo({url: "/admin/recharge/discount",type:2})
|
|
|
- },
|
|
|
init(){
|
|
|
- getInitData().then(res=>{
|
|
|
+ getLevelInitData().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.map = res.data.member?res.data.member:[]
|
|
|
this.reduceDay = res.data.reduceDay?res.data.reduceDay:30
|
|
|
@@ -70,7 +67,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
clearDiscount(index){
|
|
|
- this.$set(this.map[index], 'discount', '')
|
|
|
+ this.$set(this.map[index], 'amount', '')
|
|
|
},
|
|
|
clearReduceDay(){
|
|
|
this.reduceDay = ''
|
|
|
@@ -79,10 +76,13 @@ export default {
|
|
|
uni.navigateBack()
|
|
|
},
|
|
|
saveData(){
|
|
|
- this.$util.confirmModal({content:'只能修改一次,提交后将不能再次修改,确认提交?'},() => {
|
|
|
- modifyMember({data:this.map,reduceDay:this.reduceDay}).then(res=>{
|
|
|
+ this.$util.confirmModal({content:'确认提交?提交后将不能再修改'},() => {
|
|
|
+ modifyLevel({data:this.map,reduceDay:this.reduceDay}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.$msg(res.msg)
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }, 900);
|
|
|
}
|
|
|
})
|
|
|
})
|