Commit de4529df authored by 黄媛媛's avatar 黄媛媛

更新支付

parent 93c616f1
......@@ -42,11 +42,12 @@ export default {
this.$emit('closePay');
},
getDataInfo() {
let that=this;
let msg = {
OpenId: 'ow_7I5XC1-RGwwk8QANBmWKYKmOc',
OrderId: '1',
OrderPayType: 1,
GoodsName: '测试商品名称'
OpenId: that.payInfo.OpenId,
OrderId: that.payInfo.OrderId,
OrderPayType:that.payInfo.OrderPayType,
GoodsName: that.payInfo.GoodsName
};
this.request2(
{
......@@ -54,7 +55,6 @@ export default {
data: msg
},
res => {
console.log('res', res);
if (res.resultCode == 1) {
this.orderInfo = JSON.parse(res.data);
}
......
......@@ -171,10 +171,13 @@
</view>
<tabbars></tabbars>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</div>
</template>
<script>
import tabbars from '@/components/tabbar/index';
import auth from "@/components/auth/index.vue";
export default {
data() {
return {
......@@ -199,12 +202,14 @@ export default {
pageIndex: 1,
pageSize: 50,
Name: ''
}
},
showAuth:false
};
},
created() {},
components: {
tabbars
tabbars,
auth
},
onLoad() {
this.navHeight = this.$navHeight - 2;
......@@ -215,6 +220,16 @@ export default {
if (this.cstyle.cat_style == '4') {
}
},
onShow(){
this.u = uni.getStorageSync('mall_UserInfo');
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
};
this.showAuth = true;
}
},
mounted() {
let currentPages = getCurrentPages();
let c = this.$uiConfig.is_bang ? 80 : 52;
......@@ -234,6 +249,14 @@ export default {
this.init();
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
this.showAuth = false;
},
//关闭登录窗口
gbAuth(){
this.showAuth=false;
},
goHome() {
uni.redirectTo({
url: '/pages/index/main'
......
......@@ -246,7 +246,7 @@ export default {
if (option.ShoppingCartIdList) {
this.ShoppingCartIdList = JSON.parse(option.ShoppingCartIdList);
}
this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
// else {
// uni.redirectTo({
// url: '/pages/index/index'
......@@ -255,6 +255,7 @@ export default {
this.initPage();
this.mc = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
onShow() {
this.init();
......@@ -287,7 +288,6 @@ export default {
// 提交订单
submitOrderHandler() {
let that = this;
console.log('that.adressInfo', this.adressInfo);
if (that.adressInfo.Consignee == '') {
this.$refs.uToast.show({
title: '请选择收货信息!',
......@@ -324,7 +324,6 @@ export default {
data: form
},
res => {
console.log('res', res);
if (res.resultCode == 1) {
that.payBtn = true;
that.payInfo.OrderId = res.data.OrderId;
......@@ -415,7 +414,6 @@ export default {
data: { ProductList: ProductList }
},
res => {
console.log('优惠券', res);
if (res.resultCode == 1) {
this.couponList = res.data;
}
......@@ -460,7 +458,6 @@ export default {
this.$forceUpdate();
},
chosenAddress(id) {
console.log('chosenAddress');
uni.navigateTo({
url: '/pages/address/address?form=ordersubmit&id=' + id
});
......@@ -500,7 +497,6 @@ export default {
this.address = res.data.address;
this.mchs = res.data.mch_list;
this.payInfo.GoodsName = this.mchs[0].goods_list[0].name;
console.log('this.payInfo.GoodsName', this.payInfo.GoodsName);
this.ds = res.data;
this.expressPrice = 0.0;
this.goodPrice = 0.0;
......
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