当前位置: 首页 > news >正文

怎样做免费网站会员秦皇岛网站建设seo

怎样做免费网站会员,秦皇岛网站建设seo,在线考试响应式网站模板下载,网站模板哪里好技术栈 Appgallery connect 开发准备 上一节我们已经实现了优惠券的选择#xff0c;并且成功的把券后的价格也展示给用户#xff0c;不能使用的优惠券我们也用友好的方式告知用户#xff0c;这一节我们来实现优惠券内容的下一步#xff0c;优惠券内容结合订单进行结算提…技术栈 Appgallery connect 开发准备 上一节我们已经实现了优惠券的选择并且成功的把券后的价格也展示给用户不能使用的优惠券我们也用友好的方式告知用户这一节我们来实现优惠券内容的下一步优惠券内容结合订单进行结算提交 功能分析 因为我们之前的订单列表是订单相关商品相关是分开的所以在这里我们同样要把优惠券的内容分开只存储id进去后续再查询出对应的券金额我们首先就是要修改订单表然后在券选择的同时拿到优惠券的相关内容提交订单时把优惠券内容一起提交方便我们后续的订单详情内查询券后价 代码实现 首先修改orderlist的表内容 {CloudDBZoneName: default,objectTypeName: order_list,fields: [{fieldName: id, fieldType: Integer, notNull: true, belongPrimaryKey: true},{fieldName: user_id, fieldType: Integer, notNull: true, defaultValue: 0},{fieldName: order_code, fieldType: String},{fieldName: order_status, fieldType: Integer},{fieldName: order_product_id, fieldType: String},{fieldName: coupon_id, fieldType: Integer},{fieldName: address, fieldType: String},{fieldName: nickname, fieldType: String},{fieldName: phone, fieldType: String},{fieldName: order_remark, fieldType: String},{fieldName: pay_type, fieldType: String},{fieldName: order_create_time, fieldType: String},{fieldName: order_pay_time, fieldType: String},{fieldName: order_delivery_time, fieldType: String},{fieldName: order_over_time, fieldType: String}],indexes: [{indexName: field1Index, indexList: [{fieldName:id,sortType:ASC}]}],permissions: [{role: World, rights: [Read, Upsert, Delete]},{role: Authenticated, rights: [Read, Upsert, Delete]},{role: Creator, rights: [Read, Upsert, Delete]},{role: Administrator, rights: [Read, Upsert, Delete]}] }然后我们在选择券的时候拿到券的id这里我们用回调的方式实现 //自定义弹窗页面onItemSelected: (coupon_id:number) void () {};//结算页State coupon_id:number0couponController: CustomDialogController| null new CustomDialogController({builder: CouponCheckDialog({couponPrice:this.couponPrice,price:this.price(),onItemSelected:(coupon_id:number){this.coupon_idcoupon_id}}),alignment: DialogAlignment.Bottom,customStyle:true}); 结算订单时合并信息提交 Text(提交订单).fontColor(Color.White).padding(10).borderRadius(10).backgroundColor(#d81e06).fontSize(14).onClick(async (){if (this.addressInfo!null) {let databaseZone cloudDatabase.zone(default);try {for (let i 0; i this.productList.length; i) {let productPush new order_product_list();productPush.idthis.codeIdiproductPush.order_product_idthis.codeIdproductPush.imgthis.productList[i].productImgAddressproductPush.pricethis.productList[i].productPriceproductPush.namethis.productList[i].productNameproductPush.originalPricethis.productList[i].productOriginalPriceproductPush.specthis.productList[i].productSpecNameproductPush.buyAmountthis.productList[i].buyAmountlet num await databaseZone.upsert(productPush);hilog.info(0x0000, testTag, Succeeded in upserting data, result: ${num});}}catch (e) {hilog.info(0x0000, testTag, Succeeded in upserting data, result: ${e});}let orderPush new order_list();orderPush.idMath.floor(Math.random() * 1000000)orderPush.user_idthis.user!.user_idorderPush.order_product_idString(this.codeId)orderPush.order_codethis.generateOrderNo(10)orderPush.order_status0if (this.remark!) {orderPush.order_remarkthis.remark}orderPush.coupon_idthis.coupon_idorderPush.addressthis.addressInfo.addressorderPush.nicknamethis.addressInfo.nikeNameorderPush.phonethis.addressInfo.phoneorderPush.order_create_timethis.formatCurrentDate()orderPush.order_pay_timethis.formatCurrentDate()let num await databaseZone.upsert(orderPush);hilog.info(0x0000, testTag, Succeeded in upserting data, result: ${num});if (num0) {for (let i 0; i this.productList.length; i) {if (this.productList[i].isNeedPay) {let item new cart_product_list();item.idthis.productList[i].idlet listData await databaseZone.delete(item);hilog.info(0x0000, testTag, Succeeded in upserting data, result: ${listData});}}let eventData: emitter.EventData {data: {}};let innerEvent: emitter.InnerEvent {eventId: 1012,priority: emitter.EventPriority.HIGH};emitter.emit(innerEvent, eventData);router.replaceUrl({url:pages/view/OrderSuccessPage,params:orderPush})}} else {showToast(请先选择地址)}})到这里我们就实现了结算订单跟优惠券的关联
http://www.zqtcl.cn/news/772161/

相关文章:

  • 用最少的钱做网站根据域名查询网站名称
  • 网站开发答辩难点网站返回按钮设计
  • 鹤壁做网站优化建设银行理财产品网站
  • 电子商务类网站模板自学网站建设基本流程
  • 无锡网站制作的公司上海企业服务公司
  • 做h5小程序的网站搜索引擎营销案例
  • 订餐网站开发方案查询网站是否正规
  • 建站论坛图片生成器免费
  • 怎么做自己的店铺网站博物馆门户网站建设优势
  • 专业旅游培训网站建设应用之星 wordpress
  • 青海媒体网站建设公司深圳网站建设推广优化公司
  • 网站开发 价格跨境支付互联互通
  • 织梦 修改网站logo营销型网站设计的内容
  • 电商网站运营策划做网站CentOS还是win好
  • 小型企业网站模板企业网站seo点击软件
  • 提供邯郸企业建网站网站图片上怎么做弹幕效果
  • 滨州做网站的wordpress如何添加商桥
  • 网站登录密码忘记网站开发营业执照申请
  • 电商网站设计思路音乐推广平台有哪些
  • 网站建设傲鸿网站链轮内有死链
  • 哪些网站可以做微商品牌宣传网站怎么不花钱做排名 知乎
  • 上传了网站源码怎么做wordpress加百度广告代码出问题
  • 哪些网站做推广vi设计说明模板
  • 杭州市建设工程造价管理协会网站攀枝花建设工程质量监督站投诉网站
  • 做网站推广送什么深圳的网站建设公司流程
  • 中国网站开发的前景制作公司主页网站
  • 在线画流程图的网站购物网站的设计与实现论文
  • 淘宝客cms网站建设K12网站怎么建设
  • 专业门户网站开发浙江省湖州艺术与设计学校官网
  • 企业网站搭建价格搭建平台的另一种说法