result.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <appResult title="注册成功">
  3. <view class="dec"></view>
  4. <view v-if="fromCg == 1">
  5. <button class="admin-button-com blue big" @click="beginCg()" >开始买花</button>
  6. </view>
  7. <view v-else>
  8. <button class="admin-button-com blue big" v-if="scene==''" @click="goBack()" >返回</button>
  9. <button class="admin-button-com blue big" v-else @click="beginCg()" >开始买花</button>
  10. </view>
  11. </appResult>
  12. </template>
  13. <script>
  14. import appResult from '@/components/app-result'
  15. export default {
  16. name: "applyResult",
  17. components:{
  18. appResult
  19. },
  20. data(){
  21. return {
  22. scene:'',
  23. fromCg:0
  24. }
  25. },
  26. onUnload() {
  27. },
  28. onLoad () {
  29. //供货商打开小程序分享给客户,客户需要采购进来
  30. let ghsCgOption = uni.getStorageSync('ghsCgOption')
  31. if(ghsCgOption.fromCg){
  32. this.fromCg = ghsCgOption.fromCg
  33. }
  34. //供货商打开太阳码分享给客户,客户需要采购进来
  35. let scene = uni.getStorageSync('ghsCgScene')
  36. if(scene){
  37. this.scene = scene
  38. }
  39. },
  40. methods:{
  41. beginCg(){
  42. if(this.fromCg == 1){
  43. let ghsCgOption = uni.getStorageSync('ghsCgOption')
  44. this.$util.pageTo({url: "/pagesPurchase/ghsProduct", query:ghsCgOption, type:2})
  45. }else{
  46. this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {scene:this.scene},type:2})
  47. }
  48. },
  49. goBack() {
  50. uni.navigateBack()
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. .dec {
  57. color: #666666;
  58. font-size: 28upx;
  59. font-weight: 400;
  60. margin-bottom: 30upx;
  61. }
  62. .admin-button-com {
  63. margin-bottom: 20upx;
  64. width: 100%;
  65. }
  66. </style>