修改成功的toast图标
This commit is contained in:
parent
eb7400f721
commit
c93271626c
@ -1,8 +1,8 @@
|
||||
const env = 'product'; //product, test
|
||||
const env = 'test'; //product, test
|
||||
export default {
|
||||
env: env,
|
||||
apiBase: env === 'test'? 'https://ghost-test.kingsome.cn' : 'https://ghost.kingsome.cn',
|
||||
cdnBase: 'http://h5games-al.kingsome.cn/emulator-static/',
|
||||
cdnBase: 'https://h5games-al.kingsome.cn/emulator-static/',
|
||||
version: '1.0.0',
|
||||
gameTypes: ['射击','格斗', '角色扮演','动作角色扮演',
|
||||
'赛车', '动作游戏','策略战棋', '其他',
|
||||
|
@ -2,13 +2,13 @@ import wepy from 'wepy'
|
||||
|
||||
export default class testMixin extends wepy.mixin {
|
||||
|
||||
showToast (title, duration) {
|
||||
showToast (title, duration, type = 'loading') {
|
||||
if (!duration) {
|
||||
duration = 15000
|
||||
}
|
||||
wepy.showToast({
|
||||
title: title,
|
||||
icon: 'loading',
|
||||
icon: type,
|
||||
duration: duration
|
||||
})
|
||||
}
|
||||
|
@ -167,11 +167,13 @@
|
||||
jcEvent.on(jcEvent.events.BUY_ITEM_RESULT, this, data => {
|
||||
this.zActionSheetCfg.hide = true;
|
||||
if (data.success) {
|
||||
this.showToast('开通成功', 2000);
|
||||
this.showToast('开通成功', 2000, 'success');
|
||||
self.zActionSheetCfg.hide = true;
|
||||
self.record.owned = true;
|
||||
self.bottomActionCfg.mainBtnIconClass = 'icon-merge';
|
||||
self.bottomActionCfg.mainBtnTitle = '开始游戏';
|
||||
self.bottomActionCfg.primary = true;
|
||||
self.$apply();
|
||||
jcEvent.emit(jcEvent.events.UPDATE_GAME_STATUS, {gid: self.id});
|
||||
} else {
|
||||
this.showToast('开通失败', 2000)
|
||||
@ -232,7 +234,9 @@
|
||||
try {
|
||||
let res = await http.post(`/api/emulated/buy_game`, { gid: this.id });
|
||||
if (res.errcode === 0) {
|
||||
this.showToast('开通成功', 2000);
|
||||
this.showToast('开通成功', 2000, 'success');
|
||||
this.zActionSheetCfg.hide = true;
|
||||
this.$apply();
|
||||
jcEvent.emit(jcEvent.events.UPDATE_GAME_STATUS, {gid: this.id});
|
||||
this.getRecord();
|
||||
}
|
||||
|
@ -156,7 +156,7 @@
|
||||
})
|
||||
jcEvent.on(jcEvent.events.BUY_VIP_RESULT, this, data => {
|
||||
if (data.success) {
|
||||
this.showToast('购买成功', 2000);
|
||||
this.showToast('购买成功', 2000, 'success');
|
||||
this.getUserInfo();
|
||||
} else {
|
||||
this.showToast('购买失败', 2000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user