Commit aadc2edc authored by Edwise's avatar Edwise 🍷

1234

parent 8ec0b444
<view class="selectcat modal-animate-zoom-in">
<image class="selectcatbg" src={{resList['db53267d-4141-4d3e-afda-9b523c89be3e'].url}} />
<view class="selectcatblue">
<image class="bluebg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="blueimg" src={{resList['95a6b0a9-3e7a-4a0b-82b6-6742e2a8bddf'].url}} />
<label class="bluename">田园橘猫</label>
<image class="bluesure" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatsh">
<image class="shbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="shimg" src={{resList['fe52ffae-fadd-40f3-97b5-d3d56fd04781'].url}} />
<label class="shname">田园橘猫</label>
<image class="shsure" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatxl">
<image class="xlbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="xlimg" src={{resList['193f6955-d754-4b9f-80ca-b9b9a72e8a8b'].url}} />
<label class="xlname">田园橘猫</label>
<image class="xlsure" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatorge">
<image class="orgebg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="orgeimg" src={{resList['e28e5250-c740-4e4f-a855-c415c557e77e'].url}} />
<label class="orgename">田园橘猫</label>
<image class="orgesure" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<image class="selectcattrue" src={{resList['628fc38b-7dc0-4c69-aac1-279d60c8f1ed'].url}} />
<view class="selectcat modal-animate-zoom-in">
<image class="selectcatbg" src={{resList['db53267d-4141-4d3e-afda-9b523c89be3e'].url}} />
<view class="selectcatblue" id="cat_1" onTap="changeSelectCat">
<image class="bluebg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="blueimg" src={{resList['95a6b0a9-3e7a-4a0b-82b6-6742e2a8bddf'].url}} />
<label class="bluename">1</label>
<image class="bluesure" a:if="{{curSelect==1}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatsh" id="cat_2" onTap="changeSelectCat">
<image class="shbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="shimg" src={{resList['fe52ffae-fadd-40f3-97b5-d3d56fd04781'].url}} />
<label class="shname">2</label>
<image class="shsure" a:if="{{curSelect==2}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatxl" id="cat_3" onTap="changeSelectCat">
<image class="xlbg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="xlimg" src={{resList['193f6955-d754-4b9f-80ca-b9b9a72e8a8b'].url}} />
<label class="xlname">3</label>
<image class="xlsure" a:if="{{curSelect==3}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<view class="selectcatorge" id="cat_4" onTap="changeSelectCat">
<image class="orgebg" src={{resList['02183198-f4da-4ac2-8bf3-d6b7a07d3279'].url}} />
<image class="orgeimg" src={{resList['e28e5250-c740-4e4f-a855-c415c557e77e'].url}} />
<label class="orgename">4</label>
<image class="orgesure" a:if="{{curSelect==4}}" src={{resList['f956cda2-5eef-4942-8737-742d171527bd'].url}} />
</view>
<image class="selectcattrue" onTap="selectSure" src={{resList['628fc38b-7dc0-4c69-aac1-279d60c8f1ed'].url}} />
</view>
\ No newline at end of file
......@@ -4,14 +4,40 @@ import resList from '../../resconfig/resList';
Component({
props: {},
data: {
resList: resList
resList: resList,
curSelect:1 //1:蓝猫,2:三花,3:暹罗,4:橘猫
},
methods: {},
methods: {
onModalClose() {
const { onModalClose } = this.props;
onModalClose && onModalClose();
console.log('onModalClose')
},
changeSelectCat(e){
// console.log(e.currentTarget.id);
let type = parseInt(e.currentTarget.id.split("_")[1]);
this.setData({
curSelect:type
})
console.log(type);
},
onInit(props) {
this.setData(this.data || {
resList: resList
});
}
selectSure(){
const {getCatTypeAndOpenNameModal,onModalClose} = this.props;
onModalClose && onModalClose();
console.log(getCatTypeAndOpenNameModal)
// getCatTypeAndOpenNameModal&&getCatTypeAndOpenNameModal(this.data.curSelect);
}
},
didMount() {
console.log(this.data.curSelect)
this.setData({
curSelect:2
})
},
});
\ No newline at end of file
......@@ -7,5 +7,5 @@
<rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal>
<levelup-modal a:if="{{levelupModalVisible}}" onModalClose="closeLevelupModal"></levelup-modal>
<message-modal a:if="{{messageModalVisible}}" mydata="{{messageModalData}}" onModalClose="closeMessageModal"></message-modal>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal onModalClose="closeSelectcatModal"></selectcat-modal></view>
<view class="popcontainer" a:if="{{selectcatModalVisible}}"><selectcat-modal getCatTypeAndOpenNameModal="getCatTypeAndOpenNameModal" onModalClose="closeSelectcatModal"></selectcat-modal></view>
<view class="popcontainer" a:if="{{catnameModalVisible}}" ><catname-modal onModalClose="closeCatnameModal"/></view>
......@@ -26,12 +26,14 @@ const checkSystem = async () => {
Page({
data: {
catType:1,
catName:'',
messageModalVisible: false,
messageModalData: {},
ruleModalVisible: false,
levelupModalVisible: false,
selectcatModalVisible: false,
catnameModalVisible: false
catnameModalVisible: false,
},
onLoad(props) {
......@@ -249,6 +251,11 @@ Page({
this.init();
}
},
/**选择猫咪,打开取名弹窗 */
getCatTypeAndOpenNameModal(type){
this.catType = type;
console.log("选择了",type)
},
closeLevelupModal() {
this.setData({
levelupModalVisible: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment