海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

639 lines
21 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <template>
  2. <view v-if="$isRight(goods_details)">
  3. <view class="bg-white" v-if="enter_type!=1">
  4. <!-- <view class="cu-bar1 padding-lr">
  5. <text class="lf-color-555 lf-font-28">联系人</text>
  6. <input type="text" v-model="contact" class="lf-color-999 lf-font-28 lf-text-left" style="position:absolute;right:180rpx" placeholder="请输入联系人" />
  7. </view>
  8. <view class="cu-bar1 padding-lr">
  9. <text class="lf-color-555 lf-font-28">联系方式</text>
  10. <view class="lf-row-between">
  11. <input type="text" v-model="phone" class="lf-color-999 lf-font-28 lf-text-left" style="position:absolute;right:180rpx" placeholder="请输入联系电话" maxlength="11" />
  12. </view>
  13. <button style="position: absolute;right: 0rpx;" class="lf-bg-white" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
  14. <u-icon name="phone"></u-icon>
  15. </button>
  16. </view> -->
  17. <view class="padding-lr lf-m-b-40 lf-m-t-30" :class="item.type == 'text'?'lf-row-between':''" v-for="(item,index) of form_list" :key="index">
  18. <text class="lf-color-555 lf-font-28" v-once>{{item.field}}</text>
  19. <input type="text" v-if="item.type == 'text'" v-model="info[item.field]" @blur="computedAge()" class="lf-color-999 lf-font-28 lf-text-left" style="position:absolute;right:180rpx" :placeholder="`请输入`+item.field"/>
  20. <view class="lf-m-t-20" v-if="item.type == 'radio'">
  21. <u-radio-group v-model="info[item.field]" @change="radioGroupChange">
  22. <u-radio
  23. @change="radioChange"
  24. v-for="(item2, index2) in item.options" :key="index2"
  25. :name="item2"
  26. >
  27. {{item2}}
  28. </u-radio>
  29. </u-radio-group>
  30. </view>
  31. <view class="lf-m-t-20" v-if="item.type == 'checkbox'">
  32. <u-checkbox-group @change="checkboxGroupChange()">
  33. <u-checkbox
  34. @change="checkboxChange(item.field)"
  35. shape="circle"
  36. v-model="item2.checked"
  37. v-for="(item2, index2) in item.options" :key="index2"
  38. :name="item2.name"
  39. >{{item2.name}}</u-checkbox>
  40. </u-checkbox-group>
  41. </view>
  42. <view class="lf-m-t-20" v-if="item.type == 'datetime'" @click="showDateTime = true">
  43. <text>{{ info[item.field] || '请选择日期' }}</text>
  44. <u-picker mode="time" v-model="showDateTime" :params="dateTimeParams" @confirm="dateTimeConfirm($event, item.field)"></u-picker>
  45. </view>
  46. <view class="lf-m-t-20" v-if="item.type == 'textarea'">
  47. <view class="cu-self menu" style="margin-top: 30rpx; position: relative;">
  48. <textarea :cursor-spacing="120" maxlength="300" :adjust-position="true" type="text" v-model="info[item.field]" style="background-color: #F8F8F8;border-radius: 20rpx;" class="text-left lf-font-28 area-self lf-w-100 lf-p-20" placeholder="请输入内容" />
  49. </view>
  50. </view>
  51. <view class="grid col-3 grid-square flex-sub lf-m-t-30" v-if="item.type == 'image'">
  52. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="bg-img" v-for="(item,index) in img_list" :key="index" @tap="showImg(index)" :data-url="img_list[index]">
  53. <image :src="img_list[index]" mode="aspectFill"></image>
  54. <view class="cu-tag bg-red" @tap.stop="DelImg(index)" :data-index="index">
  55. <!-- <text class='cuIcon-close'></text> -->
  56. <text class="lf-iconfont lf-icon-cuowu lf-font-40 lf-color-price"></text>
  57. </view>
  58. </view>
  59. <view style="width: 212rpx;height: 212rpx;border-radius: 10rpx;" class="solids" @tap="ChooseImage(item.field)" v-if="img_list.length<3">
  60. <text class='cuIcon-cameraadd'></text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <self-line/>
  66. <view class="lf-bg-white lf-p-t-30 lf-p-b-30 lf-p-l-32 lf-p-r-32">
  67. <view class="lf-row-between">
  68. <image :src="goods_details.picture" mode="aspectFill" style="width: 240rpx; height: 240rpx;border-radius: 20rpx;"></image>
  69. <view class="flex-sub padding-left-sm">
  70. <view class="bref-box lf-font-32 lf-color-333 lf-line-2" style="height: 88rpx;line-height: 44rpx;">
  71. {{goods_details.title}}
  72. </view>
  73. <view class="lf-row-between">
  74. <view class="flex lf-m-t-25 align-center text-center">
  75. <text class="block lf-color-gray lf-font-24" style="line-height: 40rpx;">数量</text>
  76. <text class="lf-m-l-10 lf-color-gray lf-font-24">x {{buy_num}}</text>
  77. </view>
  78. <view>
  79. <u-number-box :min="1" v-model="buy_num" @change="valChange"></u-number-box>
  80. </view>
  81. </view>
  82. <view class="flex align-center text-center lf-m-t-25">
  83. <lf-price :price="goods_details.price" />
  84. <view class="lf-m-l-20 lf-line-through lf-color-gray">
  85. {{goods_details.original_price}}
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <!-- <self-line/>
  92. <view class="bg-white">
  93. <view class="cu-bar padding-lr">
  94. <text class="lf-color-555 lf-font-28">优惠</text>
  95. <view v-if="goods_details.coupon != ''">
  96. <text class="lf-color-price lf-font-28 lf-m-l-10" v-for="(item,index) of goods_details.coupon">{{item.tag}}</text>
  97. </view>
  98. <view v-else>
  99. <text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
  100. </view>
  101. </view>
  102. </view> -->
  103. <self-line/>
  104. <view class="bg-white" v-if="enter_type!=1">
  105. <!-- 酒店 -->
  106. <view v-if="goods_type == 1">
  107. <view class="cu-bar padding-lr">
  108. <text class="lf-color-555 lf-font-28">套餐类型</text>
  109. <text class="lf-font-28" style="color: #131315;">{{goods_typetext}}</text>
  110. </view>
  111. <view class="cu-bar padding-lr">
  112. <text class="lf-color-555 lf-font-28">酒店住房日期</text>
  113. <text class="lf-font-28" style="color: #131315;">{{check_in_time}}~{{check_out_time}} <text style="color: #131315;" class="lf-font-28 lf-m-l-20">{{totalLive}}</text></text>
  114. </view>
  115. <view class="cu-bar padding-lr">
  116. <text class="lf-color-555 lf-font-28">到店时间</text>
  117. <text class="lf-font-28" style="color: #131315;">{{arrival_time}}</text>
  118. </view>
  119. </view>
  120. <!-- 旅游路线 -->
  121. <view v-if="goods_type == 0 || goods_type == 4 || goods_type == 5 || goods_type == 2">
  122. <view class="cu-bar padding-lr">
  123. <text class="lf-color-555 lf-font-28">套餐类型</text>
  124. <text class="lf-font-28" style="color: #131315;">{{goods_typetext}}</text>
  125. </view>
  126. <view class="cu-bar padding-lr">
  127. <text class="lf-color-555 lf-font-28">开始时间</text>
  128. <text class="lf-font-28" style="color: #131315;">{{departure_time}}</text>
  129. </view>
  130. </view>
  131. </view>
  132. <self-line/>
  133. <view class="bg-white" v-if="enter_type!=1">
  134. <view class="lf-p-t-30 lf-p-l-32 lf-p-b-36">
  135. <view class="lf-font-28 lf-color-555">支付方式</view>
  136. </view>
  137. <view class="lf-p-r-32 lf-p-l-32">
  138. <button class="cu-btn bg-white margin-self" :class="pay_type==0?'border-green':'border'" @tap="payStatus(0)">
  139. <text class="lf-iconfont lf-icon-weixin text-green lf-font-44 lf-m-r-23"></text>
  140. <text class="lf-font-32" :class="pay_type==0?'text-green':'lf-color-333'">微信支付</text>
  141. <text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==0" style="position: absolute;right: 22rpx;"></text>
  142. </button>
  143. </view>
  144. <view class="lf-p-r-32 lf-p-l-32 lf-m-t-30">
  145. <button class="cu-btn bg-white margin-self" :class="pay_type==1?'border-green':'border'" @tap="payStatus(1)">
  146. <text class="lf-font-32" :class="pay_type==1?'text-green':'lf-color-333'">线下支付</text>
  147. <text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==1" style="position: absolute;right: 22rpx;"></text>
  148. </button>
  149. </view>
  150. <view class="lf-p-r-32 lf-p-l-32 lf-m-t-30" v-if="goods_details.deposit != '0.00'">
  151. <button class="cu-btn bg-white margin-self" :class="pay_type==2?'border-green':'border'" @tap="payStatus(2)">
  152. <text class="lf-font-32" :class="pay_type==2?'text-green':'lf-color-333'">订金支付</text>
  153. <text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==2" style="position: absolute;right: 22rpx;"></text>
  154. </button>
  155. </view>
  156. <view class="lf-p-r-32 lf-p-l-32 lf-m-t-30">
  157. <button class="cu-btn bg-white margin-self" v-if="goods_details.earnest != '0.00'" :class="pay_type==3?'border-green':'border'" @tap="payStatus(3)">
  158. <text class="lf-font-32" :class="pay_type==3?'text-green':'lf-color-333'">定金支付</text>
  159. <text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==3" style="position: absolute;right: 22rpx;"></text>
  160. </button>
  161. </view>
  162. <!-- <view class="lf-p-r-32 lf-p-l-32 lf-m-t-30">
  163. <button class="cu-btn bg-white margin-self" :class="pay_type==4?'border-green':'border'" @tap="payStatus(4)">
  164. <text class="lf-font-32" :class="pay_type==4?'text-green':'lf-color-333'">首款支付</text>
  165. <text class="lf-iconfont lf-icon-dui lf-font-44 lf-color-primary" v-if="pay_type==4" style="position: absolute;right: 22rpx;"></text>
  166. </button>
  167. </view> -->
  168. </view>
  169. <view style="height: 200rpx;"></view>
  170. <view class="btn-bottom solid-top1">
  171. <view class="padding-lr lf-p-t-10 lf-p-b-10 bg-white flex justify-between align-center shadow">
  172. <view class="flex align-center">
  173. <text class="lf-font-24 lf-font-555">应付款</text>
  174. <lf-price :price="goods_details.final_price" />
  175. </view>
  176. <button class="btn" @tap="submit">
  177. <text class="lf-font-32 text-white" v-if="btn_type == 1">下单付款</text>
  178. <text class="lf-font-32 text-white" v-else>支付尾款</text>
  179. </button>
  180. </view>
  181. </view>
  182. </view>
  183. </template>
  184. <script>
  185. export default {
  186. data() {
  187. return {
  188. goods_id: 0,
  189. goods_details: {},
  190. contact: '',
  191. phone: '',
  192. pay_type: 0,
  193. btn_type: 1,
  194. ifPay: true,
  195. order_id: 0,
  196. enter_type: 0,
  197. payState: true,
  198. pay_order_id: 0,
  199. vertify_code: '',
  200. sex: '',
  201. age: '',
  202. goods_type: 0,
  203. spec_id: 0,
  204. goods_typetext: '',
  205. //景区
  206. enter_time: '',
  207. //旅游路线
  208. departure_time: '',
  209. return_time: '',
  210. //酒店
  211. check_in_time: '',
  212. check_out_time: '',
  213. arrival_time: '',
  214. totalLive: '',
  215. hotel_specid: [],
  216. //多行文本
  217. applyInfo: '',
  218. //图片上传
  219. hostImg: '',
  220. img_list: [], // 反馈问题图片
  221. form_type: '',
  222. form_list: [],
  223. info: {},
  224. image_name: '',
  225. if_image_complatet: false,
  226. check_box_name: '',
  227. buy_num: 0,
  228. showDateTime: false ,// 日期时间选择器是否显示
  229. dateTimeParams: {
  230. year: true,
  231. month: true,
  232. day: true,
  233. hour: true,
  234. minute: true,
  235. second: false
  236. }
  237. }
  238. },
  239. onLoad(e) {
  240. //0旅游路线1酒店2景区3餐厅
  241. this.goods_id = e.goods_id;
  242. this.goods_type = e.goods_type;
  243. this.btn_type = e.btn_type;
  244. this.buy_num = e.buy_num;
  245. console.log('出来的数量',this.buy_num)
  246. this.order_id = e.order_id;
  247. this.form_type = JSON.parse(decodeURIComponent(e.form_type));
  248. // 修复原先checkbox数组格式错误导致报错
  249. let form_list = this.form_type.fields.map(item => {
  250. if(item.type == 'checkbox'){
  251. item.options = item.options.map(o => {
  252. return {name: o, checked: false};
  253. })
  254. }
  255. return item;
  256. })
  257. this.form_list = form_list;
  258. console.log('表单格式',this.form_list)
  259. var arr = e.spec_id.split(",")
  260. console.log(arr)
  261. this.hotel_specid = arr
  262. console.log('数组id',this.hotel_specid)
  263. this.enter_type = e.enter_type;
  264. this.goods_typetext = e.goods_typetext;
  265. if(this.goods_id) {
  266. this.getGoodsData(this.pay_type);
  267. if(this.goods_type == 0 || this.goods_type == 4 || this.goods_type == 5 || this.goods_type == 2) {
  268. this.departure_time = e.departure_time;
  269. }else if(this.goods_type == 1) {
  270. this.check_in_time = e.check_in_time;
  271. this.check_out_time = e.check_out_time;
  272. this.arrival_time = e.arrival_time;
  273. this.totalLive = e.totalLive;
  274. console.log(this.check_in_time,this.check_out_time,this.arrival_time)
  275. }
  276. }
  277. if(this.order_id && this.enter_type == 1) {
  278. console.log('con列表执行')
  279. this.payOnce()
  280. }
  281. },
  282. onShow(e) {
  283. let that = this
  284. uni.$on('payState',(data) => {
  285. that.payState = data.msg;
  286. that.pay_order_id = data.payorder_id;
  287. console.log('传来的订单id',that.pay_order_id)
  288. if(that.payState == true) {
  289. that.$url('/pages/payState/paystate?ifSuccess=1&order_id='+that.pay_order_id,{type: 'redirect'})
  290. }else {
  291. that.$url('/pages/payState/paystate?ifSuccess=2&order_id='+that.pay_order_id,{type: 'redirect'})
  292. }
  293. })
  294. },
  295. onUnload() {
  296. uni.$off('payState');
  297. },
  298. methods: {
  299. // 日期时间选择完成
  300. dateTimeConfirm(event, info_key){
  301. let { year, month, day, hour, minute } = event;
  302. this.info[info_key] = `${year}-${month}-${day} ${hour}:${minute}`;
  303. },
  304. valChange(e) {
  305. this.buy_num = e.value;
  306. this.getGoodsData(this.pay_type);
  307. },
  308. dynamicLength(){
  309. return parseInt(this.applyInfo.length);
  310. },
  311. //多选
  312. checkboxGroupChange(e) {
  313. this.info[this.check_box_name] = e
  314. console.log(this.info)
  315. },
  316. // 选中某个复选框时,由checkbox时触发
  317. checkboxChange(name) {
  318. this.check_box_name = name
  319. console.log('chenckshushush',this.check_box_name)
  320. },
  321. //单选
  322. radioChange(e) {
  323. console.log(e);
  324. },
  325. // 选中任一radio时,由radio-group触发
  326. radioGroupChange(e) {
  327. console.log(e);
  328. },
  329. computedAge() {
  330. this.$check(this.vertify_code,'card');
  331. let judge_sex = this.vertify_code[16];
  332. let judge_birthday = this.vertify_code.substring(6,14);
  333. let now_date = new Date();
  334. let now_date1 = this.$shared.recordTime(now_date, '-', 'date').replace(/-/g, "");
  335. let age1 = now_date1-judge_birthday;
  336. this.age = JSON.stringify(age1).substring(0,2)
  337. if(judge_sex%2) {
  338. this.sex = '男';
  339. }else {
  340. this.sex = '女';
  341. }
  342. if(this.vertify_code == '') {
  343. this.sex = '请输入身份证号码获取';
  344. this.age = '请输入身份证号码获取';
  345. }
  346. },
  347. getPhoneNumber(event){
  348. if(event.detail.errMsg == 'getPhoneNumber:ok'){
  349. let encryptedData = event.detail.encryptedData;
  350. let iv = event.detail.iv;
  351. this.$http(this.API.API_WECHAT_SETPHONE, {
  352. encryptedData,
  353. iv,
  354. // token: userInfo.token // 已在公共参数传
  355. }).then(res => {
  356. this.phone = res.data.mobile;
  357. })
  358. }
  359. },
  360. payStatus(type) {
  361. if(type == this.pay_type) {
  362. this.pay_type = type;
  363. return
  364. }else {
  365. this.pay_type = type;
  366. this.getGoodsData(type);
  367. }
  368. },
  369. getGoodsData(type){
  370. this.$http(this.API.API_CONFIRMDETAILS,{id: this.goods_id,num: this.buy_num,pay_type: type,spec_id: this.hotel_specid}).then(res => {
  371. this.goods_details = res.data;
  372. console.log('数据',res)
  373. })
  374. },
  375. submit(url) {
  376. if(this.order_id && this.enter_type == 1) {
  377. this.payOnce()
  378. return
  379. }
  380. this.upload()
  381. if(!this.ifPay) return;
  382. this.ifPay = false;
  383. this.$http(this.API.API_CREATEORDER,{
  384. id: this.goods_id,
  385. num: this.buy_num,
  386. pay_type: this.pay_type,
  387. name:this.contact,
  388. mobile:this.phone,
  389. spec_id: this.hotel_specid,
  390. enter_time: this.enter_time,
  391. sex: this.sex,
  392. age: this.age,
  393. id_card: this.vertify_code,
  394. departure_time: this.departure_time,
  395. return_time: this.return_time,
  396. check_in_time: this.check_in_time,
  397. check_out_time: this.check_out_time,
  398. arrival_time: this.arrival_time,
  399. info: this.info
  400. }).then(res => {
  401. this.pay_order_id = res.data.id
  402. if(this.pay_type == 1) {
  403. this.ifPay = true
  404. this.$url('/pages/payState/paystate?ifSuccess=1&order_id='+res.data.id,{type: 'redirect'})
  405. }else if(res.data.jump == true) {
  406. let that = this;
  407. wx.navigateToMiniProgram({
  408. appId: res.data.jump_appid,
  409. path: '/pages/order/confirm_atonce',
  410. envVersion: 'release',
  411. extraData: {
  412. order_id: res.data.id
  413. },
  414. success(res) {
  415. console.log('---res---');
  416. that.ifPay = true;
  417. console.log(res);
  418. },
  419. fail(err) {
  420. console.log('---err---');
  421. console.log(err);
  422. that.ifPay = true;
  423. }
  424. })
  425. }
  426. }).catch(err => {
  427. this.ifPay = true
  428. })
  429. },
  430. checkImgInfo(tempFilePath, suc){
  431. uni.getImageInfo({
  432. src: tempFilePath,
  433. success (res) {
  434. let type = res.type;
  435. console.log('checkImgInfo...', type);
  436. if(type == 'png' || type == 'jpeg' || type == 'jpg'){
  437. suc && suc(true);
  438. } else {
  439. suc && suc(false);
  440. }
  441. },
  442. fail(err) {
  443. suc && suc(false);
  444. }
  445. })
  446. },
  447. // 选择图片
  448. ChooseImage(name,e) {
  449. let that = this;
  450. uni.chooseImage({
  451. count: 1,
  452. sizeType: ['original'], // 可以指定是原图original还是压缩图compressed ,默认二者都有
  453. sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有
  454. success: res => {
  455. that.hostImg = res.tempFilePaths[0];
  456. let tempFile = res.tempFiles.shift();
  457. let tempFilePath = res.tempFilePaths.shift();
  458. console.log('临时路径',res)
  459. that.checkImgInfo(tempFilePath, (res) => {
  460. // 过滤不是图片不是png、jpeg 格式
  461. if(res){
  462. if(tempFile.size > 10000000){
  463. uni.showModal({
  464. title: '',
  465. content: '您选择的图片过大:'+ (tempFile.size / 1024000).toFixed(2) +"M,请点击确定重新上传",
  466. success: res2 => {
  467. if(res2.confirm){
  468. uni.chooseImage({
  469. count: 1,
  470. sizeType: ['compressed'],
  471. sourceType: ['album', 'camera'],
  472. success: (res3) => {
  473. let tempFilePath = res3.tempFilePaths.shift();
  474. that.is_wx_reduce = true;
  475. that.img_list.push(tempFilePath);
  476. }
  477. })
  478. }
  479. }
  480. })
  481. } else{
  482. that.img_list.push(tempFilePath);
  483. console.log('图片数sadad组',name)
  484. that.image_name = name
  485. this.upload()
  486. }
  487. } else {
  488. uni.showModal({
  489. title: '',
  490. content: '选择的图片须为jpg、jpeg或png格式',
  491. showCancel: false,
  492. confirmColor: '#1697EE'
  493. })
  494. }
  495. });
  496. }
  497. });
  498. },
  499. // 上传图片到服务器
  500. upload(url){
  501. let that = this;
  502. let uploads = [];
  503. // 商品banner图上传
  504. if (that.img_list.length > 0) {
  505. for (let i = 0; i < that.img_list.length; i++) {
  506. let upload_img = new Promise((resolve, reject) => {
  507. that.uploadFile(that.img_list[i], (res) => {
  508. resolve(res);
  509. }, (err) => {
  510. reject(err);
  511. });
  512. })
  513. uploads.push(upload_img);
  514. }
  515. }
  516. if(uploads.length == 0) {
  517. // that.submit([]);
  518. return
  519. }
  520. Promise.all(uploads).then((result) => {
  521. let img_url_list = [];
  522. if(result.length > 0){
  523. img_url_list = result;
  524. }
  525. if(img_url_list) {
  526. console.log('传来的名字',that.image_name)
  527. that.info[that.image_name] = img_url_list;
  528. console.log('=====图片数组',that.info)
  529. }
  530. }).catch(err => {
  531. that.is_publish = false; // 恢复提交按钮
  532. uni.showModal({
  533. title: '',
  534. content: '图片上传失败,请重新提交',
  535. confirmColor: '#1697EE'
  536. })
  537. })
  538. },
  539. // 预览图片
  540. showImg(index) {
  541. this.$u.throttle(() => {
  542. let goods_banner = this.img_list || [];
  543. let banners = goods_banner.map(item => item);
  544. uni.previewImage({
  545. urls: banners,
  546. current: index
  547. })
  548. }, 200);
  549. },
  550. // 删除图片
  551. DelImg(index) {
  552. uni.showModal({
  553. title: '提示',
  554. content: '即将取消上传这张图片,请确认?',
  555. success: e => {
  556. if (!e.confirm) return;
  557. this.img_list.splice(index, 1);
  558. this.upload()
  559. }
  560. });
  561. },
  562. payOnce() {
  563. this.$http(this.API.API_ORDERPAY,{id: this.order_id}).then(res => {
  564. if(res.data.jump) {
  565. wx.navigateToMiniProgram({
  566. appId: res.data.jump_appid,
  567. path: '/pages/order/confirm_atonce',
  568. envVersion: 'release',
  569. extraData: {
  570. order_id: res.data.id
  571. },
  572. success(res) {
  573. console.log('---res---')
  574. console.log(res)
  575. },
  576. fail(err) {
  577. console.log('---err---')
  578. console.log(err)
  579. }
  580. })
  581. }
  582. }).catch(err => {})
  583. }
  584. }
  585. }
  586. </script>
  587. <style scoped lang="scss">
  588. .cu-bar1 {
  589. display: flex;
  590. position: relative;
  591. align-items: center;
  592. min-height: 100rpx;
  593. }
  594. .btn{
  595. margin: 0;
  596. padding: 0;
  597. width: 212rpx;
  598. height: 82rpx;
  599. background-color: #1998FE;
  600. color: #FFFFFF;
  601. line-height: 80rpx;
  602. font-size: 32rpx;
  603. border-radius: 41rpx;
  604. }
  605. .bref-box {
  606. text-overflow: -o-ellipsis-lastline;
  607. overflow: hidden;
  608. text-overflow: ellipsis;
  609. display: -webkit-box;
  610. -webkit-line-clamp: 2;
  611. -webkit-box-orient: vertical;
  612. }
  613. .font-change{
  614. position: absolute;
  615. right: 10rpx;
  616. bottom: 10rpx;
  617. width: max-content;
  618. color: #777777;
  619. }
  620. </style>